From 3394b3eff5e0e2a9ccf2b6243e163c89d7fbf2c5 Mon Sep 17 00:00:00 2001 From: Eduard Kuzmenko Date: Tue, 29 Dec 2020 10:08:50 +0200 Subject: [PATCH] 6 Tour end --- babel.config.js | 46 +- package-lock.json | 4492 +- package.json | 16 +- src/components/appSearchSuper..ts | 10 +- src/components/chat/chat.ts | 2 +- src/components/chat/input.ts | 2 +- src/lib/appManagers/appImManager.ts | 5 +- src/lib/appManagers/appMessagesManager.ts | 20 +- src/lib/mtproto/mtproto_config.ts | 2 +- src/scss/partials/_audio.scss | 11 +- src/scss/partials/_chatBubble.scss | 5 + src/scss/partials/_chatlist.scss | 38 +- src/scss/partials/_document.scss | 2 +- src/scss/partials/_leftSidebar.scss | 28 + src/scss/partials/_rightSidebar.scss | 101 +- src/scss/style.scss | 4 + stats.json | 44163 -------------------- tsconfig.json | 4 +- webpack.common.js | 11 +- whybundled.txt | Bin 97110 -> 0 bytes 20 files changed, 3213 insertions(+), 45749 deletions(-) delete mode 100644 stats.json delete mode 100644 whybundled.txt diff --git a/babel.config.js b/babel.config.js index b6e85c52..16a61f65 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,7 +1,41 @@ -module.exports = { - presets: [ - ['@babel/preset-env', {targets: {node: 'current'}}], - '@babel/preset-typescript', - ]/* , - plugins: ["@babel/plugin-syntax-dynamic-import"] */ +const config2 = { + "presets": [ + "@babel/preset-typescript", + + [ + "@babel/preset-env", + { + "modules": false, + "corejs": 3, + "useBuiltIns": "usage", + //"include": ["es.promise.finally"], + "targets": { + "chrome": "56" + } + } + ], + + //"@babel/preset-2015" + ], + "plugins": [ + ["@babel/plugin-proposal-class-properties", { "loose": true }], + ["@babel/plugin-transform-typescript", { + "allowNamespaces": true + }] + ] }; + +const config3 = { + "presets": [ + "@babel/preset-env", + "@babel/preset-typescript" + ], + "plugins": [ + "@babel/plugin-proposal-class-properties", + ["@babel/plugin-transform-typescript", { + "allowNamespaces": true + }] + ] +}; + +module.exports = config2; \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 55851357..bb96d58f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,189 +4,298 @@ "lockfileVersion": 1, "requires": true, "dependencies": { - "@babel/code-frame": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", - "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", - "dev": true, - "requires": { - "@babel/highlight": "^7.8.3" - } - }, - "@babel/compat-data": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.10.1.tgz", - "integrity": "sha512-CHvCj7So7iCkGKPRFUfryXIkU2gSBw7VSZFYLsqVhrS47269VK2Hfi9S/YcublPMW8k1u2bQBlbDruoQEm4fgw==", + "@babel/cli": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.12.1.tgz", + "integrity": "sha512-eRJREyrfAJ2r42Iaxe8h3v6yyj1wu9OyosaUHW6UImjGf9ahGL9nsFNh7OCopvtcPL8WnEo7tp78wrZaZ6vG9g==", "dev": true, "requires": { - "browserslist": "^4.12.0", - "invariant": "^2.2.4", - "semver": "^5.5.0" + "@nicolo-ribaudo/chokidar-2": "^2.1.8", + "chokidar": "^3.4.0", + "commander": "^4.0.1", + "convert-source-map": "^1.1.0", + "fs-readdir-recursive": "^1.1.0", + "glob": "^7.0.0", + "lodash": "^4.17.19", + "make-dir": "^2.1.0", + "slash": "^2.0.0", + "source-map": "^0.5.0" }, "dependencies": { - "browserslist": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.12.0.tgz", - "integrity": "sha512-UH2GkcEDSI0k/lRkuDSzFl9ZZ87skSy9w2XAn1MsZnL+4c4rqbBd3e82UWHbYDpztABrPBhZsTEeuxVfHppqDg==", + "anymatch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", + "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", "dev": true, + "optional": true, "requires": { - "caniuse-lite": "^1.0.30001043", - "electron-to-chromium": "^1.3.413", - "node-releases": "^1.1.53", - "pkg-up": "^2.0.0" + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" } }, - "caniuse-lite": { - "version": "1.0.30001066", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001066.tgz", - "integrity": "sha512-Gfj/WAastBtfxLws0RCh2sDbTK/8rJuSeZMecrSkNGYxPcv7EzblmDGfWQCFEQcSqYE2BRgQiJh8HOD07N5hIw==", + "binary-extensions": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", + "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==", + "dev": true, + "optional": true + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "optional": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "chokidar": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.3.tgz", + "integrity": "sha512-DtM3g7juCXQxFVSNPNByEC2+NImtBuxQQvWlHunpJIS5Ocr0lG306cC7FCi7cEA0fzmybPUIl4txBIobk1gGOQ==", + "dev": true, + "optional": true, + "requires": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "fsevents": "~2.1.2", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.5.0" + } + }, + "commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", "dev": true }, - "electron-to-chromium": { - "version": "1.3.458", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.458.tgz", - "integrity": "sha512-OjRkb0igW0oKE2QbzS7vBYrm7xjW/KRTtIj0OGGx57jr/YhBiKb7oZvdbaojqjfCb/7LbnwsbMbdsYjthdJbAw==", + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "optional": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "fsevents": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", + "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", + "dev": true, + "optional": true + }, + "glob-parent": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", + "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "dev": true, + "optional": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "optional": true, + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "optional": true + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", "dev": true + }, + "readdirp": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", + "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", + "dev": true, + "optional": true, + "requires": { + "picomatch": "^2.2.1" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "optional": true, + "requires": { + "is-number": "^7.0.0" + } } } }, + "@babel/code-frame": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", + "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", + "dev": true, + "requires": { + "@babel/highlight": "^7.8.3" + } + }, + "@babel/compat-data": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.12.1.tgz", + "integrity": "sha512-725AQupWJZ8ba0jbKceeFblZTY90McUBWMwHhkFQ9q1zKPJ95GUktljFcgcsIVwRnTnRKlcYzfiNImg5G9m6ZQ==", + "dev": true + }, "@babel/core": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.10.2.tgz", - "integrity": "sha512-KQmV9yguEjQsXqyOUGKjS4+3K8/DlOCE2pZcq4augdQmtTy5iv5EHtmMSJ7V4c1BIPjuwtZYqYLCq9Ga+hGBRQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.10.1", - "@babel/generator": "^7.10.2", - "@babel/helper-module-transforms": "^7.10.1", - "@babel/helpers": "^7.10.1", - "@babel/parser": "^7.10.2", - "@babel/template": "^7.10.1", - "@babel/traverse": "^7.10.1", - "@babel/types": "^7.10.2", + "version": "7.12.3", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.3.tgz", + "integrity": "sha512-0qXcZYKZp3/6N2jKYVxZv0aNCsxTSVCiK72DTiTYZAu7sjg73W0/aynWjMbiGd87EQL4WyA8reiJVh92AVla9g==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.12.1", + "@babel/helper-module-transforms": "^7.12.1", + "@babel/helpers": "^7.12.1", + "@babel/parser": "^7.12.3", + "@babel/template": "^7.10.4", + "@babel/traverse": "^7.12.1", + "@babel/types": "^7.12.1", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.1", "json5": "^2.1.2", - "lodash": "^4.17.13", + "lodash": "^4.17.19", "resolve": "^1.3.2", "semver": "^5.4.1", "source-map": "^0.5.0" }, "dependencies": { "@babel/code-frame": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.1.tgz", - "integrity": "sha512-IGhtTmpjGbYzcEDOw7DcQtbQSXcG9ftmAXtWTu9V936vDye4xjjekktFAtgZsWpzTj/X01jocB46mTywm/4SZw==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", + "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", "dev": true, "requires": { - "@babel/highlight": "^7.10.1" + "@babel/highlight": "^7.10.4" } }, "@babel/generator": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.10.2.tgz", - "integrity": "sha512-AxfBNHNu99DTMvlUPlt1h2+Hn7knPpH5ayJ8OqDWSeLld+Fi2AYBTC/IejWDM9Edcii4UzZRCsbUt0WlSDsDsA==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.1.tgz", + "integrity": "sha512-DB+6rafIdc9o72Yc3/Ph5h+6hUjeOp66pF0naQBgUFFuPqzQwIlPTm3xZR7YNvduIMtkDIj2t21LSQwnbCrXvg==", "dev": true, "requires": { - "@babel/types": "^7.10.2", + "@babel/types": "^7.12.1", "jsesc": "^2.5.1", - "lodash": "^4.17.13", "source-map": "^0.5.0" } }, "@babel/helper-function-name": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.1.tgz", - "integrity": "sha512-fcpumwhs3YyZ/ttd5Rz0xn0TpIwVkN7X0V38B9TWNfVF42KEkhkAAuPCQ3oXmtTRtiPJrmZ0TrfS0GKF0eMaRQ==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz", + "integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==", "dev": true, "requires": { - "@babel/helper-get-function-arity": "^7.10.1", - "@babel/template": "^7.10.1", - "@babel/types": "^7.10.1" + "@babel/helper-get-function-arity": "^7.10.4", + "@babel/template": "^7.10.4", + "@babel/types": "^7.10.4" } }, "@babel/helper-get-function-arity": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.1.tgz", - "integrity": "sha512-F5qdXkYGOQUb0hpRaPoetF9AnsXknKjWMZ+wmsIRsp5ge5sFh4c3h1eH2pRTTuy9KKAA2+TTYomGXAtEL2fQEw==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz", + "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==", "dev": true, "requires": { - "@babel/types": "^7.10.1" + "@babel/types": "^7.10.4" } }, "@babel/helper-split-export-declaration": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.10.1.tgz", - "integrity": "sha512-UQ1LVBPrYdbchNhLwj6fetj46BcFwfS4NllJo/1aJsT+1dLTEnXJL0qHqtY7gPzF8S2fXBJamf1biAXV3X077g==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz", + "integrity": "sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==", "dev": true, "requires": { - "@babel/types": "^7.10.1" + "@babel/types": "^7.11.0" } }, "@babel/highlight": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.1.tgz", - "integrity": "sha512-8rMof+gVP8mxYZApLF/JgNDAkdKa+aJt3ZYxF8z6+j/hpeXL7iMsKCPHa2jNMHu/qqBwzQF4OHNoYi8dMA/rYg==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", + "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.10.1", + "@babel/helper-validator-identifier": "^7.10.4", "chalk": "^2.0.0", "js-tokens": "^4.0.0" } }, "@babel/parser": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.10.2.tgz", - "integrity": "sha512-PApSXlNMJyB4JiGVhCOlzKIif+TKFTvu0aQAhnTvfP/z3vVSN6ZypH5bfUNwFXXjRQtUEBNFd2PtmCmG2Py3qQ==", + "version": "7.12.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.3.tgz", + "integrity": "sha512-kFsOS0IbsuhO5ojF8Hc8z/8vEIOkylVBrjiZUbLTE3XFe0Qi+uu6HjzQixkFaqr0ZPAMZcBVxEwmsnsLPZ2Xsw==", "dev": true }, "@babel/template": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.1.tgz", - "integrity": "sha512-OQDg6SqvFSsc9A0ej6SKINWrpJiNonRIniYondK2ViKhB06i3c0s+76XUft71iqBEe9S1OKsHwPAjfHnuvnCig==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz", + "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==", "dev": true, "requires": { - "@babel/code-frame": "^7.10.1", - "@babel/parser": "^7.10.1", - "@babel/types": "^7.10.1" + "@babel/code-frame": "^7.10.4", + "@babel/parser": "^7.10.4", + "@babel/types": "^7.10.4" } }, "@babel/traverse": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.10.1.tgz", - "integrity": "sha512-C/cTuXeKt85K+p08jN6vMDz8vSV0vZcI0wmQ36o6mjbuo++kPMdpOYw23W2XH04dbRt9/nMEfA4W3eR21CD+TQ==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.1.tgz", + "integrity": "sha512-MA3WPoRt1ZHo2ZmoGKNqi20YnPt0B1S0GTZEPhhd+hw2KGUzBlHuVunj6K4sNuK+reEvyiPwtp0cpaqLzJDmAw==", "dev": true, "requires": { - "@babel/code-frame": "^7.10.1", - "@babel/generator": "^7.10.1", - "@babel/helper-function-name": "^7.10.1", - "@babel/helper-split-export-declaration": "^7.10.1", - "@babel/parser": "^7.10.1", - "@babel/types": "^7.10.1", + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.12.1", + "@babel/helper-function-name": "^7.10.4", + "@babel/helper-split-export-declaration": "^7.11.0", + "@babel/parser": "^7.12.1", + "@babel/types": "^7.12.1", "debug": "^4.1.0", "globals": "^11.1.0", - "lodash": "^4.17.13" + "lodash": "^4.17.19" } }, "@babel/types": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.2.tgz", - "integrity": "sha512-AD3AwWBSz0AWF0AkCN9VPiWrvldXq+/e3cHa4J89vo4ymjz1XwrBFFVZmkJTsQIPNk+ZVomPSXUJqq8yyjZsng==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz", + "integrity": "sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.10.1", - "lodash": "^4.17.13", + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } }, "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" } }, "json5": { @@ -198,6 +307,12 @@ "minimist": "^1.2.5" } }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -219,409 +334,494 @@ } }, "@babel/helper-annotate-as-pure": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.10.1.tgz", - "integrity": "sha512-ewp3rvJEwLaHgyWGe4wQssC2vjks3E80WiUe2BpMb0KhreTjMROCbxXcEovTrbeGVdQct5VjQfrv9EgC+xMzCw==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.10.4.tgz", + "integrity": "sha512-XQlqKQP4vXFB7BN8fEEerrmYvHp3fK/rBkRFz9jaJbzK0B1DSfej9Kc7ZzE8Z/OnId1jpJdNAZ3BFQjWG68rcA==", "dev": true, "requires": { - "@babel/types": "^7.10.1" + "@babel/types": "^7.10.4" }, "dependencies": { "@babel/types": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.2.tgz", - "integrity": "sha512-AD3AwWBSz0AWF0AkCN9VPiWrvldXq+/e3cHa4J89vo4ymjz1XwrBFFVZmkJTsQIPNk+ZVomPSXUJqq8yyjZsng==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz", + "integrity": "sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.10.1", - "lodash": "^4.17.13", + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true } } }, "@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.10.1.tgz", - "integrity": "sha512-cQpVq48EkYxUU0xozpGCLla3wlkdRRqLWu1ksFMXA9CM5KQmyyRpSEsYXbao7JUkOw/tAaYKCaYyZq6HOFYtyw==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.10.4.tgz", + "integrity": "sha512-L0zGlFrGWZK4PbT8AszSfLTM5sDU1+Az/En9VrdT8/LmEiJt4zXt+Jve9DCAnQcbqDhCI+29y/L93mrDzddCcg==", "dev": true, "requires": { - "@babel/helper-explode-assignable-expression": "^7.10.1", - "@babel/types": "^7.10.1" + "@babel/helper-explode-assignable-expression": "^7.10.4", + "@babel/types": "^7.10.4" }, "dependencies": { "@babel/types": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.2.tgz", - "integrity": "sha512-AD3AwWBSz0AWF0AkCN9VPiWrvldXq+/e3cHa4J89vo4ymjz1XwrBFFVZmkJTsQIPNk+ZVomPSXUJqq8yyjZsng==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz", + "integrity": "sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.10.1", - "lodash": "^4.17.13", + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true } } }, - "@babel/helper-compilation-targets": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.10.2.tgz", - "integrity": "sha512-hYgOhF4To2UTB4LTaZepN/4Pl9LD4gfbJx8A34mqoluT8TLbof1mhUlYuNWTEebONa8+UlCC4X0TEXu7AOUyGA==", + "@babel/helper-call-delegate": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/helper-call-delegate/-/helper-call-delegate-7.0.0-beta.53.tgz", + "integrity": "sha1-ld6Lq9A/nmz08rVkoDhwjBOP/jE=", "dev": true, "requires": { - "@babel/compat-data": "^7.10.1", - "browserslist": "^4.12.0", - "invariant": "^2.2.4", - "levenary": "^1.1.1", - "semver": "^5.5.0" + "@babel/helper-hoist-variables": "7.0.0-beta.53", + "@babel/traverse": "7.0.0-beta.53", + "@babel/types": "7.0.0-beta.53" }, "dependencies": { - "browserslist": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.12.0.tgz", - "integrity": "sha512-UH2GkcEDSI0k/lRkuDSzFl9ZZ87skSy9w2XAn1MsZnL+4c4rqbBd3e82UWHbYDpztABrPBhZsTEeuxVfHppqDg==", + "@babel/code-frame": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.53.tgz", + "integrity": "sha1-mA0VYLhjV1v1o3eSUDfgEy71kh4=", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001043", - "electron-to-chromium": "^1.3.413", - "node-releases": "^1.1.53", - "pkg-up": "^2.0.0" + "@babel/highlight": "7.0.0-beta.53" } }, - "caniuse-lite": { - "version": "1.0.30001066", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001066.tgz", - "integrity": "sha512-Gfj/WAastBtfxLws0RCh2sDbTK/8rJuSeZMecrSkNGYxPcv7EzblmDGfWQCFEQcSqYE2BRgQiJh8HOD07N5hIw==", - "dev": true - }, - "electron-to-chromium": { - "version": "1.3.458", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.458.tgz", - "integrity": "sha512-OjRkb0igW0oKE2QbzS7vBYrm7xjW/KRTtIj0OGGx57jr/YhBiKb7oZvdbaojqjfCb/7LbnwsbMbdsYjthdJbAw==", - "dev": true - } - } - }, - "@babel/helper-create-class-features-plugin": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.10.2.tgz", - "integrity": "sha512-5C/QhkGFh1vqcziq1vAL6SI9ymzUp8BCYjFpvYVhWP4DlATIb3u5q3iUd35mvlyGs8fO7hckkW7i0tmH+5+bvQ==", - "dev": true, - "requires": { - "@babel/helper-function-name": "^7.10.1", - "@babel/helper-member-expression-to-functions": "^7.10.1", - "@babel/helper-optimise-call-expression": "^7.10.1", - "@babel/helper-plugin-utils": "^7.10.1", - "@babel/helper-replace-supers": "^7.10.1", - "@babel/helper-split-export-declaration": "^7.10.1" - }, - "dependencies": { - "@babel/code-frame": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.1.tgz", - "integrity": "sha512-IGhtTmpjGbYzcEDOw7DcQtbQSXcG9ftmAXtWTu9V936vDye4xjjekktFAtgZsWpzTj/X01jocB46mTywm/4SZw==", + "@babel/generator": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.0.0-beta.53.tgz", + "integrity": "sha1-uMrXLFcr4yNK/94ivm2sxCUOA0s=", "dev": true, "requires": { - "@babel/highlight": "^7.10.1" + "@babel/types": "7.0.0-beta.53", + "jsesc": "^2.5.1", + "lodash": "^4.17.5", + "source-map": "^0.5.0", + "trim-right": "^1.0.1" } }, "@babel/helper-function-name": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.1.tgz", - "integrity": "sha512-fcpumwhs3YyZ/ttd5Rz0xn0TpIwVkN7X0V38B9TWNfVF42KEkhkAAuPCQ3oXmtTRtiPJrmZ0TrfS0GKF0eMaRQ==", + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.53.tgz", + "integrity": "sha1-USgEro6cvOVDHr6hnkdijC7WU/I=", "dev": true, "requires": { - "@babel/helper-get-function-arity": "^7.10.1", - "@babel/template": "^7.10.1", - "@babel/types": "^7.10.1" + "@babel/helper-get-function-arity": "7.0.0-beta.53", + "@babel/template": "7.0.0-beta.53", + "@babel/types": "7.0.0-beta.53" } }, "@babel/helper-get-function-arity": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.1.tgz", - "integrity": "sha512-F5qdXkYGOQUb0hpRaPoetF9AnsXknKjWMZ+wmsIRsp5ge5sFh4c3h1eH2pRTTuy9KKAA2+TTYomGXAtEL2fQEw==", + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.53.tgz", + "integrity": "sha1-3tiKsp+bHbYch9G7jTijXdp3neY=", "dev": true, "requires": { - "@babel/types": "^7.10.1" + "@babel/types": "7.0.0-beta.53" } }, - "@babel/helper-plugin-utils": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz", - "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==", - "dev": true + "@babel/helper-hoist-variables": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.0.0-beta.53.tgz", + "integrity": "sha1-TCfjuHP6CcWtbpPrQHBMIA+EE3w=", + "dev": true, + "requires": { + "@babel/types": "7.0.0-beta.53" + } }, "@babel/helper-split-export-declaration": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.10.1.tgz", - "integrity": "sha512-UQ1LVBPrYdbchNhLwj6fetj46BcFwfS4NllJo/1aJsT+1dLTEnXJL0qHqtY7gPzF8S2fXBJamf1biAXV3X077g==", + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0-beta.53.tgz", + "integrity": "sha1-rvVLix+ZYW6jfJhHhxajeAJjMls=", "dev": true, "requires": { - "@babel/types": "^7.10.1" + "@babel/types": "7.0.0-beta.53" } }, "@babel/highlight": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.1.tgz", - "integrity": "sha512-8rMof+gVP8mxYZApLF/JgNDAkdKa+aJt3ZYxF8z6+j/hpeXL7iMsKCPHa2jNMHu/qqBwzQF4OHNoYi8dMA/rYg==", + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0-beta.53.tgz", + "integrity": "sha1-9OlS2tF4fSBeGI0+OEzc5JyjaPs=", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.10.1", "chalk": "^2.0.0", - "js-tokens": "^4.0.0" + "esutils": "^2.0.2", + "js-tokens": "^3.0.0" } }, "@babel/parser": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.10.2.tgz", - "integrity": "sha512-PApSXlNMJyB4JiGVhCOlzKIif+TKFTvu0aQAhnTvfP/z3vVSN6ZypH5bfUNwFXXjRQtUEBNFd2PtmCmG2Py3qQ==", + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.0.0-beta.53.tgz", + "integrity": "sha1-H0XrYXv5Rj1IKywE00nZ5O2/SJI=", "dev": true }, "@babel/template": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.1.tgz", - "integrity": "sha512-OQDg6SqvFSsc9A0ej6SKINWrpJiNonRIniYondK2ViKhB06i3c0s+76XUft71iqBEe9S1OKsHwPAjfHnuvnCig==", + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.0.0-beta.53.tgz", + "integrity": "sha1-MyIpCQDQsYewpxdDgeHzu3EFDS4=", "dev": true, "requires": { - "@babel/code-frame": "^7.10.1", - "@babel/parser": "^7.10.1", - "@babel/types": "^7.10.1" + "@babel/code-frame": "7.0.0-beta.53", + "@babel/parser": "7.0.0-beta.53", + "@babel/types": "7.0.0-beta.53", + "lodash": "^4.17.5" + } + }, + "@babel/traverse": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.0.0-beta.53.tgz", + "integrity": "sha1-ANMs2NC1j0wB0xFXvmIsZigm00Q=", + "dev": true, + "requires": { + "@babel/code-frame": "7.0.0-beta.53", + "@babel/generator": "7.0.0-beta.53", + "@babel/helper-function-name": "7.0.0-beta.53", + "@babel/helper-split-export-declaration": "7.0.0-beta.53", + "@babel/parser": "7.0.0-beta.53", + "@babel/types": "7.0.0-beta.53", + "debug": "^3.1.0", + "globals": "^11.1.0", + "invariant": "^2.2.0", + "lodash": "^4.17.5" } }, "@babel/types": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.2.tgz", - "integrity": "sha512-AD3AwWBSz0AWF0AkCN9VPiWrvldXq+/e3cHa4J89vo4ymjz1XwrBFFVZmkJTsQIPNk+ZVomPSXUJqq8yyjZsng==", + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.0.0-beta.53.tgz", + "integrity": "sha1-GaRhwNpRVZXftnQLS0Xce7Dms3U=", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.10.1", - "lodash": "^4.17.13", + "esutils": "^2.0.2", + "lodash": "^4.17.5", "to-fast-properties": "^2.0.0" } + }, + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "dev": true + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true } } }, - "@babel/helper-create-regexp-features-plugin": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.10.1.tgz", - "integrity": "sha512-Rx4rHS0pVuJn5pJOqaqcZR4XSgeF9G/pO/79t+4r7380tXFJdzImFnxMU19f83wjSrmKHq6myrM10pFHTGzkUA==", + "@babel/helper-compilation-targets": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.12.1.tgz", + "integrity": "sha512-jtBEif7jsPwP27GPHs06v4WBV0KrE8a/P7n0N0sSvHn2hwUCYnolP/CLmz51IzAW4NlN+HuoBtb9QcwnRo9F/g==", "dev": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.10.1", - "@babel/helper-regex": "^7.10.1", - "regexpu-core": "^4.7.0" + "@babel/compat-data": "^7.12.1", + "@babel/helper-validator-option": "^7.12.1", + "browserslist": "^4.12.0", + "semver": "^5.5.0" + }, + "dependencies": { + "browserslist": { + "version": "4.14.5", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.14.5.tgz", + "integrity": "sha512-Z+vsCZIvCBvqLoYkBFTwEYH3v5MCQbsAjp50ERycpOjnPmolg1Gjy4+KaWWpm8QOJt9GHkhdqAl14NpCX73CWA==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001135", + "electron-to-chromium": "^1.3.571", + "escalade": "^3.1.0", + "node-releases": "^1.1.61" + } + }, + "caniuse-lite": { + "version": "1.0.30001151", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001151.tgz", + "integrity": "sha512-Zh3sHqskX6mHNrqUerh+fkf0N72cMxrmflzje/JyVImfpknscMnkeJrlFGJcqTmaa0iszdYptGpWMJCRQDkBVw==", + "dev": true + }, + "electron-to-chromium": { + "version": "1.3.584", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.584.tgz", + "integrity": "sha512-NB3DzrTzJFhWkUp+nl2KtUtoFzrfGXTir2S+BU4tXGyXH9vlluPuFpE3pTKeH7+PY460tHLjKzh6K2+TWwW+Ww==", + "dev": true + }, + "node-releases": { + "version": "1.1.64", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.64.tgz", + "integrity": "sha512-Iec8O9166/x2HRMJyLLLWkd0sFFLrFNy+Xf+JQfSQsdBJzPcHpNl3JQ9gD4j+aJxmCa25jNsIbM4bmACtSbkSg==", + "dev": true + } } }, - "@babel/helper-define-map": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.10.1.tgz", - "integrity": "sha512-+5odWpX+OnvkD0Zmq7panrMuAGQBu6aPUgvMzuMGo4R+jUOvealEj2hiqI6WhxgKrTpFoFj0+VdsuA8KDxHBDg==", + "@babel/helper-create-class-features-plugin": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.12.1.tgz", + "integrity": "sha512-hkL++rWeta/OVOBTRJc9a5Azh5mt5WgZUGAKMD8JM141YsE08K//bp1unBBieO6rUKkIPyUE0USQ30jAy3Sk1w==", "dev": true, "requires": { - "@babel/helper-function-name": "^7.10.1", - "@babel/types": "^7.10.1", - "lodash": "^4.17.13" + "@babel/helper-function-name": "^7.10.4", + "@babel/helper-member-expression-to-functions": "^7.12.1", + "@babel/helper-optimise-call-expression": "^7.10.4", + "@babel/helper-replace-supers": "^7.12.1", + "@babel/helper-split-export-declaration": "^7.10.4" }, "dependencies": { "@babel/code-frame": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.1.tgz", - "integrity": "sha512-IGhtTmpjGbYzcEDOw7DcQtbQSXcG9ftmAXtWTu9V936vDye4xjjekktFAtgZsWpzTj/X01jocB46mTywm/4SZw==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", + "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", "dev": true, "requires": { - "@babel/highlight": "^7.10.1" + "@babel/highlight": "^7.10.4" } }, "@babel/helper-function-name": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.1.tgz", - "integrity": "sha512-fcpumwhs3YyZ/ttd5Rz0xn0TpIwVkN7X0V38B9TWNfVF42KEkhkAAuPCQ3oXmtTRtiPJrmZ0TrfS0GKF0eMaRQ==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz", + "integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==", "dev": true, "requires": { - "@babel/helper-get-function-arity": "^7.10.1", - "@babel/template": "^7.10.1", - "@babel/types": "^7.10.1" + "@babel/helper-get-function-arity": "^7.10.4", + "@babel/template": "^7.10.4", + "@babel/types": "^7.10.4" } }, "@babel/helper-get-function-arity": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.1.tgz", - "integrity": "sha512-F5qdXkYGOQUb0hpRaPoetF9AnsXknKjWMZ+wmsIRsp5ge5sFh4c3h1eH2pRTTuy9KKAA2+TTYomGXAtEL2fQEw==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz", + "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==", + "dev": true, + "requires": { + "@babel/types": "^7.10.4" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz", + "integrity": "sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==", "dev": true, "requires": { - "@babel/types": "^7.10.1" + "@babel/types": "^7.11.0" } }, "@babel/highlight": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.1.tgz", - "integrity": "sha512-8rMof+gVP8mxYZApLF/JgNDAkdKa+aJt3ZYxF8z6+j/hpeXL7iMsKCPHa2jNMHu/qqBwzQF4OHNoYi8dMA/rYg==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", + "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.10.1", + "@babel/helper-validator-identifier": "^7.10.4", "chalk": "^2.0.0", "js-tokens": "^4.0.0" } }, "@babel/parser": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.10.2.tgz", - "integrity": "sha512-PApSXlNMJyB4JiGVhCOlzKIif+TKFTvu0aQAhnTvfP/z3vVSN6ZypH5bfUNwFXXjRQtUEBNFd2PtmCmG2Py3qQ==", + "version": "7.12.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.3.tgz", + "integrity": "sha512-kFsOS0IbsuhO5ojF8Hc8z/8vEIOkylVBrjiZUbLTE3XFe0Qi+uu6HjzQixkFaqr0ZPAMZcBVxEwmsnsLPZ2Xsw==", "dev": true }, "@babel/template": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.1.tgz", - "integrity": "sha512-OQDg6SqvFSsc9A0ej6SKINWrpJiNonRIniYondK2ViKhB06i3c0s+76XUft71iqBEe9S1OKsHwPAjfHnuvnCig==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz", + "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==", "dev": true, "requires": { - "@babel/code-frame": "^7.10.1", - "@babel/parser": "^7.10.1", - "@babel/types": "^7.10.1" + "@babel/code-frame": "^7.10.4", + "@babel/parser": "^7.10.4", + "@babel/types": "^7.10.4" } }, "@babel/types": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.2.tgz", - "integrity": "sha512-AD3AwWBSz0AWF0AkCN9VPiWrvldXq+/e3cHa4J89vo4ymjz1XwrBFFVZmkJTsQIPNk+ZVomPSXUJqq8yyjZsng==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz", + "integrity": "sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.10.1", - "lodash": "^4.17.13", + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true } } }, - "@babel/helper-explode-assignable-expression": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.10.1.tgz", - "integrity": "sha512-vcUJ3cDjLjvkKzt6rHrl767FeE7pMEYfPanq5L16GRtrXIoznc0HykNW2aEYkcnP76P0isoqJ34dDMFZwzEpJg==", + "@babel/helper-create-regexp-features-plugin": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.12.1.tgz", + "integrity": "sha512-rsZ4LGvFTZnzdNZR5HZdmJVuXK8834R5QkF3WvcnBhrlVtF0HSIUC6zbreL9MgjTywhKokn8RIYRiq99+DLAxA==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.10.4", + "@babel/helper-regex": "^7.10.4", + "regexpu-core": "^4.7.1" + }, + "dependencies": { + "regexpu-core": { + "version": "4.7.1", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.1.tgz", + "integrity": "sha512-ywH2VUraA44DZQuRKzARmw6S66mr48pQVva4LBeRhcOltJ6hExvWly5ZjFLYo67xbIxb6W1q4bAGtgfEl20zfQ==", + "dev": true, + "requires": { + "regenerate": "^1.4.0", + "regenerate-unicode-properties": "^8.2.0", + "regjsgen": "^0.5.1", + "regjsparser": "^0.6.4", + "unicode-match-property-ecmascript": "^1.0.4", + "unicode-match-property-value-ecmascript": "^1.2.0" + } + } + } + }, + "@babel/helper-define-map": { + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.10.5.tgz", + "integrity": "sha512-fMw4kgFB720aQFXSVaXr79pjjcW5puTCM16+rECJ/plGS+zByelE8l9nCpV1GibxTnFVmUuYG9U8wYfQHdzOEQ==", "dev": true, "requires": { - "@babel/traverse": "^7.10.1", - "@babel/types": "^7.10.1" + "@babel/helper-function-name": "^7.10.4", + "@babel/types": "^7.10.5", + "lodash": "^4.17.19" }, "dependencies": { "@babel/code-frame": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.1.tgz", - "integrity": "sha512-IGhtTmpjGbYzcEDOw7DcQtbQSXcG9ftmAXtWTu9V936vDye4xjjekktFAtgZsWpzTj/X01jocB46mTywm/4SZw==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", + "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", "dev": true, "requires": { - "@babel/highlight": "^7.10.1" - } - }, - "@babel/generator": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.10.2.tgz", - "integrity": "sha512-AxfBNHNu99DTMvlUPlt1h2+Hn7knPpH5ayJ8OqDWSeLld+Fi2AYBTC/IejWDM9Edcii4UzZRCsbUt0WlSDsDsA==", - "dev": true, - "requires": { - "@babel/types": "^7.10.2", - "jsesc": "^2.5.1", - "lodash": "^4.17.13", - "source-map": "^0.5.0" + "@babel/highlight": "^7.10.4" } }, "@babel/helper-function-name": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.1.tgz", - "integrity": "sha512-fcpumwhs3YyZ/ttd5Rz0xn0TpIwVkN7X0V38B9TWNfVF42KEkhkAAuPCQ3oXmtTRtiPJrmZ0TrfS0GKF0eMaRQ==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz", + "integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==", "dev": true, "requires": { - "@babel/helper-get-function-arity": "^7.10.1", - "@babel/template": "^7.10.1", - "@babel/types": "^7.10.1" + "@babel/helper-get-function-arity": "^7.10.4", + "@babel/template": "^7.10.4", + "@babel/types": "^7.10.4" } }, "@babel/helper-get-function-arity": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.1.tgz", - "integrity": "sha512-F5qdXkYGOQUb0hpRaPoetF9AnsXknKjWMZ+wmsIRsp5ge5sFh4c3h1eH2pRTTuy9KKAA2+TTYomGXAtEL2fQEw==", - "dev": true, - "requires": { - "@babel/types": "^7.10.1" - } - }, - "@babel/helper-split-export-declaration": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.10.1.tgz", - "integrity": "sha512-UQ1LVBPrYdbchNhLwj6fetj46BcFwfS4NllJo/1aJsT+1dLTEnXJL0qHqtY7gPzF8S2fXBJamf1biAXV3X077g==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz", + "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==", "dev": true, "requires": { - "@babel/types": "^7.10.1" + "@babel/types": "^7.10.4" } }, "@babel/highlight": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.1.tgz", - "integrity": "sha512-8rMof+gVP8mxYZApLF/JgNDAkdKa+aJt3ZYxF8z6+j/hpeXL7iMsKCPHa2jNMHu/qqBwzQF4OHNoYi8dMA/rYg==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", + "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.10.1", + "@babel/helper-validator-identifier": "^7.10.4", "chalk": "^2.0.0", "js-tokens": "^4.0.0" } }, "@babel/parser": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.10.2.tgz", - "integrity": "sha512-PApSXlNMJyB4JiGVhCOlzKIif+TKFTvu0aQAhnTvfP/z3vVSN6ZypH5bfUNwFXXjRQtUEBNFd2PtmCmG2Py3qQ==", + "version": "7.12.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.3.tgz", + "integrity": "sha512-kFsOS0IbsuhO5ojF8Hc8z/8vEIOkylVBrjiZUbLTE3XFe0Qi+uu6HjzQixkFaqr0ZPAMZcBVxEwmsnsLPZ2Xsw==", "dev": true }, "@babel/template": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.1.tgz", - "integrity": "sha512-OQDg6SqvFSsc9A0ej6SKINWrpJiNonRIniYondK2ViKhB06i3c0s+76XUft71iqBEe9S1OKsHwPAjfHnuvnCig==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.10.1", - "@babel/parser": "^7.10.1", - "@babel/types": "^7.10.1" - } - }, - "@babel/traverse": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.10.1.tgz", - "integrity": "sha512-C/cTuXeKt85K+p08jN6vMDz8vSV0vZcI0wmQ36o6mjbuo++kPMdpOYw23W2XH04dbRt9/nMEfA4W3eR21CD+TQ==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz", + "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==", "dev": true, "requires": { - "@babel/code-frame": "^7.10.1", - "@babel/generator": "^7.10.1", - "@babel/helper-function-name": "^7.10.1", - "@babel/helper-split-export-declaration": "^7.10.1", - "@babel/parser": "^7.10.1", - "@babel/types": "^7.10.1", - "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.13" + "@babel/code-frame": "^7.10.4", + "@babel/parser": "^7.10.4", + "@babel/types": "^7.10.4" } }, "@babel/types": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.2.tgz", - "integrity": "sha512-AD3AwWBSz0AWF0AkCN9VPiWrvldXq+/e3cHa4J89vo4ymjz1XwrBFFVZmkJTsQIPNk+ZVomPSXUJqq8yyjZsng==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz", + "integrity": "sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.10.1", - "lodash": "^4.17.13", + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } }, - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + } + } + }, + "@babel/helper-explode-assignable-expression": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.12.1.tgz", + "integrity": "sha512-dmUwH8XmlrUpVqgtZ737tK88v07l840z9j3OEhCLwKTkjlvKpfqXVIZ0wpK3aeOxspwGrf/5AP5qLx4rO3w5rA==", + "dev": true, + "requires": { + "@babel/types": "^7.12.1" + }, + "dependencies": { + "@babel/types": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz", + "integrity": "sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA==", "dev": true, "requires": { - "ms": "^2.1.1" + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" } }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", "dev": true } } @@ -647,164 +847,259 @@ } }, "@babel/helper-hoist-variables": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.10.1.tgz", - "integrity": "sha512-vLm5srkU8rI6X3+aQ1rQJyfjvCBLXP8cAGeuw04zeAM2ItKb1e7pmVmLyHb4sDaAYnLL13RHOZPLEtcGZ5xvjg==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.10.4.tgz", + "integrity": "sha512-wljroF5PgCk2juF69kanHVs6vrLwIPNp6DLD+Lrl3hoQ3PpPPikaDRNFA+0t81NOoMt2DL6WW/mdU8k4k6ZzuA==", "dev": true, "requires": { - "@babel/types": "^7.10.1" + "@babel/types": "^7.10.4" }, "dependencies": { "@babel/types": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.2.tgz", - "integrity": "sha512-AD3AwWBSz0AWF0AkCN9VPiWrvldXq+/e3cHa4J89vo4ymjz1XwrBFFVZmkJTsQIPNk+ZVomPSXUJqq8yyjZsng==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz", + "integrity": "sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.10.1", - "lodash": "^4.17.13", + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true } } }, "@babel/helper-member-expression-to-functions": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.10.1.tgz", - "integrity": "sha512-u7XLXeM2n50gb6PWJ9hoO5oO7JFPaZtrh35t8RqKLT1jFKj9IWeD1zrcrYp1q1qiZTdEarfDWfTIP8nGsu0h5g==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.1.tgz", + "integrity": "sha512-k0CIe3tXUKTRSoEx1LQEPFU9vRQfqHtl+kf8eNnDqb4AUJEy5pz6aIiog+YWtVm2jpggjS1laH68bPsR+KWWPQ==", "dev": true, "requires": { - "@babel/types": "^7.10.1" + "@babel/types": "^7.12.1" }, "dependencies": { "@babel/types": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.2.tgz", - "integrity": "sha512-AD3AwWBSz0AWF0AkCN9VPiWrvldXq+/e3cHa4J89vo4ymjz1XwrBFFVZmkJTsQIPNk+ZVomPSXUJqq8yyjZsng==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz", + "integrity": "sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.10.1", - "lodash": "^4.17.13", + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true } } }, "@babel/helper-module-imports": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.10.1.tgz", - "integrity": "sha512-SFxgwYmZ3HZPyZwJRiVNLRHWuW2OgE5k2nrVs6D9Iv4PPnXVffuEHy83Sfx/l4SqF+5kyJXjAyUmrG7tNm+qVg==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.12.1.tgz", + "integrity": "sha512-ZeC1TlMSvikvJNy1v/wPIazCu3NdOwgYZLIkmIyAsGhqkNpiDoQQRmaCK8YP4Pq3GPTLPV9WXaPCJKvx06JxKA==", "dev": true, "requires": { - "@babel/types": "^7.10.1" + "@babel/types": "^7.12.1" }, "dependencies": { "@babel/types": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.2.tgz", - "integrity": "sha512-AD3AwWBSz0AWF0AkCN9VPiWrvldXq+/e3cHa4J89vo4ymjz1XwrBFFVZmkJTsQIPNk+ZVomPSXUJqq8yyjZsng==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz", + "integrity": "sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.10.1", - "lodash": "^4.17.13", + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true } } }, "@babel/helper-module-transforms": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.10.1.tgz", - "integrity": "sha512-RLHRCAzyJe7Q7sF4oy2cB+kRnU4wDZY/H2xJFGof+M+SJEGhZsb+GFj5j1AD8NiSaVBJ+Pf0/WObiXu/zxWpFg==", - "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.10.1", - "@babel/helper-replace-supers": "^7.10.1", - "@babel/helper-simple-access": "^7.10.1", - "@babel/helper-split-export-declaration": "^7.10.1", - "@babel/template": "^7.10.1", - "@babel/types": "^7.10.1", - "lodash": "^4.17.13" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.12.1.tgz", + "integrity": "sha512-QQzehgFAZ2bbISiCpmVGfiGux8YVFXQ0abBic2Envhej22DVXV9nCFaS5hIQbkyo1AdGb+gNME2TSh3hYJVV/w==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.12.1", + "@babel/helper-replace-supers": "^7.12.1", + "@babel/helper-simple-access": "^7.12.1", + "@babel/helper-split-export-declaration": "^7.11.0", + "@babel/helper-validator-identifier": "^7.10.4", + "@babel/template": "^7.10.4", + "@babel/traverse": "^7.12.1", + "@babel/types": "^7.12.1", + "lodash": "^4.17.19" }, "dependencies": { "@babel/code-frame": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.1.tgz", - "integrity": "sha512-IGhtTmpjGbYzcEDOw7DcQtbQSXcG9ftmAXtWTu9V936vDye4xjjekktFAtgZsWpzTj/X01jocB46mTywm/4SZw==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", + "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", + "dev": true, + "requires": { + "@babel/highlight": "^7.10.4" + } + }, + "@babel/generator": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.1.tgz", + "integrity": "sha512-DB+6rafIdc9o72Yc3/Ph5h+6hUjeOp66pF0naQBgUFFuPqzQwIlPTm3xZR7YNvduIMtkDIj2t21LSQwnbCrXvg==", + "dev": true, + "requires": { + "@babel/types": "^7.12.1", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + } + }, + "@babel/helper-function-name": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz", + "integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "^7.10.4", + "@babel/template": "^7.10.4", + "@babel/types": "^7.10.4" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz", + "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==", "dev": true, "requires": { - "@babel/highlight": "^7.10.1" + "@babel/types": "^7.10.4" } }, "@babel/helper-split-export-declaration": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.10.1.tgz", - "integrity": "sha512-UQ1LVBPrYdbchNhLwj6fetj46BcFwfS4NllJo/1aJsT+1dLTEnXJL0qHqtY7gPzF8S2fXBJamf1biAXV3X077g==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz", + "integrity": "sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==", "dev": true, "requires": { - "@babel/types": "^7.10.1" + "@babel/types": "^7.11.0" } }, "@babel/highlight": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.1.tgz", - "integrity": "sha512-8rMof+gVP8mxYZApLF/JgNDAkdKa+aJt3ZYxF8z6+j/hpeXL7iMsKCPHa2jNMHu/qqBwzQF4OHNoYi8dMA/rYg==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", + "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.10.1", + "@babel/helper-validator-identifier": "^7.10.4", "chalk": "^2.0.0", "js-tokens": "^4.0.0" } }, "@babel/parser": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.10.2.tgz", - "integrity": "sha512-PApSXlNMJyB4JiGVhCOlzKIif+TKFTvu0aQAhnTvfP/z3vVSN6ZypH5bfUNwFXXjRQtUEBNFd2PtmCmG2Py3qQ==", + "version": "7.12.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.3.tgz", + "integrity": "sha512-kFsOS0IbsuhO5ojF8Hc8z/8vEIOkylVBrjiZUbLTE3XFe0Qi+uu6HjzQixkFaqr0ZPAMZcBVxEwmsnsLPZ2Xsw==", "dev": true }, "@babel/template": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.1.tgz", - "integrity": "sha512-OQDg6SqvFSsc9A0ej6SKINWrpJiNonRIniYondK2ViKhB06i3c0s+76XUft71iqBEe9S1OKsHwPAjfHnuvnCig==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz", + "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.10.4", + "@babel/parser": "^7.10.4", + "@babel/types": "^7.10.4" + } + }, + "@babel/traverse": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.1.tgz", + "integrity": "sha512-MA3WPoRt1ZHo2ZmoGKNqi20YnPt0B1S0GTZEPhhd+hw2KGUzBlHuVunj6K4sNuK+reEvyiPwtp0cpaqLzJDmAw==", "dev": true, "requires": { - "@babel/code-frame": "^7.10.1", - "@babel/parser": "^7.10.1", - "@babel/types": "^7.10.1" + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.12.1", + "@babel/helper-function-name": "^7.10.4", + "@babel/helper-split-export-declaration": "^7.11.0", + "@babel/parser": "^7.12.1", + "@babel/types": "^7.12.1", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.19" } }, "@babel/types": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.2.tgz", - "integrity": "sha512-AD3AwWBSz0AWF0AkCN9VPiWrvldXq+/e3cHa4J89vo4ymjz1XwrBFFVZmkJTsQIPNk+ZVomPSXUJqq8yyjZsng==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz", + "integrity": "sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.10.1", - "lodash": "^4.17.13", + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } + }, + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true } } }, "@babel/helper-optimise-call-expression": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.1.tgz", - "integrity": "sha512-a0DjNS1prnBsoKx83dP2falChcs7p3i8VMzdrSbfLhuQra/2ENC4sbri34dz/rWmDADsmF1q5GbfaXydh0Jbjg==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.4.tgz", + "integrity": "sha512-n3UGKY4VXwXThEiKrgRAoVPBMqeoPgHVqiHZOanAJCG9nQUL2pLRQirUzl0ioKclHGpGqRgIOkgcIJaIWLpygg==", "dev": true, "requires": { - "@babel/types": "^7.10.1" + "@babel/types": "^7.10.4" }, "dependencies": { "@babel/types": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.2.tgz", - "integrity": "sha512-AD3AwWBSz0AWF0AkCN9VPiWrvldXq+/e3cHa4J89vo4ymjz1XwrBFFVZmkJTsQIPNk+ZVomPSXUJqq8yyjZsng==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz", + "integrity": "sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.10.1", - "lodash": "^4.17.13", + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true } } }, @@ -815,277 +1110,184 @@ "dev": true }, "@babel/helper-regex": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.10.1.tgz", - "integrity": "sha512-7isHr19RsIJWWLLFn21ubFt223PjQyg1HY7CZEMRr820HttHPpVvrsIN3bUOo44DEfFV4kBXO7Abbn9KTUZV7g==", + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.10.5.tgz", + "integrity": "sha512-68kdUAzDrljqBrio7DYAEgCoJHxppJOERHOgOrDN7WjOzP0ZQ1LsSDRXcemzVZaLvjaJsJEESb6qt+znNuENDg==", "dev": true, "requires": { - "lodash": "^4.17.13" + "lodash": "^4.17.19" + }, + "dependencies": { + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + } } }, "@babel/helper-remap-async-to-generator": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.10.1.tgz", - "integrity": "sha512-RfX1P8HqsfgmJ6CwaXGKMAqbYdlleqglvVtht0HGPMSsy2V6MqLlOJVF/0Qyb/m2ZCi2z3q3+s6Pv7R/dQuZ6A==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.12.1.tgz", + "integrity": "sha512-9d0KQCRM8clMPcDwo8SevNs+/9a8yWVVmaE80FGJcEP8N1qToREmWEGnBn8BUlJhYRFz6fqxeRL1sl5Ogsed7A==", "dev": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.10.1", - "@babel/helper-wrap-function": "^7.10.1", - "@babel/template": "^7.10.1", - "@babel/traverse": "^7.10.1", - "@babel/types": "^7.10.1" + "@babel/helper-annotate-as-pure": "^7.10.4", + "@babel/helper-wrap-function": "^7.10.4", + "@babel/types": "^7.12.1" }, "dependencies": { - "@babel/code-frame": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.1.tgz", - "integrity": "sha512-IGhtTmpjGbYzcEDOw7DcQtbQSXcG9ftmAXtWTu9V936vDye4xjjekktFAtgZsWpzTj/X01jocB46mTywm/4SZw==", - "dev": true, - "requires": { - "@babel/highlight": "^7.10.1" - } - }, - "@babel/generator": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.10.2.tgz", - "integrity": "sha512-AxfBNHNu99DTMvlUPlt1h2+Hn7knPpH5ayJ8OqDWSeLld+Fi2AYBTC/IejWDM9Edcii4UzZRCsbUt0WlSDsDsA==", - "dev": true, - "requires": { - "@babel/types": "^7.10.2", - "jsesc": "^2.5.1", - "lodash": "^4.17.13", - "source-map": "^0.5.0" - } - }, - "@babel/helper-function-name": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.1.tgz", - "integrity": "sha512-fcpumwhs3YyZ/ttd5Rz0xn0TpIwVkN7X0V38B9TWNfVF42KEkhkAAuPCQ3oXmtTRtiPJrmZ0TrfS0GKF0eMaRQ==", - "dev": true, - "requires": { - "@babel/helper-get-function-arity": "^7.10.1", - "@babel/template": "^7.10.1", - "@babel/types": "^7.10.1" - } - }, - "@babel/helper-get-function-arity": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.1.tgz", - "integrity": "sha512-F5qdXkYGOQUb0hpRaPoetF9AnsXknKjWMZ+wmsIRsp5ge5sFh4c3h1eH2pRTTuy9KKAA2+TTYomGXAtEL2fQEw==", - "dev": true, - "requires": { - "@babel/types": "^7.10.1" - } - }, - "@babel/helper-split-export-declaration": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.10.1.tgz", - "integrity": "sha512-UQ1LVBPrYdbchNhLwj6fetj46BcFwfS4NllJo/1aJsT+1dLTEnXJL0qHqtY7gPzF8S2fXBJamf1biAXV3X077g==", - "dev": true, - "requires": { - "@babel/types": "^7.10.1" - } - }, - "@babel/highlight": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.1.tgz", - "integrity": "sha512-8rMof+gVP8mxYZApLF/JgNDAkdKa+aJt3ZYxF8z6+j/hpeXL7iMsKCPHa2jNMHu/qqBwzQF4OHNoYi8dMA/rYg==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.10.1", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, - "@babel/parser": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.10.2.tgz", - "integrity": "sha512-PApSXlNMJyB4JiGVhCOlzKIif+TKFTvu0aQAhnTvfP/z3vVSN6ZypH5bfUNwFXXjRQtUEBNFd2PtmCmG2Py3qQ==", - "dev": true - }, - "@babel/template": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.1.tgz", - "integrity": "sha512-OQDg6SqvFSsc9A0ej6SKINWrpJiNonRIniYondK2ViKhB06i3c0s+76XUft71iqBEe9S1OKsHwPAjfHnuvnCig==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.10.1", - "@babel/parser": "^7.10.1", - "@babel/types": "^7.10.1" - } - }, - "@babel/traverse": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.10.1.tgz", - "integrity": "sha512-C/cTuXeKt85K+p08jN6vMDz8vSV0vZcI0wmQ36o6mjbuo++kPMdpOYw23W2XH04dbRt9/nMEfA4W3eR21CD+TQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.10.1", - "@babel/generator": "^7.10.1", - "@babel/helper-function-name": "^7.10.1", - "@babel/helper-split-export-declaration": "^7.10.1", - "@babel/parser": "^7.10.1", - "@babel/types": "^7.10.1", - "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.13" - } - }, "@babel/types": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.2.tgz", - "integrity": "sha512-AD3AwWBSz0AWF0AkCN9VPiWrvldXq+/e3cHa4J89vo4ymjz1XwrBFFVZmkJTsQIPNk+ZVomPSXUJqq8yyjZsng==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz", + "integrity": "sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.10.1", - "lodash": "^4.17.13", + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } }, - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", "dev": true } } }, "@babel/helper-replace-supers": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.10.1.tgz", - "integrity": "sha512-SOwJzEfpuQwInzzQJGjGaiG578UYmyi2Xw668klPWV5n07B73S0a9btjLk/52Mlcxa+5AdIYqws1KyXRfMoB7A==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.12.1.tgz", + "integrity": "sha512-zJjTvtNJnCFsCXVi5rUInstLd/EIVNmIKA1Q9ynESmMBWPWd+7sdR+G4/wdu+Mppfep0XLyG2m7EBPvjCeFyrw==", "dev": true, "requires": { - "@babel/helper-member-expression-to-functions": "^7.10.1", - "@babel/helper-optimise-call-expression": "^7.10.1", - "@babel/traverse": "^7.10.1", - "@babel/types": "^7.10.1" + "@babel/helper-member-expression-to-functions": "^7.12.1", + "@babel/helper-optimise-call-expression": "^7.10.4", + "@babel/traverse": "^7.12.1", + "@babel/types": "^7.12.1" }, "dependencies": { "@babel/code-frame": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.1.tgz", - "integrity": "sha512-IGhtTmpjGbYzcEDOw7DcQtbQSXcG9ftmAXtWTu9V936vDye4xjjekktFAtgZsWpzTj/X01jocB46mTywm/4SZw==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", + "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", "dev": true, "requires": { - "@babel/highlight": "^7.10.1" + "@babel/highlight": "^7.10.4" } }, "@babel/generator": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.10.2.tgz", - "integrity": "sha512-AxfBNHNu99DTMvlUPlt1h2+Hn7knPpH5ayJ8OqDWSeLld+Fi2AYBTC/IejWDM9Edcii4UzZRCsbUt0WlSDsDsA==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.1.tgz", + "integrity": "sha512-DB+6rafIdc9o72Yc3/Ph5h+6hUjeOp66pF0naQBgUFFuPqzQwIlPTm3xZR7YNvduIMtkDIj2t21LSQwnbCrXvg==", "dev": true, "requires": { - "@babel/types": "^7.10.2", + "@babel/types": "^7.12.1", "jsesc": "^2.5.1", - "lodash": "^4.17.13", "source-map": "^0.5.0" } }, "@babel/helper-function-name": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.1.tgz", - "integrity": "sha512-fcpumwhs3YyZ/ttd5Rz0xn0TpIwVkN7X0V38B9TWNfVF42KEkhkAAuPCQ3oXmtTRtiPJrmZ0TrfS0GKF0eMaRQ==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz", + "integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==", "dev": true, "requires": { - "@babel/helper-get-function-arity": "^7.10.1", - "@babel/template": "^7.10.1", - "@babel/types": "^7.10.1" + "@babel/helper-get-function-arity": "^7.10.4", + "@babel/template": "^7.10.4", + "@babel/types": "^7.10.4" } }, "@babel/helper-get-function-arity": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.1.tgz", - "integrity": "sha512-F5qdXkYGOQUb0hpRaPoetF9AnsXknKjWMZ+wmsIRsp5ge5sFh4c3h1eH2pRTTuy9KKAA2+TTYomGXAtEL2fQEw==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz", + "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==", "dev": true, "requires": { - "@babel/types": "^7.10.1" + "@babel/types": "^7.10.4" } }, "@babel/helper-split-export-declaration": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.10.1.tgz", - "integrity": "sha512-UQ1LVBPrYdbchNhLwj6fetj46BcFwfS4NllJo/1aJsT+1dLTEnXJL0qHqtY7gPzF8S2fXBJamf1biAXV3X077g==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz", + "integrity": "sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==", "dev": true, "requires": { - "@babel/types": "^7.10.1" + "@babel/types": "^7.11.0" } }, "@babel/highlight": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.1.tgz", - "integrity": "sha512-8rMof+gVP8mxYZApLF/JgNDAkdKa+aJt3ZYxF8z6+j/hpeXL7iMsKCPHa2jNMHu/qqBwzQF4OHNoYi8dMA/rYg==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", + "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.10.1", + "@babel/helper-validator-identifier": "^7.10.4", "chalk": "^2.0.0", "js-tokens": "^4.0.0" } }, "@babel/parser": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.10.2.tgz", - "integrity": "sha512-PApSXlNMJyB4JiGVhCOlzKIif+TKFTvu0aQAhnTvfP/z3vVSN6ZypH5bfUNwFXXjRQtUEBNFd2PtmCmG2Py3qQ==", + "version": "7.12.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.3.tgz", + "integrity": "sha512-kFsOS0IbsuhO5ojF8Hc8z/8vEIOkylVBrjiZUbLTE3XFe0Qi+uu6HjzQixkFaqr0ZPAMZcBVxEwmsnsLPZ2Xsw==", "dev": true }, "@babel/template": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.1.tgz", - "integrity": "sha512-OQDg6SqvFSsc9A0ej6SKINWrpJiNonRIniYondK2ViKhB06i3c0s+76XUft71iqBEe9S1OKsHwPAjfHnuvnCig==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz", + "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==", "dev": true, "requires": { - "@babel/code-frame": "^7.10.1", - "@babel/parser": "^7.10.1", - "@babel/types": "^7.10.1" + "@babel/code-frame": "^7.10.4", + "@babel/parser": "^7.10.4", + "@babel/types": "^7.10.4" } }, "@babel/traverse": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.10.1.tgz", - "integrity": "sha512-C/cTuXeKt85K+p08jN6vMDz8vSV0vZcI0wmQ36o6mjbuo++kPMdpOYw23W2XH04dbRt9/nMEfA4W3eR21CD+TQ==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.1.tgz", + "integrity": "sha512-MA3WPoRt1ZHo2ZmoGKNqi20YnPt0B1S0GTZEPhhd+hw2KGUzBlHuVunj6K4sNuK+reEvyiPwtp0cpaqLzJDmAw==", "dev": true, "requires": { - "@babel/code-frame": "^7.10.1", - "@babel/generator": "^7.10.1", - "@babel/helper-function-name": "^7.10.1", - "@babel/helper-split-export-declaration": "^7.10.1", - "@babel/parser": "^7.10.1", - "@babel/types": "^7.10.1", + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.12.1", + "@babel/helper-function-name": "^7.10.4", + "@babel/helper-split-export-declaration": "^7.11.0", + "@babel/parser": "^7.12.1", + "@babel/types": "^7.12.1", "debug": "^4.1.0", "globals": "^11.1.0", - "lodash": "^4.17.13" + "lodash": "^4.17.19" } }, "@babel/types": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.2.tgz", - "integrity": "sha512-AD3AwWBSz0AWF0AkCN9VPiWrvldXq+/e3cHa4J89vo4ymjz1XwrBFFVZmkJTsQIPNk+ZVomPSXUJqq8yyjZsng==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz", + "integrity": "sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.10.1", - "lodash": "^4.17.13", + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } }, "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" } }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -1095,62 +1297,58 @@ } }, "@babel/helper-simple-access": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.10.1.tgz", - "integrity": "sha512-VSWpWzRzn9VtgMJBIWTZ+GP107kZdQ4YplJlCmIrjoLVSi/0upixezHCDG8kpPVTBJpKfxTH01wDhh+jS2zKbw==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.12.1.tgz", + "integrity": "sha512-OxBp7pMrjVewSSC8fXDFrHrBcJATOOFssZwv16F3/6Xtc138GHybBfPbm9kfiqQHKhYQrlamWILwlDCeyMFEaA==", "dev": true, "requires": { - "@babel/template": "^7.10.1", - "@babel/types": "^7.10.1" + "@babel/types": "^7.12.1" }, "dependencies": { - "@babel/code-frame": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.1.tgz", - "integrity": "sha512-IGhtTmpjGbYzcEDOw7DcQtbQSXcG9ftmAXtWTu9V936vDye4xjjekktFAtgZsWpzTj/X01jocB46mTywm/4SZw==", - "dev": true, - "requires": { - "@babel/highlight": "^7.10.1" - } - }, - "@babel/highlight": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.1.tgz", - "integrity": "sha512-8rMof+gVP8mxYZApLF/JgNDAkdKa+aJt3ZYxF8z6+j/hpeXL7iMsKCPHa2jNMHu/qqBwzQF4OHNoYi8dMA/rYg==", + "@babel/types": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz", + "integrity": "sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.10.1", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" } }, - "@babel/parser": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.10.2.tgz", - "integrity": "sha512-PApSXlNMJyB4JiGVhCOlzKIif+TKFTvu0aQAhnTvfP/z3vVSN6ZypH5bfUNwFXXjRQtUEBNFd2PtmCmG2Py3qQ==", + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", "dev": true - }, - "@babel/template": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.1.tgz", - "integrity": "sha512-OQDg6SqvFSsc9A0ej6SKINWrpJiNonRIniYondK2ViKhB06i3c0s+76XUft71iqBEe9S1OKsHwPAjfHnuvnCig==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.10.1", - "@babel/parser": "^7.10.1", - "@babel/types": "^7.10.1" - } - }, + } + } + }, + "@babel/helper-skip-transparent-expression-wrappers": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.12.1.tgz", + "integrity": "sha512-Mf5AUuhG1/OCChOJ/HcADmvcHM42WJockombn8ATJG3OnyiSxBK/Mm5x78BQWvmtXZKHgbjdGL2kin/HOLlZGA==", + "dev": true, + "requires": { + "@babel/types": "^7.12.1" + }, + "dependencies": { "@babel/types": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.2.tgz", - "integrity": "sha512-AD3AwWBSz0AWF0AkCN9VPiWrvldXq+/e3cHa4J89vo4ymjz1XwrBFFVZmkJTsQIPNk+ZVomPSXUJqq8yyjZsng==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz", + "integrity": "sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.10.1", - "lodash": "^4.17.13", + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true } } }, @@ -1164,138 +1362,149 @@ } }, "@babel/helper-validator-identifier": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.1.tgz", - "integrity": "sha512-5vW/JXLALhczRCWP0PnFDMCJAchlBvM7f4uk/jXritBnIa6E1KmqmtrS3yn1LAnxFBypQ3eneLuXjsnfQsgILw==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz", + "integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==", + "dev": true + }, + "@babel/helper-validator-option": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.12.1.tgz", + "integrity": "sha512-YpJabsXlJVWP0USHjnC/AQDTLlZERbON577YUVO/wLpqyj6HAtVYnWaQaN0iUN+1/tWn3c+uKKXjRut5115Y2A==", "dev": true }, "@babel/helper-wrap-function": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.10.1.tgz", - "integrity": "sha512-C0MzRGteVDn+H32/ZgbAv5r56f2o1fZSA/rj/TYo8JEJNHg+9BdSmKBUND0shxWRztWhjlT2cvHYuynpPsVJwQ==", + "version": "7.12.3", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.12.3.tgz", + "integrity": "sha512-Cvb8IuJDln3rs6tzjW3Y8UeelAOdnpB8xtQ4sme2MSZ9wOxrbThporC0y/EtE16VAtoyEfLM404Xr1e0OOp+ow==", "dev": true, "requires": { - "@babel/helper-function-name": "^7.10.1", - "@babel/template": "^7.10.1", - "@babel/traverse": "^7.10.1", - "@babel/types": "^7.10.1" + "@babel/helper-function-name": "^7.10.4", + "@babel/template": "^7.10.4", + "@babel/traverse": "^7.10.4", + "@babel/types": "^7.10.4" }, "dependencies": { "@babel/code-frame": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.1.tgz", - "integrity": "sha512-IGhtTmpjGbYzcEDOw7DcQtbQSXcG9ftmAXtWTu9V936vDye4xjjekktFAtgZsWpzTj/X01jocB46mTywm/4SZw==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", + "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", "dev": true, "requires": { - "@babel/highlight": "^7.10.1" + "@babel/highlight": "^7.10.4" } }, "@babel/generator": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.10.2.tgz", - "integrity": "sha512-AxfBNHNu99DTMvlUPlt1h2+Hn7knPpH5ayJ8OqDWSeLld+Fi2AYBTC/IejWDM9Edcii4UzZRCsbUt0WlSDsDsA==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.1.tgz", + "integrity": "sha512-DB+6rafIdc9o72Yc3/Ph5h+6hUjeOp66pF0naQBgUFFuPqzQwIlPTm3xZR7YNvduIMtkDIj2t21LSQwnbCrXvg==", "dev": true, "requires": { - "@babel/types": "^7.10.2", + "@babel/types": "^7.12.1", "jsesc": "^2.5.1", - "lodash": "^4.17.13", "source-map": "^0.5.0" } }, "@babel/helper-function-name": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.1.tgz", - "integrity": "sha512-fcpumwhs3YyZ/ttd5Rz0xn0TpIwVkN7X0V38B9TWNfVF42KEkhkAAuPCQ3oXmtTRtiPJrmZ0TrfS0GKF0eMaRQ==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz", + "integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==", "dev": true, "requires": { - "@babel/helper-get-function-arity": "^7.10.1", - "@babel/template": "^7.10.1", - "@babel/types": "^7.10.1" + "@babel/helper-get-function-arity": "^7.10.4", + "@babel/template": "^7.10.4", + "@babel/types": "^7.10.4" } }, "@babel/helper-get-function-arity": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.1.tgz", - "integrity": "sha512-F5qdXkYGOQUb0hpRaPoetF9AnsXknKjWMZ+wmsIRsp5ge5sFh4c3h1eH2pRTTuy9KKAA2+TTYomGXAtEL2fQEw==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz", + "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==", "dev": true, "requires": { - "@babel/types": "^7.10.1" + "@babel/types": "^7.10.4" } }, "@babel/helper-split-export-declaration": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.10.1.tgz", - "integrity": "sha512-UQ1LVBPrYdbchNhLwj6fetj46BcFwfS4NllJo/1aJsT+1dLTEnXJL0qHqtY7gPzF8S2fXBJamf1biAXV3X077g==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz", + "integrity": "sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==", "dev": true, "requires": { - "@babel/types": "^7.10.1" + "@babel/types": "^7.11.0" } }, "@babel/highlight": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.1.tgz", - "integrity": "sha512-8rMof+gVP8mxYZApLF/JgNDAkdKa+aJt3ZYxF8z6+j/hpeXL7iMsKCPHa2jNMHu/qqBwzQF4OHNoYi8dMA/rYg==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", + "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.10.1", + "@babel/helper-validator-identifier": "^7.10.4", "chalk": "^2.0.0", "js-tokens": "^4.0.0" } }, "@babel/parser": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.10.2.tgz", - "integrity": "sha512-PApSXlNMJyB4JiGVhCOlzKIif+TKFTvu0aQAhnTvfP/z3vVSN6ZypH5bfUNwFXXjRQtUEBNFd2PtmCmG2Py3qQ==", + "version": "7.12.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.3.tgz", + "integrity": "sha512-kFsOS0IbsuhO5ojF8Hc8z/8vEIOkylVBrjiZUbLTE3XFe0Qi+uu6HjzQixkFaqr0ZPAMZcBVxEwmsnsLPZ2Xsw==", "dev": true }, "@babel/template": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.1.tgz", - "integrity": "sha512-OQDg6SqvFSsc9A0ej6SKINWrpJiNonRIniYondK2ViKhB06i3c0s+76XUft71iqBEe9S1OKsHwPAjfHnuvnCig==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz", + "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==", "dev": true, "requires": { - "@babel/code-frame": "^7.10.1", - "@babel/parser": "^7.10.1", - "@babel/types": "^7.10.1" + "@babel/code-frame": "^7.10.4", + "@babel/parser": "^7.10.4", + "@babel/types": "^7.10.4" } }, "@babel/traverse": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.10.1.tgz", - "integrity": "sha512-C/cTuXeKt85K+p08jN6vMDz8vSV0vZcI0wmQ36o6mjbuo++kPMdpOYw23W2XH04dbRt9/nMEfA4W3eR21CD+TQ==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.1.tgz", + "integrity": "sha512-MA3WPoRt1ZHo2ZmoGKNqi20YnPt0B1S0GTZEPhhd+hw2KGUzBlHuVunj6K4sNuK+reEvyiPwtp0cpaqLzJDmAw==", "dev": true, "requires": { - "@babel/code-frame": "^7.10.1", - "@babel/generator": "^7.10.1", - "@babel/helper-function-name": "^7.10.1", - "@babel/helper-split-export-declaration": "^7.10.1", - "@babel/parser": "^7.10.1", - "@babel/types": "^7.10.1", + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.12.1", + "@babel/helper-function-name": "^7.10.4", + "@babel/helper-split-export-declaration": "^7.11.0", + "@babel/parser": "^7.12.1", + "@babel/types": "^7.12.1", "debug": "^4.1.0", "globals": "^11.1.0", - "lodash": "^4.17.13" + "lodash": "^4.17.19" } }, "@babel/types": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.2.tgz", - "integrity": "sha512-AD3AwWBSz0AWF0AkCN9VPiWrvldXq+/e3cHa4J89vo4ymjz1XwrBFFVZmkJTsQIPNk+ZVomPSXUJqq8yyjZsng==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz", + "integrity": "sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.10.1", - "lodash": "^4.17.13", + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } }, "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" } }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -1305,131 +1514,136 @@ } }, "@babel/helpers": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.10.1.tgz", - "integrity": "sha512-muQNHF+IdU6wGgkaJyhhEmI54MOZBKsFfsXFhboz1ybwJ1Kl7IHlbm2a++4jwrmY5UYsgitt5lfqo1wMFcHmyw==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.12.1.tgz", + "integrity": "sha512-9JoDSBGoWtmbay98efmT2+mySkwjzeFeAL9BuWNoVQpkPFQF8SIIFUfY5os9u8wVzglzoiPRSW7cuJmBDUt43g==", "dev": true, "requires": { - "@babel/template": "^7.10.1", - "@babel/traverse": "^7.10.1", - "@babel/types": "^7.10.1" + "@babel/template": "^7.10.4", + "@babel/traverse": "^7.12.1", + "@babel/types": "^7.12.1" }, "dependencies": { "@babel/code-frame": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.1.tgz", - "integrity": "sha512-IGhtTmpjGbYzcEDOw7DcQtbQSXcG9ftmAXtWTu9V936vDye4xjjekktFAtgZsWpzTj/X01jocB46mTywm/4SZw==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", + "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", "dev": true, "requires": { - "@babel/highlight": "^7.10.1" + "@babel/highlight": "^7.10.4" } }, "@babel/generator": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.10.2.tgz", - "integrity": "sha512-AxfBNHNu99DTMvlUPlt1h2+Hn7knPpH5ayJ8OqDWSeLld+Fi2AYBTC/IejWDM9Edcii4UzZRCsbUt0WlSDsDsA==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.1.tgz", + "integrity": "sha512-DB+6rafIdc9o72Yc3/Ph5h+6hUjeOp66pF0naQBgUFFuPqzQwIlPTm3xZR7YNvduIMtkDIj2t21LSQwnbCrXvg==", "dev": true, "requires": { - "@babel/types": "^7.10.2", + "@babel/types": "^7.12.1", "jsesc": "^2.5.1", - "lodash": "^4.17.13", "source-map": "^0.5.0" } }, "@babel/helper-function-name": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.1.tgz", - "integrity": "sha512-fcpumwhs3YyZ/ttd5Rz0xn0TpIwVkN7X0V38B9TWNfVF42KEkhkAAuPCQ3oXmtTRtiPJrmZ0TrfS0GKF0eMaRQ==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz", + "integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==", "dev": true, "requires": { - "@babel/helper-get-function-arity": "^7.10.1", - "@babel/template": "^7.10.1", - "@babel/types": "^7.10.1" + "@babel/helper-get-function-arity": "^7.10.4", + "@babel/template": "^7.10.4", + "@babel/types": "^7.10.4" } }, "@babel/helper-get-function-arity": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.1.tgz", - "integrity": "sha512-F5qdXkYGOQUb0hpRaPoetF9AnsXknKjWMZ+wmsIRsp5ge5sFh4c3h1eH2pRTTuy9KKAA2+TTYomGXAtEL2fQEw==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz", + "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==", "dev": true, "requires": { - "@babel/types": "^7.10.1" + "@babel/types": "^7.10.4" } }, "@babel/helper-split-export-declaration": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.10.1.tgz", - "integrity": "sha512-UQ1LVBPrYdbchNhLwj6fetj46BcFwfS4NllJo/1aJsT+1dLTEnXJL0qHqtY7gPzF8S2fXBJamf1biAXV3X077g==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz", + "integrity": "sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==", "dev": true, "requires": { - "@babel/types": "^7.10.1" + "@babel/types": "^7.11.0" } }, "@babel/highlight": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.1.tgz", - "integrity": "sha512-8rMof+gVP8mxYZApLF/JgNDAkdKa+aJt3ZYxF8z6+j/hpeXL7iMsKCPHa2jNMHu/qqBwzQF4OHNoYi8dMA/rYg==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", + "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.10.1", + "@babel/helper-validator-identifier": "^7.10.4", "chalk": "^2.0.0", "js-tokens": "^4.0.0" } }, "@babel/parser": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.10.2.tgz", - "integrity": "sha512-PApSXlNMJyB4JiGVhCOlzKIif+TKFTvu0aQAhnTvfP/z3vVSN6ZypH5bfUNwFXXjRQtUEBNFd2PtmCmG2Py3qQ==", + "version": "7.12.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.3.tgz", + "integrity": "sha512-kFsOS0IbsuhO5ojF8Hc8z/8vEIOkylVBrjiZUbLTE3XFe0Qi+uu6HjzQixkFaqr0ZPAMZcBVxEwmsnsLPZ2Xsw==", "dev": true }, "@babel/template": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.1.tgz", - "integrity": "sha512-OQDg6SqvFSsc9A0ej6SKINWrpJiNonRIniYondK2ViKhB06i3c0s+76XUft71iqBEe9S1OKsHwPAjfHnuvnCig==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz", + "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==", "dev": true, "requires": { - "@babel/code-frame": "^7.10.1", - "@babel/parser": "^7.10.1", - "@babel/types": "^7.10.1" + "@babel/code-frame": "^7.10.4", + "@babel/parser": "^7.10.4", + "@babel/types": "^7.10.4" } }, "@babel/traverse": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.10.1.tgz", - "integrity": "sha512-C/cTuXeKt85K+p08jN6vMDz8vSV0vZcI0wmQ36o6mjbuo++kPMdpOYw23W2XH04dbRt9/nMEfA4W3eR21CD+TQ==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.1.tgz", + "integrity": "sha512-MA3WPoRt1ZHo2ZmoGKNqi20YnPt0B1S0GTZEPhhd+hw2KGUzBlHuVunj6K4sNuK+reEvyiPwtp0cpaqLzJDmAw==", "dev": true, "requires": { - "@babel/code-frame": "^7.10.1", - "@babel/generator": "^7.10.1", - "@babel/helper-function-name": "^7.10.1", - "@babel/helper-split-export-declaration": "^7.10.1", - "@babel/parser": "^7.10.1", - "@babel/types": "^7.10.1", + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.12.1", + "@babel/helper-function-name": "^7.10.4", + "@babel/helper-split-export-declaration": "^7.11.0", + "@babel/parser": "^7.12.1", + "@babel/types": "^7.12.1", "debug": "^4.1.0", "globals": "^11.1.0", - "lodash": "^4.17.13" + "lodash": "^4.17.19" } }, "@babel/types": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.2.tgz", - "integrity": "sha512-AD3AwWBSz0AWF0AkCN9VPiWrvldXq+/e3cHa4J89vo4ymjz1XwrBFFVZmkJTsQIPNk+ZVomPSXUJqq8yyjZsng==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz", + "integrity": "sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.10.1", - "lodash": "^4.17.13", + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } }, "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" } }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -1456,201 +1670,238 @@ "dev": true }, "@babel/plugin-proposal-async-generator-functions": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.10.1.tgz", - "integrity": "sha512-vzZE12ZTdB336POZjmpblWfNNRpMSua45EYnRigE2XsZxcXcIyly2ixnTJasJE4Zq3U7t2d8rRF7XRUuzHxbOw==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.12.1.tgz", + "integrity": "sha512-d+/o30tJxFxrA1lhzJqiUcEJdI6jKlNregCv5bASeGf2Q4MXmnwH7viDo7nhx1/ohf09oaH8j1GVYG/e3Yqk6A==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1", - "@babel/helper-remap-async-to-generator": "^7.10.1", + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-remap-async-to-generator": "^7.12.1", "@babel/plugin-syntax-async-generators": "^7.8.0" }, "dependencies": { "@babel/helper-plugin-utils": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz", - "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true } } }, "@babel/plugin-proposal-class-properties": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.10.1.tgz", - "integrity": "sha512-sqdGWgoXlnOdgMXU+9MbhzwFRgxVLeiGBqTrnuS7LC2IBU31wSsESbTUreT2O418obpfPdGUR2GbEufZF1bpqw==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.12.1.tgz", + "integrity": "sha512-cKp3dlQsFsEs5CWKnN7BnSHOd0EOW8EKpEjkoz1pO2E5KzIDNV9Ros1b0CnmbVgAGXJubOYVBOGCT1OmJwOI7w==", "dev": true, "requires": { - "@babel/helper-create-class-features-plugin": "^7.10.1", - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-create-class-features-plugin": "^7.12.1", + "@babel/helper-plugin-utils": "^7.10.4" }, "dependencies": { "@babel/helper-plugin-utils": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz", - "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true } } }, "@babel/plugin-proposal-dynamic-import": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.10.1.tgz", - "integrity": "sha512-Cpc2yUVHTEGPlmiQzXj026kqwjEQAD9I4ZC16uzdbgWgitg/UHKHLffKNCQZ5+y8jpIZPJcKcwsr2HwPh+w3XA==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.12.1.tgz", + "integrity": "sha512-a4rhUSZFuq5W8/OO8H7BL5zspjnc1FLd9hlOxIK/f7qG4a0qsqk8uvF/ywgBA8/OmjsapjpvaEOYItfGG1qIvQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1", + "@babel/helper-plugin-utils": "^7.10.4", "@babel/plugin-syntax-dynamic-import": "^7.8.0" }, "dependencies": { "@babel/helper-plugin-utils": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz", - "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", + "dev": true + } + } + }, + "@babel/plugin-proposal-export-namespace-from": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.12.1.tgz", + "integrity": "sha512-6CThGf0irEkzujYS5LQcjBx8j/4aQGiVv7J9+2f7pGfxqyKh3WnmVJYW3hdrQjyksErMGBPQrCnHfOtna+WLbw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true } } }, "@babel/plugin-proposal-json-strings": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.10.1.tgz", - "integrity": "sha512-m8r5BmV+ZLpWPtMY2mOKN7wre6HIO4gfIiV+eOmsnZABNenrt/kzYBwrh+KOfgumSWpnlGs5F70J8afYMSJMBg==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.12.1.tgz", + "integrity": "sha512-GoLDUi6U9ZLzlSda2Df++VSqDJg3CG+dR0+iWsv6XRw1rEq+zwt4DirM9yrxW6XWaTpmai1cWJLMfM8qQJf+yw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1", + "@babel/helper-plugin-utils": "^7.10.4", "@babel/plugin-syntax-json-strings": "^7.8.0" }, "dependencies": { "@babel/helper-plugin-utils": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz", - "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", + "dev": true + } + } + }, + "@babel/plugin-proposal-logical-assignment-operators": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.12.1.tgz", + "integrity": "sha512-k8ZmVv0JU+4gcUGeCDZOGd0lCIamU/sMtIiX3UWnUc5yzgq6YUGyEolNYD+MLYKfSzgECPcqetVcJP9Afe/aCA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true } } }, "@babel/plugin-proposal-nullish-coalescing-operator": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.10.1.tgz", - "integrity": "sha512-56cI/uHYgL2C8HVuHOuvVowihhX0sxb3nnfVRzUeVHTWmRHTZrKuAh/OBIMggGU/S1g/1D2CRCXqP+3u7vX7iA==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.12.1.tgz", + "integrity": "sha512-nZY0ESiaQDI1y96+jk6VxMOaL4LPo/QDHBqL+SF3/vl6dHkTwHlOI8L4ZwuRBHgakRBw5zsVylel7QPbbGuYgg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1", + "@babel/helper-plugin-utils": "^7.10.4", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0" }, "dependencies": { "@babel/helper-plugin-utils": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz", - "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true } } }, "@babel/plugin-proposal-numeric-separator": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.10.1.tgz", - "integrity": "sha512-jjfym4N9HtCiNfyyLAVD8WqPYeHUrw4ihxuAynWj6zzp2gf9Ey2f7ImhFm6ikB3CLf5Z/zmcJDri6B4+9j9RsA==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.12.1.tgz", + "integrity": "sha512-MR7Ok+Af3OhNTCxYVjJZHS0t97ydnJZt/DbR4WISO39iDnhiD8XHrY12xuSJ90FFEGjir0Fzyyn7g/zY6hxbxA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1", - "@babel/plugin-syntax-numeric-separator": "^7.10.1" + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-syntax-numeric-separator": "^7.10.4" }, "dependencies": { "@babel/helper-plugin-utils": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz", - "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true } } }, "@babel/plugin-proposal-object-rest-spread": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.10.1.tgz", - "integrity": "sha512-Z+Qri55KiQkHh7Fc4BW6o+QBuTagbOp9txE+4U1i79u9oWlf2npkiDx+Rf3iK3lbcHBuNy9UOkwuR5wOMH3LIQ==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.12.1.tgz", + "integrity": "sha512-s6SowJIjzlhx8o7lsFx5zmY4At6CTtDvgNQDdPzkBQucle58A6b/TTeEBYtyDgmcXjUTM+vE8YOGHZzzbc/ioA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1", + "@babel/helper-plugin-utils": "^7.10.4", "@babel/plugin-syntax-object-rest-spread": "^7.8.0", - "@babel/plugin-transform-parameters": "^7.10.1" + "@babel/plugin-transform-parameters": "^7.12.1" }, "dependencies": { "@babel/helper-plugin-utils": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz", - "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true } } }, "@babel/plugin-proposal-optional-catch-binding": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.10.1.tgz", - "integrity": "sha512-VqExgeE62YBqI3ogkGoOJp1R6u12DFZjqwJhqtKc2o5m1YTUuUWnos7bZQFBhwkxIFpWYJ7uB75U7VAPPiKETA==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.12.1.tgz", + "integrity": "sha512-hFvIjgprh9mMw5v42sJWLI1lzU5L2sznP805zeT6rySVRA0Y18StRhDqhSxlap0oVgItRsB6WSROp4YnJTJz0g==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1", + "@babel/helper-plugin-utils": "^7.10.4", "@babel/plugin-syntax-optional-catch-binding": "^7.8.0" }, "dependencies": { "@babel/helper-plugin-utils": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz", - "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true } } }, "@babel/plugin-proposal-optional-chaining": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.10.1.tgz", - "integrity": "sha512-dqQj475q8+/avvok72CF3AOSV/SGEcH29zT5hhohqqvvZ2+boQoOr7iGldBG5YXTO2qgCgc2B3WvVLUdbeMlGA==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.12.1.tgz", + "integrity": "sha512-c2uRpY6WzaVDzynVY9liyykS+kVU+WRZPMPYpkelXH8KBt1oXoI89kPbZKKG/jDT5UK92FTW2fZkZaJhdiBabw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1", + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-skip-transparent-expression-wrappers": "^7.12.1", "@babel/plugin-syntax-optional-chaining": "^7.8.0" }, "dependencies": { "@babel/helper-plugin-utils": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz", - "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true } } }, "@babel/plugin-proposal-private-methods": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.10.1.tgz", - "integrity": "sha512-RZecFFJjDiQ2z6maFprLgrdnm0OzoC23Mx89xf1CcEsxmHuzuXOdniEuI+S3v7vjQG4F5sa6YtUp+19sZuSxHg==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.12.1.tgz", + "integrity": "sha512-mwZ1phvH7/NHK6Kf8LP7MYDogGV+DKB1mryFOEwx5EBNQrosvIczzZFTUmWaeujd5xT6G1ELYWUz3CutMhjE1w==", "dev": true, "requires": { - "@babel/helper-create-class-features-plugin": "^7.10.1", - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-create-class-features-plugin": "^7.12.1", + "@babel/helper-plugin-utils": "^7.10.4" }, "dependencies": { "@babel/helper-plugin-utils": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz", - "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true } } }, "@babel/plugin-proposal-unicode-property-regex": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.10.1.tgz", - "integrity": "sha512-JjfngYRvwmPwmnbRZyNiPFI8zxCZb8euzbCG/LxyKdeTb59tVciKo9GK9bi6JYKInk1H11Dq9j/zRqIH4KigfQ==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.12.1.tgz", + "integrity": "sha512-MYq+l+PvHuw/rKUz1at/vb6nCnQ2gmJBNaM62z0OgH7B2W1D9pvkpYtlti9bGtizNIU1K3zm4bZF9F91efVY0w==", "dev": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.10.1", - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-create-regexp-features-plugin": "^7.12.1", + "@babel/helper-plugin-utils": "^7.10.4" }, "dependencies": { "@babel/helper-plugin-utils": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz", - "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true } } @@ -1665,18 +1916,18 @@ } }, "@babel/plugin-syntax-class-properties": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.10.1.tgz", - "integrity": "sha512-Gf2Yx/iRs1JREDtVZ56OrjjgFHCaldpTnuy9BHla10qyVT3YkIIGEtoDWhyop0ksu1GvNjHIoYRBqm3zoR1jyQ==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.1.tgz", + "integrity": "sha512-U40A76x5gTwmESz+qiqssqmeEsKvcSyvtgktrm0uzcARAmM9I1jR221f6Oq+GmHrcD+LvZDag1UTOTe2fL3TeA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-plugin-utils": "^7.10.4" }, "dependencies": { "@babel/helper-plugin-utils": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz", - "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true } } @@ -1690,6 +1941,15 @@ "@babel/helper-plugin-utils": "^7.8.0" } }, + "@babel/plugin-syntax-export-namespace-from": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", + "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, "@babel/plugin-syntax-json-strings": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", @@ -1699,6 +1959,23 @@ "@babel/helper-plugin-utils": "^7.8.0" } }, + "@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", + "dev": true + } + } + }, "@babel/plugin-syntax-nullish-coalescing-operator": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", @@ -1709,18 +1986,18 @@ } }, "@babel/plugin-syntax-numeric-separator": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.1.tgz", - "integrity": "sha512-uTd0OsHrpe3tH5gRPTxG8Voh99/WCU78vIm5NMRYPAqC8lR4vajt6KkCAknCHrx24vkPdd/05yfdGSB4EIY2mg==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-plugin-utils": "^7.10.4" }, "dependencies": { "@babel/helper-plugin-utils": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz", - "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true } } @@ -1753,897 +2030,1418 @@ } }, "@babel/plugin-syntax-top-level-await": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.10.1.tgz", - "integrity": "sha512-hgA5RYkmZm8FTFT3yu2N9Bx7yVVOKYT6yEdXXo6j2JTm0wNxgqaGeQVaSHRjhfnQbX91DtjFB6McRFSlcJH3xQ==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.12.1.tgz", + "integrity": "sha512-i7ooMZFS+a/Om0crxZodrTzNEPJHZrlMVGMTEpFAj6rYY/bKCddB0Dk/YxfPuYXOopuhKk/e1jV6h+WUU9XN3A==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-plugin-utils": "^7.10.4" }, "dependencies": { "@babel/helper-plugin-utils": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz", - "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true } } }, "@babel/plugin-syntax-typescript": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.10.1.tgz", - "integrity": "sha512-X/d8glkrAtra7CaQGMiGs/OGa6XgUzqPcBXCIGFCpCqnfGlT0Wfbzo/B89xHhnInTaItPK8LALblVXcUOEh95Q==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.12.1.tgz", + "integrity": "sha512-UZNEcCY+4Dp9yYRCAHrHDU+9ZXLYaY9MgBXSRLkB9WjYFRR6quJBumfVrEkUxrePPBwFcpWfNKXqVRQQtm7mMA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-plugin-utils": "^7.10.4" }, "dependencies": { "@babel/helper-plugin-utils": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz", - "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true } } }, "@babel/plugin-transform-arrow-functions": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.10.1.tgz", - "integrity": "sha512-6AZHgFJKP3DJX0eCNJj01RpytUa3SOGawIxweHkNX2L6PYikOZmoh5B0d7hIHaIgveMjX990IAa/xK7jRTN8OA==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.12.1.tgz", + "integrity": "sha512-5QB50qyN44fzzz4/qxDPQMBCTHgxg3n0xRBLJUmBlLoU/sFvxVWGZF/ZUfMVDQuJUKXaBhbupxIzIfZ6Fwk/0A==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-plugin-utils": "^7.10.4" }, "dependencies": { "@babel/helper-plugin-utils": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz", - "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true } } }, "@babel/plugin-transform-async-to-generator": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.10.1.tgz", - "integrity": "sha512-XCgYjJ8TY2slj6SReBUyamJn3k2JLUIiiR5b6t1mNCMSvv7yx+jJpaewakikp0uWFQSF7ChPPoe3dHmXLpISkg==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.12.1.tgz", + "integrity": "sha512-SDtqoEcarK1DFlRJ1hHRY5HvJUj5kX4qmtpMAm2QnhOlyuMC4TMdCRgW6WXpv93rZeYNeLP22y8Aq2dbcDRM1A==", "dev": true, "requires": { - "@babel/helper-module-imports": "^7.10.1", - "@babel/helper-plugin-utils": "^7.10.1", - "@babel/helper-remap-async-to-generator": "^7.10.1" + "@babel/helper-module-imports": "^7.12.1", + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-remap-async-to-generator": "^7.12.1" }, "dependencies": { "@babel/helper-plugin-utils": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz", - "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true } } }, "@babel/plugin-transform-block-scoped-functions": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.10.1.tgz", - "integrity": "sha512-B7K15Xp8lv0sOJrdVAoukKlxP9N59HS48V1J3U/JGj+Ad+MHq+am6xJVs85AgXrQn4LV8vaYFOB+pr/yIuzW8Q==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.12.1.tgz", + "integrity": "sha512-5OpxfuYnSgPalRpo8EWGPzIYf0lHBWORCkj5M0oLBwHdlux9Ri36QqGW3/LR13RSVOAoUUMzoPI/jpE4ABcHoA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-plugin-utils": "^7.10.4" }, "dependencies": { "@babel/helper-plugin-utils": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz", - "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true } } }, "@babel/plugin-transform-block-scoping": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.10.1.tgz", - "integrity": "sha512-8bpWG6TtF5akdhIm/uWTyjHqENpy13Fx8chg7pFH875aNLwX8JxIxqm08gmAT+Whe6AOmaTeLPe7dpLbXt+xUw==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.12.1.tgz", + "integrity": "sha512-zJyAC9sZdE60r1nVQHblcfCj29Dh2Y0DOvlMkcqSo0ckqjiCwNiUezUKw+RjOCwGfpLRwnAeQ2XlLpsnGkvv9w==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1", - "lodash": "^4.17.13" + "@babel/helper-plugin-utils": "^7.10.4" }, "dependencies": { "@babel/helper-plugin-utils": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz", - "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true } } }, "@babel/plugin-transform-classes": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.10.1.tgz", - "integrity": "sha512-P9V0YIh+ln/B3RStPoXpEQ/CoAxQIhRSUn7aXqQ+FZJ2u8+oCtjIXR3+X0vsSD8zv+mb56K7wZW1XiDTDGiDRQ==", - "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.10.1", - "@babel/helper-define-map": "^7.10.1", - "@babel/helper-function-name": "^7.10.1", - "@babel/helper-optimise-call-expression": "^7.10.1", - "@babel/helper-plugin-utils": "^7.10.1", - "@babel/helper-replace-supers": "^7.10.1", - "@babel/helper-split-export-declaration": "^7.10.1", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.12.1.tgz", + "integrity": "sha512-/74xkA7bVdzQTBeSUhLLJgYIcxw/dpEpCdRDiHgPJ3Mv6uC11UhjpOhl72CgqbBCmt1qtssCyB2xnJm1+PFjog==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.10.4", + "@babel/helper-define-map": "^7.10.4", + "@babel/helper-function-name": "^7.10.4", + "@babel/helper-optimise-call-expression": "^7.10.4", + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-replace-supers": "^7.12.1", + "@babel/helper-split-export-declaration": "^7.10.4", "globals": "^11.1.0" }, "dependencies": { "@babel/code-frame": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.1.tgz", - "integrity": "sha512-IGhtTmpjGbYzcEDOw7DcQtbQSXcG9ftmAXtWTu9V936vDye4xjjekktFAtgZsWpzTj/X01jocB46mTywm/4SZw==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", + "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", "dev": true, "requires": { - "@babel/highlight": "^7.10.1" + "@babel/highlight": "^7.10.4" } }, "@babel/helper-function-name": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.1.tgz", - "integrity": "sha512-fcpumwhs3YyZ/ttd5Rz0xn0TpIwVkN7X0V38B9TWNfVF42KEkhkAAuPCQ3oXmtTRtiPJrmZ0TrfS0GKF0eMaRQ==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz", + "integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==", "dev": true, "requires": { - "@babel/helper-get-function-arity": "^7.10.1", - "@babel/template": "^7.10.1", - "@babel/types": "^7.10.1" + "@babel/helper-get-function-arity": "^7.10.4", + "@babel/template": "^7.10.4", + "@babel/types": "^7.10.4" } }, "@babel/helper-get-function-arity": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.1.tgz", - "integrity": "sha512-F5qdXkYGOQUb0hpRaPoetF9AnsXknKjWMZ+wmsIRsp5ge5sFh4c3h1eH2pRTTuy9KKAA2+TTYomGXAtEL2fQEw==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz", + "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==", "dev": true, "requires": { - "@babel/types": "^7.10.1" + "@babel/types": "^7.10.4" } }, "@babel/helper-plugin-utils": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz", - "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true }, "@babel/helper-split-export-declaration": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.10.1.tgz", - "integrity": "sha512-UQ1LVBPrYdbchNhLwj6fetj46BcFwfS4NllJo/1aJsT+1dLTEnXJL0qHqtY7gPzF8S2fXBJamf1biAXV3X077g==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz", + "integrity": "sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==", "dev": true, "requires": { - "@babel/types": "^7.10.1" + "@babel/types": "^7.11.0" } }, "@babel/highlight": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.1.tgz", - "integrity": "sha512-8rMof+gVP8mxYZApLF/JgNDAkdKa+aJt3ZYxF8z6+j/hpeXL7iMsKCPHa2jNMHu/qqBwzQF4OHNoYi8dMA/rYg==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", + "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.10.1", + "@babel/helper-validator-identifier": "^7.10.4", "chalk": "^2.0.0", "js-tokens": "^4.0.0" } }, "@babel/parser": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.10.2.tgz", - "integrity": "sha512-PApSXlNMJyB4JiGVhCOlzKIif+TKFTvu0aQAhnTvfP/z3vVSN6ZypH5bfUNwFXXjRQtUEBNFd2PtmCmG2Py3qQ==", + "version": "7.12.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.3.tgz", + "integrity": "sha512-kFsOS0IbsuhO5ojF8Hc8z/8vEIOkylVBrjiZUbLTE3XFe0Qi+uu6HjzQixkFaqr0ZPAMZcBVxEwmsnsLPZ2Xsw==", "dev": true }, "@babel/template": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.1.tgz", - "integrity": "sha512-OQDg6SqvFSsc9A0ej6SKINWrpJiNonRIniYondK2ViKhB06i3c0s+76XUft71iqBEe9S1OKsHwPAjfHnuvnCig==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz", + "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==", "dev": true, "requires": { - "@babel/code-frame": "^7.10.1", - "@babel/parser": "^7.10.1", - "@babel/types": "^7.10.1" + "@babel/code-frame": "^7.10.4", + "@babel/parser": "^7.10.4", + "@babel/types": "^7.10.4" } }, "@babel/types": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.2.tgz", - "integrity": "sha512-AD3AwWBSz0AWF0AkCN9VPiWrvldXq+/e3cHa4J89vo4ymjz1XwrBFFVZmkJTsQIPNk+ZVomPSXUJqq8yyjZsng==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz", + "integrity": "sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.10.1", - "lodash": "^4.17.13", + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true } } }, "@babel/plugin-transform-computed-properties": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.10.1.tgz", - "integrity": "sha512-mqSrGjp3IefMsXIenBfGcPXxJxweQe2hEIwMQvjtiDQ9b1IBvDUjkAtV/HMXX47/vXf14qDNedXsIiNd1FmkaQ==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.12.1.tgz", + "integrity": "sha512-vVUOYpPWB7BkgUWPo4C44mUQHpTZXakEqFjbv8rQMg7TC6S6ZhGZ3otQcRH6u7+adSlE5i0sp63eMC/XGffrzg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-plugin-utils": "^7.10.4" }, "dependencies": { "@babel/helper-plugin-utils": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz", - "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true } } }, "@babel/plugin-transform-destructuring": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.10.1.tgz", - "integrity": "sha512-V/nUc4yGWG71OhaTH705pU8ZSdM6c1KmmLP8ys59oOYbT7RpMYAR3MsVOt6OHL0WzG7BlTU076va9fjJyYzJMA==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.12.1.tgz", + "integrity": "sha512-fRMYFKuzi/rSiYb2uRLiUENJOKq4Gnl+6qOv5f8z0TZXg3llUwUhsNNwrwaT/6dUhJTzNpBr+CUvEWBtfNY1cw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-plugin-utils": "^7.10.4" }, "dependencies": { "@babel/helper-plugin-utils": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz", - "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true } } }, "@babel/plugin-transform-dotall-regex": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.10.1.tgz", - "integrity": "sha512-19VIMsD1dp02RvduFUmfzj8uknaO3uiHHF0s3E1OHnVsNj8oge8EQ5RzHRbJjGSetRnkEuBYO7TG1M5kKjGLOA==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.12.1.tgz", + "integrity": "sha512-B2pXeRKoLszfEW7J4Hg9LoFaWEbr/kzo3teWHmtFCszjRNa/b40f9mfeqZsIDLLt/FjwQ6pz/Gdlwy85xNckBA==", "dev": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.10.1", - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-create-regexp-features-plugin": "^7.12.1", + "@babel/helper-plugin-utils": "^7.10.4" }, "dependencies": { "@babel/helper-plugin-utils": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz", - "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true } } }, "@babel/plugin-transform-duplicate-keys": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.10.1.tgz", - "integrity": "sha512-wIEpkX4QvX8Mo9W6XF3EdGttrIPZWozHfEaDTU0WJD/TDnXMvdDh30mzUl/9qWhnf7naicYartcEfUghTCSNpA==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.12.1.tgz", + "integrity": "sha512-iRght0T0HztAb/CazveUpUQrZY+aGKKaWXMJ4uf9YJtqxSUe09j3wteztCUDRHs+SRAL7yMuFqUsLoAKKzgXjw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-plugin-utils": "^7.10.4" }, "dependencies": { "@babel/helper-plugin-utils": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz", - "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true } } }, "@babel/plugin-transform-exponentiation-operator": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.10.1.tgz", - "integrity": "sha512-lr/przdAbpEA2BUzRvjXdEDLrArGRRPwbaF9rvayuHRvdQ7lUTTkZnhZrJ4LE2jvgMRFF4f0YuPQ20vhiPYxtA==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.12.1.tgz", + "integrity": "sha512-7tqwy2bv48q+c1EHbXK0Zx3KXd2RVQp6OC7PbwFNt/dPTAV3Lu5sWtWuAj8owr5wqtWnqHfl2/mJlUmqkChKug==", "dev": true, "requires": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.10.1", - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.10.4", + "@babel/helper-plugin-utils": "^7.10.4" }, "dependencies": { "@babel/helper-plugin-utils": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz", - "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true } } }, "@babel/plugin-transform-for-of": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.10.1.tgz", - "integrity": "sha512-US8KCuxfQcn0LwSCMWMma8M2R5mAjJGsmoCBVwlMygvmDUMkTCykc84IqN1M7t+agSfOmLYTInLCHJM+RUoz+w==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.12.1.tgz", + "integrity": "sha512-Zaeq10naAsuHo7heQvyV0ptj4dlZJwZgNAtBYBnu5nNKJoW62m0zKcIEyVECrUKErkUkg6ajMy4ZfnVZciSBhg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-plugin-utils": "^7.10.4" }, "dependencies": { "@babel/helper-plugin-utils": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz", - "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true } } }, "@babel/plugin-transform-function-name": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.10.1.tgz", - "integrity": "sha512-//bsKsKFBJfGd65qSNNh1exBy5Y9gD9ZN+DvrJ8f7HXr4avE5POW6zB7Rj6VnqHV33+0vXWUwJT0wSHubiAQkw==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.12.1.tgz", + "integrity": "sha512-JF3UgJUILoFrFMEnOJLJkRHSk6LUSXLmEFsA23aR2O5CSLUxbeUX1IZ1YQ7Sn0aXb601Ncwjx73a+FVqgcljVw==", "dev": true, "requires": { - "@babel/helper-function-name": "^7.10.1", - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-function-name": "^7.10.4", + "@babel/helper-plugin-utils": "^7.10.4" }, "dependencies": { "@babel/code-frame": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.1.tgz", - "integrity": "sha512-IGhtTmpjGbYzcEDOw7DcQtbQSXcG9ftmAXtWTu9V936vDye4xjjekktFAtgZsWpzTj/X01jocB46mTywm/4SZw==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", + "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", "dev": true, "requires": { - "@babel/highlight": "^7.10.1" + "@babel/highlight": "^7.10.4" } }, "@babel/helper-function-name": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.1.tgz", - "integrity": "sha512-fcpumwhs3YyZ/ttd5Rz0xn0TpIwVkN7X0V38B9TWNfVF42KEkhkAAuPCQ3oXmtTRtiPJrmZ0TrfS0GKF0eMaRQ==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz", + "integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==", "dev": true, "requires": { - "@babel/helper-get-function-arity": "^7.10.1", - "@babel/template": "^7.10.1", - "@babel/types": "^7.10.1" + "@babel/helper-get-function-arity": "^7.10.4", + "@babel/template": "^7.10.4", + "@babel/types": "^7.10.4" } }, "@babel/helper-get-function-arity": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.1.tgz", - "integrity": "sha512-F5qdXkYGOQUb0hpRaPoetF9AnsXknKjWMZ+wmsIRsp5ge5sFh4c3h1eH2pRTTuy9KKAA2+TTYomGXAtEL2fQEw==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz", + "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==", "dev": true, "requires": { - "@babel/types": "^7.10.1" + "@babel/types": "^7.10.4" } }, "@babel/helper-plugin-utils": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz", - "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true }, "@babel/highlight": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.1.tgz", - "integrity": "sha512-8rMof+gVP8mxYZApLF/JgNDAkdKa+aJt3ZYxF8z6+j/hpeXL7iMsKCPHa2jNMHu/qqBwzQF4OHNoYi8dMA/rYg==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", + "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.10.1", + "@babel/helper-validator-identifier": "^7.10.4", "chalk": "^2.0.0", "js-tokens": "^4.0.0" } }, "@babel/parser": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.10.2.tgz", - "integrity": "sha512-PApSXlNMJyB4JiGVhCOlzKIif+TKFTvu0aQAhnTvfP/z3vVSN6ZypH5bfUNwFXXjRQtUEBNFd2PtmCmG2Py3qQ==", + "version": "7.12.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.3.tgz", + "integrity": "sha512-kFsOS0IbsuhO5ojF8Hc8z/8vEIOkylVBrjiZUbLTE3XFe0Qi+uu6HjzQixkFaqr0ZPAMZcBVxEwmsnsLPZ2Xsw==", "dev": true }, "@babel/template": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.1.tgz", - "integrity": "sha512-OQDg6SqvFSsc9A0ej6SKINWrpJiNonRIniYondK2ViKhB06i3c0s+76XUft71iqBEe9S1OKsHwPAjfHnuvnCig==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz", + "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==", "dev": true, "requires": { - "@babel/code-frame": "^7.10.1", - "@babel/parser": "^7.10.1", - "@babel/types": "^7.10.1" + "@babel/code-frame": "^7.10.4", + "@babel/parser": "^7.10.4", + "@babel/types": "^7.10.4" } }, "@babel/types": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.2.tgz", - "integrity": "sha512-AD3AwWBSz0AWF0AkCN9VPiWrvldXq+/e3cHa4J89vo4ymjz1XwrBFFVZmkJTsQIPNk+ZVomPSXUJqq8yyjZsng==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz", + "integrity": "sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.10.1", - "lodash": "^4.17.13", + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + } + } + }, + "@babel/plugin-transform-instanceof": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-instanceof/-/plugin-transform-instanceof-7.0.0-beta.53.tgz", + "integrity": "sha1-WC2CtyUYggGtDiIx8fzpTHRaLAY=", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "7.0.0-beta.53" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0-beta.53.tgz", + "integrity": "sha1-1kRYY2/8JYtCcUqd2Trrb4uM8+0=", + "dev": true } } }, "@babel/plugin-transform-literals": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.10.1.tgz", - "integrity": "sha512-qi0+5qgevz1NHLZroObRm5A+8JJtibb7vdcPQF1KQE12+Y/xxl8coJ+TpPW9iRq+Mhw/NKLjm+5SHtAHCC7lAw==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.12.1.tgz", + "integrity": "sha512-+PxVGA+2Ag6uGgL0A5f+9rklOnnMccwEBzwYFL3EUaKuiyVnUipyXncFcfjSkbimLrODoqki1U9XxZzTvfN7IQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-plugin-utils": "^7.10.4" }, "dependencies": { "@babel/helper-plugin-utils": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz", - "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true } } }, "@babel/plugin-transform-member-expression-literals": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.10.1.tgz", - "integrity": "sha512-UmaWhDokOFT2GcgU6MkHC11i0NQcL63iqeufXWfRy6pUOGYeCGEKhvfFO6Vz70UfYJYHwveg62GS83Rvpxn+NA==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.12.1.tgz", + "integrity": "sha512-1sxePl6z9ad0gFMB9KqmYofk34flq62aqMt9NqliS/7hPEpURUCMbyHXrMPlo282iY7nAvUB1aQd5mg79UD9Jg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-plugin-utils": "^7.10.4" }, "dependencies": { "@babel/helper-plugin-utils": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz", - "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true } } }, "@babel/plugin-transform-modules-amd": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.10.1.tgz", - "integrity": "sha512-31+hnWSFRI4/ACFr1qkboBbrTxoBIzj7qA69qlq8HY8p7+YCzkCT6/TvQ1a4B0z27VeWtAeJd6pr5G04dc1iHw==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.12.1.tgz", + "integrity": "sha512-tDW8hMkzad5oDtzsB70HIQQRBiTKrhfgwC/KkJeGsaNFTdWhKNt/BiE8c5yj19XiGyrxpbkOfH87qkNg1YGlOQ==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.10.1", - "@babel/helper-plugin-utils": "^7.10.1", + "@babel/helper-module-transforms": "^7.12.1", + "@babel/helper-plugin-utils": "^7.10.4", "babel-plugin-dynamic-import-node": "^2.3.3" }, "dependencies": { "@babel/helper-plugin-utils": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz", - "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true } } }, "@babel/plugin-transform-modules-commonjs": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.10.1.tgz", - "integrity": "sha512-AQG4fc3KOah0vdITwt7Gi6hD9BtQP/8bhem7OjbaMoRNCH5Djx42O2vYMfau7QnAzQCa+RJnhJBmFFMGpQEzrg==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.12.1.tgz", + "integrity": "sha512-dY789wq6l0uLY8py9c1B48V8mVL5gZh/+PQ5ZPrylPYsnAvnEMjqsUXkuoDVPeVK+0VyGar+D08107LzDQ6pag==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.10.1", - "@babel/helper-plugin-utils": "^7.10.1", - "@babel/helper-simple-access": "^7.10.1", + "@babel/helper-module-transforms": "^7.12.1", + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-simple-access": "^7.12.1", "babel-plugin-dynamic-import-node": "^2.3.3" }, "dependencies": { "@babel/helper-plugin-utils": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz", - "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true } } }, "@babel/plugin-transform-modules-systemjs": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.10.1.tgz", - "integrity": "sha512-ewNKcj1TQZDL3YnO85qh9zo1YF1CHgmSTlRQgHqe63oTrMI85cthKtZjAiZSsSNjPQ5NCaYo5QkbYqEw1ZBgZA==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.12.1.tgz", + "integrity": "sha512-Hn7cVvOavVh8yvW6fLwveFqSnd7rbQN3zJvoPNyNaQSvgfKmDBO9U1YL9+PCXGRlZD9tNdWTy5ACKqMuzyn32Q==", "dev": true, "requires": { - "@babel/helper-hoist-variables": "^7.10.1", - "@babel/helper-module-transforms": "^7.10.1", - "@babel/helper-plugin-utils": "^7.10.1", + "@babel/helper-hoist-variables": "^7.10.4", + "@babel/helper-module-transforms": "^7.12.1", + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-validator-identifier": "^7.10.4", "babel-plugin-dynamic-import-node": "^2.3.3" }, "dependencies": { "@babel/helper-plugin-utils": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz", - "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true } } }, "@babel/plugin-transform-modules-umd": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.10.1.tgz", - "integrity": "sha512-EIuiRNMd6GB6ulcYlETnYYfgv4AxqrswghmBRQbWLHZxN4s7mupxzglnHqk9ZiUpDI4eRWewedJJNj67PWOXKA==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.12.1.tgz", + "integrity": "sha512-aEIubCS0KHKM0zUos5fIoQm+AZUMt1ZvMpqz0/H5qAQ7vWylr9+PLYurT+Ic7ID/bKLd4q8hDovaG3Zch2uz5Q==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.10.1", - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-module-transforms": "^7.12.1", + "@babel/helper-plugin-utils": "^7.10.4" }, "dependencies": { "@babel/helper-plugin-utils": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz", - "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true } } }, "@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.8.3.tgz", - "integrity": "sha512-f+tF/8UVPU86TrCb06JoPWIdDpTNSGGcAtaD9mLP0aYGA0OS0j7j7DHJR0GTFrUZPUU6loZhbsVZgTh0N+Qdnw==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.12.1.tgz", + "integrity": "sha512-tB43uQ62RHcoDp9v2Nsf+dSM8sbNodbEicbQNA53zHz8pWUhsgHSJCGpt7daXxRydjb0KnfmB+ChXOv3oADp1Q==", "dev": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.8.3" + "@babel/helper-create-regexp-features-plugin": "^7.12.1" } }, "@babel/plugin-transform-new-target": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.10.1.tgz", - "integrity": "sha512-MBlzPc1nJvbmO9rPr1fQwXOM2iGut+JC92ku6PbiJMMK7SnQc1rytgpopveE3Evn47gzvGYeCdgfCDbZo0ecUw==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.12.1.tgz", + "integrity": "sha512-+eW/VLcUL5L9IvJH7rT1sT0CzkdUTvPrXC2PXTn/7z7tXLBuKvezYbGdxD5WMRoyvyaujOq2fWoKl869heKjhw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-plugin-utils": "^7.10.4" }, "dependencies": { "@babel/helper-plugin-utils": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz", - "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true } } }, "@babel/plugin-transform-object-super": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.10.1.tgz", - "integrity": "sha512-WnnStUDN5GL+wGQrJylrnnVlFhFmeArINIR9gjhSeYyvroGhBrSAXYg/RHsnfzmsa+onJrTJrEClPzgNmmQ4Gw==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.12.1.tgz", + "integrity": "sha512-AvypiGJH9hsquNUn+RXVcBdeE3KHPZexWRdimhuV59cSoOt5kFBmqlByorAeUlGG2CJWd0U+4ZtNKga/TB0cAw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1", - "@babel/helper-replace-supers": "^7.10.1" + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-replace-supers": "^7.12.1" }, "dependencies": { "@babel/helper-plugin-utils": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz", - "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true } } }, "@babel/plugin-transform-parameters": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.10.1.tgz", - "integrity": "sha512-tJ1T0n6g4dXMsL45YsSzzSDZCxiHXAQp/qHrucOq5gEHncTA3xDxnd5+sZcoQp+N1ZbieAaB8r/VUCG0gqseOg==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.12.1.tgz", + "integrity": "sha512-xq9C5EQhdPK23ZeCdMxl8bbRnAgHFrw5EOC3KJUsSylZqdkCaFEXxGSBuTSObOpiiHHNyb82es8M1QYgfQGfNg==", "dev": true, "requires": { - "@babel/helper-get-function-arity": "^7.10.1", - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-plugin-utils": "^7.10.4" }, "dependencies": { - "@babel/helper-get-function-arity": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.1.tgz", - "integrity": "sha512-F5qdXkYGOQUb0hpRaPoetF9AnsXknKjWMZ+wmsIRsp5ge5sFh4c3h1eH2pRTTuy9KKAA2+TTYomGXAtEL2fQEw==", - "dev": true, - "requires": { - "@babel/types": "^7.10.1" - } - }, "@babel/helper-plugin-utils": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz", - "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true - }, - "@babel/types": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.2.tgz", - "integrity": "sha512-AD3AwWBSz0AWF0AkCN9VPiWrvldXq+/e3cHa4J89vo4ymjz1XwrBFFVZmkJTsQIPNk+ZVomPSXUJqq8yyjZsng==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.10.1", - "lodash": "^4.17.13", - "to-fast-properties": "^2.0.0" - } } } }, "@babel/plugin-transform-property-literals": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.10.1.tgz", - "integrity": "sha512-Kr6+mgag8auNrgEpbfIWzdXYOvqDHZOF0+Bx2xh4H2EDNwcbRb9lY6nkZg8oSjsX+DH9Ebxm9hOqtKW+gRDeNA==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.12.1.tgz", + "integrity": "sha512-6MTCR/mZ1MQS+AwZLplX4cEySjCpnIF26ToWo942nqn8hXSm7McaHQNeGx/pt7suI1TWOWMfa/NgBhiqSnX0cQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-plugin-utils": "^7.10.4" }, "dependencies": { "@babel/helper-plugin-utils": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz", - "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true } } }, "@babel/plugin-transform-regenerator": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.10.1.tgz", - "integrity": "sha512-B3+Y2prScgJ2Bh/2l9LJxKbb8C8kRfsG4AdPT+n7ixBHIxJaIG8bi8tgjxUMege1+WqSJ+7gu1YeoMVO3gPWzw==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.12.1.tgz", + "integrity": "sha512-gYrHqs5itw6i4PflFX3OdBPMQdPbF4bj2REIUxlMRUFk0/ZOAIpDFuViuxPjUL7YC8UPnf+XG7/utJvqXdPKng==", "dev": true, "requires": { "regenerator-transform": "^0.14.2" } }, "@babel/plugin-transform-reserved-words": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.10.1.tgz", - "integrity": "sha512-qN1OMoE2nuqSPmpTqEM7OvJ1FkMEV+BjVeZZm9V9mq/x1JLKQ4pcv8riZJMNN3u2AUGl0ouOMjRr2siecvHqUQ==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.12.1.tgz", + "integrity": "sha512-pOnUfhyPKvZpVyBHhSBoX8vfA09b7r00Pmm1sH+29ae2hMTKVmSp4Ztsr8KBKjLjx17H0eJqaRC3bR2iThM54A==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-plugin-utils": "^7.10.4" }, "dependencies": { "@babel/helper-plugin-utils": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz", - "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true } } }, "@babel/plugin-transform-shorthand-properties": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.10.1.tgz", - "integrity": "sha512-AR0E/lZMfLstScFwztApGeyTHJ5u3JUKMjneqRItWeEqDdHWZwAOKycvQNCasCK/3r5YXsuNG25funcJDu7Y2g==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.12.1.tgz", + "integrity": "sha512-GFZS3c/MhX1OusqB1MZ1ct2xRzX5ppQh2JU1h2Pnfk88HtFTM+TWQqJNfwkmxtPQtb/s1tk87oENfXJlx7rSDw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-plugin-utils": "^7.10.4" }, "dependencies": { "@babel/helper-plugin-utils": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz", - "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true } } }, "@babel/plugin-transform-spread": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.10.1.tgz", - "integrity": "sha512-8wTPym6edIrClW8FI2IoaePB91ETOtg36dOkj3bYcNe7aDMN2FXEoUa+WrmPc4xa1u2PQK46fUX2aCb+zo9rfw==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.12.1.tgz", + "integrity": "sha512-vuLp8CP0BE18zVYjsEBZ5xoCecMK6LBMMxYzJnh01rxQRvhNhH1csMMmBfNo5tGpGO+NhdSNW2mzIvBu3K1fng==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-skip-transparent-expression-wrappers": "^7.12.1" }, "dependencies": { "@babel/helper-plugin-utils": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz", - "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true } } }, "@babel/plugin-transform-sticky-regex": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.10.1.tgz", - "integrity": "sha512-j17ojftKjrL7ufX8ajKvwRilwqTok4q+BjkknmQw9VNHnItTyMP5anPFzxFJdCQs7clLcWpCV3ma+6qZWLnGMA==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.12.1.tgz", + "integrity": "sha512-CiUgKQ3AGVk7kveIaPEET1jNDhZZEl1RPMWdTBE1799bdz++SwqDHStmxfCtDfBhQgCl38YRiSnrMuUMZIWSUQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1", - "@babel/helper-regex": "^7.10.1" + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-regex": "^7.10.4" }, "dependencies": { "@babel/helper-plugin-utils": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz", - "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true } } }, "@babel/plugin-transform-template-literals": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.10.1.tgz", - "integrity": "sha512-t7B/3MQf5M1T9hPCRG28DNGZUuxAuDqLYS03rJrIk2prj/UV7Z6FOneijhQhnv/Xa039vidXeVbvjK2SK5f7Gg==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.12.1.tgz", + "integrity": "sha512-b4Zx3KHi+taXB1dVRBhVJtEPi9h1THCeKmae2qP0YdUHIFhVjtpqqNfxeVAa1xeHVhAy4SbHxEwx5cltAu5apw==", "dev": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.10.1", - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-plugin-utils": "^7.10.4" }, "dependencies": { "@babel/helper-plugin-utils": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz", - "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true } } }, "@babel/plugin-transform-typeof-symbol": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.10.1.tgz", - "integrity": "sha512-qX8KZcmbvA23zDi+lk9s6hC1FM7jgLHYIjuLgULgc8QtYnmB3tAVIYkNoKRQ75qWBeyzcoMoK8ZQmogGtC/w0g==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.12.1.tgz", + "integrity": "sha512-EPGgpGy+O5Kg5pJFNDKuxt9RdmTgj5sgrus2XVeMp/ZIbOESadgILUbm50SNpghOh3/6yrbsH+NB5+WJTmsA7Q==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-plugin-utils": "^7.10.4" }, "dependencies": { "@babel/helper-plugin-utils": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz", - "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true } } }, "@babel/plugin-transform-typescript": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.10.1.tgz", - "integrity": "sha512-v+QWKlmCnsaimLeqq9vyCsVRMViZG1k2SZTlcZvB+TqyH570Zsij8nvVUZzOASCRiQFUxkLrn9Wg/kH0zgy5OQ==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.12.1.tgz", + "integrity": "sha512-VrsBByqAIntM+EYMqSm59SiMEf7qkmI9dqMt6RbD/wlwueWmYcI0FFK5Fj47pP6DRZm+3teXjosKlwcZJ5lIMw==", "dev": true, "requires": { - "@babel/helper-create-class-features-plugin": "^7.10.1", - "@babel/helper-plugin-utils": "^7.10.1", - "@babel/plugin-syntax-typescript": "^7.10.1" + "@babel/helper-create-class-features-plugin": "^7.12.1", + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-syntax-typescript": "^7.12.1" }, "dependencies": { "@babel/helper-plugin-utils": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz", - "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true } } }, "@babel/plugin-transform-unicode-escapes": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.10.1.tgz", - "integrity": "sha512-zZ0Poh/yy1d4jeDWpx/mNwbKJVwUYJX73q+gyh4bwtG0/iUlzdEu0sLMda8yuDFS6LBQlT/ST1SJAR6zYwXWgw==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.12.1.tgz", + "integrity": "sha512-I8gNHJLIc7GdApm7wkVnStWssPNbSRMPtgHdmH3sRM1zopz09UWPS4x5V4n1yz/MIWTVnJ9sp6IkuXdWM4w+2Q==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-plugin-utils": "^7.10.4" }, "dependencies": { "@babel/helper-plugin-utils": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz", - "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true } } }, "@babel/plugin-transform-unicode-regex": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.10.1.tgz", - "integrity": "sha512-Y/2a2W299k0VIUdbqYm9X2qS6fE0CUBhhiPpimK6byy7OJ/kORLlIX+J6UrjgNu5awvs62k+6RSslxhcvVw2Tw==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.12.1.tgz", + "integrity": "sha512-SqH4ClNngh/zGwHZOOQMTD+e8FGWexILV+ePMyiDJttAWRh5dhDL8rcl5lSgU3Huiq6Zn6pWTMvdPAb21Dwdyg==", "dev": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.10.1", - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-create-regexp-features-plugin": "^7.12.1", + "@babel/helper-plugin-utils": "^7.10.4" }, "dependencies": { "@babel/helper-plugin-utils": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz", - "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", + "dev": true + } + } + }, + "@babel/polyfill": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.12.1.tgz", + "integrity": "sha512-X0pi0V6gxLi6lFZpGmeNa4zxtwEmCs42isWLNjZZDE0Y8yVfgu0T2OAHlzBbdYlqbW/YXVvoBHpATEM+goCj8g==", + "dev": true, + "requires": { + "core-js": "^2.6.5", + "regenerator-runtime": "^0.13.4" + }, + "dependencies": { + "core-js": { + "version": "2.6.11", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.11.tgz", + "integrity": "sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg==", "dev": true } } }, "@babel/preset-env": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.10.2.tgz", - "integrity": "sha512-MjqhX0RZaEgK/KueRzh+3yPSk30oqDKJ5HP5tqTSB1e2gzGS3PLy7K0BIpnp78+0anFuSwOeuCf1zZO7RzRvEA==", - "dev": true, - "requires": { - "@babel/compat-data": "^7.10.1", - "@babel/helper-compilation-targets": "^7.10.2", - "@babel/helper-module-imports": "^7.10.1", - "@babel/helper-plugin-utils": "^7.10.1", - "@babel/plugin-proposal-async-generator-functions": "^7.10.1", - "@babel/plugin-proposal-class-properties": "^7.10.1", - "@babel/plugin-proposal-dynamic-import": "^7.10.1", - "@babel/plugin-proposal-json-strings": "^7.10.1", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.10.1", - "@babel/plugin-proposal-numeric-separator": "^7.10.1", - "@babel/plugin-proposal-object-rest-spread": "^7.10.1", - "@babel/plugin-proposal-optional-catch-binding": "^7.10.1", - "@babel/plugin-proposal-optional-chaining": "^7.10.1", - "@babel/plugin-proposal-private-methods": "^7.10.1", - "@babel/plugin-proposal-unicode-property-regex": "^7.10.1", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.12.1.tgz", + "integrity": "sha512-H8kxXmtPaAGT7TyBvSSkoSTUK6RHh61So05SyEbpmr0MCZrsNYn7mGMzzeYoOUCdHzww61k8XBft2TaES+xPLg==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.12.1", + "@babel/helper-compilation-targets": "^7.12.1", + "@babel/helper-module-imports": "^7.12.1", + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-validator-option": "^7.12.1", + "@babel/plugin-proposal-async-generator-functions": "^7.12.1", + "@babel/plugin-proposal-class-properties": "^7.12.1", + "@babel/plugin-proposal-dynamic-import": "^7.12.1", + "@babel/plugin-proposal-export-namespace-from": "^7.12.1", + "@babel/plugin-proposal-json-strings": "^7.12.1", + "@babel/plugin-proposal-logical-assignment-operators": "^7.12.1", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.12.1", + "@babel/plugin-proposal-numeric-separator": "^7.12.1", + "@babel/plugin-proposal-object-rest-spread": "^7.12.1", + "@babel/plugin-proposal-optional-catch-binding": "^7.12.1", + "@babel/plugin-proposal-optional-chaining": "^7.12.1", + "@babel/plugin-proposal-private-methods": "^7.12.1", + "@babel/plugin-proposal-unicode-property-regex": "^7.12.1", "@babel/plugin-syntax-async-generators": "^7.8.0", - "@babel/plugin-syntax-class-properties": "^7.10.1", + "@babel/plugin-syntax-class-properties": "^7.12.1", "@babel/plugin-syntax-dynamic-import": "^7.8.0", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3", "@babel/plugin-syntax-json-strings": "^7.8.0", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0", - "@babel/plugin-syntax-numeric-separator": "^7.10.1", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", "@babel/plugin-syntax-object-rest-spread": "^7.8.0", "@babel/plugin-syntax-optional-catch-binding": "^7.8.0", "@babel/plugin-syntax-optional-chaining": "^7.8.0", - "@babel/plugin-syntax-top-level-await": "^7.10.1", - "@babel/plugin-transform-arrow-functions": "^7.10.1", - "@babel/plugin-transform-async-to-generator": "^7.10.1", - "@babel/plugin-transform-block-scoped-functions": "^7.10.1", - "@babel/plugin-transform-block-scoping": "^7.10.1", - "@babel/plugin-transform-classes": "^7.10.1", - "@babel/plugin-transform-computed-properties": "^7.10.1", - "@babel/plugin-transform-destructuring": "^7.10.1", - "@babel/plugin-transform-dotall-regex": "^7.10.1", - "@babel/plugin-transform-duplicate-keys": "^7.10.1", - "@babel/plugin-transform-exponentiation-operator": "^7.10.1", - "@babel/plugin-transform-for-of": "^7.10.1", - "@babel/plugin-transform-function-name": "^7.10.1", - "@babel/plugin-transform-literals": "^7.10.1", - "@babel/plugin-transform-member-expression-literals": "^7.10.1", - "@babel/plugin-transform-modules-amd": "^7.10.1", - "@babel/plugin-transform-modules-commonjs": "^7.10.1", - "@babel/plugin-transform-modules-systemjs": "^7.10.1", - "@babel/plugin-transform-modules-umd": "^7.10.1", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.8.3", - "@babel/plugin-transform-new-target": "^7.10.1", - "@babel/plugin-transform-object-super": "^7.10.1", - "@babel/plugin-transform-parameters": "^7.10.1", - "@babel/plugin-transform-property-literals": "^7.10.1", - "@babel/plugin-transform-regenerator": "^7.10.1", - "@babel/plugin-transform-reserved-words": "^7.10.1", - "@babel/plugin-transform-shorthand-properties": "^7.10.1", - "@babel/plugin-transform-spread": "^7.10.1", - "@babel/plugin-transform-sticky-regex": "^7.10.1", - "@babel/plugin-transform-template-literals": "^7.10.1", - "@babel/plugin-transform-typeof-symbol": "^7.10.1", - "@babel/plugin-transform-unicode-escapes": "^7.10.1", - "@babel/plugin-transform-unicode-regex": "^7.10.1", + "@babel/plugin-syntax-top-level-await": "^7.12.1", + "@babel/plugin-transform-arrow-functions": "^7.12.1", + "@babel/plugin-transform-async-to-generator": "^7.12.1", + "@babel/plugin-transform-block-scoped-functions": "^7.12.1", + "@babel/plugin-transform-block-scoping": "^7.12.1", + "@babel/plugin-transform-classes": "^7.12.1", + "@babel/plugin-transform-computed-properties": "^7.12.1", + "@babel/plugin-transform-destructuring": "^7.12.1", + "@babel/plugin-transform-dotall-regex": "^7.12.1", + "@babel/plugin-transform-duplicate-keys": "^7.12.1", + "@babel/plugin-transform-exponentiation-operator": "^7.12.1", + "@babel/plugin-transform-for-of": "^7.12.1", + "@babel/plugin-transform-function-name": "^7.12.1", + "@babel/plugin-transform-literals": "^7.12.1", + "@babel/plugin-transform-member-expression-literals": "^7.12.1", + "@babel/plugin-transform-modules-amd": "^7.12.1", + "@babel/plugin-transform-modules-commonjs": "^7.12.1", + "@babel/plugin-transform-modules-systemjs": "^7.12.1", + "@babel/plugin-transform-modules-umd": "^7.12.1", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.12.1", + "@babel/plugin-transform-new-target": "^7.12.1", + "@babel/plugin-transform-object-super": "^7.12.1", + "@babel/plugin-transform-parameters": "^7.12.1", + "@babel/plugin-transform-property-literals": "^7.12.1", + "@babel/plugin-transform-regenerator": "^7.12.1", + "@babel/plugin-transform-reserved-words": "^7.12.1", + "@babel/plugin-transform-shorthand-properties": "^7.12.1", + "@babel/plugin-transform-spread": "^7.12.1", + "@babel/plugin-transform-sticky-regex": "^7.12.1", + "@babel/plugin-transform-template-literals": "^7.12.1", + "@babel/plugin-transform-typeof-symbol": "^7.12.1", + "@babel/plugin-transform-unicode-escapes": "^7.12.1", + "@babel/plugin-transform-unicode-regex": "^7.12.1", "@babel/preset-modules": "^0.1.3", - "@babel/types": "^7.10.2", - "browserslist": "^4.12.0", + "@babel/types": "^7.12.1", "core-js-compat": "^3.6.2", - "invariant": "^2.2.2", - "levenary": "^1.1.1", "semver": "^5.5.0" }, "dependencies": { "@babel/helper-plugin-utils": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz", - "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true }, "@babel/types": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.2.tgz", - "integrity": "sha512-AD3AwWBSz0AWF0AkCN9VPiWrvldXq+/e3cHa4J89vo4ymjz1XwrBFFVZmkJTsQIPNk+ZVomPSXUJqq8yyjZsng==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz", + "integrity": "sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.10.1", - "lodash": "^4.17.13", + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } }, - "browserslist": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.12.0.tgz", - "integrity": "sha512-UH2GkcEDSI0k/lRkuDSzFl9ZZ87skSy9w2XAn1MsZnL+4c4rqbBd3e82UWHbYDpztABrPBhZsTEeuxVfHppqDg==", + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + } + } + }, + "@babel/preset-es2015": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/preset-es2015/-/preset-es2015-7.0.0-beta.53.tgz", + "integrity": "sha1-SYL6GUjbEJN2Yoj2mRPizjYDEeQ=", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "7.0.0-beta.53", + "@babel/plugin-transform-arrow-functions": "7.0.0-beta.53", + "@babel/plugin-transform-block-scoped-functions": "7.0.0-beta.53", + "@babel/plugin-transform-block-scoping": "7.0.0-beta.53", + "@babel/plugin-transform-classes": "7.0.0-beta.53", + "@babel/plugin-transform-computed-properties": "7.0.0-beta.53", + "@babel/plugin-transform-destructuring": "7.0.0-beta.53", + "@babel/plugin-transform-duplicate-keys": "7.0.0-beta.53", + "@babel/plugin-transform-for-of": "7.0.0-beta.53", + "@babel/plugin-transform-function-name": "7.0.0-beta.53", + "@babel/plugin-transform-instanceof": "7.0.0-beta.53", + "@babel/plugin-transform-literals": "7.0.0-beta.53", + "@babel/plugin-transform-modules-amd": "7.0.0-beta.53", + "@babel/plugin-transform-modules-commonjs": "7.0.0-beta.53", + "@babel/plugin-transform-modules-systemjs": "7.0.0-beta.53", + "@babel/plugin-transform-modules-umd": "7.0.0-beta.53", + "@babel/plugin-transform-object-super": "7.0.0-beta.53", + "@babel/plugin-transform-parameters": "7.0.0-beta.53", + "@babel/plugin-transform-regenerator": "7.0.0-beta.53", + "@babel/plugin-transform-shorthand-properties": "7.0.0-beta.53", + "@babel/plugin-transform-spread": "7.0.0-beta.53", + "@babel/plugin-transform-sticky-regex": "7.0.0-beta.53", + "@babel/plugin-transform-template-literals": "7.0.0-beta.53", + "@babel/plugin-transform-typeof-symbol": "7.0.0-beta.53", + "@babel/plugin-transform-unicode-regex": "7.0.0-beta.53" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.53.tgz", + "integrity": "sha1-mA0VYLhjV1v1o3eSUDfgEy71kh4=", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001043", - "electron-to-chromium": "^1.3.413", - "node-releases": "^1.1.53", - "pkg-up": "^2.0.0" + "@babel/highlight": "7.0.0-beta.53" } }, - "caniuse-lite": { - "version": "1.0.30001066", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001066.tgz", - "integrity": "sha512-Gfj/WAastBtfxLws0RCh2sDbTK/8rJuSeZMecrSkNGYxPcv7EzblmDGfWQCFEQcSqYE2BRgQiJh8HOD07N5hIw==", + "@babel/generator": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.0.0-beta.53.tgz", + "integrity": "sha1-uMrXLFcr4yNK/94ivm2sxCUOA0s=", + "dev": true, + "requires": { + "@babel/types": "7.0.0-beta.53", + "jsesc": "^2.5.1", + "lodash": "^4.17.5", + "source-map": "^0.5.0", + "trim-right": "^1.0.1" + } + }, + "@babel/helper-annotate-as-pure": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0-beta.53.tgz", + "integrity": "sha1-WZYGKDdcvu+WoH7f4co4t1bwGqg=", + "dev": true, + "requires": { + "@babel/types": "7.0.0-beta.53" + } + }, + "@babel/helper-define-map": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.0.0-beta.53.tgz", + "integrity": "sha1-SOniJlRTeHl1BD76qx7a0jnqlpU=", + "dev": true, + "requires": { + "@babel/helper-function-name": "7.0.0-beta.53", + "@babel/types": "7.0.0-beta.53", + "lodash": "^4.17.5" + } + }, + "@babel/helper-function-name": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.53.tgz", + "integrity": "sha1-USgEro6cvOVDHr6hnkdijC7WU/I=", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "7.0.0-beta.53", + "@babel/template": "7.0.0-beta.53", + "@babel/types": "7.0.0-beta.53" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.53.tgz", + "integrity": "sha1-3tiKsp+bHbYch9G7jTijXdp3neY=", + "dev": true, + "requires": { + "@babel/types": "7.0.0-beta.53" + } + }, + "@babel/helper-hoist-variables": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.0.0-beta.53.tgz", + "integrity": "sha1-TCfjuHP6CcWtbpPrQHBMIA+EE3w=", + "dev": true, + "requires": { + "@babel/types": "7.0.0-beta.53" + } + }, + "@babel/helper-member-expression-to-functions": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.0.0-beta.53.tgz", + "integrity": "sha1-D7Dviy07kD0cO/Qm2kp0V14BnOQ=", + "dev": true, + "requires": { + "@babel/types": "7.0.0-beta.53" + } + }, + "@babel/helper-module-imports": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.0.0-beta.53.tgz", + "integrity": "sha1-5zXmqjClBLD52Fw4ptRwqfSqgdk=", + "dev": true, + "requires": { + "@babel/types": "7.0.0-beta.53", + "lodash": "^4.17.5" + } + }, + "@babel/helper-module-transforms": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.0.0-beta.53.tgz", + "integrity": "sha1-e6IUzcyPhiPy0Xl96v8f80mqzhM=", + "dev": true, + "requires": { + "@babel/helper-module-imports": "7.0.0-beta.53", + "@babel/helper-simple-access": "7.0.0-beta.53", + "@babel/helper-split-export-declaration": "7.0.0-beta.53", + "@babel/template": "7.0.0-beta.53", + "@babel/types": "7.0.0-beta.53", + "lodash": "^4.17.5" + } + }, + "@babel/helper-optimise-call-expression": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.0.0-beta.53.tgz", + "integrity": "sha1-j8eO9MD2n4uzu980zSMsIBIEFMg=", + "dev": true, + "requires": { + "@babel/types": "7.0.0-beta.53" + } + }, + "@babel/helper-plugin-utils": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0-beta.53.tgz", + "integrity": "sha1-1kRYY2/8JYtCcUqd2Trrb4uM8+0=", "dev": true }, - "electron-to-chromium": { - "version": "1.3.458", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.458.tgz", - "integrity": "sha512-OjRkb0igW0oKE2QbzS7vBYrm7xjW/KRTtIj0OGGx57jr/YhBiKb7oZvdbaojqjfCb/7LbnwsbMbdsYjthdJbAw==", + "@babel/helper-regex": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.0.0-beta.53.tgz", + "integrity": "sha1-bp0hl7Vid54iVWWUaumoXCFbIl4=", + "dev": true, + "requires": { + "lodash": "^4.17.5" + } + }, + "@babel/helper-replace-supers": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.0.0-beta.53.tgz", + "integrity": "sha1-M5tb3BAilElbGifFWBMjBuG3vKc=", + "dev": true, + "requires": { + "@babel/helper-member-expression-to-functions": "7.0.0-beta.53", + "@babel/helper-optimise-call-expression": "7.0.0-beta.53", + "@babel/traverse": "7.0.0-beta.53", + "@babel/types": "7.0.0-beta.53" + } + }, + "@babel/helper-simple-access": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.0.0-beta.53.tgz", + "integrity": "sha1-cvbbmr5C+GgfpvAo79WdgVRHUrM=", + "dev": true, + "requires": { + "@babel/template": "7.0.0-beta.53", + "@babel/types": "7.0.0-beta.53", + "lodash": "^4.17.5" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0-beta.53.tgz", + "integrity": "sha1-rvVLix+ZYW6jfJhHhxajeAJjMls=", + "dev": true, + "requires": { + "@babel/types": "7.0.0-beta.53" + } + }, + "@babel/highlight": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0-beta.53.tgz", + "integrity": "sha1-9OlS2tF4fSBeGI0+OEzc5JyjaPs=", + "dev": true, + "requires": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^3.0.0" + } + }, + "@babel/parser": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.0.0-beta.53.tgz", + "integrity": "sha1-H0XrYXv5Rj1IKywE00nZ5O2/SJI=", + "dev": true + }, + "@babel/plugin-transform-arrow-functions": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.0.0-beta.53.tgz", + "integrity": "sha1-p19fqEl6rBcp0DO/QcJQQWudHgQ=", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "7.0.0-beta.53" + } + }, + "@babel/plugin-transform-block-scoped-functions": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.0.0-beta.53.tgz", + "integrity": "sha1-CkMiGhsMkM1NCfG0a5Wd0khlf3M=", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "7.0.0-beta.53" + } + }, + "@babel/plugin-transform-block-scoping": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.0.0-beta.53.tgz", + "integrity": "sha1-nv1uUMofo5jcqnEZYh2j8fu4IbY=", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "7.0.0-beta.53", + "lodash": "^4.17.5" + } + }, + "@babel/plugin-transform-classes": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.0.0-beta.53.tgz", + "integrity": "sha1-XcLsMb8emAZqzfDEiHt3RMFL7G4=", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "7.0.0-beta.53", + "@babel/helper-define-map": "7.0.0-beta.53", + "@babel/helper-function-name": "7.0.0-beta.53", + "@babel/helper-optimise-call-expression": "7.0.0-beta.53", + "@babel/helper-plugin-utils": "7.0.0-beta.53", + "@babel/helper-replace-supers": "7.0.0-beta.53", + "@babel/helper-split-export-declaration": "7.0.0-beta.53", + "globals": "^11.1.0" + } + }, + "@babel/plugin-transform-computed-properties": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.0.0-beta.53.tgz", + "integrity": "sha1-l0fiYIKulO2lMPmNLCBZ6NLbwAU=", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "7.0.0-beta.53" + } + }, + "@babel/plugin-transform-destructuring": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.0.0-beta.53.tgz", + "integrity": "sha1-DwrbDhptzTWjZkEBYJ7AYv8SenY=", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "7.0.0-beta.53" + } + }, + "@babel/plugin-transform-duplicate-keys": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.0.0-beta.53.tgz", + "integrity": "sha1-D1WZE6v6GCOcpOCPc+7DbF5XuB8=", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "7.0.0-beta.53" + } + }, + "@babel/plugin-transform-for-of": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.0.0-beta.53.tgz", + "integrity": "sha1-+gZSFeGFacj3TdUktXIeEdzKlzs=", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "7.0.0-beta.53" + } + }, + "@babel/plugin-transform-function-name": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.0.0-beta.53.tgz", + "integrity": "sha1-Kzpbs2TB4cV+zL/iXGv1XygEET4=", + "dev": true, + "requires": { + "@babel/helper-function-name": "7.0.0-beta.53", + "@babel/helper-plugin-utils": "7.0.0-beta.53" + } + }, + "@babel/plugin-transform-literals": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.0.0-beta.53.tgz", + "integrity": "sha1-vsTxROmpbvUSHRQwx+vl/QiGV8k=", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "7.0.0-beta.53" + } + }, + "@babel/plugin-transform-modules-amd": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.0.0-beta.53.tgz", + "integrity": "sha1-WFTXOeZ5IzqId8C0GCaca+t6Miw=", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "7.0.0-beta.53", + "@babel/helper-plugin-utils": "7.0.0-beta.53" + } + }, + "@babel/plugin-transform-modules-commonjs": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.0.0-beta.53.tgz", + "integrity": "sha1-68P7ocWmyHQ7kJQD7NPn42gcr6U=", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "7.0.0-beta.53", + "@babel/helper-plugin-utils": "7.0.0-beta.53", + "@babel/helper-simple-access": "7.0.0-beta.53" + } + }, + "@babel/plugin-transform-modules-systemjs": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.0.0-beta.53.tgz", + "integrity": "sha1-uA/NnBWXLcaCMhT1JIUnhgu/BY4=", + "dev": true, + "requires": { + "@babel/helper-hoist-variables": "7.0.0-beta.53", + "@babel/helper-plugin-utils": "7.0.0-beta.53" + } + }, + "@babel/plugin-transform-modules-umd": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.0.0-beta.53.tgz", + "integrity": "sha1-Kjar5AodpnbkOhwwcVeOJ70tZ50=", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "7.0.0-beta.53", + "@babel/helper-plugin-utils": "7.0.0-beta.53" + } + }, + "@babel/plugin-transform-object-super": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.0.0-beta.53.tgz", + "integrity": "sha1-4sTwbts0s9eksnV7oYgp0N8gKcs=", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "7.0.0-beta.53", + "@babel/helper-replace-supers": "7.0.0-beta.53" + } + }, + "@babel/plugin-transform-parameters": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.0.0-beta.53.tgz", + "integrity": "sha1-7+YM7IzsoNGdXG+hrnm8TjMnnVY=", + "dev": true, + "requires": { + "@babel/helper-call-delegate": "7.0.0-beta.53", + "@babel/helper-get-function-arity": "7.0.0-beta.53", + "@babel/helper-plugin-utils": "7.0.0-beta.53" + } + }, + "@babel/plugin-transform-regenerator": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.0.0-beta.53.tgz", + "integrity": "sha1-T+u/YISvoMHJ7ISX3mjAaV/p2gs=", + "dev": true, + "requires": { + "regenerator-transform": "^0.13.3" + } + }, + "@babel/plugin-transform-shorthand-properties": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.0.0-beta.53.tgz", + "integrity": "sha1-38SIG2vXZYoAMew7gWPliPCJjUs=", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "7.0.0-beta.53" + } + }, + "@babel/plugin-transform-spread": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.0.0-beta.53.tgz", + "integrity": "sha1-g+j2Rsok8cmCKPnxREz2DL1JOLw=", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "7.0.0-beta.53" + } + }, + "@babel/plugin-transform-sticky-regex": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.0.0-beta.53.tgz", + "integrity": "sha1-D888mUq92Lq1m6l4L+TZ+KVF1uc=", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "7.0.0-beta.53", + "@babel/helper-regex": "7.0.0-beta.53" + } + }, + "@babel/plugin-transform-template-literals": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.0.0-beta.53.tgz", + "integrity": "sha1-+msLQXEA0j4tsUwd9HorGzl48dk=", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "7.0.0-beta.53", + "@babel/helper-plugin-utils": "7.0.0-beta.53" + } + }, + "@babel/plugin-transform-typeof-symbol": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.0.0-beta.53.tgz", + "integrity": "sha1-ZarocamqQPYRSDZlcxIJrr1cKis=", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "7.0.0-beta.53" + } + }, + "@babel/plugin-transform-unicode-regex": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.0.0-beta.53.tgz", + "integrity": "sha1-CvdOyAGefVnji+ZNt/YikZQv7SU=", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "7.0.0-beta.53", + "@babel/helper-regex": "7.0.0-beta.53", + "regexpu-core": "^4.1.3" + } + }, + "@babel/template": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.0.0-beta.53.tgz", + "integrity": "sha1-MyIpCQDQsYewpxdDgeHzu3EFDS4=", + "dev": true, + "requires": { + "@babel/code-frame": "7.0.0-beta.53", + "@babel/parser": "7.0.0-beta.53", + "@babel/types": "7.0.0-beta.53", + "lodash": "^4.17.5" + } + }, + "@babel/traverse": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.0.0-beta.53.tgz", + "integrity": "sha1-ANMs2NC1j0wB0xFXvmIsZigm00Q=", + "dev": true, + "requires": { + "@babel/code-frame": "7.0.0-beta.53", + "@babel/generator": "7.0.0-beta.53", + "@babel/helper-function-name": "7.0.0-beta.53", + "@babel/helper-split-export-declaration": "7.0.0-beta.53", + "@babel/parser": "7.0.0-beta.53", + "@babel/types": "7.0.0-beta.53", + "debug": "^3.1.0", + "globals": "^11.1.0", + "invariant": "^2.2.0", + "lodash": "^4.17.5" + } + }, + "@babel/types": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.0.0-beta.53.tgz", + "integrity": "sha1-GaRhwNpRVZXftnQLS0Xce7Dms3U=", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.5", + "to-fast-properties": "^2.0.0" + } + }, + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "dev": true + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true + }, + "regenerator-transform": { + "version": "0.13.4", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.13.4.tgz", + "integrity": "sha512-T0QMBjK3J0MtxjPmdIMXm72Wvj2Abb0Bd4HADdfijwMdoIsyQZ6fWC7kDFhk2YinBBEMZDL7Y7wh0J1sGx3S4A==", + "dev": true, + "requires": { + "private": "^0.1.6" + } } } }, "@babel/preset-modules": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.3.tgz", - "integrity": "sha512-Ra3JXOHBq2xd56xSF7lMKXdjBn3T772Y1Wet3yWnkDly9zHvJki029tAFzvAAK5cf4YV3yoxuP61crYRol6SVg==", + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.4.tgz", + "integrity": "sha512-J36NhwnfdzpmH41M1DrnkkgAqhZaqr/NBdPfQ677mLzlaXo+oDiv1deyCDtgAhz8p328otdob0Du7+xgHGZbKg==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0", @@ -2654,27 +3452,27 @@ } }, "@babel/preset-typescript": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.10.1.tgz", - "integrity": "sha512-m6GV3y1ShiqxnyQj10600ZVOFrSSAa8HQ3qIUk2r+gcGtHTIRw0dJnFLt1WNXpKjtVw7yw1DAPU/6ma2ZvgJuA==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.12.1.tgz", + "integrity": "sha512-hNK/DhmoJPsksdHuI/RVrcEws7GN5eamhi28JkO52MqIxU8Z0QpmiSOQxZHWOHV7I3P4UjHV97ay4TcamMA6Kw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1", - "@babel/plugin-transform-typescript": "^7.10.1" + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-transform-typescript": "^7.12.1" }, "dependencies": { "@babel/helper-plugin-utils": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz", - "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true } } }, "@babel/runtime": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.10.2.tgz", - "integrity": "sha512-6sF3uQw2ivImfVIl62RZ7MXhO2tap69WeWK57vAaimT6AZbE4FbqjdEJIN1UqoD6wI6B+1n9UiagafH1sxjOtg==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.1.tgz", + "integrity": "sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA==", "dev": true, "requires": { "regenerator-runtime": "^0.13.4" @@ -2962,6 +3760,16 @@ "@types/yargs": "^13.0.0" } }, + "@nicolo-ribaudo/chokidar-2": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/chokidar-2/-/chokidar-2-2.1.8.tgz", + "integrity": "sha512-FohwULwAebCUKi/akMFyGi7jfc7JXTeMHzKxuP3umRd9mK/2Y7/SMBSI2jX+YLopPXi+PF9l307NmpfxTdCegA==", + "dev": true, + "optional": true, + "requires": { + "chokidar": "2.1.8" + } + }, "@peculiar/asn1-schema": { "version": "2.0.13", "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.0.13.tgz", @@ -3756,247 +4564,879 @@ "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", "dev": true, "requires": { - "safer-buffer": "~2.1.0" + "safer-buffer": "~2.1.0" + } + }, + "asn1.js": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", + "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", + "dev": true, + "requires": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", + "dev": true + } + } + }, + "asn1js": { + "version": "2.0.26", + "resolved": "https://registry.npmjs.org/asn1js/-/asn1js-2.0.26.tgz", + "integrity": "sha512-yG89F0j9B4B0MKIcFyWWxnpZPLaNTjCj4tkE3fjbAoo0qmpGw0PYYqSbX/4ebnd9Icn8ZgK4K1fvDyEtW1JYtQ==", + "dev": true, + "requires": { + "pvutils": "^1.0.17" + } + }, + "assert": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/assert/-/assert-1.5.0.tgz", + "integrity": "sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==", + "dev": true, + "requires": { + "object-assign": "^4.1.1", + "util": "0.10.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", + "dev": true + }, + "util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "dev": true, + "requires": { + "inherits": "2.0.1" + } + } + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" + }, + "astral-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "dev": true + }, + "async": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", + "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "requires": { + "lodash": "^4.17.14" + } + }, + "async-each": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", + "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==" + }, + "async-foreach": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/async-foreach/-/async-foreach-0.1.3.tgz", + "integrity": "sha1-NhIfhFwFeBct5Bmpfb6x0W7DRUI=", + "dev": true + }, + "async-limiter": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", + "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==" + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true + }, + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==" + }, + "autoprefixer": { + "version": "9.8.0", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.8.0.tgz", + "integrity": "sha512-D96ZiIHXbDmU02dBaemyAg53ez+6F5yZmapmgKcjm35yEe1uVDYI8hGW3VYoGRaG290ZFf91YxHrR518vC0u/A==", + "dev": true, + "requires": { + "browserslist": "^4.12.0", + "caniuse-lite": "^1.0.30001061", + "chalk": "^2.4.2", + "normalize-range": "^0.1.2", + "num2fraction": "^1.2.2", + "postcss": "^7.0.30", + "postcss-value-parser": "^4.1.0" + }, + "dependencies": { + "browserslist": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.12.0.tgz", + "integrity": "sha512-UH2GkcEDSI0k/lRkuDSzFl9ZZ87skSy9w2XAn1MsZnL+4c4rqbBd3e82UWHbYDpztABrPBhZsTEeuxVfHppqDg==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001043", + "electron-to-chromium": "^1.3.413", + "node-releases": "^1.1.53", + "pkg-up": "^2.0.0" + } + }, + "caniuse-lite": { + "version": "1.0.30001066", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001066.tgz", + "integrity": "sha512-Gfj/WAastBtfxLws0RCh2sDbTK/8rJuSeZMecrSkNGYxPcv7EzblmDGfWQCFEQcSqYE2BRgQiJh8HOD07N5hIw==", + "dev": true + }, + "electron-to-chromium": { + "version": "1.3.455", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.455.tgz", + "integrity": "sha512-4lwnxp+ArqOX9hiLwLpwhfqvwzUHFuDgLz4NTiU3lhygUzWtocIJ/5Vix+mWVNE2HQ9aI1k2ncGe5H/0OktMvA==", + "dev": true + }, + "postcss": { + "version": "7.0.31", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.31.tgz", + "integrity": "sha512-a937VDHE1ftkjk+8/7nj/mrjtmkn69xxzJgRETXdAUU+IgOYPQNJF17haGWbeDxSyk++HA14UA98FurvPyBJOA==", + "dev": true, + "requires": { + "chalk": "^2.4.2", + "source-map": "^0.6.1", + "supports-color": "^6.1.0" + } + }, + "postcss-value-parser": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz", + "integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true + }, + "aws4": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", + "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", + "dev": true + }, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "dev": true + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, + "babel-helper-call-delegate": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz", + "integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=", + "dev": true, + "requires": { + "babel-helper-hoist-variables": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helper-define-map": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz", + "integrity": "sha1-pfVtq0GiX5fstJjH66ypgZ+Vvl8=", + "dev": true, + "requires": { + "babel-helper-function-name": "^6.24.1", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "lodash": "^4.17.4" + } + }, + "babel-helper-function-name": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz", + "integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=", + "dev": true, + "requires": { + "babel-helper-get-function-arity": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helper-get-function-arity": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz", + "integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-helper-hoist-variables": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz", + "integrity": "sha1-HssnaJydJVE+rbyZFKc/VAi+enY=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-helper-optimise-call-expression": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz", + "integrity": "sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-helper-regex": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz", + "integrity": "sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "lodash": "^4.17.4" + } + }, + "babel-helper-replace-supers": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz", + "integrity": "sha1-v22/5Dk40XNpohPKiov3S2qQqxo=", + "dev": true, + "requires": { + "babel-helper-optimise-call-expression": "^6.24.1", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-jest": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-24.9.0.tgz", + "integrity": "sha512-ntuddfyiN+EhMw58PTNL1ph4C9rECiQXjI4nMMBKBaNjXvqLdkXpPRcMSr4iyBrJg/+wz9brFUD6RhOAT6r4Iw==", + "dev": true, + "requires": { + "@jest/transform": "^24.9.0", + "@jest/types": "^24.9.0", + "@types/babel__core": "^7.1.0", + "babel-plugin-istanbul": "^5.1.0", + "babel-preset-jest": "^24.9.0", + "chalk": "^2.4.2", + "slash": "^2.0.0" + } + }, + "babel-loader": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.1.0.tgz", + "integrity": "sha512-7q7nC1tYOrqvUrN3LQK4GwSk/TQorZSOlO9C+RZDZpODgyN4ZlCqE5q9cDsyWOliN+aU9B4JX01xK9eJXowJLw==", + "dev": true, + "requires": { + "find-cache-dir": "^2.1.0", + "loader-utils": "^1.4.0", + "mkdirp": "^0.5.3", + "pify": "^4.0.1", + "schema-utils": "^2.6.5" + }, + "dependencies": { + "emojis-list": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", + "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", + "dev": true + }, + "find-cache-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", + "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^2.0.0", + "pkg-dir": "^3.0.0" + } + }, + "loader-utils": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", + "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^1.0.1" + } + } + } + }, + "babel-messages": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", + "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-check-es2015-constants": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz", + "integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-dynamic-import-node": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", + "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==", + "dev": true, + "requires": { + "object.assign": "^4.1.0" + } + }, + "babel-plugin-istanbul": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-5.2.0.tgz", + "integrity": "sha512-5LphC0USA8t4i1zCtjbbNb6jJj/9+X6P37Qfirc/70EQ34xKlMW+a1RHGwxGI+SwWpNwZ27HqvzAobeqaXwiZw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "find-up": "^3.0.0", + "istanbul-lib-instrument": "^3.3.0", + "test-exclude": "^5.2.3" + } + }, + "babel-plugin-jest-hoist": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-24.9.0.tgz", + "integrity": "sha512-2EMA2P8Vp7lG0RAzr4HXqtYwacfMErOuv1U3wrvxHX6rD1sV6xS3WXG3r8TRQ2r6w8OhvSdWt+z41hQNwNm3Xw==", + "dev": true, + "requires": { + "@types/babel__traverse": "^7.0.6" + } + }, + "babel-plugin-transform-es2015-arrow-functions": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz", + "integrity": "sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-block-scoped-functions": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz", + "integrity": "sha1-u8UbSflk1wy42OC5ToICRs46YUE=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-block-scoping": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz", + "integrity": "sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "lodash": "^4.17.4" + } + }, + "babel-plugin-transform-es2015-classes": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz", + "integrity": "sha1-WkxYpQyclGHlZLSyo7+ryXolhNs=", + "dev": true, + "requires": { + "babel-helper-define-map": "^6.24.1", + "babel-helper-function-name": "^6.24.1", + "babel-helper-optimise-call-expression": "^6.24.1", + "babel-helper-replace-supers": "^6.24.1", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-computed-properties": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz", + "integrity": "sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-destructuring": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz", + "integrity": "sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-duplicate-keys": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz", + "integrity": "sha1-c+s9MQypaePvnskcU3QabxV2Qj4=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-for-of": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz", + "integrity": "sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-function-name": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz", + "integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=", + "dev": true, + "requires": { + "babel-helper-function-name": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-literals": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz", + "integrity": "sha1-T1SgLWzWbPkVKAAZox0xklN3yi4=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-modules-amd": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz", + "integrity": "sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ=", + "dev": true, + "requires": { + "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-modules-commonjs": { + "version": "6.26.2", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz", + "integrity": "sha512-CV9ROOHEdrjcwhIaJNBGMBCodN+1cfkwtM1SbUHmvyy35KGT7fohbpOxkE2uLz1o6odKK2Ck/tz47z+VqQfi9Q==", + "dev": true, + "requires": { + "babel-plugin-transform-strict-mode": "^6.24.1", + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-types": "^6.26.0" + } + }, + "babel-plugin-transform-es2015-modules-systemjs": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz", + "integrity": "sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM=", + "dev": true, + "requires": { + "babel-helper-hoist-variables": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" } }, - "asn1.js": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", - "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", + "babel-plugin-transform-es2015-modules-umd": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz", + "integrity": "sha1-rJl+YoXNGO1hdq22B9YCNErThGg=", "dev": true, "requires": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - }, - "dependencies": { - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", - "dev": true - } + "babel-plugin-transform-es2015-modules-amd": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" } }, - "asn1js": { - "version": "2.0.26", - "resolved": "https://registry.npmjs.org/asn1js/-/asn1js-2.0.26.tgz", - "integrity": "sha512-yG89F0j9B4B0MKIcFyWWxnpZPLaNTjCj4tkE3fjbAoo0qmpGw0PYYqSbX/4ebnd9Icn8ZgK4K1fvDyEtW1JYtQ==", + "babel-plugin-transform-es2015-object-super": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz", + "integrity": "sha1-JM72muIcuDp/hgPa0CH1cusnj40=", "dev": true, "requires": { - "pvutils": "^1.0.17" + "babel-helper-replace-supers": "^6.24.1", + "babel-runtime": "^6.22.0" } }, - "assert": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/assert/-/assert-1.5.0.tgz", - "integrity": "sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==", + "babel-plugin-transform-es2015-parameters": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz", + "integrity": "sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=", "dev": true, "requires": { - "object-assign": "^4.1.1", - "util": "0.10.3" - }, - "dependencies": { - "inherits": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", - "dev": true - }, - "util": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", - "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", - "dev": true, - "requires": { - "inherits": "2.0.1" - } - } + "babel-helper-call-delegate": "^6.24.1", + "babel-helper-get-function-arity": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" } }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true - }, - "assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" - }, - "astral-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", - "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", - "dev": true - }, - "async": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", - "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "babel-plugin-transform-es2015-shorthand-properties": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz", + "integrity": "sha1-JPh11nIch2YbvZmkYi5R8U3jiqA=", + "dev": true, "requires": { - "lodash": "^4.17.14" + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" } }, - "async-each": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", - "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==" - }, - "async-foreach": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/async-foreach/-/async-foreach-0.1.3.tgz", - "integrity": "sha1-NhIfhFwFeBct5Bmpfb6x0W7DRUI=", - "dev": true + "babel-plugin-transform-es2015-spread": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz", + "integrity": "sha1-1taKmfia7cRTbIGlQujdnxdG+NE=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } }, - "async-limiter": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", - "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==" + "babel-plugin-transform-es2015-sticky-regex": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz", + "integrity": "sha1-AMHNsaynERLN8M9hJsLta0V8zbw=", + "dev": true, + "requires": { + "babel-helper-regex": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true + "babel-plugin-transform-es2015-template-literals": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz", + "integrity": "sha1-qEs0UPfp+PH2g51taH2oS7EjbY0=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } }, - "atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==" + "babel-plugin-transform-es2015-typeof-symbol": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz", + "integrity": "sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } }, - "autoprefixer": { - "version": "9.8.0", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.8.0.tgz", - "integrity": "sha512-D96ZiIHXbDmU02dBaemyAg53ez+6F5yZmapmgKcjm35yEe1uVDYI8hGW3VYoGRaG290ZFf91YxHrR518vC0u/A==", + "babel-plugin-transform-es2015-unicode-regex": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz", + "integrity": "sha1-04sS9C6nMj9yk4fxinxa4frrNek=", "dev": true, "requires": { - "browserslist": "^4.12.0", - "caniuse-lite": "^1.0.30001061", - "chalk": "^2.4.2", - "normalize-range": "^0.1.2", - "num2fraction": "^1.2.2", - "postcss": "^7.0.30", - "postcss-value-parser": "^4.1.0" + "babel-helper-regex": "^6.24.1", + "babel-runtime": "^6.22.0", + "regexpu-core": "^2.0.0" }, "dependencies": { - "browserslist": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.12.0.tgz", - "integrity": "sha512-UH2GkcEDSI0k/lRkuDSzFl9ZZ87skSy9w2XAn1MsZnL+4c4rqbBd3e82UWHbYDpztABrPBhZsTEeuxVfHppqDg==", + "jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "dev": true + }, + "regexpu-core": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz", + "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001043", - "electron-to-chromium": "^1.3.413", - "node-releases": "^1.1.53", - "pkg-up": "^2.0.0" + "regenerate": "^1.2.1", + "regjsgen": "^0.2.0", + "regjsparser": "^0.1.4" } }, - "caniuse-lite": { - "version": "1.0.30001066", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001066.tgz", - "integrity": "sha512-Gfj/WAastBtfxLws0RCh2sDbTK/8rJuSeZMecrSkNGYxPcv7EzblmDGfWQCFEQcSqYE2BRgQiJh8HOD07N5hIw==", - "dev": true - }, - "electron-to-chromium": { - "version": "1.3.455", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.455.tgz", - "integrity": "sha512-4lwnxp+ArqOX9hiLwLpwhfqvwzUHFuDgLz4NTiU3lhygUzWtocIJ/5Vix+mWVNE2HQ9aI1k2ncGe5H/0OktMvA==", + "regjsgen": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", + "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=", "dev": true }, - "postcss": { - "version": "7.0.31", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.31.tgz", - "integrity": "sha512-a937VDHE1ftkjk+8/7nj/mrjtmkn69xxzJgRETXdAUU+IgOYPQNJF17haGWbeDxSyk++HA14UA98FurvPyBJOA==", + "regjsparser": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", + "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", "dev": true, "requires": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" + "jsesc": "~0.5.0" } - }, - "postcss-value-parser": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz", - "integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true } } }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", - "dev": true + "babel-plugin-transform-regenerator": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz", + "integrity": "sha1-4HA2lvveJ/Cj78rPi03KL3s6jy8=", + "dev": true, + "requires": { + "regenerator-transform": "^0.10.0" + }, + "dependencies": { + "regenerator-transform": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.10.1.tgz", + "integrity": "sha512-PJepbvDbuK1xgIgnau7Y90cwaAmO/LCLMI2mPvaXq2heGMR3aWW5/BQvYrhJ8jgmQjXewXvBjzfqKcVOmhjZ6Q==", + "dev": true, + "requires": { + "babel-runtime": "^6.18.0", + "babel-types": "^6.19.0", + "private": "^0.1.6" + } + } + } }, - "aws4": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", - "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", - "dev": true + "babel-plugin-transform-strict-mode": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz", + "integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-preset-es2015": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz", + "integrity": "sha1-1EBQ1rwsn+6nAqrzjXJ6AhBTiTk=", + "dev": true, + "requires": { + "babel-plugin-check-es2015-constants": "^6.22.0", + "babel-plugin-transform-es2015-arrow-functions": "^6.22.0", + "babel-plugin-transform-es2015-block-scoped-functions": "^6.22.0", + "babel-plugin-transform-es2015-block-scoping": "^6.24.1", + "babel-plugin-transform-es2015-classes": "^6.24.1", + "babel-plugin-transform-es2015-computed-properties": "^6.24.1", + "babel-plugin-transform-es2015-destructuring": "^6.22.0", + "babel-plugin-transform-es2015-duplicate-keys": "^6.24.1", + "babel-plugin-transform-es2015-for-of": "^6.22.0", + "babel-plugin-transform-es2015-function-name": "^6.24.1", + "babel-plugin-transform-es2015-literals": "^6.22.0", + "babel-plugin-transform-es2015-modules-amd": "^6.24.1", + "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", + "babel-plugin-transform-es2015-modules-systemjs": "^6.24.1", + "babel-plugin-transform-es2015-modules-umd": "^6.24.1", + "babel-plugin-transform-es2015-object-super": "^6.24.1", + "babel-plugin-transform-es2015-parameters": "^6.24.1", + "babel-plugin-transform-es2015-shorthand-properties": "^6.24.1", + "babel-plugin-transform-es2015-spread": "^6.22.0", + "babel-plugin-transform-es2015-sticky-regex": "^6.24.1", + "babel-plugin-transform-es2015-template-literals": "^6.22.0", + "babel-plugin-transform-es2015-typeof-symbol": "^6.22.0", + "babel-plugin-transform-es2015-unicode-regex": "^6.24.1", + "babel-plugin-transform-regenerator": "^6.24.1" + } }, - "babel-jest": { + "babel-preset-jest": { "version": "24.9.0", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-24.9.0.tgz", - "integrity": "sha512-ntuddfyiN+EhMw58PTNL1ph4C9rECiQXjI4nMMBKBaNjXvqLdkXpPRcMSr4iyBrJg/+wz9brFUD6RhOAT6r4Iw==", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-24.9.0.tgz", + "integrity": "sha512-izTUuhE4TMfTRPF92fFwD2QfdXaZW08qvWTFCI51V8rW5x00UuPgc3ajRoWofXOuxjfcOM5zzSYsQS3H8KGCAg==", "dev": true, "requires": { - "@jest/transform": "^24.9.0", - "@jest/types": "^24.9.0", - "@types/babel__core": "^7.1.0", - "babel-plugin-istanbul": "^5.1.0", - "babel-preset-jest": "^24.9.0", - "chalk": "^2.4.2", - "slash": "^2.0.0" + "@babel/plugin-syntax-object-rest-spread": "^7.0.0", + "babel-plugin-jest-hoist": "^24.9.0" } }, - "babel-plugin-dynamic-import-node": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", - "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==", + "babel-runtime": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "object.assign": "^4.1.0" + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" + }, + "dependencies": { + "core-js": { + "version": "2.6.11", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.11.tgz", + "integrity": "sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg==", + "dev": true + }, + "regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", + "dev": true + } } }, - "babel-plugin-istanbul": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-5.2.0.tgz", - "integrity": "sha512-5LphC0USA8t4i1zCtjbbNb6jJj/9+X6P37Qfirc/70EQ34xKlMW+a1RHGwxGI+SwWpNwZ27HqvzAobeqaXwiZw==", + "babel-template": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", + "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "find-up": "^3.0.0", - "istanbul-lib-instrument": "^3.3.0", - "test-exclude": "^5.2.3" + "babel-runtime": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "lodash": "^4.17.4" } }, - "babel-plugin-jest-hoist": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-24.9.0.tgz", - "integrity": "sha512-2EMA2P8Vp7lG0RAzr4HXqtYwacfMErOuv1U3wrvxHX6rD1sV6xS3WXG3r8TRQ2r6w8OhvSdWt+z41hQNwNm3Xw==", + "babel-traverse": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", + "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", "dev": true, "requires": { - "@types/babel__traverse": "^7.0.6" + "babel-code-frame": "^6.26.0", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "debug": "^2.6.8", + "globals": "^9.18.0", + "invariant": "^2.2.2", + "lodash": "^4.17.4" + }, + "dependencies": { + "globals": { + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", + "dev": true + } } }, - "babel-preset-jest": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-24.9.0.tgz", - "integrity": "sha512-izTUuhE4TMfTRPF92fFwD2QfdXaZW08qvWTFCI51V8rW5x00UuPgc3ajRoWofXOuxjfcOM5zzSYsQS3H8KGCAg==", + "babel-types": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", + "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", "dev": true, "requires": { - "@babel/plugin-syntax-object-rest-spread": "^7.0.0", - "babel-plugin-jest-hoist": "^24.9.0" + "babel-runtime": "^6.26.0", + "esutils": "^2.0.2", + "lodash": "^4.17.4", + "to-fast-properties": "^1.0.3" + }, + "dependencies": { + "to-fast-properties": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", + "dev": true + } } }, + "babylon": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", + "dev": true + }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -5119,6 +6559,12 @@ "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" }, + "core-js": { + "version": "3.6.5", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.5.tgz", + "integrity": "sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA==", + "dev": true + }, "core-js-compat": { "version": "3.6.5", "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.6.5.tgz", @@ -6089,6 +7535,12 @@ "ext": "^1.1.2" } }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true + }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -6711,6 +8163,12 @@ "minipass": "^3.0.0" } }, + "fs-readdir-recursive": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz", + "integrity": "sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==", + "dev": true + }, "fs-write-stream-atomic": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", @@ -7292,9 +8750,9 @@ } }, "gensync": { - "version": "1.0.0-beta.1", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.1.tgz", - "integrity": "sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg==", + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", "dev": true }, "get-caller-file": { @@ -9114,15 +10572,6 @@ "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", "dev": true }, - "levenary": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/levenary/-/levenary-1.1.1.tgz", - "integrity": "sha512-mkAdOIt79FD6irqjYSs4rdbnlT5vRonMEvBVPVb3XmevfS8kgRXwfes0dhPdEtzTWD/1eNE/Bm/G1iRt6DcnQQ==", - "dev": true, - "requires": { - "leven": "^3.1.0" - } - }, "levn": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", @@ -15489,19 +16938,18 @@ } }, "regenerator-runtime": { - "version": "0.13.5", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz", - "integrity": "sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA==", + "version": "0.13.7", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz", + "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==", "dev": true }, "regenerator-transform": { - "version": "0.14.4", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.4.tgz", - "integrity": "sha512-EaJaKPBI9GvKpvUz2mz4fhx7WPgvwRLY9v3hlNHWmAuJHI13T4nwKnNvm5RWJzEdnI5g5UwtOww+S8IdoUC2bw==", + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.5.tgz", + "integrity": "sha512-eOf6vka5IO151Jfsw2NO9WpGX58W6wWmefK3I1zEGr0lOD0u8rwPaNqQL1aRxUaxLeKO3ArNh3VYg1KbaD+FFw==", "dev": true, "requires": { - "@babel/runtime": "^7.8.4", - "private": "^0.1.8" + "@babel/runtime": "^7.8.4" } }, "regex-not": { @@ -17272,6 +18720,12 @@ "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", "dev": true }, + "trim-right": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", + "dev": true + }, "true-case-path": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/true-case-path/-/true-case-path-1.0.3.tgz", @@ -17447,9 +18901,9 @@ "dev": true }, "typescript": { - "version": "3.9.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.3.tgz", - "integrity": "sha512-D/wqnB2xzNFIcoBG9FG8cXRDjiqSTbG2wd8DMZeQyJlP1vfTkIxH4GKveWaEBYySKIg+USu+E+EDIR47SqnaMQ==", + "version": "3.9.7", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.7.tgz", + "integrity": "sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==", "dev": true }, "uglify-js": { diff --git a/package.json b/package.json index 23f392d4..d25e119d 100644 --- a/package.json +++ b/package.json @@ -22,9 +22,14 @@ "webpack-dev-server": "^3.11.0" }, "devDependencies": { - "@babel/core": "^7.10.2", - "@babel/preset-env": "^7.10.2", - "@babel/preset-typescript": "^7.10.1", + "@babel/cli": "^7.12.1", + "@babel/core": "^7.12.3", + "@babel/plugin-proposal-class-properties": "^7.12.1", + "@babel/plugin-transform-typescript": "^7.12.1", + "@babel/polyfill": "^7.12.1", + "@babel/preset-env": "^7.12.1", + "@babel/preset-es2015": "^7.0.0-beta.53", + "@babel/preset-typescript": "^7.12.1", "@cryptography/aes": "^0.1.1", "@cryptography/sha1": "^0.1.0", "@cryptography/sha256": "^0.2.0", @@ -36,8 +41,11 @@ "aes-js": "^3.1.2", "autoprefixer": "^9.8.0", "babel-jest": "^24.9.0", + "babel-loader": "^8.1.0", + "babel-preset-es2015": "^6.24.1", "compression": "^1.7.4", "compression-webpack-plugin": "^3.1.0", + "core-js": "^3.6.5", "css-loader": "^3.5.3", "express": "^4.17.1", "fast-png": "^5.0.2", @@ -65,7 +73,7 @@ "terser-webpack-plugin": "^3.0.2", "ts-jest": "^24.3.0", "ts-loader": "^6.2.2", - "typescript": "^3.9.3", + "typescript": "^3.9.7", "url-loader": "^2.3.0", "webpack": "^4.43.0", "webpack-cli": "^3.3.11", diff --git a/src/components/appSearchSuper..ts b/src/components/appSearchSuper..ts index b22780e1..9812a916 100644 --- a/src/components/appSearchSuper..ts +++ b/src/components/appSearchSuper..ts @@ -337,7 +337,9 @@ export default class AppSearchSuper { appDialogsManager.setLastMessage(dialog, message, dom, this.searchContext.query); } - searchGroup.setActive(); + if(searchGroup.list.childElementCount) { + searchGroup.setActive(); + } break; } @@ -608,9 +610,9 @@ export default class AppSearchSuper { }); } - if(type !== 'inputMessagesFilterEmpty') { - this.afterPerforming(messages.length, sharedMediaDiv); - } + //if(type !== 'inputMessagesFilterEmpty') { + this.afterPerforming(type === 'inputMessagesFilterEmpty' ? 1 : messages.length, sharedMediaDiv); + //} } private afterPerforming(length: number, tab: HTMLElement) { diff --git a/src/components/chat/chat.ts b/src/components/chat/chat.ts index 66da3af9..58d7b706 100644 --- a/src/components/chat/chat.ts +++ b/src/components/chat/chat.ts @@ -72,7 +72,7 @@ export default class Chat extends EventListenerBase<{ } } - private init() { + public init() { this.topbar = new ChatTopbar(this, appSidebarRight, this.appMessagesManager, this.appPeersManager, this.appChatsManager); this.bubbles = new ChatBubbles(this, this.appMessagesManager, this.appStickersManager, this.appUsersManager, this.appInlineBotsManager, this.appPhotosManager, this.appDocsManager, this.appPeersManager, this.appChatsManager); this.input = new ChatInput(this, this.appMessagesManager, this.appDocsManager, this.appChatsManager, this.appPeersManager, this.appWebPagesManager, this.appImManager); diff --git a/src/components/chat/input.ts b/src/components/chat/input.ts index 1aa2052f..0f2d6bfa 100644 --- a/src/components/chat/input.ts +++ b/src/components/chat/input.ts @@ -811,7 +811,7 @@ export default class ChatInput { //this.chat.log('messageInput entities', richValue, value, markdownEntities); - if(this.stickersHelper) { + if(this.stickersHelper && (this.chat.peerId > 0 || this.appChatsManager.hasRights(this.chat.peerId, 'send', 'send_stickers'))) { let emoticon = ''; if(entities.length && entities[0]._ == 'messageEntityEmoji') { const entity = entities[0]; diff --git a/src/lib/appManagers/appImManager.ts b/src/lib/appManagers/appImManager.ts index b9e0542b..01c242f4 100644 --- a/src/lib/appManagers/appImManager.ts +++ b/src/lib/appManagers/appImManager.ts @@ -543,7 +543,10 @@ export class AppImManager { return this.setPeer(peerId, lastMsgId); } - this.createNewChat(); + const chat = this.chat; + if(!chat.init) { // * use first not inited chat + this.createNewChat(); + } if(type) { this.chat.setType(type); diff --git a/src/lib/appManagers/appMessagesManager.ts b/src/lib/appManagers/appMessagesManager.ts index 58b14f5e..fb3b4825 100644 --- a/src/lib/appManagers/appMessagesManager.ts +++ b/src/lib/appManagers/appMessagesManager.ts @@ -602,7 +602,7 @@ export class AppMessagesManager { this.pendingAfterMsgs[peerId] = sentRequestOptions; } - this.beforeMessageSending(message, {isScheduled: !!options.scheduleDate || undefined}); + this.beforeMessageSending(message, {isScheduled: !!options.scheduleDate || undefined, threadId: options.threadId}); } public sendFile(peerId: number, file: File | Blob | MyDocument, options: Partial<{ @@ -952,7 +952,7 @@ export class AppMessagesManager { return sentDeferred; }; - this.beforeMessageSending(message, {isGroupedItem: options.isGroupedItem, isScheduled: !!options.scheduleDate || undefined}); + this.beforeMessageSending(message, {isGroupedItem: options.isGroupedItem, isScheduled: !!options.scheduleDate || undefined, threadId: options.threadId}); if(!options.isGroupedItem) { sentDeferred.then(inputMedia => { @@ -1327,7 +1327,7 @@ export class AppMessagesManager { this.pendingAfterMsgs[peerId] = sentRequestOptions; } - this.beforeMessageSending(message, {isScheduled: !!options.scheduleDate || undefined}); + this.beforeMessageSending(message, {isScheduled: !!options.scheduleDate || undefined, threadId: options.threadId}); } /* private checkSendOptions(options: Partial<{ @@ -1341,7 +1341,7 @@ export class AppMessagesManager { } } */ - private beforeMessageSending(message: any, options: Partial<{isGroupedItem: true, isScheduled: true}> = {}) { + private beforeMessageSending(message: any, options: Partial<{isGroupedItem: true, isScheduled: true, threadId: number}> = {}) { const messageId = message.id; const peerId = this.getMessagePeer(message); const storage = options.isScheduled ? this.getScheduledMessagesStorage(peerId) : this.getMessagesStorage(peerId); @@ -1352,8 +1352,16 @@ export class AppMessagesManager { rootScope.broadcast('scheduled_new', {peerId, mid: messageId}); } } else { - const historyStorage = this.getHistoryStorage(peerId); - historyStorage.history.unshift(messageId); + if(options.threadId && this.threadsStorage[peerId]) { + delete this.threadsStorage[peerId][options.threadId]; + } + //if(options.threadId) { + const historyStorage = this.getHistoryStorage(peerId/* , options.threadId */); + historyStorage.history.unshift(messageId); + //} + + /* const historyStorage = this.getHistoryStorage(peerId); + historyStorage.history.unshift(messageId); */ if(!options.isGroupedItem) { this.saveMessages([message], {storage, isOutgoing: true}); diff --git a/src/lib/mtproto/mtproto_config.ts b/src/lib/mtproto/mtproto_config.ts index 92b419c4..74bab45b 100644 --- a/src/lib/mtproto/mtproto_config.ts +++ b/src/lib/mtproto/mtproto_config.ts @@ -5,7 +5,7 @@ export const REPLIES_PEER_ID = 1271266957; export const App = { id: 1025907, hash: '452b0359b988148995f22ff0f4229750', - version: '0.3.2', + version: '0.4.0', domains: [] as string[], baseDcId: 2 }; diff --git a/src/scss/partials/_audio.scss b/src/scss/partials/_audio.scss index aa51c333..e7835c1e 100644 --- a/src/scss/partials/_audio.scss +++ b/src/scss/partials/_audio.scss @@ -341,7 +341,11 @@ &-waveform { height: 23px; - margin-top: -4px; + margin-top: -3px; + + @include respond-to(handhelds) { + margin-top: -4px; + } //overflow: visible!important; @@ -418,7 +422,10 @@ .audio-time { line-height: 1; margin-left: -1px; - margin-top: 2px; + margin-top: 7px; + @include respond-to(handhelds) { + margin-top: 2px; + } } &.is-unread { diff --git a/src/scss/partials/_chatBubble.scss b/src/scss/partials/_chatBubble.scss index ee6f5e56..59d62e9f 100644 --- a/src/scss/partials/_chatBubble.scss +++ b/src/scss/partials/_chatBubble.scss @@ -416,6 +416,10 @@ $bubble-margin: .25rem; .document { height: 3.375rem; + + @include respond-to(handhelds) { + padding-left: 44px; + } } } @@ -938,6 +942,7 @@ $bubble-margin: .25rem; .message.audio-message, .message.voice-message { padding: 8px !important; + //padding: 4px 6px 4px 8px !important; } .message.contact-message { diff --git a/src/scss/partials/_chatlist.scss b/src/scss/partials/_chatlist.scss index 5ff961f6..6604f739 100644 --- a/src/scss/partials/_chatlist.scss +++ b/src/scss/partials/_chatlist.scss @@ -284,7 +284,7 @@ width: 100%; //border-bottom: 1px solid #DADCE0; padding: 1rem 0 .5rem; - margin-bottom: .5rem; + margin-bottom: 17px; @include respond-to(handhelds) { margin-bottom: 0; @@ -298,31 +298,49 @@ user-select: none; @include respond-to(handhelds) { - padding: 0 9px 0 16px; + padding: 5px 9px 0 16px; font-size: 15px; } } &-contacts { - padding: 16px 0 7px; + border-bottom: 1px solid #dadce0; @include respond-to(handhelds) { - padding: 7px 0 0px; + padding: 0px 0 2px; } - .search-group__name { - padding-bottom: 17px; + // .search-group__name { + // padding-bottom: 17px; - @include respond-to(handhelds) { - padding-bottom: 0; - } - } + // @include respond-to(handhelds) { + // padding-bottom: 0; + // } + // } + } + + &-people.search-group-contacts { + padding: 5px 0 5px !important; } &:last-child { border-bottom: none; } } + + .search-super { + .search-group { + margin-bottom: 0px; + padding: 4px 0 0; + + &__name { + padding-top: 1rem; + display: flex; + justify-content: space-between; + } + } + } + } // use together like class="chatlist-container contacts-container" diff --git a/src/scss/partials/_document.scss b/src/scss/partials/_document.scss index 1a819160..c0f9d1c4 100644 --- a/src/scss/partials/_document.scss +++ b/src/scss/partials/_document.scss @@ -1,5 +1,5 @@ .document { - padding-left: 4.5rem; + padding-left: 4.25rem; height: 70px; &-ico { diff --git a/src/scss/partials/_leftSidebar.scss b/src/scss/partials/_leftSidebar.scss index a236c3f6..9effa4b0 100644 --- a/src/scss/partials/_leftSidebar.scss +++ b/src/scss/partials/_leftSidebar.scss @@ -142,6 +142,34 @@ .search-helper { display: flex; + margin-left: 28px; + + @include respond-to(handhelds) { + margin-left: 20px; + } + + .selector-user { + margin-top: 7px; + font-size: 14px; + + &:hover { + background-color: rgba(80, 162, 233, .2); + } + + &-avatar:after { + display: none !important; + } + } + } + + .search-super-tabs-scrollable { + position: sticky; + top: 0; + z-index: 2; + + .menu-horizontal ul { + justify-content: space-around; + } } } diff --git a/src/scss/partials/_rightSidebar.scss b/src/scss/partials/_rightSidebar.scss index f18184d2..bf1992f0 100644 --- a/src/scss/partials/_rightSidebar.scss +++ b/src/scss/partials/_rightSidebar.scss @@ -249,6 +249,23 @@ display: flex; flex-direction: column; + .search-group__show-more { + color: $color-blue; + cursor: pointer; + font-weight: 400; + } + + .search-super-month-name { + border-top: 1px solid #dadce0; + padding: 24px 0px 0px 24px; + font-weight: 500; + color: #707579; + + @include respond-to(handhelds) { + padding: 18px 0px 0px 16px; + } + } + &.sliding { max-height: 100%; } @@ -268,6 +285,8 @@ } &-tabs-scrollable { + box-shadow: none !important; + .scrollable { position: relative; } @@ -322,6 +341,11 @@ } &-content-media { + .search-super-month-name { + border: none; + padding: 9px 0px 7px 24px; + } + .video-time { position: absolute; left: 5px; @@ -333,6 +357,7 @@ z-index: 1; font-size: 12px; color: white; + line-height: 18px; } .grid-item { @@ -375,17 +400,25 @@ } &-content-files { - padding: 7px 20px; + // padding: 8px 20px; + .search-super-month-items { + padding: 8px 24px 16px 20px; + + @include respond-to(handhelds) { + padding: 8px 16px 8px 12px; + } + } .document { - padding-left: 4rem; - padding-right: 1rem; + padding-left: 60px; + // padding-right: 1rem; //height: 54px; - height: calc(50px + 1.5rem); + height: calc(48px + 1.5rem); &-ico, &-download { width: 48px; height: 48px; + border-radius: 5px !important; } /* & + .document { @@ -404,7 +437,7 @@ } &-content-links { - padding: 0 30px 15px 15px; + // padding: 0 24px 15px 15px; .search-super-item { display: flex; @@ -446,46 +479,65 @@ white-space: nowrap; text-overflow: ellipsis; overflow: hidden; + font-size: 14px; + margin-top: -1px; } } .title { font-size: 16px; - margin-top: 3px; + margin-top: 2px; } .subtitle { font-size: 14px; + max-width: 310px; + + &.sender { + margin-top: 2px; } } - &-content-music, &-content-voice { - padding: 20px 15px 15px 20px; + .search-super-month-items { + padding: 0 24px 15px 15px; + + @include respond-to(handhelds) { + padding: 0 16px 15px 7px; + } + } + +} + +&-content-music, &-content-voice { + + .search-super-month-items { + padding: 20px 15px 0px 20px; + + @include respond-to(handhelds) { + padding: 20px 15px 0px 12px; + } + } .preloader-container { .preloader-circular { background-color: rgba(0, 0, 0, .35); } - @include respond-to(handhelds) { - width: 36px; - height: 36px; - } - - @include respond-to(not-handhelds) { - width: 38px; - height: 38px; - } + width: 36px !important; + height: 36px !important; } .audio { padding-left: 61px; /* min-height: 58px; */ - max-width: 368px; justify-content: unset; height: 48px; margin-bottom: 1.5rem; + @include respond-to(not-handhelds) { + max-width: 377px; + } + &.audio-show-progress .audio-subtitle { overflow: visible; } @@ -500,14 +552,14 @@ } .part { - height: 112px; - width: 112px; + height: 112px !important; + width: 112px !important; position: absolute; background-color: white; @include respond-to(handhelds) { - width: 100px; - height: 100px; + width: 100px !important; + height: 100px !important; } } } @@ -528,7 +580,10 @@ .sent-time { flex: 0 0 auto; - margin-left: .5rem; + margin-left: 8px; + margin-top: 3px; + font-size: 12px; + color: #707579; } .search-group.is-short { diff --git a/src/scss/style.scss b/src/scss/style.scss index e7a59529..79a1b071 100644 --- a/src/scss/style.scss +++ b/src/scss/style.scss @@ -1078,6 +1078,10 @@ middle-ellipsis-element { min-width: 1.25rem; line-height: 1.25rem !important; padding: 0 5.75px; + + html.is-safari & { + line-height: 22px !important; + } } &-24 { diff --git a/stats.json b/stats.json deleted file mode 100644 index daedf716..00000000 --- a/stats.json +++ /dev/null @@ -1,44163 +0,0 @@ -{ - "errors": [], - "warnings": [ - "asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).\nThis can impact web performance.\nAssets: \n b601bf8645daa9db7023.worker.js (351 KiB)\n main.bundle.js (618 KiB)", - "entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.\nEntrypoints:\n main (778 KiB)\n npm.jsbn.chunk.js\n main.css\n main.bundle.js\n", - "webpack performance recommendations: \nYou can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application.\nFor more info visit https://webpack.js.org/guides/code-splitting/" - ], - "version": "4.43.0", - "hash": "0241c8dca89caf39c10f", - "time": 28746, - "builtAt": 1600801457079, - "publicPath": "", - "outputPath": "F:\\tweb\\public", - "assetsByChunkName": { - "main": [ - "main.css", - "main.bundle.js" - ], - "npm.jsbn": "npm.jsbn.chunk.js" - }, - "assets": [ - { - "name": "608dbdcf64455bd4cc24.worker.js", - "size": 123301, - "chunks": [], - "chunkNames": [], - "info": { - "immutable": true - }, - "emitted": true - }, - { - "name": "608dbdcf64455bd4cc24.worker.js.gz", - "size": 42353, - "chunks": [], - "chunkNames": [], - "info": {}, - "emitted": true - }, - { - "name": "b601bf8645daa9db7023.worker.js", - "size": 359740, - "chunks": [], - "chunkNames": [], - "info": { - "immutable": true - }, - "emitted": true, - "isOverSizeLimit": true - }, - { - "name": "b601bf8645daa9db7023.worker.js.gz", - "size": 84713, - "chunks": [], - "chunkNames": [], - "info": {}, - "emitted": true - }, - { - "name": "index.html", - "size": 27470, - "chunks": [], - "chunkNames": [], - "info": {}, - "emitted": true - }, - { - "name": "index.html.gz", - "size": 6459, - "chunks": [], - "chunkNames": [], - "info": {}, - "emitted": true - }, - { - "name": "main.bundle.js", - "size": 632358, - "chunks": [ - 0 - ], - "chunkNames": [ - "main" - ], - "info": {}, - "emitted": true, - "isOverSizeLimit": true - }, - { - "name": "main.bundle.js.gz", - "size": 171186, - "chunks": [], - "chunkNames": [], - "info": {}, - "emitted": true - }, - { - "name": "main.css", - "size": 145267, - "chunks": [ - 0 - ], - "chunkNames": [ - "main" - ], - "info": {}, - "emitted": true - }, - { - "name": "main.css.gz", - "size": 26725, - "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": "sw.js", - "size": 6083, - "chunks": [], - "chunkNames": [], - "info": {}, - "emitted": true - } - ], - "filteredAssets": 0, - "entrypoints": { - "main": { - "chunks": [ - 1, - 0 - ], - "assets": [ - "npm.jsbn.chunk.js", - "main.css", - "main.bundle.js" - ], - "children": {}, - "childAssets": {}, - "isOverSizeLimit": true - } - }, - "namedChunkGroups": { - "main": { - "chunks": [ - 1, - 0 - ], - "assets": [ - "npm.jsbn.chunk.js", - "main.css", - "main.bundle.js" - ], - "children": {}, - "childAssets": {}, - "isOverSizeLimit": true - } - }, - "chunks": [ - { - "id": 0, - "rendered": true, - "initial": true, - "entry": true, - "size": 1537482, - "names": [ - "main" - ], - "files": [ - "main.css", - "main.bundle.js" - ], - "hash": "90c96b45449d9d00a0d7", - "siblings": [ - 1 - ], - "parents": [], - "children": [], - "childrenByOrder": {}, - "modules": [ - { - "id": 0, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\utils.ts", - "name": "./src/lib/utils.ts", - "index": 10, - "index2": 8, - "size": 15771, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "issuerId": 67, - "issuerName": "./src/index.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - } - ], - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 2, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts", - "module": "./src/lib/mtproto/mtprotoworker.ts", - "moduleName": "./src/lib/mtproto/mtprotoworker.ts", - "type": "cjs require", - "userRequest": "../utils", - "loc": "6:16-35" - }, - { - "moduleId": 3, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\richtextprocessor.ts", - "module": "./src/lib/richtextprocessor.ts", - "moduleName": "./src/lib/richtextprocessor.ts", - "type": "cjs require", - "userRequest": "./utils", - "loc": "7:16-34" - }, - { - "moduleId": 5, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appUsersManager.ts", - "module": "./src/lib/appManagers/appUsersManager.ts", - "moduleName": "./src/lib/appManagers/appUsersManager.ts", - "type": "cjs require", - "userRequest": "../utils", - "loc": "16:16-35" - }, - { - "moduleId": 7, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "module": "./src/lib/appManagers/appMessagesManager.ts", - "moduleName": "./src/lib/appManagers/appMessagesManager.ts", - "type": "cjs require", - "userRequest": "../utils", - "loc": "16:16-35" - }, - { - "moduleId": 8, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appPeersManager.ts", - "module": "./src/lib/appManagers/appPeersManager.ts", - "moduleName": "./src/lib/appManagers/appPeersManager.ts", - "type": "cjs require", - "userRequest": "../utils", - "loc": "9:16-35" - }, - { - "moduleId": 9, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appChatsManager.ts", - "module": "./src/lib/appManagers/appChatsManager.ts", - "moduleName": "./src/lib/appManagers/appChatsManager.ts", - "type": "cjs require", - "userRequest": "../utils", - "loc": "16:16-35" - }, - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "../utils", - "loc": "9:16-35" - }, - { - "moduleId": 12, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDocsManager.ts", - "module": "./src/lib/appManagers/appDocsManager.ts", - "moduleName": "./src/lib/appManagers/appDocsManager.ts", - "type": "cjs require", - "userRequest": "../utils", - "loc": "16:16-35" - }, - { - "moduleId": 13, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appPhotosManager.ts", - "module": "./src/lib/appManagers/appPhotosManager.ts", - "moduleName": "./src/lib/appManagers/appPhotosManager.ts", - "type": "cjs require", - "userRequest": "../utils", - "loc": "7:16-35" - }, - { - "moduleId": 14, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "module": "./src/lib/appManagers/appSidebarLeft.ts", - "moduleName": "./src/lib/appManagers/appSidebarLeft.ts", - "type": "cjs require", - "userRequest": "../utils", - "loc": "28:16-35" - }, - { - "moduleId": 15, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\animationIntersector.ts", - "module": "./src/components/animationIntersector.ts", - "moduleName": "./src/components/animationIntersector.ts", - "type": "cjs require", - "userRequest": "../lib/utils", - "loc": "4:16-39" - }, - { - "moduleId": 16, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts", - "module": "./src/lib/appManagers/appDialogsManager.ts", - "moduleName": "./src/lib/appManagers/appDialogsManager.ts", - "type": "cjs require", - "userRequest": "../utils", - "loc": "16:16-35" - }, - { - "moduleId": 18, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "module": "./src/components/wrappers.ts", - "moduleName": "./src/components/wrappers.ts", - "type": "cjs require", - "userRequest": "../lib/utils", - "loc": "19:16-39" - }, - { - "moduleId": 20, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\lottieLoader.ts", - "module": "./src/lib/lottieLoader.ts", - "moduleName": "./src/lib/lottieLoader.ts", - "type": "cjs require", - "userRequest": "./utils", - "loc": "20:16-34" - }, - { - "moduleId": 24, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", - "type": "cjs require", - "userRequest": "../utils", - "loc": "38:16-35" - }, - { - "moduleId": 26, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\horizontalMenu.ts", - "module": "./src/components/horizontalMenu.ts", - "moduleName": "./src/components/horizontalMenu.ts", - "type": "cjs require", - "userRequest": "../lib/utils", - "loc": "4:16-39" - }, - { - "moduleId": 27, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appProfileManager.ts", - "module": "./src/lib/appManagers/appProfileManager.ts", - "moduleName": "./src/lib/appManagers/appProfileManager.ts", - "type": "cjs require", - "userRequest": "../utils", - "loc": "16:16-35" - }, - { - "moduleId": 28, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDownloadManager.ts", - "module": "./src/lib/appManagers/appDownloadManager.ts", - "moduleName": "./src/lib/appManagers/appDownloadManager.ts", - "type": "cjs require", - "userRequest": "../utils", - "loc": "7:16-35" - }, - { - "moduleId": 32, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\apiUpdatesManager.ts", - "module": "./src/lib/appManagers/apiUpdatesManager.ts", - "moduleName": "./src/lib/appManagers/apiUpdatesManager.ts", - "type": "cjs require", - "userRequest": "../utils", - "loc": "10:16-35" - }, - { - "moduleId": 34, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\serverTimeManager.ts", - "module": "./src/lib/mtproto/serverTimeManager.ts", - "moduleName": "./src/lib/mtproto/serverTimeManager.ts", - "type": "cjs require", - "userRequest": "../utils", - "loc": "8:16-35" - }, - { - "moduleId": 35, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 37, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\appMediaPlaybackController.ts", - "module": "./src/components/appMediaPlaybackController.ts", - "moduleName": "./src/components/appMediaPlaybackController.ts", - "type": "cjs require", - "userRequest": "../lib/utils", - "loc": "6:16-39" - }, - { - "moduleId": 39, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 40, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appStateManager.ts", - "module": "./src/lib/appManagers/appStateManager.ts", - "moduleName": "./src/lib/appManagers/appStateManager.ts", - "type": "cjs require", - "userRequest": "../utils", - "loc": "14:16-35" - }, - { - "moduleId": 41, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 43, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 44, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appStickersManager.ts", - "module": "./src/lib/appManagers/appStickersManager.ts", - "moduleName": "./src/lib/appManagers/appStickersManager.ts", - "type": "cjs require", - "userRequest": "../utils", - "loc": "19:16-35" - }, - { - "moduleId": 47, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\index.ts", - "module": "./src/components/emoticonsDropdown/index.ts", - "moduleName": "./src/components/emoticonsDropdown/index.ts", - "type": "cjs require", - "userRequest": "../../lib/utils", - "loc": "19:16-42" - }, - { - "moduleId": 49, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 50, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mediaPlayer.ts", - "module": "./src/lib/mediaPlayer.ts", - "moduleName": "./src/lib/mediaPlayer.ts", - "type": "cjs require", - "userRequest": "./utils", - "loc": "7:16-34" - }, - { - "moduleId": 51, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 55, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appWebPagesManager.ts", - "module": "./src/lib/appManagers/appWebPagesManager.ts", - "moduleName": "./src/lib/appManagers/appWebPagesManager.ts", - "type": "cjs require", - "userRequest": "../utils", - "loc": "6:16-35" - }, - { - "moduleId": 56, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts", - "module": "./src/lib/appManagers/appMediaViewer.ts", - "moduleName": "./src/lib/appManagers/appMediaViewer.ts", - "type": "cjs require", - "userRequest": "../utils", - "loc": "22:16-35" - }, - { - "moduleId": 58, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\poll.ts", - "module": "./src/components/poll.ts", - "moduleName": "./src/components/poll.ts", - "type": "cjs require", - "userRequest": "../lib/utils", - "loc": "9:16-39" - }, - { - "moduleId": 61, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popupStickers.ts", - "module": "./src/components/popupStickers.ts", - "moduleName": "./src/components/popupStickers.ts", - "type": "cjs require", - "userRequest": "../lib/utils", - "loc": "14:16-39" - }, - { - "moduleId": 63, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\gifsMasonry.ts", - "module": "./src/components/gifsMasonry.ts", - "moduleName": "./src/components/gifsMasonry.ts", - "type": "cjs require", - "userRequest": "../lib/utils", - "loc": "15:16-39" - }, - { - "moduleId": 66, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pagePassword.ts", - "module": "./src/pages/pagePassword.ts", - "moduleName": "./src/pages/pagePassword.ts", - "type": "cjs require", - "userRequest": "../lib/utils", - "loc": "16:16-39" - }, - { - "moduleId": 67, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "module": "./src/index.ts", - "moduleName": "./src/index.ts", - "type": "cjs require", - "userRequest": "./lib/utils", - "loc": "139:66-88" - }, - { - "moduleId": 81, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pagesManager.ts", - "module": "./src/pages/pagesManager.ts", - "moduleName": "./src/pages/pagesManager.ts", - "type": "cjs require", - "userRequest": "../lib/utils", - "loc": "6:16-39" - }, - { - "moduleId": 85, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\stickers.ts", - "module": "./src/components/sidebarRight/stickers.ts", - "moduleName": "./src/components/sidebarRight/stickers.ts", - "type": "cjs require", - "userRequest": "../../lib/utils", - "loc": "28:16-42" - }, - { - "moduleId": 87, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\gifs.ts", - "module": "./src/components/sidebarRight/gifs.ts", - "moduleName": "./src/components/sidebarRight/gifs.ts", - "type": "cjs require", - "userRequest": "../../lib/utils", - "loc": "41:16-42" - }, - { - "moduleId": 91, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\contacts.ts", - "module": "./src/components/sidebarLeft/contacts.ts", - "moduleName": "./src/components/sidebarLeft/contacts.ts", - "type": "cjs require", - "userRequest": "../../lib/utils", - "loc": "30:16-42" - }, - { - "moduleId": 93, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\settings.ts", - "module": "./src/components/sidebarLeft/settings.ts", - "moduleName": "./src/components/sidebarLeft/settings.ts", - "type": "cjs require", - "userRequest": "../../lib/utils", - "loc": "26:16-42" - }, - { - "moduleId": 94, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\editProfile.ts", - "module": "./src/components/sidebarLeft/editProfile.ts", - "moduleName": "./src/components/sidebarLeft/editProfile.ts", - "type": "cjs require", - "userRequest": "../../lib/utils", - "loc": "12:16-42" - }, - { - "moduleId": 95, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\chatFolders.ts", - "module": "./src/components/sidebarLeft/chatFolders.ts", - "moduleName": "./src/components/sidebarLeft/chatFolders.ts", - "type": "cjs require", - "userRequest": "../../lib/utils", - "loc": "11:16-42" - }, - { - "moduleId": 96, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\editFolder.ts", - "module": "./src/components/sidebarLeft/editFolder.ts", - "moduleName": "./src/components/sidebarLeft/editFolder.ts", - "type": "cjs require", - "userRequest": "../../lib/utils", - "loc": "30:16-42" - }, - { - "moduleId": 97, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\includedChats.ts", - "module": "./src/components/sidebarLeft/includedChats.ts", - "moduleName": "./src/components/sidebarLeft/includedChats.ts", - "type": "cjs require", - "userRequest": "../../lib/utils", - "loc": "30:16-42" - }, - { - "moduleId": 98, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\input.ts", - "module": "./src/components/chat/input.ts", - "moduleName": "./src/components/chat/input.ts", - "type": "cjs require", - "userRequest": "../../lib/utils", - "loc": "12:16-42" - }, - { - "moduleId": 102, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\stickers.ts", - "module": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "type": "cjs require", - "userRequest": "../../../lib/utils", - "loc": "43:16-45" - }, - { - "moduleId": 103, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popupCreatePoll.ts", - "module": "./src/components/popupCreatePoll.ts", - "moduleName": "./src/components/popupCreatePoll.ts", - "type": "cjs require", - "userRequest": "../lib/utils", - "loc": "9:16-39" - }, - { - "moduleId": 104, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\bubbleGroups.ts", - "module": "./src/components/bubbleGroups.ts", - "moduleName": "./src/components/bubbleGroups.ts", - "type": "cjs require", - "userRequest": "../lib/utils", - "loc": "3:16-39" - }, - { - "moduleId": 105, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\audio.ts", - "module": "./src/components/chat/audio.ts", - "moduleName": "./src/components/chat/audio.ts", - "type": "cjs require", - "userRequest": "../../lib/utils", - "loc": "11:16-42" - }, - { - "moduleId": 106, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\contextMenu.ts", - "module": "./src/components/chat/contextMenu.ts", - "moduleName": "./src/components/chat/contextMenu.ts", - "type": "cjs require", - "userRequest": "../../lib/utils", - "loc": "11:16-42" - }, - { - "moduleId": 107, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\search.ts", - "module": "./src/components/chat/search.ts", - "moduleName": "./src/components/chat/search.ts", - "type": "cjs require", - "userRequest": "../../lib/utils", - "loc": "27:16-42" - } - ], - "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.positionElementByIndex = exports.getFileURL = exports.getEmojiToneIndex = exports.calcImageInBox = exports.fillPropertyValue = exports.encodeEntities = exports.escapeRegExp = exports.listMergeSorted = exports.deepEqual = exports.formatNumber = exports.formatBytes = exports.copy = exports.whichChild = exports.getObjectKeysAndSort = exports.findUpAttribute = exports.findUpTag = exports.findUpClassName = exports.numberWithCommas = exports.safeReplaceObject = exports.tsNow = exports.isObject = exports.langPack = exports.generatePathData = exports.$rootScope = exports.getRichElementValue = exports.placeCaretAtEnd = exports.getRichValue = exports.cancelEvent = exports.checkDragEvent = exports.isInDOM = exports.dT = void 0;\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 isInDOM(element, parentNode) {\r\n if (!element) {\r\n return false;\r\n }\r\n parentNode = parentNode || document.body;\r\n if (element == parentNode) {\r\n return true;\r\n }\r\n return isInDOM(element.parentNode, parentNode);\r\n}\r\nexports.isInDOM = isInDOM;\r\nfunction checkDragEvent(e) {\r\n if (!e || e.target && (e.target.tagName == 'IMG' || e.target.tagName == 'A'))\r\n 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 }\r\n else {\r\n return true;\r\n }\r\n return false;\r\n}\r\nexports.checkDragEvent = checkDragEvent;\r\nfunction cancelEvent(event) {\r\n event = event || window.event;\r\n if (event) {\r\n // @ts-ignore\r\n event = event.originalEvent || event;\r\n try {\r\n if (event.stopPropagation)\r\n event.stopPropagation();\r\n if (event.preventDefault)\r\n event.preventDefault();\r\n event.returnValue = false;\r\n event.cancelBubble = true;\r\n }\r\n catch (err) { }\r\n }\r\n return false;\r\n}\r\nexports.cancelEvent = cancelEvent;\r\nfunction getRichValue(field) {\r\n if (!field) {\r\n return '';\r\n }\r\n var lines = [];\r\n var line = [];\r\n getRichElementValue(field, lines, line);\r\n if (line.length) {\r\n lines.push(line.join(''));\r\n }\r\n var value = lines.join('\\n');\r\n value = value.replace(/\\u00A0/g, ' ');\r\n return value;\r\n}\r\nexports.getRichValue = getRichValue;\r\nfunction placeCaretAtEnd(el) {\r\n el.focus();\r\n if (typeof window.getSelection != \"undefined\" && 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 // @ts-ignore\r\n }\r\n else if (typeof document.body.createTextRange != \"undefined\") {\r\n // @ts-ignore\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\nexports.placeCaretAtEnd = placeCaretAtEnd;\r\nfunction 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 }\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\nexports.getRichElementValue = getRichElementValue;\r\nexports.$rootScope = {\r\n $broadcast: (name, detail) => {\r\n /* if(name != 'user_update') {\r\n console.debug(dT(), 'Broadcasting ' + name + ' event, with args:', detail);\r\n } */\r\n let myCustomEvent = new CustomEvent(name, { detail });\r\n document.dispatchEvent(myCustomEvent);\r\n },\r\n $on: (name, callback) => {\r\n // @ts-ignore\r\n document.addEventListener(name, callback);\r\n },\r\n $off: (name, callback) => {\r\n // @ts-ignore\r\n document.removeEventListener(name, callback);\r\n },\r\n selectedPeerID: 0,\r\n myID: 0,\r\n idle: {\r\n isIDLE: false\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\nfunction generatePathData(x, y, width, height, tl, tr, br, bl) {\r\n var data = [];\r\n // start point in top-middle of the rectangle\r\n data.push('M' + (x + width / 2) + ',' + y);\r\n // next we go to the right\r\n data.push('H' + (x + width - tr));\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 // next we go down\r\n data.push('V' + (y + height - br));\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 // now we go to the left\r\n data.push('H' + (x + bl));\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 // next we go up\r\n data.push('V' + (y + tl));\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 // and we close the path\r\n data.push('Z');\r\n return data.join(' ');\r\n}\r\nexports.generatePathData = generatePathData;\r\n;\r\nexports.langPack = {\r\n \"messageActionChatCreate\": \"created the group\",\r\n \"messageActionChatEditTitle\": \"changed group name\",\r\n \"messageActionChatEditPhoto\": \"changed group photo\",\r\n \"messageActionChatDeletePhoto\": \"removed group photo\",\r\n \"messageActionChatReturn\": \"returned to group\",\r\n \"messageActionChatJoined\": \"joined the group\",\r\n \"messageActionChatAddUser\": \"invited {user}\",\r\n \"messageActionChatAddUsers\": \"invited {} users\",\r\n \"messageActionChatLeave\": \"left the group\",\r\n \"messageActionChatDeleteUser\": \"removed user\",\r\n \"messageActionChatJoinedByLink\": \"joined the group\",\r\n \"messageActionPinMessage\": \"pinned message\",\r\n \"messageActionContactSignUp\": \"joined Telegram\",\r\n \"messageActionChannelCreate\": \"Channel created\",\r\n \"messageActionChannelEditTitle\": \"Channel renamed\",\r\n \"messageActionChannelEditPhoto\": \"Channel photo updated\",\r\n \"messageActionChannelDeletePhoto\": \"Channel photo removed\",\r\n \"messageActionHistoryClear\": \"\",\r\n \"messageActionChannelMigrateFrom\": \"\",\r\n \"messageActionPhoneCall.in_ok\": \"Incoming Call\",\r\n \"messageActionPhoneCall.out_ok\": \"Outgoing Call\",\r\n \"messageActionPhoneCall.in_missed\": \"Missed Call\",\r\n \"messageActionPhoneCall.out_missed\": \"Cancelled Call\",\r\n};\r\nfunction isObject(object) {\r\n return typeof (object) === 'object' && object !== null;\r\n}\r\nexports.isObject = isObject;\r\nfunction tsNow(seconds) {\r\n var t = +new Date();\r\n return seconds ? Math.floor(t / 1000) : t;\r\n}\r\nexports.tsNow = tsNow;\r\nfunction 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)) { // useless\r\n wasObject[key] = newObject[key];\r\n //}\r\n }\r\n}\r\nexports.safeReplaceObject = safeReplaceObject;\r\nfunction 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\nexports.numberWithCommas = numberWithCommas;\r\n//export function findUpClassName(el: any, className: string): T;\r\nfunction findUpClassName(el, className) {\r\n if (el.classList.contains(className))\r\n return el; // 03.02.2020\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\nexports.findUpClassName = findUpClassName;\r\nfunction findUpTag(el, tag) {\r\n if (el.tagName == tag)\r\n return el; // 03.02.2020\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\nexports.findUpTag = findUpTag;\r\nfunction findUpAttribute(el, attribute) {\r\n if (el.getAttribute(attribute) != null)\r\n return el; // 03.02.2020\r\n while (el.parentElement) {\r\n el = el.parentElement;\r\n if (el.getAttribute(attribute) != null)\r\n return el;\r\n }\r\n return null;\r\n}\r\nexports.findUpAttribute = findUpAttribute;\r\nfunction getObjectKeysAndSort(object, sort = 'asc') {\r\n const ids = Object.keys(object).map(i => +i);\r\n if (sort == 'asc')\r\n return ids.sort((a, b) => a - b);\r\n else\r\n return ids.sort((a, b) => b - a);\r\n}\r\nexports.getObjectKeysAndSort = getObjectKeysAndSort;\r\nfunction whichChild(elem) {\r\n if (!elem.parentNode) {\r\n return -1;\r\n }\r\n let i = 0;\r\n // @ts-ignore\r\n while ((elem = elem.previousElementSibling) != null)\r\n ++i;\r\n return i;\r\n}\r\nexports.whichChild = whichChild;\r\n;\r\nfunction copy(obj) {\r\n //in case of premitives\r\n if (obj === null || typeof obj !== \"object\") {\r\n return obj;\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 //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 //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\nexports.copy = copy;\r\nfunction formatBytes(bytes, decimals = 2) {\r\n if (bytes === 0)\r\n return '0 Bytes';\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 const i = Math.floor(Math.log(bytes) / Math.log(k));\r\n return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];\r\n}\r\nexports.formatBytes = formatBytes;\r\nfunction formatNumber(bytes, decimals = 2) {\r\n if (bytes === 0)\r\n return '0';\r\n const k = 1000;\r\n const dm = decimals < 0 ? 0 : decimals;\r\n const sizes = ['', 'K', 'M', 'B', 'T'];\r\n const i = Math.floor(Math.log(bytes) / Math.log(k));\r\n return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + sizes[i];\r\n}\r\nexports.formatNumber = formatNumber;\r\nfunction deepEqual(x, y) {\r\n const ok = Object.keys, tx = typeof x, ty = typeof y;\r\n return x && y && tx === 'object' && tx === ty ? (ok(x).length === ok(y).length &&\r\n ok(x).every(key => deepEqual(x[key], y[key]))) : (x === y);\r\n}\r\nexports.deepEqual = deepEqual;\r\nfunction listMergeSorted(list1, list2) {\r\n list1 = list1 || [];\r\n list2 = list2 || [];\r\n var result = copy(list1);\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 return result;\r\n}\r\nexports.listMergeSorted = listMergeSorted;\r\n// credits to https://github.com/sindresorhus/escape-string-regexp/blob/master/index.js\r\nfunction escapeRegExp(str) {\r\n return str\r\n .replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&')\r\n .replace(/-/g, '\\\\x2d');\r\n}\r\nexports.escapeRegExp = escapeRegExp;\r\nfunction encodeEntities(value) {\r\n return value.replace(/&/g, '&').replace(/[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g, (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, (value) => {\r\n return '&#' + value.charCodeAt(0) + ';';\r\n }).replace(//g, '>');\r\n}\r\nexports.encodeEntities = encodeEntities;\r\nfunction fillPropertyValue(str) {\r\n let splitted = str.split(' ');\r\n if (splitted.length != 4) {\r\n if (!splitted[0])\r\n 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 return splitted;\r\n}\r\nexports.fillPropertyValue = fillPropertyValue;\r\nfunction calcImageInBox(imageW, imageH, boxW, boxH, noZoom) {\r\n if (imageW < boxW && imageH < boxH) {\r\n return { w: imageW, h: imageH };\r\n }\r\n var boxedImageW = boxW;\r\n var boxedImageH = boxH;\r\n if ((imageW / imageH) > (boxW / boxH)) {\r\n boxedImageH = (imageH * boxW / imageW) | 0;\r\n }\r\n else {\r\n boxedImageW = (imageW * boxH / imageH) | 0;\r\n if (boxedImageW > boxW) {\r\n boxedImageH = (boxedImageH * boxW / boxedImageW) | 0;\r\n boxedImageW = boxW;\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 if (noZoom && boxedImageW >= imageW && boxedImageH >= imageH) {\r\n boxedImageW = imageW;\r\n boxedImageH = imageH;\r\n }\r\n return { w: boxedImageW, h: boxedImageH };\r\n}\r\nexports.calcImageInBox = calcImageInBox;\r\nfunction getEmojiToneIndex(input) {\r\n let match = input.match(/[\\uDFFB-\\uDFFF]/);\r\n return match ? 5 - (57343 - match[0].charCodeAt(0)) : 0;\r\n}\r\nexports.getEmojiToneIndex = getEmojiToneIndex;\r\nfunction getFileURL(type, options) {\r\n //console.log('getFileURL', location);\r\n //const perf = performance.now();\r\n const encoded = encodeURIComponent(JSON.stringify(options));\r\n //console.log('getFileURL encode:', performance.now() - perf, encoded);\r\n return '/' + type + '/' + encoded;\r\n}\r\nexports.getFileURL = getFileURL;\r\nfunction positionElementByIndex(element, container, pos) {\r\n const prevPos = whichChild(element);\r\n if (prevPos == pos) {\r\n return false;\r\n }\r\n else if (prevPos != -1 && prevPos < pos) { // was higher\r\n pos += 1;\r\n }\r\n if (container.childElementCount > pos) {\r\n container.insertBefore(element, container.children[pos]);\r\n }\r\n else {\r\n container.append(element);\r\n }\r\n return true;\r\n}\r\nexports.positionElementByIndex = positionElementByIndex;\r\n" - }, - { - "id": 1, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\config.ts", - "name": "./src/lib/config.ts", - "index": 7, - "index2": 7, - "size": 117449, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "issuerId": 67, - "issuerName": "./src/index.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - } - ], - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 2, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts", - "module": "./src/lib/mtproto/mtprotoworker.ts", - "moduleName": "./src/lib/mtproto/mtprotoworker.ts", - "type": "cjs require", - "userRequest": "../config", - "loc": "12:17-37" - }, - { - "moduleId": 3, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\richtextprocessor.ts", - "module": "./src/lib/richtextprocessor.ts", - "moduleName": "./src/lib/richtextprocessor.ts", - "type": "cjs require", - "userRequest": "./config", - "loc": "8:33-52" - }, - { - "moduleId": 4, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\misc.ts", - "module": "./src/components/misc.ts", - "moduleName": "./src/components/misc.ts", - "type": "cjs require", - "userRequest": "../lib/config", - "loc": "23:30-54" - }, - { - "moduleId": 6, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\scrollable_new.ts", - "module": "./src/components/scrollable_new.ts", - "moduleName": "./src/components/scrollable_new.ts", - "type": "cjs require", - "userRequest": "../lib/config", - "loc": "8:17-41" - }, - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "../config", - "loc": "36:17-37" - }, - { - "moduleId": 12, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDocsManager.ts", - "module": "./src/lib/appManagers/appDocsManager.ts", - "moduleName": "./src/lib/appManagers/appDocsManager.ts", - "type": "cjs require", - "userRequest": "../config", - "loc": "21:17-37" - }, - { - "moduleId": 16, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts", - "module": "./src/lib/appManagers/appDialogsManager.ts", - "moduleName": "./src/lib/appManagers/appDialogsManager.ts", - "type": "cjs require", - "userRequest": "../config", - "loc": "30:17-37" - }, - { - "moduleId": 17, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\ripple.ts", - "module": "./src/components/ripple.ts", - "moduleName": "./src/components/ripple.ts", - "type": "cjs require", - "userRequest": "../lib/config", - "loc": "4:17-41" - }, - { - "moduleId": 18, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "module": "./src/components/wrappers.ts", - "moduleName": "./src/components/wrappers.ts", - "type": "cjs require", - "userRequest": "../lib/config", - "loc": "27:17-41" - }, - { - "moduleId": 20, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\lottieLoader.ts", - "module": "./src/lib/lottieLoader.ts", - "moduleName": "./src/lib/lottieLoader.ts", - "type": "cjs require", - "userRequest": "./config", - "loc": "16:17-36" - }, - { - "moduleId": 24, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", - "type": "cjs require", - "userRequest": "../config", - "loc": "52:17-37" - }, - { - "moduleId": 37, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\appMediaPlaybackController.ts", - "module": "./src/components/appMediaPlaybackController.ts", - "moduleName": "./src/components/appMediaPlaybackController.ts", - "type": "cjs require", - "userRequest": "../lib/config", - "loc": "9:17-41" - }, - { - "moduleId": 38, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 47, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\index.ts", - "module": "./src/components/emoticonsDropdown/index.ts", - "moduleName": "./src/components/emoticonsDropdown/index.ts", - "type": "cjs require", - "userRequest": "../../lib/config", - "loc": "18:17-44" - }, - { - "moduleId": 49, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 50, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mediaPlayer.ts", - "module": "./src/lib/mediaPlayer.ts", - "moduleName": "./src/lib/mediaPlayer.ts", - "type": "cjs require", - "userRequest": "./config", - "loc": "8:17-36" - }, - { - "moduleId": 54, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\opusDecodeController.ts", - "module": "./src/lib/opusDecodeController.ts", - "moduleName": "./src/lib/opusDecodeController.ts", - "type": "cjs require", - "userRequest": "./config", - "loc": "13:17-36" - }, - { - "moduleId": 56, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts", - "module": "./src/lib/appManagers/appMediaViewer.ts", - "moduleName": "./src/lib/appManagers/appMediaViewer.ts", - "type": "cjs require", - "userRequest": "../config", - "loc": "28:17-37" - }, - { - "moduleId": 58, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\poll.ts", - "module": "./src/components/poll.ts", - "moduleName": "./src/components/poll.ts", - "type": "cjs require", - "userRequest": "../lib/config", - "loc": "10:17-41" - }, - { - "moduleId": 66, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pagePassword.ts", - "module": "./src/pages/pagePassword.ts", - "moduleName": "./src/pages/pagePassword.ts", - "type": "cjs require", - "userRequest": "../lib/config", - "loc": "14:17-41" - }, - { - "moduleId": 67, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "module": "./src/index.ts", - "moduleName": "./src/index.ts", - "type": "cjs require", - "userRequest": "./lib/config", - "loc": "62:50-73" - }, - { - "moduleId": 79, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageAuthCode.ts", - "module": "./src/pages/pageAuthCode.ts", - "moduleName": "./src/pages/pageAuthCode.ts", - "type": "cjs require", - "userRequest": "../lib/config", - "loc": "16:17-41" - }, - { - "moduleId": 84, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\audio.ts", - "module": "./src/components/audio.ts", - "moduleName": "./src/components/audio.ts", - "type": "cjs require", - "userRequest": "../lib/config", - "loc": "13:17-41" - }, - { - "moduleId": 98, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\input.ts", - "module": "./src/components/chat/input.ts", - "moduleName": "./src/components/chat/input.ts", - "type": "cjs require", - "userRequest": "../../lib/config", - "loc": "19:17-44" - }, - { - "moduleId": 101, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\emoji.ts", - "module": "./src/components/emoticonsDropdown/tabs/emoji.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/emoji.ts", - "type": "cjs require", - "userRequest": "../../../lib/config", - "loc": "8:33-63" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 1, - "source": "\"use strict\";\r\n/*!\r\n * Webogram v0.7.0 - messaging web application for MTProto\r\n * https://github.com/zhukov/webogram\r\n * Copyright (C) 2014 Igor Zhukov \r\n * https://github.com/zhukov/webogram/blob/master/LICENSE\r\n */\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.isServiceWorkerSupported = exports.touchSupport = exports.mediaSizes = exports.LatinizeMap = exports.TLD = exports.Countries = exports.Emoji = exports.isAppleMobile = exports.isApple = exports.isAndroid = exports.isSafari = void 0;\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 userAgent_1 = require(\"../helpers/userAgent\");\r\nObject.defineProperty(exports, \"isSafari\", { enumerable: true, get: function () { return userAgent_1.isSafari; } });\r\nObject.defineProperty(exports, \"isAndroid\", { enumerable: true, get: function () { return userAgent_1.isAndroid; } });\r\nObject.defineProperty(exports, \"isApple\", { enumerable: true, get: function () { return userAgent_1.isApple; } });\r\nObject.defineProperty(exports, \"isAppleMobile\", { enumerable: true, get: function () { return userAgent_1.isAppleMobile; } });\r\n// !WARNING, ТУТ СЛОЖНО! по-хорошему, надо бы это переделать без fe0f, но они здесь необходимы чтобы отрендерить панель, и ниже дописаны 3 элемента которые не воспроизводятся без fe0f\r\nexports.Emoji = { \"2049\": 6356, \"2122\": 6364, \"2139\": 6389, \"2194\": 6269, \"2195\": 6268, \"2196\": 6267, \"2197\": 6261, \"2198\": 6263, \"2199\": 6265, \"2328\": 680, \"2600\": 4177, \"2601\": 4185, \"2602\": 4200, \"2603\": 4205, \"2604\": 4207, \"2611\": 6341, \"2614\": 4201, \"2615\": 3101, \"2618\": 2123, \"2620\": 194, \"2622\": 6258, \"2623\": 6259, \"2626\": 6288, \"2638\": 6285, \"2639\": 166, \"2648\": 6293, \"2649\": 6294, \"2650\": 6301, \"2651\": 6302, \"2652\": 6303, \"2653\": 6304, \"2660\": 567, \"2663\": 570, \"2665\": 568, \"2666\": 569, \"2668\": 457, \"2692\": 6184, \"2693\": 4110, \"2694\": 6187, \"2696\": 6195, \"2697\": 6201, \"2699\": 6193, \"2702\": 6171, \"2705\": 6340, \"2708\": 4118, \"2709\": 6132, \"2712\": 6146, \"2714\": 6342, \"2716\": 6343, \"2721\": 6284, \"2728\": 56, \"2733\": 6352, \"2734\": 6353, \"2744\": 4204, \"2747\": 6354, \"2753\": 6357, \"2754\": 6358, \"2755\": 6359, \"2757\": 6360, \"2763\": 1125, \"2764\": 1127, \"2795\": 6346, \"2796\": 6347, \"2797\": 6348, \"2934\": 6272, \"2935\": 6273, \"3030\": 6361, \"3297\": 6413, \"3299\": 6414, \"0023-20e3\": 6365, \"002a-20e3\": 6366, \"0030-20e3\": 6367, \"0031-20e3\": 6368, \"0032-20e3\": 6369, \"0033-20e3\": 6370, \"0034-20e3\": 6371, \"0035-20e3\": 6372, \"0036-20e3\": 6373, \"0037-20e3\": 6374, \"0038-20e3\": 6375, \"0039-20e3\": 6376, \"00a9\": 6362, \"00ae\": 6363, \"1f004\": 573, \"1f0cf\": 572, \"1f170\": 6383, \"1f171\": 6385, \"1f17e\": 6394, \"1f17f\": 6396, \"1f18e\": 6384, \"1f191\": 6386, \"1f192\": 6387, \"1f193\": 6388, \"1f194\": 6390, \"1f195\": 6392, \"1f196\": 6393, \"1f197\": 6395, \"1f198\": 6397, \"1f199\": 6398, \"1f19a\": 6399, \"1f1e6-1f1e8\": 78, \"1f1e6-1f1e9\": 79, \"1f1e6-1f1ea\": 710, \"1f1e6-1f1eb\": 711, \"1f1e6-1f1ec\": 712, \"1f1e6-1f1ee\": 713, \"1f1e6-1f1f1\": 714, \"1f1e6-1f1f2\": 715, \"1f1e6-1f1f4\": 716, \"1f1e6-1f1f6\": 717, \"1f1e6-1f1f7\": 718, \"1f1e6-1f1f8\": 719, \"1f1e6-1f1f9\": 720, \"1f1e6-1f1fa\": 721, \"1f1e6-1f1fc\": 722, \"1f1e6-1f1fd\": 723, \"1f1e6-1f1ff\": 724, \"1f1e7-1f1e6\": 725, \"1f1e7-1f1e7\": 726, \"1f1e7-1f1e9\": 727, \"1f1e7-1f1ea\": 728, \"1f1e7-1f1eb\": 729, \"1f1e7-1f1ec\": 730, \"1f1e7-1f1ed\": 731, \"1f1e7-1f1ee\": 732, \"1f1e7-1f1ef\": 733, \"1f1e7-1f1f1\": 734, \"1f1e7-1f1f2\": 735, \"1f1e7-1f1f3\": 736, \"1f1e7-1f1f4\": 737, \"1f1e7-1f1f6\": 738, \"1f1e7-1f1f7\": 739, \"1f1e7-1f1f8\": 740, \"1f1e7-1f1f9\": 741, \"1f1e7-1f1fb\": 742, \"1f1e7-1f1fc\": 743, \"1f1e7-1f1fe\": 744, \"1f1e7-1f1ff\": 745, \"1f1e8-1f1e6\": 746, \"1f1e8-1f1e8\": 747, \"1f1e8-1f1e9\": 748, \"1f1e8-1f1eb\": 749, \"1f1e8-1f1ec\": 750, \"1f1e8-1f1ed\": 751, \"1f1e8-1f1ee\": 752, \"1f1e8-1f1f0\": 753, \"1f1e8-1f1f1\": 754, \"1f1e8-1f1f2\": 755, \"1f1e8-1f1f3\": 756, \"1f1e8-1f1f4\": 757, \"1f1e8-1f1f5\": 758, \"1f1e8-1f1f7\": 759, \"1f1e8-1f1fa\": 760, \"1f1e8-1f1fb\": 761, \"1f1e8-1f1fc\": 762, \"1f1e8-1f1fd\": 763, \"1f1e8-1f1fe\": 764, \"1f1e8-1f1ff\": 765, \"1f1e9-1f1ea\": 766, \"1f1e9-1f1ec\": 767, \"1f1e9-1f1ef\": 768, \"1f1e9-1f1f0\": 769, \"1f1e9-1f1f2\": 770, \"1f1e9-1f1f4\": 771, \"1f1e9-1f1ff\": 772, \"1f1ea-1f1e6\": 773, \"1f1ea-1f1e8\": 774, \"1f1ea-1f1ea\": 775, \"1f1ea-1f1ec\": 776, \"1f1ea-1f1ed\": 777, \"1f1ea-1f1f7\": 778, \"1f1ea-1f1f8\": 779, \"1f1ea-1f1f9\": 780, \"1f1ea-1f1fa\": 781, \"1f1eb-1f1ee\": 782, \"1f1eb-1f1ef\": 783, \"1f1eb-1f1f0\": 784, \"1f1eb-1f1f2\": 785, \"1f1eb-1f1f4\": 786, \"1f1eb-1f1f7\": 787, \"1f1ec-1f1e6\": 788, \"1f1ec-1f1e7\": 789, \"1f1ec-1f1e9\": 790, \"1f1ec-1f1ea\": 791, \"1f1ec-1f1eb\": 792, \"1f1ec-1f1ec\": 793, \"1f1ec-1f1ed\": 794, \"1f1ec-1f1ee\": 795, \"1f1ec-1f1f1\": 796, \"1f1ec-1f1f2\": 797, \"1f1ec-1f1f3\": 798, \"1f1ec-1f1f5\": 799, \"1f1ec-1f1f6\": 7100, \"1f1ec-1f1f7\": 7101, \"1f1ec-1f1f8\": 7102, \"1f1ec-1f1f9\": 7103, \"1f1ec-1f1fa\": 7104, \"1f1ec-1f1fc\": 7105, \"1f1ec-1f1fe\": 7106, \"1f1ed-1f1f0\": 7107, \"1f1ed-1f1f2\": 7108, \"1f1ed-1f1f3\": 7109, \"1f1ed-1f1f7\": 7110, \"1f1ed-1f1f9\": 7111, \"1f1ed-1f1fa\": 7112, \"1f1ee-1f1e8\": 7113, \"1f1ee-1f1e9\": 7114, \"1f1ee-1f1ea\": 7115, \"1f1ee-1f1f1\": 7116, \"1f1ee-1f1f2\": 7117, \"1f1ee-1f1f3\": 7118, \"1f1ee-1f1f4\": 7119, \"1f1ee-1f1f6\": 7120, \"1f1ee-1f1f7\": 7121, \"1f1ee-1f1f8\": 7122, \"1f1ee-1f1f9\": 7123, \"1f1ef-1f1ea\": 7124, \"1f1ef-1f1f2\": 7125, \"1f1ef-1f1f4\": 7126, \"1f1ef-1f1f5\": 7127, \"1f1f0-1f1ea\": 7128, \"1f1f0-1f1ec\": 7129, \"1f1f0-1f1ed\": 7130, \"1f1f0-1f1ee\": 7131, \"1f1f0-1f1f2\": 7132, \"1f1f0-1f1f3\": 7133, \"1f1f0-1f1f5\": 7134, \"1f1f0-1f1f7\": 7135, \"1f1f0-1f1fc\": 7136, \"1f1f0-1f1fe\": 7137, \"1f1f0-1f1ff\": 7138, \"1f1f1-1f1e6\": 7139, \"1f1f1-1f1e7\": 7140, \"1f1f1-1f1e8\": 7141, \"1f1f1-1f1ee\": 7142, \"1f1f1-1f1f0\": 7143, \"1f1f1-1f1f7\": 7144, \"1f1f1-1f1f8\": 7145, \"1f1f1-1f1f9\": 7146, \"1f1f1-1f1fa\": 7147, \"1f1f1-1f1fb\": 7148, \"1f1f1-1f1fe\": 7149, \"1f1f2-1f1e6\": 7150, \"1f1f2-1f1e8\": 7151, \"1f1f2-1f1e9\": 7152, \"1f1f2-1f1ea\": 7153, \"1f1f2-1f1eb\": 7154, \"1f1f2-1f1ec\": 7155, \"1f1f2-1f1ed\": 7156, \"1f1f2-1f1f0\": 7157, \"1f1f2-1f1f1\": 7158, \"1f1f2-1f1f2\": 7159, \"1f1f2-1f1f3\": 7160, \"1f1f2-1f1f4\": 7161, \"1f1f2-1f1f5\": 7162, \"1f1f2-1f1f6\": 7163, \"1f1f2-1f1f7\": 7164, \"1f1f2-1f1f8\": 7165, \"1f1f2-1f1f9\": 7166, \"1f1f2-1f1fa\": 7167, \"1f1f2-1f1fb\": 7168, \"1f1f2-1f1fc\": 7169, \"1f1f2-1f1fd\": 7170, \"1f1f2-1f1fe\": 7171, \"1f1f2-1f1ff\": 7172, \"1f1f3-1f1e6\": 7173, \"1f1f3-1f1e8\": 7174, \"1f1f3-1f1ea\": 7175, \"1f1f3-1f1eb\": 7176, \"1f1f3-1f1ec\": 7177, \"1f1f3-1f1ee\": 7178, \"1f1f3-1f1f1\": 7179, \"1f1f3-1f1f4\": 7180, \"1f1f3-1f1f5\": 7181, \"1f1f3-1f1f7\": 7182, \"1f1f3-1f1fa\": 7183, \"1f1f3-1f1ff\": 7184, \"1f1f4-1f1f2\": 7185, \"1f1f5-1f1e6\": 7186, \"1f1f5-1f1ea\": 7187, \"1f1f5-1f1eb\": 7188, \"1f1f5-1f1ec\": 7189, \"1f1f5-1f1ed\": 7190, \"1f1f5-1f1f0\": 7191, \"1f1f5-1f1f1\": 7192, \"1f1f5-1f1f2\": 7193, \"1f1f5-1f1f3\": 7194, \"1f1f5-1f1f7\": 7195, \"1f1f5-1f1f8\": 7196, \"1f1f5-1f1f9\": 7197, \"1f1f5-1f1fc\": 7198, \"1f1f5-1f1fe\": 7199, \"1f1f6-1f1e6\": 7200, \"1f1f7-1f1ea\": 7201, \"1f1f7-1f1f4\": 7202, \"1f1f7-1f1f8\": 7203, \"1f1f7-1f1fa\": 7204, \"1f1f7-1f1fc\": 7205, \"1f1f8-1f1e6\": 7206, \"1f1f8-1f1e7\": 7207, \"1f1f8-1f1e8\": 7208, \"1f1f8-1f1e9\": 7209, \"1f1f8-1f1ea\": 7210, \"1f1f8-1f1ec\": 7211, \"1f1f8-1f1ed\": 7212, \"1f1f8-1f1ee\": 7213, \"1f1f8-1f1ef\": 7214, \"1f1f8-1f1f0\": 7215, \"1f1f8-1f1f1\": 7216, \"1f1f8-1f1f2\": 7217, \"1f1f8-1f1f3\": 7218, \"1f1f8-1f1f4\": 7219, \"1f1f8-1f1f7\": 7220, \"1f1f8-1f1f8\": 7221, \"1f1f8-1f1f9\": 7222, \"1f1f8-1f1fb\": 7223, \"1f1f8-1f1fd\": 7224, \"1f1f8-1f1fe\": 7225, \"1f1f8-1f1ff\": 7226, \"1f1f9-1f1e6\": 7227, \"1f1f9-1f1e8\": 7228, \"1f1f9-1f1e9\": 7229, \"1f1f9-1f1eb\": 7230, \"1f1f9-1f1ec\": 7231, \"1f1f9-1f1ed\": 7232, \"1f1f9-1f1ef\": 7233, \"1f1f9-1f1f0\": 7234, \"1f1f9-1f1f1\": 7235, \"1f1f9-1f1f2\": 7236, \"1f1f9-1f1f3\": 7237, \"1f1f9-1f1f4\": 7238, \"1f1f9-1f1f7\": 7239, \"1f1f9-1f1f9\": 7240, \"1f1f9-1f1fb\": 7241, \"1f1f9-1f1fc\": 7242, \"1f1f9-1f1ff\": 7243, \"1f1fa-1f1e6\": 7244, \"1f1fa-1f1ec\": 7245, \"1f1fa-1f1f2\": 7246, \"1f1fa-1f1f3\": 7247, \"1f1fa-1f1f8\": 7248, \"1f1fa-1f1fe\": 7249, \"1f1fa-1f1ff\": 7250, \"1f1fb-1f1e6\": 7251, \"1f1fb-1f1e8\": 7252, \"1f1fb-1f1ea\": 7253, \"1f1fb-1f1ec\": 7254, \"1f1fb-1f1ee\": 7255, \"1f1fb-1f1f3\": 7256, \"1f1fb-1f1fa\": 7257, \"1f1fc-1f1eb\": 7258, \"1f1fc-1f1f8\": 7259, \"1f1fd-1f1f0\": 7260, \"1f1fe-1f1ea\": 7261, \"1f1fe-1f1f9\": 7262, \"1f1ff-1f1e6\": 7263, \"1f1ff-1f1f2\": 7264, \"1f1ff-1f1fc\": 7265, \"1f201\": 6400, \"1f202\": 6401, \"1f21a\": 6407, \"1f22f\": 6404, \"1f232\": 6408, \"1f233\": 6412, \"1f234\": 6411, \"1f235\": 6416, \"1f236\": 6403, \"1f237\": 6402, \"1f238\": 6410, \"1f239\": 6406, \"1f23a\": 6415, \"1f250\": 6405, \"1f251\": 6409, \"1f300\": 4197, \"1f301\": 449, \"1f302\": 4199, \"1f303\": 450, \"1f304\": 452, \"1f305\": 453, \"1f306\": 454, \"1f307\": 455, \"1f308\": 4198, \"1f309\": 456, \"1f30a\": 4210, \"1f30b\": 410, \"1f30c\": 4184, \"1f30d\": 41, \"1f30e\": 42, \"1f30f\": 43, \"1f310\": 44, \"1f311\": 4164, \"1f312\": 4165, \"1f313\": 4166, \"1f314\": 4167, \"1f315\": 4168, \"1f316\": 4169, \"1f317\": 4170, \"1f318\": 4171, \"1f319\": 4172, \"1f31a\": 4173, \"1f31b\": 4174, \"1f31c\": 4175, \"1f31d\": 4178, \"1f31e\": 4179, \"1f31f\": 4182, \"1f320\": 4183, \"1f321\": 4176, \"1f324\": 4188, \"1f325\": 4189, \"1f326\": 4190, \"1f327\": 4191, \"1f328\": 4192, \"1f329\": 4193, \"1f32a\": 4194, \"1f32b\": 4195, \"1f32c\": 4196, \"1f32d\": 347, \"1f32e\": 349, \"1f32f\": 350, \"1f330\": 331, \"1f331\": 2116, \"1f332\": 2117, \"1f333\": 2118, \"1f334\": 2119, \"1f335\": 2120, \"1f336\": 323, \"1f337\": 2115, \"1f338\": 2107, \"1f339\": 2110, \"1f33a\": 2112, \"1f33b\": 2113, \"1f33c\": 2114, \"1f33d\": 322, \"1f33e\": 2121, \"1f33f\": 2122, \"1f340\": 2124, \"1f341\": 2125, \"1f342\": 2126, \"1f343\": 2127, \"1f344\": 329, \"1f345\": 316, \"1f346\": 319, \"1f347\": 31, \"1f348\": 32, \"1f349\": 33, \"1f34a\": 34, \"1f34b\": 35, \"1f34c\": 36, \"1f34d\": 37, \"1f34e\": 39, \"1f34f\": 310, \"1f350\": 311, \"1f351\": 312, \"1f352\": 313, \"1f353\": 314, \"1f354\": 344, \"1f355\": 346, \"1f356\": 340, \"1f357\": 341, \"1f358\": 364, \"1f359\": 365, \"1f35a\": 366, \"1f35b\": 367, \"1f35c\": 368, \"1f35d\": 369, \"1f35e\": 332, \"1f35f\": 345, \"1f360\": 370, \"1f361\": 376, \"1f362\": 371, \"1f363\": 372, \"1f364\": 373, \"1f365\": 374, \"1f366\": 385, \"1f367\": 386, \"1f368\": 387, \"1f369\": 388, \"1f36a\": 389, \"1f36b\": 394, \"1f36c\": 395, \"1f36d\": 396, \"1f36e\": 397, \"1f36f\": 398, \"1f370\": 391, \"1f371\": 363, \"1f372\": 356, \"1f373\": 354, \"1f374\": 3118, \"1f375\": 3102, \"1f376\": 3103, \"1f377\": 3105, \"1f378\": 3106, \"1f379\": 3107, \"1f37a\": 3108, \"1f37b\": 3109, \"1f37c\": 399, \"1f37d\": 3117, \"1f37e\": 3104, \"1f37f\": 359, \"1f380\": 517, \"1f381\": 518, \"1f382\": 390, \"1f383\": 51, \"1f384\": 52, \"1f385\": 1326, \"1f386\": 53, \"1f387\": 54, \"1f388\": 57, \"1f389\": 58, \"1f38a\": 59, \"1f38b\": 510, \"1f38c\": 73, \"1f38d\": 511, \"1f38e\": 512, \"1f38f\": 513, \"1f390\": 514, \"1f391\": 515, \"1f392\": 625, \"1f393\": 637, \"1f396\": 522, \"1f397\": 519, \"1f399\": 656, \"1f39a\": 657, \"1f39b\": 658, \"1f39e\": 689, \"1f39f\": 520, \"1f3a0\": 458, \"1f3a1\": 459, \"1f3a2\": 460, \"1f3a3\": 549, \"1f3a4\": 659, \"1f3a5\": 688, \"1f3a6\": 6324, \"1f3a7\": 660, \"1f3a8\": 577, \"1f3a9\": 636, \"1f3aa\": 462, \"1f3ab\": 521, \"1f3ac\": 691, \"1f3ad\": 575, \"1f3ae\": 561, \"1f3af\": 555, \"1f3b0\": 563, \"1f3b1\": 558, \"1f3b2\": 564, \"1f3b3\": 537, \"1f3b4\": 574, \"1f3b5\": 654, \"1f3b6\": 655, \"1f3b7\": 662, \"1f3b8\": 663, \"1f3b9\": 664, \"1f3ba\": 665, \"1f3bb\": 666, \"1f3bc\": 653, \"1f3bd\": 551, \"1f3be\": 535, \"1f3bf\": 552, \"1f3c0\": 531, \"1f3c1\": 71, \"1f3c2\": 1397, \"1f3c3-200d-2640-fe0f\": 1381, \"1f3c3-200d-2642-fe0f\": 1380, \"1f3c3\": 1379, \"1f3c4-200d-2640-fe0f\": 1403, \"1f3c4-200d-2642-fe0f\": 1402, \"1f3c4\": 1401, \"1f3c5\": 524, \"1f3c6\": 523, \"1f3c7\": 1395, \"1f3c8\": 533, \"1f3c9\": 534, \"1f3ca-200d-2640-fe0f\": 1409, \"1f3ca-200d-2642-fe0f\": 1408, \"1f3ca\": 1407, \"1f3cb-fe0f-200d-2640-fe0f\": 1415, \"1f3cb-fe0f-200d-2642-fe0f\": 1414, \"1f3cb\": 1413, \"1f3cc-fe0f-200d-2640-fe0f\": 1400, \"1f3cc-fe0f-200d-2642-fe0f\": 1399, \"1f3cc\": 1398, \"1f3cd\": 492, \"1f3ce\": 491, \"1f3cf\": 538, \"1f3d0\": 532, \"1f3d1\": 539, \"1f3d2\": 540, \"1f3d3\": 542, \"1f3d4\": 48, \"1f3d5\": 412, \"1f3d6\": 413, \"1f3d7\": 419, \"1f3d8\": 421, \"1f3d9\": 451, \"1f3da\": 422, \"1f3db\": 418, \"1f3dc\": 414, \"1f3dd\": 415, \"1f3de\": 416, \"1f3df\": 417, \"1f3e0\": 423, \"1f3e1\": 424, \"1f3e2\": 425, \"1f3e3\": 426, \"1f3e4\": 427, \"1f3e5\": 428, \"1f3e6\": 429, \"1f3e7\": 6234, \"1f3e8\": 430, \"1f3e9\": 431, \"1f3ea\": 432, \"1f3eb\": 433, \"1f3ec\": 434, \"1f3ed\": 435, \"1f3ee\": 6102, \"1f3ef\": 436, \"1f3f0\": 437, \"1f3f3-fe0f-200d-1f308\": 76, \"1f3f3\": 75, \"1f3f4-200d-2620-fe0f\": 77, \"1f3f4-e0067-e0062-e0065-e006e-e0067-e007f\": 7266, \"1f3f4-e0067-e0062-e0073-e0063-e0074-e007f\": 7267, \"1f3f4-e0067-e0062-e0077-e006c-e0073-e007f\": 7268, \"1f3f4\": 74, \"1f3f5\": 2109, \"1f3f7\": 6120, \"1f3f8\": 543, \"1f3f9\": 6189, \"1f3fa\": 3121, \"1f3fb\": 81, \"1f3fc\": 82, \"1f3fd\": 83, \"1f3fe\": 84, \"1f3ff\": 85, \"1f400\": 244, \"1f401\": 243, \"1f402\": 225, \"1f403\": 226, \"1f404\": 227, \"1f405\": 217, \"1f406\": 218, \"1f407\": 247, \"1f408\": 214, \"1f409\": 282, \"1f40a\": 277, \"1f40b\": 286, \"1f40c\": 294, \"1f40d\": 280, \"1f40e\": 220, \"1f40f\": 232, \"1f410\": 234, \"1f411\": 233, \"1f412\": 22, \"1f413\": 262, \"1f414\": 261, \"1f415-200d-1f9ba\": 28, \"1f415\": 26, \"1f416\": 229, \"1f417\": 230, \"1f418\": 239, \"1f419\": 292, \"1f41a\": 293, \"1f41b\": 296, \"1f41c\": 297, \"1f41d\": 298, \"1f41e\": 299, \"1f41f\": 288, \"1f420\": 289, \"1f421\": 290, \"1f422\": 278, \"1f423\": 263, \"1f424\": 264, \"1f425\": 265, \"1f426\": 266, \"1f427\": 267, \"1f428\": 252, \"1f429\": 29, \"1f42a\": 235, \"1f42b\": 236, \"1f42c\": 287, \"1f42d\": 242, \"1f42e\": 224, \"1f42f\": 216, \"1f430\": 246, \"1f431\": 213, \"1f432\": 281, \"1f433\": 285, \"1f434\": 219, \"1f435\": 21, \"1f436\": 25, \"1f437\": 228, \"1f438\": 276, \"1f439\": 245, \"1f43a\": 210, \"1f43b\": 251, \"1f43c\": 253, \"1f43d\": 231, \"1f43e\": 259, \"1f43f\": 248, \"1f440\": 1194, \"1f441-fe0f-200d-1f5e8-fe0f\": 1145, \"1f441\": 1195, \"1f442\": 1188, \"1f443\": 1190, \"1f444\": 1197, \"1f445\": 1196, \"1f446\": 1164, \"1f447\": 1166, \"1f448\": 1162, \"1f449\": 1163, \"1f44a\": 1171, \"1f44b\": 1150, \"1f44c\": 1155, \"1f44d\": 1168, \"1f44e\": 1169, \"1f44f\": 1174, \"1f450\": 1176, \"1f451\": 634, \"1f452\": 635, \"1f453\": 61, \"1f454\": 66, \"1f455\": 67, \"1f456\": 68, \"1f457\": 613, \"1f458\": 614, \"1f459\": 619, \"1f45a\": 620, \"1f45b\": 621, \"1f45c\": 622, \"1f45d\": 623, \"1f45e\": 626, \"1f45f\": 627, \"1f460\": 630, \"1f461\": 631, \"1f462\": 633, \"1f463\": 1483, \"1f464\": 1481, \"1f465\": 1482, \"1f466\": 1200, \"1f467\": 1201, \"1f468-200d-1f33e\": 1267, \"1f468-200d-1f373\": 1270, \"1f468-200d-1f393\": 1258, \"1f468-200d-1f3a4\": 1288, \"1f468-200d-1f3a8\": 1291, \"1f468-200d-1f3eb\": 1261, \"1f468-200d-1f3ed\": 1276, \"1f468-200d-1f466-200d-1f466\": 1471, \"1f468-200d-1f466\": 1470, \"1f468-200d-1f467-200d-1f466\": 1473, \"1f468-200d-1f467-200d-1f467\": 1474, \"1f468-200d-1f467\": 1472, \"1f468-200d-1f468-200d-1f466\": 1460, \"1f468-200d-1f468-200d-1f466-200d-1f466\": 1463, \"1f468-200d-1f468-200d-1f467\": 1461, \"1f468-200d-1f468-200d-1f467-200d-1f466\": 1462, \"1f468-200d-1f468-200d-1f467-200d-1f467\": 1464, \"1f468-200d-1f469-200d-1f466\": 1455, \"1f468-200d-1f469-200d-1f466-200d-1f466\": 1458, \"1f468-200d-1f469-200d-1f467\": 1456, \"1f468-200d-1f469-200d-1f467-200d-1f466\": 1457, \"1f468-200d-1f469-200d-1f467-200d-1f467\": 1459, \"1f468-200d-1f4bb\": 1285, \"1f468-200d-1f4bc\": 1279, \"1f468-200d-1f527\": 1273, \"1f468-200d-1f52c\": 1282, \"1f468-200d-1f680\": 1297, \"1f468-200d-1f692\": 1300, \"1f468-200d-1f9af\": 1371, \"1f468-200d-1f9b0\": 1206, \"1f468-200d-1f9b1\": 1207, \"1f468-200d-1f9b2\": 1209, \"1f468-200d-1f9b3\": 1208, \"1f468-200d-1f9bc\": 1374, \"1f468-200d-1f9bd\": 1377, \"1f468-200d-2695-fe0f\": 1255, \"1f468-200d-2696-fe0f\": 1264, \"1f468-200d-2708-fe0f\": 1294, \"1f468-200d-2764-fe0f-200d-1f468\": 1452, \"1f468-200d-2764-fe0f-200d-1f48b-200d-1f468\": 1448, \"1f468\": 1204, \"1f469-200d-1f33e\": 1268, \"1f469-200d-1f373\": 1271, \"1f469-200d-1f393\": 1259, \"1f469-200d-1f3a4\": 1289, \"1f469-200d-1f3a8\": 1292, \"1f469-200d-1f3eb\": 1262, \"1f469-200d-1f3ed\": 1277, \"1f469-200d-1f466-200d-1f466\": 1476, \"1f469-200d-1f466\": 1475, \"1f469-200d-1f467-200d-1f466\": 1478, \"1f469-200d-1f467-200d-1f467\": 1479, \"1f469-200d-1f467\": 1477, \"1f469-200d-1f469-200d-1f466\": 1465, \"1f469-200d-1f469-200d-1f466-200d-1f466\": 1468, \"1f469-200d-1f469-200d-1f467\": 1466, \"1f469-200d-1f469-200d-1f467-200d-1f466\": 1467, \"1f469-200d-1f469-200d-1f467-200d-1f467\": 1469, \"1f469-200d-1f4bb\": 1286, \"1f469-200d-1f4bc\": 1280, \"1f469-200d-1f527\": 1274, \"1f469-200d-1f52c\": 1283, \"1f469-200d-1f680\": 1298, \"1f469-200d-1f692\": 1301, \"1f469-200d-1f9af\": 1372, \"1f469-200d-1f9b0\": 1211, \"1f469-200d-1f9b1\": 1213, \"1f469-200d-1f9b2\": 1217, \"1f469-200d-1f9b3\": 1215, \"1f469-200d-1f9bc\": 1375, \"1f469-200d-1f9bd\": 1378, \"1f469-200d-2695-fe0f\": 1256, \"1f469-200d-2696-fe0f\": 1265, \"1f469-200d-2708-fe0f\": 1295, \"1f469-200d-2764-fe0f-200d-1f468\": 1451, \"1f469-200d-2764-fe0f-200d-1f469\": 1453, \"1f469-200d-2764-fe0f-200d-1f48b-200d-1f468\": 1447, \"1f469-200d-2764-fe0f-200d-1f48b-200d-1f469\": 1449, \"1f469\": 1210, \"1f46a\": 1454, \"1f46b\": 1444, \"1f46c\": 1445, \"1f46d\": 1443, \"1f46e-200d-2640-fe0f\": 1304, \"1f46e-200d-2642-fe0f\": 1303, \"1f46e\": 1302, \"1f46f-200d-2640-fe0f\": 1387, \"1f46f-200d-2642-fe0f\": 1386, \"1f46f\": 1385, \"1f470\": 1322, \"1f471-200d-2640-fe0f\": 1219, \"1f471-200d-2642-fe0f\": 1220, \"1f471\": 1203, \"1f472\": 1319, \"1f473-200d-2640-fe0f\": 1318, \"1f473-200d-2642-fe0f\": 1317, \"1f473\": 1316, \"1f474\": 1222, \"1f475\": 1223, \"1f476\": 1198, \"1f477-200d-2640-fe0f\": 1313, \"1f477-200d-2642-fe0f\": 1312, \"1f477\": 1311, \"1f478\": 1315, \"1f479\": 197, \"1f47a\": 198, \"1f47b\": 199, \"1f47c\": 1325, \"1f47d\": 1100, \"1f47e\": 1101, \"1f47f\": 192, \"1f480\": 193, \"1f481-200d-2640-fe0f\": 1238, \"1f481-200d-2642-fe0f\": 1237, \"1f481\": 1236, \"1f482-200d-2640-fe0f\": 1310, \"1f482-200d-2642-fe0f\": 1309, \"1f482\": 1308, \"1f483\": 1382, \"1f484\": 641, \"1f485\": 1181, \"1f486-200d-2640-fe0f\": 1357, \"1f486-200d-2642-fe0f\": 1356, \"1f486\": 1355, \"1f487-200d-2640-fe0f\": 1360, \"1f487-200d-2642-fe0f\": 1359, \"1f487\": 1358, \"1f488\": 461, \"1f489\": 6208, \"1f48a\": 6210, \"1f48b\": 1115, \"1f48c\": 1116, \"1f48d\": 642, \"1f48e\": 643, \"1f48f\": 1446, \"1f490\": 2106, \"1f491\": 1450, \"1f492\": 438, \"1f493\": 1121, \"1f494\": 1126, \"1f495\": 1123, \"1f496\": 1119, \"1f497\": 1120, \"1f498\": 1117, \"1f499\": 1131, \"1f49a\": 1130, \"1f49b\": 1129, \"1f49c\": 1132, \"1f49d\": 1118, \"1f49e\": 1122, \"1f49f\": 1124, \"1f4a0\": 6447, \"1f4a1\": 6100, \"1f4a2\": 1137, \"1f4a3\": 1143, \"1f4a4\": 1149, \"1f4a5\": 1138, \"1f4a6\": 1140, \"1f4a7\": 4209, \"1f4a8\": 1141, \"1f4a9\": 195, \"1f4aa\": 1183, \"1f4ab\": 1139, \"1f4ac\": 1144, \"1f4ad\": 1148, \"1f4ae\": 2108, \"1f4af\": 1136, \"1f4b0\": 6121, \"1f4b1\": 6130, \"1f4b2\": 6131, \"1f4b3\": 6127, \"1f4b4\": 6122, \"1f4b5\": 6123, \"1f4b6\": 6124, \"1f4b7\": 6125, \"1f4b8\": 6126, \"1f4b9\": 6129, \"1f4ba\": 4123, \"1f4bb\": 677, \"1f4bc\": 6152, \"1f4bd\": 683, \"1f4be\": 684, \"1f4bf\": 685, \"1f4c0\": 686, \"1f4c1\": 6153, \"1f4c2\": 6154, \"1f4c3\": 6113, \"1f4c4\": 6115, \"1f4c5\": 6156, \"1f4c6\": 6157, \"1f4c7\": 6160, \"1f4c8\": 6161, \"1f4c9\": 6162, \"1f4ca\": 6163, \"1f4cb\": 6164, \"1f4cc\": 6165, \"1f4cd\": 6166, \"1f4ce\": 6167, \"1f4cf\": 6169, \"1f4d0\": 6170, \"1f4d1\": 6118, \"1f4d2\": 6112, \"1f4d3\": 6111, \"1f4d4\": 6104, \"1f4d5\": 6105, \"1f4d6\": 6106, \"1f4d7\": 6107, \"1f4d8\": 6108, \"1f4d9\": 6109, \"1f4da\": 6110, \"1f4db\": 6337, \"1f4dc\": 6114, \"1f4dd\": 6151, \"1f4de\": 672, \"1f4df\": 673, \"1f4e0\": 674, \"1f4e1\": 6207, \"1f4e2\": 648, \"1f4e3\": 649, \"1f4e4\": 6136, \"1f4e5\": 6137, \"1f4e6\": 6138, \"1f4e7\": 6133, \"1f4e8\": 6134, \"1f4e9\": 6135, \"1f4ea\": 6140, \"1f4eb\": 6139, \"1f4ec\": 6141, \"1f4ed\": 6142, \"1f4ee\": 6143, \"1f4ef\": 650, \"1f4f0\": 6116, \"1f4f1\": 669, \"1f4f2\": 670, \"1f4f3\": 6328, \"1f4f4\": 6329, \"1f4f5\": 6256, \"1f4f6\": 6327, \"1f4f7\": 693, \"1f4f8\": 694, \"1f4f9\": 695, \"1f4fa\": 692, \"1f4fb\": 661, \"1f4fc\": 696, \"1f4fd\": 690, \"1f4ff\": 640, \"1f500\": 6306, \"1f501\": 6307, \"1f502\": 6308, \"1f503\": 6274, \"1f504\": 6275, \"1f505\": 6325, \"1f506\": 6326, \"1f507\": 644, \"1f508\": 645, \"1f509\": 646, \"1f50a\": 647, \"1f50b\": 675, \"1f50c\": 676, \"1f50d\": 697, \"1f50e\": 698, \"1f50f\": 6177, \"1f510\": 6178, \"1f511\": 6179, \"1f512\": 6175, \"1f513\": 6176, \"1f514\": 651, \"1f515\": 652, \"1f516\": 6119, \"1f517\": 6197, \"1f518\": 6448, \"1f519\": 6276, \"1f51a\": 6277, \"1f51b\": 6278, \"1f51c\": 6279, \"1f51d\": 6280, \"1f51e\": 6257, \"1f51f\": 6377, \"1f520\": 6378, \"1f521\": 6379, \"1f522\": 6380, \"1f523\": 6381, \"1f524\": 6382, \"1f525\": 4208, \"1f526\": 6101, \"1f527\": 6191, \"1f528\": 6181, \"1f529\": 6192, \"1f52a\": 3120, \"1f52b\": 6188, \"1f52c\": 6205, \"1f52d\": 6206, \"1f52e\": 559, \"1f52f\": 6292, \"1f530\": 6338, \"1f531\": 6336, \"1f532\": 6450, \"1f533\": 6449, \"1f534\": 6417, \"1f535\": 6421, \"1f536\": 6441, \"1f537\": 6442, \"1f538\": 6443, \"1f539\": 6444, \"1f53a\": 6445, \"1f53b\": 6446, \"1f53c\": 6316, \"1f53d\": 6318, \"1f549\": 6283, \"1f54a\": 268, \"1f54b\": 446, \"1f54c\": 442, \"1f54d\": 444, \"1f54e\": 6291, \"1f550\": 4142, \"1f551\": 4144, \"1f552\": 4146, \"1f553\": 4148, \"1f554\": 4150, \"1f555\": 4152, \"1f556\": 4154, \"1f557\": 4156, \"1f558\": 4158, \"1f559\": 4160, \"1f55a\": 4162, \"1f55b\": 4140, \"1f55c\": 4143, \"1f55d\": 4145, \"1f55e\": 4147, \"1f55f\": 4149, \"1f560\": 4151, \"1f561\": 4153, \"1f562\": 4155, \"1f563\": 4157, \"1f564\": 4159, \"1f565\": 4161, \"1f566\": 4163, \"1f567\": 4141, \"1f56f\": 699, \"1f570\": 4139, \"1f573\": 1142, \"1f574\": 1384, \"1f575-fe0f-200d-2640-fe0f\": 1307, \"1f575-fe0f-200d-2642-fe0f\": 1306, \"1f575\": 1305, \"1f576\": 62, \"1f577\": 2101, \"1f578\": 2102, \"1f579\": 562, \"1f57a\": 1383, \"1f587\": 6168, \"1f58a\": 6148, \"1f58b\": 6147, \"1f58c\": 6149, \"1f58d\": 6150, \"1f590\": 1152, \"1f595\": 1165, \"1f596\": 1154, \"1f5a4\": 1134, \"1f5a5\": 678, \"1f5a8\": 679, \"1f5b1\": 681, \"1f5b2\": 682, \"1f5bc\": 576, \"1f5c2\": 6155, \"1f5c3\": 6172, \"1f5c4\": 6173, \"1f5d1\": 6174, \"1f5d2\": 6158, \"1f5d3\": 6159, \"1f5dc\": 6194, \"1f5dd\": 6180, \"1f5de\": 6117, \"1f5e1\": 6186, \"1f5e3\": 1480, \"1f5e8\": 1146, \"1f5ef\": 1147, \"1f5f3\": 6144, \"1f5fa\": 45, \"1f5fb\": 411, \"1f5fc\": 439, \"1f5fd\": 440, \"1f5fe\": 46, \"1f5ff\": 6233, \"1f600\": 11, \"1f601\": 14, \"1f602\": 18, \"1f603\": 12, \"1f604\": 13, \"1f605\": 16, \"1f606\": 15, \"1f607\": 113, \"1f608\": 191, \"1f609\": 111, \"1f60a\": 112, \"1f60b\": 122, \"1f60c\": 142, \"1f60d\": 115, \"1f60e\": 160, \"1f60f\": 137, \"1f610\": 134, \"1f611\": 135, \"1f612\": 138, \"1f613\": 183, \"1f614\": 143, \"1f615\": 163, \"1f616\": 180, \"1f617\": 118, \"1f618\": 117, \"1f619\": 121, \"1f61a\": 120, \"1f61b\": 123, \"1f61c\": 124, \"1f61d\": 126, \"1f61e\": 182, \"1f61f\": 164, \"1f620\": 189, \"1f621\": 188, \"1f622\": 177, \"1f623\": 181, \"1f624\": 187, \"1f625\": 176, \"1f626\": 172, \"1f627\": 173, \"1f628\": 174, \"1f629\": 184, \"1f62a\": 144, \"1f62b\": 185, \"1f62c\": 140, \"1f62d\": 178, \"1f62e\": 167, \"1f62f\": 168, \"1f630\": 175, \"1f631\": 179, \"1f632\": 169, \"1f633\": 170, \"1f634\": 146, \"1f635\": 156, \"1f636\": 136, \"1f637\": 147, \"1f638\": 1104, \"1f639\": 1105, \"1f63a\": 1103, \"1f63b\": 1106, \"1f63c\": 1107, \"1f63d\": 1108, \"1f63e\": 1111, \"1f63f\": 1110, \"1f640\": 1109, \"1f641\": 165, \"1f642\": 19, \"1f643\": 110, \"1f644\": 139, \"1f645-200d-2640-fe0f\": 1232, \"1f645-200d-2642-fe0f\": 1231, \"1f645\": 1230, \"1f646-200d-2640-fe0f\": 1235, \"1f646-200d-2642-fe0f\": 1234, \"1f646\": 1233, \"1f647-200d-2640-fe0f\": 1247, \"1f647-200d-2642-fe0f\": 1246, \"1f647\": 1245, \"1f648\": 1112, \"1f649\": 1113, \"1f64a\": 1114, \"1f64b-200d-2640-fe0f\": 1241, \"1f64b-200d-2642-fe0f\": 1240, \"1f64b\": 1239, \"1f64c\": 1175, \"1f64d-200d-2640-fe0f\": 1226, \"1f64d-200d-2642-fe0f\": 1225, \"1f64d\": 1224, \"1f64e-200d-2640-fe0f\": 1229, \"1f64e-200d-2642-fe0f\": 1228, \"1f64e\": 1227, \"1f64f\": 1179, \"1f680\": 4129, \"1f681\": 4124, \"1f682\": 463, \"1f683\": 464, \"1f684\": 465, \"1f685\": 466, \"1f686\": 467, \"1f687\": 468, \"1f688\": 469, \"1f689\": 470, \"1f68a\": 471, \"1f68b\": 474, \"1f68c\": 475, \"1f68d\": 476, \"1f68e\": 477, \"1f68f\": 4100, \"1f690\": 478, \"1f691\": 479, \"1f692\": 480, \"1f693\": 481, \"1f694\": 482, \"1f695\": 483, \"1f696\": 484, \"1f697\": 485, \"1f698\": 486, \"1f699\": 487, \"1f69a\": 488, \"1f69b\": 489, \"1f69c\": 490, \"1f69d\": 472, \"1f69e\": 473, \"1f69f\": 4125, \"1f6a0\": 4126, \"1f6a1\": 4127, \"1f6a2\": 4117, \"1f6a3-200d-2640-fe0f\": 1406, \"1f6a3-200d-2642-fe0f\": 1405, \"1f6a3\": 1404, \"1f6a4\": 4113, \"1f6a5\": 4106, \"1f6a6\": 4107, \"1f6a7\": 4109, \"1f6a8\": 4105, \"1f6a9\": 72, \"1f6aa\": 6213, \"1f6ab\": 6250, \"1f6ac\": 6230, \"1f6ad\": 6252, \"1f6ae\": 6235, \"1f6af\": 6253, \"1f6b0\": 6236, \"1f6b1\": 6254, \"1f6b2\": 497, \"1f6b3\": 6251, \"1f6b4-200d-2640-fe0f\": 1418, \"1f6b4-200d-2642-fe0f\": 1417, \"1f6b4\": 1416, \"1f6b5-200d-2640-fe0f\": 1421, \"1f6b5-200d-2642-fe0f\": 1420, \"1f6b5\": 1419, \"1f6b6-200d-2640-fe0f\": 1363, \"1f6b6-200d-2642-fe0f\": 1362, \"1f6b6\": 1361, \"1f6b7\": 6255, \"1f6b8\": 6248, \"1f6b9\": 6238, \"1f6ba\": 6239, \"1f6bb\": 6240, \"1f6bc\": 6241, \"1f6bd\": 6217, \"1f6be\": 6242, \"1f6bf\": 6218, \"1f6c0\": 1440, \"1f6c1\": 6219, \"1f6c2\": 6243, \"1f6c3\": 6244, \"1f6c4\": 6245, \"1f6c5\": 6246, \"1f6cb\": 6215, \"1f6cc\": 1441, \"1f6cd\": 624, \"1f6ce\": 4131, \"1f6cf\": 6214, \"1f6d0\": 6281, \"1f6d1\": 4108, \"1f6d2\": 6229, \"1f6d5\": 443, \"1f6e0\": 6185, \"1f6e1\": 6190, \"1f6e2\": 4103, \"1f6e3\": 4101, \"1f6e4\": 4102, \"1f6e5\": 4116, \"1f6e9\": 4119, \"1f6eb\": 4120, \"1f6ec\": 4121, \"1f6f0\": 4128, \"1f6f3\": 4114, \"1f6f4\": 498, \"1f6f5\": 493, \"1f6f6\": 4112, \"1f6f7\": 553, \"1f6f8\": 4130, \"1f6f9\": 499, \"1f6fa\": 496, \"1f7e0\": 6418, \"1f7e1\": 6419, \"1f7e2\": 6420, \"1f7e3\": 6422, \"1f7e4\": 6423, \"1f7e5\": 6426, \"1f7e6\": 6430, \"1f7e7\": 6427, \"1f7e8\": 6428, \"1f7e9\": 6429, \"1f7ea\": 6431, \"1f7eb\": 6432, \"1f90d\": 1135, \"1f90e\": 1133, \"1f90f\": 1156, \"1f910\": 132, \"1f911\": 127, \"1f912\": 148, \"1f913\": 161, \"1f914\": 131, \"1f915\": 149, \"1f916\": 1102, \"1f917\": 128, \"1f918\": 1160, \"1f919\": 1161, \"1f91a\": 1151, \"1f91b\": 1172, \"1f91c\": 1173, \"1f91d\": 1178, \"1f91e\": 1158, \"1f91f\": 1159, \"1f920\": 158, \"1f921\": 196, \"1f922\": 150, \"1f923\": 17, \"1f924\": 145, \"1f925\": 141, \"1f926-200d-2640-fe0f\": 1250, \"1f926-200d-2642-fe0f\": 1249, \"1f926\": 1248, \"1f927\": 152, \"1f928\": 133, \"1f929\": 116, \"1f92a\": 125, \"1f92b\": 130, \"1f92c\": 190, \"1f92d\": 129, \"1f92e\": 151, \"1f92f\": 157, \"1f930\": 1323, \"1f931\": 1324, \"1f932\": 1177, \"1f933\": 1182, \"1f934\": 1314, \"1f935\": 1321, \"1f936\": 1327, \"1f937-200d-2640-fe0f\": 1253, \"1f937-200d-2642-fe0f\": 1252, \"1f937\": 1251, \"1f938-200d-2640-fe0f\": 1424, \"1f938-200d-2642-fe0f\": 1423, \"1f938\": 1422, \"1f939-200d-2640-fe0f\": 1436, \"1f939-200d-2642-fe0f\": 1435, \"1f939\": 1434, \"1f93a\": 1394, \"1f93c-200d-2640-fe0f\": 1427, \"1f93c-200d-2642-fe0f\": 1426, \"1f93c\": 1425, \"1f93d-200d-2640-fe0f\": 1430, \"1f93d-200d-2642-fe0f\": 1429, \"1f93d\": 1428, \"1f93e-200d-2640-fe0f\": 1433, \"1f93e-200d-2642-fe0f\": 1432, \"1f93e\": 1431, \"1f93f\": 550, \"1f940\": 2111, \"1f941\": 668, \"1f942\": 3110, \"1f943\": 3111, \"1f944\": 3119, \"1f945\": 546, \"1f947\": 525, \"1f948\": 526, \"1f949\": 527, \"1f94a\": 544, \"1f94b\": 545, \"1f94c\": 554, \"1f94d\": 541, \"1f94e\": 530, \"1f94f\": 536, \"1f950\": 333, \"1f951\": 318, \"1f952\": 324, \"1f953\": 343, \"1f954\": 320, \"1f955\": 321, \"1f956\": 334, \"1f957\": 358, \"1f958\": 355, \"1f959\": 351, \"1f95a\": 353, \"1f95b\": 3100, \"1f95c\": 330, \"1f95d\": 315, \"1f95e\": 337, \"1f95f\": 377, \"1f960\": 378, \"1f961\": 379, \"1f962\": 3116, \"1f963\": 357, \"1f964\": 3112, \"1f965\": 317, \"1f966\": 326, \"1f967\": 393, \"1f968\": 335, \"1f969\": 342, \"1f96a\": 348, \"1f96b\": 362, \"1f96c\": 325, \"1f96d\": 38, \"1f96e\": 375, \"1f96f\": 336, \"1f970\": 114, \"1f971\": 186, \"1f973\": 159, \"1f974\": 155, \"1f975\": 153, \"1f976\": 154, \"1f97a\": 171, \"1f97b\": 615, \"1f97c\": 64, \"1f97d\": 63, \"1f97e\": 628, \"1f97f\": 629, \"1f980\": 380, \"1f981\": 215, \"1f982\": 2103, \"1f983\": 260, \"1f984\": 221, \"1f985\": 269, \"1f986\": 270, \"1f987\": 250, \"1f988\": 291, \"1f989\": 272, \"1f98a\": 211, \"1f98b\": 295, \"1f98c\": 223, \"1f98d\": 23, \"1f98e\": 279, \"1f98f\": 240, \"1f990\": 382, \"1f991\": 383, \"1f992\": 238, \"1f993\": 222, \"1f994\": 249, \"1f995\": 283, \"1f996\": 284, \"1f997\": 2100, \"1f998\": 257, \"1f999\": 237, \"1f99a\": 274, \"1f99b\": 241, \"1f99c\": 275, \"1f99d\": 212, \"1f99e\": 381, \"1f99f\": 2104, \"1f9a0\": 2105, \"1f9a1\": 258, \"1f9a2\": 271, \"1f9a5\": 254, \"1f9a6\": 255, \"1f9a7\": 24, \"1f9a8\": 256, \"1f9a9\": 273, \"1f9aa\": 384, \"1f9ae\": 27, \"1f9af\": 6196, \"1f9b4\": 1193, \"1f9b5\": 1186, \"1f9b6\": 1187, \"1f9b7\": 1192, \"1f9b8-200d-2640-fe0f\": 1330, \"1f9b8-200d-2642-fe0f\": 1329, \"1f9b8\": 1328, \"1f9b9-200d-2640-fe0f\": 1333, \"1f9b9-200d-2642-fe0f\": 1332, \"1f9b9\": 1331, \"1f9ba\": 65, \"1f9bb\": 1189, \"1f9bc\": 495, \"1f9bd\": 494, \"1f9be\": 1184, \"1f9bf\": 1185, \"1f9c0\": 339, \"1f9c1\": 392, \"1f9c2\": 361, \"1f9c3\": 3113, \"1f9c4\": 327, \"1f9c5\": 328, \"1f9c6\": 352, \"1f9c7\": 338, \"1f9c8\": 360, \"1f9c9\": 3114, \"1f9ca\": 3115, \"1f9cd-200d-2640-fe0f\": 1366, \"1f9cd-200d-2642-fe0f\": 1365, \"1f9cd\": 1364, \"1f9ce-200d-2640-fe0f\": 1369, \"1f9ce-200d-2642-fe0f\": 1368, \"1f9ce\": 1367, \"1f9cf-200d-2640-fe0f\": 1244, \"1f9cf-200d-2642-fe0f\": 1243, \"1f9cf\": 1242, \"1f9d0\": 162, \"1f9d1-200d-1f33e\": 1266, \"1f9d1-200d-1f373\": 1269, \"1f9d1-200d-1f393\": 1257, \"1f9d1-200d-1f3a4\": 1287, \"1f9d1-200d-1f3a8\": 1290, \"1f9d1-200d-1f3eb\": 1260, \"1f9d1-200d-1f3ed\": 1275, \"1f9d1-200d-1f4bb\": 1284, \"1f9d1-200d-1f4bc\": 1278, \"1f9d1-200d-1f527\": 1272, \"1f9d1-200d-1f52c\": 1281, \"1f9d1-200d-1f680\": 1296, \"1f9d1-200d-1f692\": 1299, \"1f9d1-200d-1f91d-200d-1f9d1\": 1442, \"1f9d1-200d-1f9af\": 1370, \"1f9d1-200d-1f9b0\": 1212, \"1f9d1-200d-1f9b1\": 1214, \"1f9d1-200d-1f9b2\": 1218, \"1f9d1-200d-1f9b3\": 1216, \"1f9d1-200d-1f9bc\": 1373, \"1f9d1-200d-1f9bd\": 1376, \"1f9d1-200d-2695-fe0f\": 1254, \"1f9d1-200d-2696-fe0f\": 1263, \"1f9d1-200d-2708-fe0f\": 1293, \"1f9d1\": 1202, \"1f9d2\": 1199, \"1f9d3\": 1221, \"1f9d4\": 1205, \"1f9d5\": 1320, \"1f9d6-200d-2640-fe0f\": 1390, \"1f9d6-200d-2642-fe0f\": 1389, \"1f9d6\": 1388, \"1f9d7-200d-2640-fe0f\": 1393, \"1f9d7-200d-2642-fe0f\": 1392, \"1f9d7\": 1391, \"1f9d8-200d-2640-fe0f\": 1439, \"1f9d8-200d-2642-fe0f\": 1438, \"1f9d8\": 1437, \"1f9d9-200d-2640-fe0f\": 1336, \"1f9d9-200d-2642-fe0f\": 1335, \"1f9d9\": 1334, \"1f9da-200d-2640-fe0f\": 1339, \"1f9da-200d-2642-fe0f\": 1338, \"1f9da\": 1337, \"1f9db-200d-2640-fe0f\": 1342, \"1f9db-200d-2642-fe0f\": 1341, \"1f9db\": 1340, \"1f9dc-200d-2640-fe0f\": 1345, \"1f9dc-200d-2642-fe0f\": 1344, \"1f9dc\": 1343, \"1f9dd-200d-2640-fe0f\": 1348, \"1f9dd-200d-2642-fe0f\": 1347, \"1f9dd\": 1346, \"1f9de-200d-2640-fe0f\": 1351, \"1f9de-200d-2642-fe0f\": 1350, \"1f9de\": 1349, \"1f9df-200d-2640-fe0f\": 1354, \"1f9df-200d-2642-fe0f\": 1353, \"1f9df\": 1352, \"1f9e0\": 1191, \"1f9e1\": 1128, \"1f9e2\": 638, \"1f9e3\": 69, \"1f9e4\": 610, \"1f9e5\": 611, \"1f9e6\": 612, \"1f9e7\": 516, \"1f9e8\": 55, \"1f9e9\": 565, \"1f9ea\": 6202, \"1f9eb\": 6203, \"1f9ec\": 6204, \"1f9ed\": 47, \"1f9ee\": 687, \"1f9ef\": 6228, \"1f9f0\": 6199, \"1f9f1\": 420, \"1f9f2\": 6200, \"1f9f3\": 4132, \"1f9f4\": 6221, \"1f9f5\": 578, \"1f9f6\": 579, \"1f9f7\": 6222, \"1f9f8\": 566, \"1f9f9\": 6223, \"1f9fa\": 6224, \"1f9fb\": 6225, \"1f9fc\": 6226, \"1f9fd\": 6227, \"1f9fe\": 6128, \"1f9ff\": 560, \"1fa70\": 632, \"1fa71\": 616, \"1fa72\": 617, \"1fa73\": 618, \"1fa78\": 6209, \"1fa79\": 6211, \"1fa7a\": 6212, \"1fa80\": 556, \"1fa81\": 557, \"1fa82\": 4122, \"1fa90\": 4180, \"1fa91\": 6216, \"1fa92\": 6220, \"1fa93\": 6182, \"1fa94\": 6103, \"1fa95\": 667, \"203c\": 6355, \"21a9\": 6270, \"21aa\": 6271, \"231a\": 4135, \"231b\": 4133, \"23cf\": 6323, \"23e9\": 6310, \"23ea\": 6314, \"23eb\": 6317, \"23ec\": 6319, \"23ed\": 6311, \"23ee\": 6315, \"23ef\": 6312, \"23f0\": 4136, \"23f1\": 4137, \"23f2\": 4138, \"23f3\": 4134, \"23f8\": 6320, \"23f9\": 6321, \"23fa\": 6322, \"24c2\": 6391, \"25aa\": 6439, \"25ab\": 6440, \"25b6\": 6309, \"25c0\": 6313, \"25fb\": 6436, \"25fc\": 6435, \"25fd\": 6438, \"25fe\": 6437, \"260e\": 671, \"261d\": 1167, \"262a\": 6289, \"262e\": 6290, \"262f\": 6286, \"263a\": 119, \"264a\": 6295, \"264b\": 6296, \"264c\": 6297, \"264d\": 6298, \"264e\": 6299, \"264f\": 6300, \"265f\": 571, \"267b\": 6334, \"267e\": 6333, \"267f\": 6237, \"269b\": 6282, \"269c\": 6335, \"26a0\": 6247, \"26a1\": 4203, \"26aa\": 6425, \"26ab\": 6424, \"26b0\": 6231, \"26b1\": 6232, \"26bd\": 528, \"26be\": 529, \"26c4\": 4206, \"26c5\": 4186, \"26c8\": 4187, \"26ce\": 6305, \"26cf\": 6183, \"26d1\": 639, \"26d3\": 6198, \"26d4\": 6249, \"26e9\": 445, \"26ea\": 441, \"26f0\": 49, \"26f1\": 4202, \"26f2\": 447, \"26f3\": 547, \"26f4\": 4115, \"26f5\": 4111, \"26f7\": 1396, \"26f8\": 548, \"26f9-fe0f-200d-2640-fe0f\": 1412, \"26f9-fe0f-200d-2642-fe0f\": 1411, \"26f9\": 1410, \"26fa\": 448, \"26fd\": 4104, \"270a\": 1170, \"270b\": 1153, \"270c\": 1157, \"270d\": 1180, \"270f\": 6145, \"271d\": 6287, \"274c\": 6344, \"274e\": 6345, \"27a1\": 6262, \"27b0\": 6349, \"27bf\": 6350, \"2b05\": 6266, \"2b06\": 6260, \"2b07\": 6264, \"2b1b\": 6433, \"2b1c\": 6434, \"2b50\": 4181, \"2b55\": 6339, \"303d\": 6351, \"1f385-1f3fb\": 0, \"1f385-1f3fc\": 0, \"1f385-1f3fd\": 0, \"1f385-1f3fe\": 0, \"1f385-1f3ff\": 0, \"1f3c2-1f3fb\": 0, \"1f3c2-1f3fc\": 0, \"1f3c2-1f3fd\": 0, \"1f3c2-1f3fe\": 0, \"1f3c2-1f3ff\": 0, \"1f3c3-1f3fb-200d-2640-fe0f\": 0, \"1f3c3-1f3fc-200d-2640-fe0f\": 0, \"1f3c3-1f3fd-200d-2640-fe0f\": 0, \"1f3c3-1f3fe-200d-2640-fe0f\": 0, \"1f3c3-1f3ff-200d-2640-fe0f\": 0, \"1f3c3-1f3fb-200d-2642-fe0f\": 0, \"1f3c3-1f3fc-200d-2642-fe0f\": 0, \"1f3c3-1f3fd-200d-2642-fe0f\": 0, \"1f3c3-1f3fe-200d-2642-fe0f\": 0, \"1f3c3-1f3ff-200d-2642-fe0f\": 0, \"1f3c3-1f3fb\": 0, \"1f3c3-1f3fc\": 0, \"1f3c3-1f3fd\": 0, \"1f3c3-1f3fe\": 0, \"1f3c3-1f3ff\": 0, \"1f3c4-1f3fb-200d-2640-fe0f\": 0, \"1f3c4-1f3fc-200d-2640-fe0f\": 0, \"1f3c4-1f3fd-200d-2640-fe0f\": 0, \"1f3c4-1f3fe-200d-2640-fe0f\": 0, \"1f3c4-1f3ff-200d-2640-fe0f\": 0, \"1f3c4-1f3fb-200d-2642-fe0f\": 0, \"1f3c4-1f3fc-200d-2642-fe0f\": 0, \"1f3c4-1f3fd-200d-2642-fe0f\": 0, \"1f3c4-1f3fe-200d-2642-fe0f\": 0, \"1f3c4-1f3ff-200d-2642-fe0f\": 0, \"1f3c4-1f3fb\": 0, \"1f3c4-1f3fc\": 0, \"1f3c4-1f3fd\": 0, \"1f3c4-1f3fe\": 0, \"1f3c4-1f3ff\": 0, \"1f3c7-1f3fb\": 0, \"1f3c7-1f3fc\": 0, \"1f3c7-1f3fd\": 0, \"1f3c7-1f3fe\": 0, \"1f3c7-1f3ff\": 0, \"1f3ca-1f3fb-200d-2640-fe0f\": 0, \"1f3ca-1f3fc-200d-2640-fe0f\": 0, \"1f3ca-1f3fd-200d-2640-fe0f\": 0, \"1f3ca-1f3fe-200d-2640-fe0f\": 0, \"1f3ca-1f3ff-200d-2640-fe0f\": 0, \"1f3ca-1f3fb-200d-2642-fe0f\": 0, \"1f3ca-1f3fc-200d-2642-fe0f\": 0, \"1f3ca-1f3fd-200d-2642-fe0f\": 0, \"1f3ca-1f3fe-200d-2642-fe0f\": 0, \"1f3ca-1f3ff-200d-2642-fe0f\": 0, \"1f3ca-1f3fb\": 0, \"1f3ca-1f3fc\": 0, \"1f3ca-1f3fd\": 0, \"1f3ca-1f3fe\": 0, \"1f3ca-1f3ff\": 0, \"1f3cb-1f3fb-200d-2640-fe0f\": 0, \"1f3cb-1f3fc-200d-2640-fe0f\": 0, \"1f3cb-1f3fd-200d-2640-fe0f\": 0, \"1f3cb-1f3fe-200d-2640-fe0f\": 0, \"1f3cb-1f3ff-200d-2640-fe0f\": 0, \"1f3cb-1f3fb-200d-2642-fe0f\": 0, \"1f3cb-1f3fc-200d-2642-fe0f\": 0, \"1f3cb-1f3fd-200d-2642-fe0f\": 0, \"1f3cb-1f3fe-200d-2642-fe0f\": 0, \"1f3cb-1f3ff-200d-2642-fe0f\": 0, \"1f3cb-1f3fb\": 0, \"1f3cb-1f3fc\": 0, \"1f3cb-1f3fd\": 0, \"1f3cb-1f3fe\": 0, \"1f3cb-1f3ff\": 0, \"1f3cc-1f3fb-200d-2640-fe0f\": 0, \"1f3cc-1f3fc-200d-2640-fe0f\": 0, \"1f3cc-1f3fd-200d-2640-fe0f\": 0, \"1f3cc-1f3fe-200d-2640-fe0f\": 0, \"1f3cc-1f3ff-200d-2640-fe0f\": 0, \"1f3cc-1f3fb-200d-2642-fe0f\": 0, \"1f3cc-1f3fc-200d-2642-fe0f\": 0, \"1f3cc-1f3fd-200d-2642-fe0f\": 0, \"1f3cc-1f3fe-200d-2642-fe0f\": 0, \"1f3cc-1f3ff-200d-2642-fe0f\": 0, \"1f3cc-1f3fb\": 0, \"1f3cc-1f3fc\": 0, \"1f3cc-1f3fd\": 0, \"1f3cc-1f3fe\": 0, \"1f3cc-1f3ff\": 0, \"1f442-1f3fb\": 0, \"1f442-1f3fc\": 0, \"1f442-1f3fd\": 0, \"1f442-1f3fe\": 0, \"1f442-1f3ff\": 0, \"1f443-1f3fb\": 0, \"1f443-1f3fc\": 0, \"1f443-1f3fd\": 0, \"1f443-1f3fe\": 0, \"1f443-1f3ff\": 0, \"1f446-1f3fb\": 0, \"1f446-1f3fc\": 0, \"1f446-1f3fd\": 0, \"1f446-1f3fe\": 0, \"1f446-1f3ff\": 0, \"1f447-1f3fb\": 0, \"1f447-1f3fc\": 0, \"1f447-1f3fd\": 0, \"1f447-1f3fe\": 0, \"1f447-1f3ff\": 0, \"1f448-1f3fb\": 0, \"1f448-1f3fc\": 0, \"1f448-1f3fd\": 0, \"1f448-1f3fe\": 0, \"1f448-1f3ff\": 0, \"1f449-1f3fb\": 0, \"1f449-1f3fc\": 0, \"1f449-1f3fd\": 0, \"1f449-1f3fe\": 0, \"1f449-1f3ff\": 0, \"1f44a-1f3fb\": 0, \"1f44a-1f3fc\": 0, \"1f44a-1f3fd\": 0, \"1f44a-1f3fe\": 0, \"1f44a-1f3ff\": 0, \"1f44b-1f3fb\": 0, \"1f44b-1f3fc\": 0, \"1f44b-1f3fd\": 0, \"1f44b-1f3fe\": 0, \"1f44b-1f3ff\": 0, \"1f44c-1f3fb\": 0, \"1f44c-1f3fc\": 0, \"1f44c-1f3fd\": 0, \"1f44c-1f3fe\": 0, \"1f44c-1f3ff\": 0, \"1f44d-1f3fb\": 0, \"1f44d-1f3fc\": 0, \"1f44d-1f3fd\": 0, \"1f44d-1f3fe\": 0, \"1f44d-1f3ff\": 0, \"1f44e-1f3fb\": 0, \"1f44e-1f3fc\": 0, \"1f44e-1f3fd\": 0, \"1f44e-1f3fe\": 0, \"1f44e-1f3ff\": 0, \"1f44f-1f3fb\": 0, \"1f44f-1f3fc\": 0, \"1f44f-1f3fd\": 0, \"1f44f-1f3fe\": 0, \"1f44f-1f3ff\": 0, \"1f450-1f3fb\": 0, \"1f450-1f3fc\": 0, \"1f450-1f3fd\": 0, \"1f450-1f3fe\": 0, \"1f450-1f3ff\": 0, \"1f466-1f3fb\": 0, \"1f466-1f3fc\": 0, \"1f466-1f3fd\": 0, \"1f466-1f3fe\": 0, \"1f466-1f3ff\": 0, \"1f467-1f3fb\": 0, \"1f467-1f3fc\": 0, \"1f467-1f3fd\": 0, \"1f467-1f3fe\": 0, \"1f467-1f3ff\": 0, \"1f468-1f3fb-200d-1f33e\": 0, \"1f468-1f3fc-200d-1f33e\": 0, \"1f468-1f3fd-200d-1f33e\": 0, \"1f468-1f3fe-200d-1f33e\": 0, \"1f468-1f3ff-200d-1f33e\": 0, \"1f468-1f3fb-200d-1f373\": 0, \"1f468-1f3fc-200d-1f373\": 0, \"1f468-1f3fd-200d-1f373\": 0, \"1f468-1f3fe-200d-1f373\": 0, \"1f468-1f3ff-200d-1f373\": 0, \"1f468-1f3fb-200d-1f393\": 0, \"1f468-1f3fc-200d-1f393\": 0, \"1f468-1f3fd-200d-1f393\": 0, \"1f468-1f3fe-200d-1f393\": 0, \"1f468-1f3ff-200d-1f393\": 0, \"1f468-1f3fb-200d-1f3a4\": 0, \"1f468-1f3fc-200d-1f3a4\": 0, \"1f468-1f3fd-200d-1f3a4\": 0, \"1f468-1f3fe-200d-1f3a4\": 0, \"1f468-1f3ff-200d-1f3a4\": 0, \"1f468-1f3fb-200d-1f3a8\": 0, \"1f468-1f3fc-200d-1f3a8\": 0, \"1f468-1f3fd-200d-1f3a8\": 0, \"1f468-1f3fe-200d-1f3a8\": 0, \"1f468-1f3ff-200d-1f3a8\": 0, \"1f468-1f3fb-200d-1f3eb\": 0, \"1f468-1f3fc-200d-1f3eb\": 0, \"1f468-1f3fd-200d-1f3eb\": 0, \"1f468-1f3fe-200d-1f3eb\": 0, \"1f468-1f3ff-200d-1f3eb\": 0, \"1f468-1f3fb-200d-1f3ed\": 0, \"1f468-1f3fc-200d-1f3ed\": 0, \"1f468-1f3fd-200d-1f3ed\": 0, \"1f468-1f3fe-200d-1f3ed\": 0, \"1f468-1f3ff-200d-1f3ed\": 0, \"1f468-1f3fb-200d-1f4bb\": 0, \"1f468-1f3fc-200d-1f4bb\": 0, \"1f468-1f3fd-200d-1f4bb\": 0, \"1f468-1f3fe-200d-1f4bb\": 0, \"1f468-1f3ff-200d-1f4bb\": 0, \"1f468-1f3fb-200d-1f4bc\": 0, \"1f468-1f3fc-200d-1f4bc\": 0, \"1f468-1f3fd-200d-1f4bc\": 0, \"1f468-1f3fe-200d-1f4bc\": 0, \"1f468-1f3ff-200d-1f4bc\": 0, \"1f468-1f3fb-200d-1f527\": 0, \"1f468-1f3fc-200d-1f527\": 0, \"1f468-1f3fd-200d-1f527\": 0, \"1f468-1f3fe-200d-1f527\": 0, \"1f468-1f3ff-200d-1f527\": 0, \"1f468-1f3fb-200d-1f52c\": 0, \"1f468-1f3fc-200d-1f52c\": 0, \"1f468-1f3fd-200d-1f52c\": 0, \"1f468-1f3fe-200d-1f52c\": 0, \"1f468-1f3ff-200d-1f52c\": 0, \"1f468-1f3fb-200d-1f680\": 0, \"1f468-1f3fc-200d-1f680\": 0, \"1f468-1f3fd-200d-1f680\": 0, \"1f468-1f3fe-200d-1f680\": 0, \"1f468-1f3ff-200d-1f680\": 0, \"1f468-1f3fb-200d-1f692\": 0, \"1f468-1f3fc-200d-1f692\": 0, \"1f468-1f3fd-200d-1f692\": 0, \"1f468-1f3fe-200d-1f692\": 0, \"1f468-1f3ff-200d-1f692\": 0, \"1f468-1f3fb-200d-1f9af\": 0, \"1f468-1f3fc-200d-1f9af\": 0, \"1f468-1f3fd-200d-1f9af\": 0, \"1f468-1f3fe-200d-1f9af\": 0, \"1f468-1f3ff-200d-1f9af\": 0, \"1f468-1f3fb-200d-1f9b0\": 0, \"1f468-1f3fc-200d-1f9b0\": 0, \"1f468-1f3fd-200d-1f9b0\": 0, \"1f468-1f3fe-200d-1f9b0\": 0, \"1f468-1f3ff-200d-1f9b0\": 0, \"1f468-1f3fb-200d-1f9b1\": 0, \"1f468-1f3fc-200d-1f9b1\": 0, \"1f468-1f3fd-200d-1f9b1\": 0, \"1f468-1f3fe-200d-1f9b1\": 0, \"1f468-1f3ff-200d-1f9b1\": 0, \"1f468-1f3fb-200d-1f9b2\": 0, \"1f468-1f3fc-200d-1f9b2\": 0, \"1f468-1f3fd-200d-1f9b2\": 0, \"1f468-1f3fe-200d-1f9b2\": 0, \"1f468-1f3ff-200d-1f9b2\": 0, \"1f468-1f3fb-200d-1f9b3\": 0, \"1f468-1f3fc-200d-1f9b3\": 0, \"1f468-1f3fd-200d-1f9b3\": 0, \"1f468-1f3fe-200d-1f9b3\": 0, \"1f468-1f3ff-200d-1f9b3\": 0, \"1f468-1f3fb-200d-1f9bc\": 0, \"1f468-1f3fc-200d-1f9bc\": 0, \"1f468-1f3fd-200d-1f9bc\": 0, \"1f468-1f3fe-200d-1f9bc\": 0, \"1f468-1f3ff-200d-1f9bc\": 0, \"1f468-1f3fb-200d-1f9bd\": 0, \"1f468-1f3fc-200d-1f9bd\": 0, \"1f468-1f3fd-200d-1f9bd\": 0, \"1f468-1f3fe-200d-1f9bd\": 0, \"1f468-1f3ff-200d-1f9bd\": 0, \"1f468-1f3fb-200d-2695-fe0f\": 0, \"1f468-1f3fc-200d-2695-fe0f\": 0, \"1f468-1f3fd-200d-2695-fe0f\": 0, \"1f468-1f3fe-200d-2695-fe0f\": 0, \"1f468-1f3ff-200d-2695-fe0f\": 0, \"1f468-1f3fb-200d-2696-fe0f\": 0, \"1f468-1f3fc-200d-2696-fe0f\": 0, \"1f468-1f3fd-200d-2696-fe0f\": 0, \"1f468-1f3fe-200d-2696-fe0f\": 0, \"1f468-1f3ff-200d-2696-fe0f\": 0, \"1f468-1f3fb-200d-2708-fe0f\": 0, \"1f468-1f3fc-200d-2708-fe0f\": 0, \"1f468-1f3fd-200d-2708-fe0f\": 0, \"1f468-1f3fe-200d-2708-fe0f\": 0, \"1f468-1f3ff-200d-2708-fe0f\": 0, \"1f468-1f3fb\": 0, \"1f468-1f3fc\": 0, \"1f468-1f3fd\": 0, \"1f468-1f3fe\": 0, \"1f468-1f3ff\": 0, \"1f469-1f3fb-200d-1f33e\": 0, \"1f469-1f3fc-200d-1f33e\": 0, \"1f469-1f3fd-200d-1f33e\": 0, \"1f469-1f3fe-200d-1f33e\": 0, \"1f469-1f3ff-200d-1f33e\": 0, \"1f469-1f3fb-200d-1f373\": 0, \"1f469-1f3fc-200d-1f373\": 0, \"1f469-1f3fd-200d-1f373\": 0, \"1f469-1f3fe-200d-1f373\": 0, \"1f469-1f3ff-200d-1f373\": 0, \"1f469-1f3fb-200d-1f393\": 0, \"1f469-1f3fc-200d-1f393\": 0, \"1f469-1f3fd-200d-1f393\": 0, \"1f469-1f3fe-200d-1f393\": 0, \"1f469-1f3ff-200d-1f393\": 0, \"1f469-1f3fb-200d-1f3a4\": 0, \"1f469-1f3fc-200d-1f3a4\": 0, \"1f469-1f3fd-200d-1f3a4\": 0, \"1f469-1f3fe-200d-1f3a4\": 0, \"1f469-1f3ff-200d-1f3a4\": 0, \"1f469-1f3fb-200d-1f3a8\": 0, \"1f469-1f3fc-200d-1f3a8\": 0, \"1f469-1f3fd-200d-1f3a8\": 0, \"1f469-1f3fe-200d-1f3a8\": 0, \"1f469-1f3ff-200d-1f3a8\": 0, \"1f469-1f3fb-200d-1f3eb\": 0, \"1f469-1f3fc-200d-1f3eb\": 0, \"1f469-1f3fd-200d-1f3eb\": 0, \"1f469-1f3fe-200d-1f3eb\": 0, \"1f469-1f3ff-200d-1f3eb\": 0, \"1f469-1f3fb-200d-1f3ed\": 0, \"1f469-1f3fc-200d-1f3ed\": 0, \"1f469-1f3fd-200d-1f3ed\": 0, \"1f469-1f3fe-200d-1f3ed\": 0, \"1f469-1f3ff-200d-1f3ed\": 0, \"1f469-1f3fb-200d-1f4bb\": 0, \"1f469-1f3fc-200d-1f4bb\": 0, \"1f469-1f3fd-200d-1f4bb\": 0, \"1f469-1f3fe-200d-1f4bb\": 0, \"1f469-1f3ff-200d-1f4bb\": 0, \"1f469-1f3fb-200d-1f4bc\": 0, \"1f469-1f3fc-200d-1f4bc\": 0, \"1f469-1f3fd-200d-1f4bc\": 0, \"1f469-1f3fe-200d-1f4bc\": 0, \"1f469-1f3ff-200d-1f4bc\": 0, \"1f469-1f3fb-200d-1f527\": 0, \"1f469-1f3fc-200d-1f527\": 0, \"1f469-1f3fd-200d-1f527\": 0, \"1f469-1f3fe-200d-1f527\": 0, \"1f469-1f3ff-200d-1f527\": 0, \"1f469-1f3fb-200d-1f52c\": 0, \"1f469-1f3fc-200d-1f52c\": 0, \"1f469-1f3fd-200d-1f52c\": 0, \"1f469-1f3fe-200d-1f52c\": 0, \"1f469-1f3ff-200d-1f52c\": 0, \"1f469-1f3fb-200d-1f680\": 0, \"1f469-1f3fc-200d-1f680\": 0, \"1f469-1f3fd-200d-1f680\": 0, \"1f469-1f3fe-200d-1f680\": 0, \"1f469-1f3ff-200d-1f680\": 0, \"1f469-1f3fb-200d-1f692\": 0, \"1f469-1f3fc-200d-1f692\": 0, \"1f469-1f3fd-200d-1f692\": 0, \"1f469-1f3fe-200d-1f692\": 0, \"1f469-1f3ff-200d-1f692\": 0, \"1f469-1f3fb-200d-1f9af\": 0, \"1f469-1f3fc-200d-1f9af\": 0, \"1f469-1f3fd-200d-1f9af\": 0, \"1f469-1f3fe-200d-1f9af\": 0, \"1f469-1f3ff-200d-1f9af\": 0, \"1f469-1f3fb-200d-1f9b0\": 0, \"1f469-1f3fc-200d-1f9b0\": 0, \"1f469-1f3fd-200d-1f9b0\": 0, \"1f469-1f3fe-200d-1f9b0\": 0, \"1f469-1f3ff-200d-1f9b0\": 0, \"1f469-1f3fb-200d-1f9b1\": 0, \"1f469-1f3fc-200d-1f9b1\": 0, \"1f469-1f3fd-200d-1f9b1\": 0, \"1f469-1f3fe-200d-1f9b1\": 0, \"1f469-1f3ff-200d-1f9b1\": 0, \"1f469-1f3fb-200d-1f9b2\": 0, \"1f469-1f3fc-200d-1f9b2\": 0, \"1f469-1f3fd-200d-1f9b2\": 0, \"1f469-1f3fe-200d-1f9b2\": 0, \"1f469-1f3ff-200d-1f9b2\": 0, \"1f469-1f3fb-200d-1f9b3\": 0, \"1f469-1f3fc-200d-1f9b3\": 0, \"1f469-1f3fd-200d-1f9b3\": 0, \"1f469-1f3fe-200d-1f9b3\": 0, \"1f469-1f3ff-200d-1f9b3\": 0, \"1f469-1f3fb-200d-1f9bc\": 0, \"1f469-1f3fc-200d-1f9bc\": 0, \"1f469-1f3fd-200d-1f9bc\": 0, \"1f469-1f3fe-200d-1f9bc\": 0, \"1f469-1f3ff-200d-1f9bc\": 0, \"1f469-1f3fb-200d-1f9bd\": 0, \"1f469-1f3fc-200d-1f9bd\": 0, \"1f469-1f3fd-200d-1f9bd\": 0, \"1f469-1f3fe-200d-1f9bd\": 0, \"1f469-1f3ff-200d-1f9bd\": 0, \"1f469-1f3fb-200d-2695-fe0f\": 0, \"1f469-1f3fc-200d-2695-fe0f\": 0, \"1f469-1f3fd-200d-2695-fe0f\": 0, \"1f469-1f3fe-200d-2695-fe0f\": 0, \"1f469-1f3ff-200d-2695-fe0f\": 0, \"1f469-1f3fb-200d-2696-fe0f\": 0, \"1f469-1f3fc-200d-2696-fe0f\": 0, \"1f469-1f3fd-200d-2696-fe0f\": 0, \"1f469-1f3fe-200d-2696-fe0f\": 0, \"1f469-1f3ff-200d-2696-fe0f\": 0, \"1f469-1f3fb-200d-2708-fe0f\": 0, \"1f469-1f3fc-200d-2708-fe0f\": 0, \"1f469-1f3fd-200d-2708-fe0f\": 0, \"1f469-1f3fe-200d-2708-fe0f\": 0, \"1f469-1f3ff-200d-2708-fe0f\": 0, \"1f469-1f3fb\": 0, \"1f469-1f3fc\": 0, \"1f469-1f3fd\": 0, \"1f469-1f3fe\": 0, \"1f469-1f3ff\": 0, \"1f46b-1f3fb\": 0, \"1f46b-1f3fc\": 0, \"1f46b-1f3fd\": 0, \"1f46b-1f3fe\": 0, \"1f46b-1f3ff\": 0, \"1f469-1f3fb-200d-1f91d-200d-1f468-1f3fc\": 0, \"1f469-1f3fb-200d-1f91d-200d-1f468-1f3fd\": 0, \"1f469-1f3fb-200d-1f91d-200d-1f468-1f3fe\": 0, \"1f469-1f3fb-200d-1f91d-200d-1f468-1f3ff\": 0, \"1f469-1f3fc-200d-1f91d-200d-1f468-1f3fb\": 0, \"1f469-1f3fc-200d-1f91d-200d-1f468-1f3fd\": 0, \"1f469-1f3fc-200d-1f91d-200d-1f468-1f3fe\": 0, \"1f469-1f3fc-200d-1f91d-200d-1f468-1f3ff\": 0, \"1f469-1f3fd-200d-1f91d-200d-1f468-1f3fb\": 0, \"1f469-1f3fd-200d-1f91d-200d-1f468-1f3fc\": 0, \"1f469-1f3fd-200d-1f91d-200d-1f468-1f3fe\": 0, \"1f469-1f3fd-200d-1f91d-200d-1f468-1f3ff\": 0, \"1f469-1f3fe-200d-1f91d-200d-1f468-1f3fb\": 0, \"1f469-1f3fe-200d-1f91d-200d-1f468-1f3fc\": 0, \"1f469-1f3fe-200d-1f91d-200d-1f468-1f3fd\": 0, \"1f469-1f3fe-200d-1f91d-200d-1f468-1f3ff\": 0, \"1f469-1f3ff-200d-1f91d-200d-1f468-1f3fb\": 0, \"1f469-1f3ff-200d-1f91d-200d-1f468-1f3fc\": 0, \"1f469-1f3ff-200d-1f91d-200d-1f468-1f3fd\": 0, \"1f469-1f3ff-200d-1f91d-200d-1f468-1f3fe\": 0, \"1f46c-1f3fb\": 0, \"1f46c-1f3fc\": 0, \"1f46c-1f3fd\": 0, \"1f46c-1f3fe\": 0, \"1f46c-1f3ff\": 0, \"1f468-1f3fb-200d-1f91d-200d-1f468-1f3fc\": 0, \"1f468-1f3fb-200d-1f91d-200d-1f468-1f3fd\": 0, \"1f468-1f3fb-200d-1f91d-200d-1f468-1f3fe\": 0, \"1f468-1f3fb-200d-1f91d-200d-1f468-1f3ff\": 0, \"1f468-1f3fc-200d-1f91d-200d-1f468-1f3fb\": 0, \"1f468-1f3fc-200d-1f91d-200d-1f468-1f3fd\": 0, \"1f468-1f3fc-200d-1f91d-200d-1f468-1f3fe\": 0, \"1f468-1f3fc-200d-1f91d-200d-1f468-1f3ff\": 0, \"1f468-1f3fd-200d-1f91d-200d-1f468-1f3fb\": 0, \"1f468-1f3fd-200d-1f91d-200d-1f468-1f3fc\": 0, \"1f468-1f3fd-200d-1f91d-200d-1f468-1f3fe\": 0, \"1f468-1f3fd-200d-1f91d-200d-1f468-1f3ff\": 0, \"1f468-1f3fe-200d-1f91d-200d-1f468-1f3fb\": 0, \"1f468-1f3fe-200d-1f91d-200d-1f468-1f3fc\": 0, \"1f468-1f3fe-200d-1f91d-200d-1f468-1f3fd\": 0, \"1f468-1f3fe-200d-1f91d-200d-1f468-1f3ff\": 0, \"1f468-1f3ff-200d-1f91d-200d-1f468-1f3fb\": 0, \"1f468-1f3ff-200d-1f91d-200d-1f468-1f3fc\": 0, \"1f468-1f3ff-200d-1f91d-200d-1f468-1f3fd\": 0, \"1f468-1f3ff-200d-1f91d-200d-1f468-1f3fe\": 0, \"1f46d-1f3fb\": 0, \"1f46d-1f3fc\": 0, \"1f46d-1f3fd\": 0, \"1f46d-1f3fe\": 0, \"1f46d-1f3ff\": 0, \"1f469-1f3fb-200d-1f91d-200d-1f469-1f3fc\": 0, \"1f469-1f3fb-200d-1f91d-200d-1f469-1f3fd\": 0, \"1f469-1f3fb-200d-1f91d-200d-1f469-1f3fe\": 0, \"1f469-1f3fb-200d-1f91d-200d-1f469-1f3ff\": 0, \"1f469-1f3fc-200d-1f91d-200d-1f469-1f3fb\": 0, \"1f469-1f3fc-200d-1f91d-200d-1f469-1f3fd\": 0, \"1f469-1f3fc-200d-1f91d-200d-1f469-1f3fe\": 0, \"1f469-1f3fc-200d-1f91d-200d-1f469-1f3ff\": 0, \"1f469-1f3fd-200d-1f91d-200d-1f469-1f3fb\": 0, \"1f469-1f3fd-200d-1f91d-200d-1f469-1f3fc\": 0, \"1f469-1f3fd-200d-1f91d-200d-1f469-1f3fe\": 0, \"1f469-1f3fd-200d-1f91d-200d-1f469-1f3ff\": 0, \"1f469-1f3fe-200d-1f91d-200d-1f469-1f3fb\": 0, \"1f469-1f3fe-200d-1f91d-200d-1f469-1f3fc\": 0, \"1f469-1f3fe-200d-1f91d-200d-1f469-1f3fd\": 0, \"1f469-1f3fe-200d-1f91d-200d-1f469-1f3ff\": 0, \"1f469-1f3ff-200d-1f91d-200d-1f469-1f3fb\": 0, \"1f469-1f3ff-200d-1f91d-200d-1f469-1f3fc\": 0, \"1f469-1f3ff-200d-1f91d-200d-1f469-1f3fd\": 0, \"1f469-1f3ff-200d-1f91d-200d-1f469-1f3fe\": 0, \"1f46e-1f3fb-200d-2640-fe0f\": 0, \"1f46e-1f3fc-200d-2640-fe0f\": 0, \"1f46e-1f3fd-200d-2640-fe0f\": 0, \"1f46e-1f3fe-200d-2640-fe0f\": 0, \"1f46e-1f3ff-200d-2640-fe0f\": 0, \"1f46e-1f3fb-200d-2642-fe0f\": 0, \"1f46e-1f3fc-200d-2642-fe0f\": 0, \"1f46e-1f3fd-200d-2642-fe0f\": 0, \"1f46e-1f3fe-200d-2642-fe0f\": 0, \"1f46e-1f3ff-200d-2642-fe0f\": 0, \"1f46e-1f3fb\": 0, \"1f46e-1f3fc\": 0, \"1f46e-1f3fd\": 0, \"1f46e-1f3fe\": 0, \"1f46e-1f3ff\": 0, \"1f470-1f3fb\": 0, \"1f470-1f3fc\": 0, \"1f470-1f3fd\": 0, \"1f470-1f3fe\": 0, \"1f470-1f3ff\": 0, \"1f471-1f3fb-200d-2640-fe0f\": 0, \"1f471-1f3fc-200d-2640-fe0f\": 0, \"1f471-1f3fd-200d-2640-fe0f\": 0, \"1f471-1f3fe-200d-2640-fe0f\": 0, \"1f471-1f3ff-200d-2640-fe0f\": 0, \"1f471-1f3fb-200d-2642-fe0f\": 0, \"1f471-1f3fc-200d-2642-fe0f\": 0, \"1f471-1f3fd-200d-2642-fe0f\": 0, \"1f471-1f3fe-200d-2642-fe0f\": 0, \"1f471-1f3ff-200d-2642-fe0f\": 0, \"1f471-1f3fb\": 0, \"1f471-1f3fc\": 0, \"1f471-1f3fd\": 0, \"1f471-1f3fe\": 0, \"1f471-1f3ff\": 0, \"1f472-1f3fb\": 0, \"1f472-1f3fc\": 0, \"1f472-1f3fd\": 0, \"1f472-1f3fe\": 0, \"1f472-1f3ff\": 0, \"1f473-1f3fb-200d-2640-fe0f\": 0, \"1f473-1f3fc-200d-2640-fe0f\": 0, \"1f473-1f3fd-200d-2640-fe0f\": 0, \"1f473-1f3fe-200d-2640-fe0f\": 0, \"1f473-1f3ff-200d-2640-fe0f\": 0, \"1f473-1f3fb-200d-2642-fe0f\": 0, \"1f473-1f3fc-200d-2642-fe0f\": 0, \"1f473-1f3fd-200d-2642-fe0f\": 0, \"1f473-1f3fe-200d-2642-fe0f\": 0, \"1f473-1f3ff-200d-2642-fe0f\": 0, \"1f473-1f3fb\": 0, \"1f473-1f3fc\": 0, \"1f473-1f3fd\": 0, \"1f473-1f3fe\": 0, \"1f473-1f3ff\": 0, \"1f474-1f3fb\": 0, \"1f474-1f3fc\": 0, \"1f474-1f3fd\": 0, \"1f474-1f3fe\": 0, \"1f474-1f3ff\": 0, \"1f475-1f3fb\": 0, \"1f475-1f3fc\": 0, \"1f475-1f3fd\": 0, \"1f475-1f3fe\": 0, \"1f475-1f3ff\": 0, \"1f476-1f3fb\": 0, \"1f476-1f3fc\": 0, \"1f476-1f3fd\": 0, \"1f476-1f3fe\": 0, \"1f476-1f3ff\": 0, \"1f477-1f3fb-200d-2640-fe0f\": 0, \"1f477-1f3fc-200d-2640-fe0f\": 0, \"1f477-1f3fd-200d-2640-fe0f\": 0, \"1f477-1f3fe-200d-2640-fe0f\": 0, \"1f477-1f3ff-200d-2640-fe0f\": 0, \"1f477-1f3fb-200d-2642-fe0f\": 0, \"1f477-1f3fc-200d-2642-fe0f\": 0, \"1f477-1f3fd-200d-2642-fe0f\": 0, \"1f477-1f3fe-200d-2642-fe0f\": 0, \"1f477-1f3ff-200d-2642-fe0f\": 0, \"1f477-1f3fb\": 0, \"1f477-1f3fc\": 0, \"1f477-1f3fd\": 0, \"1f477-1f3fe\": 0, \"1f477-1f3ff\": 0, \"1f478-1f3fb\": 0, \"1f478-1f3fc\": 0, \"1f478-1f3fd\": 0, \"1f478-1f3fe\": 0, \"1f478-1f3ff\": 0, \"1f47c-1f3fb\": 0, \"1f47c-1f3fc\": 0, \"1f47c-1f3fd\": 0, \"1f47c-1f3fe\": 0, \"1f47c-1f3ff\": 0, \"1f481-1f3fb-200d-2640-fe0f\": 0, \"1f481-1f3fc-200d-2640-fe0f\": 0, \"1f481-1f3fd-200d-2640-fe0f\": 0, \"1f481-1f3fe-200d-2640-fe0f\": 0, \"1f481-1f3ff-200d-2640-fe0f\": 0, \"1f481-1f3fb-200d-2642-fe0f\": 0, \"1f481-1f3fc-200d-2642-fe0f\": 0, \"1f481-1f3fd-200d-2642-fe0f\": 0, \"1f481-1f3fe-200d-2642-fe0f\": 0, \"1f481-1f3ff-200d-2642-fe0f\": 0, \"1f481-1f3fb\": 0, \"1f481-1f3fc\": 0, \"1f481-1f3fd\": 0, \"1f481-1f3fe\": 0, \"1f481-1f3ff\": 0, \"1f482-1f3fb-200d-2640-fe0f\": 0, \"1f482-1f3fc-200d-2640-fe0f\": 0, \"1f482-1f3fd-200d-2640-fe0f\": 0, \"1f482-1f3fe-200d-2640-fe0f\": 0, \"1f482-1f3ff-200d-2640-fe0f\": 0, \"1f482-1f3fb-200d-2642-fe0f\": 0, \"1f482-1f3fc-200d-2642-fe0f\": 0, \"1f482-1f3fd-200d-2642-fe0f\": 0, \"1f482-1f3fe-200d-2642-fe0f\": 0, \"1f482-1f3ff-200d-2642-fe0f\": 0, \"1f482-1f3fb\": 0, \"1f482-1f3fc\": 0, \"1f482-1f3fd\": 0, \"1f482-1f3fe\": 0, \"1f482-1f3ff\": 0, \"1f483-1f3fb\": 0, \"1f483-1f3fc\": 0, \"1f483-1f3fd\": 0, \"1f483-1f3fe\": 0, \"1f483-1f3ff\": 0, \"1f485-1f3fb\": 0, \"1f485-1f3fc\": 0, \"1f485-1f3fd\": 0, \"1f485-1f3fe\": 0, \"1f485-1f3ff\": 0, \"1f486-1f3fb-200d-2640-fe0f\": 0, \"1f486-1f3fc-200d-2640-fe0f\": 0, \"1f486-1f3fd-200d-2640-fe0f\": 0, \"1f486-1f3fe-200d-2640-fe0f\": 0, \"1f486-1f3ff-200d-2640-fe0f\": 0, \"1f486-1f3fb-200d-2642-fe0f\": 0, \"1f486-1f3fc-200d-2642-fe0f\": 0, \"1f486-1f3fd-200d-2642-fe0f\": 0, \"1f486-1f3fe-200d-2642-fe0f\": 0, \"1f486-1f3ff-200d-2642-fe0f\": 0, \"1f486-1f3fb\": 0, \"1f486-1f3fc\": 0, \"1f486-1f3fd\": 0, \"1f486-1f3fe\": 0, \"1f486-1f3ff\": 0, \"1f487-1f3fb-200d-2640-fe0f\": 0, \"1f487-1f3fc-200d-2640-fe0f\": 0, \"1f487-1f3fd-200d-2640-fe0f\": 0, \"1f487-1f3fe-200d-2640-fe0f\": 0, \"1f487-1f3ff-200d-2640-fe0f\": 0, \"1f487-1f3fb-200d-2642-fe0f\": 0, \"1f487-1f3fc-200d-2642-fe0f\": 0, \"1f487-1f3fd-200d-2642-fe0f\": 0, \"1f487-1f3fe-200d-2642-fe0f\": 0, \"1f487-1f3ff-200d-2642-fe0f\": 0, \"1f487-1f3fb\": 0, \"1f487-1f3fc\": 0, \"1f487-1f3fd\": 0, \"1f487-1f3fe\": 0, \"1f487-1f3ff\": 0, \"1f4aa-1f3fb\": 0, \"1f4aa-1f3fc\": 0, \"1f4aa-1f3fd\": 0, \"1f4aa-1f3fe\": 0, \"1f4aa-1f3ff\": 0, \"1f574-1f3fb\": 0, \"1f574-1f3fc\": 0, \"1f574-1f3fd\": 0, \"1f574-1f3fe\": 0, \"1f574-1f3ff\": 0, \"1f575-1f3fb-200d-2640-fe0f\": 0, \"1f575-1f3fc-200d-2640-fe0f\": 0, \"1f575-1f3fd-200d-2640-fe0f\": 0, \"1f575-1f3fe-200d-2640-fe0f\": 0, \"1f575-1f3ff-200d-2640-fe0f\": 0, \"1f575-1f3fb-200d-2642-fe0f\": 0, \"1f575-1f3fc-200d-2642-fe0f\": 0, \"1f575-1f3fd-200d-2642-fe0f\": 0, \"1f575-1f3fe-200d-2642-fe0f\": 0, \"1f575-1f3ff-200d-2642-fe0f\": 0, \"1f575-1f3fb\": 0, \"1f575-1f3fc\": 0, \"1f575-1f3fd\": 0, \"1f575-1f3fe\": 0, \"1f575-1f3ff\": 0, \"1f57a-1f3fb\": 0, \"1f57a-1f3fc\": 0, \"1f57a-1f3fd\": 0, \"1f57a-1f3fe\": 0, \"1f57a-1f3ff\": 0, \"1f590-1f3fb\": 0, \"1f590-1f3fc\": 0, \"1f590-1f3fd\": 0, \"1f590-1f3fe\": 0, \"1f590-1f3ff\": 0, \"1f595-1f3fb\": 0, \"1f595-1f3fc\": 0, \"1f595-1f3fd\": 0, \"1f595-1f3fe\": 0, \"1f595-1f3ff\": 0, \"1f596-1f3fb\": 0, \"1f596-1f3fc\": 0, \"1f596-1f3fd\": 0, \"1f596-1f3fe\": 0, \"1f596-1f3ff\": 0, \"1f645-1f3fb-200d-2640-fe0f\": 0, \"1f645-1f3fc-200d-2640-fe0f\": 0, \"1f645-1f3fd-200d-2640-fe0f\": 0, \"1f645-1f3fe-200d-2640-fe0f\": 0, \"1f645-1f3ff-200d-2640-fe0f\": 0, \"1f645-1f3fb-200d-2642-fe0f\": 0, \"1f645-1f3fc-200d-2642-fe0f\": 0, \"1f645-1f3fd-200d-2642-fe0f\": 0, \"1f645-1f3fe-200d-2642-fe0f\": 0, \"1f645-1f3ff-200d-2642-fe0f\": 0, \"1f645-1f3fb\": 0, \"1f645-1f3fc\": 0, \"1f645-1f3fd\": 0, \"1f645-1f3fe\": 0, \"1f645-1f3ff\": 0, \"1f646-1f3fb-200d-2640-fe0f\": 0, \"1f646-1f3fc-200d-2640-fe0f\": 0, \"1f646-1f3fd-200d-2640-fe0f\": 0, \"1f646-1f3fe-200d-2640-fe0f\": 0, \"1f646-1f3ff-200d-2640-fe0f\": 0, \"1f646-1f3fb-200d-2642-fe0f\": 0, \"1f646-1f3fc-200d-2642-fe0f\": 0, \"1f646-1f3fd-200d-2642-fe0f\": 0, \"1f646-1f3fe-200d-2642-fe0f\": 0, \"1f646-1f3ff-200d-2642-fe0f\": 0, \"1f646-1f3fb\": 0, \"1f646-1f3fc\": 0, \"1f646-1f3fd\": 0, \"1f646-1f3fe\": 0, \"1f646-1f3ff\": 0, \"1f647-1f3fb-200d-2640-fe0f\": 0, \"1f647-1f3fc-200d-2640-fe0f\": 0, \"1f647-1f3fd-200d-2640-fe0f\": 0, \"1f647-1f3fe-200d-2640-fe0f\": 0, \"1f647-1f3ff-200d-2640-fe0f\": 0, \"1f647-1f3fb-200d-2642-fe0f\": 0, \"1f647-1f3fc-200d-2642-fe0f\": 0, \"1f647-1f3fd-200d-2642-fe0f\": 0, \"1f647-1f3fe-200d-2642-fe0f\": 0, \"1f647-1f3ff-200d-2642-fe0f\": 0, \"1f647-1f3fb\": 0, \"1f647-1f3fc\": 0, \"1f647-1f3fd\": 0, \"1f647-1f3fe\": 0, \"1f647-1f3ff\": 0, \"1f64b-1f3fb-200d-2640-fe0f\": 0, \"1f64b-1f3fc-200d-2640-fe0f\": 0, \"1f64b-1f3fd-200d-2640-fe0f\": 0, \"1f64b-1f3fe-200d-2640-fe0f\": 0, \"1f64b-1f3ff-200d-2640-fe0f\": 0, \"1f64b-1f3fb-200d-2642-fe0f\": 0, \"1f64b-1f3fc-200d-2642-fe0f\": 0, \"1f64b-1f3fd-200d-2642-fe0f\": 0, \"1f64b-1f3fe-200d-2642-fe0f\": 0, \"1f64b-1f3ff-200d-2642-fe0f\": 0, \"1f64b-1f3fb\": 0, \"1f64b-1f3fc\": 0, \"1f64b-1f3fd\": 0, \"1f64b-1f3fe\": 0, \"1f64b-1f3ff\": 0, \"1f64c-1f3fb\": 0, \"1f64c-1f3fc\": 0, \"1f64c-1f3fd\": 0, \"1f64c-1f3fe\": 0, \"1f64c-1f3ff\": 0, \"1f64d-1f3fb-200d-2640-fe0f\": 0, \"1f64d-1f3fc-200d-2640-fe0f\": 0, \"1f64d-1f3fd-200d-2640-fe0f\": 0, \"1f64d-1f3fe-200d-2640-fe0f\": 0, \"1f64d-1f3ff-200d-2640-fe0f\": 0, \"1f64d-1f3fb-200d-2642-fe0f\": 0, \"1f64d-1f3fc-200d-2642-fe0f\": 0, \"1f64d-1f3fd-200d-2642-fe0f\": 0, \"1f64d-1f3fe-200d-2642-fe0f\": 0, \"1f64d-1f3ff-200d-2642-fe0f\": 0, \"1f64d-1f3fb\": 0, \"1f64d-1f3fc\": 0, \"1f64d-1f3fd\": 0, \"1f64d-1f3fe\": 0, \"1f64d-1f3ff\": 0, \"1f64e-1f3fb-200d-2640-fe0f\": 0, \"1f64e-1f3fc-200d-2640-fe0f\": 0, \"1f64e-1f3fd-200d-2640-fe0f\": 0, \"1f64e-1f3fe-200d-2640-fe0f\": 0, \"1f64e-1f3ff-200d-2640-fe0f\": 0, \"1f64e-1f3fb-200d-2642-fe0f\": 0, \"1f64e-1f3fc-200d-2642-fe0f\": 0, \"1f64e-1f3fd-200d-2642-fe0f\": 0, \"1f64e-1f3fe-200d-2642-fe0f\": 0, \"1f64e-1f3ff-200d-2642-fe0f\": 0, \"1f64e-1f3fb\": 0, \"1f64e-1f3fc\": 0, \"1f64e-1f3fd\": 0, \"1f64e-1f3fe\": 0, \"1f64e-1f3ff\": 0, \"1f64f-1f3fb\": 0, \"1f64f-1f3fc\": 0, \"1f64f-1f3fd\": 0, \"1f64f-1f3fe\": 0, \"1f64f-1f3ff\": 0, \"1f6a3-1f3fb-200d-2640-fe0f\": 0, \"1f6a3-1f3fc-200d-2640-fe0f\": 0, \"1f6a3-1f3fd-200d-2640-fe0f\": 0, \"1f6a3-1f3fe-200d-2640-fe0f\": 0, \"1f6a3-1f3ff-200d-2640-fe0f\": 0, \"1f6a3-1f3fb-200d-2642-fe0f\": 0, \"1f6a3-1f3fc-200d-2642-fe0f\": 0, \"1f6a3-1f3fd-200d-2642-fe0f\": 0, \"1f6a3-1f3fe-200d-2642-fe0f\": 0, \"1f6a3-1f3ff-200d-2642-fe0f\": 0, \"1f6a3-1f3fb\": 0, \"1f6a3-1f3fc\": 0, \"1f6a3-1f3fd\": 0, \"1f6a3-1f3fe\": 0, \"1f6a3-1f3ff\": 0, \"1f6b4-1f3fb-200d-2640-fe0f\": 0, \"1f6b4-1f3fc-200d-2640-fe0f\": 0, \"1f6b4-1f3fd-200d-2640-fe0f\": 0, \"1f6b4-1f3fe-200d-2640-fe0f\": 0, \"1f6b4-1f3ff-200d-2640-fe0f\": 0, \"1f6b4-1f3fb-200d-2642-fe0f\": 0, \"1f6b4-1f3fc-200d-2642-fe0f\": 0, \"1f6b4-1f3fd-200d-2642-fe0f\": 0, \"1f6b4-1f3fe-200d-2642-fe0f\": 0, \"1f6b4-1f3ff-200d-2642-fe0f\": 0, \"1f6b4-1f3fb\": 0, \"1f6b4-1f3fc\": 0, \"1f6b4-1f3fd\": 0, \"1f6b4-1f3fe\": 0, \"1f6b4-1f3ff\": 0, \"1f6b5-1f3fb-200d-2640-fe0f\": 0, \"1f6b5-1f3fc-200d-2640-fe0f\": 0, \"1f6b5-1f3fd-200d-2640-fe0f\": 0, \"1f6b5-1f3fe-200d-2640-fe0f\": 0, \"1f6b5-1f3ff-200d-2640-fe0f\": 0, \"1f6b5-1f3fb-200d-2642-fe0f\": 0, \"1f6b5-1f3fc-200d-2642-fe0f\": 0, \"1f6b5-1f3fd-200d-2642-fe0f\": 0, \"1f6b5-1f3fe-200d-2642-fe0f\": 0, \"1f6b5-1f3ff-200d-2642-fe0f\": 0, \"1f6b5-1f3fb\": 0, \"1f6b5-1f3fc\": 0, \"1f6b5-1f3fd\": 0, \"1f6b5-1f3fe\": 0, \"1f6b5-1f3ff\": 0, \"1f6b6-1f3fb-200d-2640-fe0f\": 0, \"1f6b6-1f3fc-200d-2640-fe0f\": 0, \"1f6b6-1f3fd-200d-2640-fe0f\": 0, \"1f6b6-1f3fe-200d-2640-fe0f\": 0, \"1f6b6-1f3ff-200d-2640-fe0f\": 0, \"1f6b6-1f3fb-200d-2642-fe0f\": 0, \"1f6b6-1f3fc-200d-2642-fe0f\": 0, \"1f6b6-1f3fd-200d-2642-fe0f\": 0, \"1f6b6-1f3fe-200d-2642-fe0f\": 0, \"1f6b6-1f3ff-200d-2642-fe0f\": 0, \"1f6b6-1f3fb\": 0, \"1f6b6-1f3fc\": 0, \"1f6b6-1f3fd\": 0, \"1f6b6-1f3fe\": 0, \"1f6b6-1f3ff\": 0, \"1f6c0-1f3fb\": 0, \"1f6c0-1f3fc\": 0, \"1f6c0-1f3fd\": 0, \"1f6c0-1f3fe\": 0, \"1f6c0-1f3ff\": 0, \"1f6cc-1f3fb\": 0, \"1f6cc-1f3fc\": 0, \"1f6cc-1f3fd\": 0, \"1f6cc-1f3fe\": 0, \"1f6cc-1f3ff\": 0, \"1f90f-1f3fb\": 0, \"1f90f-1f3fc\": 0, \"1f90f-1f3fd\": 0, \"1f90f-1f3fe\": 0, \"1f90f-1f3ff\": 0, \"1f918-1f3fb\": 0, \"1f918-1f3fc\": 0, \"1f918-1f3fd\": 0, \"1f918-1f3fe\": 0, \"1f918-1f3ff\": 0, \"1f919-1f3fb\": 0, \"1f919-1f3fc\": 0, \"1f919-1f3fd\": 0, \"1f919-1f3fe\": 0, \"1f919-1f3ff\": 0, \"1f91a-1f3fb\": 0, \"1f91a-1f3fc\": 0, \"1f91a-1f3fd\": 0, \"1f91a-1f3fe\": 0, \"1f91a-1f3ff\": 0, \"1f91b-1f3fb\": 0, \"1f91b-1f3fc\": 0, \"1f91b-1f3fd\": 0, \"1f91b-1f3fe\": 0, \"1f91b-1f3ff\": 0, \"1f91c-1f3fb\": 0, \"1f91c-1f3fc\": 0, \"1f91c-1f3fd\": 0, \"1f91c-1f3fe\": 0, \"1f91c-1f3ff\": 0, \"1f91e-1f3fb\": 0, \"1f91e-1f3fc\": 0, \"1f91e-1f3fd\": 0, \"1f91e-1f3fe\": 0, \"1f91e-1f3ff\": 0, \"1f91f-1f3fb\": 0, \"1f91f-1f3fc\": 0, \"1f91f-1f3fd\": 0, \"1f91f-1f3fe\": 0, \"1f91f-1f3ff\": 0, \"1f926-1f3fb-200d-2640-fe0f\": 0, \"1f926-1f3fc-200d-2640-fe0f\": 0, \"1f926-1f3fd-200d-2640-fe0f\": 0, \"1f926-1f3fe-200d-2640-fe0f\": 0, \"1f926-1f3ff-200d-2640-fe0f\": 0, \"1f926-1f3fb-200d-2642-fe0f\": 0, \"1f926-1f3fc-200d-2642-fe0f\": 0, \"1f926-1f3fd-200d-2642-fe0f\": 0, \"1f926-1f3fe-200d-2642-fe0f\": 0, \"1f926-1f3ff-200d-2642-fe0f\": 0, \"1f926-1f3fb\": 0, \"1f926-1f3fc\": 0, \"1f926-1f3fd\": 0, \"1f926-1f3fe\": 0, \"1f926-1f3ff\": 0, \"1f930-1f3fb\": 0, \"1f930-1f3fc\": 0, \"1f930-1f3fd\": 0, \"1f930-1f3fe\": 0, \"1f930-1f3ff\": 0, \"1f931-1f3fb\": 0, \"1f931-1f3fc\": 0, \"1f931-1f3fd\": 0, \"1f931-1f3fe\": 0, \"1f931-1f3ff\": 0, \"1f932-1f3fb\": 0, \"1f932-1f3fc\": 0, \"1f932-1f3fd\": 0, \"1f932-1f3fe\": 0, \"1f932-1f3ff\": 0, \"1f933-1f3fb\": 0, \"1f933-1f3fc\": 0, \"1f933-1f3fd\": 0, \"1f933-1f3fe\": 0, \"1f933-1f3ff\": 0, \"1f934-1f3fb\": 0, \"1f934-1f3fc\": 0, \"1f934-1f3fd\": 0, \"1f934-1f3fe\": 0, \"1f934-1f3ff\": 0, \"1f935-1f3fb\": 0, \"1f935-1f3fc\": 0, \"1f935-1f3fd\": 0, \"1f935-1f3fe\": 0, \"1f935-1f3ff\": 0, \"1f936-1f3fb\": 0, \"1f936-1f3fc\": 0, \"1f936-1f3fd\": 0, \"1f936-1f3fe\": 0, \"1f936-1f3ff\": 0, \"1f937-1f3fb-200d-2640-fe0f\": 0, \"1f937-1f3fc-200d-2640-fe0f\": 0, \"1f937-1f3fd-200d-2640-fe0f\": 0, \"1f937-1f3fe-200d-2640-fe0f\": 0, \"1f937-1f3ff-200d-2640-fe0f\": 0, \"1f937-1f3fb-200d-2642-fe0f\": 0, \"1f937-1f3fc-200d-2642-fe0f\": 0, \"1f937-1f3fd-200d-2642-fe0f\": 0, \"1f937-1f3fe-200d-2642-fe0f\": 0, \"1f937-1f3ff-200d-2642-fe0f\": 0, \"1f937-1f3fb\": 0, \"1f937-1f3fc\": 0, \"1f937-1f3fd\": 0, \"1f937-1f3fe\": 0, \"1f937-1f3ff\": 0, \"1f938-1f3fb-200d-2640-fe0f\": 0, \"1f938-1f3fc-200d-2640-fe0f\": 0, \"1f938-1f3fd-200d-2640-fe0f\": 0, \"1f938-1f3fe-200d-2640-fe0f\": 0, \"1f938-1f3ff-200d-2640-fe0f\": 0, \"1f938-1f3fb-200d-2642-fe0f\": 0, \"1f938-1f3fc-200d-2642-fe0f\": 0, \"1f938-1f3fd-200d-2642-fe0f\": 0, \"1f938-1f3fe-200d-2642-fe0f\": 0, \"1f938-1f3ff-200d-2642-fe0f\": 0, \"1f938-1f3fb\": 0, \"1f938-1f3fc\": 0, \"1f938-1f3fd\": 0, \"1f938-1f3fe\": 0, \"1f938-1f3ff\": 0, \"1f939-1f3fb-200d-2640-fe0f\": 0, \"1f939-1f3fc-200d-2640-fe0f\": 0, \"1f939-1f3fd-200d-2640-fe0f\": 0, \"1f939-1f3fe-200d-2640-fe0f\": 0, \"1f939-1f3ff-200d-2640-fe0f\": 0, \"1f939-1f3fb-200d-2642-fe0f\": 0, \"1f939-1f3fc-200d-2642-fe0f\": 0, \"1f939-1f3fd-200d-2642-fe0f\": 0, \"1f939-1f3fe-200d-2642-fe0f\": 0, \"1f939-1f3ff-200d-2642-fe0f\": 0, \"1f939-1f3fb\": 0, \"1f939-1f3fc\": 0, \"1f939-1f3fd\": 0, \"1f939-1f3fe\": 0, \"1f939-1f3ff\": 0, \"1f93d-1f3fb-200d-2640-fe0f\": 0, \"1f93d-1f3fc-200d-2640-fe0f\": 0, \"1f93d-1f3fd-200d-2640-fe0f\": 0, \"1f93d-1f3fe-200d-2640-fe0f\": 0, \"1f93d-1f3ff-200d-2640-fe0f\": 0, \"1f93d-1f3fb-200d-2642-fe0f\": 0, \"1f93d-1f3fc-200d-2642-fe0f\": 0, \"1f93d-1f3fd-200d-2642-fe0f\": 0, \"1f93d-1f3fe-200d-2642-fe0f\": 0, \"1f93d-1f3ff-200d-2642-fe0f\": 0, \"1f93d-1f3fb\": 0, \"1f93d-1f3fc\": 0, \"1f93d-1f3fd\": 0, \"1f93d-1f3fe\": 0, \"1f93d-1f3ff\": 0, \"1f93e-1f3fb-200d-2640-fe0f\": 0, \"1f93e-1f3fc-200d-2640-fe0f\": 0, \"1f93e-1f3fd-200d-2640-fe0f\": 0, \"1f93e-1f3fe-200d-2640-fe0f\": 0, \"1f93e-1f3ff-200d-2640-fe0f\": 0, \"1f93e-1f3fb-200d-2642-fe0f\": 0, \"1f93e-1f3fc-200d-2642-fe0f\": 0, \"1f93e-1f3fd-200d-2642-fe0f\": 0, \"1f93e-1f3fe-200d-2642-fe0f\": 0, \"1f93e-1f3ff-200d-2642-fe0f\": 0, \"1f93e-1f3fb\": 0, \"1f93e-1f3fc\": 0, \"1f93e-1f3fd\": 0, \"1f93e-1f3fe\": 0, \"1f93e-1f3ff\": 0, \"1f9b5-1f3fb\": 0, \"1f9b5-1f3fc\": 0, \"1f9b5-1f3fd\": 0, \"1f9b5-1f3fe\": 0, \"1f9b5-1f3ff\": 0, \"1f9b6-1f3fb\": 0, \"1f9b6-1f3fc\": 0, \"1f9b6-1f3fd\": 0, \"1f9b6-1f3fe\": 0, \"1f9b6-1f3ff\": 0, \"1f9b8-1f3fb-200d-2640-fe0f\": 0, \"1f9b8-1f3fc-200d-2640-fe0f\": 0, \"1f9b8-1f3fd-200d-2640-fe0f\": 0, \"1f9b8-1f3fe-200d-2640-fe0f\": 0, \"1f9b8-1f3ff-200d-2640-fe0f\": 0, \"1f9b8-1f3fb-200d-2642-fe0f\": 0, \"1f9b8-1f3fc-200d-2642-fe0f\": 0, \"1f9b8-1f3fd-200d-2642-fe0f\": 0, \"1f9b8-1f3fe-200d-2642-fe0f\": 0, \"1f9b8-1f3ff-200d-2642-fe0f\": 0, \"1f9b8-1f3fb\": 0, \"1f9b8-1f3fc\": 0, \"1f9b8-1f3fd\": 0, \"1f9b8-1f3fe\": 0, \"1f9b8-1f3ff\": 0, \"1f9b9-1f3fb-200d-2640-fe0f\": 0, \"1f9b9-1f3fc-200d-2640-fe0f\": 0, \"1f9b9-1f3fd-200d-2640-fe0f\": 0, \"1f9b9-1f3fe-200d-2640-fe0f\": 0, \"1f9b9-1f3ff-200d-2640-fe0f\": 0, \"1f9b9-1f3fb-200d-2642-fe0f\": 0, \"1f9b9-1f3fc-200d-2642-fe0f\": 0, \"1f9b9-1f3fd-200d-2642-fe0f\": 0, \"1f9b9-1f3fe-200d-2642-fe0f\": 0, \"1f9b9-1f3ff-200d-2642-fe0f\": 0, \"1f9b9-1f3fb\": 0, \"1f9b9-1f3fc\": 0, \"1f9b9-1f3fd\": 0, \"1f9b9-1f3fe\": 0, \"1f9b9-1f3ff\": 0, \"1f9bb-1f3fb\": 0, \"1f9bb-1f3fc\": 0, \"1f9bb-1f3fd\": 0, \"1f9bb-1f3fe\": 0, \"1f9bb-1f3ff\": 0, \"1f9cd-1f3fb-200d-2640-fe0f\": 0, \"1f9cd-1f3fc-200d-2640-fe0f\": 0, \"1f9cd-1f3fd-200d-2640-fe0f\": 0, \"1f9cd-1f3fe-200d-2640-fe0f\": 0, \"1f9cd-1f3ff-200d-2640-fe0f\": 0, \"1f9cd-1f3fb-200d-2642-fe0f\": 0, \"1f9cd-1f3fc-200d-2642-fe0f\": 0, \"1f9cd-1f3fd-200d-2642-fe0f\": 0, \"1f9cd-1f3fe-200d-2642-fe0f\": 0, \"1f9cd-1f3ff-200d-2642-fe0f\": 0, \"1f9cd-1f3fb\": 0, \"1f9cd-1f3fc\": 0, \"1f9cd-1f3fd\": 0, \"1f9cd-1f3fe\": 0, \"1f9cd-1f3ff\": 0, \"1f9ce-1f3fb-200d-2640-fe0f\": 0, \"1f9ce-1f3fc-200d-2640-fe0f\": 0, \"1f9ce-1f3fd-200d-2640-fe0f\": 0, \"1f9ce-1f3fe-200d-2640-fe0f\": 0, \"1f9ce-1f3ff-200d-2640-fe0f\": 0, \"1f9ce-1f3fb-200d-2642-fe0f\": 0, \"1f9ce-1f3fc-200d-2642-fe0f\": 0, \"1f9ce-1f3fd-200d-2642-fe0f\": 0, \"1f9ce-1f3fe-200d-2642-fe0f\": 0, \"1f9ce-1f3ff-200d-2642-fe0f\": 0, \"1f9ce-1f3fb\": 0, \"1f9ce-1f3fc\": 0, \"1f9ce-1f3fd\": 0, \"1f9ce-1f3fe\": 0, \"1f9ce-1f3ff\": 0, \"1f9cf-1f3fb-200d-2640-fe0f\": 0, \"1f9cf-1f3fc-200d-2640-fe0f\": 0, \"1f9cf-1f3fd-200d-2640-fe0f\": 0, \"1f9cf-1f3fe-200d-2640-fe0f\": 0, \"1f9cf-1f3ff-200d-2640-fe0f\": 0, \"1f9cf-1f3fb-200d-2642-fe0f\": 0, \"1f9cf-1f3fc-200d-2642-fe0f\": 0, \"1f9cf-1f3fd-200d-2642-fe0f\": 0, \"1f9cf-1f3fe-200d-2642-fe0f\": 0, \"1f9cf-1f3ff-200d-2642-fe0f\": 0, \"1f9cf-1f3fb\": 0, \"1f9cf-1f3fc\": 0, \"1f9cf-1f3fd\": 0, \"1f9cf-1f3fe\": 0, \"1f9cf-1f3ff\": 0, \"1f9d1-1f3fb-200d-1f33e\": 0, \"1f9d1-1f3fc-200d-1f33e\": 0, \"1f9d1-1f3fd-200d-1f33e\": 0, \"1f9d1-1f3fe-200d-1f33e\": 0, \"1f9d1-1f3ff-200d-1f33e\": 0, \"1f9d1-1f3fb-200d-1f373\": 0, \"1f9d1-1f3fc-200d-1f373\": 0, \"1f9d1-1f3fd-200d-1f373\": 0, \"1f9d1-1f3fe-200d-1f373\": 0, \"1f9d1-1f3ff-200d-1f373\": 0, \"1f9d1-1f3fb-200d-1f393\": 0, \"1f9d1-1f3fc-200d-1f393\": 0, \"1f9d1-1f3fd-200d-1f393\": 0, \"1f9d1-1f3fe-200d-1f393\": 0, \"1f9d1-1f3ff-200d-1f393\": 0, \"1f9d1-1f3fb-200d-1f3a4\": 0, \"1f9d1-1f3fc-200d-1f3a4\": 0, \"1f9d1-1f3fd-200d-1f3a4\": 0, \"1f9d1-1f3fe-200d-1f3a4\": 0, \"1f9d1-1f3ff-200d-1f3a4\": 0, \"1f9d1-1f3fb-200d-1f3a8\": 0, \"1f9d1-1f3fc-200d-1f3a8\": 0, \"1f9d1-1f3fd-200d-1f3a8\": 0, \"1f9d1-1f3fe-200d-1f3a8\": 0, \"1f9d1-1f3ff-200d-1f3a8\": 0, \"1f9d1-1f3fb-200d-1f3eb\": 0, \"1f9d1-1f3fc-200d-1f3eb\": 0, \"1f9d1-1f3fd-200d-1f3eb\": 0, \"1f9d1-1f3fe-200d-1f3eb\": 0, \"1f9d1-1f3ff-200d-1f3eb\": 0, \"1f9d1-1f3fb-200d-1f3ed\": 0, \"1f9d1-1f3fc-200d-1f3ed\": 0, \"1f9d1-1f3fd-200d-1f3ed\": 0, \"1f9d1-1f3fe-200d-1f3ed\": 0, \"1f9d1-1f3ff-200d-1f3ed\": 0, \"1f9d1-1f3fb-200d-1f4bb\": 0, \"1f9d1-1f3fc-200d-1f4bb\": 0, \"1f9d1-1f3fd-200d-1f4bb\": 0, \"1f9d1-1f3fe-200d-1f4bb\": 0, \"1f9d1-1f3ff-200d-1f4bb\": 0, \"1f9d1-1f3fb-200d-1f4bc\": 0, \"1f9d1-1f3fc-200d-1f4bc\": 0, \"1f9d1-1f3fd-200d-1f4bc\": 0, \"1f9d1-1f3fe-200d-1f4bc\": 0, \"1f9d1-1f3ff-200d-1f4bc\": 0, \"1f9d1-1f3fb-200d-1f527\": 0, \"1f9d1-1f3fc-200d-1f527\": 0, \"1f9d1-1f3fd-200d-1f527\": 0, \"1f9d1-1f3fe-200d-1f527\": 0, \"1f9d1-1f3ff-200d-1f527\": 0, \"1f9d1-1f3fb-200d-1f52c\": 0, \"1f9d1-1f3fc-200d-1f52c\": 0, \"1f9d1-1f3fd-200d-1f52c\": 0, \"1f9d1-1f3fe-200d-1f52c\": 0, \"1f9d1-1f3ff-200d-1f52c\": 0, \"1f9d1-1f3fb-200d-1f680\": 0, \"1f9d1-1f3fc-200d-1f680\": 0, \"1f9d1-1f3fd-200d-1f680\": 0, \"1f9d1-1f3fe-200d-1f680\": 0, \"1f9d1-1f3ff-200d-1f680\": 0, \"1f9d1-1f3fb-200d-1f692\": 0, \"1f9d1-1f3fc-200d-1f692\": 0, \"1f9d1-1f3fd-200d-1f692\": 0, \"1f9d1-1f3fe-200d-1f692\": 0, \"1f9d1-1f3ff-200d-1f692\": 0, \"1f9d1-1f3fb-200d-1f91d-200d-1f9d1-1f3fb\": 0, \"1f9d1-1f3fb-200d-1f91d-200d-1f9d1-1f3fc\": 0, \"1f9d1-1f3fb-200d-1f91d-200d-1f9d1-1f3fd\": 0, \"1f9d1-1f3fb-200d-1f91d-200d-1f9d1-1f3fe\": 0, \"1f9d1-1f3fb-200d-1f91d-200d-1f9d1-1f3ff\": 0, \"1f9d1-1f3fc-200d-1f91d-200d-1f9d1-1f3fb\": 0, \"1f9d1-1f3fc-200d-1f91d-200d-1f9d1-1f3fc\": 0, \"1f9d1-1f3fc-200d-1f91d-200d-1f9d1-1f3fd\": 0, \"1f9d1-1f3fc-200d-1f91d-200d-1f9d1-1f3fe\": 0, \"1f9d1-1f3fc-200d-1f91d-200d-1f9d1-1f3ff\": 0, \"1f9d1-1f3fd-200d-1f91d-200d-1f9d1-1f3fb\": 0, \"1f9d1-1f3fd-200d-1f91d-200d-1f9d1-1f3fc\": 0, \"1f9d1-1f3fd-200d-1f91d-200d-1f9d1-1f3fd\": 0, \"1f9d1-1f3fd-200d-1f91d-200d-1f9d1-1f3fe\": 0, \"1f9d1-1f3fd-200d-1f91d-200d-1f9d1-1f3ff\": 0, \"1f9d1-1f3fe-200d-1f91d-200d-1f9d1-1f3fb\": 0, \"1f9d1-1f3fe-200d-1f91d-200d-1f9d1-1f3fc\": 0, \"1f9d1-1f3fe-200d-1f91d-200d-1f9d1-1f3fd\": 0, \"1f9d1-1f3fe-200d-1f91d-200d-1f9d1-1f3fe\": 0, \"1f9d1-1f3fe-200d-1f91d-200d-1f9d1-1f3ff\": 0, \"1f9d1-1f3ff-200d-1f91d-200d-1f9d1-1f3fb\": 0, \"1f9d1-1f3ff-200d-1f91d-200d-1f9d1-1f3fc\": 0, \"1f9d1-1f3ff-200d-1f91d-200d-1f9d1-1f3fd\": 0, \"1f9d1-1f3ff-200d-1f91d-200d-1f9d1-1f3fe\": 0, \"1f9d1-1f3ff-200d-1f91d-200d-1f9d1-1f3ff\": 0, \"1f9d1-1f3fb-200d-1f9af\": 0, \"1f9d1-1f3fc-200d-1f9af\": 0, \"1f9d1-1f3fd-200d-1f9af\": 0, \"1f9d1-1f3fe-200d-1f9af\": 0, \"1f9d1-1f3ff-200d-1f9af\": 0, \"1f9d1-1f3fb-200d-1f9b0\": 0, \"1f9d1-1f3fc-200d-1f9b0\": 0, \"1f9d1-1f3fd-200d-1f9b0\": 0, \"1f9d1-1f3fe-200d-1f9b0\": 0, \"1f9d1-1f3ff-200d-1f9b0\": 0, \"1f9d1-1f3fb-200d-1f9b1\": 0, \"1f9d1-1f3fc-200d-1f9b1\": 0, \"1f9d1-1f3fd-200d-1f9b1\": 0, \"1f9d1-1f3fe-200d-1f9b1\": 0, \"1f9d1-1f3ff-200d-1f9b1\": 0, \"1f9d1-1f3fb-200d-1f9b2\": 0, \"1f9d1-1f3fc-200d-1f9b2\": 0, \"1f9d1-1f3fd-200d-1f9b2\": 0, \"1f9d1-1f3fe-200d-1f9b2\": 0, \"1f9d1-1f3ff-200d-1f9b2\": 0, \"1f9d1-1f3fb-200d-1f9b3\": 0, \"1f9d1-1f3fc-200d-1f9b3\": 0, \"1f9d1-1f3fd-200d-1f9b3\": 0, \"1f9d1-1f3fe-200d-1f9b3\": 0, \"1f9d1-1f3ff-200d-1f9b3\": 0, \"1f9d1-1f3fb-200d-1f9bc\": 0, \"1f9d1-1f3fc-200d-1f9bc\": 0, \"1f9d1-1f3fd-200d-1f9bc\": 0, \"1f9d1-1f3fe-200d-1f9bc\": 0, \"1f9d1-1f3ff-200d-1f9bc\": 0, \"1f9d1-1f3fb-200d-1f9bd\": 0, \"1f9d1-1f3fc-200d-1f9bd\": 0, \"1f9d1-1f3fd-200d-1f9bd\": 0, \"1f9d1-1f3fe-200d-1f9bd\": 0, \"1f9d1-1f3ff-200d-1f9bd\": 0, \"1f9d1-1f3fb-200d-2695-fe0f\": 0, \"1f9d1-1f3fc-200d-2695-fe0f\": 0, \"1f9d1-1f3fd-200d-2695-fe0f\": 0, \"1f9d1-1f3fe-200d-2695-fe0f\": 0, \"1f9d1-1f3ff-200d-2695-fe0f\": 0, \"1f9d1-1f3fb-200d-2696-fe0f\": 0, \"1f9d1-1f3fc-200d-2696-fe0f\": 0, \"1f9d1-1f3fd-200d-2696-fe0f\": 0, \"1f9d1-1f3fe-200d-2696-fe0f\": 0, \"1f9d1-1f3ff-200d-2696-fe0f\": 0, \"1f9d1-1f3fb-200d-2708-fe0f\": 0, \"1f9d1-1f3fc-200d-2708-fe0f\": 0, \"1f9d1-1f3fd-200d-2708-fe0f\": 0, \"1f9d1-1f3fe-200d-2708-fe0f\": 0, \"1f9d1-1f3ff-200d-2708-fe0f\": 0, \"1f9d1-1f3fb\": 0, \"1f9d1-1f3fc\": 0, \"1f9d1-1f3fd\": 0, \"1f9d1-1f3fe\": 0, \"1f9d1-1f3ff\": 0, \"1f9d2-1f3fb\": 0, \"1f9d2-1f3fc\": 0, \"1f9d2-1f3fd\": 0, \"1f9d2-1f3fe\": 0, \"1f9d2-1f3ff\": 0, \"1f9d3-1f3fb\": 0, \"1f9d3-1f3fc\": 0, \"1f9d3-1f3fd\": 0, \"1f9d3-1f3fe\": 0, \"1f9d3-1f3ff\": 0, \"1f9d4-1f3fb\": 0, \"1f9d4-1f3fc\": 0, \"1f9d4-1f3fd\": 0, \"1f9d4-1f3fe\": 0, \"1f9d4-1f3ff\": 0, \"1f9d5-1f3fb\": 0, \"1f9d5-1f3fc\": 0, \"1f9d5-1f3fd\": 0, \"1f9d5-1f3fe\": 0, \"1f9d5-1f3ff\": 0, \"1f9d6-1f3fb-200d-2640-fe0f\": 0, \"1f9d6-1f3fc-200d-2640-fe0f\": 0, \"1f9d6-1f3fd-200d-2640-fe0f\": 0, \"1f9d6-1f3fe-200d-2640-fe0f\": 0, \"1f9d6-1f3ff-200d-2640-fe0f\": 0, \"1f9d6-1f3fb-200d-2642-fe0f\": 0, \"1f9d6-1f3fc-200d-2642-fe0f\": 0, \"1f9d6-1f3fd-200d-2642-fe0f\": 0, \"1f9d6-1f3fe-200d-2642-fe0f\": 0, \"1f9d6-1f3ff-200d-2642-fe0f\": 0, \"1f9d6-1f3fb\": 0, \"1f9d6-1f3fc\": 0, \"1f9d6-1f3fd\": 0, \"1f9d6-1f3fe\": 0, \"1f9d6-1f3ff\": 0, \"1f9d7-1f3fb-200d-2640-fe0f\": 0, \"1f9d7-1f3fc-200d-2640-fe0f\": 0, \"1f9d7-1f3fd-200d-2640-fe0f\": 0, \"1f9d7-1f3fe-200d-2640-fe0f\": 0, \"1f9d7-1f3ff-200d-2640-fe0f\": 0, \"1f9d7-1f3fb-200d-2642-fe0f\": 0, \"1f9d7-1f3fc-200d-2642-fe0f\": 0, \"1f9d7-1f3fd-200d-2642-fe0f\": 0, \"1f9d7-1f3fe-200d-2642-fe0f\": 0, \"1f9d7-1f3ff-200d-2642-fe0f\": 0, \"1f9d7-1f3fb\": 0, \"1f9d7-1f3fc\": 0, \"1f9d7-1f3fd\": 0, \"1f9d7-1f3fe\": 0, \"1f9d7-1f3ff\": 0, \"1f9d8-1f3fb-200d-2640-fe0f\": 0, \"1f9d8-1f3fc-200d-2640-fe0f\": 0, \"1f9d8-1f3fd-200d-2640-fe0f\": 0, \"1f9d8-1f3fe-200d-2640-fe0f\": 0, \"1f9d8-1f3ff-200d-2640-fe0f\": 0, \"1f9d8-1f3fb-200d-2642-fe0f\": 0, \"1f9d8-1f3fc-200d-2642-fe0f\": 0, \"1f9d8-1f3fd-200d-2642-fe0f\": 0, \"1f9d8-1f3fe-200d-2642-fe0f\": 0, \"1f9d8-1f3ff-200d-2642-fe0f\": 0, \"1f9d8-1f3fb\": 0, \"1f9d8-1f3fc\": 0, \"1f9d8-1f3fd\": 0, \"1f9d8-1f3fe\": 0, \"1f9d8-1f3ff\": 0, \"1f9d9-1f3fb-200d-2640-fe0f\": 0, \"1f9d9-1f3fc-200d-2640-fe0f\": 0, \"1f9d9-1f3fd-200d-2640-fe0f\": 0, \"1f9d9-1f3fe-200d-2640-fe0f\": 0, \"1f9d9-1f3ff-200d-2640-fe0f\": 0, \"1f9d9-1f3fb-200d-2642-fe0f\": 0, \"1f9d9-1f3fc-200d-2642-fe0f\": 0, \"1f9d9-1f3fd-200d-2642-fe0f\": 0, \"1f9d9-1f3fe-200d-2642-fe0f\": 0, \"1f9d9-1f3ff-200d-2642-fe0f\": 0, \"1f9d9-1f3fb\": 0, \"1f9d9-1f3fc\": 0, \"1f9d9-1f3fd\": 0, \"1f9d9-1f3fe\": 0, \"1f9d9-1f3ff\": 0, \"1f9da-1f3fb-200d-2640-fe0f\": 0, \"1f9da-1f3fc-200d-2640-fe0f\": 0, \"1f9da-1f3fd-200d-2640-fe0f\": 0, \"1f9da-1f3fe-200d-2640-fe0f\": 0, \"1f9da-1f3ff-200d-2640-fe0f\": 0, \"1f9da-1f3fb-200d-2642-fe0f\": 0, \"1f9da-1f3fc-200d-2642-fe0f\": 0, \"1f9da-1f3fd-200d-2642-fe0f\": 0, \"1f9da-1f3fe-200d-2642-fe0f\": 0, \"1f9da-1f3ff-200d-2642-fe0f\": 0, \"1f9da-1f3fb\": 0, \"1f9da-1f3fc\": 0, \"1f9da-1f3fd\": 0, \"1f9da-1f3fe\": 0, \"1f9da-1f3ff\": 0, \"1f9db-1f3fb-200d-2640-fe0f\": 0, \"1f9db-1f3fc-200d-2640-fe0f\": 0, \"1f9db-1f3fd-200d-2640-fe0f\": 0, \"1f9db-1f3fe-200d-2640-fe0f\": 0, \"1f9db-1f3ff-200d-2640-fe0f\": 0, \"1f9db-1f3fb-200d-2642-fe0f\": 0, \"1f9db-1f3fc-200d-2642-fe0f\": 0, \"1f9db-1f3fd-200d-2642-fe0f\": 0, \"1f9db-1f3fe-200d-2642-fe0f\": 0, \"1f9db-1f3ff-200d-2642-fe0f\": 0, \"1f9db-1f3fb\": 0, \"1f9db-1f3fc\": 0, \"1f9db-1f3fd\": 0, \"1f9db-1f3fe\": 0, \"1f9db-1f3ff\": 0, \"1f9dc-1f3fb-200d-2640-fe0f\": 0, \"1f9dc-1f3fc-200d-2640-fe0f\": 0, \"1f9dc-1f3fd-200d-2640-fe0f\": 0, \"1f9dc-1f3fe-200d-2640-fe0f\": 0, \"1f9dc-1f3ff-200d-2640-fe0f\": 0, \"1f9dc-1f3fb-200d-2642-fe0f\": 0, \"1f9dc-1f3fc-200d-2642-fe0f\": 0, \"1f9dc-1f3fd-200d-2642-fe0f\": 0, \"1f9dc-1f3fe-200d-2642-fe0f\": 0, \"1f9dc-1f3ff-200d-2642-fe0f\": 0, \"1f9dc-1f3fb\": 0, \"1f9dc-1f3fc\": 0, \"1f9dc-1f3fd\": 0, \"1f9dc-1f3fe\": 0, \"1f9dc-1f3ff\": 0, \"1f9dd-1f3fb-200d-2640-fe0f\": 0, \"1f9dd-1f3fc-200d-2640-fe0f\": 0, \"1f9dd-1f3fd-200d-2640-fe0f\": 0, \"1f9dd-1f3fe-200d-2640-fe0f\": 0, \"1f9dd-1f3ff-200d-2640-fe0f\": 0, \"1f9dd-1f3fb-200d-2642-fe0f\": 0, \"1f9dd-1f3fc-200d-2642-fe0f\": 0, \"1f9dd-1f3fd-200d-2642-fe0f\": 0, \"1f9dd-1f3fe-200d-2642-fe0f\": 0, \"1f9dd-1f3ff-200d-2642-fe0f\": 0, \"1f9dd-1f3fb\": 0, \"1f9dd-1f3fc\": 0, \"1f9dd-1f3fd\": 0, \"1f9dd-1f3fe\": 0, \"1f9dd-1f3ff\": 0, \"261d-1f3fb\": 0, \"261d-1f3fc\": 0, \"261d-1f3fd\": 0, \"261d-1f3fe\": 0, \"261d-1f3ff\": 0, \"26f9-1f3fb-200d-2640-fe0f\": 0, \"26f9-1f3fc-200d-2640-fe0f\": 0, \"26f9-1f3fd-200d-2640-fe0f\": 0, \"26f9-1f3fe-200d-2640-fe0f\": 0, \"26f9-1f3ff-200d-2640-fe0f\": 0, \"26f9-1f3fb-200d-2642-fe0f\": 0, \"26f9-1f3fc-200d-2642-fe0f\": 0, \"26f9-1f3fd-200d-2642-fe0f\": 0, \"26f9-1f3fe-200d-2642-fe0f\": 0, \"26f9-1f3ff-200d-2642-fe0f\": 0, \"26f9-1f3fb\": 0, \"26f9-1f3fc\": 0, \"26f9-1f3fd\": 0, \"26f9-1f3fe\": 0, \"26f9-1f3ff\": 0, \"270a-1f3fb\": 0, \"270a-1f3fc\": 0, \"270a-1f3fd\": 0, \"270a-1f3fe\": 0, \"270a-1f3ff\": 0, \"270b-1f3fb\": 0, \"270b-1f3fc\": 0, \"270b-1f3fd\": 0, \"270b-1f3fe\": 0, \"270b-1f3ff\": 0, \"270c-1f3fb\": 0, \"270c-1f3fc\": 0, \"270c-1f3fd\": 0, \"270c-1f3fe\": 0, \"270c-1f3ff\": 0, \"270d-1f3fb\": 0, \"270d-1f3fc\": 0, \"270d-1f3fd\": 0, \"270d-1f3fe\": 0, \"270d-1f3ff\": 0 };\r\nexports.Emoji[\"00a9-fe0f\"] = 6362;\r\nexports.Emoji[\"00ae-fe0f\"] = 6363;\r\nexports.Emoji[\"2122-fe0f\"] = 6364;\r\nexports.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\nexports.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\nexports.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 MOBILE_SIZE = 896;\r\nconst MEDIUM_SIZE = 1275;\r\nconst LARGE_SIZE = 1680;\r\nclass MediaSizes {\r\n constructor() {\r\n this.screenSizes = [\r\n { key: 'mobile', value: MOBILE_SIZE - 1 },\r\n { key: 'medium', value: MEDIUM_SIZE },\r\n { key: 'large', value: LARGE_SIZE }\r\n ];\r\n this.sizes = {\r\n handhelds: {\r\n regular: {\r\n width: 293,\r\n height: 293\r\n },\r\n webpage: {\r\n width: 293,\r\n height: 213\r\n },\r\n album: {\r\n width: 293,\r\n height: 0\r\n }\r\n },\r\n desktop: {\r\n regular: {\r\n width: 480,\r\n height: 480\r\n },\r\n webpage: {\r\n width: 480,\r\n height: 400\r\n },\r\n album: {\r\n width: 451,\r\n height: 0\r\n }\r\n }\r\n };\r\n this.isMobile = false;\r\n this.handleResize = () => {\r\n const innerWidth = window.innerWidth;\r\n //this.isMobile = innerWidth <= 720;\r\n let activeScreen = this.screenSizes[0].key;\r\n for (let i = this.screenSizes.length - 1; i >= 0; --i) {\r\n if (this.screenSizes[i].value < innerWidth) {\r\n activeScreen = this.screenSizes[i].key;\r\n break;\r\n }\r\n }\r\n this.activeScreen = activeScreen;\r\n this.isMobile = this.activeScreen == 'mobile';\r\n this.active = this.isMobile ? this.sizes.handhelds : this.sizes.desktop;\r\n /* if(this.isMobile) {\r\n for(let i in this.active) {\r\n // @ts-ignore\r\n let size = this.active[i];\r\n size.width = innerWidth\r\n }\r\n } */\r\n };\r\n window.addEventListener('resize', this.handleResize);\r\n this.handleResize();\r\n }\r\n}\r\nexports.mediaSizes = new MediaSizes();\r\n// @ts-ignore\r\nexports.touchSupport = ('ontouchstart' in window) || (window.DocumentTouch && document instanceof DocumentTouch);\r\nexports.isServiceWorkerSupported = 'serviceWorker' in navigator;\r\nconst Config = {\r\n Emoji: exports.Emoji,\r\n LatinizeMap: exports.LatinizeMap,\r\n TLD: exports.TLD,\r\n Countries: exports.Countries,\r\n MediaSizes: exports.mediaSizes,\r\n touchSupport: exports.touchSupport,\r\n isApple: userAgent_1.isApple,\r\n isSafari: userAgent_1.isSafari,\r\n isAndroid: userAgent_1.isAndroid\r\n};\r\nwindow.Config = Config;\r\nexports.default = Config;\r\n" - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts", - "name": "./src/lib/mtproto/mtprotoworker.ts", - "index": 9, - "index2": 20, - "size": 6585, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "issuerId": 67, - "issuerName": "./src/index.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - } - ], - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 5, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appUsersManager.ts", - "module": "./src/lib/appManagers/appUsersManager.ts", - "moduleName": "./src/lib/appManagers/appUsersManager.ts", - "type": "cjs require", - "userRequest": "../mtproto/mtprotoworker", - "loc": "20:40-75" - }, - { - "moduleId": 7, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "module": "./src/lib/appManagers/appMessagesManager.ts", - "moduleName": "./src/lib/appManagers/appMessagesManager.ts", - "type": "cjs require", - "userRequest": "../mtproto/mtprotoworker", - "loc": "32:40-75" - }, - { - "moduleId": 9, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "../mtproto/mtprotoworker", - "loc": "8:40-75" - }, - { - "moduleId": 20, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\lottieLoader.ts", - "module": "./src/lib/lottieLoader.ts", - "moduleName": "./src/lib/lottieLoader.ts", - "type": "cjs require", - "userRequest": "./mtproto/mtprotoworker", - "loc": "19:40-74" - }, - { - "moduleId": 27, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appProfileManager.ts", - "module": "./src/lib/appManagers/appProfileManager.ts", - "moduleName": "./src/lib/appManagers/appProfileManager.ts", - "type": "cjs require", - "userRequest": "../mtproto/mtprotoworker", - "loc": "26:40-75" - }, - { - "moduleId": 28, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDownloadManager.ts", - "module": "./src/lib/appManagers/appDownloadManager.ts", - "moduleName": "./src/lib/appManagers/appDownloadManager.ts", - "type": "cjs require", - "userRequest": "../mtproto/mtprotoworker", - "loc": "8:40-75" - }, - { - "moduleId": 32, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\apiUpdatesManager.ts", - "module": "./src/lib/appManagers/apiUpdatesManager.ts", - "moduleName": "./src/lib/appManagers/apiUpdatesManager.ts", - "type": "cjs require", - "userRequest": "../mtproto/mtprotoworker", - "loc": "8:40-75" - }, - { - "moduleId": 39, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 44, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appStickersManager.ts", - "module": "./src/lib/appManagers/appStickersManager.ts", - "moduleName": "./src/lib/appManagers/appStickersManager.ts", - "type": "cjs require", - "userRequest": "../mtproto/mtprotoworker", - "loc": "17:40-75" - }, - { - "moduleId": 49, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "module": "./src/pages/pageSignIn.ts", - "moduleName": "./src/pages/pageSignIn.ts", - "type": "cjs require", - "userRequest": "../lib/mtproto/mtprotoworker", - "loc": "13:40-79" - }, - { - "moduleId": 53, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webpWorkerController.ts", - "module": "./src/lib/webp/webpWorkerController.ts", - "moduleName": "./src/lib/webp/webpWorkerController.ts", - "type": "cjs require", - "userRequest": "../mtproto/mtprotoworker", - "loc": "9:40-75" - }, - { - "moduleId": 62, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 66, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 67, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "module": "./src/index.ts", - "moduleName": "./src/index.ts", - "type": "cjs require", - "userRequest": "./lib/mtproto/mtprotoworker", - "loc": "63:50-88" - }, - { - "moduleId": 79, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 80, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignUp.ts", - "module": "./src/pages/pageSignUp.ts", - "moduleName": "./src/pages/pageSignUp.ts", - "type": "cjs require", - "userRequest": "../lib/mtproto/mtprotoworker", - "loc": "28:40-79" - }, - { - "moduleId": 93, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\settings.ts", - "module": "./src/components/sidebarLeft/settings.ts", - "moduleName": "./src/components/sidebarLeft/settings.ts", - "type": "cjs require", - "userRequest": "../../lib/mtproto/mtprotoworker", - "loc": "27:40-82" - }, - { - "moduleId": 94, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\editProfile.ts", - "module": "./src/components/sidebarLeft/editProfile.ts", - "moduleName": "./src/components/sidebarLeft/editProfile.ts", - "type": "cjs require", - "userRequest": "../../lib/mtproto/mtprotoworker", - "loc": "7:40-82" - }, - { - "moduleId": 95, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\chatFolders.ts", - "module": "./src/components/sidebarLeft/chatFolders.ts", - "moduleName": "./src/components/sidebarLeft/chatFolders.ts", - "type": "cjs require", - "userRequest": "../../lib/mtproto/mtprotoworker", - "loc": "7:40-82" - }, - { - "moduleId": 98, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\input.ts", - "module": "./src/components/chat/input.ts", - "moduleName": "./src/components/chat/input.ts", - "type": "cjs require", - "userRequest": "../../lib/mtproto/mtprotoworker", - "loc": "9:40-82" - }, - { - "moduleId": 100, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\gifs.ts", - "module": "./src/components/emoticonsDropdown/tabs/gifs.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/gifs.ts", - "type": "cjs require", - "userRequest": "../../../lib/mtproto/mtprotoworker", - "loc": "10:40-85" - }, - { - "moduleId": 102, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\stickers.ts", - "module": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "type": "cjs require", - "userRequest": "../../../lib/mtproto/mtprotoworker", - "loc": "44:40-85" - }, - { - "moduleId": 108, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\passwordManager.ts", - "module": "./src/lib/mtproto/passwordManager.ts", - "moduleName": "./src/lib/mtproto/passwordManager.ts", - "type": "cjs require", - "userRequest": "./mtprotoworker", - "loc": "7:40-66" - }, - { - "moduleId": 109, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 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 utils_1 = require(\"../utils\");\r\nconst storage_1 = __importDefault(require(\"../storage\"));\r\nconst crypto_methods_1 = __importDefault(require(\"../crypto/crypto_methods\"));\r\nconst logger_1 = require(\"../logger\");\r\nconst webpWorkerController_1 = __importDefault(require(\"../webp/webpWorkerController\"));\r\nconst mtproto_worker_1 = __importDefault(require(\"worker-loader!./mtproto.worker\"));\r\nconst config_1 = require(\"../config\");\r\nconst USEWORKERASWORKER = true;\r\nclass ApiManagerProxy extends crypto_methods_1.default {\r\n constructor() {\r\n super();\r\n this.taskID = 0;\r\n this.awaiting = {};\r\n this.pending = [];\r\n this.updatesProcessor = null;\r\n this.log = logger_1.logger('API-PROXY');\r\n this.log('constructor');\r\n this.registerServiceWorker();\r\n this.registerWorker();\r\n }\r\n registerServiceWorker() {\r\n if (!config_1.isServiceWorkerSupported)\r\n return;\r\n navigator.serviceWorker.register('./sw.js', { scope: './' }).then(registration => {\r\n }, (err) => {\r\n this.log.error('SW registration failed!', err);\r\n });\r\n navigator.serviceWorker.ready.then((registration) => {\r\n this.log('set SW');\r\n this.releasePending();\r\n if (!USEWORKERASWORKER) {\r\n this.postMessage = navigator.serviceWorker.controller.postMessage.bind(navigator.serviceWorker.controller);\r\n }\r\n //registration.update();\r\n });\r\n navigator.serviceWorker.addEventListener('controllerchange', () => {\r\n this.log.warn('controllerchange');\r\n this.releasePending();\r\n navigator.serviceWorker.controller.addEventListener('error', (e) => {\r\n this.log.error('controller error:', e);\r\n });\r\n });\r\n /**\r\n * Message resolver\r\n */\r\n navigator.serviceWorker.addEventListener('message', (e) => {\r\n const task = e.data;\r\n if (!utils_1.isObject(task)) {\r\n return;\r\n }\r\n this.postMessage(task);\r\n });\r\n navigator.serviceWorker.addEventListener('messageerror', (e) => {\r\n this.log.error('SW messageerror:', e);\r\n });\r\n }\r\n registerWorker() {\r\n const worker = new mtproto_worker_1.default();\r\n worker.addEventListener('message', (e) => {\r\n if (!this.worker) {\r\n this.worker = worker;\r\n this.log('set webWorker');\r\n if (USEWORKERASWORKER) {\r\n this.postMessage = this.worker.postMessage.bind(this.worker);\r\n }\r\n this.releasePending();\r\n }\r\n //this.log('got message from worker:', e.data);\r\n const task = e.data;\r\n if (!utils_1.isObject(task)) {\r\n return;\r\n }\r\n if (task.useLs) {\r\n // @ts-ignore\r\n storage_1.default[task.task](...task.args).then(res => {\r\n this.postMessage({ useLs: true, taskID: task.taskID, args: res });\r\n });\r\n }\r\n else if (task.update) {\r\n if (this.updatesProcessor) {\r\n this.updatesProcessor(task.update.obj, task.update.bool);\r\n }\r\n }\r\n else if (task.progress) {\r\n utils_1.$rootScope.$broadcast('download_progress', task.progress);\r\n }\r\n else if (task.type == 'convertWebp') {\r\n webpWorkerController_1.default.postMessage(task);\r\n }\r\n else if (task.type == 'requestFilePart') {\r\n navigator.serviceWorker.controller.postMessage(task);\r\n }\r\n else {\r\n this.finalizeTask(task.taskID, task.result, task.error);\r\n }\r\n });\r\n }\r\n finalizeTask(taskID, result, error) {\r\n const deferred = this.awaiting[taskID];\r\n if (deferred !== undefined) {\r\n this.log.debug('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.log.debug('start', task, args);\r\n return new Promise((resolve, reject) => {\r\n this.awaiting[this.taskID] = { resolve, reject, taskName: task };\r\n const params = {\r\n task,\r\n taskID: this.taskID,\r\n args\r\n };\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.postMessage) {\r\n this.log.debug('releasing tasks, length:', this.pending.length);\r\n this.pending.forEach(pending => {\r\n this.postMessage(pending);\r\n });\r\n this.log.debug('released tasks');\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 cancelDownload(fileName) {\r\n return this.performTaskWorker('cancelDownload', fileName);\r\n }\r\n downloadFile(options) {\r\n return this.performTaskWorker('downloadFile', options);\r\n }\r\n uploadFile(options) {\r\n return this.performTaskWorker('uploadFile', options);\r\n }\r\n}\r\nconst apiManagerProxy = new ApiManagerProxy();\r\n// @ts-ignore\r\nif (process.env.NODE_ENV != 'production') {\r\n window.apiManagerProxy = apiManagerProxy;\r\n}\r\nexports.default = apiManagerProxy;\r\n" - }, - { - "id": 3, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\richtextprocessor.ts", - "name": "./src/lib/richtextprocessor.ts", - "index": 27, - "index2": 27, - "size": 27232, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "issuerId": 49, - "issuerName": "./src/pages/pageSignIn.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 49, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "name": "./src/pages/pageSignIn.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - } - ], - "profile": { - "factory": 104, - "building": 1053, - "dependencies": 527 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 5, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appUsersManager.ts", - "module": "./src/lib/appManagers/appUsersManager.ts", - "moduleName": "./src/lib/appManagers/appUsersManager.ts", - "type": "cjs require", - "userRequest": "../richtextprocessor", - "loc": "17:28-59" - }, - { - "moduleId": 7, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 8, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appPeersManager.ts", - "module": "./src/lib/appManagers/appPeersManager.ts", - "moduleName": "./src/lib/appManagers/appPeersManager.ts", - "type": "cjs require", - "userRequest": "../richtextprocessor", - "loc": "10:28-59" - }, - { - "moduleId": 9, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "../richtextprocessor", - "loc": "15:28-59" - }, - { - "moduleId": 12, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDocsManager.ts", - "module": "./src/lib/appManagers/appDocsManager.ts", - "moduleName": "./src/lib/appManagers/appDocsManager.ts", - "type": "cjs require", - "userRequest": "../richtextprocessor", - "loc": "15:28-59" - }, - { - "moduleId": 16, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts", - "module": "./src/lib/appManagers/appDialogsManager.ts", - "moduleName": "./src/lib/appManagers/appDialogsManager.ts", - "type": "cjs require", - "userRequest": "../richtextprocessor", - "loc": "21:28-59" - }, - { - "moduleId": 18, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "module": "./src/components/wrappers.ts", - "moduleName": "./src/components/wrappers.ts", - "type": "cjs require", - "userRequest": "../lib/richtextprocessor", - "loc": "22:28-63" - }, - { - "moduleId": 24, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", - "type": "cjs require", - "userRequest": "../richtextprocessor", - "loc": "44:28-59" - }, - { - "moduleId": 27, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appProfileManager.ts", - "module": "./src/lib/appManagers/appProfileManager.ts", - "moduleName": "./src/lib/appManagers/appProfileManager.ts", - "type": "cjs require", - "userRequest": "../richtextprocessor", - "loc": "21:28-59" - }, - { - "moduleId": 39, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 49, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 55, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 56, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts", - "module": "./src/lib/appManagers/appMediaViewer.ts", - "moduleName": "./src/lib/appManagers/appMediaViewer.ts", - "type": "cjs require", - "userRequest": "../richtextprocessor", - "loc": "19:28-59" - }, - { - "moduleId": 58, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\poll.ts", - "module": "./src/components/poll.ts", - "moduleName": "./src/components/poll.ts", - "type": "cjs require", - "userRequest": "../lib/richtextprocessor", - "loc": "8:28-63" - }, - { - "moduleId": 61, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popupStickers.ts", - "module": "./src/components/popupStickers.ts", - "moduleName": "./src/components/popupStickers.ts", - "type": "cjs require", - "userRequest": "../lib/richtextprocessor", - "loc": "8:28-63" - }, - { - "moduleId": 62, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\AppInlineBotsManager.ts", - "module": "./src/lib/appManagers/AppInlineBotsManager.ts", - "moduleName": "./src/lib/appManagers/AppInlineBotsManager.ts", - "type": "cjs require", - "userRequest": "../richtextprocessor", - "loc": "11:28-59" - }, - { - "moduleId": 84, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\audio.ts", - "module": "./src/components/audio.ts", - "moduleName": "./src/components/audio.ts", - "type": "cjs require", - "userRequest": "../lib/richtextprocessor", - "loc": "8:28-63" - }, - { - "moduleId": 85, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\stickers.ts", - "module": "./src/components/sidebarRight/stickers.ts", - "moduleName": "./src/components/sidebarRight/stickers.ts", - "type": "cjs require", - "userRequest": "../../lib/richtextprocessor", - "loc": "33:28-66" - }, - { - "moduleId": 86, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\pollResults.ts", - "module": "./src/components/sidebarRight/pollResults.ts", - "moduleName": "./src/components/sidebarRight/pollResults.ts", - "type": "cjs require", - "userRequest": "../../lib/richtextprocessor", - "loc": "29:28-66" - }, - { - "moduleId": 95, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\chatFolders.ts", - "module": "./src/components/sidebarLeft/chatFolders.ts", - "moduleName": "./src/components/sidebarLeft/chatFolders.ts", - "type": "cjs require", - "userRequest": "../../lib/richtextprocessor", - "loc": "9:28-66" - }, - { - "moduleId": 98, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\input.ts", - "module": "./src/components/chat/input.ts", - "moduleName": "./src/components/chat/input.ts", - "type": "cjs require", - "userRequest": "../../lib/richtextprocessor", - "loc": "8:28-66" - }, - { - "moduleId": 101, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\emoji.ts", - "module": "./src/components/emoticonsDropdown/tabs/emoji.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/emoji.ts", - "type": "cjs require", - "userRequest": "../../../lib/richtextprocessor", - "loc": "11:28-69" - }, - { - "moduleId": 102, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\stickers.ts", - "module": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "type": "cjs require", - "userRequest": "../../../lib/richtextprocessor", - "loc": "42:28-69" - }, - { - "moduleId": 105, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\audio.ts", - "module": "./src/components/chat/audio.ts", - "moduleName": "./src/components/chat/audio.ts", - "type": "cjs require", - "userRequest": "../../lib/richtextprocessor", - "loc": "10:28-66" - } - ], - "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.RichTextProcessor = void 0;\r\nconst utils_1 = require(\"./utils\");\r\nconst config_1 = __importDefault(require(\"./config\"));\r\nconst regex_1 = __importDefault(require(\"../emoji/regex\"));\r\nconst emoji_1 = require(\"../emoji\");\r\nvar EmojiHelper = {\r\n emojiMap: (code) => { return code; },\r\n shortcuts: [],\r\n emojis: []\r\n};\r\nvar emojiData = config_1.default.Emoji;\r\nvar emojiSupported = navigator.userAgent.search(/OS X|iPhone|iPad|iOS/i) != -1 /* && false */ /* || true */, emojiCode;\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)|(' + regex_1.default + ')|(^|[\\\\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 unified = emoji_1.encodeEmoji(emojiCode) /* .replace(/(-fe0f|fe0f)/g, '') */;\r\n if (unified == '1f441-200d-1f5e8') {\r\n unified = '1f441-fe0f-200d-1f5e8-fe0f';\r\n }\r\n if (!emojiData.hasOwnProperty(unified) /* && !emojiData.hasOwnProperty(unified.replace(/(-fe0f|fe0f)/g, '')) */) {\r\n //if(!emojiData.hasOwnProperty(emojiCode) && !emojiData.hasOwnProperty(emojiCode.replace(/[\\ufe0f\\u200d]/g, ''))) {\r\n //console.error('lol', unified);\r\n return null;\r\n }\r\n return unified.replace(/(-fe0f|fe0f)/g, '');\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 //console.log('parseEntities match:', match);\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 }\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 }\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_1.default.TLD.indexOf(tld.toLowerCase()) !== -1)) {\r\n protocol = 'http://';\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 url = (match[5] ? '' : protocol) + match[4];\r\n }\r\n }\r\n else { // IP address\r\n url = (match[5] ? '' : 'http://') + match[4];\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 }\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 }\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 }\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 }\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 raw = raw.substr(match.index + match[0].length);\r\n rawOffset += match.index + match[0].length;\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 }\r\n else if (match[7]) { // code|italic|bold\r\n newText.push(match[6] + text + match[9]);\r\n entities.push({\r\n // @ts-ignore\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 }\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(utils_1.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((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 utils_1.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 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 //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(utils_1.encodeEntities(text.substr(lastOffset, entity.offset - lastOffset)));\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 '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('', utils_1.encodeEntities(entityText), '');\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('', utils_1.encodeEntities(entityText), '');\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('', utils_1.encodeEntities(entityText), '');\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('', utils_1.encodeEntities(entityText), '');\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 }\r\n else {\r\n url = wrapUrl(entityText, false);\r\n inner = utils_1.encodeEntities(replaceUrlEncodings(entityText));\r\n }\r\n if (options.noLinks) {\r\n html.push(inner);\r\n }\r\n else {\r\n html.push('', inner, '');\r\n }\r\n break;\r\n case 'messageEntityLinebreak':\r\n html.push(options.noLinebreaks ? ' ' : '
');\r\n break;\r\n case 'messageEntityEmoji':\r\n html.push(emojiSupported ?\r\n `${utils_1.encodeEntities(entityText)}` :\r\n `\"${utils_1.encodeEntities(entityText)}\"`);\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 }\r\n else {\r\n bot = options.fromBot;\r\n }\r\n html.push('', utils_1.encodeEntities(entityText), '');\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 html.push('', wrapRichNestedText(entityText, entity.nested, options), '');\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 html.push('', wrapRichNestedText(entityText, entity.nested, options), '');\r\n break;\r\n case 'messageEntityHighlight':\r\n html.push('', wrapRichNestedText(entityText, entity.nested, options), '');\r\n break;\r\n case 'messageEntityCode':\r\n if (options.noTextFormat) {\r\n html.push(utils_1.encodeEntities(entityText));\r\n break;\r\n }\r\n html.push('', utils_1.encodeEntities(entityText), '');\r\n break;\r\n case 'messageEntityPre':\r\n if (options.noTextFormat) {\r\n html.push(utils_1.encodeEntities(entityText));\r\n break;\r\n }\r\n html.push('
', utils_1.encodeEntities(entityText), '
');\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 html.push(utils_1.encodeEntities(text.substr(lastOffset))); // may be empty string\r\n //console.log(html);\r\n text = html.join(''); //$sanitize(html.join(''))\r\n /* if (!options.nested && (emojiFound || options.hasNested)) {\r\n text = text.replace(/\\ufe0f|️|�|‍/g, '', text)\r\n var emojiSizeClass = curEmojiSize == 18 ? '' : (' emoji-w' + curEmojiSize)\r\n text = text.replace(/]*)?) class=\"emoji emoji-(\\d)-(\\d+)-(\\d+)\"(.+?)<\\/span>/g,\r\n '')\r\n } */\r\n return text; //$sce.trustAs('html', text)\r\n}\r\nfunction wrapDraftText(text, options = {}) {\r\n if (!text || !text.length) {\r\n return '';\r\n }\r\n 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(text.substr(lastOffset, entity.offset - lastOffset));\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(':', entity.title, ':');\r\n break;\r\n case 'messageEntityCode':\r\n code.push('`', entityText, '`');\r\n break;\r\n case 'messageEntityBold':\r\n code.push('**', entityText, '**');\r\n break;\r\n case 'messageEntityItalic':\r\n code.push('__', entityText, '__');\r\n break;\r\n case 'messageEntityPre':\r\n code.push('```', entityText, '```');\r\n break;\r\n case 'messageEntityMentionName':\r\n code.push('@', entity.user_id, ' (', entityText, ')');\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\nfunction replaceUrlEncodings(urlWithEncoded) {\r\n return urlWithEncoded.replace(/(%[A-Z\\d]{2})+/g, (str) => {\r\n try {\r\n return decodeURIComponent(str);\r\n }\r\n catch (e) {\r\n return str;\r\n }\r\n });\r\n}\r\nfunction wrapPlainText(text, options = {}) {\r\n if (emojiSupported) {\r\n return text;\r\n }\r\n if (!text || !text.length) {\r\n return '';\r\n }\r\n text = text.replace(/\\ufe0f/g, '', text);\r\n var match;\r\n var raw = text;\r\n var text = [], emojiTitle;\r\n while ((match = raw.match(fullRegExp))) {\r\n text.push(raw.substr(0, match.index));\r\n if (match[8]) {\r\n // @ts-ignore\r\n if ((emojiCode = EmojiHelper.emojiMap[match[8]]) &&\r\n // @ts-ignore\r\n (emojiTitle = emojiData[emojiCode][1][0])) {\r\n text.push(':' + emojiTitle + ':');\r\n }\r\n else {\r\n text.push(match[0]);\r\n }\r\n }\r\n else {\r\n text.push(match[0]);\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)\r\n return '';\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 }\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\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\nexports.RichTextProcessor = RichTextProcessor;\r\n// @ts-ignore\r\nif (process.env.NODE_ENV != 'production') {\r\n window.RichTextProcessor = RichTextProcessor;\r\n}\r\n" - }, - { - "id": 4, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\misc.ts", - "name": "./src/components/misc.ts", - "index": 24, - "index2": 22, - "size": 10517, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "issuerId": 49, - "issuerName": "./src/pages/pageSignIn.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 49, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "name": "./src/pages/pageSignIn.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - } - ], - "profile": { - "factory": 104, - "building": 1053, - "dependencies": 527 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 5, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": "22:15-47" - }, - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "../../components/misc", - "loc": "24:15-47" - }, - { - "moduleId": 14, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": "31:15-47" - }, - { - "moduleId": 16, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts", - "module": "./src/lib/appManagers/appDialogsManager.ts", - "moduleName": "./src/lib/appManagers/appDialogsManager.ts", - "type": "cjs require", - "userRequest": "../../components/misc", - "loc": "22:15-47" - }, - { - "moduleId": 18, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "module": "./src/components/wrappers.ts", - "moduleName": "./src/components/wrappers.ts", - "type": "cjs require", - "userRequest": "./misc", - "loc": "23:15-32" - }, - { - "moduleId": 24, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", - "type": "cjs require", - "userRequest": "../../components/misc", - "loc": "35:15-47" - }, - { - "moduleId": 27, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appProfileManager.ts", - "module": "./src/lib/appManagers/appProfileManager.ts", - "moduleName": "./src/lib/appManagers/appProfileManager.ts", - "type": "cjs require", - "userRequest": "../../components/misc", - "loc": "27:15-47" - }, - { - "moduleId": 31, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 42, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 49, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 56, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 61, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popupStickers.ts", - "module": "./src/components/popupStickers.ts", - "moduleName": "./src/components/popupStickers.ts", - "type": "cjs require", - "userRequest": "./misc", - "loc": "12:15-32" - }, - { - "moduleId": 63, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\gifsMasonry.ts", - "module": "./src/components/gifsMasonry.ts", - "moduleName": "./src/components/gifsMasonry.ts", - "type": "cjs require", - "userRequest": "./misc", - "loc": "18:15-32" - }, - { - "moduleId": 66, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pagePassword.ts", - "module": "./src/pages/pagePassword.ts", - "moduleName": "./src/pages/pagePassword.ts", - "type": "cjs require", - "userRequest": "../components/misc", - "loc": "9:15-44" - }, - { - "moduleId": 80, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignUp.ts", - "module": "./src/pages/pageSignUp.ts", - "moduleName": "./src/pages/pageSignUp.ts", - "type": "cjs require", - "userRequest": "../components/misc", - "loc": "25:15-44" - }, - { - "moduleId": 90, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\addMembers.ts", - "module": "./src/components/sidebarLeft/addMembers.ts", - "moduleName": "./src/components/sidebarLeft/addMembers.ts", - "type": "cjs require", - "userRequest": "../misc", - "loc": "26:15-33" - }, - { - "moduleId": 93, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\settings.ts", - "module": "./src/components/sidebarLeft/settings.ts", - "moduleName": "./src/components/sidebarLeft/settings.ts", - "type": "cjs require", - "userRequest": "../misc", - "loc": "25:15-33" - }, - { - "moduleId": 96, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\editFolder.ts", - "module": "./src/components/sidebarLeft/editFolder.ts", - "moduleName": "./src/components/sidebarLeft/editFolder.ts", - "type": "cjs require", - "userRequest": "../misc", - "loc": "28:15-33" - }, - { - "moduleId": 100, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\gifs.ts", - "module": "./src/components/emoticonsDropdown/tabs/gifs.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/gifs.ts", - "type": "cjs require", - "userRequest": "../../misc", - "loc": "9:15-36" - }, - { - "moduleId": 101, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\emoji.ts", - "module": "./src/components/emoticonsDropdown/tabs/emoji.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/emoji.ts", - "type": "cjs require", - "userRequest": "../../misc", - "loc": "9:15-36" - }, - { - "moduleId": 102, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\stickers.ts", - "module": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "type": "cjs require", - "userRequest": "../../misc", - "loc": "41:15-36" - }, - { - "moduleId": 106, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\contextMenu.ts", - "module": "./src/components/chat/contextMenu.ts", - "moduleName": "./src/components/chat/contextMenu.ts", - "type": "cjs require", - "userRequest": "../misc", - "loc": "13:15-33" - } - ], - "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\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.attachContextMenuListener = exports.positionMenu = exports.openBtnMenu = exports.parseMenuButtonsTo = exports.formatPhoneNumber = exports.putPreloader = exports.renderImageFromUrl = exports.loadedURLs = void 0;\r\nconst config_1 = __importStar(require(\"../lib/config\"));\r\nexports.loadedURLs = {};\r\nconst set = (elem, url) => {\r\n if (elem instanceof HTMLImageElement || elem instanceof HTMLVideoElement)\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\n// проблема функции в том, что она не подходит для ссылок, пригодна только для blob'ов, потому что обычным ссылкам нужен 'load' каждый раз.\r\nfunction renderImageFromUrl(elem, url, callback) {\r\n if ((exports.loadedURLs[url] /* && false */) || elem instanceof HTMLVideoElement) {\r\n set(elem, url);\r\n callback && callback();\r\n return true;\r\n }\r\n else {\r\n const isImage = elem instanceof HTMLImageElement;\r\n const loader = isImage ? elem : new Image();\r\n //const loader = new Image();\r\n loader.src = url;\r\n //let perf = performance.now();\r\n loader.addEventListener('load', () => {\r\n if (!isImage) {\r\n set(elem, url);\r\n }\r\n exports.loadedURLs[url] = true;\r\n //console.log('onload:', url, performance.now() - perf);\r\n callback && callback();\r\n });\r\n if (callback) {\r\n loader.addEventListener('error', callback);\r\n }\r\n return false;\r\n }\r\n}\r\nexports.renderImageFromUrl = renderImageFromUrl;\r\nfunction putPreloader(elem, returnDiv = false) {\r\n const html = `\r\n \r\n \r\n `;\r\n if (returnDiv) {\r\n let div = document.createElement('div');\r\n div.classList.add('preloader');\r\n div.innerHTML = html;\r\n if (elem) {\r\n elem.appendChild(div);\r\n }\r\n return div;\r\n }\r\n elem.innerHTML += html;\r\n}\r\nexports.putPreloader = putPreloader;\r\nfunction 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 const match = el.className.match(/(?:^|\\s)menu-(.+?)(?:$|\\s)/);\r\n if (!match)\r\n return;\r\n to[match[1]] = 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) => {\r\n /* if(touchSupport && e.type == 'touchstart') {\r\n const target = findUpClassName(e.target, 'btn-menu');\r\n if(!target) {\r\n window.addEventListener('touchend', (e) => {\r\n return cancelEvent(e);\r\n }, {once: true});\r\n }\r\n } */ /* else if(!touchSupport && e.type == 'mousedown') {\r\n const target = findUpClassName(e.target, 'btn-menu');\r\n if(!target) {\r\n closeBtnMenu();\r\n return cancelEvent(e);\r\n }\r\n } */\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 if (config_1.touchSupport) {\r\n window.removeEventListener('touchmove', onClick);\r\n //window.removeEventListener('touchstart', onClick);\r\n }\r\n else {\r\n window.removeEventListener('mousemove', onMouseMove);\r\n //window.removeEventListener('mousedown', onClick);\r\n //window.removeEventListener('click', onClick);\r\n }\r\n window.removeEventListener('click', onClick);\r\n window.removeEventListener('contextmenu', onClick);\r\n};\r\nwindow.addEventListener('resize', () => {\r\n if (openedMenu) {\r\n closeBtnMenu();\r\n }\r\n /* if(openedMenu && (openedMenu.style.top || openedMenu.style.left)) {\r\n const rect = openedMenu.getBoundingClientRect();\r\n const {innerWidth, innerHeight} = window;\r\n \r\n console.log(innerWidth, innerHeight, rect);\r\n } */\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 if (config_1.touchSupport) {\r\n window.addEventListener('touchmove', onClick, { once: true });\r\n //window.addEventListener('touchstart', onClick);\r\n }\r\n else {\r\n window.addEventListener('mousemove', onMouseMove);\r\n //window.addEventListener('mousedown', onClick);\r\n //window.addEventListener('click', onClick, {once: true});\r\n }\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({ clientX, clientY } /* e: MouseEvent */, elem, side) {\r\n //let {clientX, clientY} = e;\r\n let { scrollWidth, scrollHeight } = elem;\r\n let { innerWidth, innerHeight } = window;\r\n if (config_1.mediaSizes.isMobile) {\r\n side = undefined;\r\n }\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\nfunction attachContextMenuListener(element, callback) {\r\n if (config_1.isApple && config_1.touchSupport) {\r\n let timeout;\r\n const onCancel = () => {\r\n clearTimeout(timeout);\r\n element.removeEventListener('touchmove', onCancel);\r\n element.removeEventListener('touchend', onCancel);\r\n element.removeEventListener('touchcancel', onCancel);\r\n };\r\n element.addEventListener('touchstart', (e) => {\r\n if (e.touches.length > 1) {\r\n clearTimeout(timeout);\r\n return;\r\n }\r\n element.addEventListener('touchmove', onCancel, { once: true });\r\n element.addEventListener('touchend', onCancel, { once: true });\r\n element.addEventListener('touchcancel', onCancel, { once: true });\r\n /* let eee = (e: TouchEvent) => {\r\n const target = findUpClassName(e.target, 'btn-menu');\r\n if(!target) {\r\n closeBtnMenu();\r\n window.addEventListener('touchend', (e) => {\r\n return cancelEvent(e);\r\n }, {once: true});\r\n }\r\n }; */\r\n timeout = window.setTimeout(() => {\r\n callback(e.touches[0]);\r\n onCancel();\r\n /* window.requestAnimationFrame(() => {\r\n window.addEventListener('touchstart', eee);\r\n window.addEventListener('touchend', (e) => {\r\n window.removeEventListener('touchstart', eee);\r\n }, {once: true});\r\n }); */\r\n }, .4e3);\r\n });\r\n }\r\n else {\r\n element.addEventListener('contextmenu', callback);\r\n }\r\n}\r\nexports.attachContextMenuListener = attachContextMenuListener;\r\n;\r\n" - }, - { - "id": 5, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appUsersManager.ts", - "name": "./src/lib/appManagers/appUsersManager.ts", - "index": 39, - "index2": 50, - "size": 21672, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 7, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 8, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appPeersManager.ts", - "module": "./src/lib/appManagers/appPeersManager.ts", - "moduleName": "./src/lib/appManagers/appPeersManager.ts", - "type": "cjs require", - "userRequest": "./appUsersManager", - "loc": "7:42-70" - }, - { - "moduleId": 9, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "./appUsersManager", - "loc": "10:42-70" - }, - { - "moduleId": 14, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "module": "./src/lib/appManagers/appSidebarLeft.ts", - "moduleName": "./src/lib/appManagers/appSidebarLeft.ts", - "type": "cjs require", - "userRequest": "./appUsersManager", - "loc": "32:42-70" - }, - { - "moduleId": 16, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts", - "module": "./src/lib/appManagers/appDialogsManager.ts", - "moduleName": "./src/lib/appManagers/appDialogsManager.ts", - "type": "cjs require", - "userRequest": "./appUsersManager", - "loc": "20:42-70" - }, - { - "moduleId": 24, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", - "type": "cjs require", - "userRequest": "./appUsersManager", - "loc": "42:42-70" - }, - { - "moduleId": 27, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appProfileManager.ts", - "module": "./src/lib/appManagers/appProfileManager.ts", - "moduleName": "./src/lib/appManagers/appProfileManager.ts", - "type": "cjs require", - "userRequest": "./appUsersManager", - "loc": "20:42-70" - }, - { - "moduleId": 32, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\apiUpdatesManager.ts", - "module": "./src/lib/appManagers/apiUpdatesManager.ts", - "moduleName": "./src/lib/appManagers/apiUpdatesManager.ts", - "type": "cjs require", - "userRequest": "./appUsersManager", - "loc": "12:42-70" - }, - { - "moduleId": 39, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appPollsManager.ts", - "module": "./src/lib/appManagers/appPollsManager.ts", - "moduleName": "./src/lib/appManagers/appPollsManager.ts", - "type": "cjs require", - "userRequest": "./appUsersManager", - "loc": "13:42-70" - }, - { - "moduleId": 40, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appStateManager.ts", - "module": "./src/lib/appManagers/appStateManager.ts", - "moduleName": "./src/lib/appManagers/appStateManager.ts", - "type": "cjs require", - "userRequest": "./appUsersManager", - "loc": "12:42-70" - }, - { - "moduleId": 43, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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" - }, - { - "moduleId": 51, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 62, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\AppInlineBotsManager.ts", - "module": "./src/lib/appManagers/AppInlineBotsManager.ts", - "moduleName": "./src/lib/appManagers/AppInlineBotsManager.ts", - "type": "cjs require", - "userRequest": "./appUsersManager", - "loc": "13:42-70" - }, - { - "moduleId": 87, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\gifs.ts", - "module": "./src/components/sidebarRight/gifs.ts", - "moduleName": "./src/components/sidebarRight/gifs.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appUsersManager", - "loc": "38:42-90" - }, - { - "moduleId": 91, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\contacts.ts", - "module": "./src/components/sidebarLeft/contacts.ts", - "moduleName": "./src/components/sidebarLeft/contacts.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appUsersManager", - "loc": "27:42-90" - }, - { - "moduleId": 92, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\newGroup.ts", - "module": "./src/components/sidebarLeft/newGroup.ts", - "moduleName": "./src/components/sidebarLeft/newGroup.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appUsersManager", - "loc": "31:42-90" - }, - { - "moduleId": 93, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\settings.ts", - "module": "./src/components/sidebarLeft/settings.ts", - "moduleName": "./src/components/sidebarLeft/settings.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appUsersManager", - "loc": "29:42-90" - }, - { - "moduleId": 94, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\editProfile.ts", - "module": "./src/components/sidebarLeft/editProfile.ts", - "moduleName": "./src/components/sidebarLeft/editProfile.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appUsersManager", - "loc": "11:42-90" - }, - { - "moduleId": 97, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\includedChats.ts", - "module": "./src/components/sidebarLeft/includedChats.ts", - "moduleName": "./src/components/sidebarLeft/includedChats.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appUsersManager", - "loc": "29:42-90" - } - ], - "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.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\nconst appPeersManager_1 = __importDefault(require(\"./appPeersManager\"));\r\nconst appStateManager_1 = __importDefault(require(\"./appStateManager\"));\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 this.contactsList = new Set();\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 ('expires' in user.status) {\r\n user.status.expires -= serverTimeManager_1.default.serverTimeOffset;\r\n }\r\n if ('was_online' in user.status) {\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 this.saveApiUsers(result.users);\r\n result.contacts.forEach((contact) => {\r\n this.pushContact(contact.user_id);\r\n });\r\n return this.contactsList;\r\n });\r\n }\r\n resolveUsername(username) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (this.usernames[username]) {\r\n return this.users[this.usernames[username]];\r\n }\r\n return yield mtprotoworker_1.default.invokeApi('contacts.resolveUsername', { username }).then(resolvedPeer => {\r\n this.saveApiUser(resolvedPeer.users[0]);\r\n appChatsManager_1.default.saveApiChats(resolvedPeer.chats);\r\n return this.users[this.usernames[username]];\r\n });\r\n });\r\n }\r\n pushContact(userID) {\r\n this.contactsList.add(userID);\r\n searchIndexManager_1.default.indexObject(userID, this.getUserSearchText(userID), this.contactsIndex);\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 let contactsList = [..._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 /* public resolveUsername(username: string) {\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 const expires = status._ == 'userStatusOnline' ? status.expires : (status._ == 'userStatusOffline' ? status.was_online : 0);\r\n if (expires) {\r\n return expires;\r\n }\r\n const 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 var _a;\r\n if (this.isBot(userID)) {\r\n return 'bot';\r\n }\r\n const user = this.getUser(userID);\r\n if (!user) {\r\n return '';\r\n }\r\n let str = '';\r\n switch ((_a = user.status) === null || _a === void 0 ? void 0 : _a._) {\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 const date = user.status.was_online;\r\n const 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 const 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 const c = (now - date) / 3600 | 0;\r\n str += c + ' ' + (c == 1 ? 'hour' : 'hours') + ' ago';\r\n }\r\n else {\r\n const 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 default: {\r\n str = 'last seen a long time ago';\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 isContact(id) {\r\n return this.contactsList.has(id);\r\n }\r\n isRegularUser(id) {\r\n const user = this.users[id];\r\n return user && !this.isBot(id) && !user.pFlags.deleted && !user.pFlags.support;\r\n }\r\n isNonContactUser(id) {\r\n return this.isRegularUser(id) && !this.isContact(id) && id != utils_1.$rootScope.myID;\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 const user = this.getUser(id);\r\n return 'u' + id + (user.access_hash ? '_' + user.access_hash : '');\r\n }\r\n getUserInput(id) {\r\n const 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\r\n };\r\n }\r\n updateUsersStatuses() {\r\n const timestampNow = utils_1.tsNow(true);\r\n for (const i in this.users) {\r\n const user = this.users[i];\r\n if (user.status &&\r\n user.status._ == 'userStatusOnline' &&\r\n user.status.expires < timestampNow) {\r\n user.status = { _: 'userStatusOffline', was_online: user.status.expires };\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 const user = this.getUser(id);\r\n if (user &&\r\n user.status &&\r\n user.status._ != 'userStatusOnline' &&\r\n user.status._ != 'userStatusEmpty' &&\r\n !user.pFlags.support) {\r\n user.status = {\r\n _: 'userStatusOnline',\r\n expires: utils_1.tsNow(true) + 60\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 /* public deleteContacts(userIDs: number[]) {\r\n var ids: any[] = [];\r\n userIDs.forEach((userID) => {\r\n ids.push(this.getUserInput(userID));\r\n })\r\n \r\n return apiManager.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 if (this.getPeersPromise)\r\n return this.getPeersPromise;\r\n return this.getPeersPromise = appStateManager_1.default.getState().then((state) => {\r\n var _a;\r\n if ((_a = state === null || state === void 0 ? void 0 : state.topPeers) === null || _a === void 0 ? void 0 : _a.length) {\r\n return state.topPeers;\r\n }\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((result) => {\r\n let peerIDs;\r\n if (result._ == 'contacts.topPeers') {\r\n //console.log(result);\r\n this.saveApiUsers(result.users);\r\n appChatsManager_1.default.saveApiChats(result.chats);\r\n peerIDs = result.categories[0].peers.map((topPeer) => {\r\n const peerID = appPeersManager_1.default.getPeerID(topPeer.peer);\r\n appStateManager_1.default.pushPeer(peerID);\r\n return peerID;\r\n });\r\n }\r\n appStateManager_1.default.pushToState('topPeers', peerIDs);\r\n return peerIDs;\r\n });\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 /* public onContactUpdated(userID: number, isContact: boolean) {\r\n userID = parseInt('' + userID);\r\n \r\n if(Array.isArray(this.contactsList)) {\r\n var curPos = this.contactsList.indexOf(userID);\r\n var curIsContact = curPos != -1;\r\n \r\n if(isContact != curIsContact) {\r\n if(isContact) {\r\n this.contactsList.push(userID)\r\n searchIndexManager.indexObject(userID, this.getUserSearchText(userID), this.contactsIndex);\r\n } else {\r\n this.contactsList.splice(curPos, 1);\r\n }\r\n \r\n $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": 6, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\scrollable_new.ts", - "name": "./src/components/scrollable_new.ts", - "index": 25, - "index2": 24, - "size": 17773, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "issuerId": 49, - "issuerName": "./src/pages/pageSignIn.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 49, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "name": "./src/pages/pageSignIn.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - } - ], - "profile": { - "factory": 104, - "building": 1053, - "dependencies": 527 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "../../components/scrollable_new", - "loc": "27:41-83" - }, - { - "moduleId": 14, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": "33:41-83" - }, - { - "moduleId": 16, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts", - "module": "./src/lib/appManagers/appDialogsManager.ts", - "moduleName": "./src/lib/appManagers/appDialogsManager.ts", - "type": "cjs require", - "userRequest": "../../components/scrollable_new", - "loc": "24:41-83" - }, - { - "moduleId": 24, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", - "type": "cjs require", - "userRequest": "../../components/scrollable_new", - "loc": "37:41-83" - }, - { - "moduleId": 43, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 49, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 51, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 61, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popupStickers.ts", - "module": "./src/components/popupStickers.ts", - "moduleName": "./src/components/popupStickers.ts", - "type": "cjs require", - "userRequest": "./scrollable_new", - "loc": "9:41-68" - }, - { - "moduleId": 85, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\stickers.ts", - "module": "./src/components/sidebarRight/stickers.ts", - "moduleName": "./src/components/sidebarRight/stickers.ts", - "type": "cjs require", - "userRequest": "../scrollable_new", - "loc": "26:41-69" - }, - { - "moduleId": 86, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\pollResults.ts", - "module": "./src/components/sidebarRight/pollResults.ts", - "moduleName": "./src/components/sidebarRight/pollResults.ts", - "type": "cjs require", - "userRequest": "../scrollable_new", - "loc": "25:41-69" - }, - { - "moduleId": 87, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\gifs.ts", - "module": "./src/components/sidebarRight/gifs.ts", - "moduleName": "./src/components/sidebarRight/gifs.ts", - "type": "cjs require", - "userRequest": "../scrollable_new", - "loc": "35:41-69" - }, - { - "moduleId": 91, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\contacts.ts", - "module": "./src/components/sidebarLeft/contacts.ts", - "moduleName": "./src/components/sidebarLeft/contacts.ts", - "type": "cjs require", - "userRequest": "../scrollable_new", - "loc": "25:41-69" - }, - { - "moduleId": 92, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\newGroup.ts", - "module": "./src/components/sidebarLeft/newGroup.ts", - "moduleName": "./src/components/sidebarLeft/newGroup.ts", - "type": "cjs require", - "userRequest": "../scrollable_new", - "loc": "29:41-69" - }, - { - "moduleId": 94, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\editProfile.ts", - "module": "./src/components/sidebarLeft/editProfile.ts", - "moduleName": "./src/components/sidebarLeft/editProfile.ts", - "type": "cjs require", - "userRequest": "../scrollable_new", - "loc": "10:41-69" - }, - { - "moduleId": 98, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\input.ts", - "module": "./src/components/chat/input.ts", - "moduleName": "./src/components/chat/input.ts", - "type": "cjs require", - "userRequest": "../scrollable_new", - "loc": "7:41-69" - }, - { - "moduleId": 100, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\gifs.ts", - "module": "./src/components/emoticonsDropdown/tabs/gifs.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/gifs.ts", - "type": "cjs require", - "userRequest": "../../scrollable_new", - "loc": "8:41-72" - }, - { - "moduleId": 101, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\emoji.ts", - "module": "./src/components/emoticonsDropdown/tabs/emoji.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/emoji.ts", - "type": "cjs require", - "userRequest": "../../scrollable_new", - "loc": "7:41-72" - }, - { - "moduleId": 102, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\stickers.ts", - "module": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "type": "cjs require", - "userRequest": "../../scrollable_new", - "loc": "35:41-72" - }, - { - "moduleId": 103, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popupCreatePoll.ts", - "module": "./src/components/popupCreatePoll.ts", - "moduleName": "./src/components/popupCreatePoll.ts", - "type": "cjs require", - "userRequest": "./scrollable_new", - "loc": "7: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 logger_1 = require(\"../lib/logger\");\r\nconst smoothscroll_1 = __importDefault(require(\"../vendor/smoothscroll\"));\r\nconst config_1 = require(\"../lib/config\");\r\n//import { CancellablePromise, deferredPromise } from \"../lib/polyfill\";\r\n//import { isInDOM } from \"../lib/utils\";\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 = 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, container = document.createElement('div')) {\r\n this.el = el;\r\n this.appendTo = appendTo;\r\n this.onScrollOffset = onScrollOffset;\r\n this.splitCount = splitCount;\r\n this.container = container;\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.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 /* private onScrolledTopFired = false;\r\n private onScrolledBottomFired = false; */\r\n this.scrollLocked = 0;\r\n //public scrollLockedPromise: CancellablePromise = Promise.resolve();\r\n this.isVisible = false;\r\n this.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 // this.log('onScroll:', this.container.scrollTop);\r\n // if(this.container.scrollTop <= 0) {\r\n // /* touchSupport && */(this.container.style.overflow = 'hidden');\r\n // this.scrollTop = 0;\r\n // /* touchSupport && */(this.container.style.overflow = '');\r\n // }\r\n if (this.splitUp) {\r\n clearTimeout(this.disableHoverTimeout);\r\n this.disableHoverTimeout = window.setTimeout(() => {\r\n //appendTo.classList.remove('disable-hover');\r\n this.lastScrollDirection = 0;\r\n }, 100);\r\n }\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 if (this.onScrollMeasure || ((this.scrollLocked || (!this.onScrolledTop && !this.onScrolledBottom)) && !this.splitUp))\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 const 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 this.container.classList.add('scrollable');\r\n this.visible = new Set();\r\n this.observer = new IntersectionObserver(entries => {\r\n const filtered = entries.filter(entry => entry.isIntersecting);\r\n //return;\r\n //this.log('entries:', entries);\r\n entries.forEach(entry => {\r\n const target = entry.target;\r\n if (entry.isIntersecting) {\r\n this.setVisible(target);\r\n this.log.debug('intersection entry:', entry, this.lastTopID, this.lastBottomID);\r\n }\r\n else {\r\n const id = +target.dataset.virtual;\r\n const 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.log.debug('entries:', entries, filtered, this.lastScrollDirection, this.lastTopID, this.lastBottomID);\r\n const minVisibleID = this.lastTopID - this.splitCount;\r\n const maxVisibleID = this.lastBottomID + this.splitCount;\r\n for (const target of this.visible) {\r\n const 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 = logger_1.logger('SCROLL' + (logPrefix ? '-' + logPrefix : ''), logger_1.LogLevels.error);\r\n if (axis == 'x') {\r\n this.container.classList.add('scrollable-x');\r\n if (!config_1.touchSupport) {\r\n const scrollHorizontally = (e) => {\r\n e = window.event || e;\r\n if (e.which == 1) {\r\n // maybe horizontal scroll is natively supports, works on macbook\r\n return;\r\n }\r\n const 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 }\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 window.addEventListener('resize', () => {\r\n this.overflowContainer = config_1.mediaSizes.isMobile && false ? document.documentElement : this.container;\r\n this.onScroll();\r\n });\r\n this.container.addEventListener('scroll', this.onScroll, { 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 if (el) {\r\n Array.from(el.children).forEach(c => this.container.append(c));\r\n el.append(this.container);\r\n }\r\n //this.onScroll();\r\n this.overflowContainer = config_1.mediaSizes.isMobile && 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.log.debug('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.log.debug('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 checkForTriggers(container) {\r\n if (this.scrollLocked || (!this.onScrolledTop && !this.onScrolledBottom))\r\n return;\r\n const scrollHeight = container.scrollHeight;\r\n if (!scrollHeight) { // незачем вызывать триггеры если блок пустой или не виден\r\n return;\r\n }\r\n const { clientHeight, scrollTop } = container;\r\n const maxScrollTop = scrollHeight - 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 if (!this.splitUp || this.reorderTimeout)\r\n return;\r\n this.reorderTimeout = window.setTimeout(() => {\r\n this.reorderTimeout = 0;\r\n Array.from(this.splitUp.children).forEach((el, idx) => {\r\n el.dataset.virtual = '' + idx;\r\n });\r\n }, 0);\r\n }\r\n updateElement(element) {\r\n element.style.minHeight = '';\r\n window.requestAnimationFrame(() => {\r\n const 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 if (!this.splitUp)\r\n return;\r\n //return;\r\n element.dataset.virtual = '' + (append ? this.virtualTempIDBottom++ : this.virtualTempIDTop--);\r\n this.log.debug('prepareElement: prepared');\r\n window.requestAnimationFrame(() => {\r\n const { scrollHeight /* , scrollWidth */ } = element;\r\n this.log.debug('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 const 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 const clientHeight = this.container.clientHeight;\r\n const height = element.scrollHeight;\r\n const 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 const 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 /* else {\r\n this.scrollLockedPromise = deferredPromise();\r\n } */\r\n this.scrollLocked = window.setTimeout(() => {\r\n this.scrollLocked = 0;\r\n //this.scrollLockedPromise.resolve();\r\n //this.onScroll();\r\n this.container.dispatchEvent(new CustomEvent('scroll'));\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": 7, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "name": "./src/lib/appManagers/appMessagesManager.ts", - "index": 48, - "index2": 46, - "size": 170131, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 16, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 18, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "module": "./src/components/wrappers.ts", - "moduleName": "./src/components/wrappers.ts", - "type": "cjs require", - "userRequest": "../lib/appManagers/appMessagesManager", - "loc": "24:45-93" - }, - { - "moduleId": 24, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", - "type": "cjs require", - "userRequest": "./appMessagesManager", - "loc": "39:45-76" - }, - { - "moduleId": 27, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appProfileManager.ts", - "module": "./src/lib/appManagers/appProfileManager.ts", - "moduleName": "./src/lib/appManagers/appProfileManager.ts", - "type": "cjs require", - "userRequest": "./appMessagesManager", - "loc": "29:45-76" - }, - { - "moduleId": 37, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\appMediaPlaybackController.ts", - "module": "./src/components/appMediaPlaybackController.ts", - "moduleName": "./src/components/appMediaPlaybackController.ts", - "type": "cjs require", - "userRequest": "../lib/appManagers/appMessagesManager", - "loc": "7:45-93" - }, - { - "moduleId": 39, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 40, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appStateManager.ts", - "module": "./src/lib/appManagers/appStateManager.ts", - "moduleName": "./src/lib/appManagers/appStateManager.ts", - "type": "cjs require", - "userRequest": "./appMessagesManager", - "loc": "8:45-76" - }, - { - "moduleId": 42, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 43, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 51, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 56, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 62, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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" - }, - { - "moduleId": 95, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\chatFolders.ts", - "module": "./src/components/sidebarLeft/chatFolders.ts", - "moduleName": "./src/components/sidebarLeft/chatFolders.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appMessagesManager", - "loc": "8:45-96" - }, - { - "moduleId": 96, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\editFolder.ts", - "module": "./src/components/sidebarLeft/editFolder.ts", - "moduleName": "./src/components/sidebarLeft/editFolder.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appMessagesManager", - "loc": "27:45-96" - }, - { - "moduleId": 98, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\input.ts", - "module": "./src/components/chat/input.ts", - "moduleName": "./src/components/chat/input.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appMessagesManager", - "loc": "14:45-96" - }, - { - "moduleId": 103, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popupCreatePoll.ts", - "module": "./src/components/popupCreatePoll.ts", - "moduleName": "./src/components/popupCreatePoll.ts", - "type": "cjs require", - "userRequest": "../lib/appManagers/appMessagesManager", - "loc": "8:45-93" - }, - { - "moduleId": 105, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\audio.ts", - "module": "./src/components/chat/audio.ts", - "moduleName": "./src/components/chat/audio.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appMessagesManager", - "loc": "8:45-96" - }, - { - "moduleId": 106, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\contextMenu.ts", - "module": "./src/components/chat/contextMenu.ts", - "moduleName": "./src/components/chat/contextMenu.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appMessagesManager", - "loc": "9:45-96" - } - ], - "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 = exports.FiltersStorage = exports.DialogsStorage = 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 appDocsManager_1 = __importDefault(require(\"./appDocsManager\"));\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 cancellablePromise_1 = require(\"../../helpers/cancellablePromise\");\r\nconst appPollsManager_1 = __importDefault(require(\"./appPollsManager\"));\r\nconst searchIndexManager_1 = __importDefault(require(\"../searchIndexManager\"));\r\nconst logger_1 = require(\"../logger\");\r\nconst appDownloadManager_1 = __importDefault(require(\"./appDownloadManager\"));\r\n//console.trace('include');\r\n// TODO: если удалить сообщение в непрогруженном диалоге, то при обновлении, из-за стейта, последнего сообщения в чатлисте не будет\r\nconst APITIMEOUT = 0;\r\nclass DialogsStorage {\r\n constructor() {\r\n this.dialogs = {};\r\n this.byFolders = {};\r\n this.allDialogsLoaded = {};\r\n this.dialogsOffsetDate = {};\r\n this.pinnedOrders = {\r\n 0: [],\r\n 1: []\r\n };\r\n this.dialogsNum = 0;\r\n }\r\n getFolder(id) {\r\n var _a, _b;\r\n if (id <= 1) {\r\n return (_a = this.byFolders[id]) !== null && _a !== void 0 ? _a : (this.byFolders[id] = []);\r\n }\r\n const dialogs = [];\r\n const filter = appMessagesManager.filtersStorage.filters[id];\r\n for (const peerID in this.dialogs) {\r\n const dialog = this.dialogs[peerID];\r\n if (appMessagesManager.filtersStorage.testDialogForFilter(dialog, filter)) {\r\n let index;\r\n const pinnedIndex = filter.pinned_peers.indexOf(dialog.peerID);\r\n if (pinnedIndex !== -1) {\r\n index = this.generateDialogIndex(this.generateDialogPinnedDateByIndex(filter.pinned_peers.length - 1 - pinnedIndex));\r\n }\r\n else if ((_b = dialog.pFlags) === null || _b === void 0 ? void 0 : _b.pinned) {\r\n index = this.generateIndexForDialog(dialog, true);\r\n }\r\n else {\r\n index = dialog.index;\r\n }\r\n dialogs.push({ dialog, index });\r\n }\r\n }\r\n dialogs.sort((a, b) => b.index - a.index);\r\n return dialogs.map(d => d.dialog);\r\n }\r\n getDialog(peerID, folderID) {\r\n const folders = [];\r\n if (folderID === undefined) {\r\n const dialogs = this.byFolders;\r\n for (const folderID in dialogs) {\r\n folders.push(dialogs[folderID]);\r\n }\r\n }\r\n else {\r\n folders.push(this.getFolder(folderID));\r\n }\r\n for (let folder of folders) {\r\n const index = folder.findIndex(dialog => dialog.peerID == peerID);\r\n if (index !== -1) {\r\n return [folder[index], index];\r\n }\r\n }\r\n return [];\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, justReturn = false) {\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 = appMessagesManager.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 && !justReturn) {\r\n topDate = this.generateDialogPinnedDate(dialog);\r\n //this.log('topDate', peerID, topDate);\r\n }\r\n const index = this.generateDialogIndex(topDate);\r\n if (justReturn)\r\n return index;\r\n dialog.index = index;\r\n }\r\n generateDialogPinnedDateByIndex(pinnedIndex) {\r\n return 0x7fff0000 + (pinnedIndex & 0xFFFF); // 0xFFFF - потому что в папках может быть бесконечное число пиннедов\r\n }\r\n generateDialogPinnedDate(dialog) {\r\n const order = this.pinnedOrders[dialog.folder_id];\r\n const foundIndex = order.indexOf(dialog.peerID);\r\n const pinnedIndex = foundIndex === -1 ? order.push(dialog.peerID) - 1 : foundIndex;\r\n return this.generateDialogPinnedDateByIndex(pinnedIndex);\r\n }\r\n pushDialog(dialog, offsetDate) {\r\n const dialogs = this.getFolder(dialog.folder_id);\r\n const pos = dialogs.findIndex(d => d.peerID == dialog.peerID);\r\n if (pos !== -1) {\r\n dialogs.splice(pos, 1);\r\n }\r\n //if(!this.dialogs[dialog.peerID]) {\r\n this.dialogs[dialog.peerID] = dialog;\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 const index = dialog.index;\r\n const 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 dropDialog(peerID) {\r\n const foundDialog = this.getDialog(peerID);\r\n if (foundDialog[0]) {\r\n this.byFolders[foundDialog[0].folder_id].splice(foundDialog[1], 1);\r\n delete this.dialogs[peerID];\r\n }\r\n return foundDialog;\r\n }\r\n}\r\nexports.DialogsStorage = DialogsStorage;\r\nclass FiltersStorage {\r\n constructor() {\r\n this.filters = {};\r\n this.orderIndex = 0;\r\n utils_1.$rootScope.$on('apiUpdate', (e) => {\r\n this.handleUpdate(e.detail);\r\n });\r\n }\r\n handleUpdate(update) {\r\n switch (update._) {\r\n case 'updateDialogFilter': {\r\n //console.log('updateDialogFilter', update);\r\n if (update.filter) {\r\n this.saveDialogFilter(update.filter);\r\n }\r\n else if (this.filters[update.id]) { // Папка удалена\r\n //this.getDialogFilters(true);\r\n utils_1.$rootScope.$broadcast('filter_delete', this.filters[update.id]);\r\n delete this.filters[update.id];\r\n }\r\n break;\r\n }\r\n }\r\n }\r\n testDialogForFilter(dialog, filter) {\r\n var _a;\r\n // exclude_peers\r\n for (const peerID of filter.exclude_peers) {\r\n if (peerID == dialog.peerID) {\r\n return false;\r\n }\r\n }\r\n // include_peers\r\n for (const peerID of filter.include_peers) {\r\n if (peerID == dialog.peerID) {\r\n return true;\r\n }\r\n }\r\n const pFlags = filter.pFlags;\r\n // exclude_archived\r\n if (pFlags.exclude_archived && dialog.folder_id == 1) {\r\n return false;\r\n }\r\n // exclude_read\r\n if (pFlags.exclude_read && !dialog.unread_count) {\r\n return false;\r\n }\r\n // exclude_muted\r\n if (pFlags.exclude_muted) {\r\n const isMuted = (((_a = dialog.notify_settings) === null || _a === void 0 ? void 0 : _a.mute_until) * 1000) > Date.now();\r\n if (isMuted) {\r\n return false;\r\n }\r\n }\r\n const peerID = dialog.peerID;\r\n if (peerID < 0) {\r\n // broadcasts\r\n if (pFlags.broadcasts && appPeersManager_1.default.isBroadcast(peerID)) {\r\n return true;\r\n }\r\n // groups\r\n if (pFlags.groups && appPeersManager_1.default.isAnyGroup(peerID)) {\r\n return true;\r\n }\r\n }\r\n else {\r\n // bots\r\n if (appPeersManager_1.default.isBot(peerID)) {\r\n return !!pFlags.bots;\r\n }\r\n // non_contacts\r\n if (pFlags.non_contacts && !appUsersManager_1.default.contactsList.has(peerID)) {\r\n return true;\r\n }\r\n // contacts\r\n if (pFlags.contacts && appUsersManager_1.default.contactsList.has(peerID)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n toggleDialogPin(peerID, filterID) {\r\n const filter = this.filters[filterID];\r\n const wasPinned = filter.pinned_peers.findAndSplice(p => p == peerID);\r\n if (!wasPinned) {\r\n filter.pinned_peers.unshift(peerID);\r\n }\r\n return this.updateDialogFilter(filter);\r\n }\r\n createDialogFilter(filter) {\r\n let maxID = Math.max(1, ...Object.keys(this.filters).map(i => +i));\r\n filter = utils_1.copy(filter);\r\n filter.id = maxID + 1;\r\n return this.updateDialogFilter(filter);\r\n }\r\n updateDialogFilter(filter, remove = false) {\r\n const flags = remove ? 0 : 1;\r\n if (!remove) {\r\n filter.flags = 0;\r\n const f = {\r\n contacts: 0,\r\n non_contacts: 1,\r\n groups: 2,\r\n broadcasts: 3,\r\n bots: 4,\r\n exclude_muted: 11,\r\n exclude_read: 12,\r\n exclude_archived: 13\r\n };\r\n for (const key in f) {\r\n // @ts-ignore\r\n if (filter.pFlags[key]) {\r\n filter.flags |= 1 << f[key];\r\n }\r\n }\r\n if (filter.emoticon) {\r\n filter.flags |= 1 << 25;\r\n }\r\n }\r\n return mtprotoworker_1.default.invokeApi('messages.updateDialogFilter', {\r\n flags,\r\n id: filter.id,\r\n filter: remove ? undefined : this.getOutputDialogFilter(filter)\r\n }).then((bool) => {\r\n //console.log('updateDialogFilter bool:', bool);\r\n if (bool) {\r\n /* if(!this.filters[filter.id]) {\r\n this.saveDialogFilter(filter);\r\n }\r\n \r\n $rootScope.$broadcast('filter_update', filter); */\r\n this.handleUpdate({\r\n _: 'updateDialogFilter',\r\n id: filter.id,\r\n filter: remove ? undefined : filter\r\n });\r\n }\r\n return bool;\r\n });\r\n }\r\n getOutputDialogFilter(filter) {\r\n const c = utils_1.copy(filter);\r\n ['pinned_peers', 'exclude_peers', 'include_peers'].forEach(key => {\r\n // @ts-ignore\r\n c[key] = c[key].map((peerID) => appPeersManager_1.default.getInputPeerByID(peerID));\r\n });\r\n c.include_peers.forEachReverse((peerID, idx) => {\r\n if (c.pinned_peers.includes(peerID)) {\r\n c.include_peers.splice(idx, 1);\r\n }\r\n });\r\n return c;\r\n }\r\n getDialogFilters(overwrite = false) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (Object.keys(this.filters).length && !overwrite) {\r\n return this.filters;\r\n }\r\n const filters = yield mtprotoworker_1.default.invokeApi('messages.getDialogFilters');\r\n for (const filter of filters) {\r\n this.saveDialogFilter(filter, false);\r\n }\r\n //console.log(this.filters);\r\n return this.filters;\r\n });\r\n }\r\n saveDialogFilter(filter, update = true) {\r\n ['pinned_peers', 'exclude_peers', 'include_peers'].forEach(key => {\r\n // @ts-ignore\r\n filter[key] = filter[key].map((peer) => appPeersManager_1.default.getPeerID(peer));\r\n });\r\n filter.include_peers.forEachReverse((peerID, idx) => {\r\n if (filter.pinned_peers.includes(peerID)) {\r\n filter.include_peers.splice(idx, 1);\r\n }\r\n });\r\n filter.include_peers = filter.pinned_peers.concat(filter.include_peers);\r\n if (this.filters[filter.id]) {\r\n Object.assign(this.filters[filter.id], filter);\r\n }\r\n else {\r\n this.filters[filter.id] = filter;\r\n }\r\n this.setOrderIndex(filter);\r\n if (update) {\r\n utils_1.$rootScope.$broadcast('filter_update', filter);\r\n }\r\n }\r\n setOrderIndex(filter) {\r\n if (filter.hasOwnProperty('orderIndex')) {\r\n if (filter.orderIndex > this.orderIndex) {\r\n this.orderIndex = filter.orderIndex;\r\n }\r\n }\r\n else {\r\n filter.orderIndex = this.orderIndex++;\r\n }\r\n }\r\n}\r\nexports.FiltersStorage = FiltersStorage;\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.pinnedMessages = {};\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.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.reloadConversationsPeers = [];\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 this.log = logger_1.logger('MESSAGES', logger_1.LogLevels.error);\r\n this.dialogsStorage = new DialogsStorage();\r\n this.filtersStorage = new FiltersStorage();\r\n this.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 this.handleNewDialogs = () => {\r\n clearTimeout(this.newDialogsHandlePromise);\r\n this.newDialogsHandlePromise = 0;\r\n let newMaxSeenID = 0;\r\n for (const peerID in this.newDialogsToHandle) {\r\n const 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.dialogsStorage.pushDialog(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 //this.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 utils_1.$rootScope.$on('apiUpdate', (e) => {\r\n this.handleUpdate(e.detail);\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 /* $rootScope.$on('draft_updated', (e) => {\r\n let eventData = e.detail;;\r\n var peerID = eventData.peerID;\r\n var draft = eventData.draft;\r\n \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 } else {\r\n var channelID = appPeersManager.isChannel(peerID) ? -peerID : 0\r\n var topDate = this.getMessage(dialog.top_message).date;\r\n \r\n if(channelID) {\r\n var channel = appChatsManager.getChat(channelID);\r\n if(!topDate || channel.date && channel.date > topDate) {\r\n topDate = channel.date;\r\n }\r\n }\r\n }\r\n \r\n if(!dialog.pFlags.pinned) {\r\n dialog.index = this.dialogsStorage.generateDialogIndex(topDate);\r\n }\r\n \r\n this.dialogsStorage.pushDialog(dialog);\r\n \r\n $rootScope.$broadcast('dialog_draft', {\r\n peerID,\r\n draft,\r\n index: dialog.index\r\n });\r\n }\r\n }); */\r\n }\r\n getInputEntities(entities) {\r\n var sendEntites = utils_1.copy(entities);\r\n sendEntites.forEach((entity) => {\r\n if (entity._ == 'messageEntityMentionName') {\r\n entity._ = 'inputMessageEntityMentionName';\r\n entity.user_id = appUsersManager_1.default.getUserInput(entity.user_id);\r\n }\r\n });\r\n return sendEntites;\r\n }\r\n editMessage(messageID, text, options = {}) {\r\n if (typeof (text) !== 'string' || !this.canEditMessage(messageID)) {\r\n return Promise.reject();\r\n }\r\n if (messageID < 0) {\r\n if (this.tempFinalizeCallbacks[messageID] === undefined) {\r\n this.tempFinalizeCallbacks[messageID] = {};\r\n }\r\n let promise = new Promise((resolve, reject) => {\r\n this.tempFinalizeCallbacks[messageID].edit = (mid) => {\r\n this.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 || undefined,\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 || undefined,\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 // this.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, 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 const fileType = 'mime_type' in file ? file.mime_type : file.type;\r\n const fileName = file instanceof File ? file.name : '';\r\n const isDocument = !(file instanceof File) && !(file instanceof Blob);\r\n let caption = options.caption || '';\r\n const date = utils_1.tsNow(true) + serverTimeManager_1.default.serverTimeOffset;\r\n this.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 const attributes = [];\r\n const isPhoto = ['image/jpeg', 'image/png', 'image/bmp'].indexOf(fileType) >= 0;\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 (isPhoto) {\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: 'full',\r\n location: null,\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 || undefined\r\n },\r\n waveform: options.waveform,\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 || undefined\r\n },\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 && !isDocument) {\r\n const thumbs = [];\r\n const doc = {\r\n _: 'document',\r\n id: '' + messageID,\r\n duration: options.duration,\r\n 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 if (isPhoto) {\r\n attributes.push({\r\n _: 'documentAttributeImageSize',\r\n w: options.width,\r\n h: options.height\r\n });\r\n thumbs.push({\r\n _: 'photoSize',\r\n w: options.width,\r\n h: options.height,\r\n type: 'full',\r\n location: null,\r\n size: file.size,\r\n url: options.objectURL\r\n });\r\n }\r\n appDocsManager_1.default.saveDoc(doc);\r\n }\r\n this.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 const preloader = new preloader_1.default(null, true);\r\n const 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 };\r\n const 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 const 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 let uploaded = false, uploadPromise = null;\r\n const invoke = (flags, inputMedia) => {\r\n this.setTyping('sendMessageCancelAction');\r\n return mtprotoworker_1.default.invokeApi('messages.sendMedia', {\r\n flags: flags,\r\n background: options.background || undefined,\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 const { id, access_hash, file_reference } = file;\r\n const 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 const deferred = cancellablePromise_1.deferredPromise();\r\n this.sendFilePromise.then(() => {\r\n if (!uploaded || message.error) {\r\n uploaded = false;\r\n uploadPromise = appDownloadManager_1.default.upload(file);\r\n preloader.attachPromise(uploadPromise);\r\n }\r\n uploadPromise && uploadPromise.then((inputFile) => {\r\n this.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.addNotifyListener((progress) => {\r\n this.log('upload progress', progress);\r\n const percents = Math.max(1, Math.floor(100 * progress.done / progress.total));\r\n this.setTyping({ _: actionName, progress: percents | 0 });\r\n });\r\n uploadPromise.catch(err => {\r\n if (err.name === 'AbortError' && !uploaded) {\r\n this.log('cancelling upload', media);\r\n deferred.resolve();\r\n this.cancelPendingMessage(randomIDS);\r\n this.setTyping('sendMessageCancelAction');\r\n }\r\n });\r\n uploadPromise.finally(deferred.resolve);\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, 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 this.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 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 },\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 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, 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 this.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 const file = files[i];\r\n const message = messages[i];\r\n const media = message.media;\r\n const preloader = media.preloader;\r\n const actionName = file.type.indexOf('video/') === 0 ? 'sendMessageUploadVideoAction' : 'sendMessageUploadPhotoAction';\r\n const deferred = cancellablePromise_1.deferredPromise();\r\n let canceled = false;\r\n let apiFileName;\r\n if (file.type.indexOf('video/') === 0) {\r\n apiFileName = 'video.mp4';\r\n }\r\n else {\r\n apiFileName = 'photo.' + file.type.split('/')[1];\r\n }\r\n yield this.sendFilePromise;\r\n this.sendFilePromise = deferred;\r\n if (!uploaded || message.error) {\r\n uploaded = false;\r\n uploadPromise = appDownloadManager_1.default.upload(file);\r\n preloader.attachPromise(uploadPromise);\r\n }\r\n uploadPromise.addNotifyListener((progress) => {\r\n this.log('upload progress', progress);\r\n const percents = Math.max(1, Math.floor(100 * progress.done / progress.total));\r\n this.setTyping({ _: actionName, progress: percents | 0 });\r\n });\r\n uploadPromise.catch(err => {\r\n if (err.name === 'AbortError' && !uploaded) {\r\n this.log('cancelling upload item', media);\r\n canceled = true;\r\n }\r\n });\r\n yield uploadPromise.then((inputFile) => {\r\n this.log('appMessagesManager: sendAlbum file uploaded:', inputFile);\r\n if (canceled) {\r\n return;\r\n }\r\n inputFile.name = apiFileName;\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 if (canceled) {\r\n return;\r\n }\r\n let inputMedia;\r\n if (messageMedia._ == 'messageMediaPhoto') {\r\n const photo = appPhotosManager_1.default.savePhoto(messageMedia.photo);\r\n inputMedia = appPhotosManager_1.default.getInput(photo);\r\n }\r\n else if (messageMedia._ == 'messageMediaDocument') {\r\n const doc = appDocsManager_1.default.saveDoc(messageMedia.document);\r\n inputMedia = appDocsManager_1.default.getMediaInput(doc);\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 this.log('appMessagesManager: sendAlbum uploadPromise.finally!');\r\n deferred.resolve();\r\n }\r\n uploaded = true;\r\n invoke(inputs);\r\n });\r\n }\r\n sendOther(peerID, inputMedia, options = {}) {\r\n var _a;\r\n peerID = appPeersManager_1.default.getPeerMigratedTo(peerID) || peerID;\r\n const messageID = this.tempID--;\r\n const randomID = [bin_utils_1.nextRandomInt(0xFFFFFFFF), bin_utils_1.nextRandomInt(0xFFFFFFFF)];\r\n const randomIDS = bin_utils_1.bigint(randomID[0]).shiftLeft(32).add(bin_utils_1.bigint(randomID[1])).toString();\r\n const historyStorage = (_a = this.historiesStorage[peerID]) !== null && _a !== void 0 ? _a : (this.historiesStorage[peerID] = { count: null, history: [], pending: [] });\r\n const replyToMsgID = options.replyToMsgID;\r\n const isChannel = appPeersManager_1.default.isChannel(peerID);\r\n const isMegagroup = isChannel && appPeersManager_1.default.isMegagroup(peerID);\r\n const asChannel = isChannel && !isMegagroup ? true : false;\r\n let fromID = appUsersManager_1.default.getSelf().id;\r\n let media;\r\n switch (inputMedia._) {\r\n case 'inputMediaPoll': {\r\n inputMedia.poll.id = messageID;\r\n appPollsManager_1.default.savePoll(inputMedia.poll, {\r\n _: 'pollResults',\r\n flags: 4,\r\n total_voters: 0,\r\n pFlags: {},\r\n });\r\n const { poll, results } = appPollsManager_1.default.getPoll('' + messageID);\r\n media = {\r\n _: 'messageMediaPoll',\r\n poll,\r\n results\r\n };\r\n break;\r\n }\r\n /* case 'inputMediaPhoto':\r\n media = {\r\n _: 'messageMediaPhoto',\r\n photo: appPhotosManager.getPhoto(inputMedia.id.id),\r\n caption: inputMedia.caption || ''\r\n };\r\n break;\r\n \r\n case 'inputMediaDocument':\r\n var doc = appDocsManager.getDoc(inputMedia.id.id);\r\n if(doc.sticker && doc.stickerSetInput) {\r\n appStickersManager.pushPopularSticker(doc.id);\r\n }\r\n media = {\r\n _: 'messageMediaDocument',\r\n 'document': doc,\r\n caption: inputMedia.caption || ''\r\n };\r\n break;\r\n \r\n case 'inputMediaContact':\r\n media = {\r\n _: 'messageMediaContact',\r\n phone_number: inputMedia.phone_number,\r\n first_name: inputMedia.first_name,\r\n last_name: inputMedia.last_name,\r\n user_id: 0\r\n };\r\n break;\r\n \r\n case 'inputMediaGeoPoint':\r\n media = {\r\n _: 'messageMediaGeo',\r\n geo: {\r\n _: 'geoPoint',\r\n 'lat': inputMedia.geo_point['lat'],\r\n 'long': inputMedia.geo_point['long']\r\n }\r\n };\r\n break;\r\n \r\n case 'inputMediaVenue':\r\n media = {\r\n _: 'messageMediaVenue',\r\n geo: {\r\n _: 'geoPoint',\r\n 'lat': inputMedia.geo_point['lat'],\r\n 'long': inputMedia.geo_point['long']\r\n },\r\n title: inputMedia.title,\r\n address: inputMedia.address,\r\n provider: inputMedia.provider,\r\n venue_id: inputMedia.venue_id\r\n };\r\n break;\r\n \r\n case 'messageMediaPending':\r\n media = inputMedia;\r\n break; */\r\n }\r\n let flags = 0;\r\n let pFlags = {};\r\n if (peerID != fromID) {\r\n flags |= 2;\r\n pFlags.out = true;\r\n if (!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 const 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_1.default.serverTimeOffset,\r\n message: '',\r\n media: media,\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 views: asChannel && 1,\r\n pending: true,\r\n };\r\n let toggleError = (on) => {\r\n /* const historyMessage = this.messagesForHistory[messageID];\r\n if (on) {\r\n message.error = true\r\n if (historyMessage) {\r\n historyMessage.error = true\r\n }\r\n } else {\r\n delete message.error\r\n if (historyMessage) {\r\n delete historyMessage.error\r\n }\r\n } */\r\n utils_1.$rootScope.$broadcast('messages_pending');\r\n };\r\n message.send = () => {\r\n let flags = 0;\r\n if (replyToMsgID) {\r\n flags |= 1;\r\n }\r\n if (asChannel) {\r\n flags |= 16;\r\n }\r\n if (options.clearDraft) {\r\n flags |= 128;\r\n }\r\n const sentRequestOptions = {};\r\n if (this.pendingAfterMsgs[peerID]) {\r\n sentRequestOptions.afterMessageID = this.pendingAfterMsgs[peerID].messageID;\r\n }\r\n let 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 apiPromise = mtprotoworker_1.default.invokeApi('messages.sendMedia', {\r\n flags: flags,\r\n peer: appPeersManager_1.default.getInputPeerByID(peerID),\r\n media: inputMedia,\r\n random_id: randomID,\r\n reply_to_msg_id: appMessagesIDsManager_1.default.getMessageLocalID(replyToMsgID),\r\n message: ''\r\n }, sentRequestOptions);\r\n }\r\n apiPromise.then((updates) => {\r\n 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 apiUpdatesManager_1.default.processUpdateMessage(updates);\r\n }, (error) => {\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, messageID, my: true });\r\n setTimeout(message.send, 0);\r\n /* if(options.clearDraft) {\r\n DraftsManager.clearDraft(peerID)\r\n } */\r\n this.pendingByRandomID[randomIDS] = [peerID, messageID];\r\n }\r\n cancelPendingMessage(randomID) {\r\n var pendingData = this.pendingByRandomID[randomID];\r\n this.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 getConversationsAll(query = '') {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const limit = 100, outDialogs = [];\r\n for (let folderID = 0; folderID < 2; ++folderID) {\r\n let offsetIndex = 0;\r\n for (;;) {\r\n const { dialogs } = yield appMessagesManager.getConversations(query, offsetIndex, limit, folderID);\r\n if (dialogs.length) {\r\n outDialogs.push(...dialogs);\r\n offsetIndex = dialogs[dialogs.length - 1].index || 0;\r\n }\r\n else {\r\n break;\r\n }\r\n }\r\n }\r\n return outDialogs;\r\n });\r\n }\r\n getConversations(query = '', offsetIndex, limit = 20, folderID = 0) {\r\n const realFolderID = folderID > 1 ? 0 : folderID;\r\n let curDialogStorage = this.dialogsStorage.getFolder(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 for (const peerID in this.dialogsStorage.dialogs) {\r\n const dialog = this.dialogsStorage.dialogs[peerID];\r\n if (results[dialog.peerID]) {\r\n this.cachedResults.dialogs.push(dialog);\r\n }\r\n }\r\n this.cachedResults.count = this.cachedResults.dialogs.length;\r\n }\r\n curDialogStorage = this.cachedResults.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.dialogsStorage.allDialogsLoaded[realFolderID] || curDialogStorage.length >= offset + limit) {\r\n return Promise.resolve({\r\n dialogs: curDialogStorage.slice(offset, offset + limit),\r\n count: this.dialogsStorage.allDialogsLoaded[realFolderID] ? curDialogStorage.length : null\r\n });\r\n }\r\n return this.getTopMessages(limit, realFolderID).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 //this.log.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.getFolder(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.dialogsStorage.dialogsOffsetDate[folderID]) {\r\n offsetDate = this.dialogsStorage.dialogsOffsetDate[folderID] + serverTimeManager_2.default.serverTimeOffset;\r\n offsetIndex = this.dialogsStorage.dialogsOffsetDate[folderID] * 0x10000;\r\n //flags |= 1; // means pinned already loaded\r\n }\r\n /* if(this.dialogsStorage.dialogsOffsetDate[0]) {\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 // ! ВНИМАНИЕ: ОЧЕНЬ СЛОЖНАЯ ЛОГИКА:\r\n // ! если делать запрос сначала по папке 0, потом по папке 1, по индексу 0 в массиве будет один и тот же диалог, с dialog.pFlags.pinned, ЛОЛ???\r\n // ! т.е., с запросом folder_id: 1, и exclude_pinned: 0, в результате будут ещё и закреплённые с папки 0\r\n return mtprotoworker_1.default.invokeApi('messages.getDialogs', {\r\n 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,\r\n hash: 0\r\n }, {\r\n //timeout: APITIMEOUT,\r\n noErrorBox: true\r\n }).then((dialogsResult) => {\r\n if (dialogsResult._ == 'messages.dialogsNotModified')\r\n return null;\r\n //this.log.error('messages.getDialogs result:', dialogsResult.dialogs, {...dialogsResult.dialogs[0]});\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 let maxSeenIdIncremented = offsetDate ? true : false;\r\n let hasPrepend = false;\r\n const noIDsDialogs = {};\r\n dialogsResult.dialogs.forEachReverse(dialog => {\r\n //const d = Object.assign({}, dialog);\r\n // ! нужно передавать folderID, так как по папке != 0 нет свойства folder_id\r\n this.saveConversation(dialog, folderID);\r\n /* if(dialog.peerID == -1213511294) {\r\n this.log.error('lun bot', folderID, d);\r\n } */\r\n if (offsetIndex && dialog.index > offsetIndex) {\r\n this.newDialogsToHandle[dialog.peerID] = dialog;\r\n hasPrepend = true;\r\n }\r\n // ! это может случиться, если запрос идёт не по папке 0, а по 1. почему-то read'ов нет\r\n // ! в итоге, чтобы получить 1 диалог, делается первый запрос по папке 0, потом запрос для архивных по папке 1, и потом ещё перезагрузка архивного диалога\r\n if (!dialog.read_inbox_max_id && !dialog.read_outbox_max_id) {\r\n noIDsDialogs[dialog.peerID] = dialog;\r\n /* if(dialog.peerID == -1213511294) {\r\n this.log.error('lun bot', folderID);\r\n } */\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 const count = dialogsResult.count;\r\n if (!dialogsResult.dialogs.length ||\r\n !count ||\r\n dialogs.length >= count) {\r\n this.dialogsStorage.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 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 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 return this.dialogsStorage.getDialog(peerID);\r\n }\r\n reloadConversation(peerID) {\r\n [].concat(peerID).forEach(peerID => {\r\n if (!this.reloadConversationsPeers.includes(peerID)) {\r\n this.reloadConversationsPeers.push(peerID);\r\n this.log('will reloadConversation', peerID);\r\n }\r\n });\r\n if (this.reloadConversationsPromise)\r\n return this.reloadConversationsPromise;\r\n return this.reloadConversationsPromise = new Promise((resolve, reject) => {\r\n setTimeout(() => {\r\n const peers = this.reloadConversationsPeers.map(peerID => appPeersManager_1.default.getInputDialogPeerByID(peerID));\r\n this.reloadConversationsPeers.length = 0;\r\n mtprotoworker_1.default.invokeApi('messages.getPeerDialogs', { peers }).then((result) => {\r\n this.applyConversations(result);\r\n resolve();\r\n }, reject).finally(() => {\r\n this.reloadConversationsPromise = null;\r\n });\r\n }, 0);\r\n });\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 });\r\n }\r\n else {\r\n this.dialogsStorage.dropDialog(peerID);\r\n utils_1.$rootScope.$broadcast('dialog_drop', { peerID });\r\n }\r\n });\r\n });\r\n }\r\n savePinnedMessage(peerID, mid) {\r\n if (!mid) {\r\n delete this.pinnedMessages[peerID];\r\n return;\r\n }\r\n this.pinnedMessages[peerID] = mid;\r\n this.wrapSingleMessage(mid);\r\n }\r\n getPinnedMessage(peerID) {\r\n return this.getMessage(this.pinnedMessages[peerID] || 0);\r\n }\r\n updatePinnedMessage(peerID, msgID) {\r\n mtprotoworker_1.default.invokeApi('messages.updatePinnedMessage', {\r\n flags: 0,\r\n peer: appPeersManager_1.default.getInputPeerByID(peerID),\r\n id: 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 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 // this.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 += 'Album' + (message.message ? ', ' : '') + '';\r\n }\r\n else\r\n switch (message.media._) {\r\n case 'messageMediaPhoto':\r\n messageText += 'Photo' + (message.message ? ', ' : '') + '';\r\n break;\r\n case 'messageMediaGeo':\r\n messageText += 'Geolocation';\r\n break;\r\n case 'messageMediaPoll':\r\n messageText += '' + message.media.poll.rReply + '';\r\n break;\r\n case 'messageMediaContact':\r\n messageText += 'Contact';\r\n break;\r\n case 'messageMediaDocument':\r\n let document = message.media.document;\r\n if (document.type == 'video') {\r\n messageText = 'Video' + (message.message ? ', ' : '') + '';\r\n }\r\n else if (document.type == 'voice') {\r\n messageText = 'Voice message';\r\n }\r\n else if (document.type == 'gif') {\r\n messageText = 'GIF' + (message.message ? ', ' : '') + '';\r\n }\r\n else if (document.type == 'round') {\r\n messageText = 'Video message' + (message.message ? ', ' : '') + '';\r\n }\r\n else if (document.type == 'sticker') {\r\n messageText = (document.stickerEmoji || '') + 'Sticker';\r\n }\r\n else {\r\n messageText = '' + document.file_name + '';\r\n }\r\n break;\r\n default:\r\n ///////this.log.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[_] || action._) + suffix;\r\n }\r\n //this.log('message action:', action);\r\n messageText = str ? '' + str + '' : '';\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 this.log('editPeerFolders updates:', updates);\r\n apiUpdatesManager_1.default.processUpdateMessage(updates); // WARNING! возможно тут нужно добавлять channelID, и вызывать апдейт для каждого канала отдельно\r\n });\r\n }\r\n toggleDialogPin(peerID, filterID) {\r\n var _a;\r\n if (filterID > 1) {\r\n this.filtersStorage.toggleDialogPin(peerID, filterID);\r\n return;\r\n }\r\n const dialog = this.getDialogByPeerID(peerID)[0];\r\n if (!dialog)\r\n return Promise.reject();\r\n const peer = appPeersManager_1.default.getInputDialogPeerByID(peerID);\r\n const 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 if (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 }\r\n markDialogUnread(peerID, read) {\r\n var _a;\r\n const dialog = this.getDialogByPeerID(peerID)[0];\r\n if (!dialog)\r\n return Promise.reject();\r\n const peer = appPeersManager_1.default.getInputDialogPeerByID(peerID);\r\n const flags = read || ((_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 if (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 }\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 const 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 const dropped = this.dialogsStorage.dropDialog(migrateFrom);\r\n if (dropped.length) {\r\n utils_1.$rootScope.$broadcast('dialog_drop', { peerID: migrateFrom, dialog: dropped[0] });\r\n }\r\n utils_1.$rootScope.$broadcast('dialog_migrate', { migrateFrom, 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 // * В эту функцию попадут только те диалоги, в которых есть read_inbox_max_id и read_outbox_max_id, в отличие от тех, что будут в getTopMessages\r\n appUsersManager_1.default.saveApiUsers(dialogsResult.users);\r\n appChatsManager_1.default.saveApiChats(dialogsResult.chats);\r\n this.saveMessages(dialogsResult.messages);\r\n //this.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 topPendingMessage = this.pendingTopMsgs[peerID];\r\n if (topPendingMessage) {\r\n if (!topMessage || this.getMessage(topPendingMessage).date > this.getMessage(topMessage).date) {\r\n dialog.top_message = topMessage = topPendingMessage;\r\n }\r\n }\r\n /* const d = Object.assign({}, dialog);\r\n if(peerID == 239602833) {\r\n this.log.error('applyConversation lun', dialog, d);\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?.pFlags?.pinned && !dialog?.pFlags?.pinned) {\r\n this.log.error('here need to just replace, not FULL replace dialog! WARNING', wasDialogBefore, dialog);\r\n if(!dialog.pFlags) dialog.pFlags = {};\r\n dialog.pFlags.pinned = true;\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 dropped = this.dialogsStorage.dropDialog(peerID);\r\n if (dropped.length) {\r\n utils_1.$rootScope.$broadcast('dialog_drop', { peerID: peerID, dialog: dropped[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, folderID = 0) {\r\n const peerID = appPeersManager_1.default.getPeerID(dialog.peer);\r\n if (!peerID) {\r\n return false;\r\n }\r\n if (dialog._ != 'dialog' /* || peerID == 239602833 */) {\r\n console.error('saveConversation not regular dialog', dialog, Object.assign({}, dialog));\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 if (dialog._ == 'dialog') {\r\n // ! СЛОЖНО ! СМОТРИ В getTopMessages\r\n const wasDialogBefore = this.getDialogByPeerID(peerID)[0];\r\n dialog.folder_id = wasDialogBefore ? wasDialogBefore.folder_id : folderID;\r\n } /* else if(dialog._ == 'dialogFolder') {\r\n dialog.folder_id = dialog.folder.id;\r\n } */\r\n }\r\n dialog.peerID = peerID;\r\n this.dialogsStorage.generateIndexForDialog(dialog);\r\n this.dialogsStorage.pushDialog(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 });\r\n }\r\n }\r\n if (channelID && dialog.pts) {\r\n apiUpdatesManager_1.default.addChannelState(channelID, dialog.pts);\r\n }\r\n //if(this.filtersStorage.inited) {\r\n //this.filtersStorage.processDialog(dialog);\r\n //}\r\n }\r\n mergeReplyKeyboard(historyStorage, message) {\r\n // this.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 // this.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 // this.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 // this.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 // this.log.warn(dT(), 'new search filter', lastSearchFilter, newSearchFilter)\r\n this.lastSearchFilter = newSearchFilter;\r\n this.lastSearchResults = [];\r\n }\r\n //this.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 = {}, neededDocTypes = [];\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 neededDocTypes.push('video');\r\n break;\r\n case 'inputMessagesFilterVideo':\r\n neededContents['messageMediaDocument'] = true;\r\n neededDocTypes.push('video');\r\n break;\r\n case 'inputMessagesFilterDocument':\r\n neededContents['messageMediaDocument'] = true;\r\n break;\r\n case 'inputMessagesFilterVoice':\r\n neededContents['messageMediaDocument'] = true;\r\n neededDocTypes.push('voice');\r\n break;\r\n case 'inputMessagesFilterRoundVoice':\r\n neededContents['messageMediaDocument'] = true;\r\n neededDocTypes.push('round', 'voice');\r\n break;\r\n case 'inputMessagesFilterRoundVideo':\r\n neededContents['messageMediaDocument'] = true;\r\n neededDocTypes.push('round');\r\n break;\r\n case 'inputMessagesFilterMusic':\r\n neededContents['messageMediaDocument'] = true;\r\n neededDocTypes.push('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 (neededDocTypes.length &&\r\n message.media._ == 'messageMediaDocument' &&\r\n !neededDocTypes.includes(message.media.document.type)) {\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 // this.log.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 // this.log.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 let 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 hash: 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 flags: 0,\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 ///////////this.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 // this.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 scheduleHandleNewDialogs() {\r\n if (!this.newDialogsHandlePromise) {\r\n this.newDialogsHandlePromise = window.setTimeout(this.handleNewDialogs, 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 // this.log('done read history', peerID)\r\n if (historyStorage.history.length) {\r\n ////////this.log.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 this.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 var _a, _b;\r\n this.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 //this.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 // this.log.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 });\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, 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, 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.dialogsStorage.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 this.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': { // only 0 and 1 folders\r\n this.log('updateFolderPeers', update);\r\n const peers = update.folder_peers;\r\n this.scheduleHandleNewDialogs();\r\n peers.forEach((folderPeer) => {\r\n var _a;\r\n const { folder_id, peer } = folderPeer;\r\n const peerID = appPeersManager_1.default.getPeerID(peer);\r\n const dropped = this.dialogsStorage.dropDialog(peerID);\r\n if (!dropped.length) {\r\n this.newDialogsToHandle[peerID] = { reload: true };\r\n }\r\n else {\r\n const dialog = dropped[0];\r\n this.newDialogsToHandle[peerID] = dialog;\r\n if ((_a = dialog.pFlags) === null || _a === void 0 ? void 0 : _a.pinned) {\r\n delete dialog.pFlags.pinned;\r\n this.dialogsStorage.pinnedOrders[folder_id].findAndSplice(p => p == dialog.peerID);\r\n }\r\n dialog.folder_id = folder_id;\r\n this.dialogsStorage.generateIndexForDialog(dialog);\r\n this.dialogsStorage.pushDialog(dialog); // need for simultaneously updatePinnedDialogs\r\n }\r\n });\r\n break;\r\n }\r\n case 'updateDialogPinned': {\r\n const folderID = (_a = update.folder_id) !== null && _a !== void 0 ? _a : 0;\r\n this.log('updateDialogPinned', update);\r\n const peerID = appPeersManager_1.default.getPeerID(update.peer.peer);\r\n const foundDialog = this.getDialogByPeerID(peerID);\r\n // этот код внизу никогда не сработает, в папках за пиннед отвечает updateDialogFilter\r\n /* if(update.folder_id > 1) {\r\n const filter = this.filtersStorage.filters[update.folder_id];\r\n if(update.pFlags.pinned) {\r\n filter.pinned_peers.unshift(peerID);\r\n } else {\r\n filter.pinned_peers.findAndSplice(p => p == peerID);\r\n }\r\n } */\r\n this.scheduleHandleNewDialogs();\r\n if (!foundDialog.length) {\r\n this.newDialogsToHandle[peerID] = { reload: true };\r\n }\r\n else {\r\n const dialog = foundDialog[0];\r\n this.newDialogsToHandle[peerID] = dialog;\r\n if (!update.pFlags.pinned) {\r\n delete dialog.pFlags.pinned;\r\n this.dialogsStorage.pinnedOrders[folderID].findAndSplice(p => p == dialog.peerID);\r\n }\r\n else { // means set\r\n dialog.pFlags.pinned = true;\r\n }\r\n this.dialogsStorage.generateIndexForDialog(dialog);\r\n }\r\n break;\r\n }\r\n case 'updatePinnedDialogs': {\r\n const folderID = (_b = update.folder_id) !== null && _b !== void 0 ? _b : 0;\r\n this.log('updatePinnedDialogs', update);\r\n const newPinned = {};\r\n if (!update.order) {\r\n mtprotoworker_1.default.invokeApi('messages.getPinnedDialogs', {\r\n folder_id: folderID\r\n }).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.getFolder(folderID).forEach((dialog) => {\r\n const 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 //this.log('before order:', this.dialogsStorage[0].map(d => d.peerID));\r\n this.dialogsStorage.pinnedOrders[folderID].length = 0;\r\n let willHandle = false;\r\n update.order.reverse(); // index must be higher\r\n update.order.forEach((peer) => {\r\n const peerID = appPeersManager_1.default.getPeerID(peer.peer);\r\n newPinned[peerID] = true;\r\n const 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 const dialog = foundDialog[0];\r\n dialog.pFlags.pinned = true;\r\n this.dialogsStorage.generateIndexForDialog(dialog);\r\n this.newDialogsToHandle[peerID] = dialog;\r\n willHandle = true;\r\n });\r\n this.dialogsStorage.getFolder(folderID).forEach(dialog => {\r\n const 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 //this.log.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 // this.log.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 //////////this.log.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 const peerID = +_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, 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,\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 const channelID = update.channel_id;\r\n const peerID = -channelID;\r\n const channel = appChatsManager_1.default.getChat(channelID);\r\n const needDialog = channel._ == 'channel' && (!channel.pFlags.left && !channel.pFlags.kicked);\r\n const foundDialog = this.getDialogByPeerID(peerID);\r\n const hasDialog = foundDialog.length > 0;\r\n const canViewHistory = channel._ == 'channel' && (channel.username || !channel.pFlags.left && !channel.pFlags.kicked) && true || false;\r\n const 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.dropDialog(peerID);\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 const channelID = update.channel_id;\r\n const peerID = -channelID;\r\n this.dialogsStorage.dropDialog(peerID);\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', { mid, views });\r\n }\r\n break;\r\n }\r\n case 'updateServiceNotification': {\r\n this.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 case 'updateChatPinnedMessage':\r\n case 'updateUserPinnedMessage': {\r\n let { id } = update;\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 this.savePinnedMessage(peerID, id);\r\n break;\r\n }\r\n }\r\n }\r\n finalizePendingMessage(randomID, finalMessage) {\r\n var pendingData = this.pendingByRandomID[randomID];\r\n // this.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 // this.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 this.log.warn(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 this.maxSeenID = maxID;\r\n storage_1.default.set({ max_seen_msg: maxID });\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 let history = historyStorage.history.slice(backLimit ? Math.max(offset - backLimit, 0) : 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 // this.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 });\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 = 0, offset = 0, offsetDate = 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: offsetDate,\r\n add_offset: offset,\r\n limit: limit,\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 this.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 const mids = this.needSingleMessages.slice();\r\n this.needSingleMessages.length = 0;\r\n const splitted = appMessagesIDsManager_1.default.splitMessageIDsByChannels(mids);\r\n let promises = [];\r\n Object.keys(splitted.msgIDs).forEach((channelID) => {\r\n channelID = +channelID;\r\n const msgIDs = splitted.msgIDs[channelID].map((msgID) => {\r\n return {\r\n _: 'inputMessageID',\r\n id: msgID\r\n };\r\n });\r\n let 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 if (getMessagesResult._ != 'messages.messagesNotModified') {\r\n appUsersManager_1.default.saveApiUsers(getMessagesResult.users);\r\n appChatsManager_1.default.saveApiChats(getMessagesResult.chats);\r\n this.saveMessages(getMessagesResult.messages);\r\n }\r\n utils_1.$rootScope.$broadcast('messages_downloaded', splitted.mids[+channelID]);\r\n }));\r\n });\r\n this.fetchSingleMessagesPromise = Promise.all(promises).finally(() => {\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, overwrite = false) {\r\n if (this.messagesStorage[msgID] && !overwrite) {\r\n utils_1.$rootScope.$broadcast('messages_downloaded', [msgID]);\r\n }\r\n else 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 }\r\n }\r\n setTyping(action) {\r\n if (!utils_1.$rootScope.myID)\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(utils_1.$rootScope.myID);\r\n return mtprotoworker_1.default.invokeApi('messages.setTyping', {\r\n peer: input,\r\n action: action\r\n });\r\n }\r\n}\r\nexports.AppMessagesManager = AppMessagesManager;\r\nconst appMessagesManager = new AppMessagesManager();\r\nexports.default = appMessagesManager;\r\n" - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appPeersManager.ts", - "name": "./src/lib/appManagers/appPeersManager.ts", - "index": 42, - "index2": 33, - "size": 7100, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 5, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appUsersManager.ts", - "module": "./src/lib/appManagers/appUsersManager.ts", - "moduleName": "./src/lib/appManagers/appUsersManager.ts", - "type": "cjs require", - "userRequest": "./appPeersManager", - "loc": "24:42-70" - }, - { - "moduleId": 7, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "module": "./src/lib/appManagers/appMessagesManager.ts", - "moduleName": "./src/lib/appManagers/appMessagesManager.ts", - "type": "cjs require", - "userRequest": "./appPeersManager", - "loc": "26:42-70" - }, - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 24, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", - "type": "cjs require", - "userRequest": "./appPeersManager", - "loc": "41:42-70" - }, - { - "moduleId": 27, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 32, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\apiUpdatesManager.ts", - "module": "./src/lib/appManagers/apiUpdatesManager.ts", - "moduleName": "./src/lib/appManagers/apiUpdatesManager.ts", - "type": "cjs require", - "userRequest": "./appPeersManager", - "loc": "11:42-70" - }, - { - "moduleId": 39, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 40, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appStateManager.ts", - "module": "./src/lib/appManagers/appStateManager.ts", - "moduleName": "./src/lib/appManagers/appStateManager.ts", - "type": "cjs require", - "userRequest": "./appPeersManager", - "loc": "10:42-70" - }, - { - "moduleId": 43, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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" - }, - { - "moduleId": 51, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\appSelectPeers.ts", - "module": "./src/components/appSelectPeers.ts", - "moduleName": "./src/components/appSelectPeers.ts", - "type": "cjs require", - "userRequest": "../lib/appManagers/appPeersManager", - "loc": "22:42-87" - }, - { - "moduleId": 56, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 62, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\AppInlineBotsManager.ts", - "module": "./src/lib/appManagers/AppInlineBotsManager.ts", - "moduleName": "./src/lib/appManagers/AppInlineBotsManager.ts", - "type": "cjs require", - "userRequest": "../appManagers/appPeersManager", - "loc": "9:42-83" - }, - { - "moduleId": 95, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\chatFolders.ts", - "module": "./src/components/sidebarLeft/chatFolders.ts", - "moduleName": "./src/components/sidebarLeft/chatFolders.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appPeersManager", - "loc": "10:42-90" - }, - { - "moduleId": 97, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\includedChats.ts", - "module": "./src/components/sidebarLeft/includedChats.ts", - "moduleName": "./src/components/sidebarLeft/includedChats.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appPeersManager", - "loc": "28:42-90" - }, - { - "moduleId": 105, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\audio.ts", - "module": "./src/components/chat/audio.ts", - "moduleName": "./src/components/chat/audio.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appPeersManager", - "loc": "9:42-90" - }, - { - "moduleId": 106, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\contextMenu.ts", - "module": "./src/components/chat/contextMenu.ts", - "moduleName": "./src/components/chat/contextMenu.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appPeersManager", - "loc": "10:42-90" - } - ], - "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.AppPeersManager = void 0;\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\nclass 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 this.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 = this.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 /* Peer | number | string */) {\r\n if (typeof (peerString) === 'number')\r\n return peerString;\r\n else if (utils_1.isObject(peerString))\r\n return peerString.user_id ? peerString.user_id : -(peerString.channel_id || peerString.chat_id);\r\n else if (!peerString)\r\n return 0;\r\n const isUser = peerString.charAt(0) == 'u';\r\n const 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 this.isChannel(id) && !this.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 const 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\r\n };\r\n }\r\n getInputDialogPeerByID(peerID) {\r\n return {\r\n _: 'inputDialogPeer',\r\n peer: this.getInputPeerByID(peerID)\r\n };\r\n }\r\n getPeerColorByID(peerID, pic = true) {\r\n const idx = DialogColorsMap[(peerID < 0 ? -peerID : peerID) % 7];\r\n const 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 const chat = appChatsManager_1.default.getChat(-peerID);\r\n text = '%pg ' + (chat.title || '');\r\n }\r\n return text;\r\n }\r\n}\r\nexports.AppPeersManager = AppPeersManager;\r\nconst appPeersManager = new AppPeersManager();\r\nexports.default = appPeersManager;\r\n" - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appChatsManager.ts", - "name": "./src/lib/appManagers/appChatsManager.ts", - "index": 40, - "index2": 48, - "size": 16290, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 5, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appUsersManager.ts", - "module": "./src/lib/appManagers/appUsersManager.ts", - "moduleName": "./src/lib/appManagers/appUsersManager.ts", - "type": "cjs require", - "userRequest": "./appChatsManager", - "loc": "18:42-70" - }, - { - "moduleId": 7, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "module": "./src/lib/appManagers/appMessagesManager.ts", - "moduleName": "./src/lib/appManagers/appMessagesManager.ts", - "type": "cjs require", - "userRequest": "./appChatsManager", - "loc": "18:42-70" - }, - { - "moduleId": 8, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appPeersManager.ts", - "module": "./src/lib/appManagers/appPeersManager.ts", - "moduleName": "./src/lib/appManagers/appPeersManager.ts", - "type": "cjs require", - "userRequest": "./appChatsManager", - "loc": "8:42-70" - }, - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "./appChatsManager", - "loc": "21:42-70" - }, - { - "moduleId": 14, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "module": "./src/lib/appManagers/appSidebarLeft.ts", - "moduleName": "./src/lib/appManagers/appSidebarLeft.ts", - "type": "cjs require", - "userRequest": "./appChatsManager", - "loc": "47:42-70" - }, - { - "moduleId": 16, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts", - "module": "./src/lib/appManagers/appDialogsManager.ts", - "moduleName": "./src/lib/appManagers/appDialogsManager.ts", - "type": "cjs require", - "userRequest": "./appChatsManager", - "loc": "26:42-70" - }, - { - "moduleId": 27, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 32, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\apiUpdatesManager.ts", - "module": "./src/lib/appManagers/apiUpdatesManager.ts", - "moduleName": "./src/lib/appManagers/apiUpdatesManager.ts", - "type": "cjs require", - "userRequest": "./appChatsManager", - "loc": "13:42-70" - }, - { - "moduleId": 40, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appStateManager.ts", - "module": "./src/lib/appManagers/appStateManager.ts", - "moduleName": "./src/lib/appManagers/appStateManager.ts", - "type": "cjs require", - "userRequest": "./appChatsManager", - "loc": "11:42-70" - }, - { - "moduleId": 43, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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" - }, - { - "moduleId": 51, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 88, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\newChannel.ts", - "module": "./src/components/sidebarLeft/newChannel.ts", - "moduleName": "./src/components/sidebarLeft/newChannel.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appChatsManager", - "loc": "26:42-90" - }, - { - "moduleId": 90, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\addMembers.ts", - "module": "./src/components/sidebarLeft/addMembers.ts", - "moduleName": "./src/components/sidebarLeft/addMembers.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appChatsManager", - "loc": "27:42-90" - }, - { - "moduleId": 92, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\newGroup.ts", - "module": "./src/components/sidebarLeft/newGroup.ts", - "moduleName": "./src/components/sidebarLeft/newGroup.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appChatsManager", - "loc": "27:42-90" - }, - { - "moduleId": 106, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\contextMenu.ts", - "module": "./src/components/chat/contextMenu.ts", - "moduleName": "./src/components/chat/contextMenu.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appChatsManager", - "loc": "7:42-90" - } - ], - "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 this.onChatUpdated = (chatID, updates) => {\r\n apiUpdatesManager_1.default.processUpdateMessage(updates);\r\n if (updates &&\r\n updates.updates &&\r\n updates.updates.length &&\r\n this.isChannel(chatID)) {\r\n appProfileManager_1.default.invalidateChannelParticipants(chatID);\r\n }\r\n };\r\n utils_1.$rootScope.$on('apiUpdate', (e) => {\r\n // console.log('on apiUpdate', update)\r\n const update = e.detail;\r\n switch (update._) {\r\n case 'updateChannel':\r\n const channelID = update.channel_id;\r\n //console.log('updateChannel:', update);\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] || { _: 'chatEmpty', 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._ == 'chatEmpty')\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 if (id < 0)\r\n id = -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 < 0)\r\n id = -id;\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 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 ? 'followers' : '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 const isChannel = this.isChannel(id);\r\n const 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.getChannelInput(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 leaveChannel(id) {\r\n return mtprotoworker_1.default.invokeApi('channels.leaveChannel', {\r\n channel: this.getChannelInput(id)\r\n }).then(this.onChatUpdated.bind(this, id));\r\n }\r\n joinChannel(id) {\r\n return mtprotoworker_1.default.invokeApi('channels.joinChannel', {\r\n channel: this.getChannelInput(id)\r\n }).then(this.onChatUpdated.bind(this, id));\r\n }\r\n}\r\nexports.AppChatsManager = AppChatsManager;\r\nexports.default = new AppChatsManager();\r\n" - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "index": 38, - "index2": 104, - "size": 114943, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "issuerId": 31, - "issuerName": "./src/pages/pageIm.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - } - ], - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 14, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "module": "./src/lib/appManagers/appSidebarLeft.ts", - "moduleName": "./src/lib/appManagers/appSidebarLeft.ts", - "type": "cjs require", - "userRequest": "./appImManager", - "loc": "29:39-64" - }, - { - "moduleId": 16, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 24, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", - "type": "cjs require", - "userRequest": "./appImManager", - "loc": "46:39-64" - }, - { - "moduleId": 31, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "module": "./src/pages/pageIm.ts", - "moduleName": "./src/pages/pageIm.ts", - "type": "cjs require", - "userRequest": "../lib/appManagers/appImManager", - "loc": "30:62-104" - }, - { - "moduleId": 47, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\index.ts", - "module": "./src/components/emoticonsDropdown/index.ts", - "moduleName": "./src/components/emoticonsDropdown/index.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appImManager", - "loc": "23:39-84" - }, - { - "moduleId": 58, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\poll.ts", - "module": "./src/components/poll.ts", - "moduleName": "./src/components/poll.ts", - "type": "cjs require", - "userRequest": "../lib/appManagers/appImManager", - "loc": "12:39-81" - }, - { - "moduleId": 61, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popupStickers.ts", - "module": "./src/components/popupStickers.ts", - "moduleName": "./src/components/popupStickers.ts", - "type": "cjs require", - "userRequest": "../lib/appManagers/appImManager", - "loc": "15:39-81" - }, - { - "moduleId": 85, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\stickers.ts", - "module": "./src/components/sidebarRight/stickers.ts", - "moduleName": "./src/components/sidebarRight/stickers.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appImManager", - "loc": "29:39-84" - }, - { - "moduleId": 87, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\gifs.ts", - "module": "./src/components/sidebarRight/gifs.ts", - "moduleName": "./src/components/sidebarRight/gifs.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appImManager", - "loc": "42:39-84" - }, - { - "moduleId": 98, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\input.ts", - "module": "./src/components/chat/input.ts", - "moduleName": "./src/components/chat/input.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appImManager", - "loc": "11:39-84" - }, - { - "moduleId": 101, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\emoji.ts", - "module": "./src/components/emoticonsDropdown/tabs/emoji.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/emoji.ts", - "type": "cjs require", - "userRequest": "../../../lib/appManagers/appImManager", - "loc": "12:39-87" - }, - { - "moduleId": 105, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\audio.ts", - "module": "./src/components/chat/audio.ts", - "moduleName": "./src/components/chat/audio.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appImManager", - "loc": "7:39-84" - }, - { - "moduleId": 106, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\contextMenu.ts", - "module": "./src/components/chat/contextMenu.ts", - "moduleName": "./src/components/chat/contextMenu.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appImManager", - "loc": "8:39-84" - }, - { - "moduleId": 107, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\search.ts", - "module": "./src/components/chat/search.ts", - "moduleName": "./src/components/chat/search.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appImManager", - "loc": "26:39-84" - } - ], - "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 logger_1 = require(\"../logger\");\r\nconst appMediaViewer_1 = __importDefault(require(\"./appMediaViewer\"));\r\nconst appSidebarLeft_1 = __importDefault(require(\"./appSidebarLeft\"));\r\nconst appChatsManager_1 = __importDefault(require(\"./appChatsManager\"));\r\nconst wrappers_1 = require(\"../../components/wrappers\");\r\nconst preloader_1 = __importDefault(require(\"../../components/preloader\"));\r\nconst misc_1 = require(\"../../components/misc\");\r\nconst input_1 = require(\"../../components/chat/input\");\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 config_1 = require(\"../config\");\r\nconst animationIntersector_1 = __importDefault(require(\"../../components/animationIntersector\"));\r\nconst popupStickers_1 = __importDefault(require(\"../../components/popupStickers\"));\r\nconst popupDatepicker_1 = __importDefault(require(\"../../components/popupDatepicker\"));\r\nconst appPollsManager_1 = __importDefault(require(\"./appPollsManager\"));\r\nconst ripple_1 = require(\"../../components/ripple\");\r\nconst horizontalMenu_1 = require(\"../../components/horizontalMenu\");\r\nconst audio_1 = require(\"../../components/chat/audio\");\r\nconst contextMenu_1 = require(\"../../components/chat/contextMenu\");\r\nconst search_1 = require(\"../../components/chat/search\");\r\n//console.log('appImManager included33!');\r\nappSidebarLeft_1.default; // just to include\r\nconst testScroll = false;\r\nconst ANIMATIONGROUP = 'chat';\r\nclass AppImManager {\r\n constructor() {\r\n this.columnEl = document.getElementById('column-center');\r\n this.btnJoin = this.columnEl.querySelector('.chat-join');\r\n this.btnMute = this.columnEl.querySelector('.chat-mute-button');\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.columnEl.querySelector('.chat-search-button');\r\n this.goDownBtn = this.columnEl.querySelector('#bubbles-go-down');\r\n this.menuButtons = {};\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 = null;\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.chatInfo = this.columnEl.querySelector('.chat-info');\r\n this.contextMenu = new contextMenu_1.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 = horizontalMenu_1.horizontalMenu(null, document.getElementById('main-columns'));\r\n this.closeBtn = this.topbar.querySelector('.sidebar-close-button');\r\n this.onDatePick = (timestamp) => {\r\n const peerID = this.peerID;\r\n appMessagesManager_1.default.requestHistory(peerID, 0, 2, -1, timestamp).then(history => {\r\n var _a;\r\n if (!((_a = history === null || history === void 0 ? void 0 : history.messages) === null || _a === void 0 ? void 0 : _a.length)) {\r\n this.log.error('no history!');\r\n return;\r\n }\r\n else if (this.peerID != peerID) {\r\n return;\r\n }\r\n appImManager.setPeer(this.peerID, history.messages[0].mid);\r\n //console.log('got history date:', history);\r\n });\r\n };\r\n this.log = logger_1.logger('IM', logger_1.LogLevels.log | logger_1.LogLevels.warn | logger_1.LogLevels.debug | logger_1.LogLevels.error);\r\n this.chatInputC = new input_1.ChatInput();\r\n this.preloader = new preloader_1.default(null, false);\r\n this.selectTab(0);\r\n misc_1.parseMenuButtonsTo(this.menuButtons, this.columnEl.querySelector('.chat-more-button').firstElementChild.children);\r\n this.chatAudio = new audio_1.ChatAudio();\r\n this.chatInfo.nextElementSibling.prepend(this.chatAudio.container);\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 utils_1.$rootScope.$on('chat_update', (e) => {\r\n var _a;\r\n const peerID = e.detail;\r\n if (this.peerID == -peerID) {\r\n const chat = appChatsManager_1.default.getChat(peerID);\r\n this.btnJoin.classList.toggle('hide', !((_a = chat === null || chat === void 0 ? void 0 : chat.pFlags) === null || _a === void 0 ? void 0 : _a.left));\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 var _a, _b, _c;\r\n const { tempID, mid } = e.detail;\r\n this.log('message_sent', e.detail);\r\n // set cached url to media\r\n const message = appMessagesManager_1.default.getMessage(mid);\r\n if (message.media) {\r\n if (message.media.photo) {\r\n const photo = appPhotosManager_1.default.getPhoto('' + tempID);\r\n if ( /* photo._ != 'photoEmpty' */photo) {\r\n const 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 const doc = appDocsManager_1.default.getDoc('' + tempID);\r\n if ( /* doc._ != 'documentEmpty' && */(doc === null || doc === void 0 ? void 0 : doc.type) && doc.type != 'sticker') {\r\n const 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 = utils_1.getObjectKeysAndSort(appMessagesManager_1.default.groupedMessagesStorage[message.grouped_id]);\r\n Array.from(items).forEach((item, idx) => {\r\n item.dataset.mid = '' + groupIDs[idx];\r\n });\r\n }\r\n if ((_a = message.media) === null || _a === void 0 ? void 0 : _a.poll) {\r\n const newPoll = message.media.poll;\r\n const pollElement = bubble.querySelector('poll-element');\r\n if (pollElement) {\r\n pollElement.setAttribute('poll-id', newPoll.id);\r\n pollElement.setAttribute('message-id', '' + mid);\r\n delete appPollsManager_1.default.polls[tempID];\r\n delete appPollsManager_1.default.results[tempID];\r\n }\r\n }\r\n if (['audio', 'voice'].includes((_c = (_b = message.media) === null || _b === void 0 ? void 0 : _b.document) === null || _c === void 0 ? void 0 : _c.type)) {\r\n const audio = bubble.querySelector('audio-element');\r\n audio.setAttribute('doc-id', message.media.document.id);\r\n audio.setAttribute('message-id', '' + mid);\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 const mids = e.detail;\r\n const pinnedMessage = appMessagesManager_1.default.getPinnedMessage(this.peerID);\r\n mids.forEach(mid => {\r\n if (pinnedMessage.mid == mid) {\r\n (this.messagesQueuePromise || Promise.resolve()).then(() => {\r\n this.setPinnedMessage(pinnedMessage);\r\n });\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 animationIntersector_1.default.checkAnimations(true);\r\n this.offline = utils_1.$rootScope.idle.isIDLE = true;\r\n this.updateStatus();\r\n clearInterval(this.updateStatusInterval);\r\n window.addEventListener('focus', () => {\r\n this.offline = utils_1.$rootScope.idle.isIDLE = false;\r\n this.updateStatus();\r\n this.updateStatusInterval = window.setInterval(() => this.updateStatus(), 50e3);\r\n // в обратном порядке\r\n animationIntersector_1.default.checkAnimations(false);\r\n }, { once: true });\r\n });\r\n this.topbar.addEventListener('click', (e) => {\r\n const pinned = utils_1.findUpClassName(e.target, 'pinned-container');\r\n if (pinned) {\r\n utils_1.cancelEvent(e);\r\n const mid = +pinned.dataset.mid;\r\n const message = appMessagesManager_1.default.getMessage(mid);\r\n this.setPeer(message.peerID, mid);\r\n }\r\n else {\r\n appSidebarRight_1.default.toggleSidebar(true);\r\n }\r\n });\r\n this.bubblesContainer.addEventListener('click', (e) => {\r\n var _a, _b;\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 if (bubble.classList.contains('is-date') && utils_1.findUpClassName(target, 'bubble__container')) {\r\n if (bubble.classList.contains('is-sticky') && !this.chatInner.classList.contains('is-scrolling')) {\r\n return;\r\n }\r\n for (let timestamp in this.dateMessages) {\r\n let d = this.dateMessages[timestamp];\r\n if (d.div == bubble) {\r\n new popupDatepicker_1.default(new Date(+timestamp), this.onDatePick).show();\r\n break;\r\n }\r\n }\r\n return;\r\n }\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 const isVideoComponentElement = target.tagName == 'SPAN';\r\n /* if(isVideoComponentElement) {\r\n const video = target.parentElement.querySelector('video') as HTMLElement;\r\n if(video) {\r\n video.click(); // hot-fix for time and play button\r\n return;\r\n }\r\n } */\r\n if (bubble.classList.contains('sticker') && target.parentElement.classList.contains('attachment')) {\r\n const messageID = +bubble.dataset.mid;\r\n const message = appMessagesManager_1.default.getMessage(messageID);\r\n const doc = (_a = message.media) === null || _a === void 0 ? void 0 : _a.document;\r\n if (doc === null || doc === void 0 ? void 0 : doc.stickerSetInput) {\r\n new popupStickers_1.default(doc.stickerSetInput).show();\r\n }\r\n return;\r\n }\r\n if ((target.tagName == 'IMG' && !target.classList.contains('emoji') && target.parentElement.tagName != \"AVATAR-ELEMENT\" && !target.classList.contains('document-thumb'))\r\n || target.classList.contains('album-item')\r\n || isVideoComponentElement\r\n || (target.tagName == 'VIDEO' && !bubble.classList.contains('round'))) {\r\n let messageID = +((_b = utils_1.findUpClassName(target, 'album-item')) === null || _b === void 0 ? void 0 : _b.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 withTail = this.bubbles[id].classList.contains('with-media-tail');\r\n let str = '.album-item img, .album-item video, .preview img, .preview video, ';\r\n if (withTail) {\r\n str += '.bubble__media-container';\r\n }\r\n else {\r\n str += '.attachment img, .attachment video';\r\n }\r\n let elements = this.bubbles[id].querySelectorAll(str);\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 targets.sort((a, b) => a.mid - b.mid);\r\n let idx = targets.findIndex(t => t.mid == messageID);\r\n this.log('open mediaViewer single with ids:', ids, idx, targets);\r\n if (!targets[idx]) {\r\n this.log('no target for media viewer!', target);\r\n return;\r\n }\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 return;\r\n }\r\n if (['IMG', 'DIV', \"AVATAR-ELEMENT\"].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.classList.contains('forward')) {\r\n const mid = +bubble.dataset.mid;\r\n appForward_1.default.init([mid]);\r\n return;\r\n }\r\n else if (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 else if (target.tagName == \"AVATAR-ELEMENT\") {\r\n let peerID = +target.getAttribute('peer');\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.getAttribute('peer');\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', (e) => {\r\n utils_1.cancelEvent(e);\r\n this.setPeer(0);\r\n });\r\n this.searchBtn.addEventListener('click', (e) => {\r\n utils_1.cancelEvent(e);\r\n if (this.peerID) {\r\n appSidebarRight_1.default.beginSearch();\r\n }\r\n });\r\n this.btnMute.addEventListener('click', (e) => {\r\n utils_1.cancelEvent(e);\r\n this.mutePeer(this.peerID);\r\n });\r\n this.btnJoin.addEventListener('click', (e) => {\r\n utils_1.cancelEvent(e);\r\n this.btnJoin.setAttribute('disabled', 'true');\r\n appChatsManager_1.default.joinChannel(-this.peerID).finally(() => {\r\n this.btnJoin.removeAttribute('disabled');\r\n });\r\n });\r\n this.menuButtons.mute.addEventListener('click', (e) => {\r\n this.mutePeer(this.peerID);\r\n });\r\n this.menuButtons.search.addEventListener('click', (e) => {\r\n new search_1.ChatSearch();\r\n });\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' && !config_1.touchSupport) {\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.code == \"KeyC\" && (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 if (this.offline) {\r\n return;\r\n }\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 setPinnedMessage(message) {\r\n /////this.log('setting pinned message', message);\r\n //return;\r\n const height = 52;\r\n const scrollTop = this.scrollable.container.scrollTop;\r\n const newPinned = wrappers_1.wrapReply('Pinned Message', message.message, message, true);\r\n newPinned.dataset.mid = '' + message.mid;\r\n newPinned.classList.add('pinned-container');\r\n const close = document.createElement('button');\r\n close.classList.add('pinned-message-close', 'btn-icon', 'tgico-close');\r\n close.addEventListener('click', (e) => {\r\n utils_1.cancelEvent(e);\r\n const scrollTop = this.scrollable.scrollTop;\r\n newPinned.remove();\r\n this.topbar.classList.remove('is-pinned-shown');\r\n this.pinnedMessageContainer = null;\r\n this.scrollable.scrollTop = scrollTop - height;\r\n }, { once: true });\r\n newPinned.append(close);\r\n this.btnJoin.parentElement.insertBefore(newPinned, this.btnJoin);\r\n this.topbar.classList.add('is-pinned-shown');\r\n if (this.pinnedMessageContainer) {\r\n this.pinnedMessageContainer.remove();\r\n }\r\n this.pinnedMessageContainer = newPinned;\r\n //this.pinnedMessageContent.innerHTML = message.rReply;\r\n this.scrollable.scrollTop = scrollTop + height;\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, justLoad = false) {\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, undefined, undefined, justLoad);\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, undefined, justLoad);\r\n }\r\n }\r\n onScroll(e) {\r\n if (this.onScrollRAF)\r\n window.cancelAnimationFrame(this.onScrollRAF);\r\n // * В таком случае, кнопка не будет моргать если чат в самом низу, и правильно отработает случай написания нового сообщения и проскролла вниз\r\n if (this.scrollable.scrollLocked && this.scrolledDown)\r\n return;\r\n this.onScrollRAF = window.requestAnimationFrame(() => {\r\n //lottieLoader.checkAnimations(false, 'chat');\r\n if (!config_1.touchSupport) {\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 = window.setTimeout(() => {\r\n this.chatInner.classList.remove('is-scrolling');\r\n this.isScrollingTimeout = 0;\r\n }, 1350);\r\n }\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 /* const getScrollOffset = () => {\r\n //return Math.round(Math.max(300, appPhotosManager.windowH / 1.5));\r\n return 300;\r\n };\r\n \r\n window.addEventListener('resize', () => {\r\n this.scrollable.onScrollOffset = getScrollOffset();\r\n });\r\n \r\n this.scrollable = new Scrollable(this.bubblesContainer, 'y', 'IM', this.chatInner, getScrollOffset()); */\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 if (config_1.touchSupport) {\r\n this.scroll.addEventListener('touchmove', () => {\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 }, { passive: true });\r\n this.scroll.addEventListener('touchend', () => {\r\n if (!this.chatInner.classList.contains('is-scrolling')) {\r\n return;\r\n }\r\n if (this.isScrollingTimeout) {\r\n clearTimeout(this.isScrollingTimeout);\r\n }\r\n this.isScrollingTimeout = window.setTimeout(() => {\r\n this.chatInner.classList.remove('is-scrolling');\r\n this.isScrollingTimeout = 0;\r\n }, 1350);\r\n }, { passive: true });\r\n }\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 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 ? 'followers' : '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 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 findMountedBubbleByMsgID(mid) {\r\n return this.bubbles[utils_1.getObjectKeysAndSort(this.bubbles).find(id => {\r\n var _a;\r\n if (id < mid)\r\n return false;\r\n return !!((_a = this.bubbles[id]) === null || _a === void 0 ? void 0 : _a.parentElement);\r\n })];\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 (config_1.mediaSizes.isMobile) {\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 let topMessage = lastMsgID <= 0 ? lastMsgID : (_a = dialog === null || dialog === void 0 ? void 0 : dialog.top_message) !== null && _a !== void 0 ? _a : 0; // убрать + 1 после создания базы референсов\r\n const isTarget = lastMsgID !== undefined;\r\n // @ts-ignore\r\n /* if(topMessage && dialog && dialog.top_message == topMessage && dialog.refetchTopMessage) {\r\n // @ts-ignore\r\n dialog.refetchTopMessage = false;\r\n topMessage += 1;\r\n } */\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 //lastMsgID = topMessage;\r\n }\r\n }\r\n if (samePeer) {\r\n if (this.bubbles[lastMsgID]) {\r\n if (isTarget) {\r\n const bubble = this.findMountedBubbleByMsgID(lastMsgID);\r\n this.scrollable.scrollIntoView(bubble);\r\n this.highlightBubble(bubble);\r\n }\r\n else 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 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 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 if (!samePeer) {\r\n this.lazyLoadQueue.clear();\r\n }\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 if (!samePeer) {\r\n this.finishPeerChange();\r\n }\r\n this.preloader.attach(this.bubblesContainer);\r\n if (config_1.mediaSizes.isMobile) {\r\n this.selectTab(1);\r\n }\r\n }\r\n //console.timeEnd('appImManager setPeer pre promise');\r\n animationIntersector_1.default.lockGroup(ANIMATIONGROUP);\r\n this.setPeerPromise = Promise.all([\r\n promise.then(() => {\r\n ////this.log('setPeer removing preloader');\r\n var _a;\r\n if (cached) {\r\n this.scrollable.container.innerHTML = '';\r\n //oldChatInner.remove();\r\n if (!samePeer) {\r\n this.finishPeerChange();\r\n }\r\n if (config_1.mediaSizes.isMobile) {\r\n this.selectTab(1);\r\n }\r\n }\r\n else {\r\n this.preloader.detach();\r\n }\r\n this.scrollable.container.append(this.chatInner);\r\n animationIntersector_1.default.unlockGroup(ANIMATIONGROUP);\r\n animationIntersector_1.default.checkAnimations(false, ANIMATIONGROUP /* , true */);\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 (dialog && (isTarget || (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 && !isTarget;\r\n if (!fromUp && (samePeer || forwardingUnread)) {\r\n this.scrollable.scrollTop = this.scrollable.scrollHeight;\r\n }\r\n let bubble = forwardingUnread ? (this.firstUnreadBubble || this.bubbles[lastMsgID]) : this.bubbles[lastMsgID];\r\n if (!(bubble === null || bubble === void 0 ? void 0 : bubble.parentElement)) {\r\n bubble = this.findMountedBubbleByMsgID(lastMsgID);\r\n }\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 if ((_a = dialog === null || dialog === void 0 ? void 0 : dialog.pFlags) === null || _a === void 0 ? void 0 : _a.unread_mark) {\r\n appMessagesManager_1.default.markDialogUnread(peerID, true);\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 var _a, _b;\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 this.avatarEl.update();\r\n const isAnyGroup = appPeersManager_1.default.isAnyGroup(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', isAnyGroup || peerID == this.myID);\r\n this.chatInner.classList.toggle('is-channel', isChannel);\r\n this.btnMute.classList.toggle('hide', !appPeersManager_1.default.isBroadcast(peerID));\r\n this.btnJoin.classList.toggle('hide', !((_b = (_a = appChatsManager_1.default.getChat(-this.peerID)) === null || _a === void 0 ? void 0 : _a.pFlags) === null || _b === void 0 ? void 0 : _b.left));\r\n this.menuButtons.mute.style.display = this.myID == this.peerID ? 'none' : '';\r\n const pinned = appMessagesManager_1.default.getPinnedMessage(peerID);\r\n if (pinned && !pinned.deleted) {\r\n this.setPinnedMessage(pinned);\r\n }\r\n else if (this.pinnedMessageContainer) {\r\n this.pinnedMessageContainer.remove();\r\n this.pinnedMessageContainer = null;\r\n }\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 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 animationIntersector_1.default.checkAnimations(false, ANIMATIONGROUP);\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 const date = new Date(message.date * 1000);\r\n date.setHours(0, 0, 0);\r\n const dateTimestamp = date.getTime();\r\n if (!(dateTimestamp in this.dateMessages)) {\r\n let str = '';\r\n const today = new Date();\r\n today.setHours(0, 0, 0, 0);\r\n if (today.getTime() == date.getTime()) {\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 = months[date.getMonth()] + ' ' + date.getDate();\r\n if (date.getFullYear() != today.getFullYear()) {\r\n str += ', ' + date.getFullYear();\r\n }\r\n }\r\n const div = document.createElement('div');\r\n div.className = 'bubble service is-date';\r\n div.innerHTML = `
${str}
`;\r\n ////////this.log('need to render date message', dateTimestamp, str);\r\n const container = document.createElement('div');\r\n container.className = 'bubbles-date-group';\r\n this.dateMessages[dateTimestamp] = {\r\n div,\r\n container,\r\n firstTimestamp: date.getTime()\r\n };\r\n container.append(div);\r\n if (reverse) {\r\n this.scrollable.prepend(container, false);\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 dateMessage = this.getDateContainerByMessage(message, reverse);\r\n if(reverse) dateMessage.container.insertBefore(bubble, dateMessage.div.nextSibling);\r\n else dateMessage.container.append(bubble);\r\n return; */\r\n let promises = [];\r\n Array.from(bubble.querySelectorAll('img, video')).forEach(el => {\r\n if (el instanceof HTMLVideoElement) {\r\n if (!el.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 promise = new Promise((resolve, reject) => {\r\n let r;\r\n let onLoad = () => {\r\n clearTimeout(timeout);\r\n resolve();\r\n // lol\r\n el.removeEventListener(el instanceof HTMLVideoElement ? 'canplay' : 'load', onLoad);\r\n };\r\n if (el instanceof HTMLVideoElement) {\r\n el.addEventListener('canplay', onLoad);\r\n r = () => el.readyState >= 1;\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 // @ts-ignore\r\n //this.log.error('did not called', el, el.parentElement, el.complete, el.readyState, src);\r\n resolve();\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.debug('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 bubbleContainer.style.marginBottom = '';\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 (utils_1.langPack.hasOwnProperty(_) && !utils_1.langPack[_]) {\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 = `
${str}
`;\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) + ' ' + time;\r\n if (!message.savedFrom) {\r\n let forward = document.createElement('div');\r\n forward.classList.add('bubble-beside-button', 'forward');\r\n forward.innerHTML = `\r\n \r\n \r\n \r\n \r\n \r\n `;\r\n bubbleContainer.append(forward);\r\n bubble.classList.add('with-beside-button');\r\n }\r\n }\r\n if (message.edit_date) {\r\n bubble.classList.add('is-edited');\r\n time = 'edited ' + time;\r\n }\r\n let timeSpan = document.createElement('span');\r\n timeSpan.classList.add('time');\r\n let timeInner = document.createElement('div');\r\n timeInner.classList.add('inner', 'tgico');\r\n timeInner.innerHTML = time;\r\n let 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 && !messageMedia) {\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 const rows = message.reply_markup.rows;\r\n const containerDiv = document.createElement('div');\r\n containerDiv.classList.add('reply-markup');\r\n rows.forEach((row) => {\r\n const buttons = row.buttons;\r\n if (!buttons || !buttons.length)\r\n return;\r\n const rowDiv = document.createElement('div');\r\n rowDiv.classList.add('reply-markup-row');\r\n buttons.forEach((button) => {\r\n const 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 const from = appUsersManager_1.default.getUser(message.fromID);\r\n const unsafe = !(from && from.pFlags && from.pFlags.verified);\r\n const 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 ripple_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 const column = utils_1.whichChild(target);\r\n const 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 const button = row.buttons[column];\r\n AppInlineBotsManager_1.default.callbackButtonClick(message.mid, button);\r\n });\r\n const 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 const photo = appPhotosManager_1.default.getPhoto(message.id);\r\n //if(photo._ == 'photoEmpty') break;\r\n this.log('will wrap pending photo:', pending, message, photo);\r\n const tailSupported = !config_1.isAndroid;\r\n if (tailSupported)\r\n bubble.classList.add('with-media-tail');\r\n wrappers_1.wrapPhoto(photo, message, attachmentDiv, undefined, undefined, tailSupported, 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 //if(doc._ == 'documentEmpty') break;\r\n this.log('will wrap pending video:', pending, message, doc);\r\n const tailSupported = !config_1.isAndroid && !config_1.isApple && doc.type != 'round';\r\n if (tailSupported)\r\n bubble.classList.add('with-media-tail');\r\n wrappers_1.wrapVideo({\r\n doc,\r\n container: attachmentDiv,\r\n message,\r\n boxWidth: config_1.mediaSizes.active.regular.width,\r\n boxHeight: config_1.mediaSizes.active.regular.height,\r\n withTail: tailSupported,\r\n isOut: isOut,\r\n lazyLoadQueue: this.lazyLoadQueue,\r\n middleware: null,\r\n group: ANIMATIONGROUP\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 const doc = appDocsManager_1.default.getDoc(message.id);\r\n //if(doc._ == 'documentEmpty') break;\r\n this.log('will wrap pending doc:', doc);\r\n const docDiv = wrappers_1.wrapDocument(doc, false, true, message.id);\r\n if (doc.type == 'audio' || doc.type == 'voice') {\r\n docDiv.preloader = preloader;\r\n }\r\n else {\r\n const icoDiv = docDiv.querySelector('.audio-download, .document-ico');\r\n preloader.attach(icoDiv, false);\r\n }\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 const tailSupported = !config_1.isAndroid;\r\n if (tailSupported)\r\n bubble.classList.add('with-media-tail');\r\n if (message.grouped_id) {\r\n bubble.classList.add('is-album');\r\n let storage = appMessagesManager_1.default.groupedMessagesStorage[message.grouped_id];\r\n if (Object.keys(storage).length != 1) {\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 break;\r\n }\r\n }\r\n wrappers_1.wrapPhoto(photo, message, attachmentDiv, undefined, undefined, tailSupported, isOut, this.lazyLoadQueue, this.getMiddleware());\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: config_1.mediaSizes.active.webpage.width,\r\n boxHeight: config_1.mediaSizes.active.webpage.height,\r\n lazyLoadQueue: this.lazyLoadQueue,\r\n middleware: this.getMiddleware(),\r\n isOut,\r\n group: ANIMATIONGROUP\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, message, preview, config_1.mediaSizes.active.webpage.width, config_1.mediaSizes.active.webpage.height, false, isOut, 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: ANIMATIONGROUP,\r\n //play: !!message.pending || !multipleRender,\r\n play: true,\r\n loop: true,\r\n emoji: bubble.classList.contains('emoji-big') ? messageMessage : undefined,\r\n withThumb: true\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 bubble.classList.add('hide-name', doc.type == 'round' ? 'round' : '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 const tailSupported = !config_1.isAndroid && !config_1.isApple && doc.type != 'round';\r\n if (tailSupported)\r\n bubble.classList.add('with-media-tail');\r\n wrappers_1.wrapVideo({\r\n doc,\r\n container: attachmentDiv,\r\n message,\r\n boxWidth: config_1.mediaSizes.active.regular.width,\r\n boxHeight: config_1.mediaSizes.active.regular.height,\r\n withTail: tailSupported,\r\n isOut: isOut,\r\n lazyLoadQueue: this.lazyLoadQueue,\r\n middleware: this.getMiddleware(),\r\n group: ANIMATIONGROUP\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, false, false, message.mid);\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, false, false, message.mid);\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
\r\n
${texts.join(' ')}
\r\n
${message.media.phone_number ? '+' + misc_1.formatPhoneNumber(message.media.phone_number).formatted : 'Unknown phone number'}
\r\n
`;\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 /* if(bubble.classList.contains('is-message-empty') && (bubble.classList.contains('photo') || bubble.classList.contains('video'))) {\r\n bubble.classList.add('no-tail');\r\n \r\n if(!bubble.classList.contains('with-media-tail')) {\r\n bubble.classList.add('use-border-radius');\r\n }\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 const isForwardFromChannel = !message.fromID && message.fwd_from;\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('bubble-beside-button', 'goto-original', 'tgico-next');\r\n bubbleContainer.append(goto);\r\n bubble.dataset.savedFrom = message.savedFrom;\r\n bubble.classList.add('with-beside-button');\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 || isForwardFromChannel) {\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 || originalMessage.fwdFromID, 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) || isForwardFromChannel ? message.fwdFromID : message.fromID) || 0));\r\n avatarElem.update();\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 //this.chatInner.style.height = '100%';\r\n //previousScrollHeightMinusTop = 0;\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 // touchSupport for safari iOS\r\n config_1.touchSupport && config_1.isApple && (this.scrollable.container.style.overflow = 'hidden');\r\n this.scrollable.scrollTop = newScrollTop;\r\n config_1.touchSupport && config_1.isApple && (this.scrollable.container.style.overflow = '');\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 /**\r\n * Load and render history\r\n * @param maxID max message id\r\n * @param reverse 'true' means up\r\n * @param isBackLimit is search\r\n * @param additionMsgID for the last message\r\n * @param justLoad do not render\r\n */\r\n getHistory(maxID = 0, reverse = false, isBackLimit = false, additionMsgID = 0, justLoad = false) {\r\n const peerID = this.peerID;\r\n //console.time('appImManager call getHistory');\r\n const pageCount = appPhotosManager_1.default.windowH / 38 /* * 1.25 */ | 0;\r\n //const loadCount = Object.keys(this.bubbles).length > 0 ? 50 : pageCount;\r\n const realLoadCount = Object.keys(this.bubbles).length > 0 ? Math.max(40, pageCount) : pageCount; //const 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 const 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, justLoad);\r\n if (justLoad) {\r\n this.scrollable.onScroll(); // нужно делать из-за ранней прогрузки\r\n return true;\r\n }\r\n //console.timeEnd('appImManager call getHistory');\r\n if (this.peerID != peerID || (this.getHistoryTopPromise != promise && this.getHistoryBottomPromise != promise)) {\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 return false;\r\n });\r\n }\r\n else if (justLoad) {\r\n return null;\r\n }\r\n else {\r\n cached = true;\r\n this.log('getHistory cached result by maxID:', maxID, reverse, isBackLimit, result, peerID, justLoad);\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 promise.finally(() => {\r\n (reverse ? this.getHistoryTopPromise = undefined : this.getHistoryBottomPromise = undefined);\r\n });\r\n if (justLoad) {\r\n return null;\r\n }\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 = utils_1.getObjectKeysAndSort(this.bubbles);\r\n }\r\n //let removeCount = loadCount / 2;\r\n const 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 this.log('getHistory: slice bottom messages:', ids.length, loadCount);\r\n this.getHistoryBottomPromise = undefined; // !WARNING, это нужно для обратной загрузки истории, если запрос словил флуд\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 up messages:', ids.length, loadCount);\r\n this.getHistoryTopPromise = undefined; // !WARNING, это нужно для обратной загрузки истории, если запрос словил флуд\r\n }\r\n this.log('getHistory: will slice ids:', ids, reverse);\r\n this.deleteMessagesByIDs(ids);\r\n }\r\n this.setUnreadDelimiter(); // не нашёл места лучше\r\n // preload more\r\n setTimeout(() => {\r\n this.loadMoreHistory(true, true);\r\n this.loadMoreHistory(false, true);\r\n }, 0);\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 const menuButton = this.menuButtons.mute;\r\n menuButton.classList.remove('tgico-mute', 'tgico-unmute');\r\n menuButton.classList.add(muted ? 'tgico-unmute' : 'tgico-mute');\r\n let rp = menuButton.firstElementChild;\r\n menuButton.innerText = muted ? 'Unmute' : 'Mute';\r\n rp && menuButton.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] = window.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 utils_1.$rootScope.$broadcast('dialog_notify_settings', peerID);\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 }\r\n }\r\n}\r\nexports.AppImManager = AppImManager;\r\nconst appImManager = new AppImManager();\r\n// @ts-ignore\r\nif (process.env.NODE_ENV != 'production') {\r\n window.appImManager = appImManager;\r\n}\r\nexports.default = appImManager;\r\n" - }, - { - "id": 11, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\logger.ts", - "name": "./src/lib/logger.ts", - "index": 17, - "index2": 15, - "size": 1851, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts", - "issuerId": 2, - "issuerName": "./src/lib/mtproto/mtprotoworker.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts", - "name": "./src/lib/mtproto/mtprotoworker.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - } - ], - "profile": { - "factory": 2342, - "building": 10824, - "dependencies": 20 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 2, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts", - "module": "./src/lib/mtproto/mtprotoworker.ts", - "moduleName": "./src/lib/mtproto/mtprotoworker.ts", - "type": "cjs require", - "userRequest": "../logger", - "loc": "9:17-37" - }, - { - "moduleId": 6, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\scrollable_new.ts", - "module": "./src/components/scrollable_new.ts", - "moduleName": "./src/components/scrollable_new.ts", - "type": "cjs require", - "userRequest": "../lib/logger", - "loc": "6:17-41" - }, - { - "moduleId": 7, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "module": "./src/lib/appManagers/appMessagesManager.ts", - "moduleName": "./src/lib/appManagers/appMessagesManager.ts", - "type": "cjs require", - "userRequest": "../logger", - "loc": "37:17-37" - }, - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "../logger", - "loc": "18:17-37" - }, - { - "moduleId": 16, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts", - "module": "./src/lib/appManagers/appDialogsManager.ts", - "moduleName": "./src/lib/appManagers/appDialogsManager.ts", - "type": "cjs require", - "userRequest": "../logger", - "loc": "25:17-37" - }, - { - "moduleId": 20, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\lottieLoader.ts", - "module": "./src/lib/lottieLoader.ts", - "moduleName": "./src/lib/lottieLoader.ts", - "type": "cjs require", - "userRequest": "./logger", - "loc": "17:17-36" - }, - { - "moduleId": 21, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\lazyLoadQueue.ts", - "module": "./src/components/lazyLoadQueue.ts", - "moduleName": "./src/components/lazyLoadQueue.ts", - "type": "cjs require", - "userRequest": "../lib/logger", - "loc": "16:17-41" - }, - { - "moduleId": 24, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", - "type": "cjs require", - "userRequest": "../logger", - "loc": "45:17-37" - }, - { - "moduleId": 32, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\apiUpdatesManager.ts", - "module": "./src/lib/appManagers/apiUpdatesManager.ts", - "moduleName": "./src/lib/appManagers/apiUpdatesManager.ts", - "type": "cjs require", - "userRequest": "../logger", - "loc": "14:17-37" - }, - { - "moduleId": 39, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appPollsManager.ts", - "module": "./src/lib/appManagers/appPollsManager.ts", - "moduleName": "./src/lib/appManagers/appPollsManager.ts", - "type": "cjs require", - "userRequest": "../logger", - "loc": "12:17-37" - }, - { - "moduleId": 40, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appStateManager.ts", - "module": "./src/lib/appManagers/appStateManager.ts", - "moduleName": "./src/lib/appManagers/appStateManager.ts", - "type": "cjs require", - "userRequest": "../logger", - "loc": "15:17-37" - }, - { - "moduleId": 54, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\opusDecodeController.ts", - "module": "./src/lib/opusDecodeController.ts", - "moduleName": "./src/lib/opusDecodeController.ts", - "type": "cjs require", - "userRequest": "./logger", - "loc": "14:17-36" - }, - { - "moduleId": 56, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts", - "module": "./src/lib/appManagers/appMediaViewer.ts", - "moduleName": "./src/lib/appManagers/appMediaViewer.ts", - "type": "cjs require", - "userRequest": "../logger", - "loc": "20:17-37" - } - ], - "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.logger = exports.LogLevels = void 0;\r\nvar LogLevels;\r\n(function (LogLevels) {\r\n LogLevels[LogLevels[\"log\"] = 1] = \"log\";\r\n LogLevels[LogLevels[\"warn\"] = 2] = \"warn\";\r\n LogLevels[LogLevels[\"error\"] = 4] = \"error\";\r\n LogLevels[LogLevels[\"debug\"] = 8] = \"debug\";\r\n})(LogLevels = exports.LogLevels || (exports.LogLevels = {}));\r\n;\r\nvar _logTimer = Date.now();\r\nfunction dT() {\r\n return '[' + ((Date.now() - _logTimer) / 1000).toFixed(3) + ']';\r\n}\r\nfunction logger(prefix, level = LogLevels.log | LogLevels.warn | LogLevels.error) {\r\n // @ts-ignore\r\n if (process.env.NODE_ENV == 'production' /* || true */) {\r\n level = LogLevels.error;\r\n }\r\n //level = LogLevels.log | LogLevels.warn | LogLevels.error | LogLevels.debug\r\n function Log(...args) {\r\n return level & LogLevels.log && console.log(dT(), '[' + prefix + ']:', ...args);\r\n }\r\n Log.warn = function (...args) {\r\n return level & LogLevels.warn && console.warn(dT(), '[' + prefix + ']:', ...args);\r\n };\r\n Log.info = function (...args) {\r\n return level & LogLevels.log && console.info(dT(), '[' + prefix + ']:', ...args);\r\n };\r\n Log.error = function (...args) {\r\n return level & LogLevels.error && console.error(dT(), '[' + prefix + ']:', ...args);\r\n };\r\n Log.trace = function (...args) {\r\n return level & LogLevels.log && console.trace(dT(), '[' + prefix + ']:', ...args);\r\n };\r\n /* Log.debug = function(...args: any[]) {\r\n return level & LogLevels.debug && console.log(dT(), '[' + prefix + ']:', ...args);\r\n }; */\r\n Log.debug = function (...args) {\r\n return level & LogLevels.debug && console.debug(dT(), '[' + prefix + ']:', ...args);\r\n };\r\n return Log;\r\n}\r\nexports.logger = logger;\r\n;\r\n" - }, - { - "id": 12, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDocsManager.ts", - "name": "./src/lib/appManagers/appDocsManager.ts", - "index": 51, - "index2": 42, - "size": 12121, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 7, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "module": "./src/lib/appManagers/appMessagesManager.ts", - "moduleName": "./src/lib/appManagers/appMessagesManager.ts", - "type": "cjs require", - "userRequest": "./appDocsManager", - "loc": "28:41-68" - }, - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "./appDocsManager", - "loc": "30:41-68" - }, - { - "moduleId": 18, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "module": "./src/components/wrappers.ts", - "moduleName": "./src/components/wrappers.ts", - "type": "cjs require", - "userRequest": "../lib/appManagers/appDocsManager", - "loc": "18:41-85" - }, - { - "moduleId": 37, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\appMediaPlaybackController.ts", - "module": "./src/components/appMediaPlaybackController.ts", - "moduleName": "./src/components/appMediaPlaybackController.ts", - "type": "cjs require", - "userRequest": "../lib/appManagers/appDocsManager", - "loc": "8:41-85" - }, - { - "moduleId": 44, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appStickersManager.ts", - "module": "./src/lib/appManagers/appStickersManager.ts", - "moduleName": "./src/lib/appManagers/appStickersManager.ts", - "type": "cjs require", - "userRequest": "./appDocsManager", - "loc": "18:41-68" - }, - { - "moduleId": 55, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 56, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 62, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\AppInlineBotsManager.ts", - "module": "./src/lib/appManagers/AppInlineBotsManager.ts", - "moduleName": "./src/lib/appManagers/AppInlineBotsManager.ts", - "type": "cjs require", - "userRequest": "./appDocsManager", - "loc": "15:41-68" - }, - { - "moduleId": 63, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\gifsMasonry.ts", - "module": "./src/components/gifsMasonry.ts", - "moduleName": "./src/components/gifsMasonry.ts", - "type": "cjs require", - "userRequest": "../lib/appManagers/appDocsManager", - "loc": "16:41-85" - }, - { - "moduleId": 84, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\audio.ts", - "module": "./src/components/audio.ts", - "moduleName": "./src/components/audio.ts", - "type": "cjs require", - "userRequest": "../lib/appManagers/appDocsManager", - "loc": "7:41-85" - }, - { - "moduleId": 98, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\input.ts", - "module": "./src/components/chat/input.ts", - "moduleName": "./src/components/chat/input.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appDocsManager", - "loc": "20:41-88" - }, - { - "moduleId": 100, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\gifs.ts", - "module": "./src/components/emoticonsDropdown/tabs/gifs.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/gifs.ts", - "type": "cjs require", - "userRequest": "../../../lib/appManagers/appDocsManager", - "loc": "11:41-91" - }, - { - "moduleId": 102, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\stickers.ts", - "module": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "type": "cjs require", - "userRequest": "../../../lib/appManagers/appDocsManager", - "loc": "45:41-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\nconst richtextprocessor_1 = require(\"../richtextprocessor\");\r\nconst utils_1 = require(\"../utils\");\r\nconst opusDecodeController_1 = __importDefault(require(\"../opusDecodeController\"));\r\nconst bin_utils_1 = require(\"../bin_utils\");\r\nconst appDownloadManager_1 = __importDefault(require(\"./appDownloadManager\"));\r\nconst appPhotosManager_1 = __importDefault(require(\"./appPhotosManager\"));\r\nconst config_1 = require(\"../config\");\r\n// TODO: если залить картинку файлом, а потом перезайти в диалог - превьюшка заново скачается\r\nclass AppDocsManager {\r\n constructor() {\r\n this.docs = {};\r\n }\r\n saveDoc(doc, context) {\r\n if (doc._ == 'documentEmpty') {\r\n return undefined;\r\n }\r\n //console.log('saveDoc', apiDoc, this.docs[apiDoc.id]);\r\n if (this.docs[doc.id]) {\r\n const d = this.docs[doc.id];\r\n //if(doc._ != 'documentEmpty' && doc._ == d._) {\r\n if (doc.thumbs) {\r\n if (!d.thumbs)\r\n d.thumbs = doc.thumbs;\r\n /* else if(apiDoc.thumbs[0].bytes && !d.thumbs[0].bytes) {\r\n d.thumbs.unshift(apiDoc.thumbs[0]);\r\n } else if(d.thumbs[0].url) { // fix for converted thumb in safari\r\n apiDoc.thumbs[0] = d.thumbs[0];\r\n } */\r\n }\r\n d.file_reference = doc.file_reference;\r\n //}\r\n return d;\r\n //return Object.assign(d, apiDoc, context);\r\n //return context ? Object.assign(d, context) : d;\r\n }\r\n if (context) {\r\n Object.assign(doc, context);\r\n }\r\n this.docs[doc.id] = doc;\r\n doc.attributes.forEach(attribute => {\r\n switch (attribute._) {\r\n case 'documentAttributeFilename':\r\n doc.file_name = richtextprocessor_1.RichTextProcessor.wrapPlainText(attribute.file_name);\r\n break;\r\n case 'documentAttributeAudio':\r\n doc.duration = attribute.duration;\r\n doc.audioTitle = attribute.title;\r\n doc.audioPerformer = attribute.performer;\r\n doc.type = attribute.pFlags.voice && doc.mime_type == \"audio/ogg\" ? 'voice' : 'audio';\r\n /* if(apiDoc.type == 'audio') {\r\n apiDoc.supportsStreaming = true;\r\n } */\r\n break;\r\n case 'documentAttributeVideo':\r\n doc.duration = attribute.duration;\r\n doc.w = attribute.w;\r\n doc.h = attribute.h;\r\n //apiDoc.supportsStreaming = attribute.pFlags?.supports_streaming/* && apiDoc.size > 524288 */;\r\n if ( /* apiDoc.thumbs && */attribute.pFlags.round_message) {\r\n doc.type = 'round';\r\n }\r\n else /* if(apiDoc.thumbs) */ {\r\n doc.type = 'video';\r\n }\r\n break;\r\n case 'documentAttributeSticker':\r\n if (attribute.alt !== undefined) {\r\n doc.stickerEmojiRaw = attribute.alt;\r\n doc.stickerEmoji = richtextprocessor_1.RichTextProcessor.wrapRichText(doc.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 doc.stickerSetInput = attribute.stickerset;\r\n }\r\n }\r\n if ( /* apiDoc.thumbs && */doc.mime_type == 'image/webp') {\r\n doc.type = 'sticker';\r\n doc.sticker = 1;\r\n }\r\n break;\r\n case 'documentAttributeImageSize':\r\n doc.type = 'photo';\r\n doc.w = attribute.w;\r\n doc.h = attribute.h;\r\n break;\r\n case 'documentAttributeAnimated':\r\n if ((doc.mime_type == 'image/gif' || doc.mime_type == 'video/mp4') /* && apiDoc.thumbs */) {\r\n doc.type = 'gif';\r\n }\r\n doc.animated = true;\r\n break;\r\n }\r\n });\r\n if (!doc.mime_type) {\r\n switch (doc.type) {\r\n case 'gif':\r\n case 'video':\r\n case 'round':\r\n doc.mime_type = 'video/mp4';\r\n break;\r\n case 'sticker':\r\n doc.mime_type = 'image/webp';\r\n break;\r\n case 'audio':\r\n doc.mime_type = 'audio/mpeg';\r\n break;\r\n case 'voice':\r\n doc.mime_type = 'audio/ogg';\r\n break;\r\n default:\r\n doc.mime_type = 'application/octet-stream';\r\n break;\r\n }\r\n }\r\n if (config_1.isServiceWorkerSupported) {\r\n if ((doc.type == 'gif' && doc.size > 8e6) || doc.type == 'audio' || doc.type == 'video') {\r\n doc.supportsStreaming = true;\r\n if (!doc.url) {\r\n doc.url = this.getFileURL(doc);\r\n }\r\n }\r\n }\r\n // for testing purposes\r\n //doc.supportsStreaming = false;\r\n if (!doc.file_name) {\r\n doc.file_name = '';\r\n }\r\n if (doc.mime_type == 'application/x-tgsticker' && doc.file_name == \"AnimatedSticker.tgs\") {\r\n doc.type = 'sticker';\r\n doc.animated = true;\r\n doc.sticker = 2;\r\n }\r\n /* if(!doc.url) {\r\n doc.url = this.getFileURL(doc);\r\n } */\r\n return doc;\r\n }\r\n getDoc(docID) {\r\n return utils_1.isObject(docID) && typeof (docID) !== 'string' ? docID : this.docs[docID];\r\n }\r\n getMediaInput(doc) {\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 getInput(doc, thumbSize) {\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 getFileDownloadOptions(doc, thumb) {\r\n const inputFileLocation = this.getInput(doc, thumb === null || thumb === void 0 ? void 0 : thumb.type);\r\n let mimeType;\r\n if (thumb) {\r\n mimeType = doc.sticker ? 'image/webp' : 'image/jpeg' /* doc.mime_type */;\r\n }\r\n else {\r\n mimeType = doc.mime_type || 'application/octet-stream';\r\n }\r\n return {\r\n dcID: doc.dc_id,\r\n location: inputFileLocation,\r\n size: thumb ? thumb.size : doc.size,\r\n mimeType: mimeType,\r\n fileName: doc.file_name\r\n };\r\n }\r\n getFileURL(doc, download = false, thumb) {\r\n let type;\r\n if (download) {\r\n type = 'download';\r\n }\r\n else if (thumb) {\r\n type = 'thumb';\r\n }\r\n else if (doc.supportsStreaming) {\r\n type = 'stream';\r\n }\r\n else {\r\n type = 'document';\r\n }\r\n return utils_1.getFileURL(type, this.getFileDownloadOptions(doc, thumb));\r\n }\r\n getThumbURL(doc, thumb) {\r\n let promise = Promise.resolve();\r\n if (!thumb.url) {\r\n if ('bytes' in thumb) {\r\n thumb.url = appPhotosManager_1.default.getPreviewURLFromBytes(thumb.bytes, !!doc.sticker);\r\n }\r\n else {\r\n //return this.getFileURL(doc, false, thumb);\r\n promise = this.downloadDocNew(doc, thumb);\r\n }\r\n }\r\n return { thumb, promise };\r\n }\r\n getThumb(doc, useBytes = true) {\r\n var _a;\r\n if ((_a = doc.thumbs) === null || _a === void 0 ? void 0 : _a.length) {\r\n let thumb;\r\n if (!useBytes) {\r\n thumb = doc.thumbs.find(t => !('bytes' in t));\r\n }\r\n if (!thumb) {\r\n thumb = doc.thumbs[0];\r\n }\r\n return this.getThumbURL(doc, thumb);\r\n }\r\n return null;\r\n }\r\n getInputFileName(doc, thumbSize) {\r\n return bin_utils_1.getFileNameByLocation(this.getInput(doc, thumbSize), { fileName: doc.file_name });\r\n }\r\n downloadDocNew(doc, thumb) {\r\n const fileName = this.getInputFileName(doc, thumb === null || thumb === void 0 ? void 0 : thumb.type);\r\n let download = appDownloadManager_1.default.getDownload(fileName);\r\n if (download) {\r\n return download;\r\n }\r\n const downloadOptions = this.getFileDownloadOptions(doc, thumb);\r\n download = appDownloadManager_1.default.download(downloadOptions);\r\n const originalPromise = download;\r\n originalPromise.then((blob) => {\r\n if (thumb) {\r\n thumb.url = URL.createObjectURL(blob);\r\n return;\r\n }\r\n else if (!doc.supportsStreaming) {\r\n doc.url = URL.createObjectURL(blob);\r\n }\r\n doc.downloaded = true;\r\n });\r\n if (doc.type == 'voice' && !opusDecodeController_1.default.isPlaySupported()) {\r\n download = originalPromise.then((blob) => __awaiter(this, void 0, void 0, function* () {\r\n let reader = new FileReader();\r\n yield new Promise((resolve, reject) => {\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 resolve();\r\n }, (err) => {\r\n delete doc.downloaded;\r\n reject(err);\r\n });\r\n };\r\n reader.readAsArrayBuffer(blob);\r\n });\r\n return blob;\r\n }));\r\n }\r\n return download;\r\n }\r\n saveDocFile(doc) {\r\n const options = this.getFileDownloadOptions(doc);\r\n return appDownloadManager_1.default.downloadToDisc(options, doc.file_name);\r\n }\r\n}\r\nconst appDocsManager = new AppDocsManager();\r\n// @ts-ignore\r\nif (process.env.NODE_ENV != 'production') {\r\n window.appDocsManager = appDocsManager;\r\n}\r\nexports.default = appDocsManager;\r\n" - }, - { - "id": 13, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appPhotosManager.ts", - "name": "./src/lib/appManagers/appPhotosManager.ts", - "index": 45, - "index2": 37, - "size": 13161, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 7, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "./appPhotosManager", - "loc": "16:43-72" - }, - { - "moduleId": 12, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDocsManager.ts", - "module": "./src/lib/appManagers/appDocsManager.ts", - "moduleName": "./src/lib/appManagers/appDocsManager.ts", - "type": "cjs require", - "userRequest": "./appPhotosManager", - "loc": "20:43-72" - }, - { - "moduleId": 18, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "module": "./src/components/wrappers.ts", - "moduleName": "./src/components/wrappers.ts", - "type": "cjs require", - "userRequest": "../lib/appManagers/appPhotosManager", - "loc": "16:43-89" - }, - { - "moduleId": 24, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", - "type": "cjs require", - "userRequest": "./appPhotosManager", - "loc": "40:43-72" - }, - { - "moduleId": 27, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 51, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 55, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 56, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 62, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\AppInlineBotsManager.ts", - "module": "./src/lib/appManagers/AppInlineBotsManager.ts", - "moduleName": "./src/lib/appManagers/AppInlineBotsManager.ts", - "type": "cjs require", - "userRequest": "./appPhotosManager", - "loc": "14:43-72" - }, - { - "moduleId": 91, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\contacts.ts", - "module": "./src/components/sidebarLeft/contacts.ts", - "moduleName": "./src/components/sidebarLeft/contacts.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appPhotosManager", - "loc": "28:43-92" - } - ], - "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 utils_1 = require(\"../utils\");\r\nconst bin_utils_1 = require(\"../bin_utils\");\r\nconst appDownloadManager_1 = __importDefault(require(\"./appDownloadManager\"));\r\nconst userAgent_1 = require(\"../../helpers/userAgent\");\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 (photo._ == 'photoEmpty')\r\n return undefined;\r\n if (this.photos[photo.id])\r\n return Object.assign(this.photos[photo.id], photo);\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 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', type: '' };\r\n const sizes = (photo.sizes || photo.thumbs);\r\n if (sizes) {\r\n for (const photoSize of sizes) {\r\n if (!('w' in photoSize) && !('h' in photoSize))\r\n continue;\r\n bestPhotoSize = photoSize;\r\n const { 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 return bestPhotoSize;\r\n }\r\n /* public getUserPhotos(userID: number, maxID: number, limit: number) {\r\n var inputUser = appUsersManager.getUserInput(userID);\r\n return apiManager.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: any) => {\r\n appUsersManager.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 \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 let mimeType;\r\n if (isSticker) {\r\n mimeType = userAgent_1.isSafari ? 'image/png' : 'image/webp';\r\n }\r\n else {\r\n mimeType = 'image/jpeg';\r\n }\r\n const blob = new Blob([arr], { type: mimeType });\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.src = url;\r\n element.append(img);\r\n return img;\r\n }\r\n }\r\n }\r\n setAttachmentSize(photo, element, boxWidth, boxHeight, isSticker = false, dontRenderPreview = false) {\r\n const photoSize = this.choosePhotoSize(photo, boxWidth, boxHeight);\r\n //console.log('setAttachmentSize', photo, photo.sizes[0].bytes, div);\r\n const sizes = photo.sizes || photo.thumbs;\r\n const thumb = (sizes === null || sizes === void 0 ? void 0 : sizes.length) ? sizes[0] : null;\r\n if (thumb && ('bytes' in thumb)) {\r\n if ((!photo.downloaded || photo.type == 'video' || photo.type == 'gif') && !isSticker && !dontRenderPreview) {\r\n this.setAttachmentPreview(thumb.bytes, element, isSticker);\r\n }\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 = 'w' in photoSize ? photoSize.w : 100;\r\n height = 'h' in photoSize ? photoSize.h : 100;\r\n }\r\n const { 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 getPhotoDownloadOptions(photo, photoSize) {\r\n const isMyDocument = photo._ == 'document';\r\n if (!photoSize || photoSize._ == 'photoSizeEmpty') {\r\n //console.error('no photoSize by photo:', photo);\r\n throw new Error('photoSizeEmpty!');\r\n }\r\n // maybe it's a thumb\r\n const isPhoto = photoSize._ == 'photoSize' && photo.access_hash && photo.file_reference;\r\n const location = isPhoto ? {\r\n _: isMyDocument ? '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 return { dcID: photo.dc_id, location, size: isPhoto ? photoSize.size : undefined };\r\n }\r\n /* public getPhotoURL(photo: MTPhoto | MTMyDocument, photoSize: MTPhotoSize) {\r\n const downloadOptions = this.getPhotoDownloadOptions(photo, photoSize);\r\n \r\n return {url: getFileURL('photo', downloadOptions), location: downloadOptions.location};\r\n } */\r\n preloadPhoto(photoID, photoSize) {\r\n const photo = this.getPhoto(photoID);\r\n // @ts-ignore\r\n if (!photo || photo._ == 'photoEmpty') {\r\n throw new Error('preloadPhoto photoEmpty!');\r\n }\r\n if (!photoSize) {\r\n const fullWidth = this.windowW;\r\n const fullHeight = this.windowH;\r\n photoSize = this.choosePhotoSize(photo, fullWidth, fullHeight);\r\n }\r\n const cacheContext = this.getCacheContext(photo);\r\n if (cacheContext.downloaded >= ('size' in photoSize ? photoSize.size : 0) && cacheContext.url) {\r\n return Promise.resolve();\r\n }\r\n const downloadOptions = this.getPhotoDownloadOptions(photo, photoSize);\r\n const fileName = bin_utils_1.getFileNameByLocation(downloadOptions.location);\r\n let download = appDownloadManager_1.default.getDownload(fileName);\r\n if (download) {\r\n return download;\r\n }\r\n download = appDownloadManager_1.default.download(downloadOptions);\r\n download.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 return blob;\r\n });\r\n return download;\r\n }\r\n getCacheContext(photo) {\r\n return photo._ == 'document' ? this.getDocumentCachedThumb(photo.id) : photo;\r\n }\r\n getDocumentCachedThumb(docID) {\r\n var _a;\r\n return (_a = this.documentThumbsCache[docID]) !== null && _a !== void 0 ? _a : (this.documentThumbsCache[docID] = { downloaded: 0, url: '' });\r\n }\r\n getPhoto(photoID) {\r\n return utils_1.isObject(photoID) ? photoID : this.photos[photoID];\r\n }\r\n getInput(photo) {\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 savePhotoFile(photo) {\r\n const fullPhotoSize = this.choosePhotoSize(photo, 0xFFFF, 0xFFFF);\r\n if (fullPhotoSize._ != 'photoSize') {\r\n return;\r\n }\r\n const location = {\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 appDownloadManager_1.default.downloadToDisc({\r\n dcID: photo.dc_id,\r\n location,\r\n size: fullPhotoSize.size,\r\n fileName: 'photo' + photo.id + '.jpg'\r\n }, 'photo' + photo.id + '.jpg');\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": 14, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "name": "./src/lib/appManagers/appSidebarLeft.ts", - "index": 85, - "index2": 90, - "size": 14086, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "./appSidebarLeft", - "loc": "20:41-68" - }, - { - "moduleId": 88, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\newChannel.ts", - "module": "./src/components/sidebarLeft/newChannel.ts", - "moduleName": "./src/components/sidebarLeft/newChannel.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appSidebarLeft", - "loc": "27:38-85" - }, - { - "moduleId": 90, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\addMembers.ts", - "module": "./src/components/sidebarLeft/addMembers.ts", - "moduleName": "./src/components/sidebarLeft/addMembers.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appSidebarLeft", - "loc": "28:38-85" - }, - { - "moduleId": 91, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\contacts.ts", - "module": "./src/components/sidebarLeft/contacts.ts", - "moduleName": "./src/components/sidebarLeft/contacts.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appSidebarLeft", - "loc": "29:38-85" - }, - { - "moduleId": 92, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\newGroup.ts", - "module": "./src/components/sidebarLeft/newGroup.ts", - "moduleName": "./src/components/sidebarLeft/newGroup.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appSidebarLeft", - "loc": "28:38-85" - }, - { - "moduleId": 93, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\settings.ts", - "module": "./src/components/sidebarLeft/settings.ts", - "moduleName": "./src/components/sidebarLeft/settings.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appSidebarLeft", - "loc": "28:38-85" - }, - { - "moduleId": 94, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\editProfile.ts", - "module": "./src/components/sidebarLeft/editProfile.ts", - "moduleName": "./src/components/sidebarLeft/editProfile.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appSidebarLeft", - "loc": "9:41-88" - }, - { - "moduleId": 95, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\chatFolders.ts", - "module": "./src/components/sidebarLeft/chatFolders.ts", - "moduleName": "./src/components/sidebarLeft/chatFolders.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appSidebarLeft", - "loc": "12:41-88" - }, - { - "moduleId": 96, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\editFolder.ts", - "module": "./src/components/sidebarLeft/editFolder.ts", - "moduleName": "./src/components/sidebarLeft/editFolder.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appSidebarLeft", - "loc": "25:38-85" - }, - { - "moduleId": 97, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\includedChats.ts", - "module": "./src/components/sidebarLeft/includedChats.ts", - "moduleName": "./src/components/sidebarLeft/includedChats.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appSidebarLeft", - "loc": "26:38-85" - } - ], - "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.AppSidebarLeft = void 0;\r\n//import { logger } from \"../polyfill\";\r\nconst appDialogsManager_1 = __importStar(require(\"./appDialogsManager\"));\r\nconst utils_1 = require(\"../utils\");\r\nconst appImManager_1 = __importDefault(require(\"./appImManager\"));\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 avatar_1 = __importDefault(require(\"../../components/avatar\"));\r\nconst newChannel_1 = __importDefault(require(\"../../components/sidebarLeft/newChannel\"));\r\nconst addMembers_1 = __importDefault(require(\"../../components/sidebarLeft/addMembers\"));\r\nconst contacts_1 = __importDefault(require(\"../../components/sidebarLeft/contacts\"));\r\nconst newGroup_1 = __importDefault(require(\"../../components/sidebarLeft/newGroup\"));\r\nconst settings_1 = __importDefault(require(\"../../components/sidebarLeft/settings\"));\r\nconst editProfile_1 = __importDefault(require(\"../../components/sidebarLeft/editProfile\"));\r\nconst chatFolders_1 = __importDefault(require(\"../../components/sidebarLeft/chatFolders\"));\r\nconst editFolder_1 = __importDefault(require(\"../../components/sidebarLeft/editFolder\"));\r\nconst includedChats_1 = __importDefault(require(\"../../components/sidebarLeft/includedChats\"));\r\nconst slider_1 = __importDefault(require(\"../../components/slider\"));\r\nconst searchInput_1 = __importDefault(require(\"../../components/searchInput\"));\r\nconst appStateManager_1 = __importDefault(require(\"./appStateManager\"));\r\nconst appChatsManager_1 = __importDefault(require(\"./appChatsManager\"));\r\navatar_1.default;\r\nconst newChannelTab = new newChannel_1.default();\r\nconst addMembersTab = new addMembers_1.default();\r\nconst contactsTab = new contacts_1.default();\r\nconst newGroupTab = new newGroup_1.default();\r\nconst settingsTab = new settings_1.default();\r\nconst editProfileTab = new editProfile_1.default();\r\nconst chatFoldersTab = new chatFolders_1.default();\r\nconst editFolderTab = new editFolder_1.default();\r\nconst includedChatsTab = new includedChats_1.default();\r\nlet AppSidebarLeft = /** @class */ (() => {\r\n class AppSidebarLeft extends slider_1.default {\r\n constructor() {\r\n super(document.getElementById('column-left'), {\r\n [AppSidebarLeft.SLIDERITEMSIDS.archived]: appDialogsManager_1.archivedTab,\r\n [AppSidebarLeft.SLIDERITEMSIDS.newChannel]: newChannelTab,\r\n [AppSidebarLeft.SLIDERITEMSIDS.contacts]: contactsTab,\r\n [AppSidebarLeft.SLIDERITEMSIDS.addMembers]: addMembersTab,\r\n [AppSidebarLeft.SLIDERITEMSIDS.newGroup]: newGroupTab,\r\n [AppSidebarLeft.SLIDERITEMSIDS.settings]: settingsTab,\r\n [AppSidebarLeft.SLIDERITEMSIDS.editProfile]: editProfileTab,\r\n [AppSidebarLeft.SLIDERITEMSIDS.chatFolders]: chatFoldersTab,\r\n [AppSidebarLeft.SLIDERITEMSIDS.editFolder]: editFolderTab,\r\n [AppSidebarLeft.SLIDERITEMSIDS.includedChats]: includedChatsTab,\r\n });\r\n this.buttons = {};\r\n this.newButtons = {};\r\n //private log = logger('SL');\r\n this.searchGroups = {\r\n //saved: new SearchGroup('', 'contacts'),\r\n contacts: new appSearch_1.SearchGroup('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 // peerIDs\r\n this.recentSearch = [];\r\n this.recentSearchLoaded = false;\r\n this.searchInput = new searchInput_1.default('Telegram Search');\r\n this.sidebarEl.querySelector('.item-main .sidebar-header').append(this.searchInput.container);\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.archivedTab = appDialogsManager_1.archivedTab;\r\n this.newChannelTab = newChannelTab;\r\n this.addMembersTab = addMembersTab;\r\n this.contactsTab = contactsTab;\r\n this.newGroupTab = newGroupTab;\r\n this.settingsTab = settingsTab;\r\n this.editProfileTab = editProfileTab;\r\n this.chatFoldersTab = chatFoldersTab;\r\n this.editFolderTab = editFolderTab;\r\n this.includedChatsTab = includedChatsTab;\r\n this.menuEl = this.toolsBtn.querySelector('.btn-menu');\r\n this.newBtnMenu = this.sidebarEl.querySelector('#new-menu');\r\n this.globalSearch = new appSearch_1.default(this.searchContainer, this.searchInput, this.searchGroups, (count) => {\r\n if (!count && !this.searchInput.value.trim()) {\r\n this.globalSearch.reset();\r\n this.searchGroups.people.setActive();\r\n this.renderRecentSearch();\r\n }\r\n });\r\n this.searchContainer.addEventListener('click', (e) => {\r\n const target = utils_1.findUpTag(e.target, 'LI');\r\n if (!target) {\r\n return;\r\n }\r\n const searchGroup = utils_1.findUpClassName(target, 'search-group');\r\n if (!searchGroup || searchGroup.classList.contains('search-group-recent') || searchGroup.classList.contains('search-group-people')) {\r\n return;\r\n }\r\n const peerID = +target.getAttribute('data-peerID');\r\n if (this.recentSearch[0] != peerID) {\r\n this.recentSearch.findAndSplice(p => p == peerID);\r\n this.recentSearch.unshift(peerID);\r\n if (this.recentSearch.length > 20) {\r\n this.recentSearch.length = 20;\r\n }\r\n this.renderRecentSearch();\r\n appStateManager_1.default.pushToState('recentSearch', this.recentSearch);\r\n for (const peerID of this.recentSearch) {\r\n appStateManager_1.default.pushPeer(peerID);\r\n }\r\n clearRecentSearchBtn.style.display = '';\r\n }\r\n }, { capture: true });\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 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(AppSidebarLeft.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', (e) => {\r\n this.settingsTab.fillElements();\r\n this.selectTab(AppSidebarLeft.SLIDERITEMSIDS.settings);\r\n });\r\n let firstTime = true;\r\n this.searchInput.input.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 if (firstTime) {\r\n this.searchGroups.people.setActive();\r\n this.renderRecentSearch();\r\n firstTime = false;\r\n }\r\n /* this.searchInput.addEventListener('blur', (e) => {\r\n if(!this.searchInput.value) {\r\n this.toolsBtn.classList.add('active');\r\n this.backBtn.classList.remove('active');\r\n this.backBtn.click();\r\n }\r\n }, {once: true}); */\r\n });\r\n this.backBtn.addEventListener('click', (e) => {\r\n //appDialogsManager.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 firstTime = true;\r\n setTimeout(() => {\r\n this.searchContainer.classList.add('hide');\r\n this.globalSearch.reset();\r\n }, 150);\r\n });\r\n this.newButtons.channel.addEventListener('click', (e) => {\r\n this.selectTab(AppSidebarLeft.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 appUsersManager_1.default.getTopPeers().then(peers => {\r\n //console.log('got top categories:', categories);\r\n peers.forEach((peerID) => {\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 this.renderRecentSearch();\r\n const clearRecentSearchBtn = this.recentSearchClearBtn = document.createElement('button');\r\n clearRecentSearchBtn.classList.add('btn-icon', 'tgico-close');\r\n this.searchGroups.recent.nameEl.append(clearRecentSearchBtn);\r\n clearRecentSearchBtn.addEventListener('click', () => {\r\n this.recentSearch = [];\r\n appStateManager_1.default.pushToState('recentSearch', this.recentSearch);\r\n this.renderRecentSearch(false);\r\n clearRecentSearchBtn.style.display = 'none';\r\n });\r\n }\r\n renderRecentSearch(setActive = true) {\r\n appStateManager_1.default.getState().then(state => {\r\n if (state && !this.recentSearchLoaded && Array.isArray(state.recentSearch)) {\r\n this.recentSearch = state.recentSearch;\r\n this.recentSearchLoaded = true;\r\n }\r\n this.searchGroups.recent.list.innerHTML = '';\r\n this.recentSearchClearBtn.style.display = this.recentSearch.length ? '' : 'none';\r\n this.recentSearch.slice(0, 20).forEach(peerID => {\r\n let { dialog, dom } = appDialogsManager_1.default.addDialog(peerID, this.searchGroups.recent.list, false, true, false, true);\r\n dom.lastMessageSpan.innerText = peerID > 0 ? appUsersManager_1.default.getUserStatusString(peerID) : appChatsManager_1.default.getChatMembersString(peerID);\r\n });\r\n if (setActive) {\r\n this.searchGroups.recent.setActive();\r\n }\r\n });\r\n }\r\n }\r\n AppSidebarLeft.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 chatFolders: 8,\r\n editFolder: 9,\r\n includedChats: 10,\r\n };\r\n return AppSidebarLeft;\r\n})();\r\nexports.AppSidebarLeft = AppSidebarLeft;\r\nconst appSidebarLeft = new AppSidebarLeft();\r\n// @ts-ignore\r\nif (process.env.NODE_ENV != 'production') {\r\n window.appSidebarLeft = appSidebarLeft;\r\n}\r\nexports.default = appSidebarLeft;\r\n" - }, - { - "id": 15, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\animationIntersector.ts", - "name": "./src/components/animationIntersector.ts", - "index": 36, - "index2": 28, - "size": 5352, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "../../components/animationIntersector", - "loc": "37:47-95" - }, - { - "moduleId": 18, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "module": "./src/components/wrappers.ts", - "moduleName": "./src/components/wrappers.ts", - "type": "cjs require", - "userRequest": "./animationIntersector", - "loc": "28:47-80" - }, - { - "moduleId": 20, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\lottieLoader.ts", - "module": "./src/lib/lottieLoader.ts", - "moduleName": "./src/lib/lottieLoader.ts", - "type": "cjs require", - "userRequest": "../components/animationIntersector", - "loc": "18:47-92" - }, - { - "moduleId": 47, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\index.ts", - "module": "./src/components/emoticonsDropdown/index.ts", - "moduleName": "./src/components/emoticonsDropdown/index.ts", - "type": "cjs require", - "userRequest": "../animationIntersector", - "loc": "21:47-81" - }, - { - "moduleId": 61, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popupStickers.ts", - "module": "./src/components/popupStickers.ts", - "moduleName": "./src/components/popupStickers.ts", - "type": "cjs require", - "userRequest": "./animationIntersector", - "loc": "13:47-80" - }, - { - "moduleId": 63, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\gifsMasonry.ts", - "module": "./src/components/gifsMasonry.ts", - "moduleName": "./src/components/gifsMasonry.ts", - "type": "cjs require", - "userRequest": "./animationIntersector", - "loc": "20:47-80" - }, - { - "moduleId": 85, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\stickers.ts", - "module": "./src/components/sidebarRight/stickers.ts", - "moduleName": "./src/components/sidebarRight/stickers.ts", - "type": "cjs require", - "userRequest": "../animationIntersector", - "loc": "32:47-81" - }, - { - "moduleId": 87, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\gifs.ts", - "module": "./src/components/sidebarRight/gifs.ts", - "moduleName": "./src/components/sidebarRight/gifs.ts", - "type": "cjs require", - "userRequest": "../animationIntersector", - "loc": "36:47-81" - }, - { - "moduleId": 102, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\stickers.ts", - "module": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "type": "cjs require", - "userRequest": "../../animationIntersector", - "loc": "46:47-84" - } - ], - "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.AnimationIntersector = void 0;\r\nconst utils_1 = require(\"../lib/utils\");\r\nconst lottieLoader_1 = require(\"../lib/lottieLoader\");\r\n;\r\nclass AnimationIntersector {\r\n constructor() {\r\n this.visible = new Set();\r\n this.byGroups = {};\r\n this.lockedGroups = {};\r\n this.intersectionLockedGroups = {};\r\n this.observer = new IntersectionObserver((entries) => {\r\n if (utils_1.$rootScope.idle.isIDLE)\r\n return;\r\n for (const entry of entries) {\r\n const target = entry.target;\r\n for (const group in this.byGroups) {\r\n if (this.intersectionLockedGroups[group]) {\r\n continue;\r\n }\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 if (player.animation instanceof lottieLoader_1.RLottiePlayer /* && player.animation.cachingDelta == 2 */) {\r\n //console.warn('will clear cache', player);\r\n player.animation.clearCache();\r\n }\r\n }\r\n break;\r\n }\r\n }\r\n }\r\n });\r\n }\r\n getAnimations(element) {\r\n const found = [];\r\n for (const group in this.byGroups) {\r\n for (const player of this.byGroups[group]) {\r\n if (player.el == element) {\r\n found.push(player);\r\n }\r\n }\r\n }\r\n return found;\r\n }\r\n addAnimation(animation, group = '') {\r\n var _a;\r\n const player = {\r\n el: animation instanceof lottieLoader_1.RLottiePlayer ? animation.el : animation,\r\n animation: animation,\r\n group\r\n };\r\n ((_a = this.byGroups[group]) !== null && _a !== void 0 ? _a : (this.byGroups[group] = [])).push(player);\r\n this.observer.observe(player.el);\r\n }\r\n checkAnimations(blurred, group, destroy = false) {\r\n if (utils_1.$rootScope.idle.isIDLE)\r\n return;\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 });\r\n }\r\n }\r\n checkAnimation(player, blurred = false, destroy = false) {\r\n const { el, animation, group } = player;\r\n //return;\r\n if ((destroy || (!utils_1.isInDOM(el) && !this.lockedGroups[group])) /* && false */) {\r\n //console.log('destroy animation');\r\n animation.remove();\r\n if (animation instanceof HTMLVideoElement) {\r\n animation.src = '';\r\n animation.load();\r\n }\r\n for (const group in this.byGroups) {\r\n this.byGroups[group].findAndSplice(p => p == player);\r\n }\r\n this.observer.unobserve(el);\r\n this.visible.delete(player);\r\n return;\r\n }\r\n if (blurred) {\r\n if (!animation.paused) {\r\n //console.warn('pause animation:', animation);\r\n animation.pause();\r\n }\r\n }\r\n else if (animation.paused && this.visible.has(player) && animation.autoplay) {\r\n //console.warn('play animation:', animation);\r\n animation.play();\r\n }\r\n }\r\n lockGroup(group) {\r\n this.lockedGroups[group] = true;\r\n }\r\n unlockGroup(group) {\r\n delete this.lockedGroups[group];\r\n this.checkAnimations(undefined, group);\r\n }\r\n refreshGroup(group) {\r\n const animations = this.byGroups[group];\r\n if (animations && animations.length) {\r\n animations.forEach(animation => {\r\n this.observer.unobserve(animation.el);\r\n });\r\n window.requestAnimationFrame(() => {\r\n animations.forEach(animation => {\r\n this.observer.observe(animation.el);\r\n });\r\n });\r\n }\r\n }\r\n lockIntersectionGroup(group) {\r\n this.intersectionLockedGroups[group] = true;\r\n }\r\n unlockIntersectionGroup(group) {\r\n delete this.intersectionLockedGroups[group];\r\n this.refreshGroup(group);\r\n }\r\n}\r\nexports.AnimationIntersector = AnimationIntersector;\r\nconst animationIntersector = new AnimationIntersector();\r\n// @ts-ignore\r\nif (process.env.NODE_ENV == 'development') {\r\n window.animationIntersector = animationIntersector;\r\n}\r\nexports.default = animationIntersector;\r\n" - }, - { - "id": 16, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts", - "name": "./src/lib/appManagers/appDialogsManager.ts", - "index": 57, - "index2": 54, - "size": 49292, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "./appDialogsManager", - "loc": "14:44-74" - }, - { - "moduleId": 14, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "module": "./src/lib/appManagers/appSidebarLeft.ts", - "moduleName": "./src/lib/appManagers/appSidebarLeft.ts", - "type": "cjs require", - "userRequest": "./appDialogsManager", - "loc": "27:41-71" - }, - { - "moduleId": 43, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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" - }, - { - "moduleId": 51, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 86, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\pollResults.ts", - "module": "./src/components/sidebarRight/pollResults.ts", - "moduleName": "./src/components/sidebarRight/pollResults.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appDialogsManager", - "loc": "30:44-94" - }, - { - "moduleId": 91, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\contacts.ts", - "module": "./src/components/sidebarLeft/contacts.ts", - "moduleName": "./src/components/sidebarLeft/contacts.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appDialogsManager", - "loc": "26:44-94" - }, - { - "moduleId": 92, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\newGroup.ts", - "module": "./src/components/sidebarLeft/newGroup.ts", - "moduleName": "./src/components/sidebarLeft/newGroup.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appDialogsManager", - "loc": "30:44-94" - }, - { - "moduleId": 96, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\editFolder.ts", - "module": "./src/components/sidebarLeft/editFolder.ts", - "moduleName": "./src/components/sidebarLeft/editFolder.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appDialogsManager", - "loc": "29:44-94" - }, - { - "moduleId": 97, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\includedChats.ts", - "module": "./src/components/sidebarLeft/includedChats.ts", - "moduleName": "./src/components/sidebarLeft/includedChats.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appDialogsManager", - "loc": "27:44-94" - } - ], - "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 = exports.archivedTab = exports.AppArchivedTab = 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 logger_1 = require(\"../logger\");\r\nconst appChatsManager_1 = __importDefault(require(\"./appChatsManager\"));\r\nconst avatar_1 = __importDefault(require(\"../../components/avatar\"));\r\nconst popup_1 = require(\"../../components/popup\");\r\nconst appStateManager_1 = __importDefault(require(\"./appStateManager\"));\r\nconst config_1 = require(\"../config\");\r\nconst horizontalMenu_1 = require(\"../../components/horizontalMenu\");\r\nconst ripple_1 = require(\"../../components/ripple\");\r\nconst testScroll = false;\r\n//const USEPINNEDDELIMITER = false;\r\nclass DialogsContextMenu {\r\n constructor() {\r\n this.element = document.getElementById('dialogs-contextmenu');\r\n this.buttons = {};\r\n this.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 if (e instanceof MouseEvent)\r\n e.preventDefault();\r\n if (this.element.classList.contains('active')) {\r\n return false;\r\n }\r\n if (e instanceof MouseEvent)\r\n e.cancelBubble = true;\r\n this.filterID = appDialogsManager.filterID;\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 = !!dialog.pFlags?.pinned;\r\n const condition = this.filterID > 1 ? appMessagesManager_1.default.filtersStorage.filters[this.filterID].pinned_peers.includes(dialog.peerID) : !!((_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 misc_1.parseMenuButtonsTo(this.buttons, this.element.children);\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, this.filterID);\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 const dialog = appMessagesManager_1.default.getDialogByPeerID(this.selectedID)[0];\r\n if (!dialog)\r\n return;\r\n if (dialog.unread_count) {\r\n appMessagesManager_1.default.readHistory(this.selectedID, dialog.top_message);\r\n appMessagesManager_1.default.markDialogUnread(this.selectedID, true);\r\n }\r\n else {\r\n appMessagesManager_1.default.markDialogUnread(this.selectedID);\r\n }\r\n });\r\n this.buttons.delete.addEventListener('click', () => {\r\n let firstName = appPeersManager_1.default.getPeerTitle(this.selectedID, false, true);\r\n let callbackFlush = (justClear) => {\r\n appMessagesManager_1.default.flushHistory(this.selectedID, justClear);\r\n };\r\n let callbackLeave = () => {\r\n appChatsManager_1.default.leaveChannel(-this.selectedID);\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: callbackLeave\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: callbackLeave\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 ${firstName}?`;\r\n buttons = [{\r\n text: 'DELETE FOR ME AND ' + firstName,\r\n isDanger: true,\r\n callback: () => callbackFlush(false)\r\n }, {\r\n text: 'DELETE JUST FOR ME',\r\n isDanger: true,\r\n callback: () => callbackFlush(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: () => callbackFlush(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 ${firstName}?`;\r\n buttons = [{\r\n text: 'DELETE AND LEAVE ' + firstName,\r\n isDanger: true,\r\n callback: () => callbackFlush(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 AppArchivedTab {\r\n constructor() {\r\n this.container = document.getElementById('chats-archived-container');\r\n this.chatList = document.getElementById('dialogs-archived');\r\n this.scroll = null;\r\n }\r\n init() {\r\n this.scroll = new scrollable_new_1.default(this.container, 'y', 'CLA', this.chatList, 500);\r\n this.scroll.setVirtualContainer(this.chatList);\r\n this.scroll.onScrolledBottom = appDialogsManager.onChatsScroll;\r\n ///this.scroll.attachSentinels();\r\n appDialogsManager.setListClickListener(this.chatList, null, true);\r\n window.addEventListener('resize', () => {\r\n setTimeout(appDialogsManager.onChatsScroll, 0);\r\n });\r\n }\r\n onOpen() {\r\n if (this.init) {\r\n this.init();\r\n this.init = null;\r\n }\r\n this.wasFilterID = appDialogsManager.filterID;\r\n appDialogsManager.scroll = this.scroll;\r\n appDialogsManager.filterID = 1;\r\n appDialogsManager.onTabChange();\r\n }\r\n // вообще, так делать нельзя, но нет времени чтобы переделать главный чатлист на слайд...\r\n onOpenAfterTimeout() {\r\n appDialogsManager.chatLists[this.wasFilterID].innerHTML = '';\r\n }\r\n onClose() {\r\n appDialogsManager.scroll = appDialogsManager._scroll;\r\n appDialogsManager.filterID = this.wasFilterID;\r\n appDialogsManager.onTabChange();\r\n }\r\n onCloseAfterTimeout() {\r\n this.chatList.innerHTML = '';\r\n }\r\n}\r\nexports.AppArchivedTab = AppArchivedTab;\r\nexports.archivedTab = new AppArchivedTab();\r\nclass AppDialogsManager {\r\n constructor() {\r\n this._chatList = document.getElementById('dialogs');\r\n this.chatList = this._chatList;\r\n //public pinnedDelimiter: HTMLDivElement;\r\n this.doms = {};\r\n this.lastActiveListElement = null;\r\n /* private rippleCallback: (value?: boolean | PromiseLike) => void = null;\r\n private lastClickID = 0;\r\n private lastGoodClickID = 0; */\r\n this.chatsContainer = document.getElementById('chats-container');\r\n this.loadedAll = false;\r\n this.scroll = null;\r\n this._scroll = null;\r\n this.log = logger_1.logger('DIALOGS', logger_1.LogLevels.log | logger_1.LogLevels.error | logger_1.LogLevels.warn | logger_1.LogLevels.debug);\r\n this.contextMenu = new DialogsContextMenu();\r\n this.chatLists = {\r\n 0: this.chatList,\r\n 1: exports.archivedTab.chatList\r\n };\r\n this.filterID = 0;\r\n this.folders = {\r\n menu: document.getElementById('folders-tabs'),\r\n menuScrollContainer: null,\r\n container: document.getElementById('folders-container')\r\n };\r\n this.filtersRendered = {};\r\n this.onTabChange = () => {\r\n this.doms = {};\r\n this.loadedAll = false;\r\n this.lastActiveListElement = null;\r\n this.chatList = this.chatLists[this.filterID];\r\n this.loadDialogs(this.filterID);\r\n };\r\n this.onChatsScroll = () => {\r\n if (this.loadedAll || this.loadDialogsPromise)\r\n return;\r\n this.log('onChatsScroll');\r\n this.loadDialogs(this.filterID);\r\n };\r\n this.chatsPreloader = misc_1.putPreloader(null, true);\r\n this.allUnreadCount = this.folders.menu.querySelector('.unread-count');\r\n /* if(USEPINNEDDELIMITER) {\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 } */\r\n this.folders.menuScrollContainer = this.folders.menu.parentElement;\r\n this.scroll = this._scroll = new scrollable_new_1.default(this.chatsContainer, 'y', 'CL', this.chatList, 500);\r\n this.scroll.onScrolledBottom = this.onChatsScroll;\r\n this.scroll.setVirtualContainer(this.chatList);\r\n //this.scroll.attachSentinels();\r\n if (config_1.touchSupport && config_1.isSafari) {\r\n let allowUp, allowDown, slideBeginY;\r\n const container = this.scroll.container;\r\n container.addEventListener('touchstart', (event) => {\r\n allowUp = container.scrollTop > 0;\r\n allowDown = (container.scrollTop < container.scrollHeight - container.clientHeight);\r\n // @ts-ignore\r\n slideBeginY = event.pageY;\r\n });\r\n container.addEventListener('touchmove', (event) => {\r\n var up = (event.pageY > slideBeginY);\r\n var down = (event.pageY < slideBeginY);\r\n slideBeginY = event.pageY;\r\n if ((up && allowUp) || (down && allowDown)) {\r\n event.stopPropagation();\r\n }\r\n else if (up || down) {\r\n event.preventDefault();\r\n }\r\n });\r\n }\r\n this.setListClickListener(this.chatList, null, true);\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 = `

${i}18:33

-_-_-_-: qweasd

`;\r\n i++;\r\n this.scroll.append(li);\r\n };\r\n for(let i = 0; i < 100; ++i) {\r\n add();\r\n }\r\n (window as any).addElement = add;\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 (utils_1.$rootScope.selectedPeerID == 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 this.setFiltersUnreadCount();\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 this.validateForFilter();\r\n this.setFiltersUnreadCount();\r\n }\r\n });\r\n utils_1.$rootScope.$on('dialogs_multiupdate', (e) => {\r\n const dialogs = e.detail;\r\n for (const id in dialogs) {\r\n const dialog = dialogs[id];\r\n this.updateDialog(dialog);\r\n }\r\n //this.setPinnedDelimiter();\r\n this.validateForFilter();\r\n this.setFiltersUnreadCount();\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 this.scroll.reorder();\r\n }\r\n this.setFiltersUnreadCount();\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 == utils_1.$rootScope.selectedPeerID) {\r\n appImManager_1.default.updateUnreadByDialog(dialog);\r\n }\r\n this.validateForFilter();\r\n this.setFiltersUnreadCount();\r\n }\r\n });\r\n utils_1.$rootScope.$on('dialog_notify_settings', e => {\r\n const dialog = appMessagesManager_1.default.getDialogByPeerID(e.detail)[0];\r\n if (dialog) {\r\n this.setUnreadMessages(dialog); // возможно это не нужно, но нужно менять is-muted\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 utils_1.$rootScope.$on('filter_update', (e) => {\r\n const filter = e.detail;\r\n if (!this.filtersRendered[filter.id]) {\r\n this.addFilter(filter);\r\n return;\r\n }\r\n else if (filter.id == this.filterID) { // это нет тут смысла вызывать, так как будет dialogs_multiupdate\r\n //this.validateForFilter();\r\n const folder = appMessagesManager_1.default.dialogsStorage.getFolder(filter.id);\r\n this.validateForFilter();\r\n for (let i = 0, length = folder.length; i < length; ++i) {\r\n const dialog = folder[i];\r\n this.updateDialog(dialog);\r\n }\r\n this.setFiltersUnreadCount();\r\n }\r\n const elements = this.filtersRendered[filter.id];\r\n elements.title.innerHTML = richtextprocessor_1.RichTextProcessor.wrapEmojiText(filter.title);\r\n });\r\n utils_1.$rootScope.$on('filter_delete', (e) => {\r\n const filter = e.detail;\r\n const elements = this.filtersRendered[filter.id];\r\n if (!elements)\r\n return;\r\n // set tab\r\n //(this.folders.menu.firstElementChild.children[Math.max(0, filter.id - 2)] as HTMLElement).click();\r\n this.folders.menu.firstElementChild.children[0].click();\r\n elements.container.remove();\r\n elements.menu.remove();\r\n delete this.chatLists[filter.id];\r\n delete this.filtersRendered[filter.id];\r\n if (!Object.keys(this.filtersRendered).length) {\r\n this.folders.menuScrollContainer.classList.add('hide');\r\n }\r\n });\r\n /* $rootScope.$on('filter_pinned_order', (e) => {\r\n const {order, id} = e.detail as {order: number[], id: number};\r\n if(this.prevTabID != id) {\r\n return;\r\n }\r\n \r\n for(const peerID of order) {\r\n this.updateDialog(appMessagesManager.getDialogByPeerID(peerID)[0]);\r\n }\r\n }); */\r\n new scrollable_new_1.default(this.folders.menuScrollContainer, 'x');\r\n this.chatsContainer.prepend(this.folders.menuScrollContainer);\r\n const selectTab = horizontalMenu_1.horizontalMenu(this.folders.menu, this.folders.container, (id, tabContent) => {\r\n /* if(id != 0) {\r\n id += 1;\r\n } */\r\n id = +tabContent.dataset.filterID || 0;\r\n if (this.filterID == id)\r\n return;\r\n this.chatLists[id].innerHTML = '';\r\n this.scroll.setVirtualContainer(this.chatLists[id]);\r\n this.filterID = id;\r\n this.onTabChange();\r\n }, () => {\r\n for (const folderID in this.chatLists) {\r\n if (+folderID != this.filterID) {\r\n this.chatLists[folderID].innerHTML = '';\r\n }\r\n }\r\n });\r\n //selectTab(0);\r\n this.folders.menu.firstElementChild.firstElementChild.click();\r\n /* false && */ appStateManager_1.default.loadSavedState().then(() => {\r\n return appMessagesManager_1.default.filtersStorage.getDialogFilters();\r\n }).then(filters => {\r\n for (const filterID in filters) {\r\n this.addFilter(filters[filterID]);\r\n }\r\n return this.loadDialogs(this.filterID);\r\n }).then(result => {\r\n //this.setPinnedDelimiter();\r\n //appSidebarLeft.onChatsScroll();\r\n this.loadDialogs(1);\r\n });\r\n }\r\n updateDialog(dialog) {\r\n if (!dialog) {\r\n return;\r\n }\r\n if (!this.doms.hasOwnProperty(dialog.peerID)) {\r\n this.addDialog(dialog);\r\n }\r\n if (this.getDialogDom(dialog.peerID)) {\r\n this.setLastMessage(dialog);\r\n this.setDialogPosition(dialog);\r\n }\r\n }\r\n setFilterUnreadCount(filterID, folder) {\r\n var _a;\r\n const unreadSpan = filterID == 0 ? this.allUnreadCount : (_a = this.filtersRendered[filterID]) === null || _a === void 0 ? void 0 : _a.unread;\r\n if (!unreadSpan) {\r\n return;\r\n }\r\n folder = folder || appMessagesManager_1.default.dialogsStorage.getFolder(filterID);\r\n const sum = folder.reduce((acc, dialog) => acc + +!!dialog.unread_count, 0);\r\n unreadSpan.innerText = sum ? '' + sum : '';\r\n }\r\n setFiltersUnreadCount() {\r\n for (const filterID in this.filtersRendered) {\r\n this.setFilterUnreadCount(+filterID);\r\n }\r\n this.setFilterUnreadCount(0);\r\n }\r\n /**\r\n * Удалит неподходящие чаты из списка, но не добавит их(!)\r\n */\r\n validateForFilter() {\r\n // !WARNING, возможно это было зачем-то, но комментарий исправил архивирование\r\n //if(this.filterID == 0) return;\r\n const folder = appMessagesManager_1.default.dialogsStorage.getFolder(this.filterID);\r\n let affected = false;\r\n for (const _peerID in this.doms) {\r\n const peerID = +_peerID;\r\n // если больше не подходит по фильтру, удаляем\r\n if (folder.findIndex((dialog) => dialog.peerID == peerID) === -1) {\r\n const listEl = this.doms[peerID].listEl;\r\n listEl.remove();\r\n affected = true;\r\n if (this.lastActiveListElement == listEl) {\r\n this.lastActiveListElement = null;\r\n }\r\n }\r\n }\r\n if (affected) {\r\n this.scroll.reorder();\r\n }\r\n }\r\n addFilter(filter) {\r\n if (this.filtersRendered[filter.id])\r\n return;\r\n const li = document.createElement('li');\r\n const span = document.createElement('span');\r\n const titleSpan = document.createElement('span');\r\n titleSpan.innerHTML = richtextprocessor_1.RichTextProcessor.wrapEmojiText(filter.title);\r\n const unreadSpan = document.createElement('span');\r\n unreadSpan.classList.add('unread-count');\r\n const i = document.createElement('i');\r\n span.append(titleSpan, unreadSpan, i);\r\n li.append(span);\r\n ripple_1.ripple(li);\r\n const containerToAppend = this.folders.menu.firstElementChild;\r\n utils_1.positionElementByIndex(li, containerToAppend, filter.orderIndex + 1); // because 0 is All\r\n //containerToAppend.append(li);\r\n const ul = document.createElement('ul');\r\n const div = document.createElement('div');\r\n div.append(ul);\r\n div.dataset.filterID = '' + filter.id;\r\n //this.folders.container.append(div);\r\n utils_1.positionElementByIndex(div, this.folders.container, filter.orderIndex + 1); // because 0 is All\r\n this.chatLists[filter.id] = ul;\r\n this.setListClickListener(ul, null, true);\r\n if (!this.showFiltersTimeout) {\r\n this.showFiltersTimeout = window.setTimeout(() => {\r\n this.showFiltersTimeout = 0;\r\n this.folders.menuScrollContainer.classList.remove('hide');\r\n this.setFiltersUnreadCount();\r\n }, 0);\r\n }\r\n this.filtersRendered[filter.id] = {\r\n menu: li,\r\n container: div,\r\n unread: unreadSpan,\r\n title: titleSpan\r\n };\r\n }\r\n loadDialogs(folderID) {\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 if (!this.chatList.childElementCount) {\r\n const container = this.chatList.parentElement;\r\n container.append(this.chatsPreloader);\r\n }\r\n //return;\r\n const storage = appMessagesManager_1.default.dialogsStorage.getFolder(folderID);\r\n let offsetIndex = 0;\r\n for (let i = storage.length - 1; i >= 0; --i) {\r\n const 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 const loadCount = 50 /*this.chatsLoadCount */;\r\n const getConversationPromise = (this.filterID > 1 ? appUsersManager_1.default.getContacts() : Promise.resolve()).then(() => {\r\n return appMessagesManager_1.default.getConversations('', offsetIndex, loadCount, folderID);\r\n });\r\n this.loadDialogsPromise = getConversationPromise;\r\n const result = yield getConversationPromise;\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 || this.chatList.childElementCount == result.count) { // loaded all\r\n this.loadedAll = true;\r\n }\r\n this.log.debug('getDialogs ' + loadCount + ' dialogs by offset:', offsetIndex, result, this.chatList.childElementCount);\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 setListClickListener(list, onFound, withContext = false) {\r\n list.addEventListener('click', (e) => {\r\n utils_1.cancelEvent(e);\r\n this.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 if (withContext) {\r\n misc_1.attachContextMenuListener(list, this.contextMenu.onContextMenu);\r\n }\r\n }\r\n setDialogPosition(dialog, pos) {\r\n const dom = this.getDialogDom(dialog.peerID);\r\n if (!dom) {\r\n return;\r\n }\r\n if (pos === undefined) {\r\n pos = appMessagesManager_1.default.dialogsStorage.getDialog(dialog.peerID, this.filterID)[1];\r\n }\r\n if (utils_1.positionElementByIndex(dom.listEl, this.chatList, pos)) {\r\n this.scroll.reorder();\r\n this.log.debug('setDialogPosition:', dialog, dom, pos);\r\n }\r\n }\r\n /* public setPinnedDelimiter() {\r\n if(!USEPINNEDDELIMITER) return;\r\n \r\n let index = -1;\r\n let dialogs = appMessagesManager.dialogsStorage.getFolder(0);\r\n for(let dialog of dialogs) {\r\n if(dialog.pFlags?.pinned) {\r\n index++;\r\n }\r\n }\r\n \r\n let currentIndex = (this.pinnedDelimiter.parentElement && whichChild(this.pinnedDelimiter.parentElement)) ?? -1;\r\n \r\n if(index == currentIndex) return;\r\n \r\n let children = this.chatList.children;\r\n \r\n let modifying: HTMLElement[] = [];\r\n if(currentIndex != -1 && children.length > currentIndex) {\r\n let li = children[currentIndex] as HTMLElement;\r\n modifying.push(li);\r\n }\r\n \r\n if(index != -1 && children.length > index) {\r\n let li = children[index] as HTMLElement;\r\n modifying.push(li);\r\n li.append(this.pinnedDelimiter);\r\n } else {\r\n this.pinnedDelimiter.remove();\r\n }\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 if (!dom) {\r\n //this.log.error('no dom for dialog:', dialog, lastMessage, dom, highlightWord);\r\n return;\r\n }\r\n }\r\n if (lastMessage._ == 'messageEmpty' || (lastMessage._ == 'messageService' && !lastMessage.rReply)) {\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] == 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 var _a;\r\n const dom = this.getDialogDom(dialog.peerID);\r\n if (dialog.folder_id == 1) {\r\n this.accumulateArchivedUnread();\r\n }\r\n if (!dom) {\r\n //this.log.error('setUnreadMessages no dom!', dialog);\r\n return;\r\n }\r\n const isMuted = (((_a = dialog.notify_settings) === null || _a === void 0 ? void 0 : _a.mute_until) * 1000) > Date.now();\r\n dom.listEl.classList.toggle('is-muted', isMuted);\r\n const 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 const 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 const filter = appMessagesManager_1.default.filtersStorage.filters[this.filterID];\r\n let isPinned;\r\n if (filter) {\r\n isPinned = filter.pinned_peers.findIndex(peerID => peerID == dialog.peerID) !== -1;\r\n }\r\n else {\r\n isPinned = !!dialog.pFlags.pinned;\r\n }\r\n if (dialog.unread_count || dialog.pFlags.unread_mark) {\r\n //dom.unreadMessagesSpan.innerText = '' + (dialog.unread_count ? formatNumber(dialog.unread_count, 1) : ' ');\r\n dom.unreadMessagesSpan.innerText = '' + (dialog.unread_count || ' ');\r\n dom.unreadMessagesSpan.classList.add(isMuted ? 'unread-muted' : 'unread');\r\n }\r\n else if (isPinned) {\r\n dom.unreadMessagesSpan.classList.remove('unread', 'unread-muted');\r\n dom.unreadMessagesSpan.classList.add('tgico-pinnedchat');\r\n }\r\n }\r\n accumulateArchivedUnread() {\r\n if (this.accumulateArchivedTimeout)\r\n return;\r\n this.accumulateArchivedTimeout = window.setTimeout(() => {\r\n this.accumulateArchivedTimeout = 0;\r\n const dialogs = appMessagesManager_1.default.dialogsStorage.getFolder(1);\r\n const sum = dialogs.reduce((acc, dialog) => acc + dialog.unread_count, 0);\r\n utils_1.$rootScope.$broadcast('dialogs_archived_unread', { count: sum });\r\n }, 0);\r\n }\r\n getDialogDom(peerID) {\r\n return this.doms[peerID];\r\n }\r\n addDialog(_dialog, container, drawStatus = true, rippleEnabled = true, onlyFirstName = false, meAsSaved = true) {\r\n var _a;\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 (!container) {\r\n if (this.doms[peerID])\r\n return;\r\n const filter = appMessagesManager_1.default.filtersStorage.filters[this.filterID];\r\n if ((filter && !appMessagesManager_1.default.filtersStorage.testDialogForFilter(dialog, filter)) || (!filter && this.filterID != dialog.folder_id)) {\r\n return;\r\n }\r\n }\r\n let title = appPeersManager_1.default.getPeerTitle(peerID, false, onlyFirstName);\r\n let avatarEl = new avatar_1.default();\r\n avatarEl.setAttribute('dialog', meAsSaved ? '1' : '0');\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 == utils_1.$rootScope.myID && meAsSaved) {\r\n title = onlyFirstName ? 'Saved' : 'Saved Messages';\r\n }\r\n titleSpan.innerHTML = title;\r\n //p.classList.add('')\r\n // в других случаях иконка верификации не нужна (а первый - это главные чатлисты)\r\n if (!container) {\r\n let peer;\r\n // for muted icon\r\n titleSpan.classList.add('tgico');\r\n if (peerID < 0) {\r\n peer = appChatsManager_1.default.getChat(-peerID);\r\n }\r\n else {\r\n peer = appUsersManager_1.default.getUser(peerID);\r\n }\r\n if ((_a = peer === null || peer === void 0 ? void 0 : peer.pFlags) === null || _a === void 0 ? void 0 : _a.verified) {\r\n titleSpan.classList.add('is-verified');\r\n const i = document.createElement('i');\r\n i.classList.add('verified-icon');\r\n titleSpan.append(i);\r\n }\r\n }\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 ripple_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 /* let good = false;\r\n for(const folderID in this.chatLists) {\r\n if(this.chatLists[folderID] == container) {\r\n good = true;\r\n }\r\n } */\r\n if (!container /* || good */) {\r\n this.scroll.append(li);\r\n this.doms[dialog.peerID] = dom;\r\n if (utils_1.$rootScope.selectedPeerID == peerID) {\r\n li.classList.add('active');\r\n this.lastActiveListElement = li;\r\n }\r\n /* if(container) {\r\n container.append(li);\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 const dom = this.getDialogDom(dialog.peerID);\r\n if (!dom) {\r\n return;\r\n }\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 const 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 const dom = this.getDialogDom(dialog.peerID);\r\n if (!dom) {\r\n return;\r\n }\r\n dom.lastMessageSpan.classList.remove('user-typing');\r\n this.setLastMessage(dialog, null, dom);\r\n }\r\n}\r\nexports.AppDialogsManager = AppDialogsManager;\r\nconst appDialogsManager = new AppDialogsManager();\r\nexports.default = appDialogsManager;\r\n" - }, - { - "id": 17, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\ripple.ts", - "name": "./src/components/ripple.ts", - "index": 60, - "index2": 52, - "size": 4833, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "issuerId": 67, - "issuerName": "./src/index.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - } - ], - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "../../components/ripple", - "loc": "41:17-51" - }, - { - "moduleId": 16, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts", - "module": "./src/lib/appManagers/appDialogsManager.ts", - "moduleName": "./src/lib/appManagers/appDialogsManager.ts", - "type": "cjs require", - "userRequest": "../../components/ripple", - "loc": "32:17-51" - }, - { - "moduleId": 36, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popup.ts", - "module": "./src/components/popup.ts", - "moduleName": "./src/components/popup.ts", - "type": "cjs require", - "userRequest": "./ripple", - "loc": "8:17-36" - }, - { - "moduleId": 58, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\poll.ts", - "module": "./src/components/poll.ts", - "moduleName": "./src/components/poll.ts", - "type": "cjs require", - "userRequest": "./ripple", - "loc": "14:17-36" - }, - { - "moduleId": 67, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "module": "./src/index.ts", - "moduleName": "./src/index.ts", - "type": "cjs require", - "userRequest": "./components/ripple", - "loc": "148:68-98" - }, - { - "moduleId": 86, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\pollResults.ts", - "module": "./src/components/sidebarRight/pollResults.ts", - "moduleName": "./src/components/sidebarRight/pollResults.ts", - "type": "cjs require", - "userRequest": "../ripple", - "loc": "31:17-37" - }, - { - "moduleId": 95, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\chatFolders.ts", - "module": "./src/components/sidebarLeft/chatFolders.ts", - "moduleName": "./src/components/sidebarLeft/chatFolders.ts", - "type": "cjs require", - "userRequest": "../ripple", - "loc": "13:17-37" - }, - { - "moduleId": 96, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\editFolder.ts", - "module": "./src/components/sidebarLeft/editFolder.ts", - "moduleName": "./src/components/sidebarLeft/editFolder.ts", - "type": "cjs require", - "userRequest": "../ripple", - "loc": "32:17-37" - }, - { - "moduleId": 107, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\search.ts", - "module": "./src/components/chat/search.ts", - "moduleName": "./src/components/chat/search.ts", - "type": "cjs require", - "userRequest": "../ripple", - "loc": "30:17-37" - } - ], - "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.ripple = void 0;\r\nconst config_1 = 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 elem.classList.add('rp');\r\n let r = document.createElement('div');\r\n r.classList.add('c-ripple');\r\n const isSquare = elem.classList.contains('rp-square');\r\n if (isSquare) {\r\n r.classList.add('is-square');\r\n }\r\n const duration = isSquare ? 200 : 700;\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 drawRipple');\r\n handler = () => {\r\n let elapsedTime = Date.now() - startTime;\r\n if (elapsedTime < duration) {\r\n let delay = Math.max(duration - elapsedTime, duration / 2);\r\n setTimeout(() => span.classList.add('hiding'), Math.max(delay - duration / 2, 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 }, duration / 2);\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 touchStartFired = false;\r\n if (config_1.touchSupport) {\r\n let touchEnd = () => {\r\n handler && handler();\r\n };\r\n elem.addEventListener('touchstart', (e) => {\r\n //console.log('ripple touchstart', e);\r\n if (e.touches.length > 1 || (e.target.tagName == 'BUTTON' && e.target != elem)) {\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 }, { passive: true });\r\n }\r\n else {\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\n}\r\nexports.ripple = ripple;\r\n" - }, - { - "id": 18, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "name": "./src/components/wrappers.ts", - "index": 69, - "index2": 66, - "size": 31712, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "../../components/wrappers", - "loc": "22:19-55" - }, - { - "moduleId": 24, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", - "type": "cjs require", - "userRequest": "../../components/wrappers", - "loc": "49:19-55" - }, - { - "moduleId": 61, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popupStickers.ts", - "module": "./src/components/popupStickers.ts", - "moduleName": "./src/components/popupStickers.ts", - "type": "cjs require", - "userRequest": "./wrappers", - "loc": "10:19-40" - }, - { - "moduleId": 63, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\gifsMasonry.ts", - "module": "./src/components/gifsMasonry.ts", - "moduleName": "./src/components/gifsMasonry.ts", - "type": "cjs require", - "userRequest": "./wrappers", - "loc": "17:19-40" - }, - { - "moduleId": 84, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\audio.ts", - "module": "./src/components/audio.ts", - "moduleName": "./src/components/audio.ts", - "type": "cjs require", - "userRequest": "./wrappers", - "loc": "9:19-40" - }, - { - "moduleId": 85, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\stickers.ts", - "module": "./src/components/sidebarRight/stickers.ts", - "moduleName": "./src/components/sidebarRight/stickers.ts", - "type": "cjs require", - "userRequest": "../wrappers", - "loc": "34:19-41" - }, - { - "moduleId": 98, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\input.ts", - "module": "./src/components/chat/input.ts", - "moduleName": "./src/components/chat/input.ts", - "type": "cjs require", - "userRequest": "../wrappers", - "loc": "13:19-41" - }, - { - "moduleId": 102, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\stickers.ts", - "module": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "type": "cjs require", - "userRequest": "../../wrappers", - "loc": "36:19-44" - }, - { - "moduleId": 105, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\audio.ts", - "module": "./src/components/chat/audio.ts", - "moduleName": "./src/components/chat/audio.ts", - "type": "cjs require", - "userRequest": "../wrappers", - "loc": "13:19-41" - } - ], - "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.wrapPoll = exports.wrapAlbum = exports.wrapReply = exports.wrapSticker = exports.wrapPhoto = exports.wrapAudio = exports.wrapDocument = exports.formatDate = exports.wrapVideo = void 0;\r\nconst appPhotosManager_1 = __importDefault(require(\"../lib/appManagers/appPhotosManager\"));\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 = __importDefault(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 config_1 = require(\"../lib/config\");\r\nconst animationIntersector_1 = __importDefault(require(\"./animationIntersector\"));\r\nconst audio_1 = __importDefault(require(\"./audio\"));\r\nconst webpWorkerController_1 = __importDefault(require(\"../lib/webp/webpWorkerController\"));\r\nconst blob_1 = require(\"../helpers/blob\");\r\nconst appMediaPlaybackController_1 = __importDefault(require(\"./appMediaPlaybackController\"));\r\nconst cancellablePromise_1 = require(\"../helpers/cancellablePromise\");\r\nfunction wrapVideo({ doc, container, message, boxWidth, boxHeight, withTail, isOut, middleware, lazyLoadQueue, noInfo, group }) {\r\n var _a, _b;\r\n if (!noInfo) {\r\n if (doc.type != 'round') {\r\n let span, spanPlay;\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 }\r\n if (doc.mime_type == 'image/gif') {\r\n return wrapPhoto(doc, message, container, boxWidth, boxHeight, withTail, isOut, lazyLoadQueue, middleware);\r\n }\r\n /* const video = doc.type == 'round' ? appMediaPlaybackController.addMedia(doc, message.mid) as HTMLVideoElement : document.createElement('video');\r\n if(video.parentElement) {\r\n video.remove();\r\n } */\r\n const video = document.createElement('video');\r\n video.muted = true;\r\n video.setAttribute('playsinline', '');\r\n if (doc.type == 'round') {\r\n //video.muted = true;\r\n const globalVideo = appMediaPlaybackController_1.default.addMedia(doc, message.mid);\r\n video.addEventListener('canplay', () => {\r\n if (globalVideo.currentTime > 0) {\r\n video.currentTime = globalVideo.currentTime;\r\n }\r\n if (!globalVideo.paused) {\r\n // с закоментированными настройками - хром выключал видео при скролле, для этого нужно было включить видео - выйти из диалога, зайти заново и проскроллить вверх\r\n /* video.autoplay = true;\r\n video.loop = false; */\r\n video.play();\r\n }\r\n }, { once: true });\r\n const clear = () => {\r\n //console.log('clearing video');\r\n globalVideo.removeEventListener('timeupdate', onTimeUpdate);\r\n globalVideo.removeEventListener('play', onGlobalPlay);\r\n globalVideo.removeEventListener('pause', onGlobalPause);\r\n video.removeEventListener('play', onVideoPlay);\r\n video.removeEventListener('pause', onVideoPause);\r\n };\r\n const onTimeUpdate = () => {\r\n if (!utils_1.isInDOM(video)) {\r\n clear();\r\n }\r\n };\r\n const onGlobalPlay = () => {\r\n video.play();\r\n };\r\n const onGlobalPause = () => {\r\n video.pause();\r\n };\r\n const onVideoPlay = () => {\r\n globalVideo.play();\r\n };\r\n const onVideoPause = () => {\r\n //console.log('video pause event');\r\n if (utils_1.isInDOM(video)) {\r\n globalVideo.pause();\r\n }\r\n else {\r\n clear();\r\n }\r\n };\r\n globalVideo.addEventListener('timeupdate', onTimeUpdate);\r\n globalVideo.addEventListener('play', onGlobalPlay);\r\n globalVideo.addEventListener('pause', onGlobalPause);\r\n video.addEventListener('play', onVideoPlay);\r\n video.addEventListener('pause', onVideoPause);\r\n }\r\n else {\r\n video.autoplay = true; // для safari\r\n }\r\n let img;\r\n if (message) {\r\n if (doc.type == 'video' && ((_a = doc.thumbs) === null || _a === void 0 ? void 0 : _a.length)) {\r\n return wrapPhoto(doc, message, container, boxWidth, boxHeight, withTail, isOut, lazyLoadQueue, middleware);\r\n }\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 appPhotosManager_1.default.setAttachmentSize(doc, container, boxWidth, boxHeight, false, true);\r\n }\r\n if (((_b = doc.thumbs) === null || _b === void 0 ? void 0 : _b.length) && 'bytes' in doc.thumbs[0]) {\r\n appPhotosManager_1.default.setAttachmentPreview(doc.thumbs[0].bytes, container, false);\r\n }\r\n img = container.lastElementChild;\r\n if ((img === null || img === void 0 ? void 0 : img.tagName) != 'IMG') {\r\n container.append(img = new Image());\r\n }\r\n }\r\n if (img) {\r\n img.classList.add('thumbnail');\r\n }\r\n if (withTail) {\r\n const 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 }\r\n if (!(img === null || img === void 0 ? void 0 : img.parentElement)) {\r\n const gotThumb = appDocsManager_1.default.getThumb(doc, false);\r\n if (gotThumb) {\r\n gotThumb.promise.then(() => {\r\n video.poster = gotThumb.thumb.url;\r\n });\r\n }\r\n }\r\n if (!video.parentElement && container) {\r\n container.append(video);\r\n }\r\n const loadVideo = () => __awaiter(this, void 0, void 0, function* () {\r\n var _c;\r\n if (middleware && !middleware()) {\r\n return;\r\n }\r\n let preloader;\r\n if ((_c = message === null || message === void 0 ? void 0 : message.media) === null || _c === void 0 ? void 0 : _c.preloader) { // means upload\r\n preloader = message.media.preloader;\r\n preloader.attach(container, undefined, undefined, true);\r\n }\r\n else if (!doc.downloaded && !doc.supportsStreaming) {\r\n const promise = appDocsManager_1.default.downloadDocNew(doc);\r\n preloader = new preloader_1.default(container, true);\r\n preloader.attach(container, true, promise, true);\r\n /* video.addEventListener('canplay', () => {\r\n if(preloader) {\r\n preloader.detach();\r\n }\r\n }, {once: true}); */\r\n yield promise;\r\n }\r\n else if (doc.supportsStreaming) {\r\n preloader = new preloader_1.default(container, false);\r\n video.addEventListener('canplay', () => {\r\n preloader.detach();\r\n }, { once: true });\r\n }\r\n if (middleware && !middleware()) {\r\n return;\r\n }\r\n //console.log('loaded doc:', doc, doc.url, container);\r\n const deferred = cancellablePromise_1.deferredPromise();\r\n //if(doc.type == 'gif'/* || true */) {\r\n video.addEventListener('canplay', () => {\r\n if (img === null || img === void 0 ? void 0 : img.parentElement) {\r\n img.remove();\r\n }\r\n /* if(!video.paused) {\r\n video.pause();\r\n } */\r\n if (doc.type == 'gif' && group) {\r\n animationIntersector_1.default.addAnimation(video, group);\r\n }\r\n // test lazyLoadQueue\r\n //setTimeout(() => {\r\n deferred.resolve();\r\n //}, 5000);\r\n }, { once: true });\r\n //}\r\n video.addEventListener('error', deferred.reject);\r\n //if(doc.type != 'round') {\r\n misc_1.renderImageFromUrl(video, doc.url);\r\n //}\r\n /* if(!container.parentElement) {\r\n container.append(video);\r\n } */\r\n if (doc.type == 'gif' /* || true */) {\r\n video.muted = true;\r\n video.loop = true;\r\n //video.play();\r\n video.autoplay = true;\r\n }\r\n else if (doc.type == 'round') {\r\n video.dataset.ckin = 'circle';\r\n video.dataset.overlay = '1';\r\n new mediaPlayer_1.default(video);\r\n }\r\n return deferred;\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 \r\n let span = document.createElement('span');\r\n span.classList.add('btn-circle', 'tgico-download');\r\n downloadDiv.append(span);\r\n \r\n downloadDiv.addEventListener('click', () => {\r\n downloadDiv.remove();\r\n loadVideo();\r\n });\r\n \r\n container.prepend(downloadDiv);\r\n \r\n return;\r\n } */\r\n return /* doc.downloaded || */ !lazyLoadQueue /* && false */ ? loadVideo() : (lazyLoadQueue.push({ div: container, load: loadVideo /* , wasSeen: true */ }), Promise.resolve());\r\n}\r\nexports.wrapVideo = wrapVideo;\r\nexports.formatDate = (timestamp, monthShort = false, withYear = true) => {\r\n const months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'Octomber', 'November', 'December'];\r\n const date = new Date(timestamp * 1000);\r\n let month = months[date.getMonth()];\r\n if (monthShort)\r\n month = month.slice(0, 3);\r\n let str = month + ' ' + date.getDate();\r\n if (withYear) {\r\n str += ', ' + date.getFullYear();\r\n }\r\n return str + ' at ' + date.getHours() + ':' + ('0' + date.getMinutes()).slice(-2);\r\n};\r\nfunction wrapDocument(doc, withTime = false, uploading = false, mid) {\r\n if (doc.type == 'audio' || doc.type == 'voice') {\r\n return wrapAudio(doc, withTime, mid);\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 const icoDiv = document.createElement('div');\r\n icoDiv.classList.add('document-ico');\r\n if (doc.type == 'photo') {\r\n docDiv.classList.add('photo');\r\n if (uploading) {\r\n icoDiv.innerHTML = ``;\r\n }\r\n else {\r\n wrapPhoto(doc, null, icoDiv, 54, 54, false, null, null, null);\r\n icoDiv.style.width = icoDiv.style.height = '';\r\n }\r\n const img = icoDiv.querySelector('img');\r\n if (img)\r\n img.classList.add('document-thumb');\r\n }\r\n else {\r\n icoDiv.innerText = ext;\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 += ' · ' + exports.formatDate(doc.date);\r\n }\r\n docDiv.innerHTML = `\r\n ${!uploading ? `
` : ''}\r\n
${fileName}
\r\n
${size}
\r\n `;\r\n docDiv.prepend(icoDiv);\r\n if (!uploading) {\r\n let downloadDiv = docDiv.querySelector('.document-download');\r\n let preloader;\r\n let download;\r\n docDiv.addEventListener('click', () => {\r\n if (!download) {\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 download = appDocsManager_1.default.saveDocFile(doc);\r\n preloader.attach(downloadDiv, true, download);\r\n download.then(() => {\r\n downloadDiv.remove();\r\n }).catch(err => {\r\n if (err.name === 'AbortError') {\r\n download = null;\r\n }\r\n }).finally(() => {\r\n downloadDiv.classList.remove('downloading');\r\n });\r\n downloadDiv.classList.add('downloading');\r\n }\r\n else {\r\n download.cancel();\r\n }\r\n });\r\n }\r\n return docDiv;\r\n}\r\nexports.wrapDocument = wrapDocument;\r\nfunction wrapAudio(doc, withTime = false, mid) {\r\n let elem = new audio_1.default();\r\n elem.setAttribute('doc-id', doc.id);\r\n elem.setAttribute('with-time', '' + +withTime);\r\n elem.setAttribute('message-id', '' + mid);\r\n return elem;\r\n}\r\nexports.wrapAudio = wrapAudio;\r\nfunction wrapMediaWithTail(photo, message, container, boxWidth, boxHeight, isOut) {\r\n const 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 const foreignObject = document.createElementNS(\"http://www.w3.org/2000/svg\", 'foreignObject');\r\n appPhotosManager_1.default.setAttachmentSize(photo, foreignObject, boxWidth, boxHeight /* , false, true */);\r\n const width = +foreignObject.getAttributeNS(null, 'width');\r\n const 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 const clipID = 'clip' + message.mid;\r\n svg.dataset.clipID = clipID;\r\n const defs = document.createElementNS(\"http://www.w3.org/2000/svg\", 'defs');\r\n let clipPathHTML = '';\r\n if (message.message) {\r\n //clipPathHTML += ``;\r\n }\r\n else {\r\n if (isOut) {\r\n clipPathHTML += `\r\n \r\n \r\n `;\r\n }\r\n else {\r\n clipPathHTML += `\r\n \r\n \r\n `;\r\n }\r\n }\r\n defs.innerHTML = `${clipPathHTML}`;\r\n container.style.width = parseInt(container.style.width) - 9 + 'px';\r\n container.classList.add('with-tail');\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(photo, message, container, boxWidth = config_1.mediaSizes.active.regular.width, boxHeight = config_1.mediaSizes.active.regular.height, withTail, isOut, lazyLoadQueue, middleware, size = null) {\r\n var _a;\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 (boxWidth && boxHeight) { // !album\r\n size = appPhotosManager_1.default.setAttachmentSize(photo, container, boxWidth, boxHeight, false, true);\r\n }\r\n if (photo._ == 'document' || !photo.downloaded) {\r\n const thumbs = photo.sizes || photo.thumbs;\r\n if ((thumbs === null || thumbs === void 0 ? void 0 : thumbs.length) && 'bytes' in thumbs[0]) {\r\n appPhotosManager_1.default.setAttachmentPreview(thumbs[0].bytes, container, false);\r\n }\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 const cacheContext = appPhotosManager_1.default.getCacheContext(photo);\r\n let preloader;\r\n if ((_a = message === null || message === void 0 ? void 0 : message.media) === null || _a === void 0 ? void 0 : _a.preloader) { // means upload\r\n message.media.preloader.attach(container);\r\n }\r\n else if (!cacheContext.downloaded) {\r\n preloader = new preloader_1.default(container, false);\r\n }\r\n const load = () => {\r\n const promise = photo._ == 'document' && photo.animated ? appDocsManager_1.default.downloadDocNew(photo) : appPhotosManager_1.default.preloadPhoto(photo, 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, cacheContext.url || photo.url);\r\n });\r\n };\r\n return cacheContext.downloaded || !lazyLoadQueue ? load() : (lazyLoadQueue.push({ div: container, load: load, wasSeen: true }), Promise.resolve());\r\n}\r\nexports.wrapPhoto = wrapPhoto;\r\nfunction wrapSticker({ doc, div, middleware, lazyLoadQueue, group, play, onlyThumb, emoji, width, height, withThumb, loop }) {\r\n var _a;\r\n const stickerType = doc.sticker;\r\n if (!width) {\r\n width = !emoji ? 200 : undefined;\r\n }\r\n if (!height) {\r\n height = !emoji ? 200 : undefined;\r\n }\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 (((_a = doc.thumbs) === null || _a === void 0 ? void 0 : _a.length) && !div.firstElementChild && (!doc.downloaded || stickerType == 2 || onlyThumb) && toneIndex <= 0 /* && doc.thumbs[0]._ != 'photoSizeEmpty' */) {\r\n const thumb = doc.thumbs[0];\r\n //console.log('wrap sticker', thumb, div);\r\n let img;\r\n const afterRender = () => {\r\n if (!div.childElementCount) {\r\n div.append(img);\r\n }\r\n };\r\n if ('url' in thumb) {\r\n img = new Image();\r\n misc_1.renderImageFromUrl(img, thumb.url, afterRender);\r\n }\r\n else if ('bytes' in thumb) {\r\n img = new Image();\r\n if ((!config_1.isSafari || doc.pFlags.stickerThumbConverted || thumb.url) /* && false */) {\r\n misc_1.renderImageFromUrl(img, appPhotosManager_1.default.getPreviewURLFromThumb(thumb, true), afterRender);\r\n }\r\n else {\r\n webpWorkerController_1.default.convert(doc.id, thumb.bytes).then(bytes => {\r\n thumb.bytes = bytes;\r\n doc.pFlags.stickerThumbConverted = true;\r\n if (middleware && !middleware())\r\n return;\r\n if (!div.childElementCount) {\r\n misc_1.renderImageFromUrl(img, appPhotosManager_1.default.getPreviewURLFromThumb(thumb, true), afterRender);\r\n }\r\n }).catch(() => { });\r\n }\r\n }\r\n else if (stickerType == 2 && (withThumb || onlyThumb)) {\r\n img = new Image();\r\n const load = () => {\r\n if (div.childElementCount || (middleware && !middleware()))\r\n return;\r\n const r = () => {\r\n if (div.childElementCount || (middleware && !middleware()))\r\n return;\r\n misc_1.renderImageFromUrl(img, thumb.url, afterRender);\r\n };\r\n if (thumb.url) {\r\n r();\r\n return Promise.resolve();\r\n }\r\n else {\r\n return appDocsManager_1.default.getThumbURL(doc, thumb).promise.then(r);\r\n }\r\n };\r\n if (lazyLoadQueue && onlyThumb) {\r\n lazyLoadQueue.push({ div, load });\r\n return Promise.resolve();\r\n }\r\n else {\r\n load();\r\n }\r\n }\r\n }\r\n if (onlyThumb) { // for sticker panel\r\n return Promise.resolve();\r\n }\r\n let downloaded = doc.downloaded;\r\n let load = () => __awaiter(this, void 0, void 0, function* () {\r\n if (middleware && !middleware())\r\n return;\r\n if (stickerType == 2) {\r\n /* if(doc.id == '1860749763008266301') {\r\n console.log('loaded sticker:', doc, div);\r\n } */\r\n //console.time('download sticker' + doc.id);\r\n //appDocsManager.downloadDocNew(doc.id).promise.then(res => res.json()).then(async(json) => {\r\n //fetch(doc.url).then(res => res.json()).then(async(json) => {\r\n /* return */ yield appDocsManager_1.default.downloadDocNew(doc)\r\n .then(blob_1.readBlobAsText)\r\n .then(JSON.parse)\r\n .then((json) => __awaiter(this, void 0, void 0, function* () {\r\n //console.timeEnd('download sticker' + doc.id);\r\n //console.log('loaded sticker:', doc, div/* , blob */);\r\n if (middleware && !middleware())\r\n return;\r\n let animation = yield lottieLoader_1.default.loadAnimationWorker /* loadAnimation */({\r\n container: div,\r\n loop: loop && !emoji,\r\n autoplay: play,\r\n animationData: json,\r\n width,\r\n height\r\n }, group, toneIndex);\r\n //const deferred = deferredPromise();\r\n animation.addListener('firstFrame', () => {\r\n if (div.firstElementChild && div.firstElementChild.tagName == 'IMG') {\r\n div.firstElementChild.remove();\r\n }\r\n else {\r\n animation.canvas.classList.add('fade-in');\r\n }\r\n //deferred.resolve();\r\n }, true);\r\n if (emoji) {\r\n div.addEventListener('click', () => {\r\n let animation = lottieLoader_1.default.getAnimation(div);\r\n if (animation.paused) {\r\n animation.restart();\r\n }\r\n });\r\n }\r\n //return deferred;\r\n //await new Promise((resolve) => setTimeout(resolve, 5e3));\r\n }));\r\n //console.timeEnd('render sticker' + doc.id);\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.classList.add('fade-in-transition');\r\n img.style.opacity = '0';\r\n img.addEventListener('load', () => {\r\n doc.downloaded = true;\r\n window.requestAnimationFrame(() => {\r\n img.style.opacity = '';\r\n });\r\n });\r\n }\r\n const r = () => {\r\n if (middleware && !middleware())\r\n return;\r\n misc_1.renderImageFromUrl(img, doc.url, () => {\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 if (doc.url)\r\n r();\r\n else {\r\n appDocsManager_1.default.downloadDocNew(doc).then(r);\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, isPinned) {\r\n const prefix = isPinned ? 'pinned-message' : 'reply';\r\n const div = document.createElement('div');\r\n div.classList.add(prefix);\r\n const replyBorder = document.createElement('div');\r\n replyBorder.classList.add(prefix + '-border');\r\n const replyContent = document.createElement('div');\r\n replyContent.classList.add(prefix + '-content');\r\n const replyTitle = document.createElement('div');\r\n replyTitle.classList.add(prefix + '-title');\r\n const replySubtitle = document.createElement('div');\r\n replySubtitle.classList.add(prefix + '-subtitle');\r\n replyTitle.innerHTML = title ? richtextprocessor_1.RichTextProcessor.wrapEmojiText(title) : '';\r\n const media = message && message.media;\r\n if (media) {\r\n replySubtitle.innerHTML = message.rReply;\r\n //console.log('wrap reply', media);\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(prefix + '-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-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 const items = [];\r\n // !higher msgID will be the FIRST in album\r\n const storage = Object.keys(appMessagesManager_1.default.groupedMessagesStorage[groupID]).map(id => +id).sort((a, b) => a - b);\r\n for (const mid of storage) {\r\n const m = appMessagesManager_1.default.getMessage(mid);\r\n const media = m.media.photo || m.media.document;\r\n const 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 const spacing = 2;\r\n const layouter = new groupedLayout_1.Layouter(items.map(i => ({ w: i.size.w, h: i.size.h })), config_1.mediaSizes.active.album.width, 100, spacing);\r\n const 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 (const { geometry, sides } of layout) {\r\n const item = items.shift();\r\n if (!item) {\r\n console.error('no item for layout!');\r\n continue;\r\n }\r\n const { size, media, message } = item;\r\n const 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, 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 const 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": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\storage.ts", - "name": "./src/lib/storage.ts", - "index": 11, - "index2": 11, - "size": 6067, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "issuerId": 67, - "issuerName": "./src/index.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - } - ], - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 2, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts", - "module": "./src/lib/mtproto/mtprotoworker.ts", - "moduleName": "./src/lib/mtproto/mtprotoworker.ts", - "type": "cjs require", - "userRequest": "../storage", - "loc": "7:34-55" - }, - { - "moduleId": 7, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "module": "./src/lib/appManagers/appMessagesManager.ts", - "moduleName": "./src/lib/appManagers/appMessagesManager.ts", - "type": "cjs require", - "userRequest": "../storage", - "loc": "25:34-55" - }, - { - "moduleId": 27, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appProfileManager.ts", - "module": "./src/lib/appManagers/appProfileManager.ts", - "moduleName": "./src/lib/appManagers/appProfileManager.ts", - "type": "cjs require", - "userRequest": "../storage", - "loc": "24:34-55" - }, - { - "moduleId": 34, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 40, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appStateManager.ts", - "module": "./src/lib/appManagers/appStateManager.ts", - "moduleName": "./src/lib/appManagers/appStateManager.ts", - "type": "cjs require", - "userRequest": "../storage", - "loc": "7:34-55" - }, - { - "moduleId": 44, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 67, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "module": "./src/index.ts", - "moduleName": "./src/index.ts", - "type": "cjs require", - "userRequest": "./lib/storage", - "loc": "65:50-74" - }, - { - "moduleId": 82, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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\nconst context_1 = require(\"../helpers/context\");\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\nclass AppStorage {\r\n constructor() {\r\n this.taskID = 0;\r\n this.tasks = {};\r\n //private log = (...args: any[]) => console.log('[SW LS]', ...args);\r\n this.log = (...args) => { };\r\n if (mtproto_config_1.Modes.test) {\r\n this.setPrefix('t_');\r\n }\r\n if (!context_1.isWorker) {\r\n this.configStorage = new ConfigStorage();\r\n }\r\n }\r\n setPrefix(newPrefix) {\r\n if (this.configStorage) {\r\n this.configStorage.keyPrefix = newPrefix;\r\n }\r\n }\r\n noPrefix() {\r\n if (this.configStorage) {\r\n this.configStorage.noPrefix = true;\r\n }\r\n }\r\n finishTask(taskID, result) {\r\n this.log('finishTask:', taskID, result, Object.keys(this.tasks));\r\n if (!this.tasks.hasOwnProperty(taskID)) {\r\n this.log('no such task:', taskID, result);\r\n return;\r\n }\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 (context_1.isWorker) {\r\n const taskID = this.taskID++;\r\n this.tasks[taskID] = resolve;\r\n const task = { useLs: true, task: methodName, taskID, args: _args };\r\n context_1.notifySomeone(task);\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 this.configStorage[methodName].apply(this.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": 20, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\lottieLoader.ts", - "name": "./src/lib/lottieLoader.ts", - "index": 35, - "index2": 29, - "size": 25080, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageAuthCode.ts", - "issuerId": 79, - "issuerName": "./src/pages/pageAuthCode.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 49, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "name": "./src/pages/pageSignIn.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 79, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageAuthCode.ts", - "name": "./src/pages/pageAuthCode.ts", - "profile": { - "factory": 104, - "building": 1053, - "dependencies": 527 - } - } - ], - "profile": { - "factory": 575, - "building": 2297, - "dependencies": 2 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 15, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\animationIntersector.ts", - "module": "./src/components/animationIntersector.ts", - "moduleName": "./src/components/animationIntersector.ts", - "type": "cjs require", - "userRequest": "../lib/lottieLoader", - "loc": "5:23-53" - }, - { - "moduleId": 18, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "module": "./src/components/wrappers.ts", - "moduleName": "./src/components/wrappers.ts", - "type": "cjs require", - "userRequest": "../lib/lottieLoader", - "loc": "17:39-69" - }, - { - "moduleId": 66, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 79, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 81, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pagesManager.ts", - "module": "./src/pages/pagesManager.ts", - "moduleName": "./src/pages/pagesManager.ts", - "type": "cjs require", - "userRequest": "../lib/lottieLoader", - "loc": "7:39-69" - }, - { - "moduleId": 95, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\chatFolders.ts", - "module": "./src/components/sidebarLeft/chatFolders.ts", - "moduleName": "./src/components/sidebarLeft/chatFolders.ts", - "type": "cjs require", - "userRequest": "../../lib/lottieLoader", - "loc": "6:39-72" - }, - { - "moduleId": 96, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\editFolder.ts", - "module": "./src/components/sidebarLeft/editFolder.ts", - "moduleName": "./src/components/sidebarLeft/editFolder.ts", - "type": "cjs require", - "userRequest": "../../lib/lottieLoader", - "loc": "26:39-72" - }, - { - "moduleId": 102, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\stickers.ts", - "module": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "type": "cjs require", - "userRequest": "../../../lib/lottieLoader", - "loc": "40:39-75" - } - ], - "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.RLottiePlayer = void 0;\r\nconst config_1 = require(\"./config\");\r\nconst logger_1 = require(\"./logger\");\r\nconst animationIntersector_1 = __importDefault(require(\"../components/animationIntersector\"));\r\nconst mtprotoworker_1 = __importDefault(require(\"./mtproto/mtprotoworker\"));\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, worker, options }) {\r\n this.reqId = 0;\r\n this.width = 0;\r\n this.height = 0;\r\n this.listeners = {};\r\n this.listenerResults = {};\r\n this.paused = true;\r\n //public paused = false;\r\n this.direction = 1;\r\n this.speed = 1;\r\n this.autoplay = true;\r\n this.loop = true;\r\n this.group = '';\r\n //private caching = false;\r\n //private removed = false;\r\n this.frames = {};\r\n this.cachingDelta = 0;\r\n this.reqId = ++RLottiePlayer['reqId'];\r\n this.el = el;\r\n this.worker = worker;\r\n for (let i in options) {\r\n if (this.hasOwnProperty(i)) {\r\n // @ts-ignore\r\n this[i] = options[i];\r\n }\r\n }\r\n const pixelRatio = window.devicePixelRatio;\r\n if (pixelRatio > 1) {\r\n //this.cachingEnabled = true;//this.width < 100 && this.height < 100;\r\n if (options.needUpscale) {\r\n this.width = Math.round(this.width * pixelRatio);\r\n this.height = Math.round(this.height * pixelRatio);\r\n }\r\n else if (pixelRatio > 1 && this.width > 100 && this.height > 100) {\r\n if (config_1.isApple || !config_1.mediaSizes.isMobile) {\r\n /* this.width = Math.round(this.width * (pixelRatio - 1));\r\n this.height = Math.round(this.height * (pixelRatio - 1)); */\r\n this.width = Math.round(this.width * pixelRatio);\r\n this.height = Math.round(this.height * pixelRatio);\r\n }\r\n else if (pixelRatio > 2.5) {\r\n this.width = Math.round(this.width * (pixelRatio - 1.5));\r\n this.height = Math.round(this.height * (pixelRatio - 1.5));\r\n }\r\n }\r\n }\r\n if (!options.noCache) {\r\n // проверка на размер уже после скейлинга, сделано для попапа и сайдбарfа, где стикеры 80х80 и 68х68, туда нужно 75%\r\n if (config_1.isApple && this.width > 100 && this.height > 100) {\r\n this.cachingDelta = 2; //2 // 50%\r\n }\r\n else if (this.width < 100 && this.height < 100) {\r\n this.cachingDelta = Infinity; // 100%\r\n }\r\n else {\r\n this.cachingDelta = 4; // 75%\r\n }\r\n }\r\n // if(isApple) {\r\n // this.cachingDelta = 0; //2 // 50%\r\n // }\r\n /* this.width *= 0.8;\r\n this.height *= 0.8; */\r\n //console.log(\"RLottiePlayer width:\", this.width, this.height, options);\r\n this.canvas = document.createElement('canvas');\r\n this.canvas.classList.add('rlottie');\r\n this.canvas.width = this.width;\r\n this.canvas.height = this.height;\r\n this.context = this.canvas.getContext('2d');\r\n this.clamped = new Uint8ClampedArray(this.width * this.height * 4);\r\n this.imageData = new ImageData(this.width, this.height);\r\n }\r\n clearCache() {\r\n this.frames = {};\r\n }\r\n addListener(name, callback, once) {\r\n var _a;\r\n ((_a = this.listeners[name]) !== null && _a !== void 0 ? _a : (this.listeners[name] = [])).push({ callback, once });\r\n if (this.listenerResults.hasOwnProperty(name)) {\r\n callback(this.listenerResults[name]);\r\n if (once) {\r\n this.removeListener(name, callback);\r\n }\r\n }\r\n }\r\n removeListener(name, callback) {\r\n if (this.listeners[name]) {\r\n this.listeners[name].findAndSplice(l => l.callback == callback);\r\n }\r\n }\r\n setListenerResult(name, value) {\r\n this.listenerResults[name] = value;\r\n if (this.listeners[name]) {\r\n this.listeners[name].forEach(listener => {\r\n listener.callback(value);\r\n if (listener.once) {\r\n this.removeListener(name, listener.callback);\r\n }\r\n });\r\n }\r\n }\r\n sendQuery(methodName, ...args) {\r\n //console.trace('RLottie sendQuery:', methodName);\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 //console.log('RLOTTIE PLAY' + this.reqId);\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 clearTimeout(this.rafId);\r\n //window.cancelAnimationFrame(this.rafId);\r\n }\r\n stop(renderFirstFrame = true) {\r\n this.pause();\r\n this.curFrame = this.direction == 1 ? 0 : this.frameCount;\r\n if (renderFirstFrame) {\r\n this.requestFrame(this.curFrame);\r\n //this.sendQuery('renderFrame', this.curFrame);\r\n }\r\n }\r\n restart() {\r\n this.stop(false);\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 remove() {\r\n //alert('remove');\r\n lottieLoader.onDestroy(this.reqId);\r\n this.pause();\r\n this.sendQuery('destroy');\r\n //this.removed = true;\r\n }\r\n renderFrame2(frame, frameNo) {\r\n /* this.setListenerResult('enterFrame', frameNo);\r\n return; */\r\n try {\r\n this.imageData.data.set(frame);\r\n //this.context.putImageData(new ImageData(frame, this.width, this.height), 0, 0);\r\n this.context.putImageData(this.imageData, 0, 0);\r\n }\r\n catch (err) {\r\n console.error('RLottiePlayer renderFrame error:', err /* , frame */, this.width, this.height);\r\n this.autoplay = false;\r\n this.pause();\r\n return;\r\n }\r\n //console.log('set result enterFrame', frameNo);\r\n this.setListenerResult('enterFrame', frameNo);\r\n }\r\n renderFrame(frame, frameNo) {\r\n //console.log('renderFrame', frameNo, this);\r\n if (this.cachingDelta && (frameNo % this.cachingDelta || !frameNo) && !this.frames[frameNo]) {\r\n this.frames[frameNo] = new Uint8ClampedArray(frame); //frame;\r\n }\r\n /* if(!this.listenerResults.hasOwnProperty('cached')) {\r\n this.setListenerResult('enterFrame', frameNo);\r\n if(frameNo == (this.frameCount - 1)) {\r\n this.setListenerResult('cached');\r\n }\r\n \r\n return;\r\n } */\r\n if (this.frInterval) {\r\n const now = Date.now(), delta = now - this.frThen;\r\n //console.log(`renderFrame delta${this.reqId}:`, this, delta, this.frInterval);\r\n if (delta < 0) {\r\n if (this.rafId)\r\n clearTimeout(this.rafId);\r\n return this.rafId = window.setTimeout(() => {\r\n this.renderFrame2(frame, frameNo);\r\n }, this.frInterval > -delta ? -delta % this.frInterval : this.frInterval);\r\n //await new Promise((resolve) => setTimeout(resolve, -delta % this.frInterval));\r\n }\r\n }\r\n this.renderFrame2(frame, frameNo);\r\n }\r\n requestFrame(frameNo) {\r\n if (this.frames[frameNo]) {\r\n this.renderFrame(this.frames[frameNo], frameNo);\r\n }\r\n else if (config_1.isSafari) {\r\n this.sendQuery('renderFrame', frameNo);\r\n }\r\n else {\r\n if (!this.clamped.length) { // fix detached\r\n this.clamped = new Uint8ClampedArray(this.width * this.height * 4);\r\n }\r\n this.sendQuery('renderFrame', frameNo, this.clamped);\r\n }\r\n }\r\n mainLoopForwards() {\r\n this.requestFrame(this.curFrame++);\r\n if (this.curFrame >= this.frameCount) {\r\n //this.playedTimes++;\r\n if (!this.loop) {\r\n this.pause();\r\n return false;\r\n }\r\n this.curFrame = 0;\r\n }\r\n return true;\r\n }\r\n mainLoopBackwards() {\r\n this.requestFrame(this.curFrame--);\r\n if (this.curFrame < 0) {\r\n //this.playedTimes++;\r\n if (!this.loop) {\r\n this.pause();\r\n return false;\r\n }\r\n this.curFrame = this.frameCount - 1;\r\n }\r\n return true;\r\n }\r\n setMainLoop() {\r\n //window.cancelAnimationFrame(this.rafId);\r\n clearTimeout(this.rafId);\r\n this.frInterval = 1000 / this.fps / this.speed;\r\n this.frThen = Date.now() - this.frInterval;\r\n //console.trace('setMainLoop', this.frInterval, this.direction, this, JSON.stringify(this.listenerResults), this.listenerResults);\r\n const method = (this.direction == 1 ? this.mainLoopForwards : this.mainLoopBackwards).bind(this);\r\n this.currentMethod = method;\r\n //this.frameListener && this.removeListener('enterFrame', this.frameListener);\r\n //setTimeout(() => {\r\n //this.addListener('enterFrame', this.frameListener);\r\n //}, 0);\r\n if (this.frameListener && this.listenerResults.hasOwnProperty('enterFrame')) {\r\n this.frameListener();\r\n }\r\n //this.mainLoop(method);\r\n //this.r(method);\r\n //method();\r\n }\r\n onLoad(frameCount, fps) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n this.curFrame = this.direction == 1 ? 0 : frameCount - 1;\r\n this.frameCount = frameCount;\r\n this.fps = fps;\r\n this.frInterval = 1000 / this.fps / this.speed;\r\n this.frThen = Date.now() - this.frInterval;\r\n //this.sendQuery('renderFrame', 0);\r\n // Кешировать сразу не получится, рендер стикера (тайгер) занимает 519мс, \r\n // если рендерить 75% с получением каждого кадра из воркера, будет 475мс, т.е. при 100% было бы 593мс, потеря на передаче 84мс. \r\n /* console.time('cache' + this.reqId);\r\n for(let i = 0; i < frameCount; ++i) {\r\n //if(this.removed) return;\r\n \r\n if(i % 4) {\r\n await new Promise((resolve) => {\r\n delete this.listenerResults.enterFrame;\r\n this.addListener('enterFrame', resolve, true);\r\n this.requestFrame(i);\r\n });\r\n }\r\n }\r\n \r\n console.timeEnd('cache' + this.reqId); */\r\n //console.log('cached');\r\n //return;\r\n this.requestFrame(0);\r\n this.setListenerResult('ready');\r\n this.addListener('enterFrame', () => {\r\n this.setListenerResult('firstFrame');\r\n this.el.appendChild(this.canvas);\r\n //console.log('enterFrame firstFrame');\r\n //let lastTime = this.frThen;\r\n this.frameListener = () => {\r\n if (this.paused) {\r\n return;\r\n }\r\n const time = Date.now();\r\n //console.log(`enterFrame handle${this.reqId}`, time, (time - lastTime), this.frInterval);\r\n /* if(Math.round(time - lastTime + this.frInterval * 0.25) < Math.round(this.frInterval)) {\r\n return;\r\n } */\r\n //lastTime = time;\r\n this.frThen = time + this.frInterval;\r\n const canContinue = this.currentMethod();\r\n if (!canContinue && !this.loop && this.autoplay) {\r\n this.autoplay = false;\r\n }\r\n };\r\n this.addListener('enterFrame', this.frameListener);\r\n }, true);\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 //return;\r\n //console.log('worker onmessage', event.data);\r\n if (event.data instanceof Object &&\r\n event.data.hasOwnProperty('queryMethodListener') &&\r\n event.data.hasOwnProperty('queryMethodArguments')) {\r\n /* if(event.data.queryMethodListener == 'frame') {\r\n return;\r\n } */\r\n this.listeners[event.data.queryMethodListener](...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 var args = Array.prototype.slice.call(arguments, 1);\r\n if (config_1.isSafari) {\r\n this.worker.postMessage({\r\n 'queryMethod': queryMethod,\r\n 'queryMethodArguments': args\r\n });\r\n }\r\n else {\r\n var transfer = [];\r\n for (var i = 0; i < args.length; i++) {\r\n if (args[i] instanceof ArrayBuffer) {\r\n transfer.push(args[i]);\r\n }\r\n if (args[i].buffer && args[i].buffer instanceof ArrayBuffer) {\r\n transfer.push(args[i].buffer);\r\n }\r\n }\r\n //console.log('transfer', transfer);\r\n this.worker.postMessage({\r\n 'queryMethod': queryMethod,\r\n 'queryMethodArguments': args\r\n }, transfer);\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.workers = [];\r\n this.curWorkerNum = 0;\r\n this.log = logger_1.logger('LOTTIE', logger_1.LogLevels.error);\r\n }\r\n getAnimation(element) {\r\n for (let i in this.players) {\r\n if (this.players[i].el == element) {\r\n return this.players[i];\r\n }\r\n }\r\n return null;\r\n }\r\n loadLottieWorkers() {\r\n if (typeof (WebAssembly) === 'undefined')\r\n return Promise.reject();\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 this.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 this.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[Math.max(toneIndex - 1, 0)];\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 loadAnimationFromURL(params, url) {\r\n if (!this.loaded) {\r\n this.loadLottieWorkers();\r\n }\r\n return fetch(url)\r\n .then(res => res.arrayBuffer())\r\n .then(data => mtprotoworker_1.default.gzipUncompress(data, true))\r\n .then(str => {\r\n return this.loadAnimationWorker(Object.assign(params, { animationData: JSON.parse(str), needUpscale: true }));\r\n });\r\n }\r\n loadAnimationWorker(params, group = '', toneIndex = -1) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n //params.autoplay = true;\r\n if (toneIndex >= 1 && toneIndex <= 5) {\r\n params.animationData = utils_1.copy(params.animationData);\r\n this.applyReplacements(params.animationData, toneIndex);\r\n }\r\n if (!this.loaded) {\r\n yield this.loadLottieWorkers();\r\n }\r\n if (!params.width || !params.height) {\r\n params.width = parseInt(params.container.style.width);\r\n params.height = parseInt(params.container.style.height);\r\n }\r\n if (!params.width || !params.height) {\r\n throw new Error('No size for sticker!');\r\n }\r\n params.group = group;\r\n const player = this.initPlayer(params.container, params);\r\n animationIntersector_1.default.addAnimation(player, group);\r\n return player;\r\n });\r\n }\r\n onPlayerLoaded(reqId, frameCount, fps) {\r\n const rlPlayer = this.players[reqId];\r\n if (!rlPlayer) {\r\n this.log.warn('onPlayerLoaded on destroyed player:', reqId, frameCount);\r\n return;\r\n }\r\n this.log.debug('onPlayerLoaded');\r\n rlPlayer.onLoad(frameCount, fps);\r\n //rlPlayer.addListener('firstFrame', () => {\r\n //animationIntersector.addAnimation(player, group);\r\n //}, true);\r\n }\r\n onFrame(reqId, frameNo, frame) {\r\n const rlPlayer = this.players[reqId];\r\n if (!rlPlayer) {\r\n this.log.warn('onFrame on destroyed player:', reqId, frameNo);\r\n return;\r\n }\r\n rlPlayer.clamped = frame;\r\n rlPlayer.renderFrame(frame, frameNo);\r\n }\r\n onDestroy(reqId) {\r\n delete this.players[reqId];\r\n }\r\n destroyWorkers() {\r\n this.workers.forEach((worker, idx) => {\r\n worker.terminate();\r\n this.log('worker #' + idx + ' terminated');\r\n });\r\n this.log('workers destroyed');\r\n this.workers.length = 0;\r\n }\r\n initPlayer(el, options) {\r\n const rlPlayer = new RLottiePlayer({\r\n el,\r\n worker: this.workers[this.curWorkerNum++],\r\n options\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(options.animationData);\r\n return rlPlayer;\r\n }\r\n }\r\n // https://github.com/telegramdesktop/tdesktop/blob/35e575c2d7b56446be95561e4565628859fb53d3/Telegram/SourceFiles/chat_helpers/stickers_emoji_pack.cpp#L65\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 [0xf77e41, 0x291c12],\r\n [0xffb139, 0x472a22],\r\n [0xffd140, 0x573b30],\r\n [0xffdf79, 0x68493c],\r\n ]\r\n ];\r\n return LottieLoader;\r\n})();\r\nconst lottieLoader = new LottieLoader();\r\n// @ts-ignore\r\nif (process.env.NODE_ENV != 'production') {\r\n window.lottieLoader = lottieLoader;\r\n}\r\nexports.default = lottieLoader;\r\n" - }, - { - "id": 21, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\lazyLoadQueue.ts", - "name": "./src/components/lazyLoadQueue.ts", - "index": 65, - "index2": 58, - "size": 9700, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "../../components/lazyLoadQueue", - "loc": "29:40-81" - }, - { - "moduleId": 24, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", - "type": "cjs require", - "userRequest": "../../components/lazyLoadQueue", - "loc": "48:40-81" - }, - { - "moduleId": 47, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\index.ts", - "module": "./src/components/emoticonsDropdown/index.ts", - "moduleName": "./src/components/emoticonsDropdown/index.ts", - "type": "cjs require", - "userRequest": "../lazyLoadQueue", - "loc": "16:40-67" - }, - { - "moduleId": 56, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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:24-65" - }, - { - "moduleId": 61, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popupStickers.ts", - "module": "./src/components/popupStickers.ts", - "moduleName": "./src/components/popupStickers.ts", - "type": "cjs require", - "userRequest": "./lazyLoadQueue", - "loc": "11:40-66" - }, - { - "moduleId": 63, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\gifsMasonry.ts", - "module": "./src/components/gifsMasonry.ts", - "moduleName": "./src/components/gifsMasonry.ts", - "type": "cjs require", - "userRequest": "./lazyLoadQueue", - "loc": "19:24-50" - }, - { - "moduleId": 85, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\stickers.ts", - "module": "./src/components/sidebarRight/stickers.ts", - "moduleName": "./src/components/sidebarRight/stickers.ts", - "type": "cjs require", - "userRequest": "../lazyLoadQueue", - "loc": "27:40-67" - }, - { - "moduleId": 102, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\stickers.ts", - "module": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "type": "cjs require", - "userRequest": "../../lazyLoadQueue", - "loc": "47:24-54" - } - ], - "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.LazyLoadQueueRepeat2 = exports.LazyLoadQueueRepeat = exports.LazyLoadQueueIntersector = exports.LazyLoadQueueBase = void 0;\r\nconst logger_1 = require(\"../lib/logger\");\r\nconst visibilityIntersector_1 = __importDefault(require(\"./visibilityIntersector\"));\r\nconst PARALLEL_LIMIT = 5;\r\nclass LazyLoadQueueBase {\r\n constructor(parallelLimit = PARALLEL_LIMIT) {\r\n this.parallelLimit = parallelLimit;\r\n this.queue = [];\r\n this.inProcess = new Set();\r\n this.lockPromise = null;\r\n this.unlockResolve = null;\r\n this.log = logger_1.logger('LL', logger_1.LogLevels.error);\r\n }\r\n clear() {\r\n this.inProcess.clear(); // ацтеки забьются, будет плохо\r\n this.queue.length = 0;\r\n // unreachable code\r\n /* for(let item of this.inProcess) {\r\n this.lazyLoadMedia.push(item);\r\n } */\r\n }\r\n lock() {\r\n if (this.lockPromise)\r\n return;\r\n const perf = performance.now();\r\n this.lockPromise = new Promise((resolve, reject) => {\r\n this.unlockResolve = resolve;\r\n });\r\n this.lockPromise.then(() => {\r\n this.log('was locked for:', performance.now() - perf);\r\n });\r\n }\r\n unlock() {\r\n if (!this.unlockResolve)\r\n return;\r\n this.unlockResolve();\r\n this.unlockResolve = this.lockPromise = null;\r\n this.processQueue();\r\n }\r\n processItem(item) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (this.lockPromise) {\r\n return;\r\n }\r\n this.inProcess.add(item);\r\n this.log('will load media', this.lockPromise, item);\r\n try {\r\n //await new Promise((resolve) => setTimeout(resolve, 2e3));\r\n //await new Promise((resolve, reject) => window.requestAnimationFrame(() => window.requestAnimationFrame(resolve)));\r\n //await item.load(item.div);\r\n yield this.loadItem(item);\r\n }\r\n catch (err) {\r\n this.log.error('loadMediaQueue error:', err /* , item */);\r\n }\r\n this.inProcess.delete(item);\r\n this.log('loaded media', item);\r\n this.processQueue();\r\n });\r\n }\r\n loadItem(item) {\r\n return item.load();\r\n }\r\n getItem() {\r\n return this.queue.shift();\r\n }\r\n addElement(method, el) {\r\n this.queue[method](el);\r\n this.processQueue();\r\n }\r\n processQueue(item) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (!this.queue.length || this.lockPromise || (this.parallelLimit > 0 && this.inProcess.size >= this.parallelLimit))\r\n return;\r\n do {\r\n if (item) {\r\n this.queue.findAndSplice(i => i == item);\r\n }\r\n else {\r\n item = this.getItem();\r\n }\r\n if (item) {\r\n this.processItem(item);\r\n }\r\n else {\r\n break;\r\n }\r\n item = null;\r\n } while (this.inProcess.size < this.parallelLimit && this.queue.length);\r\n });\r\n }\r\n push(el) {\r\n this.addElement('push', el);\r\n }\r\n unshift(el) {\r\n this.addElement('unshift', el);\r\n }\r\n}\r\nexports.LazyLoadQueueBase = LazyLoadQueueBase;\r\nclass LazyLoadQueueIntersector extends LazyLoadQueueBase {\r\n constructor(parallelLimit = PARALLEL_LIMIT) {\r\n super(parallelLimit);\r\n this.parallelLimit = parallelLimit;\r\n this.queue = [];\r\n this.inProcess = new Set();\r\n }\r\n lock() {\r\n super.lock();\r\n this.intersector.lock();\r\n }\r\n unlock() {\r\n super.unlock();\r\n this.intersector.unlock();\r\n }\r\n unlockAndRefresh() {\r\n super.unlock();\r\n this.intersector.unlockAndRefresh();\r\n }\r\n clear() {\r\n super.clear();\r\n this.intersector.disconnect();\r\n }\r\n refresh() {\r\n this.intersector.refresh();\r\n }\r\n loadItem(item) {\r\n return item.load(item.div);\r\n }\r\n addElement(method, el) {\r\n const item = this.queue.find(i => i.div == el.div);\r\n if (item) {\r\n return false;\r\n }\r\n else {\r\n for (const item of this.inProcess) {\r\n if (item.div == el.div) {\r\n return false;\r\n }\r\n }\r\n }\r\n this.queue[method](el);\r\n return true;\r\n }\r\n setProcessQueueTimeout() {\r\n if (!this.intersectorTimeout) {\r\n this.intersectorTimeout = window.setTimeout(() => {\r\n this.intersectorTimeout = 0;\r\n this.processQueue();\r\n }, 0);\r\n }\r\n }\r\n push(el) {\r\n super.push(el);\r\n }\r\n unshift(el) {\r\n super.unshift(el);\r\n }\r\n}\r\nexports.LazyLoadQueueIntersector = LazyLoadQueueIntersector;\r\nclass LazyLoadQueue extends LazyLoadQueueIntersector {\r\n constructor(parallelLimit = PARALLEL_LIMIT) {\r\n super(parallelLimit);\r\n this.parallelLimit = parallelLimit;\r\n this.onVisibilityChange = (target, visible) => {\r\n if (visible) {\r\n this.log('isIntersecting', target);\r\n // need for set element first if scrolled\r\n const item = this.queue.findAndSplice(i => i.div == target);\r\n if (item) {\r\n item.wasSeen = true;\r\n this.queue.unshift(item);\r\n //this.processQueue(item);\r\n }\r\n this.setProcessQueueTimeout();\r\n }\r\n };\r\n this.intersector = new visibilityIntersector_1.default(this.onVisibilityChange);\r\n }\r\n getItem() {\r\n return this.queue.findAndSplice(item => item.wasSeen);\r\n }\r\n processItem(item) {\r\n const _super = Object.create(null, {\r\n processItem: { get: () => super.processItem }\r\n });\r\n return __awaiter(this, void 0, void 0, function* () {\r\n yield _super.processItem.call(this, item);\r\n this.intersector.unobserve(item.div);\r\n });\r\n }\r\n addElement(method, el) {\r\n const inserted = super.addElement(method, el);\r\n if (!inserted)\r\n return false;\r\n this.intersector.observe(el.div);\r\n if (el.wasSeen) {\r\n this.processQueue(el);\r\n }\r\n else if (!el.hasOwnProperty('wasSeen')) {\r\n el.wasSeen = false;\r\n }\r\n return true;\r\n }\r\n}\r\nexports.default = LazyLoadQueue;\r\nclass LazyLoadQueueRepeat extends LazyLoadQueueIntersector {\r\n constructor(parallelLimit = PARALLEL_LIMIT, onVisibilityChange) {\r\n super(parallelLimit);\r\n this.parallelLimit = parallelLimit;\r\n this.onVisibilityChange = onVisibilityChange;\r\n this._queue = new Map();\r\n this.intersector = new visibilityIntersector_1.default((target, visible) => {\r\n if (visible) {\r\n const item = this.queue.findAndSplice(i => i.div == target);\r\n this.queue.unshift(item || this._queue.get(target));\r\n }\r\n else {\r\n this.queue.findAndSplice(i => i.div == target);\r\n }\r\n this.onVisibilityChange && this.onVisibilityChange(target, visible);\r\n this.setProcessQueueTimeout();\r\n });\r\n }\r\n clear() {\r\n super.clear();\r\n this._queue.clear();\r\n }\r\n /* public async processItem(item: LazyLoadElement) {\r\n //await super.processItem(item);\r\n await LazyLoadQueueBase.prototype.processItem.call(this, item);\r\n \r\n if(this.lazyLoadMedia.length) {\r\n this.processQueue();\r\n }\r\n } */\r\n observe(el) {\r\n this._queue.set(el.div, el);\r\n this.intersector.observe(el.div);\r\n }\r\n}\r\nexports.LazyLoadQueueRepeat = LazyLoadQueueRepeat;\r\nclass LazyLoadQueueRepeat2 extends LazyLoadQueueIntersector {\r\n constructor(parallelLimit = PARALLEL_LIMIT, onVisibilityChange) {\r\n super(parallelLimit);\r\n this.parallelLimit = parallelLimit;\r\n this.onVisibilityChange = onVisibilityChange;\r\n this.intersector = new visibilityIntersector_1.default((target, visible) => {\r\n const item = this.queue.findAndSplice(i => i.div == target);\r\n if (visible && item) {\r\n this.queue.unshift(item);\r\n }\r\n this.onVisibilityChange && this.onVisibilityChange(target, visible);\r\n this.setProcessQueueTimeout();\r\n });\r\n }\r\n observe(el) {\r\n this.intersector.observe(el);\r\n }\r\n}\r\nexports.LazyLoadQueueRepeat2 = LazyLoadQueueRepeat2;\r\n" - }, - { - "id": 22, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\bin_utils.ts", - "name": "./src/lib/bin_utils.ts", - "index": 15, - "index2": 13, - "size": 13166, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\polyfill.ts", - "issuerId": 75, - "issuerName": "./src/lib/polyfill.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 75, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\polyfill.ts", - "name": "./src/lib/polyfill.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - } - ], - "profile": { - "factory": 1813, - "building": 59, - "dependencies": 1052 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 7, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "module": "./src/lib/appManagers/appMessagesManager.ts", - "moduleName": "./src/lib/appManagers/appMessagesManager.ts", - "type": "cjs require", - "userRequest": "../bin_utils", - "loc": "21:20-43" - }, - { - "moduleId": 12, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDocsManager.ts", - "module": "./src/lib/appManagers/appDocsManager.ts", - "moduleName": "./src/lib/appManagers/appDocsManager.ts", - "type": "cjs require", - "userRequest": "../bin_utils", - "loc": "18:20-43" - }, - { - "moduleId": 13, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": "8:20-43" - }, - { - "moduleId": 28, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDownloadManager.ts", - "module": "./src/lib/appManagers/appDownloadManager.ts", - "moduleName": "./src/lib/appManagers/appDownloadManager.ts", - "type": "cjs require", - "userRequest": "../bin_utils", - "loc": "10:20-43" - }, - { - "moduleId": 72, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\crypto_methods.ts", - "module": "./src/lib/crypto/crypto_methods.ts", - "moduleName": "./src/lib/crypto/crypto_methods.ts", - "type": "cjs require", - "userRequest": "../bin_utils", - "loc": "3:20-43" - }, - { - "moduleId": 75, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 109, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 2, - "source": "\"use strict\";\r\n/*!\r\n * Webogram v0.7.0 - messaging web application for MTProto\r\n * https://github.com/zhukov/webogram\r\n * Copyright (C) 2014 Igor Zhukov \r\n * https://github.com/zhukov/webogram/blob/master/LICENSE\r\n */\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.getFileNameByLocation = exports.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 let blob;\r\n const 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 let bb = new BlobBuilder;\r\n blobParts.forEach((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 'application/json'\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\nfunction getFileNameByLocation(location, options) {\r\n const fileName = ''; //(options?.fileName || '').split('.');\r\n const ext = fileName[fileName.length - 1] || '';\r\n switch (location._) {\r\n case 'inputPhotoFileLocation':\r\n case 'inputDocumentFileLocation': {\r\n const thumbPart = location.thumb_size ? '_' + location.thumb_size : '';\r\n return (fileName[0] ? fileName[0] + '_' : '') + location.id + thumbPart + (ext ? '.' + ext : ext);\r\n }\r\n case 'fileLocationToBeDeprecated':\r\n case 'inputPeerPhotoFileLocation':\r\n case 'inputStickerSetThumb':\r\n case 'inputFileLocation': {\r\n return location.volume_id + '_' + location.local_id + (ext ? '.' + ext : ext);\r\n }\r\n default: {\r\n console.error('Unrecognized location:', location);\r\n return '';\r\n }\r\n }\r\n}\r\nexports.getFileNameByLocation = getFileNameByLocation;\r\n" - }, - { - "id": 23, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\helpers\\cancellablePromise.ts", - "name": "./src/helpers/cancellablePromise.ts", - "index": 20, - "index2": 17, - "size": 1438, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webpWorkerController.ts", - "issuerId": 53, - "issuerName": "./src/lib/webp/webpWorkerController.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts", - "name": "./src/lib/mtproto/mtprotoworker.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 53, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webpWorkerController.ts", - "name": "./src/lib/webp/webpWorkerController.ts", - "profile": { - "factory": 2342, - "building": 10824, - "dependencies": 20 - } - } - ], - "profile": { - "factory": 1033, - "building": 10993 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 7, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "module": "./src/lib/appManagers/appMessagesManager.ts", - "moduleName": "./src/lib/appManagers/appMessagesManager.ts", - "type": "cjs require", - "userRequest": "../../helpers/cancellablePromise", - "loc": "34:29-72" - }, - { - "moduleId": 18, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "module": "./src/components/wrappers.ts", - "moduleName": "./src/components/wrappers.ts", - "type": "cjs require", - "userRequest": "../helpers/cancellablePromise", - "loc": "33:29-69" - }, - { - "moduleId": 28, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDownloadManager.ts", - "module": "./src/lib/appManagers/appDownloadManager.ts", - "moduleName": "./src/lib/appManagers/appDownloadManager.ts", - "type": "cjs require", - "userRequest": "../../helpers/cancellablePromise", - "loc": "9:29-72" - }, - { - "moduleId": 37, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\appMediaPlaybackController.ts", - "module": "./src/components/appMediaPlaybackController.ts", - "moduleName": "./src/components/appMediaPlaybackController.ts", - "type": "cjs require", - "userRequest": "../helpers/cancellablePromise", - "loc": "10:29-69" - }, - { - "moduleId": 53, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webpWorkerController.ts", - "module": "./src/lib/webp/webpWorkerController.ts", - "moduleName": "./src/lib/webp/webpWorkerController.ts", - "type": "cjs require", - "userRequest": "../../helpers/cancellablePromise", - "loc": "8:29-72" - }, - { - "moduleId": 56, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts", - "module": "./src/lib/appManagers/appMediaViewer.ts", - "moduleName": "./src/lib/appManagers/appMediaViewer.ts", - "type": "cjs require", - "userRequest": "../../helpers/cancellablePromise", - "loc": "30:29-72" - }, - { - "moduleId": 63, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\gifsMasonry.ts", - "module": "./src/components/gifsMasonry.ts", - "moduleName": "./src/components/gifsMasonry.ts", - "type": "cjs require", - "userRequest": "../helpers/cancellablePromise", - "loc": "21:29-69" - } - ], - "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 = void 0;\r\nfunction deferredPromise() {\r\n let deferredHelper = {\r\n isFulfilled: false,\r\n isRejected: false,\r\n notify: () => { },\r\n notifyAll: (...args) => {\r\n deferredHelper.lastNotify = args;\r\n deferredHelper.listeners.forEach((callback) => callback(...args));\r\n },\r\n lastNotify: undefined,\r\n listeners: [],\r\n addNotifyListener: (callback) => {\r\n if (deferredHelper.lastNotify) {\r\n callback(...deferredHelper.lastNotify);\r\n }\r\n deferredHelper.listeners.push(callback);\r\n }\r\n };\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 deferred.finally(() => {\r\n deferred.notify = null;\r\n deferred.listeners.length = 0;\r\n deferred.lastNotify = null;\r\n });\r\n Object.assign(deferred, deferredHelper);\r\n return deferred;\r\n}\r\nexports.deferredPromise = deferredPromise;\r\n" - }, - { - "id": 24, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "name": "./src/lib/appManagers/appSidebarRight.ts", - "index": 61, - "index2": 78, - "size": 40896, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 42, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 47, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\index.ts", - "module": "./src/components/emoticonsDropdown/index.ts", - "moduleName": "./src/components/emoticonsDropdown/index.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appSidebarRight", - "loc": "22:42-90" - }, - { - "moduleId": 58, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\poll.ts", - "module": "./src/components/poll.ts", - "moduleName": "./src/components/poll.ts", - "type": "cjs require", - "userRequest": "../lib/appManagers/appSidebarRight", - "loc": "11:42-87" - }, - { - "moduleId": 85, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\stickers.ts", - "module": "./src/components/sidebarRight/stickers.ts", - "moduleName": "./src/components/sidebarRight/stickers.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appSidebarRight", - "loc": "35:39-87" - }, - { - "moduleId": 86, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\pollResults.ts", - "module": "./src/components/sidebarRight/pollResults.ts", - "moduleName": "./src/components/sidebarRight/pollResults.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appSidebarRight", - "loc": "26:39-87" - }, - { - "moduleId": 87, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\gifs.ts", - "module": "./src/components/sidebarRight/gifs.ts", - "moduleName": "./src/components/sidebarRight/gifs.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appSidebarRight", - "loc": "37:39-87" - } - ], - "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.AppSidebarRight = void 0;\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 logger_1 = require(\"../logger\");\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 config_1 = require(\"../config\");\r\nconst slider_1 = __importDefault(require(\"../../components/slider\"));\r\nconst searchInput_1 = __importDefault(require(\"../../components/searchInput\"));\r\nconst horizontalMenu_1 = require(\"../../components/horizontalMenu\");\r\nconst stickers_1 = __importDefault(require(\"../../components/sidebarRight/stickers\"));\r\nconst pollResults_1 = __importDefault(require(\"../../components/sidebarRight/pollResults\"));\r\nconst gifs_1 = __importDefault(require(\"../../components/sidebarRight/gifs\"));\r\nconst testScroll = false;\r\nconst COLUMN_ACTIVE_CLASSNAME = 'is-right-column-shown';\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\nconst stickersTab = new stickers_1.default();\r\nconst pollResultsTab = new pollResults_1.default();\r\nconst gifsTab = new gifs_1.default();\r\nconst contentToSharedMap = {\r\n contentMembers: 'inputMessagesFilterContacts',\r\n contentMedia: 'inputMessagesFilterPhotoVideo',\r\n contentDocuments: 'inputMessagesFilterDocument',\r\n contentLinks: 'inputMessagesFilterUrl',\r\n contentAudio: 'inputMessagesFilterMusic'\r\n};\r\n// TODO: отправленное сообщение с картинкой, или же новое полученное апдейтом сообщение не отобразится в медии\r\n// TODO: по-хорошему, нужно просто сделать апдейты для всего сайдбара\r\nlet AppSidebarRight = /** @class */ (() => {\r\n class AppSidebarRight extends slider_1.default {\r\n constructor() {\r\n super(document.getElementById('column-right'), {\r\n [AppSidebarRight.SLIDERITEMSIDS.stickers]: stickersTab,\r\n [AppSidebarRight.SLIDERITEMSIDS.pollResults]: pollResultsTab,\r\n [AppSidebarRight.SLIDERITEMSIDS.gifs]: gifsTab\r\n });\r\n this.profileElements = {};\r\n this.sharedMedia = {};\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 = 'inputMessagesFilterPhotoVideo';\r\n this.sharedMediaSelected = null;\r\n this.lazyLoadQueue = new lazyLoadQueue_1.default();\r\n this.historiesStorage = {};\r\n this.usedFromHistory = {};\r\n this.log = logger_1.logger('SR', logger_1.LogLevels.error);\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.loadMutex = Promise.resolve();\r\n this.onTransitionStart = () => {\r\n // Jolly Cobra's // Workaround for scrollable content flickering during animation.\r\n const container = this.scroll.container;\r\n if (container.style.overflowY !== 'hidden') {\r\n const scrollBarWidth = container.offsetWidth - container.clientWidth;\r\n container.style.overflowY = 'hidden';\r\n container.style.paddingRight = `${scrollBarWidth}px`;\r\n }\r\n };\r\n this.onTransitionEnd = () => {\r\n // Jolly Cobra's // Workaround for scrollable content flickering during animation.\r\n const container = this.scroll.container;\r\n container.style.overflowY = 'scroll';\r\n container.style.paddingRight = '0';\r\n };\r\n //this._selectTab(3);\r\n this.stickersTab = stickersTab;\r\n this.pollResultsTab = pollResultsTab;\r\n this.gifsTab = gifsTab;\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.searchContainer = this.sidebarEl.querySelector('#search-private-container');\r\n this.searchCloseBtn = this.searchContainer.querySelector('.sidebar-close-button');\r\n this.searchInput = new searchInput_1.default('Search');\r\n this.searchCloseBtn.parentElement.append(this.searchInput.container);\r\n this.privateSearch = new appSearch_1.default(this.searchContainer.querySelector('.chats-container'), this.searchInput, {\r\n messages: new appSearch_1.SearchGroup('Private Search', 'messages')\r\n });\r\n let container = this.profileContentEl.querySelector('.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 horizontalMenu_1.horizontalMenu(this.profileTabs, container, (id, tabContent) => {\r\n if (this.prevTabID == id)\r\n return;\r\n if (this.prevTabID != -1) {\r\n this.onTransitionStart();\r\n }\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 this.scroll.onScroll();\r\n this.onTransitionEnd();\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 const target = e.target;\r\n const 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 const message = appMessagesManager_1.default.getMessage(messageID);\r\n const ids = Object.keys(this.mediaDivsByIDs).map(k => +k).sort((a, b) => a - b);\r\n const idx = ids.findIndex(i => i == messageID);\r\n const targets = ids.map(id => {\r\n const element = this.mediaDivsByIDs[id];\r\n //element = element.querySelector('img') || element;\r\n return { element, mid: id };\r\n });\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 window.addEventListener('resize', () => {\r\n });\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 const active = document.body.classList.contains(COLUMN_ACTIVE_CLASSNAME);\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 //console.log('sidebar selectTab', enable, willChange);\r\n if (config_1.mediaSizes.isMobile) {\r\n appImManager_1.default.selectTab(active ? 1 : 2);\r\n return Promise.resolve();\r\n }\r\n const set = () => {\r\n document.body.classList.toggle(COLUMN_ACTIVE_CLASSNAME, enable);\r\n };\r\n set();\r\n return new Promise(resolve => {\r\n setTimeout(resolve, 200);\r\n });\r\n //return Promise.resolve();\r\n return new Promise((resolve, reject) => {\r\n const hidden = [];\r\n const observer = new IntersectionObserver((entries) => {\r\n for (const entry of entries) {\r\n const bubble = entry.target;\r\n if (!entry.isIntersecting) {\r\n hidden.push({ element: bubble, height: bubble.scrollHeight });\r\n }\r\n }\r\n for (const 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 (const 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 (active) {\r\n appForward_1.default.close();\r\n this.searchCloseBtn.click();\r\n }\r\n resolve();\r\n }, 200);\r\n });\r\n const length = Object.keys(appImManager_1.default.bubbles).length;\r\n if (length) {\r\n for (const 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 const peerID = this.peerID;\r\n const elemsToAppend = [];\r\n const promises = [];\r\n let sharedMediaDiv;\r\n /* for(let contentType in contentToSharedMap) {\r\n if(contentToSharedMap[contentType as ContentType] == type) {\r\n sharedMediaDiv = this.sharedMedia[contentType as ContentType];\r\n }\r\n } */\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 (const message of messages) {\r\n const media = message.media.photo || message.media.document || (message.media.webpage && message.media.webpage.document);\r\n const div = document.createElement('div');\r\n div.classList.add('media-item');\r\n //console.log(message, photo);\r\n const isPhoto = media._ == 'photo';\r\n const 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 const cachedThumb = appPhotosManager_1.default.getDocumentCachedThumb(media.id);\r\n isDownloaded = (cachedThumb === null || cachedThumb === void 0 ? void 0 : cachedThumb.downloaded) > 0;\r\n }\r\n //this.log('inputMessagesFilterPhotoVideo', message, media);\r\n if (!isPhoto) {\r\n const 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 /* const 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 const 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 const url = (photo && photo.url) || appPhotosManager_1.default.getDocumentCachedThumb(media.id).url;\r\n if (url) {\r\n //if(needBlur) return;\r\n const needBlurCallback = needBlur ? () => {\r\n //void img.offsetLeft; // reflow\r\n img.style.opacity = '';\r\n if (thumb) {\r\n window.setTimeout(() => {\r\n thumb.remove();\r\n }, 200);\r\n }\r\n } : undefined;\r\n misc_1.renderImageFromUrl(img, url, needBlurCallback);\r\n }\r\n });\r\n let thumb;\r\n const sizes = media.sizes || media.thumbs;\r\n const willHaveThumb = !isDownloaded && sizes && sizes[0].bytes;\r\n if (willHaveThumb) {\r\n thumb = new Image();\r\n thumb.classList.add('media-image', 'thumbnail');\r\n thumb.dataset.mid = '' + message.mid;\r\n appPhotosManager_1.default.setAttachmentPreview(sizes[0].bytes, thumb, false, false);\r\n div.append(thumb);\r\n }\r\n const needBlur = !isDownloaded || !willHaveThumb;\r\n const img = new Image();\r\n img.dataset.mid = '' + message.mid;\r\n img.classList.add('media-image');\r\n if (needBlur)\r\n img.style.opacity = '0';\r\n div.append(img);\r\n if (isDownloaded || willHaveThumb) {\r\n const promise = new Promise((resolve, reject) => {\r\n (thumb || img).addEventListener('load', () => {\r\n clearTimeout(timeout);\r\n resolve();\r\n });\r\n const timeout = setTimeout(() => {\r\n this.log('didn\\'t load', thumb, media, isDownloaded, sizes);\r\n reject();\r\n }, 1e3);\r\n });\r\n promises.push(promise);\r\n }\r\n if (sizes === null || sizes === void 0 ? void 0 : sizes.length) {\r\n if (isDownloaded)\r\n load();\r\n else\r\n this.lazyLoadQueue.push({ div, load });\r\n }\r\n elemsToAppend.push(div);\r\n this.mediaDivsByIDs[message.mid] = 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, false, message.mid);\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
${title}\r\n
${subtitle}
\r\n
${url}
\r\n `);\r\n if (div.innerText.trim().length) {\r\n elemsToAppend.push(div);\r\n }\r\n }\r\n break;\r\n }\r\n case 'inputMessagesFilterMusic': {\r\n sharedMediaDiv = this.sharedMedia.contentAudio;\r\n for (let message of messages) {\r\n let div = wrappers_1.wrapAudio(message.media.document, true, message.mid);\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 (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 if (elemsToAppend.length) {\r\n sharedMediaDiv.append(...elemsToAppend);\r\n }\r\n if (sharedMediaDiv) {\r\n const parent = sharedMediaDiv.parentElement;\r\n Array.from(parent.children).slice(1).forEach(child => {\r\n child.remove();\r\n });\r\n //this.contentContainer.classList.add('loaded');\r\n if (!messages.length && !sharedMediaDiv.childElementCount) {\r\n const div = document.createElement('div');\r\n div.innerText = 'Nothing interesting here yet...';\r\n div.classList.add('position-center', 'text-center', 'content-empty', 'no-select');\r\n parent.append(div);\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 const 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 const loadCount = (appPhotosManager_1.default.windowH / 130 | 0) * 3; // that's good for all types\r\n const historyStorage = (_a = this.historiesStorage[peerID]) !== null && _a !== void 0 ? _a : (this.historiesStorage[peerID] = {});\r\n const promises = typesToLoad.map(type => {\r\n var _a;\r\n if (this.loadSidebarMediaPromises[type])\r\n return this.loadSidebarMediaPromises[type];\r\n const 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 const inputFilter = contentToSharedMap[key];\r\n if (!this.historiesStorage[this.peerID] || !this.historiesStorage[this.peerID][inputFilter]) {\r\n const parent = this.sharedMedia[key].parentElement;\r\n if (!testScroll) {\r\n if (!parent.querySelector('.preloader')) {\r\n misc_1.putPreloader(parent, true);\r\n }\r\n }\r\n const empty = parent.querySelector('.content-empty');\r\n if (empty) {\r\n empty.remove();\r\n }\r\n }\r\n });\r\n if (testScroll) {\r\n for (let i = 0; i < 1500; ++i) {\r\n let div = document.createElement('div');\r\n div.insertAdjacentHTML('beforeend', ``);\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 }\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] as HTMLLIElement;\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 });\r\n }\r\n else {\r\n //membersLi.style.display = appPeersManager.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\n AppSidebarRight.SLIDERITEMSIDS = {\r\n search: 1,\r\n forward: 2,\r\n stickers: 3,\r\n pollResults: 4,\r\n gifs: 5,\r\n };\r\n return AppSidebarRight;\r\n})();\r\nexports.AppSidebarRight = AppSidebarRight;\r\nconst appSidebarRight = new AppSidebarRight();\r\n// @ts-ignore\r\nif (process.env.NODE_ENV != 'production') {\r\n window.appSidebarRight = appSidebarRight;\r\n}\r\nexports.default = appSidebarRight;\r\n" - }, - { - "id": 25, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\page.ts", - "name": "./src/pages/page.ts", - "index": 33, - "index2": 32, - "size": 2120, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "issuerId": 49, - "issuerName": "./src/pages/pageSignIn.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 49, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "name": "./src/pages/pageSignIn.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - } - ], - "profile": { - "factory": 104, - "building": 1053, - "dependencies": 527 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 31, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 49, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "module": "./src/pages/pageSignIn.ts", - "moduleName": "./src/pages/pageSignIn.ts", - "type": "cjs require", - "userRequest": "./page", - "loc": "14:31-48" - }, - { - "moduleId": 66, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 79, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 80, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignUp.ts", - "module": "./src/pages/pageSignUp.ts", - "moduleName": "./src/pages/pageSignUp.ts", - "type": "cjs require", - "userRequest": "./page", - "loc": "29:31-48" - }, - { - "moduleId": 109, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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 try {\r\n const res = this.onFirstMount(...args);\r\n if (res instanceof Promise) {\r\n yield res;\r\n }\r\n }\r\n catch (err) {\r\n console.error('PAGE MOUNT ERROR:', err);\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": 26, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\horizontalMenu.ts", - "name": "./src/components/horizontalMenu.ts", - "index": 37, - "index2": 30, - "size": 6164, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "../../components/horizontalMenu", - "loc": "42:25-67" - }, - { - "moduleId": 16, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts", - "module": "./src/lib/appManagers/appDialogsManager.ts", - "moduleName": "./src/lib/appManagers/appDialogsManager.ts", - "type": "cjs require", - "userRequest": "../../components/horizontalMenu", - "loc": "31:25-67" - }, - { - "moduleId": 24, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", - "type": "cjs require", - "userRequest": "../../components/horizontalMenu", - "loc": "55:25-67" - }, - { - "moduleId": 47, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\index.ts", - "module": "./src/components/emoticonsDropdown/index.ts", - "moduleName": "./src/components/emoticonsDropdown/index.ts", - "type": "cjs require", - "userRequest": "../horizontalMenu", - "loc": "20:25-53" - }, - { - "moduleId": 60, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\slider.ts", - "module": "./src/components/slider.ts", - "moduleName": "./src/components/slider.ts", - "type": "cjs require", - "userRequest": "./horizontalMenu", - "loc": "3:25-52" - }, - { - "moduleId": 81, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pagesManager.ts", - "module": "./src/pages/pagesManager.ts", - "moduleName": "./src/pages/pagesManager.ts", - "type": "cjs require", - "userRequest": "../components/horizontalMenu", - "loc": "8:25-64" - } - ], - "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.horizontalMenu = void 0;\r\nconst utils_1 = require(\"../lib/utils\");\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(20%)`;\r\n } else {\r\n //tabContent.style.filter = `brightness(80%)`;\r\n tabContent.style.transform = `translateX(-25%)`;\r\n prevTabContent.style.transform = `translateX(20%)`;\r\n } */\r\n const width = prevTabContent.getBoundingClientRect().width;\r\n if (toRight) {\r\n prevTabContent.style.filter = `brightness(80%)`;\r\n prevTabContent.style.transform = `translate3d(${-width * .25}px, 0, 0)`;\r\n tabContent.style.transform = `translate3d(${width}px, 0, 0)`;\r\n }\r\n else {\r\n tabContent.style.filter = `brightness(80%)`;\r\n tabContent.style.transform = `translate3d(${-width * .25}px, 0, 0)`;\r\n prevTabContent.style.transform = `translate3d(${width}px, 0, 0)`;\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 const width = prevTabContent.getBoundingClientRect().width;\r\n if (toRight) {\r\n tabContent.style.transform = `translate3d(${width}px, 0, 0)`;\r\n prevTabContent.style.transform = `translate3d(${-width}px, 0, 0)`;\r\n }\r\n else {\r\n tabContent.style.transform = `translate3d(${-width}px, 0, 0)`;\r\n prevTabContent.style.transform = `translate3d(${width}px, 0, 0)`;\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 = 250) {\r\n const hideTimeouts = {};\r\n let prevTabContent = null;\r\n let prevId = -1;\r\n const selectTab = (id) => {\r\n if (id == prevId)\r\n return false;\r\n //console.log('selectTab id:', id);\r\n const p = prevTabContent;\r\n const tabContent = content.children[id];\r\n if (content.dataset.slider == 'none') {\r\n if (p) {\r\n p.classList.remove('active');\r\n }\r\n tabContent.classList.add('active');\r\n prevId = id;\r\n prevTabContent = tabContent;\r\n if (onTransitionEnd)\r\n onTransitionEnd();\r\n return;\r\n }\r\n const toRight = prevId < id;\r\n if (prevId != -1) {\r\n if (tabs || content.dataset.slider == '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] = window.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 }, /* 420 */ transitionTime);\r\n }\r\n prevId = id;\r\n prevTabContent = tabContent;\r\n };\r\n if (tabs) {\r\n const useStripe = !tabs.classList.contains('no-stripe');\r\n const tagName = 'LI'; //tabs.firstElementChild.tagName;\r\n tabs.addEventListener('click', function (e) {\r\n let target = e.target;\r\n if (target.tagName != tagName) {\r\n target = utils_1.findUpTag(target, tagName);\r\n }\r\n //console.log('tabs click:', target);\r\n if (!target)\r\n return false;\r\n let id;\r\n if (target.dataset.tab) {\r\n id = +target.dataset.tab;\r\n if (id == -1) {\r\n return false;\r\n }\r\n }\r\n else {\r\n id = utils_1.whichChild(target);\r\n }\r\n const 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 const prev = tabs.querySelector(tagName.toLowerCase() + '.active');\r\n prev && prev.classList.remove('active');\r\n // stripe from ZINCHUK\r\n if (useStripe && prevId != -1) {\r\n const indicator = target.querySelector('i');\r\n const currentIndicator = target.parentElement.children[prevId].querySelector('i');\r\n currentIndicator.classList.remove('animate');\r\n indicator.classList.remove('animate');\r\n // We move and resize our indicator so it repeats the position and size of the previous one.\r\n const shiftLeft = currentIndicator.parentElement.parentElement.offsetLeft - indicator.parentElement.parentElement.offsetLeft;\r\n const scaleFactor = currentIndicator.clientWidth / indicator.clientWidth;\r\n indicator.style.transform = `translate3d(${shiftLeft}px, 0, 0) scale3d(${scaleFactor}, 1, 1)`;\r\n //console.log(`translate3d(${shiftLeft}px, 0, 0) scale3d(${scaleFactor}, 1, 1)`);\r\n requestAnimationFrame(() => {\r\n // Now we remove the transform to let it animate to its own position and size.\r\n indicator.classList.add('animate');\r\n indicator.style.transform = 'none';\r\n });\r\n }\r\n // stripe END\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\n" - }, - { - "id": 27, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appProfileManager.ts", - "name": "./src/lib/appManagers/appProfileManager.ts", - "index": 43, - "index2": 47, - "size": 24680, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 9, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 24, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", - "type": "cjs require", - "userRequest": "./appProfileManager", - "loc": "43:44-74" - }, - { - "moduleId": 41, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 80, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignUp.ts", - "module": "./src/pages/pageSignUp.ts", - "moduleName": "./src/pages/pageSignUp.ts", - "type": "cjs require", - "userRequest": "../lib/appManagers/appProfileManager", - "loc": "32:67-114" - }, - { - "moduleId": 94, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\editProfile.ts", - "module": "./src/components/sidebarLeft/editProfile.ts", - "moduleName": "./src/components/sidebarLeft/editProfile.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appProfileManager", - "loc": "8:44-94" - } - ], - "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 misc_1 = require(\"../../components/misc\");\r\nconst searchIndexManager_1 = __importDefault(require(\"../searchIndexManager\"));\r\nconst appMessagesManager_1 = __importDefault(require(\"./appMessagesManager\"));\r\nconst appDownloadManager_1 = __importDefault(require(\"./appDownloadManager\"));\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 appMessagesManager_1.default.savePinnedMessage(id, userFull.pinned_msg_id);\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 const 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 appMessagesManager_1.default.savePinnedMessage(-id, fullChat.pinned_msg_id);\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 /* public getChatInviteLink(id: number, force?: boolean) {\r\n return this.getChatFull(id).then((chatFull: any) => {\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 \r\n let promise;\r\n if(appChatsManager.isChannel(id)) {\r\n promise = apiManager.invokeApi('channels.exportInvite', {\r\n channel: appChatsManager.getChannelInput(id)\r\n });\r\n } else {\r\n promise = apiManager.invokeApi('messages.exportChatInvite', {\r\n chat_id: id\r\n });\r\n }\r\n \r\n return promise.then((exportedInvite: any) => {\r\n if(this.chatsFull[id] !== undefined) {\r\n this.chatsFull[id].exported_invite = exportedInvite;\r\n }\r\n \r\n return exportedInvite.link;\r\n });\r\n });\r\n } */\r\n /* public getChannelParticipants(id: number, filter: any, limit: number, offset: number) {\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 \r\n if(filter._ == 'channelParticipantsRecent') {\r\n let chat = appChatsManager.getChat(id);\r\n if(chat &&\r\n chat.pFlags && (\r\n chat.pFlags.kicked ||\r\n chat.pFlags.broadcast && !chat.pFlags.creator && !chat.admin_rights\r\n )) {\r\n return Promise.reject();\r\n }\r\n }\r\n \r\n let fetchParticipants = (cachedParticipants?: any[]) => {\r\n let hash = 0;\r\n if(cachedParticipants) {\r\n let userIDs: number[] = [];\r\n cachedParticipants.forEach((participant: any) => {\r\n userIDs.push(participant.user_id);\r\n });\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 \r\n return apiManager.invokeApi('channels.getParticipants', {\r\n channel: appChatsManager.getChannelInput(id),\r\n filter: filter,\r\n offset: offset,\r\n limit: limit,\r\n hash: hash\r\n }).then((result: any) => {\r\n if(result._ == 'channels.channelParticipantsNotModified') {\r\n return cachedParticipants;\r\n }\r\n \r\n appUsersManager.saveApiUsers(result.users);\r\n return result.participants;\r\n });\r\n }\r\n \r\n let maybeAddSelf = (participants: any[]) => {\r\n let chat = appChatsManager.getChat(id);\r\n let selfMustBeFirst = filter._ == 'channelParticipantsRecent' &&\r\n !offset &&\r\n !chat.pFlags.kicked &&\r\n !chat.pFlags.left;\r\n \r\n if(selfMustBeFirst) {\r\n participants = copy(participants);\r\n let myID = appUsersManager.getSelf().id;\r\n let myIndex = participants.findIndex(p => p.user_id == myID);\r\n let myParticipant;\r\n \r\n if(myIndex !== -1) {\r\n myParticipant = participants[myIndex];\r\n participants.splice(myIndex, 1);\r\n } else {\r\n myParticipant = {_: 'channelParticipantSelf', user_id: myID};\r\n }\r\n \r\n participants.unshift(myParticipant);\r\n }\r\n \r\n return participants;\r\n }\r\n \r\n let timeNow = 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: any) => {\r\n return fetchParticipants(cachedParticipants).then(maybeAddSelf)\r\n });\r\n this.chatParticipantsPromises[promiseKey] = [timeNow, newPromise];\r\n return newPromise;\r\n }\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 appMessagesManager_1.default.savePinnedMessage(-id, fullChannel.pinned_msg_id);\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 putAvatar(div, peerID, location) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const inputPeer = appPeersManager_1.default.getInputPeerByID(peerID);\r\n if (!this.savedAvatarURLs[peerID]) {\r\n //console.warn('will invoke downloadSmallFile:', peerID);\r\n const peerPhotoFileLocation = {\r\n _: 'inputPeerPhotoFileLocation',\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 const downloadOptions = { dcID: location.dc_id, location: peerPhotoFileLocation };\r\n yield appDownloadManager_1.default.download(downloadOptions).then(blob => {\r\n this.savedAvatarURLs[peerID] = URL.createObjectURL(blob);\r\n });\r\n }\r\n const img = new Image();\r\n const cached = misc_1.renderImageFromUrl(img, this.savedAvatarURLs[peerID]);\r\n if (cached) {\r\n // смотри в misc.ts: renderImageFromUrl\r\n //img.addEventListener('load', () => {\r\n div.innerHTML = '';\r\n div.append(img);\r\n //});\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 });\r\n }\r\n // peerID == peerID || title\r\n putPhoto(div, peerID, isDialog = false, title = '') {\r\n var _a;\r\n const location = appPeersManager_1.default.getPeerPhoto(peerID);\r\n const avatarAvailable = location && !location.empty && location.photo_small;\r\n const avatarRendered = !!div.firstElementChild;\r\n const myID = utils_1.$rootScope.myID;\r\n //console.log('loadDialogPhoto location:', location, inputPeer);\r\n if (peerID == myID && isDialog) {\r\n div.innerHTML = '';\r\n div.style.backgroundColor = '';\r\n div.classList.add('tgico-savedmessages');\r\n div.classList.remove('tgico-avatar_deletedaccount');\r\n return;\r\n }\r\n if (peerID > 0) {\r\n const user = appUsersManager_1.default.getUser(peerID);\r\n if (user && user.pFlags && user.pFlags.deleted) {\r\n div.innerHTML = '';\r\n div.style.backgroundColor = '';\r\n div.classList.add('tgico-avatar_deletedaccount');\r\n return;\r\n }\r\n }\r\n if (!avatarAvailable || !avatarRendered || !this.savedAvatarURLs[peerID]) {\r\n let color = '';\r\n if (peerID && peerID != myID) {\r\n color = appPeersManager_1.default.getPeerColorByID(peerID);\r\n }\r\n div.innerHTML = '';\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 (avatarAvailable) {\r\n this.putAvatar(div, peerID, location);\r\n }\r\n }\r\n}\r\nexports.AppProfileManager = AppProfileManager;\r\nexports.default = new AppProfileManager();\r\n" - }, - { - "id": 28, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDownloadManager.ts", - "name": "./src/lib/appManagers/appDownloadManager.ts", - "index": 46, - "index2": 36, - "size": 5623, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "issuerId": 7, - "issuerName": "./src/lib/appManagers/appMessagesManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "name": "./src/lib/appManagers/appMessagesManager.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 2083, - "building": 945, - "dependencies": 16 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 7, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "module": "./src/lib/appManagers/appMessagesManager.ts", - "moduleName": "./src/lib/appManagers/appMessagesManager.ts", - "type": "cjs require", - "userRequest": "./appDownloadManager", - "loc": "38:45-76" - }, - { - "moduleId": 12, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDocsManager.ts", - "module": "./src/lib/appManagers/appDocsManager.ts", - "moduleName": "./src/lib/appManagers/appDocsManager.ts", - "type": "cjs require", - "userRequest": "./appDownloadManager", - "loc": "19:45-76" - }, - { - "moduleId": 13, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appPhotosManager.ts", - "module": "./src/lib/appManagers/appPhotosManager.ts", - "moduleName": "./src/lib/appManagers/appPhotosManager.ts", - "type": "cjs require", - "userRequest": "./appDownloadManager", - "loc": "9:45-76" - }, - { - "moduleId": 27, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appProfileManager.ts", - "module": "./src/lib/appManagers/appProfileManager.ts", - "moduleName": "./src/lib/appManagers/appProfileManager.ts", - "type": "cjs require", - "userRequest": "./appDownloadManager", - "loc": "30:45-76" - }, - { - "moduleId": 46, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popupAvatar.ts", - "module": "./src/components/popupAvatar.ts", - "moduleName": "./src/components/popupAvatar.ts", - "type": "cjs require", - "userRequest": "../lib/appManagers/appDownloadManager", - "loc": "8:45-93" - }, - { - "moduleId": 102, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\stickers.ts", - "module": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "type": "cjs require", - "userRequest": "../../../lib/appManagers/appDownloadManager", - "loc": "38:45-99" - } - ], - "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.AppDownloadManager = void 0;\r\nconst utils_1 = require(\"../utils\");\r\nconst mtprotoworker_1 = __importDefault(require(\"../mtproto/mtprotoworker\"));\r\nconst cancellablePromise_1 = require(\"../../helpers/cancellablePromise\");\r\nconst bin_utils_1 = require(\"../bin_utils\");\r\nclass AppDownloadManager {\r\n constructor() {\r\n this.downloads = {};\r\n this.progress = {};\r\n this.progressCallbacks = {};\r\n this.uploadID = 0;\r\n utils_1.$rootScope.$on('download_progress', (e) => {\r\n const details = e.detail;\r\n this.progress[details.fileName] = details;\r\n const callbacks = this.progressCallbacks[details.fileName];\r\n if (callbacks) {\r\n callbacks.forEach(callback => callback(details));\r\n }\r\n const download = this.downloads[details.fileName];\r\n if (download) {\r\n download.notifyAll(details);\r\n }\r\n });\r\n }\r\n getNewDeferred(fileName) {\r\n const deferred = cancellablePromise_1.deferredPromise();\r\n deferred.cancel = () => {\r\n const error = new Error('Download canceled');\r\n error.name = 'AbortError';\r\n mtprotoworker_1.default.cancelDownload(fileName);\r\n this.clearDownload(fileName);\r\n deferred.reject(error);\r\n deferred.cancel = () => { };\r\n };\r\n deferred.finally(() => {\r\n delete this.progress[fileName];\r\n delete this.progressCallbacks[fileName];\r\n });\r\n return this.downloads[fileName] = deferred;\r\n }\r\n clearDownload(fileName) {\r\n delete this.downloads[fileName];\r\n }\r\n download(options) {\r\n const fileName = bin_utils_1.getFileNameByLocation(options.location, { fileName: options.fileName });\r\n if (this.downloads.hasOwnProperty(fileName))\r\n return this.downloads[fileName];\r\n const deferred = this.getNewDeferred(fileName);\r\n mtprotoworker_1.default.downloadFile(options).then(deferred.resolve, deferred.reject);\r\n //console.log('Will download file:', fileName, url);\r\n return deferred;\r\n }\r\n upload(file, fileName) {\r\n if (!fileName) {\r\n const mimeType = file === null || file === void 0 ? void 0 : file.type;\r\n if (mimeType) { // the same like apiFileName in appMessagesManager for upload!\r\n const ext = this.uploadID++ + '.' + mimeType.split('/')[1];\r\n if (['image/jpeg', 'image/png', 'image/bmp'].indexOf(mimeType) >= 0) {\r\n fileName = 'photo' + ext;\r\n }\r\n else if (mimeType.indexOf('audio/') === 0 || ['video/ogg'].indexOf(mimeType) >= 0) {\r\n fileName = 'audio' + ext;\r\n }\r\n else if (mimeType.indexOf('video/') === 0) {\r\n fileName = 'video' + ext;\r\n }\r\n else {\r\n fileName = 'document' + ext;\r\n }\r\n }\r\n else {\r\n fileName = 'upload-' + this.uploadID++;\r\n }\r\n }\r\n const deferred = this.getNewDeferred(fileName);\r\n mtprotoworker_1.default.uploadFile({ file, fileName }).then(deferred.resolve, deferred.reject);\r\n deferred.finally(() => {\r\n this.clearDownload(fileName);\r\n });\r\n return deferred;\r\n }\r\n getDownload(fileName) {\r\n return this.downloads[fileName];\r\n }\r\n addProgressCallback(fileName, callback) {\r\n var _a;\r\n const progress = this.progress[fileName];\r\n ((_a = this.progressCallbacks[fileName]) !== null && _a !== void 0 ? _a : (this.progressCallbacks[fileName] = [])).push(callback);\r\n if (progress) {\r\n callback(progress);\r\n }\r\n }\r\n createDownloadAnchor(url, fileName, onRemove) {\r\n const a = document.createElement('a');\r\n a.href = url;\r\n a.download = fileName;\r\n a.target = '_blank';\r\n a.style.position = 'absolute';\r\n a.style.top = '1px';\r\n a.style.left = '1px';\r\n document.body.append(a);\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 a.dispatchEvent(clickEvent);\r\n }\r\n catch (e) {\r\n console.error('Download click error', e);\r\n try {\r\n a.click();\r\n }\r\n catch (e) {\r\n window.open(url, '_blank');\r\n }\r\n }\r\n setTimeout(() => {\r\n a.remove();\r\n onRemove && onRemove();\r\n }, 100);\r\n }\r\n /* public downloadToDisc(fileName: string, url: string) {\r\n this.createDownloadAnchor(url);\r\n \r\n return this.download(fileName, url);\r\n } */\r\n downloadToDisc(options, discFileName) {\r\n const download = this.download(options);\r\n download /* .promise */.then(blob => {\r\n const objectURL = URL.createObjectURL(blob);\r\n this.createDownloadAnchor(objectURL, discFileName, () => {\r\n URL.revokeObjectURL(objectURL);\r\n });\r\n });\r\n return download;\r\n }\r\n}\r\nexports.AppDownloadManager = AppDownloadManager;\r\nexports.default = new AppDownloadManager();\r\n" - }, - { - "id": 29, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\searchInput.ts", - "name": "./src/components/searchInput.ts", - "index": 76, - "index2": 69, - "size": 2054, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "issuerId": 24, - "issuerName": "./src/lib/appManagers/appSidebarRight.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 24, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "name": "./src/lib/appManagers/appSidebarRight.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 1584, - "building": 1606, - "dependencies": 2 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 14, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "module": "./src/lib/appManagers/appSidebarLeft.ts", - "moduleName": "./src/lib/appManagers/appSidebarLeft.ts", - "type": "cjs require", - "userRequest": "../../components/searchInput", - "loc": "45:38-77" - }, - { - "moduleId": 24, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", - "type": "cjs require", - "userRequest": "../../components/searchInput", - "loc": "54:38-77" - }, - { - "moduleId": 85, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\stickers.ts", - "module": "./src/components/sidebarRight/stickers.ts", - "moduleName": "./src/components/sidebarRight/stickers.ts", - "type": "cjs require", - "userRequest": "../searchInput", - "loc": "25:38-63" - }, - { - "moduleId": 87, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\gifs.ts", - "module": "./src/components/sidebarRight/gifs.ts", - "moduleName": "./src/components/sidebarRight/gifs.ts", - "type": "cjs require", - "userRequest": "../searchInput", - "loc": "34:38-63" - }, - { - "moduleId": 91, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\contacts.ts", - "module": "./src/components/sidebarLeft/contacts.ts", - "moduleName": "./src/components/sidebarLeft/contacts.ts", - "type": "cjs require", - "userRequest": "../searchInput", - "loc": "31:38-63" - }, - { - "moduleId": 107, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\search.ts", - "module": "./src/components/chat/search.ts", - "moduleName": "./src/components/chat/search.ts", - "type": "cjs require", - "userRequest": "../searchInput", - "loc": "31: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\nclass SearchInput {\r\n constructor(placeholder, onChange) {\r\n this.prevValue = '';\r\n this.timeout = 0;\r\n this.onInput = () => {\r\n if (!this.onChange)\r\n return;\r\n let value = this.input.value;\r\n //this.input.classList.toggle('is-empty', !value.trim());\r\n if (value != this.prevValue) {\r\n this.prevValue = value;\r\n clearTimeout(this.timeout);\r\n this.timeout = setTimeout(() => {\r\n this.onChange(value);\r\n }, 200);\r\n }\r\n };\r\n this.onClearClick = () => {\r\n this.value = '';\r\n this.onChange && this.onChange('');\r\n };\r\n this.container = document.createElement('div');\r\n this.container.classList.add('input-search');\r\n this.onChange = onChange;\r\n this.input = document.createElement('input');\r\n this.input.type = 'text';\r\n this.input.placeholder = placeholder;\r\n this.input.autocomplete = Math.random().toString(36).substring(7);\r\n const searchIcon = document.createElement('span');\r\n searchIcon.classList.add('tgico', 'tgico-search');\r\n this.clearBtn = document.createElement('span');\r\n this.clearBtn.classList.add('tgico', 'btn-icon', 'tgico-close');\r\n this.input.addEventListener('input', this.onInput);\r\n this.clearBtn.addEventListener('click', this.onClearClick);\r\n this.container.append(this.input, searchIcon, this.clearBtn);\r\n }\r\n get value() {\r\n return this.input.value;\r\n }\r\n set value(value) {\r\n this.input.value = value;\r\n this.prevValue = value;\r\n clearTimeout(this.timeout);\r\n }\r\n remove() {\r\n clearTimeout(this.timeout);\r\n this.input.removeEventListener('input', this.onInput);\r\n this.clearBtn.removeEventListener('click', this.onClearClick);\r\n }\r\n}\r\nexports.default = SearchInput;\r\n" - }, - { - "id": 30, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto_config.ts", - "name": "./src/lib/mtproto/mtproto_config.ts", - "index": 12, - "index2": 9, - "size": 467, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\storage.ts", - "issuerId": 19, - "issuerName": "./src/lib/storage.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\storage.ts", - "name": "./src/lib/storage.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - } - ], - "profile": { - "factory": 729, - "building": 176 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 19, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 49, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "module": "./src/pages/pageSignIn.ts", - "moduleName": "./src/pages/pageSignIn.ts", - "type": "cjs require", - "userRequest": "../lib/mtproto/mtproto_config", - "loc": "15:25-65" - }, - { - "moduleId": 79, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 82, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 109, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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: false,\r\n ssl: true,\r\n multipleConnections: true\r\n};\r\n" - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "index": 32, - "index2": 105, - "size": 4653, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "issuerId": 67, - "issuerName": "./src/index.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - } - ], - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 66, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pagePassword.ts", - "module": "./src/pages/pagePassword.ts", - "moduleName": "./src/pages/pagePassword.ts", - "type": "cjs require", - "userRequest": "./pageIm", - "loc": "6:33-52" - }, - { - "moduleId": 67, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "module": "./src/index.ts", - "moduleName": "./src/index.ts", - "type": "cjs require", - "userRequest": "./pages/pageIm", - "loc": "136:57-82" - }, - { - "moduleId": 79, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageAuthCode.ts", - "module": "./src/pages/pageAuthCode.ts", - "moduleName": "./src/pages/pageAuthCode.ts", - "type": "cjs require", - "userRequest": "./pageIm", - "loc": "8:33-52" - }, - { - "moduleId": 80, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignUp.ts", - "module": "./src/pages/pageSignUp.ts", - "moduleName": "./src/pages/pageSignUp.ts", - "type": "cjs require", - "userRequest": "./pageIm", - "loc": "26:33-52" - }, - { - "moduleId": 109, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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 const promise = Promise.resolve().then(() => __importStar(require('../lib/appManagers/appImManager')));\r\n promise.finally(() => {\r\n //alert('pageIm!');\r\n //AudioContext && global.navigator && global.navigator.mediaDevices && global.navigator.mediaDevices.getUserMedia && global.WebAssembly;\r\n /* // @ts-ignore\r\n var AudioContext = globalThis.AudioContext || globalThis.webkitAudioContext;\r\n alert('AudioContext:' + typeof(AudioContext));\r\n // @ts-ignore\r\n alert('global.navigator:' + typeof(navigator));\r\n alert('navigator.mediaDevices:' + typeof(navigator.mediaDevices));\r\n alert('navigator.mediaDevices.getUserMedia:' + typeof(navigator.mediaDevices?.getUserMedia));\r\n alert('global.WebAssembly:' + typeof(WebAssembly)); */\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 //cancelEvent(e);\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 //let promise = /* Promise.resolve() */.then(() => {//import('../lib/services').then(services => {\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 //});\r\n return promise;\r\n};\r\nconst page = new page_1.default('page-chats', false, onFirstMount);\r\nexports.default = page;\r\n" - }, - { - "id": 32, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\apiUpdatesManager.ts", - "name": "./src/lib/appManagers/apiUpdatesManager.ts", - "index": 41, - "index2": 34, - "size": 21143, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "issuerId": 7, - "issuerName": "./src/lib/appManagers/appMessagesManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "name": "./src/lib/appManagers/appMessagesManager.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 2083, - "building": 945, - "dependencies": 16 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 7, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "module": "./src/lib/appManagers/appMessagesManager.ts", - "moduleName": "./src/lib/appManagers/appMessagesManager.ts", - "type": "cjs require", - "userRequest": "./apiUpdatesManager", - "loc": "23:44-74" - }, - { - "moduleId": 9, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 27, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 39, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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" - }, - { - "moduleId": 40, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appStateManager.ts", - "module": "./src/lib/appManagers/appStateManager.ts", - "moduleName": "./src/lib/appManagers/appStateManager.ts", - "type": "cjs require", - "userRequest": "./apiUpdatesManager", - "loc": "13:44-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.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\nconst logger_1 = require(\"../logger\");\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 this.log = logger_1.logger('UPDATES', logger_1.LogLevels.error);\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 // this.log('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 this.log('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 this.log.warn('Unknown update message', updateMessage);\r\n }\r\n }\r\n getDifference() {\r\n // this.trace('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 flags: 0,\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 this.log('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 if (differenceResult._ != 'updates.differenceTooLong') {\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 // this.log('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 // this.log('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._ == 'updates.difference' ? differenceResult.state : differenceResult.intermediate_state;\r\n updatesState.seq = nextState.seq;\r\n updatesState.pts = nextState.pts;\r\n updatesState.date = nextState.date;\r\n }\r\n else {\r\n updatesState.pts = differenceResult.pts;\r\n delete updatesState.seq;\r\n delete updatesState.date;\r\n }\r\n // this.log('apply diff', updatesState.seq, updatesState.pts)\r\n if (differenceResult._ == 'updates.differenceSlice') {\r\n this.getDifference();\r\n }\r\n else {\r\n // this.log('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 const 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 // this.log('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 // this.log('channel diff result', differenceResult)\r\n channelState.pts = 'pts' in differenceResult ? differenceResult.pts : undefined;\r\n if (differenceResult._ == 'updates.channelDifferenceEmpty') {\r\n this.log('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 this.log('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 this.log('applying', differenceResult.other_updates.length, 'channel other updates');\r\n differenceResult.other_updates.forEach((update) => {\r\n this.saveUpdate(update);\r\n });\r\n this.log('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 this.log('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 this.log('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 // this.log.log('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 // this.log.trace('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 this.log.warn('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 // this.log.log('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 this.log.warn('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 // this.log.warn('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 this.log.warn('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 //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": 33, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesIDsManager.ts", - "name": "./src/lib/appManagers/appMessagesIDsManager.ts", - "index": 44, - "index2": 35, - "size": 2147, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "issuerId": 7, - "issuerName": "./src/lib/appManagers/appMessagesManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "name": "./src/lib/appManagers/appMessagesManager.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 2083, - "building": 945, - "dependencies": 16 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 7, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 27, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 40, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appStateManager.ts", - "module": "./src/lib/appManagers/appStateManager.ts", - "moduleName": "./src/lib/appManagers/appStateManager.ts", - "type": "cjs require", - "userRequest": "./appMessagesIDsManager", - "loc": "9:48-82" - }, - { - "moduleId": 43, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 62, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 34, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\serverTimeManager.ts", - "name": "./src/lib/mtproto/serverTimeManager.ts", - "index": 50, - "index2": 40, - "size": 1249, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignQR.ts", - "issuerId": 109, - "issuerName": "./src/pages/pageSignQR.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 49, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "name": "./src/pages/pageSignIn.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 109, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignQR.ts", - "name": "./src/pages/pageSignQR.ts", - "profile": { - "factory": 104, - "building": 1053, - "dependencies": 527 - } - } - ], - "profile": { - "factory": 7122, - "building": 761, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 5, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appUsersManager.ts", - "module": "./src/lib/appManagers/appUsersManager.ts", - "moduleName": "./src/lib/appManagers/appUsersManager.ts", - "type": "cjs require", - "userRequest": "../mtproto/serverTimeManager", - "loc": "21:44-83" - }, - { - "moduleId": 7, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "module": "./src/lib/appManagers/appMessagesManager.ts", - "moduleName": "./src/lib/appManagers/appMessagesManager.ts", - "type": "cjs require", - "userRequest": "../mtproto/serverTimeManager", - "loc": "27:44-83" - }, - { - "moduleId": 7, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "module": "./src/lib/appManagers/appMessagesManager.ts", - "moduleName": "./src/lib/appManagers/appMessagesManager.ts", - "type": "cjs require", - "userRequest": "../mtproto/serverTimeManager", - "loc": "30:44-83" - }, - { - "moduleId": 58, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\poll.ts", - "module": "./src/components/poll.ts", - "moduleName": "./src/components/poll.ts", - "type": "cjs require", - "userRequest": "../lib/mtproto/serverTimeManager", - "loc": "13:44-87" - }, - { - "moduleId": 109, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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, 0, 0, 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": 35, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\preloader.ts", - "name": "./src/components/preloader.ts", - "index": 53, - "index2": 43, - "size": 4241, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 7, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "module": "./src/lib/appManagers/appMessagesManager.ts", - "moduleName": "./src/lib/appManagers/appMessagesManager.ts", - "type": "cjs require", - "userRequest": "../../components/preloader", - "loc": "29:36-73" - }, - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "../../components/preloader", - "loc": "23:36-73" - }, - { - "moduleId": 18, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "module": "./src/components/wrappers.ts", - "moduleName": "./src/components/wrappers.ts", - "type": "cjs require", - "userRequest": "./preloader", - "loc": "20:36-58" - }, - { - "moduleId": 56, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 84, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\audio.ts", - "module": "./src/components/audio.ts", - "moduleName": "./src/components/audio.ts", - "type": "cjs require", - "userRequest": "./preloader", - "loc": "10: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, streamable = false) {\r\n this.cancelable = cancelable;\r\n this.tempID = 0;\r\n this.detached = true;\r\n this.promise = null;\r\n this.preloader = document.createElement('div');\r\n this.preloader.classList.add('preloader-container');\r\n if (streamable) {\r\n this.preloader.classList.add('preloader-streamable');\r\n }\r\n this.preloader.innerHTML = `\r\n
\r\n \r\n \r\n \r\n
`;\r\n if (cancelable) {\r\n this.preloader.innerHTML += `\r\n \r\n \r\n \r\n `;\r\n }\r\n else {\r\n this.preloader.classList.add('preloader-swing');\r\n }\r\n this.circle = this.preloader.firstElementChild.firstElementChild.firstElementChild;\r\n if (elem) {\r\n this.attach(elem);\r\n }\r\n if (this.cancelable) {\r\n this.preloader.addEventListener('click', (e) => {\r\n utils_1.cancelEvent(e);\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 attachPromise(promise) {\r\n this.promise = promise;\r\n const tempID = --this.tempID;\r\n const onEnd = () => {\r\n promise.notify = null;\r\n if (tempID == this.tempID) {\r\n this.detach();\r\n this.promise = promise = null;\r\n }\r\n };\r\n //promise.catch(onEnd);\r\n promise.finally(onEnd);\r\n if (promise.addNotifyListener) {\r\n promise.addNotifyListener((details) => {\r\n /* if(details.done >= details.total) {\r\n onEnd();\r\n } */\r\n if (tempID != this.tempID)\r\n return;\r\n //console.log('preloader download', promise, details);\r\n const percents = details.done / details.total * 100;\r\n this.setProgress(percents);\r\n });\r\n }\r\n }\r\n attach(elem, reset = true, promise, append = true) {\r\n if (promise /* && false */) {\r\n this.attachPromise(promise);\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 if (this.cancelable && reset) {\r\n this.setProgress(0);\r\n }\r\n });\r\n }\r\n detach() {\r\n this.detached = true;\r\n //return;\r\n if (this.preloader.parentElement) {\r\n /* setTimeout(() => */ 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.remove();\r\n }\r\n }) /* , 5e3) */;\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 try {\r\n const 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 catch (err) { }\r\n }\r\n}\r\nexports.default = ProgressivePreloader;\r\n" - }, - { - "id": 36, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popup.ts", - "name": "./src/components/popup.ts", - "index": 59, - "index2": 53, - "size": 4304, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts", - "issuerId": 16, - "issuerName": "./src/lib/appManagers/appDialogsManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 16, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts", - "name": "./src/lib/appManagers/appDialogsManager.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 1799, - "building": 966, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 16, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts", - "module": "./src/lib/appManagers/appDialogsManager.ts", - "moduleName": "./src/lib/appManagers/appDialogsManager.ts", - "type": "cjs require", - "userRequest": "../../components/popup", - "loc": "28:16-49" - }, - { - "moduleId": 61, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popupStickers.ts", - "module": "./src/components/popupStickers.ts", - "moduleName": "./src/components/popupStickers.ts", - "type": "cjs require", - "userRequest": "./popup", - "loc": "6:16-34" - }, - { - "moduleId": 65, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popupDatepicker.ts", - "module": "./src/components/popupDatepicker.ts", - "moduleName": "./src/components/popupDatepicker.ts", - "type": "cjs require", - "userRequest": "./popup", - "loc": "3:16-34" - }, - { - "moduleId": 103, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popupCreatePoll.ts", - "module": "./src/components/popupCreatePoll.ts", - "moduleName": "./src/components/popupCreatePoll.ts", - "type": "cjs require", - "userRequest": "./popup", - "loc": "6:16-34" - }, - { - "moduleId": 106, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\contextMenu.ts", - "module": "./src/components/chat/contextMenu.ts", - "moduleName": "./src/components/chat/contextMenu.ts", - "type": "cjs require", - "userRequest": "../popup", - "loc": "14:16-35" - } - ], - "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.PopupPeer = exports.PopupElement = void 0;\r\nconst avatar_1 = __importDefault(require(\"./avatar\"));\r\nconst ripple_1 = require(\"./ripple\");\r\nclass PopupElement {\r\n constructor(className, buttons, options = {}) {\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 if (options.closable) {\r\n this.closeBtn = document.createElement('span');\r\n this.closeBtn.classList.add('btn-icon', 'popup-close', 'tgico-close');\r\n ripple_1.ripple(this.closeBtn);\r\n this.header.prepend(this.closeBtn);\r\n this.closeBtn.addEventListener('click', () => {\r\n this.destroy();\r\n }, { once: true });\r\n }\r\n if (options.withConfirm) {\r\n this.confirmBtn = document.createElement('button');\r\n this.confirmBtn.classList.add('btn-primary');\r\n this.confirmBtn.innerText = options.withConfirm;\r\n this.header.append(this.confirmBtn);\r\n ripple_1.ripple(this.confirmBtn);\r\n }\r\n this.container.append(this.header);\r\n if (options.body) {\r\n this.body = document.createElement('div');\r\n this.body.classList.add('popup-body');\r\n this.container.append(this.body);\r\n }\r\n if (buttons && buttons.length) {\r\n const buttonsDiv = document.createElement('div');\r\n buttonsDiv.classList.add('popup-buttons');\r\n const buttonsElements = buttons.map(b => {\r\n const button = document.createElement('button');\r\n button.className = 'btn' + (b.isDanger ? ' danger' : '');\r\n button.innerHTML = b.text;\r\n ripple_1.ripple(button);\r\n if (b.callback) {\r\n button.addEventListener('click', () => {\r\n b.callback();\r\n this.destroy();\r\n }, { once: true });\r\n }\r\n else if (b.isCancel) {\r\n button.addEventListener('click', () => {\r\n this.destroy();\r\n }, { once: true });\r\n }\r\n return button;\r\n });\r\n buttonsDiv.append(...buttonsElements);\r\n this.container.append(buttonsDiv);\r\n }\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.onClose && this.onClose();\r\n this.element.classList.remove('active');\r\n setTimeout(() => {\r\n this.element.remove();\r\n this.onCloseAfterTimeout && this.onCloseAfterTimeout();\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 : ''), options.buttons);\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 this.container.insertBefore(p, this.header.nextElementSibling);\r\n }\r\n}\r\nexports.PopupPeer = PopupPeer;\r\n" - }, - { - "id": 37, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\appMediaPlaybackController.ts", - "name": "./src/components/appMediaPlaybackController.ts", - "index": 64, - "index2": 55, - "size": 7871, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts", - "issuerId": 56, - "issuerName": "./src/lib/appManagers/appMediaViewer.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 56, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts", - "name": "./src/lib/appManagers/appMediaViewer.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 1374, - "building": 1210, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 18, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "module": "./src/components/wrappers.ts", - "moduleName": "./src/components/wrappers.ts", - "type": "cjs require", - "userRequest": "./appMediaPlaybackController", - "loc": "32:53-92" - }, - { - "moduleId": 50, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mediaPlayer.ts", - "module": "./src/lib/mediaPlayer.ts", - "moduleName": "./src/lib/mediaPlayer.ts", - "type": "cjs require", - "userRequest": "../components/appMediaPlaybackController", - "loc": "9:53-104" - }, - { - "moduleId": 56, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts", - "module": "./src/lib/appManagers/appMediaViewer.ts", - "moduleName": "./src/lib/appManagers/appMediaViewer.ts", - "type": "cjs require", - "userRequest": "../../components/appMediaPlaybackController", - "loc": "29:53-107" - }, - { - "moduleId": 84, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\audio.ts", - "module": "./src/components/audio.ts", - "moduleName": "./src/components/audio.ts", - "type": "cjs require", - "userRequest": "./appMediaPlaybackController", - "loc": "12:53-92" - }, - { - "moduleId": 105, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\audio.ts", - "module": "./src/components/chat/audio.ts", - "moduleName": "./src/components/chat/audio.ts", - "type": "cjs require", - "userRequest": "../appMediaPlaybackController", - "loc": "12:53-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(\"../lib/utils\");\r\nconst appMessagesManager_1 = __importDefault(require(\"../lib/appManagers/appMessagesManager\"));\r\nconst appDocsManager_1 = __importDefault(require(\"../lib/appManagers/appDocsManager\"));\r\nconst config_1 = require(\"../lib/config\");\r\nconst cancellablePromise_1 = require(\"../helpers/cancellablePromise\");\r\nclass AppMediaPlaybackController {\r\n constructor() {\r\n this.media = {};\r\n this.waitingMediaForLoad = {};\r\n this.onPause = (e) => {\r\n utils_1.$rootScope.$broadcast('audio_pause');\r\n };\r\n this.onEnded = (e) => {\r\n this.onPause(e);\r\n //console.log('on media end');\r\n if (this.nextMid) {\r\n const media = this.media[this.nextMid];\r\n /* if(isSafari) {\r\n media.autoplay = true;\r\n } */\r\n this.resolveWaitingForLoadMedia(this.nextMid);\r\n setTimeout(() => {\r\n media.play(); //.catch(() => {});\r\n }, 0);\r\n }\r\n };\r\n this.container = document.createElement('div');\r\n //this.container.style.cssText = 'position: absolute; top: -10000px; left: -10000px;';\r\n this.container.style.cssText = 'display: none;';\r\n document.body.append(this.container);\r\n }\r\n addMedia(doc, mid, autoload = true) {\r\n if (this.media[mid])\r\n return this.media[mid];\r\n const media = document.createElement(doc.type == 'round' ? 'video' : 'audio');\r\n //const source = document.createElement('source');\r\n //source.type = doc.type == 'voice' && !opusDecodeController.isPlaySupported() ? 'audio/wav' : doc.mime_type;\r\n if (doc.type == 'round') {\r\n media.setAttribute('playsinline', '');\r\n }\r\n media.dataset.mid = '' + mid;\r\n media.dataset.type = doc.type;\r\n //media.autoplay = true;\r\n media.volume = 1;\r\n //media.append(source);\r\n this.container.append(media);\r\n media.addEventListener('playing', () => {\r\n if (this.playingMedia != media) {\r\n if (this.playingMedia && !this.playingMedia.paused) {\r\n this.playingMedia.pause();\r\n }\r\n this.playingMedia = media;\r\n this.loadSiblingsMedia(doc.type, mid);\r\n }\r\n // audio_pause не успеет сработать без таймаута\r\n setTimeout(() => {\r\n utils_1.$rootScope.$broadcast('audio_play', { doc, mid });\r\n }, 0);\r\n });\r\n media.addEventListener('pause', this.onPause);\r\n media.addEventListener('ended', this.onEnded);\r\n const onError = (e) => {\r\n if (this.nextMid == mid) {\r\n this.loadSiblingsMedia(doc.type, mid).then(() => {\r\n if (this.nextMid && this.media[this.nextMid]) {\r\n this.media[this.nextMid].play();\r\n }\r\n });\r\n }\r\n };\r\n media.addEventListener('error', onError);\r\n const deferred = cancellablePromise_1.deferredPromise();\r\n if (autoload) {\r\n deferred.resolve();\r\n }\r\n else {\r\n this.waitingMediaForLoad[mid] = deferred;\r\n }\r\n // если что - загрузит voice или round заранее, так правильнее\r\n const downloadPromise = !doc.supportsStreaming ? appDocsManager_1.default.downloadDocNew(doc) : Promise.resolve();\r\n Promise.all([deferred, downloadPromise]).then(() => {\r\n //media.autoplay = true;\r\n //console.log('will set media url:', media, doc, doc.type, doc.url);\r\n if (doc.type == 'audio' && doc.supportsStreaming && config_1.isSafari) {\r\n this.handleSafariStreamable(media);\r\n }\r\n media.src = doc.url;\r\n }, onError);\r\n return this.media[mid] = media;\r\n }\r\n // safari подгрузит последний чанк и песня включится,\r\n // при этом этот чанк нельзя руками отдать из SW, потому что браузер тогда теряется\r\n handleSafariStreamable(media) {\r\n media.addEventListener('play', () => {\r\n /* if(media.readyState == 4) { // https://developer.mozilla.org/ru/docs/Web/API/XMLHttpRequest/readyState\r\n return;\r\n } */\r\n //media.volume = 0;\r\n const currentTime = media.currentTime;\r\n //this.setSafariBuffering(media, true);\r\n media.addEventListener('progress', () => {\r\n media.currentTime = media.duration - 1;\r\n media.addEventListener('progress', () => {\r\n media.currentTime = currentTime;\r\n //media.volume = 1;\r\n //this.setSafariBuffering(media, false);\r\n if (!media.paused) {\r\n media.play() /* .catch(() => {}) */;\r\n }\r\n }, { once: true });\r\n }, { once: true });\r\n } /* , {once: true} */);\r\n }\r\n resolveWaitingForLoadMedia(mid) {\r\n const promise = this.waitingMediaForLoad[mid];\r\n if (promise) {\r\n promise.resolve();\r\n delete this.waitingMediaForLoad[mid];\r\n }\r\n }\r\n /**\r\n * Only for audio\r\n */\r\n isSafariBuffering(media) {\r\n /// @ts-ignore\r\n return !!media.safariBuffering;\r\n }\r\n setSafariBuffering(media, value) {\r\n // @ts-ignore\r\n media.safariBuffering = value;\r\n }\r\n loadSiblingsMedia(type, mid) {\r\n const media = this.playingMedia;\r\n const message = appMessagesManager_1.default.getMessage(mid);\r\n this.prevMid = this.nextMid = 0;\r\n return appMessagesManager_1.default.getSearch(message.peerID, '', {\r\n //_: type == 'audio' ? 'inputMessagesFilterMusic' : (type == 'round' ? 'inputMessagesFilterRoundVideo' : 'inputMessagesFilterVoice')\r\n _: type == 'audio' ? 'inputMessagesFilterMusic' : 'inputMessagesFilterRoundVoice'\r\n }, mid, 3, 0, 2).then(value => {\r\n if (this.playingMedia != media) {\r\n return;\r\n }\r\n for (let m of value.history) {\r\n if (m > mid) {\r\n this.nextMid = m;\r\n }\r\n else if (m < mid) {\r\n this.prevMid = m;\r\n break;\r\n }\r\n }\r\n [this.prevMid, this.nextMid].filter(Boolean).forEach(mid => {\r\n const message = appMessagesManager_1.default.getMessage(mid);\r\n this.addMedia(message.media.document, mid, false);\r\n });\r\n //console.log('loadSiblingsAudio', audio, type, mid, value, this.prevMid, this.nextMid);\r\n });\r\n }\r\n toggle() {\r\n if (!this.playingMedia)\r\n return;\r\n if (this.playingMedia.paused) {\r\n this.playingMedia.play();\r\n }\r\n else {\r\n this.playingMedia.pause();\r\n }\r\n }\r\n pause() {\r\n if (!this.playingMedia || this.playingMedia.paused)\r\n return;\r\n this.playingMedia.pause();\r\n }\r\n willBePlayed(media) {\r\n this.willBePlayedMedia = media;\r\n }\r\n}\r\nconst appMediaPlaybackController = new AppMediaPlaybackController();\r\n// @ts-ignore\r\nif (process.env.NODE_ENV != 'production') {\r\n window.appMediaPlaybackController = appMediaPlaybackController;\r\n}\r\nexports.default = appMediaPlaybackController;\r\n" - }, - { - "id": 38, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\searchIndexManager.ts", - "name": "./src/lib/searchIndexManager.ts", - "index": 47, - "index2": 38, - "size": 3779, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appUsersManager.ts", - "issuerId": 5, - "issuerName": "./src/lib/appManagers/appUsersManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 5, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appUsersManager.ts", - "name": "./src/lib/appManagers/appUsersManager.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 2787, - "building": 762, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 5, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appUsersManager.ts", - "module": "./src/lib/appManagers/appUsersManager.ts", - "moduleName": "./src/lib/appManagers/appUsersManager.ts", - "type": "cjs require", - "userRequest": "../searchIndexManager", - "loc": "23:45-77" - }, - { - "moduleId": 7, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "module": "./src/lib/appManagers/appMessagesManager.ts", - "moduleName": "./src/lib/appManagers/appMessagesManager.ts", - "type": "cjs require", - "userRequest": "../searchIndexManager", - "loc": "36:45-77" - }, - { - "moduleId": 9, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 27, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appProfileManager.ts", - "module": "./src/lib/appManagers/appProfileManager.ts", - "moduleName": "./src/lib/appManagers/appProfileManager.ts", - "type": "cjs require", - "userRequest": "../searchIndexManager", - "loc": "28: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": 39, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appPollsManager.ts", - "name": "./src/lib/appManagers/appPollsManager.ts", - "index": 55, - "index2": 45, - "size": 5179, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 7, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "module": "./src/lib/appManagers/appMessagesManager.ts", - "moduleName": "./src/lib/appManagers/appMessagesManager.ts", - "type": "cjs require", - "userRequest": "./appPollsManager", - "loc": "35:42-70" - }, - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "./appPollsManager", - "loc": "40:42-70" - }, - { - "moduleId": 58, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\poll.ts", - "module": "./src/components/poll.ts", - "moduleName": "./src/components/poll.ts", - "type": "cjs require", - "userRequest": "../lib/appManagers/appPollsManager", - "loc": "7:42-87" - }, - { - "moduleId": 86, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\pollResults.ts", - "module": "./src/components/sidebarRight/pollResults.ts", - "moduleName": "./src/components/sidebarRight/pollResults.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appPollsManager", - "loc": "27:42-90" - } - ], - "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 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\nconst logger_1 = require(\"../logger\");\r\nconst appUsersManager_1 = __importDefault(require(\"./appUsersManager\"));\r\nclass AppPollsManager {\r\n constructor() {\r\n this.polls = {};\r\n this.results = {};\r\n this.log = logger_1.logger('POLLS', logger_1.LogLevels.error);\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 this.log('updateMessagePoll:', update);\r\n let poll = 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 const id = poll.id;\r\n if (this.polls[id]) {\r\n poll = Object.assign(this.polls[id], poll);\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 poll.chosenIndexes = [];\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.chosenIndexes.length = 0;\r\n if ((_a = results === null || results === void 0 ? void 0 : results.results) === null || _a === void 0 ? void 0 : _a.length) {\r\n results.results.forEach((answer, idx) => {\r\n var _a;\r\n if ((_a = answer.pFlags) === null || _a === void 0 ? void 0 : _a.chosen) {\r\n poll.chosenIndexes.push(idx);\r\n }\r\n });\r\n }\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 const message = appMessagesManager_1.default.getMessage(mid);\r\n const poll = message.media.poll;\r\n const options = optionIDs.map(index => {\r\n return poll.answers[index].option;\r\n });\r\n const inputPeer = appPeersManager_1.default.getInputPeerByID(message.peerID);\r\n const 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 this.log('sendVote updates:', updates);\r\n apiUpdatesManager_1.default.processUpdateMessage(updates);\r\n });\r\n }\r\n getResults(mid) {\r\n const message = appMessagesManager_1.default.getMessage(mid);\r\n const inputPeer = appPeersManager_1.default.getInputPeerByID(message.peerID);\r\n const messageID = message.id;\r\n return mtprotoworker_1.default.invokeApi('messages.getPollResults', {\r\n peer: inputPeer,\r\n msg_id: messageID\r\n }).then(updates => {\r\n apiUpdatesManager_1.default.processUpdateMessage(updates);\r\n this.log('getResults updates:', updates);\r\n });\r\n }\r\n getVotes(mid, option, offset, limit = 20) {\r\n const message = appMessagesManager_1.default.getMessage(mid);\r\n const inputPeer = appPeersManager_1.default.getInputPeerByID(message.peerID);\r\n const messageID = message.id;\r\n let flags = 0;\r\n if (option) {\r\n flags |= 1 << 0;\r\n }\r\n if (offset) {\r\n flags |= 1 << 1;\r\n }\r\n return mtprotoworker_1.default.invokeApi('messages.getPollVotes', {\r\n flags,\r\n peer: inputPeer,\r\n id: messageID,\r\n option,\r\n offset,\r\n limit\r\n }).then((votesList) => {\r\n this.log('getPollVotes messages:', votesList);\r\n appUsersManager_1.default.saveApiUsers(votesList.users);\r\n return votesList;\r\n });\r\n }\r\n}\r\nconst appPollsManager = new AppPollsManager();\r\n// @ts-ignore\r\nif (process.env.NODE_ENV != 'production') {\r\n window.appPollsManager = appPollsManager;\r\n}\r\nexports.default = appPollsManager;\r\n" - }, - { - "id": 40, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appStateManager.ts", - "name": "./src/lib/appManagers/appStateManager.ts", - "index": 56, - "index2": 49, - "size": 8581, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appUsersManager.ts", - "issuerId": 5, - "issuerName": "./src/lib/appManagers/appUsersManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 5, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appUsersManager.ts", - "name": "./src/lib/appManagers/appUsersManager.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 2787, - "building": 762, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 5, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appUsersManager.ts", - "module": "./src/lib/appManagers/appUsersManager.ts", - "moduleName": "./src/lib/appManagers/appUsersManager.ts", - "type": "cjs require", - "userRequest": "./appStateManager", - "loc": "25:42-70" - }, - { - "moduleId": 14, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "module": "./src/lib/appManagers/appSidebarLeft.ts", - "moduleName": "./src/lib/appManagers/appSidebarLeft.ts", - "type": "cjs require", - "userRequest": "./appStateManager", - "loc": "46:42-70" - }, - { - "moduleId": 16, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts", - "module": "./src/lib/appManagers/appDialogsManager.ts", - "moduleName": "./src/lib/appManagers/appDialogsManager.ts", - "type": "cjs require", - "userRequest": "./appStateManager", - "loc": "29:42-70" - }, - { - "moduleId": 101, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\emoji.ts", - "module": "./src/components/emoticonsDropdown/tabs/emoji.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/emoji.ts", - "type": "cjs require", - "userRequest": "../../../lib/appManagers/appStateManager", - "loc": "10:42-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\nexports.AppStateManager = void 0;\r\nconst storage_1 = __importDefault(require(\"../storage\"));\r\nconst appMessagesManager_1 = __importDefault(require(\"./appMessagesManager\"));\r\nconst appMessagesIDsManager_1 = __importDefault(require(\"./appMessagesIDsManager\"));\r\nconst appPeersManager_1 = __importDefault(require(\"./appPeersManager\"));\r\nconst appChatsManager_1 = __importDefault(require(\"./appChatsManager\"));\r\nconst appUsersManager_1 = __importDefault(require(\"./appUsersManager\"));\r\nconst apiUpdatesManager_1 = __importDefault(require(\"./apiUpdatesManager\"));\r\nconst utils_1 = require(\"../utils\");\r\nconst logger_1 = require(\"../logger\");\r\nconst REFRESH_EVERY = 24 * 60 * 60 * 1000; // 1 day\r\nclass AppStateManager {\r\n constructor() {\r\n this.log = logger_1.logger('STATE' /* , LogLevels.error */);\r\n this.state = {};\r\n this.loadSavedState();\r\n }\r\n loadSavedState() {\r\n if (this.loaded)\r\n return this.loaded;\r\n return this.loaded = new Promise((resolve, reject) => {\r\n storage_1.default.get('state').then((state) => {\r\n var _a;\r\n const time = Date.now();\r\n if (((_a = state === null || state === void 0 ? void 0 : state.stateCreatedTime) !== null && _a !== void 0 ? _a : 0) + REFRESH_EVERY < time) {\r\n this.log('will refresh state', state.stateCreatedTime, time);\r\n ['dialogs', 'allDialogsLoaded', 'messages', 'contactsList', 'stateCreatedTime',\r\n 'updates', 'maxSeenMsgID', 'filters', 'topPeers'].forEach(key => {\r\n delete state[key];\r\n });\r\n //state = {};\r\n }\r\n const { dialogs, allDialogsLoaded, peers, messages, contactsList, maxSeenMsgID, updates, filters } = state;\r\n this.state = state || {};\r\n this.state.peers = peers || {};\r\n if (!this.state.hasOwnProperty('stateCreatedTime')) {\r\n this.state.stateCreatedTime = Date.now();\r\n }\r\n this.log('state res', dialogs, messages);\r\n if (maxSeenMsgID && !appMessagesIDsManager_1.default.getMessageIDInfo(maxSeenMsgID)[1]) {\r\n appMessagesManager_1.default.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 (contactsList && Array.isArray(contactsList) && contactsList.length) {\r\n contactsList.forEach(userID => {\r\n appUsersManager_1.default.pushContact(userID);\r\n });\r\n appUsersManager_1.default.contactsFillPromise = Promise.resolve(appUsersManager_1.default.contactsList);\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 this.log('Set tempID to:', tempID);\r\n this.tempID = tempID;\r\n } */\r\n appMessagesManager_1.default.saveMessages(messages);\r\n // FIX FILE_REFERENCE_EXPIRED KOSTIL'1999\r\n for (let message of messages) {\r\n if (message.media) {\r\n appMessagesManager_1.default.wrapSingleMessage(message.mid, true);\r\n }\r\n }\r\n }\r\n if (allDialogsLoaded) {\r\n appMessagesManager_1.default.dialogsStorage.allDialogsLoaded = allDialogsLoaded;\r\n }\r\n if (filters) {\r\n for (const filterID in filters) {\r\n appMessagesManager_1.default.filtersStorage.saveDialogFilter(filters[filterID], false);\r\n }\r\n }\r\n if (dialogs) {\r\n dialogs.forEachReverse(dialog => {\r\n appMessagesManager_1.default.saveConversation(dialog);\r\n });\r\n }\r\n apiUpdatesManager_1.default.attach(updates !== null && updates !== void 0 ? updates : null);\r\n resolve(state);\r\n }).catch(resolve).finally(() => {\r\n setInterval(() => this.saveState(), 10000);\r\n });\r\n });\r\n }\r\n getState() {\r\n return this.loadSavedState();\r\n }\r\n saveState() {\r\n var _a, _b;\r\n const messages = [];\r\n const dialogs = [];\r\n const peers = this.state.peers;\r\n for (const folderID in appMessagesManager_1.default.dialogsStorage.byFolders) {\r\n const folder = appMessagesManager_1.default.dialogsStorage.getFolder(+folderID);\r\n for (let dialog of folder) {\r\n const historyStorage = appMessagesManager_1.default.historiesStorage[dialog.peerID];\r\n const 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 (const mid of history) {\r\n const message = appMessagesManager_1.default.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 const us = apiUpdatesManager_1.default.updatesState;\r\n const updates = {\r\n seq: us.seq,\r\n pts: us.pts,\r\n date: us.date\r\n };\r\n const contactsList = [...appUsersManager_1.default.contactsList];\r\n for (const userID of contactsList) {\r\n if (!peers[userID]) {\r\n peers[userID] = appUsersManager_1.default.getUser(userID);\r\n }\r\n }\r\n const filters = appMessagesManager_1.default.filtersStorage.filters;\r\n //const pinnedOrders = appMessagesManager.dialogsStorage.pinnedOrders;\r\n storage_1.default.set({\r\n state: Object.assign({}, this.state, {\r\n dialogs,\r\n messages,\r\n allDialogsLoaded: appMessagesManager_1.default.dialogsStorage.allDialogsLoaded,\r\n peers,\r\n contactsList,\r\n filters,\r\n //pinnedOrders,\r\n updates,\r\n maxSeenMsgID: appMessagesManager_1.default.maxSeenID\r\n })\r\n });\r\n }\r\n pushToState(key, value) {\r\n this.state[key] = value;\r\n }\r\n pushPeer(peerID) {\r\n this.state.peers[peerID] = appPeersManager_1.default.getPeer(peerID);\r\n }\r\n}\r\nexports.AppStateManager = AppStateManager;\r\nconst appStateManager = new AppStateManager();\r\n// @ts-ignore\r\nif (process.env.NODE_ENV != 'production') {\r\n window.appStateManager = appStateManager;\r\n}\r\nexports.default = appStateManager;\r\n" - }, - { - "id": 41, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\avatar.ts", - "name": "./src/components/avatar.ts", - "index": 58, - "index2": 51, - "size": 2864, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "../../components/avatar", - "loc": "33:33-67" - }, - { - "moduleId": 14, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": "34:33-67" - }, - { - "moduleId": 16, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts", - "module": "./src/lib/appManagers/appDialogsManager.ts", - "moduleName": "./src/lib/appManagers/appDialogsManager.ts", - "type": "cjs require", - "userRequest": "../../components/avatar", - "loc": "27:33-67" - }, - { - "moduleId": 36, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popup.ts", - "module": "./src/components/popup.ts", - "moduleName": "./src/components/popup.ts", - "type": "cjs require", - "userRequest": "./avatar", - "loc": "7:33-52" - } - ], - "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 //console.log('avatar changed attribute:', name, oldValue, newValue);\r\n // вызывается при изменении одного из перечисленных выше атрибутов\r\n if (name == 'peer') {\r\n if (this.peerID == +newValue) {\r\n return;\r\n }\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": 42, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\appForward.ts", - "name": "./src/components/appForward.ts", - "index": 67, - "index2": 60, - "size": 3152, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "../../components/appForward", - "loc": "31:37-75" - }, - { - "moduleId": 24, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", - "type": "cjs require", - "userRequest": "../../components/appForward", - "loc": "51:37-75" - }, - { - "moduleId": 56, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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" - }, - { - "moduleId": 106, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\contextMenu.ts", - "module": "./src/components/chat/contextMenu.ts", - "moduleName": "./src/components/chat/contextMenu.ts", - "type": "cjs require", - "userRequest": "../appForward", - "loc": "12:37-61" - } - ], - "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.sidebarWasActive ? Promise.resolve() : appSidebarRight_1.default.toggleSidebar(false)).then(() => {\r\n this.cleanup();\r\n this.container.classList.remove('active');\r\n });\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', 'contacts'], () => {\r\n //console.log('forward rendered:', this.container.querySelector('.selector ul').childElementCount);\r\n this.sidebarWasActive = appSidebarRight_1.default.sidebarEl.classList.contains('active');\r\n appSidebarRight_1.default.toggleSidebar(true);\r\n });\r\n }\r\n}\r\nexports.default = new AppForward();\r\n" - }, - { - "id": 43, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\appSearch.ts", - "name": "./src/components/appSearch.ts", - "index": 74, - "index2": 67, - "size": 11163, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "issuerId": 24, - "issuerName": "./src/lib/appManagers/appSidebarRight.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 24, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "name": "./src/lib/appManagers/appSidebarRight.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 1584, - "building": 1606, - "dependencies": 2 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 14, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": "30:33-70" - }, - { - "moduleId": 24, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", - "type": "cjs require", - "userRequest": "../../components/appSearch", - "loc": "50:33-70" - }, - { - "moduleId": 92, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\newGroup.ts", - "module": "./src/components/sidebarLeft/newGroup.ts", - "moduleName": "./src/components/sidebarLeft/newGroup.ts", - "type": "cjs require", - "userRequest": "../appSearch", - "loc": "25:20-43" - }, - { - "moduleId": 107, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\search.ts", - "module": "./src/components/chat/search.ts", - "moduleName": "./src/components/chat/search.ts", - "type": "cjs require", - "userRequest": "../appSearch", - "loc": "28:33-56" - } - ], - "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 if (name) {\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.append(this.nameEl);\r\n }\r\n this.container.classList.add('search-group', 'search-group-' + type);\r\n this.container.append(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, onSearch) {\r\n this.container = container;\r\n this.searchInput = searchInput;\r\n this.searchGroups = searchGroups;\r\n this.onSearch = onSearch;\r\n this.minMsgID = 0;\r\n this.loadedCount = -1;\r\n this.foundCount = -1;\r\n this.offsetRate = 0;\r\n this.loadedContacts = false;\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 if (this.searchGroups.messages) {\r\n this.scrollable.setVirtualContainer(this.searchGroups.messages.list);\r\n }\r\n this.searchInput.onChange = (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 = window.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 = -1;\r\n this.foundCount = -1;\r\n this.offsetRate = 0;\r\n this.loadedContacts = false;\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.input.focus();\r\n }\r\n renderSaved() {\r\n const group = this.searchGroups.contacts;\r\n let { dialog, dom } = appDialogsManager_1.default.addDialog(utils_1.$rootScope.myID, group.list, false);\r\n dom.lastMessageSpan.innerHTML = 'chat with yourself';\r\n group.setActive();\r\n }\r\n searchMore() {\r\n if (this.searchPromise)\r\n return this.searchPromise;\r\n const query = this.query;\r\n if (!query.trim()) {\r\n this.onSearch && this.onSearch(0);\r\n return;\r\n }\r\n if (this.foundCount != -1 && this.loadedCount >= this.foundCount) {\r\n return Promise.resolve();\r\n }\r\n const maxID = appMessagesIDsManager_1.default.getMessageIDInfo(this.minMsgID)[0] || 0;\r\n if (!this.peerID && !maxID && !this.loadedContacts) {\r\n let renderedSaved = false;\r\n if ('saved messages'.includes(query.toLowerCase())\r\n || appUsersManager_1.default.getUser(utils_1.$rootScope.myID).sortName.includes(query.toLowerCase()) /* && this.searchGroups.hasOwnProperty('saved') */) {\r\n this.renderSaved();\r\n renderedSaved = true;\r\n }\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.loadedContacts = true;\r\n // set saved message as first peer to render\r\n const peer = contacts.my_results.findAndSplice(p => p.user_id == utils_1.$rootScope.myID);\r\n if (peer) {\r\n contacts.my_results.unshift(peer);\r\n }\r\n //console.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 if (peerID == utils_1.$rootScope.myID) {\r\n if (!renderedSaved) {\r\n this.renderSaved();\r\n }\r\n return;\r\n }\r\n let peer = appPeersManager_1.default.getPeer(peerID);\r\n let originalDialog = appMessagesManager_1.default.getDialogByPeerID(peerID)[0];\r\n //////////this.log('contacts peer', peer);\r\n if (!originalDialog) {\r\n /////////this.log('no original dialog by peerID:', peerID);\r\n originalDialog = {\r\n peerID: peerID,\r\n pFlags: {},\r\n peer: peer\r\n };\r\n }\r\n let { dialog, dom } = appDialogsManager_1.default.addDialog(originalDialog, group.list, false);\r\n if (showMembersCount && (peer.participants_count || peer.participants)) {\r\n let regExp = new RegExp(`(${utils_1.escapeRegExp(query)})`, 'gi');\r\n dom.titleSpan.innerHTML = dom.titleSpan.innerHTML.replace(regExp, '$1');\r\n 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 = '' + username + '';\r\n }\r\n });\r\n if (results.length)\r\n group.setActive();\r\n else if (renderedSaved) { // удалить все пункты снизу\r\n Array.from(group.list.children).slice(1).forEach(c => c.remove());\r\n }\r\n else {\r\n group.clear();\r\n }\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 //console.log('input search result:', this.peerID, query, null, maxID, 20, res);\r\n const { count, history, next_rate } = res;\r\n if (history[0] == this.minMsgID) {\r\n history.shift();\r\n }\r\n const searchGroup = this.searchGroups.messages;\r\n searchGroup.setActive();\r\n history.forEach((msgID) => {\r\n const 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 const { dialog, dom } = appDialogsManager_1.default.addDialog(originalDialog, this.scrollable /* 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.loadedCount == -1) {\r\n this.loadedCount = 0;\r\n }\r\n if (this.foundCount == -1) {\r\n this.foundCount = count;\r\n this.onSearch && this.onSearch(this.foundCount);\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": 44, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appStickersManager.ts", - "name": "./src/lib/appManagers/appStickersManager.ts", - "index": 78, - "index2": 70, - "size": 10171, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "./appStickersManager", - "loc": "32:45-76" - }, - { - "moduleId": 61, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popupStickers.ts", - "module": "./src/components/popupStickers.ts", - "moduleName": "./src/components/popupStickers.ts", - "type": "cjs require", - "userRequest": "../lib/appManagers/appStickersManager", - "loc": "7:45-93" - }, - { - "moduleId": 85, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\stickers.ts", - "module": "./src/components/sidebarRight/stickers.ts", - "moduleName": "./src/components/sidebarRight/stickers.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appStickersManager", - "loc": "30:45-96" - }, - { - "moduleId": 102, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\stickers.ts", - "module": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "type": "cjs require", - "userRequest": "../../../lib/appManagers/appStickersManager", - "loc": "37:45-99" - } - ], - "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 appDocsManager_1 = __importDefault(require(\"./appDocsManager\"));\r\nconst utils_1 = require(\"../utils\");\r\nclass AppStickersManager {\r\n constructor() {\r\n this.stickerSets = {};\r\n this.hashes = {\r\n featured: {},\r\n search: {}\r\n };\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 utils_1.$rootScope.$on('apiUpdate', (e) => {\r\n const update = e.detail;\r\n switch (update._) {\r\n case 'updateNewStickerSet': {\r\n this.saveStickerSet(update.stickerset, update.stickerset.set.id);\r\n utils_1.$rootScope.$broadcast('stickers_installed', update.stickerset.set);\r\n break;\r\n }\r\n }\r\n });\r\n }\r\n saveStickers(docs) {\r\n docs.forEachReverse((doc, idx) => {\r\n doc = appDocsManager_1.default.saveDoc(doc);\r\n if (!doc)\r\n docs.splice(idx, 1);\r\n else\r\n docs[idx] = doc;\r\n });\r\n }\r\n getStickerSet(set, params = {}) {\r\n var _a;\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (this.stickerSets[set.id] && !params.overwrite && ((_a = this.stickerSets[set.id].documents) === null || _a === void 0 ? void 0 : _a.length))\r\n return this.stickerSets[set.id];\r\n const stickerSet = yield mtprotoworker_1.default.invokeApi('messages.getStickerSet', {\r\n stickerset: this.getStickerSetInput(set)\r\n });\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 const res = yield mtprotoworker_1.default.invokeApi('messages.getRecentStickers', { flags: 0, hash: 0 });\r\n if (res._ == 'messages.recentStickers') {\r\n this.saveStickers(res.stickers);\r\n }\r\n return res;\r\n });\r\n }\r\n getAnimatedEmojiSticker(emoji) {\r\n let stickerSet = this.stickerSets.emoji;\r\n if (!stickerSet || !stickerSet.documents)\r\n return undefined;\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);w\r\n const newSet = {\r\n _: 'messages.stickerSet',\r\n set: res.set,\r\n packs: res.packs,\r\n documents: res.documents\r\n };\r\n if (this.stickerSets[id]) {\r\n Object.assign(this.stickerSets[id], newSet);\r\n }\r\n else {\r\n this.stickerSets[id] = newSet;\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 = window.setTimeout(() => {\r\n const savedSets = {};\r\n for (const id in this.stickerSets) {\r\n const set = this.stickerSets[id];\r\n if (set.set.installed_date || id == 'emoji') {\r\n savedSets[id] = set;\r\n }\r\n }\r\n storage_1.default.set({\r\n stickerSets: savedSets\r\n });\r\n this.saveSetsTimeout = 0;\r\n }, 100);\r\n }\r\n getStickerSetThumbDownloadOptions(stickerSet) {\r\n var _a;\r\n const thumb = stickerSet.thumb;\r\n const dcID = stickerSet.thumb_dc_id;\r\n const isAnimated = (_a = stickerSet.pFlags) === null || _a === void 0 ? void 0 : _a.animated;\r\n const input = {\r\n _: 'inputStickerSetThumb',\r\n stickerset: this.getStickerSetInput(stickerSet),\r\n volume_id: thumb.location.volume_id,\r\n local_id: thumb.location.local_id\r\n };\r\n return { dcID, location: input, size: thumb.size, mimeType: isAnimated ? \"application/x-tgsticker\" : 'image/webp' };\r\n }\r\n /* public getStickerSetThumbURL(stickerSet: MTStickerSet) {\r\n const thumb = stickerSet.thumb;\r\n const dcID = stickerSet.thumb_dc_id;\r\n \r\n const isAnimated = stickerSet.pFlags?.animated;\r\n \r\n const input: inputStickerSetThumb = {\r\n _: 'inputStickerSetThumb',\r\n stickerset: this.getStickerSetInput(stickerSet),\r\n volume_id: thumb.location.volume_id,\r\n local_id: thumb.location.local_id\r\n };\r\n \r\n const url = getFileURL('document', this.getStickerSetThumbDownloadOptions(stickerSet));\r\n return url;\r\n \r\n //return promise;\r\n } */\r\n getStickerSetInput(set) {\r\n return 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 getFeaturedStickers() {\r\n var _a, _b;\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const res = yield mtprotoworker_1.default.invokeApi('messages.getFeaturedStickers', {\r\n hash: ((_a = this.hashes.featured) === null || _a === void 0 ? void 0 : _a.hash) || 0\r\n });\r\n const hashed = (_b = this.hashes.featured) !== null && _b !== void 0 ? _b : (this.hashes.featured = {});\r\n if (res._ != 'messages.featuredStickersNotModified') {\r\n hashed.hash = res.hash;\r\n hashed.result = res.sets;\r\n }\r\n hashed.result.forEach(covered => {\r\n this.saveStickerSet({ set: covered.set, documents: [], packs: [] }, covered.set.id);\r\n });\r\n return hashed.result;\r\n });\r\n }\r\n toggleStickerSet(set) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (set.installed_date) {\r\n const res = yield mtprotoworker_1.default.invokeApi('messages.uninstallStickerSet', {\r\n stickerset: this.getStickerSetInput(set)\r\n });\r\n if (res) {\r\n delete set.installed_date;\r\n utils_1.$rootScope.$broadcast('stickers_deleted', set);\r\n return true;\r\n }\r\n }\r\n else {\r\n const res = yield mtprotoworker_1.default.invokeApi('messages.installStickerSet', {\r\n stickerset: this.getStickerSetInput(set),\r\n archived: false\r\n });\r\n if (res) {\r\n set.installed_date = Date.now() / 1000 | 0;\r\n utils_1.$rootScope.$broadcast('stickers_installed', set);\r\n return true;\r\n }\r\n }\r\n return false;\r\n });\r\n }\r\n searchStickerSets(query, excludeFeatured = true) {\r\n var _a, _b;\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const flags = excludeFeatured ? 1 : 0;\r\n const res = yield mtprotoworker_1.default.invokeApi('messages.searchStickerSets', {\r\n flags,\r\n exclude_featured: excludeFeatured || undefined,\r\n q: query,\r\n hash: ((_a = this.hashes.search[query]) === null || _a === void 0 ? void 0 : _a.hash) || 0\r\n });\r\n const hashed = (_b = this.hashes.search[query]) !== null && _b !== void 0 ? _b : (this.hashes.search[query] = {});\r\n if (res._ != 'messages.foundStickerSetsNotModified') {\r\n hashed.hash = res.hash;\r\n hashed.result = res.sets;\r\n }\r\n hashed.result.forEach(covered => {\r\n this.saveStickerSet({ set: covered.set, documents: [], packs: [] }, covered.set.id);\r\n });\r\n const foundSaved = [];\r\n for (let id in this.stickerSets) {\r\n const { set } = this.stickerSets[id];\r\n if (set.title.toLowerCase().includes(query.toLowerCase()) && !hashed.result.find(c => c.set.id == set.id)) {\r\n foundSaved.push({ _: 'stickerSetCovered', set, cover: null });\r\n }\r\n }\r\n return hashed.result.concat(foundSaved);\r\n });\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\n// @ts-ignore\r\nif (process.env.NODE_ENV != 'production') {\r\n window.appStickersManager = appStickersManager;\r\n}\r\nexports.default = appStickersManager;\r\n" - }, - { - "id": 45, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\toast.ts", - "name": "./src/components/toast.ts", - "index": 83, - "index2": 74, - "size": 524, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\AppInlineBotsManager.ts", - "issuerId": 62, - "issuerName": "./src/lib/appManagers/AppInlineBotsManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 62, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\AppInlineBotsManager.ts", - "name": "./src/lib/appManagers/AppInlineBotsManager.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 870, - "building": 1451 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 62, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\AppInlineBotsManager.ts", - "module": "./src/lib/appManagers/AppInlineBotsManager.ts", - "moduleName": "./src/lib/appManagers/AppInlineBotsManager.ts", - "type": "cjs require", - "userRequest": "../../components/toast", - "loc": "12:16-49" - }, - { - "moduleId": 95, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\chatFolders.ts", - "module": "./src/components/sidebarLeft/chatFolders.ts", - "moduleName": "./src/components/sidebarLeft/chatFolders.ts", - "type": "cjs require", - "userRequest": "../toast", - "loc": "14:16-35" - }, - { - "moduleId": 96, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\editFolder.ts", - "module": "./src/components/sidebarLeft/editFolder.ts", - "moduleName": "./src/components/sidebarLeft/editFolder.ts", - "type": "cjs require", - "userRequest": "../toast", - "loc": "31:16-35" - }, - { - "moduleId": 103, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popupCreatePoll.ts", - "module": "./src/components/popupCreatePoll.ts", - "moduleName": "./src/components/popupCreatePoll.ts", - "type": "cjs require", - "userRequest": "./toast", - "loc": "10:16-34" - } - ], - "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.toast = void 0;\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\n" - }, - { - "id": 46, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popupAvatar.ts", - "name": "./src/components/popupAvatar.ts", - "index": 87, - "index2": 80, - "size": 3372, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignUp.ts", - "issuerId": 80, - "issuerName": "./src/pages/pageSignUp.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 49, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "name": "./src/pages/pageSignIn.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 79, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageAuthCode.ts", - "name": "./src/pages/pageAuthCode.ts", - "profile": { - "factory": 104, - "building": 1053, - "dependencies": 527 - } - }, - { - "id": 80, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignUp.ts", - "name": "./src/pages/pageSignUp.ts", - "profile": { - "factory": 575, - "building": 2297, - "dependencies": 2 - } - } - ], - "profile": { - "factory": 4426, - "building": 735, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 80, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignUp.ts", - "module": "./src/pages/pageSignUp.ts", - "moduleName": "./src/pages/pageSignUp.ts", - "type": "cjs require", - "userRequest": "../components/popupAvatar", - "loc": "30:38-74" - }, - { - "moduleId": 88, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\newChannel.ts", - "module": "./src/components/sidebarLeft/newChannel.ts", - "moduleName": "./src/components/sidebarLeft/newChannel.ts", - "type": "cjs require", - "userRequest": "../popupAvatar", - "loc": "25:38-63" - }, - { - "moduleId": 92, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\newGroup.ts", - "module": "./src/components/sidebarLeft/newGroup.ts", - "moduleName": "./src/components/sidebarLeft/newGroup.ts", - "type": "cjs require", - "userRequest": "../popupAvatar", - "loc": "26:38-63" - }, - { - "moduleId": 94, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\editProfile.ts", - "module": "./src/components/sidebarLeft/editProfile.ts", - "moduleName": "./src/components/sidebarLeft/editProfile.ts", - "type": "cjs require", - "userRequest": "../popupAvatar", - "loc": "6:38-63" - } - ], - "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 appDownloadManager_1 = __importDefault(require(\"../lib/appManagers/appDownloadManager\"));\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 appDownloadManager_1.default.upload(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": 47, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\index.ts", - "name": "./src/components/emoticonsDropdown/index.ts", - "index": 99, - "index2": 96, - "size": 13705, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\input.ts", - "issuerId": 98, - "issuerName": "./src/components/chat/input.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 98, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\input.ts", - "name": "./src/components/chat/input.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 2199, - "building": 778, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 98, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\input.ts", - "module": "./src/components/chat/input.ts", - "moduleName": "./src/components/chat/input.ts", - "type": "cjs require", - "userRequest": "../emoticonsDropdown", - "loc": "21:44-75" - }, - { - "moduleId": 100, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\gifs.ts", - "module": "./src/components/emoticonsDropdown/tabs/gifs.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/gifs.ts", - "type": "cjs require", - "userRequest": "..", - "loc": "6:12-25" - }, - { - "moduleId": 101, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\emoji.ts", - "module": "./src/components/emoticonsDropdown/tabs/emoji.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/emoji.ts", - "type": "cjs require", - "userRequest": "..", - "loc": "6:12-25" - }, - { - "moduleId": 102, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\stickers.ts", - "module": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "type": "cjs require", - "userRequest": "..", - "loc": "34:25-38" - } - ], - "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.EmoticonsDropdown = exports.EMOTICONSSTICKERGROUP = void 0;\r\nconst lazyLoadQueue_1 = __importDefault(require(\"../lazyLoadQueue\"));\r\nconst gifs_1 = __importDefault(require(\"./tabs/gifs\"));\r\nconst config_1 = require(\"../../lib/config\");\r\nconst utils_1 = require(\"../../lib/utils\");\r\nconst horizontalMenu_1 = require(\"../horizontalMenu\");\r\nconst animationIntersector_1 = __importDefault(require(\"../animationIntersector\"));\r\nconst appSidebarRight_1 = __importDefault(require(\"../../lib/appManagers/appSidebarRight\"));\r\nconst appImManager_1 = __importDefault(require(\"../../lib/appManagers/appImManager\"));\r\nconst emoji_1 = __importDefault(require(\"./tabs/emoji\"));\r\nconst stickers_1 = __importDefault(require(\"./tabs/stickers\"));\r\nconst stickyIntersector_1 = __importDefault(require(\"../stickyIntersector\"));\r\nexports.EMOTICONSSTICKERGROUP = 'emoticons-dropdown';\r\nconst test = false;\r\nlet EmoticonsDropdown = /** @class */ (() => {\r\n class EmoticonsDropdown {\r\n constructor() {\r\n this.tabID = -1;\r\n this.events = {\r\n onClose: [],\r\n onCloseAfter: [],\r\n onOpen: [],\r\n onOpenAfter: []\r\n };\r\n this.toggle = (enable) => __awaiter(this, void 0, void 0, function* () {\r\n //if(!this.element) return;\r\n const willBeActive = (!!this.element.style.display && enable === undefined) || enable;\r\n if (this.init) {\r\n if (willBeActive) {\r\n this.init();\r\n this.init = null;\r\n }\r\n else {\r\n return;\r\n }\r\n }\r\n if (config_1.touchSupport) {\r\n this.toggleEl.classList.toggle('flip-icon', willBeActive);\r\n if (willBeActive) {\r\n appImManager_1.default.chatInputC.saveScroll();\r\n // @ts-ignore\r\n document.activeElement.blur();\r\n yield new Promise((resolve) => {\r\n setTimeout(resolve, 100);\r\n });\r\n }\r\n }\r\n else {\r\n this.toggleEl.classList.toggle('active', enable);\r\n }\r\n if ((this.element.style.display && enable === undefined) || enable) {\r\n this.events.onOpen.forEach(cb => cb());\r\n EmoticonsDropdown.lazyLoadQueue.lock();\r\n //EmoticonsDropdown.lazyLoadQueue.unlock();\r\n animationIntersector_1.default.lockIntersectionGroup(exports.EMOTICONSSTICKERGROUP);\r\n this.element.style.display = '';\r\n void this.element.offsetLeft; // reflow\r\n this.element.classList.add('active');\r\n clearTimeout(this.displayTimeout);\r\n this.displayTimeout = window.setTimeout(() => {\r\n animationIntersector_1.default.unlockIntersectionGroup(exports.EMOTICONSSTICKERGROUP);\r\n EmoticonsDropdown.lazyLoadQueue.unlock();\r\n EmoticonsDropdown.lazyLoadQueue.refresh();\r\n this.events.onOpenAfter.forEach(cb => cb());\r\n }, config_1.touchSupport ? 0 : 200);\r\n /* if(touchSupport) {\r\n this.restoreScroll();\r\n } */\r\n }\r\n else {\r\n this.events.onClose.forEach(cb => cb());\r\n EmoticonsDropdown.lazyLoadQueue.lock();\r\n //EmoticonsDropdown.lazyLoadQueue.lock();\r\n // нужно залочить группу и выключить стикеры\r\n animationIntersector_1.default.lockIntersectionGroup(exports.EMOTICONSSTICKERGROUP);\r\n animationIntersector_1.default.checkAnimations(true, exports.EMOTICONSSTICKERGROUP);\r\n this.element.classList.remove('active');\r\n clearTimeout(this.displayTimeout);\r\n this.displayTimeout = window.setTimeout(() => {\r\n this.element.style.display = 'none';\r\n // теперь можно убрать visible, чтобы они не включились после фокуса\r\n animationIntersector_1.default.unlockIntersectionGroup(exports.EMOTICONSSTICKERGROUP);\r\n EmoticonsDropdown.lazyLoadQueue.unlock();\r\n EmoticonsDropdown.lazyLoadQueue.refresh();\r\n this.events.onCloseAfter.forEach(cb => cb());\r\n }, config_1.touchSupport ? 0 : 200);\r\n /* if(touchSupport) {\r\n this.restoreScroll();\r\n } */\r\n }\r\n //animationIntersector.checkAnimations(false, EMOTICONSSTICKERGROUP);\r\n });\r\n this.element = document.getElementById('emoji-dropdown');\r\n let firstTime = true;\r\n this.toggleEl = document.getElementById('toggle-emoticons');\r\n if (config_1.touchSupport) {\r\n this.toggleEl.addEventListener('click', () => {\r\n if (firstTime) {\r\n firstTime = false;\r\n this.toggle(true);\r\n }\r\n else {\r\n this.toggle();\r\n }\r\n });\r\n }\r\n else {\r\n this.toggleEl.onmouseover = (e) => {\r\n clearTimeout(this.displayTimeout);\r\n //this.displayTimeout = setTimeout(() => {\r\n if (firstTime) {\r\n this.toggleEl.onmouseout = this.element.onmouseout = (e) => {\r\n if (test)\r\n return;\r\n if (!this.element.classList.contains('active'))\r\n return;\r\n const toElement = e.toElement;\r\n if (toElement && utils_1.findUpClassName(toElement, 'emoji-dropdown')) {\r\n return;\r\n }\r\n clearTimeout(this.displayTimeout);\r\n this.displayTimeout = window.setTimeout(() => {\r\n this.toggle(false);\r\n }, 200);\r\n };\r\n this.element.onmouseover = (e) => {\r\n clearTimeout(this.displayTimeout);\r\n };\r\n firstTime = false;\r\n }\r\n this.toggle(true);\r\n //}, 0/* 200 */);\r\n };\r\n }\r\n }\r\n init() {\r\n this.emojiTab = new emoji_1.default();\r\n this.stickersTab = new stickers_1.default();\r\n this.gifsTab = new gifs_1.default();\r\n this.tabs = {\r\n 0: this.emojiTab,\r\n 1: this.stickersTab,\r\n 2: this.gifsTab\r\n };\r\n this.container = this.element.querySelector('.emoji-container .tabs-container');\r\n this.tabsEl = this.element.querySelector('.emoji-tabs');\r\n horizontalMenu_1.horizontalMenu(this.tabsEl, this.container, (id) => {\r\n animationIntersector_1.default.checkAnimations(true, exports.EMOTICONSSTICKERGROUP);\r\n this.tabID = id;\r\n this.searchButton.classList.toggle('hide', this.tabID == 0);\r\n this.deleteBtn.classList.toggle('hide', this.tabID != 0);\r\n }, () => {\r\n const tab = this.tabs[this.tabID];\r\n if (tab.init) {\r\n tab.init();\r\n }\r\n tab.onCloseAfterTimeout && tab.onCloseAfterTimeout();\r\n animationIntersector_1.default.checkAnimations(false, exports.EMOTICONSSTICKERGROUP);\r\n });\r\n this.searchButton = this.element.querySelector('.emoji-tabs-search');\r\n this.searchButton.addEventListener('click', () => {\r\n if (this.tabID == 1) {\r\n appSidebarRight_1.default.stickersTab.init();\r\n }\r\n else {\r\n appSidebarRight_1.default.gifsTab.init();\r\n }\r\n });\r\n this.deleteBtn = this.element.querySelector('.emoji-tabs-delete');\r\n this.deleteBtn.addEventListener('click', () => {\r\n var _a;\r\n const input = appImManager_1.default.chatInputC.messageInput;\r\n if ((_a = input.lastChild) === null || _a === void 0 ? void 0 : _a.tagName) {\r\n input.lastElementChild.remove();\r\n }\r\n else if (input.lastChild) {\r\n if (!input.lastChild.textContent.length) {\r\n input.lastChild.remove();\r\n }\r\n else {\r\n input.lastChild.textContent = input.lastChild.textContent.slice(0, -1);\r\n }\r\n }\r\n const event = new Event('input', { bubbles: true, cancelable: true });\r\n appImManager_1.default.chatInputC.messageInput.dispatchEvent(event);\r\n //appSidebarRight.stickersTab.init();\r\n });\r\n this.tabsEl.firstElementChild.children[1].click(); // set emoji tab\r\n this.tabs[0].init(); // onTransitionEnd не вызовется, т.к. это первая открытая вкладка\r\n }\r\n }\r\n EmoticonsDropdown.lazyLoadQueue = new lazyLoadQueue_1.default();\r\n EmoticonsDropdown.menuOnClick = (menu, scroll, menuScroll) => {\r\n let prevId = 0;\r\n let jumpedTo = -1;\r\n const setActive = (id) => {\r\n if (id == prevId) {\r\n return false;\r\n }\r\n menu.children[prevId].classList.remove('active');\r\n menu.children[id].classList.add('active');\r\n prevId = id;\r\n return true;\r\n };\r\n const stickyIntersector = new stickyIntersector_1.default(scroll.container, (stuck, target) => {\r\n //console.log('sticky scrollTOp', stuck, target, scroll.container.scrollTop);\r\n if (Math.abs(jumpedTo - scroll.container.scrollTop) <= 1) {\r\n return;\r\n }\r\n else {\r\n jumpedTo = -1;\r\n }\r\n const which = utils_1.whichChild(target);\r\n if (!stuck && which) { // * due to stickyIntersector\r\n return;\r\n }\r\n setActive(which);\r\n if (menuScroll) {\r\n if (which < menu.childElementCount - 4) {\r\n menuScroll.container.scrollLeft = (which - 3) * 47;\r\n }\r\n else {\r\n menuScroll.container.scrollLeft = which * 47;\r\n }\r\n }\r\n });\r\n menu.addEventListener('click', (e) => {\r\n let target = e.target;\r\n target = utils_1.findUpTag(target, 'LI');\r\n if (!target) {\r\n return;\r\n }\r\n const which = utils_1.whichChild(target);\r\n if (!setActive(which)) {\r\n return;\r\n }\r\n const element = (scroll.splitUp || scroll.container).children[which];\r\n const offsetTop = element.offsetTop + 1; // * due to stickyIntersector\r\n scroll.container.scrollTop = jumpedTo = offsetTop;\r\n //console.log('set scrollTop:', offsetTop);\r\n });\r\n return stickyIntersector;\r\n };\r\n EmoticonsDropdown.onMediaClick = (e) => {\r\n let target = e.target;\r\n target = utils_1.findUpTag(target, 'DIV');\r\n if (!target)\r\n return;\r\n const fileID = target.dataset.docID;\r\n if (!fileID)\r\n return;\r\n if (appImManager_1.default.chatInputC.sendMessageWithDocument(fileID)) {\r\n /* dropdown.classList.remove('active');\r\n toggleEl.classList.remove('active'); */\r\n emoticonsDropdown.toggle(false);\r\n }\r\n else {\r\n console.warn('got no doc by id:', fileID);\r\n }\r\n };\r\n return EmoticonsDropdown;\r\n})();\r\nexports.EmoticonsDropdown = EmoticonsDropdown;\r\nconst emoticonsDropdown = new EmoticonsDropdown();\r\n// @ts-ignore\r\nif (process.env.NODE_ENV != 'production') {\r\n window.emoticonsDropdown = emoticonsDropdown;\r\n}\r\nexports.default = emoticonsDropdown;\r\n" - }, - { - "id": 48, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\helpers\\userAgent.ts", - "name": "./src/helpers/userAgent.ts", - "index": 8, - "index2": 6, - "size": 1248, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\config.ts", - "issuerId": 1, - "issuerName": "./src/lib/config.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 1, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\config.ts", - "name": "./src/lib/config.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - } - ], - "profile": { - "factory": 1, - "building": 374 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 1, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\config.ts", - "module": "./src/lib/config.ts", - "moduleName": "./src/lib/config.ts", - "type": "cjs require", - "userRequest": "../helpers/userAgent", - "loc": "19:20-51" - }, - { - "moduleId": 13, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appPhotosManager.ts", - "module": "./src/lib/appManagers/appPhotosManager.ts", - "moduleName": "./src/lib/appManagers/appPhotosManager.ts", - "type": "cjs require", - "userRequest": "../../helpers/userAgent", - "loc": "10:20-54" - }, - { - "moduleId": 50, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mediaPlayer.ts", - "module": "./src/lib/mediaPlayer.ts", - "moduleName": "./src/lib/mediaPlayer.ts", - "type": "cjs require", - "userRequest": "../helpers/userAgent", - "loc": "10:20-51" - } - ], - "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.isSafari = exports.isAppleMobile = exports.isAndroid = exports.isApple = exports.userAgent = void 0;\r\nexports.userAgent = navigator ? navigator.userAgent : null;\r\nexports.isApple = navigator.userAgent.search(/OS X|iPhone|iPad|iOS/i) != -1;\r\nexports.isAndroid = navigator.userAgent.toLowerCase().indexOf('android') != -1;\r\n/**\r\n * Returns true when run in WebKit derived browsers.\r\n * This is used as a workaround for a memory leak in Safari caused by using Transferable objects to\r\n * transfer data between WebWorkers and the main thread.\r\n * https://github.com/mapbox/mapbox-gl-js/issues/8771\r\n *\r\n * This should be removed once the underlying Safari issue is fixed.\r\n */\r\nconst ctx = typeof (window) !== 'undefined' ? window : self;\r\n// https://stackoverflow.com/a/58065241\r\nexports.isAppleMobile = (/iPad|iPhone|iPod/.test(navigator.platform) ||\r\n (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1)) &&\r\n !ctx.MSStream;\r\nexports.isSafari = !!('safari' in ctx) || !!(exports.userAgent && (/\\b(iPad|iPhone|iPod)\\b/.test(exports.userAgent) || (!!exports.userAgent.match('Safari') && !exports.userAgent.match('Chrome')))) /* || true */;\r\n" - }, - { - "id": 49, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "name": "./src/pages/pageSignIn.ts", - "index": 23, - "index2": 112, - "size": 11141, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "issuerId": 67, - "issuerName": "./src/index.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - } - ], - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 67, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "module": "./src/index.ts", - "moduleName": "./src/index.ts", - "type": "cjs require", - "userRequest": "./pages/pageSignIn", - "loc": "91:57-86" - }, - { - "moduleId": 79, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 109, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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\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 = null;\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', 'hide');\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 let initSelect = () => {\r\n initSelect = null;\r\n countries.forEach((c) => {\r\n initedSelect = true;\r\n /* let unified = unifiedCountryCodeEmoji(c.code);\r\n let emoji = unified.split('-').reduce((prev, curr) => prev + String.fromCodePoint(parseInt(curr, 16)), ''); */\r\n //let emoji = countryCodeEmoji(c.code);\r\n let emoji = c.emoji;\r\n let liArr = [];\r\n c.phoneCode.split(' and ').forEach((phoneCode) => {\r\n let li = document.createElement('li');\r\n var spanEmoji = document.createElement('span');\r\n /* spanEmoji.innerHTML = countryCodeEmoji(c.code); */\r\n //spanEmoji.classList.add('emoji-outer', 'emoji-sizer');\r\n //spanEmoji.innerHTML = ``;\r\n let kek = richtextprocessor_1.RichTextProcessor.wrapRichText(emoji);\r\n //console.log(c.name, emoji, kek, spanEmoji.innerHTML);\r\n li.appendChild(spanEmoji);\r\n spanEmoji.outerHTML = kek;\r\n li.append(c.name);\r\n var span = document.createElement('span');\r\n span.classList.add('phone-code');\r\n span.innerText = '+' + phoneCode;\r\n li.appendChild(span);\r\n liArr.push(li);\r\n list.append(li);\r\n });\r\n c.li = liArr;\r\n });\r\n list.addEventListener('mousedown', function (e) {\r\n let target = e.target;\r\n if (target.tagName != 'LI')\r\n target = utils_1.findUpTag(target, 'LI');\r\n let countryName = target.childNodes[1].textContent; //target.innerText.split('\\n').shift();\r\n let phoneCode = target.querySelector('.phone-code').innerText;\r\n selectCountryCode.value = countryName;\r\n lastCountrySelected = countries.find(c => c.name == countryName);\r\n telEl.value = phoneCode;\r\n setTimeout(() => telEl.focus(), 0);\r\n //console.log('clicked', e, countryName, phoneCode);\r\n });\r\n parent.appendChild(wrapper);\r\n };\r\n initSelect();\r\n let hideTimeout;\r\n selectCountryCode.addEventListener('focus', function (e) {\r\n if (initSelect) {\r\n initSelect();\r\n }\r\n else {\r\n countries.forEach((c) => {\r\n c.li.forEach(li => li.style.display = '');\r\n });\r\n }\r\n clearTimeout(hideTimeout);\r\n wrapper.classList.remove('hide');\r\n void wrapper.offsetWidth; // reflow\r\n wrapper.classList.add('active');\r\n });\r\n selectCountryCode.addEventListener('blur', function (e) {\r\n wrapper.classList.remove('active');\r\n hideTimeout = setTimeout(() => {\r\n wrapper.classList.add('hide');\r\n }, 200);\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 // Код ниже автоматически выберет страну если она осталась одна при поиске\r\n /* if(matches.length == 1 && matches[0].li.length == 1) {\r\n if(matches[0].name == lastCountrySelected) return false;\r\n //console.log('clicking', matches[0]);\r\n \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 } 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 const telLabel = telEl.nextElementSibling;\r\n telEl.addEventListener('input', function (e) {\r\n this.classList.remove('error');\r\n telLabel.innerText = 'Phone Number';\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 && (!lastCountrySelected || !country || lastCountrySelected.phoneCode != country.phoneCode)) {\r\n selectCountryCode.value = countryName;\r\n lastCountrySelected = country;\r\n }\r\n //if(country && (this.value.length - 1) >= (country.pattern ? country.pattern.length : 9)) {\r\n if (country || (this.value.length - 1) > 1) {\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 (!btnNext.style.visibility && /* 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 telLabel.innerText = '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;\r\n telEl.value = '+' + country.phoneCode.split(' and ').shift();\r\n }\r\n }\r\n //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": 50, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mediaPlayer.ts", - "name": "./src/lib/mediaPlayer.ts", - "index": 63, - "index2": 56, - "size": 25659, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts", - "issuerId": 56, - "issuerName": "./src/lib/appManagers/appMediaViewer.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 56, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts", - "name": "./src/lib/appManagers/appMediaViewer.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 1374, - "building": 1210, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 18, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "module": "./src/components/wrappers.ts", - "moduleName": "./src/components/wrappers.ts", - "type": "cjs require", - "userRequest": "../lib/mediaPlayer", - "loc": "21:38-67" - }, - { - "moduleId": 56, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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" - }, - { - "moduleId": 84, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\audio.ts", - "module": "./src/components/audio.ts", - "moduleName": "./src/components/audio.ts", - "type": "cjs require", - "userRequest": "../lib/mediaPlayer", - "loc": "11:22-51" - } - ], - "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.MediaProgressLine = exports.ProgressLine = void 0;\r\nconst utils_1 = require(\"./utils\");\r\nconst config_1 = require(\"./config\");\r\nconst appMediaPlaybackController_1 = __importDefault(require(\"../components/appMediaPlaybackController\"));\r\nconst userAgent_1 = require(\"../helpers/userAgent\");\r\nclass ProgressLine {\r\n constructor(initialValue = 0) {\r\n this.duration = 1;\r\n this.mousedown = false;\r\n this.events = {};\r\n this.onMouseMove = (e) => {\r\n this.mousedown && this.scrub(e);\r\n };\r\n this.onMouseDown = (e) => {\r\n var _a;\r\n this.scrub(e);\r\n this.mousedown = true;\r\n ((_a = this.events) === null || _a === void 0 ? void 0 : _a.onMouseDown) && this.events.onMouseDown(e);\r\n };\r\n this.onMouseUp = (e) => {\r\n var _a;\r\n this.mousedown = false;\r\n ((_a = this.events) === null || _a === void 0 ? void 0 : _a.onMouseUp) && this.events.onMouseUp(e);\r\n };\r\n this.container = document.createElement('div');\r\n this.container.classList.add('progress-line');\r\n this.filled = document.createElement('div');\r\n this.filled.classList.add('progress-line__filled');\r\n const seek = this.seek = document.createElement('input');\r\n seek.classList.add('progress-line__seek');\r\n seek.value = '' + initialValue;\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 seek.max = '' + (this.duration * 1000);\r\n if (initialValue > 0) {\r\n this.setProgress(initialValue);\r\n }\r\n //this.setListeners();\r\n this.container.append(this.filled, seek);\r\n }\r\n setHandlers(events) {\r\n this.events = events;\r\n }\r\n setListeners() {\r\n this.container.addEventListener('mousemove', this.onMouseMove);\r\n this.container.addEventListener('mousedown', this.onMouseDown);\r\n this.container.addEventListener('mouseup', this.onMouseUp);\r\n if (config_1.touchSupport) {\r\n this.container.addEventListener('touchmove', this.onMouseMove);\r\n this.container.addEventListener('touchstart', this.onMouseDown);\r\n this.container.addEventListener('touchend', this.onMouseUp);\r\n }\r\n }\r\n setProgress(scrubTime) {\r\n this.setFilled(scrubTime);\r\n this.seek.value = '' + (scrubTime * 1000);\r\n }\r\n setFilled(scrubTime) {\r\n let scaleX = scrubTime / this.duration;\r\n scaleX = Math.max(0, Math.min(1, scaleX));\r\n this.filled.style.transform = 'scaleX(' + scaleX + ')';\r\n }\r\n scrub(e) {\r\n var _a;\r\n let offsetX;\r\n if (e instanceof MouseEvent) {\r\n offsetX = e.offsetX;\r\n }\r\n else { // touch\r\n const rect = e.target.getBoundingClientRect();\r\n offsetX = e.targetTouches[0].pageX - rect.left;\r\n }\r\n const scrubTime = offsetX / this.container.offsetWidth * this.duration;\r\n this.setFilled(scrubTime);\r\n ((_a = this.events) === null || _a === void 0 ? void 0 : _a.onScrub) && this.events.onScrub(scrubTime);\r\n return scrubTime;\r\n }\r\n removeListeners() {\r\n this.container.removeEventListener('mousemove', this.onMouseMove);\r\n this.container.removeEventListener('mousedown', this.onMouseDown);\r\n this.container.removeEventListener('mouseup', this.onMouseUp);\r\n if (config_1.touchSupport) {\r\n this.container.removeEventListener('touchmove', this.onMouseMove);\r\n this.container.removeEventListener('touchstart', this.onMouseDown);\r\n this.container.removeEventListener('touchend', this.onMouseUp);\r\n }\r\n this.events = {};\r\n }\r\n}\r\nexports.ProgressLine = ProgressLine;\r\nclass MediaProgressLine extends ProgressLine {\r\n constructor(media, streamable = false) {\r\n super();\r\n this.media = media;\r\n this.streamable = streamable;\r\n this.stopAndScrubTimeout = 0;\r\n this.progressRAF = 0;\r\n this.onLoadedData = () => {\r\n this.duration = this.media.duration;\r\n this.seek.setAttribute('max', '' + this.duration * 1000);\r\n };\r\n this.onEnded = () => {\r\n this.setProgress();\r\n };\r\n this.onPlay = () => {\r\n let r = () => {\r\n this.setProgress();\r\n this.progressRAF = this.media.paused ? 0 : window.requestAnimationFrame(r);\r\n };\r\n if (this.progressRAF) {\r\n window.cancelAnimationFrame(this.progressRAF);\r\n }\r\n if (this.streamable) {\r\n this.setLoadProgress();\r\n }\r\n this.progressRAF = window.requestAnimationFrame(r);\r\n };\r\n this.onProgress = (e) => {\r\n this.setLoadProgress();\r\n };\r\n if (streamable) {\r\n this.filledLoad = document.createElement('div');\r\n this.filledLoad.classList.add('progress-line__filled', 'progress-line__loaded');\r\n this.container.prepend(this.filledLoad);\r\n //this.setLoadProgress();\r\n }\r\n if (!media.paused || media.currentTime > 0) {\r\n this.onPlay();\r\n }\r\n this.setSeekMax();\r\n this.setListeners();\r\n this.setHandlers({\r\n onMouseDown: (e) => {\r\n //super.onMouseDown(e);\r\n //Таймер для того, чтобы стопать видео, если зажал мышку и не отпустил клик\r\n if (this.stopAndScrubTimeout) { // возможно лишнее\r\n clearTimeout(this.stopAndScrubTimeout);\r\n }\r\n this.stopAndScrubTimeout = setTimeout(() => {\r\n !this.media.paused && this.media.pause();\r\n this.stopAndScrubTimeout = 0;\r\n }, 150);\r\n },\r\n onMouseUp: (e) => {\r\n //super.onMouseUp(e);\r\n if (this.stopAndScrubTimeout) {\r\n clearTimeout(this.stopAndScrubTimeout);\r\n this.stopAndScrubTimeout = 0;\r\n }\r\n this.media.paused && this.media.play();\r\n }\r\n });\r\n }\r\n scrub(e) {\r\n const scrubTime = super.scrub(e);\r\n this.media.currentTime = scrubTime;\r\n return scrubTime;\r\n }\r\n setLoadProgress() {\r\n if (appMediaPlaybackController_1.default.isSafariBuffering(this.media))\r\n return;\r\n const buf = this.media.buffered;\r\n const numRanges = buf.length;\r\n const currentTime = this.media.currentTime;\r\n let nearestStart = 0, end = 0;\r\n for (let i = 0; i < numRanges; ++i) {\r\n const start = buf.start(i);\r\n if (currentTime >= start && start >= nearestStart) {\r\n nearestStart = start;\r\n end = buf.end(i);\r\n }\r\n //console.log('onProgress range:', i, buf.start(i), buf.end(i), this.media);\r\n }\r\n //console.log('onProgress correct range:', nearestStart, end, this.media);\r\n const percents = this.media.duration ? end / this.media.duration : 0;\r\n this.filledLoad.style.transform = 'scaleX(' + percents + ')';\r\n }\r\n setSeekMax() {\r\n this.duration = this.media.duration;\r\n if (this.duration > 0) {\r\n this.onLoadedData();\r\n }\r\n else {\r\n this.media.addEventListener('loadeddata', this.onLoadedData);\r\n }\r\n }\r\n setProgress() {\r\n if (appMediaPlaybackController_1.default.isSafariBuffering(this.media))\r\n return;\r\n const currentTime = this.media.currentTime;\r\n super.setProgress(currentTime);\r\n }\r\n setListeners() {\r\n super.setListeners();\r\n this.media.addEventListener('ended', this.onEnded);\r\n this.media.addEventListener('play', this.onPlay);\r\n this.streamable && this.media.addEventListener('progress', this.onProgress);\r\n }\r\n removeListeners() {\r\n super.removeListeners();\r\n this.media.removeEventListener('loadeddata', this.onLoadedData);\r\n this.media.removeEventListener('ended', this.onEnded);\r\n this.media.removeEventListener('play', this.onPlay);\r\n this.streamable && this.media.removeEventListener('progress', this.onProgress);\r\n if (this.stopAndScrubTimeout) {\r\n clearTimeout(this.stopAndScrubTimeout);\r\n }\r\n if (this.progressRAF) {\r\n window.cancelAnimationFrame(this.progressRAF);\r\n }\r\n }\r\n}\r\nexports.MediaProgressLine = MediaProgressLine;\r\nlet lastVolume = 1, muted = !lastVolume;\r\nclass VideoPlayer {\r\n /* private videoParent: HTMLElement;\r\n private videoWhichChild: number; */\r\n constructor(video, play = false, streamable = false) {\r\n var _a;\r\n this.video = video;\r\n this.onFullScreen = () => {\r\n // @ts-ignore\r\n const 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 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, streamable);\r\n controls.prepend(this.progress.container);\r\n }\r\n if (play /* && video.paused */) {\r\n const promise = video.play();\r\n promise.catch((err) => {\r\n if (err.name == 'NotAllowedError') {\r\n video.muted = true;\r\n video.autoplay = true;\r\n video.play();\r\n }\r\n }).finally(() => {\r\n this.wrapper.classList.toggle('is-playing', !this.video.paused);\r\n });\r\n //(this.wrapper.querySelector('.toggle') as HTMLButtonElement).click();\r\n }\r\n }\r\n stylePlayer() {\r\n const { wrapper: player, video, skin } = this;\r\n player.classList.add(skin);\r\n const 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 const toggle = player.querySelectorAll('.toggle');\r\n const 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 const volumeDiv = document.createElement('div');\r\n volumeDiv.classList.add('player-volume');\r\n volumeDiv.innerHTML = `\r\n \r\n `;\r\n const volumeSvg = volumeDiv.firstElementChild;\r\n volumeSvg.addEventListener('click', (e) => {\r\n utils_1.cancelEvent(e);\r\n video.muted = !video.muted;\r\n });\r\n const volumeProgress = new ProgressLine();\r\n volumeProgress.setListeners();\r\n volumeProgress.setHandlers({\r\n onScrub: currentTime => {\r\n const value = Math.max(Math.min(currentTime, 1), 0);\r\n //console.log('volume scrub:', currentTime, value);\r\n video.muted = false;\r\n video.volume = value;\r\n }\r\n });\r\n volumeDiv.append(volumeProgress.container);\r\n const setVolume = () => {\r\n const volume = video.volume;\r\n let d;\r\n if (!volume || video.muted) {\r\n d = `M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z`;\r\n }\r\n else if (volume > .5) {\r\n d = `M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77z`;\r\n }\r\n else if (volume > 0 && volume < .25) {\r\n d = `M7 9v6h4l5 5V4l-5 5H7z`;\r\n }\r\n else {\r\n d = `M18.5 12c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM5 9v6h4l5 5V4L9 9H5z`;\r\n }\r\n try {\r\n volumeSvg.innerHTML = ``;\r\n }\r\n catch (err) { }\r\n if (!volumeProgress.mousedown) {\r\n volumeProgress.setProgress(video.muted ? 0 : volume);\r\n }\r\n };\r\n // не вызовется повторно если на 1 установить 1\r\n video.addEventListener('volumechange', () => {\r\n muted = video.muted;\r\n lastVolume = video.volume;\r\n setVolume();\r\n });\r\n video.volume = lastVolume;\r\n video.muted = muted;\r\n setVolume();\r\n // volume end\r\n const leftControls = player.querySelector('.left-controls');\r\n leftControls.insertBefore(volumeDiv, timeElapsed.parentElement);\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 if (!config_1.touchSupport) {\r\n this.togglePlay();\r\n return;\r\n }\r\n });\r\n if (config_1.touchSupport) {\r\n let showControlsTimeout = 0;\r\n const t = () => {\r\n showControlsTimeout = setTimeout(() => {\r\n showControlsTimeout = 0;\r\n player.classList.remove('show-controls');\r\n }, 3e3);\r\n };\r\n player.addEventListener('click', () => {\r\n if (showControlsTimeout) {\r\n clearTimeout(showControlsTimeout);\r\n }\r\n else {\r\n player.classList.add('show-controls');\r\n }\r\n t();\r\n });\r\n player.addEventListener('touchstart', () => {\r\n player.classList.add('show-controls');\r\n clearTimeout(showControlsTimeout);\r\n });\r\n player.addEventListener('touchend', () => {\r\n if (player.classList.contains('is-playing')) {\r\n t();\r\n }\r\n });\r\n }\r\n /* player.addEventListener('click', (e) => {\r\n if(e.target != player) {\r\n return;\r\n }\r\n \r\n this.togglePlay();\r\n }); */\r\n /* video.addEventListener('play', () => {\r\n }); */\r\n video.addEventListener('pause', () => {\r\n clearInterval(updateInterval);\r\n });\r\n video.addEventListener('dblclick', () => {\r\n if (config_1.touchSupport) {\r\n return;\r\n }\r\n return this.toggleFullScreen(fullScreenButton);\r\n });\r\n fullScreenButton.addEventListener('click', (e) => {\r\n return this.toggleFullScreen(fullScreenButton);\r\n });\r\n 'webkitfullscreenchange mozfullscreenchange fullscreenchange MSFullscreenChange'.split(' ').forEach(eventName => {\r\n player.addEventListener(eventName, this.onFullScreen, false);\r\n });\r\n }\r\n else if (skin === 'circle') {\r\n const wrapper = document.createElement('div');\r\n wrapper.classList.add('circle-time-left');\r\n video.parentNode.insertBefore(wrapper, video);\r\n wrapper.innerHTML = '
';\r\n var circle = player.querySelector('.progress-ring__circle');\r\n const radius = circle.r.baseVal.value;\r\n var circumference = 2 * Math.PI * radius;\r\n var timeDuration = player.querySelector('.circle-time');\r\n const 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 const 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 video.addEventListener('play', () => {\r\n this.wrapper.classList.add('is-playing');\r\n });\r\n video.addEventListener('pause', () => {\r\n this.wrapper.classList.remove('is-playing');\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.wrapper.classList.toggle('is-playing', !this.video.paused);\r\n }\r\n handleProgress(timeDuration, circumference, circle, updateInterval) {\r\n const { video, skin } = this;\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 const 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 const 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 const skin = this.skin;\r\n if (skin === 'default') {\r\n return `\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 else if (skin === 'circle') {\r\n return `\r\n \r\n \r\n \r\n `;\r\n }\r\n }\r\n static isFullScreen() {\r\n // @ts-ignore\r\n return !!(document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement || document.msFullscreenElement);\r\n }\r\n toggleFullScreen(fullScreenButton) {\r\n // alternative standard method\r\n const player = this.wrapper;\r\n // * https://caniuse.com/#feat=fullscreen\r\n if (userAgent_1.isAppleMobile) {\r\n const video = this.video;\r\n video.webkitEnterFullscreen();\r\n video.enterFullscreen();\r\n return;\r\n }\r\n if (!VideoPlayer.isFullScreen()) {\r\n player.classList.add('ckin__fullscreen');\r\n /* const videoParent = this.video.parentElement;\r\n const videoWhichChild = whichChild(this.video);\r\n const needVideoRemount = videoParent != player;\r\n \r\n if(needVideoRemount) {\r\n this.videoParent = videoParent;\r\n this.videoWhichChild = videoWhichChild;\r\n player.prepend(this.video);\r\n } */\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 /* if(this.videoParent) {\r\n const {videoWhichChild, videoParent} = this;\r\n if(!videoWhichChild) {\r\n videoParent.prepend(this.video);\r\n } else {\r\n videoParent.insertBefore(this.video, videoParent.children[videoWhichChild]);\r\n }\r\n \r\n this.videoParent = null;\r\n this.videoWhichChild = -1;\r\n } */\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}\r\nexports.default = VideoPlayer;\r\n" - }, - { - "id": 51, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\appSelectPeers.ts", - "name": "./src/components/appSelectPeers.ts", - "index": 68, - "index2": 59, - "size": 13957, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\appForward.ts", - "issuerId": 42, - "issuerName": "./src/components/appForward.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 42, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\appForward.ts", - "name": "./src/components/appForward.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 949, - "building": 1498, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 42, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 90, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\addMembers.ts", - "module": "./src/components/sidebarLeft/addMembers.ts", - "moduleName": "./src/components/sidebarLeft/addMembers.ts", - "type": "cjs require", - "userRequest": "../appSelectPeers", - "loc": "25:25-53" - }, - { - "moduleId": 97, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\includedChats.ts", - "module": "./src/components/sidebarLeft/includedChats.ts", - "moduleName": "./src/components/sidebarLeft/includedChats.ts", - "type": "cjs require", - "userRequest": "../appSelectPeers", - "loc": "25:25-53" - } - ], - "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 appPeersManager_1 = __importDefault(require(\"../lib/appManagers/appPeersManager\"));\r\nconst appPhotosManager_1 = __importDefault(require(\"../lib/appManagers/appPhotosManager\"));\r\n// TODO: правильная сортировка для addMembers, т.е. для peerType: 'contacts', потому что там идут сначала контакты - потом неконтакты, а должно всё сортироваться по имени\r\nlet loadedAllDialogs = false;\r\nclass AppSelectPeers {\r\n constructor(appendTo, onChange, peerType = ['dialogs'], onFirstRender, renderResultsFunc) {\r\n this.appendTo = appendTo;\r\n this.onChange = onChange;\r\n this.peerType = peerType;\r\n this.renderResultsFunc = renderResultsFunc;\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 //public selected: {[peerID: number]: HTMLElement} = {};\r\n this.selected = new Set();\r\n this.freezed = false;\r\n this.folderID = 0;\r\n this.offsetIndex = 0;\r\n this.query = '';\r\n this.loadedWhat = {};\r\n this.container.classList.add('selector');\r\n if (!this.renderResultsFunc) {\r\n this.renderResultsFunc = this.renderResults;\r\n }\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.includes('dialogs') ? '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.chatsContainer.addEventListener('click', (e) => {\r\n const target = utils_1.findUpAttribute(e.target, 'data-peerID');\r\n utils_1.cancelEvent(e);\r\n if (!target)\r\n return;\r\n if (this.freezed)\r\n return;\r\n let key = target.getAttribute('data-peerID');\r\n key = +key || key;\r\n target.classList.toggle('active');\r\n if (this.selected.has(key)) {\r\n this.remove(key);\r\n }\r\n else {\r\n this.add(key);\r\n }\r\n const 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 const peerID = target.dataset.key;\r\n const li = this.chatsContainer.querySelector('[data-peerid=\"' + peerID + '\"]');\r\n if (!li) {\r\n this.remove(+peerID || peerID);\r\n }\r\n else {\r\n li.click();\r\n }\r\n });\r\n this.input.addEventListener('input', () => {\r\n const value = this.input.value;\r\n if (this.query != value) {\r\n if (this.peerType.includes('contacts')) {\r\n delete this.loadedWhat.contacts;\r\n this.cachedContacts = null;\r\n }\r\n //if(this.peerType.includes('dialogs')) {\r\n delete this.loadedWhat.dialogs;\r\n delete this.loadedWhat.archived;\r\n this.folderID = 0;\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 // WARNING TIMEOUT\r\n setTimeout(() => {\r\n let getResultsPromise = this.getMoreResults();\r\n if (onFirstRender) {\r\n getResultsPromise.then(() => {\r\n onFirstRender();\r\n });\r\n }\r\n }, 0);\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 if (this.loadedWhat.dialogs && this.loadedWhat.archived) {\r\n return;\r\n }\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, this.folderID);\r\n const value = yield this.promise;\r\n this.promise = null;\r\n let dialogs = value.dialogs;\r\n if (dialogs.length) {\r\n const newOffsetIndex = dialogs[dialogs.length - 1].index || 0;\r\n dialogs = dialogs.slice();\r\n dialogs.findAndSplice(d => d.peerID == utils_1.$rootScope.myID); // no my account\r\n if (!this.offsetIndex && this.folderID == 0 &&\r\n (!this.query || 'saved messages'.includes(this.query.toLowerCase())) &&\r\n this.peerType.includes('dialogs')) {\r\n dialogs.unshift({\r\n peerID: utils_1.$rootScope.myID,\r\n pFlags: {}\r\n });\r\n }\r\n this.offsetIndex = newOffsetIndex;\r\n this.renderResultsFunc(dialogs.map(dialog => dialog.peerID));\r\n }\r\n else {\r\n if (!this.loadedWhat.dialogs) {\r\n this.loadedWhat.dialogs = true;\r\n this.offsetIndex = 0;\r\n this.folderID = 1;\r\n return this.getMoreDialogs();\r\n }\r\n else {\r\n this.loadedWhat.archived = true;\r\n if (!this.loadedWhat.contacts && this.peerType.includes('contacts')) {\r\n return this.getMoreContacts();\r\n }\r\n }\r\n }\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.loadedWhat.contacts) {\r\n return;\r\n }\r\n if (!this.cachedContacts) {\r\n /* const promises: Promise[] = [appUsersManager.getContacts(this.query)];\r\n if(!this.peerType.includes('dialogs')) {\r\n promises.push(appMessagesManager.getConversationsAll());\r\n }\r\n \r\n this.promise = Promise.all(promises);\r\n this.cachedContacts = (await this.promise)[0].slice(); */\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 == utils_1.$rootScope.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.renderResultsFunc(arr);\r\n }\r\n if (!this.cachedContacts.length) {\r\n this.loadedWhat.contacts = true;\r\n // need to load non-contacts\r\n if (!this.peerType.includes('dialogs')) {\r\n return this.getMoreDialogs();\r\n }\r\n }\r\n });\r\n }\r\n getMoreResults() {\r\n const promises = [];\r\n if (!loadedAllDialogs) {\r\n promises.push(appMessagesManager_1.default.getConversationsAll());\r\n }\r\n if ((this.peerType.includes('dialogs') || this.loadedWhat.contacts) && !this.loadedWhat.archived) { // to load non-contacts\r\n promises.push(this.getMoreDialogs());\r\n if (!this.loadedWhat.archived) {\r\n return Promise.all(promises);\r\n }\r\n }\r\n if (this.peerType.includes('contacts') && !this.loadedWhat.contacts) {\r\n promises.push(this.getMoreContacts());\r\n }\r\n return Promise.all(promises);\r\n }\r\n renderResults(peerIDs) {\r\n //console.log('will renderResults:', peerIDs);\r\n // оставим только неконтакты с диалогов\r\n if (!this.peerType.includes('dialogs') && this.loadedWhat.contacts) {\r\n peerIDs = peerIDs.filter(peerID => {\r\n return appUsersManager_1.default.isNonContactUser(peerID);\r\n });\r\n }\r\n peerIDs.forEach(peerID => {\r\n const { dom } = appDialogsManager_1.default.addDialog(peerID, this.scrollable, false, false);\r\n const selected = this.selected.has(peerID);\r\n dom.containerEl.insertAdjacentHTML('afterbegin', `
`);\r\n if (selected)\r\n dom.listEl.classList.add('active');\r\n let subtitle = '';\r\n if (peerID < 0) {\r\n subtitle = appChatsManager_1.default.getChatMembersString(-peerID);\r\n }\r\n else if (peerID == utils_1.$rootScope.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 = `${subtitle}`;\r\n }\r\n }\r\n dom.lastMessageSpan.innerHTML = subtitle;\r\n });\r\n }\r\n add(peerID, title) {\r\n //console.trace('add');\r\n const div = document.createElement('div');\r\n div.classList.add('selector-user', 'scale-in');\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 div.dataset.key = '' + peerID;\r\n this.selected.add(peerID);\r\n if (typeof (peerID) === 'number') {\r\n if (title === undefined) {\r\n title = peerID == utils_1.$rootScope.myID ? 'Saved' : appPeersManager_1.default.getPeerTitle(peerID, false, true);\r\n }\r\n avatarEl.setAttribute('peer', '' + peerID);\r\n }\r\n if (title) {\r\n div.innerHTML = title;\r\n }\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.selectedScrollable.scrollTo(this.selectedScrollable.scrollHeight, true, true);\r\n this.onChange && this.onChange(this.selected.size);\r\n return div;\r\n }\r\n remove(key) {\r\n //const div = this.selected[peerID];\r\n const div = this.selectedContainer.querySelector(`[data-key=\"${key}\"]`);\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 this.selected.delete(key);\r\n div.remove();\r\n this.onChange && this.onChange(this.selected.size);\r\n }, { once: true });\r\n }\r\n getSelected() {\r\n return [...this.selected];\r\n }\r\n}\r\nexports.AppSelectPeers = AppSelectPeers;\r\n" - }, - { - "id": 53, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webpWorkerController.ts", - "name": "./src/lib/webp/webpWorkerController.ts", - "index": 18, - "index2": 18, - "size": 2095, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts", - "issuerId": 2, - "issuerName": "./src/lib/mtproto/mtprotoworker.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts", - "name": "./src/lib/mtproto/mtprotoworker.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - } - ], - "profile": { - "factory": 2342, - "building": 10824, - "dependencies": 20 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 2, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts", - "module": "./src/lib/mtproto/mtprotoworker.ts", - "moduleName": "./src/lib/mtproto/mtprotoworker.ts", - "type": "cjs require", - "userRequest": "../webp/webpWorkerController", - "loc": "10:47-86" - }, - { - "moduleId": 18, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "module": "./src/components/wrappers.ts", - "moduleName": "./src/components/wrappers.ts", - "type": "cjs require", - "userRequest": "../lib/webp/webpWorkerController", - "loc": "30:47-90" - } - ], - "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.WebpWorkerController = void 0;\r\nconst webp_worker_1 = __importDefault(require(\"worker-loader!./webp.worker\"));\r\nconst cancellablePromise_1 = require(\"../../helpers/cancellablePromise\");\r\nconst mtprotoworker_1 = __importDefault(require(\"../mtproto/mtprotoworker\"));\r\nclass WebpWorkerController {\r\n constructor() {\r\n this.convertPromises = {};\r\n }\r\n init() {\r\n this.worker = new webp_worker_1.default();\r\n this.worker.addEventListener('message', (e) => {\r\n const payload = e.data.payload;\r\n if (payload.fileName.indexOf('main-') === 0) {\r\n const promise = this.convertPromises[payload.fileName];\r\n if (promise) {\r\n payload.bytes ? promise.resolve(payload.bytes) : promise.reject();\r\n delete this.convertPromises[payload.fileName];\r\n }\r\n }\r\n else {\r\n mtprotoworker_1.default.postMessage(e.data);\r\n }\r\n });\r\n }\r\n postMessage(data) {\r\n if (this.init) {\r\n this.init();\r\n this.init = null;\r\n }\r\n this.worker.postMessage(data);\r\n }\r\n convert(fileName, bytes) {\r\n fileName = 'main-' + fileName;\r\n if (this.convertPromises.hasOwnProperty(fileName)) {\r\n return this.convertPromises[fileName];\r\n }\r\n const convertPromise = cancellablePromise_1.deferredPromise();\r\n this.postMessage({ type: 'convertWebp', payload: { fileName, bytes } });\r\n return this.convertPromises[fileName] = convertPromise;\r\n }\r\n}\r\nexports.WebpWorkerController = WebpWorkerController;\r\nconst webpWorkerController = new WebpWorkerController();\r\n// @ts-ignore\r\nif (process.env.NODE_ENV != 'production') {\r\n window.webpWorkerController = webpWorkerController;\r\n}\r\nexports.default = webpWorkerController;\r\n" - }, - { - "id": 54, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\opusDecodeController.ts", - "name": "./src/lib/opusDecodeController.ts", - "index": 52, - "index2": 41, - "size": 6088, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDocsManager.ts", - "issuerId": 12, - "issuerName": "./src/lib/appManagers/appDocsManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 12, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDocsManager.ts", - "name": "./src/lib/appManagers/appDocsManager.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 972, - "building": 1447, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 12, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDocsManager.ts", - "module": "./src/lib/appManagers/appDocsManager.ts", - "moduleName": "./src/lib/appManagers/appDocsManager.ts", - "type": "cjs require", - "userRequest": "../opusDecodeController", - "loc": "17:47-81" - }, - { - "moduleId": 98, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\input.ts", - "module": "./src/components/chat/input.ts", - "moduleName": "./src/components/chat/input.ts", - "type": "cjs require", - "userRequest": "../../lib/opusDecodeController", - "loc": "18:47-88" - } - ], - "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\nconst config_1 = require(\"./config\");\r\nconst logger_1 = require(\"./logger\");\r\nclass OpusDecodeController {\r\n constructor() {\r\n this.sampleRate = 48000;\r\n this.tasks = [];\r\n this.keepAlive = false;\r\n this.log = logger_1.logger('OPUS', logger_1.LogLevels.error);\r\n }\r\n isPlaySupported() {\r\n if (this.isPlaySupportedResult !== undefined)\r\n return this.isPlaySupportedResult;\r\n const audio = document.createElement('audio');\r\n return this.isPlaySupportedResult = !!(audio.canPlayType && audio.canPlayType('audio/ogg;').replace(/no/, '')) /* && 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 this.log('[WAV] got message:', 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 this.log('[DECODER] got message', data);\r\n if (data.type == 'done') {\r\n //this.log('[DECODER] send done to wav');\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.log('[DECODER] send encode to wav');\r\n this.wavWorker.postMessage({\r\n command: 'encode',\r\n buffers: e.data\r\n }, config_1.isSafari ? undefined : 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 if (!result) {\r\n task.callback.reject('timeout');\r\n }\r\n else {\r\n clearTimeout(task.timeout);\r\n task.callback.resolve({ bytes: result, waveform: task.waveform });\r\n }\r\n if (this.tasks.length) {\r\n this.executeNewTask(this.tasks[0]);\r\n }\r\n this.terminateWorkers();\r\n }\r\n terminateWorkers(kill = false) {\r\n if ((this.keepAlive || this.tasks.length) && !kill)\r\n return;\r\n if (this.worker) {\r\n this.worker.terminate();\r\n this.worker = null;\r\n }\r\n if (this.wavWorker) {\r\n this.wavWorker.terminate();\r\n this.wavWorker = null;\r\n }\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.log('[DECODER] send decode');\r\n this.worker.postMessage({\r\n command: 'decode',\r\n pages: task.pages,\r\n waveform: task.withWaveform\r\n }, config_1.isSafari ? undefined : [task.pages.buffer]);\r\n //}, 1e3);\r\n task.timeout = setTimeout(() => {\r\n this.log.error('decode timeout' /* , task */);\r\n this.terminateWorkers(true);\r\n if (this.tasks.length) {\r\n this.loadWorker();\r\n this.loadWavWorker();\r\n }\r\n this.onTaskEnd(this.tasks.shift());\r\n }, 10e3);\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 timeout: 0\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\nconst opusDecodeController = new OpusDecodeController();\r\n// @ts-ignore\r\nif (process.env.NODE_ENV != 'production') {\r\n window.opusDecodeController = opusDecodeController;\r\n}\r\nexports.default = opusDecodeController;\r\n" - }, - { - "id": 55, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appWebPagesManager.ts", - "name": "./src/lib/appManagers/appWebPagesManager.ts", - "index": 54, - "index2": 44, - "size": 4219, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "issuerId": 7, - "issuerName": "./src/lib/appManagers/appMessagesManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "name": "./src/lib/appManagers/appMessagesManager.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 2083, - "building": 945, - "dependencies": 16 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 7, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "module": "./src/lib/appManagers/appMessagesManager.ts", - "moduleName": "./src/lib/appManagers/appMessagesManager.ts", - "type": "cjs require", - "userRequest": "./appWebPagesManager", - "loc": "33:45-76" - }, - { - "moduleId": 98, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\input.ts", - "module": "./src/components/chat/input.ts", - "moduleName": "./src/components/chat/input.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appWebPagesManager", - "loc": "10:45-96" - } - ], - "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 const 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": 56, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts", - "name": "./src/lib/appManagers/appMediaViewer.ts", - "index": 62, - "index2": 61, - "size": 49644, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "./appMediaViewer", - "loc": "19:41-68" - }, - { - "moduleId": 24, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", - "type": "cjs require", - "userRequest": "./appMediaViewer", - "loc": "47: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.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 logger_1 = require(\"../logger\");\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 = require(\"../../components/lazyLoadQueue\");\r\nconst appForward_1 = __importDefault(require(\"../../components/appForward\"));\r\nconst config_1 = require(\"../config\");\r\nconst appMediaPlaybackController_1 = __importDefault(require(\"../../components/appMediaPlaybackController\"));\r\nconst cancellablePromise_1 = require(\"../../helpers/cancellablePromise\");\r\n// TODO: масштабирование картинок (не SVG) при ресайзе, и правильный возврат на исходную позицию\r\n// TODO: картинки \"обрезаются\" если возвращаются или появляются с места, где есть их перекрытие (топбар, поле ввода)\r\n// TODO: видео в мобильной вёрстке, если показываются элементы управления: если свайпнуть в сторону, то элементы вернутся на место, т.е. прыгнут - это не ок, надо бы замаскировать\r\nclass SwipeHandler {\r\n constructor(element, onSwipe) {\r\n this.onSwipe = onSwipe;\r\n this.handleTouchStart = (evt) => {\r\n // * Fix for seek input\r\n if (evt.target.tagName == 'INPUT') {\r\n this.xDown = this.yDown = null;\r\n return;\r\n }\r\n const firstTouch = evt.touches[0];\r\n this.xDown = firstTouch.clientX;\r\n this.yDown = firstTouch.clientY;\r\n };\r\n this.handleTouchMove = (evt) => {\r\n if (this.xDown == null || this.yDown == null) {\r\n return;\r\n }\r\n const xUp = evt.touches[0].clientX;\r\n const yUp = evt.touches[0].clientY;\r\n const xDiff = this.xDown - xUp;\r\n const yDiff = this.yDown - yUp;\r\n // if(Math.abs(xDiff) > Math.abs(yDiff)) { /*most significant*/\r\n // if(xDiff > 0) { /* left swipe */ \r\n // } else { /* right swipe */\r\n // } \r\n // } else {\r\n // if(yDiff > 0) { /* up swipe */ \r\n // } else { /* down swipe */\r\n // }\r\n // }\r\n /* reset values */\r\n if (this.onSwipe(xDiff, yDiff)) {\r\n this.xDown = null;\r\n this.yDown = null;\r\n }\r\n };\r\n element.addEventListener('touchstart', this.handleTouchStart, false);\r\n element.addEventListener('touchmove', this.handleTouchMove, false);\r\n }\r\n}\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.preloaderStreamable = null;\r\n this.lastTarget = null;\r\n this.prevTargets = [];\r\n this.nextTargets = [];\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.onClickDownload = (e) => {\r\n const message = appMessagesManager_1.default.getMessage(this.currentMessageID);\r\n if (message.media.photo) {\r\n appPhotosManager_1.default.savePhotoFile(message.media.photo);\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);\r\n }\r\n }\r\n };\r\n this.onClick = (e) => {\r\n if (this.setMoverAnimationPromise)\r\n return;\r\n const target = e.target;\r\n if (target.tagName == 'A')\r\n return;\r\n utils_1.cancelEvent(e);\r\n if (config_1.touchSupport) {\r\n if (this.highlightSwitchersTimeout) {\r\n clearTimeout(this.highlightSwitchersTimeout);\r\n }\r\n else {\r\n this.wholeDiv.classList.add('highlight-switchers');\r\n }\r\n this.highlightSwitchersTimeout = window.setTimeout(() => {\r\n this.wholeDiv.classList.remove('highlight-switchers');\r\n this.highlightSwitchersTimeout = 0;\r\n }, 3e3);\r\n return;\r\n }\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.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 this.log = logger_1.logger('AMV');\r\n this.preloader = new preloader_1.default();\r\n this.preloaderStreamable = new preloader_1.default(undefined, false, true);\r\n this.lazyLoadQueue = new lazyLoadQueue_1.LazyLoadQueueBase();\r\n misc_1.parseMenuButtonsTo(this.buttons, this.wholeDiv.querySelectorAll(`[class*='menu']`));\r\n const close = (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 as HTMLImageElement).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 this.setMoverPromise = null;\r\n if (appForward_1.default.container.classList.contains('active')) {\r\n setTimeout(() => {\r\n appForward_1.default.close();\r\n }, 200);\r\n }\r\n window.removeEventListener('keydown', this.onKeyDown);\r\n };\r\n [this.buttons.close, this.buttons[\"mobile-close\"], this.preloaderStreamable.preloader].forEach(el => {\r\n el.addEventListener('click', close);\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, this.buttons[\"menu-download\"]].forEach(el => {\r\n el.addEventListener('click', this.onClickDownload);\r\n });\r\n const forward = (e) => {\r\n appForward_1.default.init([this.currentMessageID]);\r\n };\r\n [this.buttons.forward, this.buttons[\"menu-forward\"]].forEach(el => {\r\n el.addEventListener('click', forward);\r\n });\r\n this.wholeDiv.addEventListener('click', this.onClick);\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 if (config_1.touchSupport) {\r\n const swipeHandler = new SwipeHandler(this.wholeDiv, (xDiff, yDiff) => {\r\n if (mediaPlayer_1.default.isFullScreen()) {\r\n return;\r\n }\r\n //console.log(xDiff, yDiff);\r\n const percents = Math.abs(xDiff) / appPhotosManager_1.default.windowW;\r\n if (percents > .2 || xDiff > 125) {\r\n //console.log('will swipe', xDiff);\r\n if (xDiff < 0) {\r\n this.buttons.prev.click();\r\n }\r\n else {\r\n this.buttons.next.click();\r\n }\r\n return true;\r\n }\r\n const percentsY = Math.abs(yDiff) / appPhotosManager_1.default.windowH;\r\n if (percentsY > .2 || yDiff > 125) {\r\n this.buttons.close.click();\r\n return true;\r\n }\r\n return false;\r\n });\r\n }\r\n }\r\n setMoverToTarget(target, closing = false, fromRight = 0) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const mover = this.content.mover;\r\n if (!target) {\r\n target = this.content.container;\r\n }\r\n if (!closing) {\r\n mover.innerHTML = '';\r\n //mover.append(this.buttons.prev, this.buttons.next);\r\n }\r\n this.removeCenterFromMover(mover);\r\n const wasActive = fromRight !== 0;\r\n const 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 const containerRect = this.content.container.getBoundingClientRect();\r\n let transform = '';\r\n let left;\r\n let top;\r\n if (wasActive) {\r\n left = fromRight === 1 ? appPhotosManager_1.default.windowW : -containerRect.width;\r\n top = containerRect.top;\r\n }\r\n else {\r\n left = rect.left;\r\n top = rect.top;\r\n }\r\n transform += `translate3d(${left}px,${top}px,0) `;\r\n /* if(wasActive) {\r\n left = fromRight === 1 ? appPhotosManager.windowW / 2 : -(containerRect.width + appPhotosManager.windowW / 2);\r\n transform += `translate(${left}px,-50%) `;\r\n } else {\r\n left = rect.left - (appPhotosManager.windowW / 2);\r\n top = rect.top - (appPhotosManager.windowH / 2);\r\n transform += `translate(${left}px,${top}px) `;\r\n } */\r\n let aspecter;\r\n if (target instanceof HTMLImageElement || target instanceof HTMLVideoElement || target.tagName == 'DIV') {\r\n if (mover.firstElementChild && mover.firstElementChild.classList.contains('media-viewer-aspecter')) {\r\n aspecter = mover.firstElementChild;\r\n const player = aspecter.querySelector('.ckin__player');\r\n if (player) {\r\n const 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 mover.style.width = containerRect.width + 'px';\r\n mover.style.height = containerRect.height + 'px';\r\n const scaleX = rect.width / containerRect.width;\r\n const 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 const 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 const isOut = target.classList.contains('is-out');\r\n const deferred = this.setMoverAnimationPromise = cancellablePromise_1.deferredPromise();\r\n const ret = { onAnimationEnd: deferred };\r\n this.setMoverAnimationPromise.then(() => {\r\n this.setMoverAnimationPromise = null;\r\n });\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 const video = mediaElement = document.createElement('video');\r\n video.src = target === null || target === void 0 ? void 0 : target.src;\r\n }\r\n else if (target instanceof SVGSVGElement) {\r\n const clipID = target.dataset.clipID;\r\n const newClipID = clipID + '-mv';\r\n const { width, height } = containerRect;\r\n const 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 // нижние два свойства для масштабирования\r\n newSvg.setAttributeNS(null, 'viewBox', `0 0 ${width} ${height}`);\r\n newSvg.setAttributeNS(null, 'preserveAspectRatio', 'xMidYMid meet');\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 const defs = newSvg.firstElementChild;\r\n const 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 const 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 const 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 if (mediaElement) {\r\n aspecter.append(mediaElement);\r\n }\r\n }\r\n mediaElement = mover.querySelector('video, img');\r\n if (mediaElement instanceof HTMLImageElement) {\r\n mediaElement.classList.add('thumbnail');\r\n if (!aspecter) {\r\n mediaElement.style.width = containerRect.width + 'px';\r\n mediaElement.style.height = containerRect.height + 'px';\r\n }\r\n if (src) {\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 as HTMLSourceElement).src || src)) {\r\n await new Promise((resolve, reject) => {\r\n mediaElement.addEventListener('loadeddata', resolve);\r\n \r\n if(src) {\r\n (mediaElement.firstElementChild as HTMLSourceElement).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(mover.classList.contains('center')) {\r\n mover.classList.remove('center');\r\n void mover.offsetLeft; // reflow\r\n } */\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.cssText = 'display: none;';\r\n deferred.resolve();\r\n }, delay);\r\n return ret;\r\n }\r\n //await new Promise((resolve) => setTimeout(resolve, 0));\r\n yield new Promise((resolve) => window.requestAnimationFrame(resolve));\r\n // чтобы проверить установленную позицию - раскомментировать\r\n //throw '';\r\n mover.style.transform = `translate3d(${containerRect.left}px,${containerRect.top}px,0) scale(1,1)`;\r\n //mover.style.transform = `translate(-50%,-50%) 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') || true) {\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 // эти строки нужны для установки центральной позиции, в случае ресайза это будет нужно\r\n mover.classList.add('center', 'no-transition');\r\n /* mover.style.left = mover.style.top = '50%';\r\n mover.style.transform = 'translate(-50%, -50%)';\r\n void mover.offsetLeft; // reflow */\r\n // это уже нужно для будущих анимаций\r\n mover.classList.add('active');\r\n delete mover.dataset.timeout;\r\n deferred.resolve();\r\n }, delay);\r\n if (path) {\r\n this.sizeTailPath(path, containerRect, scaleX, delay, true, isOut, borderRadius);\r\n }\r\n return ret;\r\n });\r\n }\r\n setFullAspect(aspecter, containerRect, rect) {\r\n /* let media = aspecter.firstElementChild;\r\n let proportion: number;\r\n if(media instanceof HTMLImageElement) {\r\n proportion = media.naturalWidth / media.naturalHeight;\r\n } else if(media instanceof HTMLVideoElement) {\r\n proportion = media.videoWidth / media.videoHeight;\r\n } */\r\n const proportion = containerRect.width / containerRect.height;\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 const start = Date.now();\r\n const { width, height } = rect;\r\n delay = delay / 2;\r\n const br = borderRadius.split(' ').map(v => parseInt(v));\r\n const step = () => {\r\n const 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 const _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 removeCenterFromMover(mover) {\r\n if (mover.classList.contains('center')) {\r\n //const rect = mover.getBoundingClientRect();\r\n const rect = this.content.container.getBoundingClientRect();\r\n mover.style.transform = `translate3d(${rect.left}px,${rect.top}px,0)`;\r\n mover.classList.remove('center');\r\n void mover.offsetLeft; // reflow\r\n mover.classList.remove('no-transition');\r\n }\r\n }\r\n moveTheMover(mover, toLeft = true) {\r\n const windowW = appPhotosManager_1.default.windowW;\r\n this.removeCenterFromMover(mover);\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 const rect = mover.getBoundingClientRect();\r\n const newTransform = mover.style.transform.replace(/translate\\((.+?),/, (match, p1) => {\r\n const x = toLeft ? -rect.width : windowW;\r\n //const x = toLeft ? -(rect.right + (rect.width / 2)) : windowW / 2;\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 const newMover = document.createElement('div');\r\n newMover.classList.add('media-viewer-mover');\r\n if (this.content.mover) {\r\n const 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 return this.content.mover = newMover;\r\n }\r\n /* public isElementVisible(container: HTMLElement, target: HTMLElement) {\r\n const rect = container.getBoundingClientRect();\r\n const targetRect = target.getBoundingClientRect();\r\n \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 const loadCount = 50;\r\n const 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 const peerID = this.peerID;\r\n const 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 const method = older ? value.history.forEach : value.history.forEachReverse;\r\n method.call(value.history, mid => {\r\n const message = appMessagesManager_1.default.getMessage(mid);\r\n const 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 const 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 const 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 return __awaiter(this, void 0, void 0, function* () {\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.type == 'video' || media.type == 'gif';\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 if (appForward_1.default.container.classList.contains('active')) {\r\n appForward_1.default.close();\r\n yield new Promise((resolve) => setTimeout(resolve, 200));\r\n }\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 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.onKeyDown);\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 = config_1.mediaSizes.isMobile ? this.pageEl.scrollWidth : this.pageEl.scrollWidth - 16;\r\n const maxHeight = appPhotosManager_1.default.windowH - 100;\r\n const size = appPhotosManager_1.default.setAttachmentSize(media, container, maxWidth, maxHeight);\r\n // need after setAttachmentSize\r\n /* if(useContainerAsTarget) {\r\n target = target.querySelector('img, video') || target;\r\n } */\r\n const preloader = media.supportsStreaming ? this.preloaderStreamable : this.preloader;\r\n let setMoverPromise;\r\n if (isVideo) {\r\n ////////this.log('will wrap video', media, size);\r\n // потому что для safari нужно создать элемент из event'а\r\n const video = document.createElement('video');\r\n setMoverPromise = this.setMoverToTarget(target, false, fromRight).then(({ onAnimationEnd }) => {\r\n //return; // set and don't move\r\n //if(wasActive) return;\r\n //return;\r\n const div = mover.firstElementChild && mover.firstElementChild.classList.contains('media-viewer-aspecter') ? mover.firstElementChild : mover;\r\n //const video = mover.querySelector('video') || document.createElement('video');\r\n const moverVideo = mover.querySelector('video');\r\n if (moverVideo) {\r\n moverVideo.remove();\r\n }\r\n //video.src = '';\r\n video.setAttribute('playsinline', '');\r\n if (config_1.isSafari) {\r\n video.autoplay = true;\r\n }\r\n if (media.type == 'gif') {\r\n video.muted = true;\r\n video.autoplay = true;\r\n video.loop = true;\r\n }\r\n if (!video.parentElement) {\r\n div.append(video);\r\n }\r\n const canPlayThrough = new Promise((resolve) => {\r\n video.addEventListener('canplay', resolve, { once: true });\r\n });\r\n const createPlayer = () => {\r\n if (media.type != 'gif') {\r\n video.dataset.ckin = 'default';\r\n video.dataset.overlay = '1';\r\n // fix for simultaneous play\r\n appMediaPlaybackController_1.default.pause();\r\n appMediaPlaybackController_1.default.willBePlayedMedia = null;\r\n Promise.all([canPlayThrough, onAnimationEnd]).then(() => {\r\n const player = new mediaPlayer_1.default(video, true, media.supportsStreaming);\r\n /* div.append(video);\r\n mover.append(player.wrapper); */\r\n });\r\n }\r\n };\r\n if (media.supportsStreaming) {\r\n onAnimationEnd.then(() => {\r\n if (video.readyState < video.HAVE_FUTURE_DATA) {\r\n preloader.attach(mover, true);\r\n }\r\n /* canPlayThrough.then(() => {\r\n preloader.detach();\r\n }); */\r\n });\r\n const attachCanPlay = () => {\r\n video.addEventListener('canplay', () => {\r\n //this.log('video waited and progress loaded');\r\n preloader.detach();\r\n video.parentElement.classList.remove('is-buffering');\r\n }, { once: true });\r\n };\r\n video.addEventListener('waiting', (e) => {\r\n const loading = video.networkState === video.NETWORK_LOADING;\r\n const isntEnoughData = video.readyState < video.HAVE_FUTURE_DATA;\r\n //this.log('video waiting for progress', loading, isntEnoughData);\r\n if (loading && isntEnoughData) {\r\n attachCanPlay();\r\n preloader.attach(mover, true);\r\n // поставлю класс для плеера, чтобы убрать большую иконку пока прелоадер на месте\r\n video.parentElement.classList.add('is-buffering');\r\n }\r\n });\r\n attachCanPlay();\r\n }\r\n //if(!video.src || media.url != video.src) {\r\n const load = () => {\r\n const promise = media.supportsStreaming ? Promise.resolve() : appDocsManager_1.default.downloadDocNew(media);\r\n if (!media.supportsStreaming) {\r\n onAnimationEnd.then(() => {\r\n preloader.attach(mover, true, promise);\r\n });\r\n }\r\n promise.then(() => __awaiter(this, void 0, void 0, function* () {\r\n if (this.currentMessageID != message.mid) {\r\n this.log.warn('media viewer changed video');\r\n return;\r\n }\r\n const url = media.url;\r\n if (target instanceof SVGSVGElement /* && (video.parentElement || !isSafari) */) { // if video exists\r\n //if(!video.parentElement) {\r\n div.firstElementChild.lastElementChild.append(video);\r\n //}\r\n this.updateMediaSource(mover, url, 'video');\r\n }\r\n else {\r\n misc_1.renderImageFromUrl(video, url);\r\n }\r\n createPlayer();\r\n }));\r\n return promise;\r\n };\r\n this.lazyLoadQueue.unshift({ load });\r\n //} else createPlayer();\r\n });\r\n }\r\n else {\r\n setMoverPromise = this.setMoverToTarget(target, false, fromRight).then(({ onAnimationEnd }) => {\r\n //return; // set and don't move\r\n //if(wasActive) return;\r\n //return;\r\n const load = () => {\r\n const cancellablePromise = appPhotosManager_1.default.preloadPhoto(media.id, size);\r\n onAnimationEnd.then(() => {\r\n this.preloader.attach(mover, true, cancellablePromise);\r\n });\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 const 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 if (config_1.mediaSizes.isMobile) {\r\n const imgs = mover.querySelectorAll('img');\r\n if (imgs && imgs.length) {\r\n imgs.forEach(img => {\r\n img.classList.remove('thumbnail'); // может здесь это вообще не нужно\r\n });\r\n }\r\n }\r\n }\r\n else {\r\n const 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, () => {\r\n if (config_1.mediaSizes.isMobile) {\r\n image.classList.remove('thumbnail'); // может здесь это вообще не нужно\r\n }\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({ load });\r\n });\r\n }\r\n return this.setMoverPromise = setMoverPromise.catch(() => {\r\n this.setMoverAnimationPromise = null;\r\n }).finally(() => {\r\n this.setMoverPromise = null;\r\n });\r\n });\r\n }\r\n}\r\nexports.AppMediaViewer = AppMediaViewer;\r\nexports.default = new AppMediaViewer();\r\n" - }, - { - "id": 57, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\groupedLayout.ts", - "name": "./src/components/groupedLayout.ts", - "index": 70, - "index2": 62, - "size": 15940, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "issuerId": 18, - "issuerName": "./src/components/wrappers.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 18, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "name": "./src/components/wrappers.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 1092, - "building": 1418, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 18, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "module": "./src/components/wrappers.ts", - "moduleName": "./src/components/wrappers.ts", - "type": "cjs require", - "userRequest": "./groupedLayout", - "loc": "25:24-50" - }, - { - "moduleId": 98, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\input.ts", - "module": "./src/components/chat/input.ts", - "moduleName": "./src/components/chat/input.ts", - "type": "cjs require", - "userRequest": "../groupedLayout", - "loc": "15:24-51" - } - ], - "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": 58, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\poll.ts", - "name": "./src/components/poll.ts", - "index": 71, - "index2": 63, - "size": 24245, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "issuerId": 18, - "issuerName": "./src/components/wrappers.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 18, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "name": "./src/components/wrappers.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 1092, - "building": 1418, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 18, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "module": "./src/components/wrappers.ts", - "moduleName": "./src/components/wrappers.ts", - "type": "cjs require", - "userRequest": "./poll", - "loc": "26:31-48" - }, - { - "moduleId": 86, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\pollResults.ts", - "module": "./src/components/sidebarRight/pollResults.ts", - "moduleName": "./src/components/sidebarRight/pollResults.ts", - "type": "cjs require", - "userRequest": "../poll", - "loc": "28:15-33" - } - ], - "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.roundPercents = void 0;\r\nconst appPollsManager_1 = __importDefault(require(\"../lib/appManagers/appPollsManager\"));\r\nconst richtextprocessor_1 = require(\"../lib/richtextprocessor\");\r\nconst utils_1 = require(\"../lib/utils\");\r\nconst config_1 = require(\"../lib/config\");\r\nconst appSidebarRight_1 = __importDefault(require(\"../lib/appManagers/appSidebarRight\"));\r\nconst appImManager_1 = __importDefault(require(\"../lib/appManagers/appImManager\"));\r\nconst serverTimeManager_1 = __importDefault(require(\"../lib/mtproto/serverTimeManager\"));\r\nconst ripple_1 = require(\"./ripple\");\r\nlet lineTotalLength = 0;\r\nconst tailLength = 9;\r\nconst times = 10;\r\nconst fullTime = 340;\r\nconst oneTime = fullTime / times;\r\nexports.roundPercents = (percents) => {\r\n //console.log('roundPercents before percents:', percents);\r\n const sum = percents.reduce((acc, p) => acc + Math.round(p), 0);\r\n if (sum > 100) {\r\n const diff = sum - 100;\r\n const 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 return;\r\n }\r\n percents[minIndex] -= minRemainder;\r\n }\r\n }\r\n else if (sum < 100) {\r\n const diff = 100 - sum;\r\n const 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 return;\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 const { poll, results } = e.detail;\r\n //console.log('poll_update', poll, results);\r\n for (const connected of connectedPolls) {\r\n if (connected.id == poll.id) {\r\n const pollElement = connected.element;\r\n pollElement.isClosed = !!poll.pFlags.closed;\r\n pollElement.performResults(results, poll.chosenIndexes);\r\n }\r\n }\r\n});\r\nutils_1.$rootScope.$on('peer_changed', () => {\r\n if (prevQuizHint) {\r\n hideQuizHint(prevQuizHint, prevQuizHintOnHide, prevQuizHintTimeout);\r\n }\r\n});\r\nconst hideQuizHint = (element, onHide, timeout) => {\r\n element.classList.remove('active');\r\n clearTimeout(timeout);\r\n setTimeout(() => {\r\n onHide();\r\n element.remove();\r\n if (prevQuizHint == element && prevQuizHintOnHide == onHide && prevQuizHintTimeout == timeout) {\r\n prevQuizHint = prevQuizHintOnHide = null;\r\n prevQuizHintTimeout = 0;\r\n }\r\n }, 200);\r\n};\r\nlet prevQuizHint, prevQuizHintOnHide, prevQuizHintTimeout;\r\nconst setQuizHint = (solution, solution_entities, onHide) => {\r\n if (prevQuizHint) {\r\n hideQuizHint(prevQuizHint, prevQuizHintOnHide, prevQuizHintTimeout);\r\n }\r\n const element = document.createElement('div');\r\n element.classList.add('quiz-hint');\r\n const container = document.createElement('div');\r\n container.classList.add('container', 'tgico');\r\n const textEl = document.createElement('div');\r\n textEl.classList.add('text');\r\n container.append(textEl);\r\n element.append(container);\r\n textEl.innerHTML = richtextprocessor_1.RichTextProcessor.wrapRichText(solution, { entities: solution_entities });\r\n appImManager_1.default.bubblesContainer.append(element);\r\n void element.offsetLeft; // reflow\r\n element.classList.add('active');\r\n prevQuizHint = element;\r\n prevQuizHintOnHide = onHide;\r\n prevQuizHintTimeout = window.setTimeout(() => {\r\n hideQuizHint(element, onHide, prevQuizHintTimeout);\r\n }, config_1.touchSupport ? 5000 : 7000);\r\n};\r\nclass PollElement extends HTMLElement {\r\n constructor() {\r\n super();\r\n this.maxOffset = -46.5;\r\n this.isClosed = false;\r\n this.isQuiz = false;\r\n this.isRetracted = false;\r\n this.isPublic = false;\r\n this.isMultiple = false;\r\n this.chosenIndexes = [];\r\n this.chosingIndexes = [];\r\n this.sentVote = false;\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 this.pollID = this.getAttribute('poll-id');\r\n this.mid = +this.getAttribute('message-id');\r\n const { poll, results } = appPollsManager_1.default.getPoll(this.pollID);\r\n connectedPolls.push({ id: this.pollID, element: this });\r\n //console.log('pollElement poll:', poll, results);\r\n let desc = '';\r\n if (poll.pFlags) {\r\n this.isPublic = !!poll.pFlags.public_voters;\r\n this.isQuiz = !!poll.pFlags.quiz;\r\n this.isClosed = !!poll.pFlags.closed;\r\n this.isMultiple = !!poll.pFlags.multiple_choice;\r\n if (this.isClosed) {\r\n desc = 'Final results';\r\n this.classList.add('is-closed');\r\n }\r\n else {\r\n let type = this.isQuiz ? 'Quiz' : 'Poll';\r\n desc = (this.isPublic ? '' : 'Anonymous ') + type;\r\n }\r\n }\r\n const multipleSelect = this.isMultiple ? '' : '';\r\n const votes = poll.answers.map((answer, idx) => {\r\n return `\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n ${multipleSelect}\r\n
\r\n
\r\n
${richtextprocessor_1.RichTextProcessor.wrapEmojiText(answer.text)}
\r\n \r\n \r\n \r\n \r\n
\r\n `;\r\n }).join('');\r\n this.innerHTML = `\r\n
${poll.rQuestion}
\r\n
\r\n
${desc}
\r\n
\r\n
\r\n ${votes}\r\n
\r\n \r\n
\r\n
\r\n `;\r\n this.descDiv = this.firstElementChild.nextElementSibling;\r\n this.typeDiv = this.descDiv.firstElementChild;\r\n this.avatarsDiv = this.descDiv.lastElementChild;\r\n if (this.isQuiz) {\r\n this.classList.add('is-quiz');\r\n if (poll.close_period && poll.close_date) {\r\n const timeLeftDiv = document.createElement('div');\r\n timeLeftDiv.classList.add('poll-time');\r\n this.descDiv.append(timeLeftDiv);\r\n const svg = document.createElementNS(\"http://www.w3.org/2000/svg\", \"svg\");\r\n //svg.setAttributeNS(null, 'viewBox', '0 0 15 15');\r\n svg.classList.add('poll-quiz-timer');\r\n this.quizTimer = svg;\r\n const strokeWidth = 2;\r\n const radius = 7;\r\n const circumference = 2 * Math.PI * radius;\r\n const circle = document.createElementNS(\"http://www.w3.org/2000/svg\", \"circle\");\r\n circle.classList.add('poll-quiz-timer-circle');\r\n circle.setAttributeNS(null, 'cx', '16');\r\n circle.setAttributeNS(null, 'cy', '16');\r\n circle.setAttributeNS(null, 'r', '' + radius);\r\n circle.setAttributeNS(null, 'stroke-width', '' + strokeWidth);\r\n svg.append(circle);\r\n this.descDiv.append(svg);\r\n const period = poll.close_period * 1000;\r\n const closeTime = (poll.close_date - serverTimeManager_1.default.serverTimeOffset) * 1000;\r\n //console.log('closeTime:', poll.close_date, serverTimeManager.serverTimeOffset, Date.now() / 1000 | 0);\r\n // let time = Date.now();\r\n // let percents = (closeTime - time) / period;\r\n // timeLeftDiv.innerHTML = String((closeTime - time) / 1000 + 1 | 0).toHHMMSS();\r\n // // @ts-ignore\r\n // circle.style.strokeDashoffset = circumference + percents * circumference;\r\n // circle.style.strokeDasharray = ${circumference} ${circumference};\r\n this.quizInterval = window.setInterval(() => {\r\n const time = Date.now();\r\n const percents = (closeTime - time) / period;\r\n const timeLeft = (closeTime - time) / 1000 + 1 | 0;\r\n timeLeftDiv.innerHTML = String(timeLeft).toHHMMSS();\r\n if (timeLeft <= 5) {\r\n timeLeftDiv.style.color = '#ee545c';\r\n circle.style.stroke = '#ee545c';\r\n }\r\n //timeLeftDiv.style.visibility = 'visible';\r\n // @ts-ignore\r\n circle.style.strokeDashoffset = circumference + percents * circumference;\r\n circle.style.strokeDasharray = `${circumference} ${circumference}`;\r\n if (time >= closeTime) {\r\n clearInterval(this.quizInterval);\r\n timeLeftDiv.innerHTML = '';\r\n // @ts-ignore\r\n circle.style.strokeDashoffset = circumference;\r\n this.quizInterval = 0;\r\n setTimeout(() => {\r\n // нужно запросить апдейт чтобы опрос обновился\r\n appPollsManager_1.default.getResults(this.mid);\r\n }, 3e3);\r\n }\r\n }, 1e3);\r\n }\r\n }\r\n this.answerDivs = Array.from(this.querySelectorAll('.poll-answer'));\r\n this.svgLines = Array.from(this.querySelectorAll('.poll-line'));\r\n this.numberDivs = Array.from(this.querySelectorAll('.poll-answer-percents'));\r\n const footerDiv = this.lastElementChild;\r\n this.viewResults = footerDiv.firstElementChild;\r\n this.votersCountDiv = footerDiv.lastElementChild;\r\n this.viewResults.addEventListener('click', (e) => {\r\n utils_1.cancelEvent(e);\r\n appSidebarRight_1.default.pollResultsTab.init(this.pollID, this.mid);\r\n });\r\n ripple_1.ripple(this.viewResults);\r\n if (this.isMultiple) {\r\n this.sendVoteBtn = document.createElement('div');\r\n this.sendVoteBtn.classList.add('poll-footer-button', 'poll-send-vote');\r\n this.sendVoteBtn.innerText = 'Vote';\r\n ripple_1.ripple(this.sendVoteBtn);\r\n if (!poll.chosenIndexes.length) {\r\n this.votersCountDiv.classList.add('hide');\r\n }\r\n this.sendVoteBtn.addEventListener('click', () => {\r\n /* const indexes = this.answerDivs.filter(el => el.classList.contains('is-chosing')).map(el => +el.dataset.index);\r\n if(indexes.length) {\r\n \r\n } */\r\n if (this.chosingIndexes.length) {\r\n this.sendVotes(this.chosingIndexes).then(() => {\r\n this.chosingIndexes.length = 0;\r\n this.answerDivs.forEach(el => {\r\n el.classList.remove('is-chosing');\r\n });\r\n });\r\n }\r\n });\r\n footerDiv.append(this.sendVoteBtn);\r\n }\r\n const width = this.getBoundingClientRect().width;\r\n this.maxLength = width + tailLength + this.maxOffset + -13.7; // 13 - position left\r\n if (poll.chosenIndexes.length || this.isClosed) {\r\n this.performResults(results, poll.chosenIndexes);\r\n }\r\n else if (!this.isClosed) {\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 ['poll-id', 'message-id' /* массив имён атрибутов для отслеживания их изменений */];\r\n }\r\n attributeChangedCallback(name, oldValue, newValue) {\r\n // вызывается при изменении одного из перечисленных выше атрибутов\r\n if (name == 'poll-id') {\r\n this.pollID = newValue;\r\n }\r\n else if (name == 'message-id') {\r\n this.mid = +newValue;\r\n }\r\n }\r\n adoptedCallback() {\r\n // вызывается, когда элемент перемещается в новый документ\r\n // (происходит в document.adoptNode, используется очень редко)\r\n }\r\n initQuizHint(results) {\r\n if (results.solution && results.solution_entities) {\r\n const toggleHint = document.createElement('div');\r\n toggleHint.classList.add('tgico-tip', 'poll-hint');\r\n this.descDiv.append(toggleHint);\r\n //let active = false;\r\n toggleHint.addEventListener('click', (e) => {\r\n utils_1.cancelEvent(e);\r\n //active = true;\r\n toggleHint.classList.add('active');\r\n setQuizHint(results.solution, results.solution_entities, () => {\r\n //active = false;\r\n toggleHint.classList.remove('active');\r\n });\r\n });\r\n if (this.sentVote) {\r\n const correctResult = results.results.find(r => r.pFlags.correct);\r\n if (correctResult && !correctResult.pFlags.chosen) {\r\n toggleHint.click();\r\n }\r\n }\r\n }\r\n }\r\n clickHandler(e) {\r\n const target = utils_1.findUpClassName(e.target, 'poll-answer');\r\n if (!target) {\r\n return;\r\n }\r\n const answerIndex = +target.dataset.index;\r\n if (this.isMultiple) {\r\n target.classList.toggle('is-chosing');\r\n const foundIndex = this.chosingIndexes.indexOf(answerIndex);\r\n if (foundIndex !== -1) {\r\n this.chosingIndexes.splice(foundIndex, 1);\r\n }\r\n else {\r\n this.chosingIndexes.push(answerIndex);\r\n }\r\n }\r\n else {\r\n this.sendVotes([answerIndex]);\r\n }\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 sendVotes(indexes) {\r\n if (this.sendVotePromise)\r\n return this.sendVotePromise;\r\n const targets = this.answerDivs.filter((_, idx) => indexes.includes(idx));\r\n targets.forEach(target => {\r\n target.classList.add('is-voting');\r\n });\r\n this.classList.add('disable-hover');\r\n this.sentVote = true;\r\n return this.sendVotePromise = appPollsManager_1.default.sendVote(this.mid, indexes).then(() => {\r\n targets.forEach(target => {\r\n target.classList.remove('is-voting');\r\n });\r\n this.classList.remove('disable-hover');\r\n }).catch(() => {\r\n this.sentVote = false;\r\n }).finally(() => {\r\n this.sendVotePromise = null;\r\n });\r\n }\r\n performResults(results, chosenIndexes) {\r\n var _a, _b;\r\n if (this.isQuiz && (((_a = results.results) === null || _a === void 0 ? void 0 : _a.length) || this.isClosed)) {\r\n this.answerDivs.forEach((el, idx) => {\r\n el.classList.toggle('is-correct', !!results.results[idx].pFlags.correct);\r\n });\r\n if (this.initQuizHint) {\r\n this.initQuizHint(results);\r\n this.initQuizHint = null;\r\n }\r\n if (this.quizInterval) {\r\n clearInterval(this.quizInterval);\r\n this.quizInterval = 0;\r\n }\r\n if ((_b = this.quizTimer) === null || _b === void 0 ? void 0 : _b.parentElement) {\r\n this.quizTimer.remove();\r\n }\r\n const timeEl = this.descDiv.querySelector('.poll-time');\r\n if (timeEl) {\r\n timeEl.remove();\r\n }\r\n }\r\n if (this.isClosed) {\r\n this.classList.add('is-closed');\r\n this.typeDiv.innerText = 'Final results';\r\n }\r\n // set chosen\r\n if (this.chosenIndexes.length != chosenIndexes.length || this.isClosed) { // if we voted\r\n this.isRetracted = this.chosenIndexes.length && !chosenIndexes.length;\r\n this.chosenIndexes = chosenIndexes.slice();\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.chosenIndexes.length || this.isRetracted || this.isClosed) {\r\n const percents = results.results.map(v => results.total_voters ? v.voters / results.total_voters * 100 : 0);\r\n this.setResults(this.isRetracted ? this.percents : percents, this.chosenIndexes);\r\n this.percents = percents;\r\n this.isRetracted = false;\r\n }\r\n this.setVotersCount(results);\r\n if (this.isPublic) {\r\n if (!this.isMultiple) {\r\n this.viewResults.classList.toggle('hide', !results.total_voters || !this.chosenIndexes.length);\r\n this.votersCountDiv.classList.toggle('hide', !!this.chosenIndexes.length);\r\n }\r\n let html = '';\r\n /**\r\n * MACOS, ANDROID - без реверса\r\n * WINDOWS DESKTOP - реверс\r\n * все приложения накладывают аватарку первую на вторую, а в макете зато вторая на первую, ЛОЛ!\r\n */\r\n results.recent_voters /* .slice().reverse() */.forEach((userID, idx) => {\r\n const style = idx == 0 ? '' : `style=\"transform: translateX(-${idx * 3}px);\"`;\r\n html += ``;\r\n });\r\n this.avatarsDiv.innerHTML = html;\r\n }\r\n if (this.isMultiple) {\r\n this.sendVoteBtn.classList.toggle('hide', !!this.chosenIndexes.length);\r\n if (!this.chosenIndexes.length) {\r\n this.votersCountDiv.classList.add('hide');\r\n this.viewResults.classList.add('hide');\r\n }\r\n else if (this.isPublic) {\r\n this.viewResults.classList.toggle('hide', !results.total_voters || !this.chosenIndexes.length);\r\n this.votersCountDiv.classList.toggle('hide', !!this.chosenIndexes.length);\r\n }\r\n else {\r\n this.votersCountDiv.classList.toggle('hide', !this.chosenIndexes.length);\r\n }\r\n }\r\n }\r\n setResults(percents, chosenIndexes) {\r\n this.svgLines.forEach(svg => svg.style.display = '');\r\n this.answerDivs.forEach((el, idx) => {\r\n el.classList.toggle('is-chosen', chosenIndexes.includes(idx));\r\n });\r\n const 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 exports.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 const 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 const 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 const votersCount = results.total_voters || 0;\r\n const 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 const 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": 59, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\helpers\\blob.ts", - "name": "./src/helpers/blob.ts", - "index": 73, - "index2": 65, - "size": 413, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "issuerId": 18, - "issuerName": "./src/components/wrappers.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 18, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "name": "./src/components/wrappers.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 1092, - "building": 1418, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 18, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "module": "./src/components/wrappers.ts", - "moduleName": "./src/components/wrappers.ts", - "type": "cjs require", - "userRequest": "../helpers/blob", - "loc": "31:15-41" - }, - { - "moduleId": 102, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\stickers.ts", - "module": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "type": "cjs require", - "userRequest": "../../../helpers/blob", - "loc": "39:15-47" - } - ], - "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.readBlobAsText = void 0;\r\nexports.readBlobAsText = (blob) => {\r\n return new Promise(resolve => {\r\n const reader = new FileReader();\r\n reader.addEventListener('loadend', (e) => {\r\n // @ts-ignore\r\n resolve(e.srcElement.result);\r\n });\r\n reader.readAsText(blob);\r\n });\r\n};\r\n" - }, - { - "id": 60, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\slider.ts", - "name": "./src/components/slider.ts", - "index": 75, - "index2": 68, - "size": 2031, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "issuerId": 24, - "issuerName": "./src/lib/appManagers/appSidebarRight.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 24, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "name": "./src/lib/appManagers/appSidebarRight.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 1584, - "building": 1606, - "dependencies": 2 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 14, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "module": "./src/lib/appManagers/appSidebarLeft.ts", - "moduleName": "./src/lib/appManagers/appSidebarLeft.ts", - "type": "cjs require", - "userRequest": "../../components/slider", - "loc": "44:33-67" - }, - { - "moduleId": 24, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", - "type": "cjs require", - "userRequest": "../../components/slider", - "loc": "53:33-67" - } - ], - "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 horizontalMenu_1 = require(\"./horizontalMenu\");\r\nconst TRANSITIONTIME = 250;\r\nclass SidebarSlider {\r\n constructor(sidebarEl, tabs) {\r\n this.sidebarEl = sidebarEl;\r\n this.tabs = tabs;\r\n this.historyTabIDs = [];\r\n this._selectTab = horizontalMenu_1.horizontalMenu(null, this.sidebarEl.querySelector('.sidebar-slider'), null, null, TRANSITIONTIME);\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 }\r\n selectTab(id) {\r\n if (this.historyTabIDs[this.historyTabIDs.length - 1] == id) {\r\n return;\r\n }\r\n const tab = this.tabs[id];\r\n if (tab) {\r\n if (tab.onOpen) {\r\n tab.onOpen();\r\n }\r\n if (tab.onOpenAfterTimeout) {\r\n setTimeout(() => {\r\n tab.onOpenAfterTimeout();\r\n }, TRANSITIONTIME);\r\n }\r\n }\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 (tab.onClose) {\r\n tab.onClose();\r\n }\r\n if (tab.onCloseAfterTimeout) {\r\n setTimeout(() => {\r\n tab.onCloseAfterTimeout();\r\n }, TRANSITIONTIME);\r\n }\r\n }\r\n }\r\n}\r\nexports.default = SidebarSlider;\r\n" - }, - { - "id": 61, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popupStickers.ts", - "name": "./src/components/popupStickers.ts", - "index": 79, - "index2": 71, - "size": 5430, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "../../components/popupStickers", - "loc": "38:40-81" - }, - { - "moduleId": 85, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\stickers.ts", - "module": "./src/components/sidebarRight/stickers.ts", - "moduleName": "./src/components/sidebarRight/stickers.ts", - "type": "cjs require", - "userRequest": "../popupStickers", - "loc": "31:40-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 popup_1 = require(\"./popup\");\r\nconst appStickersManager_1 = __importDefault(require(\"../lib/appManagers/appStickersManager\"));\r\nconst richtextprocessor_1 = require(\"../lib/richtextprocessor\");\r\nconst scrollable_new_1 = __importDefault(require(\"./scrollable_new\"));\r\nconst wrappers_1 = require(\"./wrappers\");\r\nconst lazyLoadQueue_1 = __importDefault(require(\"./lazyLoadQueue\"));\r\nconst misc_1 = require(\"./misc\");\r\nconst animationIntersector_1 = __importDefault(require(\"./animationIntersector\"));\r\nconst utils_1 = require(\"../lib/utils\");\r\nconst appImManager_1 = __importDefault(require(\"../lib/appManagers/appImManager\"));\r\nclass PopupStickers extends popup_1.PopupElement {\r\n constructor(stickerSetInput) {\r\n super('popup-stickers', null, { closable: true, body: true });\r\n this.stickerSetInput = stickerSetInput;\r\n this.onFooterClick = () => {\r\n this.stickersFooter.setAttribute('disabled', 'true');\r\n appStickersManager_1.default.toggleStickerSet(this.set).then(() => {\r\n this.closeBtn.click();\r\n }).catch(() => {\r\n this.stickersFooter.removeAttribute('disabled');\r\n });\r\n };\r\n this.onStickersClick = (e) => {\r\n const target = utils_1.findUpClassName(e.target, 'sticker-set-sticker');\r\n if (!target)\r\n return;\r\n const fileID = target.dataset.docID;\r\n if (appImManager_1.default.chatInputC.sendMessageWithDocument(fileID)) {\r\n this.closeBtn.click();\r\n }\r\n else {\r\n console.warn('got no doc by id:', fileID);\r\n }\r\n };\r\n this.h6 = document.createElement('h6');\r\n this.h6.innerText = 'Loading...';\r\n this.header.append(this.h6);\r\n this.onClose = () => {\r\n animationIntersector_1.default.checkAnimations(false);\r\n this.stickersFooter.removeEventListener('click', this.onFooterClick);\r\n this.stickersDiv.removeEventListener('click', this.onStickersClick);\r\n this.element.removeEventListener('click', onOverlayClick);\r\n };\r\n this.onCloseAfterTimeout = () => {\r\n animationIntersector_1.default.checkAnimations(undefined, 'STICKERS-POPUP');\r\n };\r\n const onOverlayClick = (e) => {\r\n if (!utils_1.findUpClassName(e.target, 'popup-container')) {\r\n this.closeBtn.click();\r\n }\r\n };\r\n this.element.addEventListener('click', onOverlayClick);\r\n const div = document.createElement('div');\r\n div.classList.add('sticker-set');\r\n this.stickersDiv = document.createElement('div');\r\n this.stickersDiv.classList.add('sticker-set-stickers');\r\n misc_1.putPreloader(this.stickersDiv);\r\n this.stickersFooter = document.createElement('div');\r\n this.stickersFooter.classList.add('sticker-set-footer');\r\n div.append(this.stickersDiv);\r\n this.stickersFooter.innerText = 'Loading...';\r\n this.body.append(div);\r\n const scrollable = new scrollable_new_1.default(this.body, 'y', undefined);\r\n this.body.append(this.stickersFooter);\r\n // const editButton = document.createElement('button');\r\n // editButton.classList.add('btn-primary');\r\n // this.stickersFooter.append(editButton);\r\n this.loadStickerSet();\r\n }\r\n loadStickerSet() {\r\n return appStickersManager_1.default.getStickerSet(this.stickerSetInput).then(set => {\r\n //console.log('PopupStickers loadStickerSet got set:', set);\r\n this.set = set.set;\r\n animationIntersector_1.default.checkAnimations(true);\r\n this.h6.innerHTML = richtextprocessor_1.RichTextProcessor.wrapEmojiText(set.set.title);\r\n !set.set.installed_date ? this.stickersFooter.classList.add('add') : this.stickersFooter.classList.remove('add');\r\n this.stickersFooter.innerHTML = set.set.hasOwnProperty('installed_date') ? '
Remove stickers
' : ``;\r\n this.stickersFooter.addEventListener('click', this.onFooterClick);\r\n if (set.documents.length) {\r\n this.stickersDiv.addEventListener('click', this.onStickersClick);\r\n }\r\n const lazyLoadQueue = new lazyLoadQueue_1.default();\r\n this.stickersDiv.innerHTML = '';\r\n for (let doc of set.documents) {\r\n if (doc._ == 'documentEmpty') {\r\n continue;\r\n }\r\n const div = document.createElement('div');\r\n div.classList.add('sticker-set-sticker');\r\n wrappers_1.wrapSticker({\r\n doc,\r\n div,\r\n lazyLoadQueue,\r\n group: 'STICKERS-POPUP',\r\n play: true,\r\n loop: true,\r\n width: 80,\r\n height: 80\r\n });\r\n this.stickersDiv.append(div);\r\n }\r\n });\r\n }\r\n}\r\nexports.default = PopupStickers;\r\n" - }, - { - "id": 62, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\AppInlineBotsManager.ts", - "name": "./src/lib/appManagers/AppInlineBotsManager.ts", - "index": 82, - "index2": 75, - "size": 17098, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "./AppInlineBotsManager", - "loc": "34:47-80" - }, - { - "moduleId": 87, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\gifs.ts", - "module": "./src/components/sidebarRight/gifs.ts", - "moduleName": "./src/components/sidebarRight/gifs.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/AppInlineBotsManager", - "loc": "39:47-100" - } - ], - "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 appPeersManager_1 = __importDefault(require(\"../appManagers/appPeersManager\"));\r\nconst appMessagesIDsManager_1 = __importDefault(require(\"./appMessagesIDsManager\"));\r\nconst richtextprocessor_1 = require(\"../richtextprocessor\");\r\nconst toast_1 = require(\"../../components/toast\");\r\nconst appUsersManager_1 = __importDefault(require(\"./appUsersManager\"));\r\nconst appPhotosManager_1 = __importDefault(require(\"./appPhotosManager\"));\r\nconst appDocsManager_1 = __importDefault(require(\"./appDocsManager\"));\r\nclass AppInlineBotsManager {\r\n constructor() {\r\n this.inlineResults = {};\r\n /* function gameButtonClick (id) {\r\n var message = AppMessagesManager.getMessage(id)\r\n var peerID = AppMessagesManager.getMessagePeer(message)\r\n \r\n return MtpApiManager.invokeApi('messages.getBotCallbackAnswer', {\r\n flags: 2,\r\n peer: AppPeersManager.getInputPeerByID(peerID),\r\n msg_id: AppMessagesIDsManager.getMessageLocalID(id)\r\n }, {timeout: 1, stopTime: -1, noErrorBox: true}).then(function (callbackAnswer) {\r\n if (typeof callbackAnswer.message === 'string' &&\r\n callbackAnswer.message.length) {\r\n showCallbackMessage(callbackAnswer.message, callbackAnswer.pFlags.alert)\r\n }\r\n else if (typeof callbackAnswer.url === 'string') {\r\n AppGamesManager.openGame(message.media.game.id, id, callbackAnswer.url)\r\n }\r\n })\r\n }\r\n \r\n function sendInlineResult (peerID, qID, options) {\r\n var inlineResult = inlineResults[qID]\r\n if (inlineResult === undefined) {\r\n return false\r\n }\r\n pushPopularBot(inlineResult.botID)\r\n var splitted = qID.split('_')\r\n var queryID = splitted.shift()\r\n var resultID = splitted.join('_')\r\n options = options || {}\r\n options.viaBotID = inlineResult.botID\r\n options.queryID = queryID\r\n options.resultID = resultID\r\n if (inlineResult.send_message.reply_markup) {\r\n options.reply_markup = inlineResult.send_message.reply_markup\r\n }\r\n \r\n if (inlineResult.send_message._ == 'botInlineMessageText') {\r\n options.entities = inlineResult.send_message.entities\r\n AppMessagesManager.sendText(peerID, inlineResult.send_message.message, options)\r\n } else {\r\n var caption = ''\r\n var inputMedia = false\r\n switch (inlineResult.send_message._) {\r\n case 'botInlineMessageMediaAuto':\r\n caption = inlineResult.send_message.caption\r\n if (inlineResult._ == 'botInlineMediaResult') {\r\n var doc = inlineResult.document\r\n var photo = inlineResult.photo\r\n if (doc) {\r\n inputMedia = {\r\n _: 'inputMediaDocument',\r\n id: {_: 'inputDocument', id: doc.id, access_hash: doc.access_hash},\r\n caption: caption\r\n }\r\n } else {\r\n inputMedia = {\r\n _: 'inputMediaPhoto',\r\n id: {_: 'inputPhoto', id: photo.id, access_hash: photo.access_hash},\r\n caption: caption\r\n }\r\n }\r\n }\r\n break\r\n \r\n case 'botInlineMessageMediaGeo':\r\n inputMedia = {\r\n _: 'inputMediaGeoPoint',\r\n geo_point: {\r\n _: 'inputGeoPoint',\r\n 'lat': inlineResult.send_message.geo['lat'],\r\n 'long': inlineResult.send_message.geo['long']\r\n }\r\n }\r\n break\r\n \r\n case 'botInlineMessageMediaVenue':\r\n inputMedia = {\r\n _: 'inputMediaVenue',\r\n geo_point: {\r\n _: 'inputGeoPoint',\r\n 'lat': inlineResult.send_message.geo['lat'],\r\n 'long': inlineResult.send_message.geo['long']\r\n },\r\n title: inlineResult.send_message.title,\r\n address: inlineResult.send_message.address,\r\n provider: inlineResult.send_message.provider,\r\n venue_id: inlineResult.send_message.venue_id\r\n }\r\n break\r\n \r\n case 'botInlineMessageMediaContact':\r\n inputMedia = {\r\n _: 'inputMediaContact',\r\n phone_number: inlineResult.send_message.phone_number,\r\n first_name: inlineResult.send_message.first_name,\r\n last_name: inlineResult.send_message.last_name\r\n }\r\n break\r\n }\r\n if (!inputMedia) {\r\n inputMedia = {\r\n _: 'messageMediaPending',\r\n type: inlineResult.type,\r\n file_name: inlineResult.title || inlineResult.content_url || inlineResult.url,\r\n size: 0,\r\n progress: {percent: 30, total: 0}\r\n }\r\n }\r\n AppMessagesManager.sendOther(peerID, inputMedia, options)\r\n }\r\n }\r\n \r\n function checkGeoLocationAccess (botID) {\r\n var key = 'bot_access_geo' + botID\r\n return Storage.get(key).then(function (geoAccess) {\r\n if (geoAccess && geoAccess.granted) {\r\n return true\r\n }\r\n return ErrorService.confirm({\r\n type: 'BOT_ACCESS_GEO_INLINE'\r\n }).then(function () {\r\n var setHash = {}\r\n setHash[key] = {granted: true, time: tsNow()}\r\n Storage.set(setHash)\r\n return true\r\n }, function () {\r\n var setHash = {}\r\n setHash[key] = {denied: true, time: tsNow()}\r\n Storage.set(setHash)\r\n return $q.reject()\r\n })\r\n })\r\n } */\r\n }\r\n getInlineResults(peerID, botID, query = '', offset = '', geo) {\r\n return mtprotoworker_1.default.invokeApi('messages.getInlineBotResults', {\r\n flags: 0 | (geo ? 1 : 0),\r\n bot: appUsersManager_1.default.getUserInput(botID),\r\n peer: appPeersManager_1.default.getInputPeerByID(peerID),\r\n query: query,\r\n geo_point: geo && { _: 'inputGeoPoint', lat: geo['lat'], long: geo['long'] },\r\n offset\r\n }, { /* timeout: 1, */ stopTime: -1, noErrorBox: true }).then(botResults => {\r\n const queryID = botResults.query_id;\r\n /* delete botResults._;\r\n delete botResults.flags;\r\n delete botResults.query_id; */\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 botResults.results.forEach(result => {\r\n const 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 as botInlineResult).url || result.title || result.type || '').substr(0, 1); */\r\n if (result._ == 'botInlineMediaResult') {\r\n if (result.document) {\r\n result.document = appDocsManager_1.default.saveDoc(result.document);\r\n }\r\n if (result.photo) {\r\n result.photo = appPhotosManager_1.default.savePhoto(result.photo);\r\n }\r\n }\r\n this.inlineResults[qID] = result;\r\n });\r\n return botResults;\r\n });\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 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: appPeersManager_1.default.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 toast_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": 63, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\gifsMasonry.ts", - "name": "./src/components/gifsMasonry.ts", - "index": 84, - "index2": 76, - "size": 8378, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\gifs.ts", - "issuerId": 87, - "issuerName": "./src/components/sidebarRight/gifs.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 24, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "name": "./src/lib/appManagers/appSidebarRight.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - }, - { - "id": 87, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\gifs.ts", - "name": "./src/components/sidebarRight/gifs.ts", - "profile": { - "factory": 1584, - "building": 1606, - "dependencies": 2 - } - } - ], - "profile": { - "factory": 384, - "building": 821, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 87, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\gifs.ts", - "module": "./src/components/sidebarRight/gifs.ts", - "moduleName": "./src/components/sidebarRight/gifs.ts", - "type": "cjs require", - "userRequest": "../gifsMasonry", - "loc": "40:38-63" - }, - { - "moduleId": 100, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\gifs.ts", - "module": "./src/components/emoticonsDropdown/tabs/gifs.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/gifs.ts", - "type": "cjs require", - "userRequest": "../../gifsMasonry", - "loc": "7:38-66" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 5, - "source": "\"use strict\";\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst utils_1 = require(\"../lib/utils\");\r\nconst appDocsManager_1 = __importDefault(require(\"../lib/appManagers/appDocsManager\"));\r\nconst wrappers_1 = require(\"./wrappers\");\r\nconst misc_1 = require(\"./misc\");\r\nconst lazyLoadQueue_1 = require(\"./lazyLoadQueue\");\r\nconst animationIntersector_1 = __importDefault(require(\"./animationIntersector\"));\r\nconst cancellablePromise_1 = require(\"../helpers/cancellablePromise\");\r\nconst width = 400;\r\nconst maxSingleWidth = width - 100;\r\nconst height = 100;\r\nclass GifsMasonry {\r\n constructor(element, group, scrollable) {\r\n this.element = element;\r\n this.group = group;\r\n this.scrollable = scrollable;\r\n this.scrollPromise = Promise.resolve();\r\n this.processVisibleDiv = (div) => {\r\n const video = div.querySelector('video');\r\n if (video) {\r\n return;\r\n }\r\n const load = () => {\r\n const docID = div.dataset.docID;\r\n const doc = appDocsManager_1.default.getDoc(docID);\r\n const promise = this.scrollPromise.then(() => {\r\n const promise = wrappers_1.wrapVideo({\r\n doc,\r\n container: div,\r\n lazyLoadQueue: null,\r\n //lazyLoadQueue: EmoticonsDropdown.lazyLoadQueue,\r\n group: this.group,\r\n noInfo: true,\r\n });\r\n promise.finally(() => {\r\n const video = div.querySelector('video');\r\n div.style.opacity = '';\r\n const img = div.querySelector('img');\r\n img && img.classList.add('hide');\r\n if (video && !video.parentElement) {\r\n setTimeout(() => {\r\n video.src = '';\r\n video.load();\r\n const animations = animationIntersector_1.default.getAnimations(video);\r\n animations.forEach(item => {\r\n animationIntersector_1.default.checkAnimation(item, true, true);\r\n });\r\n }, 0);\r\n }\r\n //clearTimeout(timeout);\r\n if (!this.lazyLoadQueue.intersector.isVisible(div)) {\r\n this.processInvisibleDiv(div);\r\n }\r\n });\r\n return promise;\r\n });\r\n /* let timeout = window.setTimeout(() => {\r\n console.error('processVisibleDiv timeout', div, doc);\r\n }, 1e3); */\r\n return promise;\r\n };\r\n //return load();\r\n this.lazyLoadQueue.push({ div, load });\r\n };\r\n this.processInvisibleDiv = (div) => __awaiter(this, void 0, void 0, function* () {\r\n return this.scrollPromise.then(() => __awaiter(this, void 0, void 0, function* () {\r\n //return;\r\n if (this.lazyLoadQueue.intersector.isVisible(div)) {\r\n return;\r\n }\r\n const video = div.querySelector('video');\r\n const img = div.querySelector('img');\r\n if (img) {\r\n img && img.classList.remove('hide');\r\n yield new Promise((resolve) => {\r\n window.requestAnimationFrame(() => window.requestAnimationFrame(resolve));\r\n });\r\n }\r\n if (this.lazyLoadQueue.intersector.isVisible(div)) {\r\n return;\r\n }\r\n if (video) {\r\n video.remove();\r\n video.src = '';\r\n video.load();\r\n const animations = animationIntersector_1.default.getAnimations(video);\r\n animations.forEach(item => {\r\n animationIntersector_1.default.checkAnimation(item, true, true);\r\n });\r\n }\r\n }));\r\n });\r\n this.lazyLoadQueue = new lazyLoadQueue_1.LazyLoadQueueRepeat2(undefined, (target, visible) => {\r\n if (visible) {\r\n this.processVisibleDiv(target);\r\n }\r\n else {\r\n this.processInvisibleDiv(target);\r\n }\r\n });\r\n setInterval(() => {\r\n // @ts-ignore\r\n const players = animationIntersector_1.default.byGroups[group];\r\n if (players) {\r\n console.log(`GIFS RENDERED IN ${group}:`, players.length, players.filter(p => !p.animation.paused).length, this.lazyLoadQueue.intersector.getVisible().length);\r\n }\r\n }, .25e3);\r\n let timeout = 0;\r\n // memory leak\r\n scrollable.container.addEventListener('scroll', () => {\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n }\r\n else {\r\n this.scrollPromise = cancellablePromise_1.deferredPromise();\r\n //animationIntersector.checkAnimations(true, group);\r\n }\r\n timeout = window.setTimeout(() => {\r\n timeout = 0;\r\n this.scrollPromise.resolve();\r\n //animationIntersector.checkAnimations(false, group);\r\n }, 150);\r\n });\r\n }\r\n add(doc) {\r\n var _a;\r\n let gifWidth = doc.w;\r\n let gifHeight = doc.h;\r\n if (gifHeight < height) {\r\n gifWidth = height / gifHeight * gifWidth;\r\n gifHeight = height;\r\n }\r\n const willUseWidth = Math.min(maxSingleWidth, width, gifWidth);\r\n const { 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 //console.log('gif:', gif, w, h);\r\n const div = document.createElement('div');\r\n div.classList.add('gif', 'fade-in-transition');\r\n div.style.width = w + 'px';\r\n div.style.opacity = '0';\r\n //div.style.height = h + 'px';\r\n div.dataset.docID = doc.id;\r\n this.element.append(div);\r\n //this.lazyLoadQueue.observe({div, load: this.processVisibleDiv});\r\n this.lazyLoadQueue.observe(div);\r\n //let preloader = new ProgressivePreloader(div);\r\n const gotThumb = appDocsManager_1.default.getThumb(doc, false);\r\n const willBeAPoster = !!gotThumb;\r\n let img;\r\n if (willBeAPoster) {\r\n img = new Image();\r\n if (!gotThumb.thumb.url) {\r\n gotThumb.promise.then(() => {\r\n img.src = gotThumb.thumb.url;\r\n });\r\n }\r\n }\r\n const afterRender = () => {\r\n if (img) {\r\n div.append(img);\r\n div.style.opacity = '';\r\n }\r\n };\r\n (((_a = gotThumb === null || gotThumb === void 0 ? void 0 : gotThumb.thumb) === null || _a === void 0 ? void 0 : _a.url) ? misc_1.renderImageFromUrl(img, gotThumb.thumb.url, afterRender) : afterRender());\r\n }\r\n}\r\nexports.default = GifsMasonry;\r\n" - }, - { - "id": 64, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\stickyIntersector.ts", - "name": "./src/components/stickyIntersector.ts", - "index": 103, - "index2": 95, - "size": 2877, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "../../components/stickyIntersector", - "loc": "35:44-89" - }, - { - "moduleId": 47, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\index.ts", - "module": "./src/components/emoticonsDropdown/index.ts", - "moduleName": "./src/components/emoticonsDropdown/index.ts", - "type": "cjs require", - "userRequest": "../stickyIntersector", - "loc": "26:44-75" - } - ], - "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": 65, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popupDatepicker.ts", - "name": "./src/components/popupDatepicker.ts", - "index": 106, - "index2": 100, - "size": 6481, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "../../components/popupDatepicker", - "loc": "39:42-85" - }, - { - "moduleId": 107, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\search.ts", - "module": "./src/components/chat/search.ts", - "moduleName": "./src/components/chat/search.ts", - "type": "cjs require", - "userRequest": "../popupDatepicker", - "loc": "29:42-71" - } - ], - "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 popup_1 = require(\"./popup\");\r\nclass PopupDatePicker extends popup_1.PopupElement {\r\n constructor(initDate, onPick) {\r\n super('popup-date-picker', [{\r\n text: 'CANCEL',\r\n isCancel: true\r\n }, {\r\n text: 'JUMP TO DATE',\r\n callback: () => {\r\n if (this.onPick) {\r\n this.onPick(this.selectedDate.getTime() / 1000 | 0);\r\n }\r\n }\r\n }]);\r\n this.onPick = onPick;\r\n this.minDate = new Date('2013-08-01T00:00:00');\r\n this.onPrevClick = (e) => {\r\n this.selectedMonth.setMonth(this.selectedMonth.getMonth() - 1);\r\n this.setMonth();\r\n if (this.selectedMonth.getTime() == this.minMonth.getTime()) {\r\n this.prevBtn.setAttribute('disabled', 'true');\r\n }\r\n this.nextBtn.removeAttribute('disabled');\r\n };\r\n this.onNextClick = (e) => {\r\n this.selectedMonth.setMonth(this.selectedMonth.getMonth() + 1);\r\n this.setMonth();\r\n if (this.selectedMonth.getTime() == this.maxMonth.getTime()) {\r\n this.nextBtn.setAttribute('disabled', 'true');\r\n }\r\n this.prevBtn.removeAttribute('disabled');\r\n };\r\n this.onDateClick = (e) => {\r\n //cancelEvent(e);\r\n const target = e.target;\r\n if (!target.dataset.timestamp)\r\n return;\r\n if (this.selectedEl) {\r\n if (this.selectedEl == target)\r\n return;\r\n this.selectedEl.classList.remove('active');\r\n }\r\n target.classList.add('active');\r\n const timestamp = +target.dataset.timestamp;\r\n this.selectedDate = new Date(timestamp);\r\n this.setTitle();\r\n this.setMonth();\r\n };\r\n const popupBody = document.createElement('div');\r\n popupBody.classList.add('popup-body');\r\n // Controls\r\n this.controlsDiv = document.createElement('div');\r\n this.controlsDiv.classList.add('date-picker-controls');\r\n this.prevBtn = document.createElement('button');\r\n this.prevBtn.classList.add('btn-icon', 'tgico-down', 'date-picker-prev');\r\n this.prevBtn.addEventListener('click', this.onPrevClick);\r\n this.nextBtn = document.createElement('button');\r\n this.nextBtn.classList.add('btn-icon', 'tgico-down', 'date-picker-next');\r\n this.nextBtn.addEventListener('click', this.onNextClick);\r\n this.monthTitle = document.createElement('div');\r\n this.monthTitle.classList.add('date-picker-month-title');\r\n this.controlsDiv.append(this.prevBtn, this.monthTitle, this.nextBtn);\r\n // Month\r\n this.monthsContainer = document.createElement('div');\r\n this.monthsContainer.classList.add('date-picker-months');\r\n this.monthsContainer.addEventListener('click', this.onDateClick);\r\n popupBody.append(this.controlsDiv, this.monthsContainer);\r\n this.container.append(popupBody);\r\n const popupCenterer = document.createElement('div');\r\n popupCenterer.classList.add('popup-centerer');\r\n popupCenterer.append(this.container);\r\n this.element.append(popupCenterer);\r\n //const passed = (initDate.getTime() - (initDate.getTimezoneOffset() * 60000)) % 86400000;\r\n //this.selectedDate = this.maxDate = new Date(initDate.getTime() - passed);\r\n initDate.setHours(0, 0, 0, 0);\r\n this.selectedDate = initDate;\r\n this.maxDate = new Date();\r\n this.maxDate.setHours(0, 0, 0, 0);\r\n this.selectedMonth = new Date(this.selectedDate);\r\n this.selectedMonth.setDate(1);\r\n this.maxMonth = new Date(this.maxDate);\r\n this.maxMonth.setDate(1);\r\n this.minMonth = new Date(this.minDate);\r\n this.minMonth.setDate(1);\r\n if (this.selectedMonth.getTime() == this.minMonth.getTime()) {\r\n this.prevBtn.setAttribute('disabled', 'true');\r\n }\r\n if (this.selectedMonth.getTime() == this.maxMonth.getTime()) {\r\n this.nextBtn.setAttribute('disabled', 'true');\r\n }\r\n this.setTitle();\r\n this.setMonth();\r\n }\r\n setTitle() {\r\n const splitted = this.selectedDate.toString().split(' ', 3);\r\n this.title.innerText = splitted[0] + ', ' + splitted[1] + ' ' + splitted[2];\r\n }\r\n setMonth() {\r\n const months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];\r\n this.monthTitle.innerText = months[this.selectedMonth.getMonth()] + ' ' + this.selectedMonth.getFullYear();\r\n if (this.month) {\r\n this.month.remove();\r\n }\r\n this.month = document.createElement('div');\r\n this.month.classList.add('date-picker-month');\r\n const days = ['M', 'T', 'W', 'T', 'F', 'S', 'S'];\r\n this.month.append(...days.map(s => {\r\n const el = document.createElement('span');\r\n el.innerText = s;\r\n return el;\r\n }));\r\n const firstDate = new Date(this.selectedMonth);\r\n // 0 - sunday\r\n let dayIndex = firstDate.getDay() - 1;\r\n if (dayIndex == -1)\r\n dayIndex = days.length - 1;\r\n // Padding first week\r\n for (let i = 0; i < dayIndex; ++i) {\r\n const el = document.createElement('span');\r\n this.month.append(el);\r\n }\r\n do {\r\n const date = firstDate.getDate();\r\n const el = document.createElement('button');\r\n el.classList.add('btn-icon');\r\n el.innerText = '' + date;\r\n el.dataset.timestamp = '' + firstDate.getTime();\r\n if (firstDate > this.maxDate) {\r\n el.setAttribute('disabled', 'true');\r\n }\r\n if (firstDate.getTime() == this.selectedDate.getTime()) {\r\n this.selectedEl = el;\r\n el.classList.add('active');\r\n }\r\n this.month.append(el);\r\n firstDate.setDate(date + 1);\r\n } while (firstDate.getDate() != 1);\r\n this.container.classList.toggle('is-max-lines', (this.month.childElementCount / 7) > 6);\r\n this.monthsContainer.append(this.month);\r\n }\r\n}\r\nexports.default = PopupDatePicker;\r\n" - }, - { - "id": 66, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pagePassword.ts", - "name": "./src/pages/pagePassword.ts", - "index": 110, - "index2": 108, - "size": 5113, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageAuthCode.ts", - "issuerId": 79, - "issuerName": "./src/pages/pageAuthCode.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 49, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "name": "./src/pages/pageSignIn.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 79, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageAuthCode.ts", - "name": "./src/pages/pageAuthCode.ts", - "profile": { - "factory": 104, - "building": 1053, - "dependencies": 527 - } - } - ], - "profile": { - "factory": 575, - "building": 2297, - "dependencies": 2 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 79, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 109, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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\nconst config_1 = require(\"../lib/config\");\r\nconst passwordManager_1 = __importDefault(require(\"../lib/mtproto/passwordManager\"));\r\nconst utils_1 = require(\"../lib/utils\");\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;\r\n const toggleVisible = page.pageEl.querySelector('.toggle-visible');\r\n let getState = () => {\r\n return passwordManager_1.default.getState().then(_state => {\r\n var _a;\r\n state = _state;\r\n passwordInputLabel.innerText = (_a = state.hint) !== null && _a !== void 0 ? _a : 'Password';\r\n });\r\n };\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 getState();\r\n };\r\n const onVisibilityClick = function (e) {\r\n utils_1.cancelEvent(e);\r\n passwordVisible = !passwordVisible;\r\n this.classList.toggle('tgico-eye2', passwordVisible);\r\n if (passwordVisible) {\r\n passwordInput.setAttribute('type', 'text');\r\n animation.setDirection(1);\r\n animation.curFrame = 0;\r\n needFrame = 16;\r\n animation.play();\r\n }\r\n else {\r\n passwordInput.setAttribute('type', 'password');\r\n animation.setDirection(-1);\r\n animation.curFrame = 16;\r\n needFrame = 0;\r\n animation.play();\r\n }\r\n };\r\n toggleVisible.addEventListener('click', onVisibilityClick);\r\n toggleVisible.addEventListener('touchend', onVisibilityClick);\r\n let state;\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 passwordManager_1.default.check(value, state).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.remove();\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 const size = config_1.mediaSizes.isMobile ? 100 : 166;\r\n return Promise.all([\r\n lottieLoader_1.default.loadAnimationFromURL({\r\n container: page.pageEl.querySelector('.auth-image'),\r\n loop: false,\r\n autoplay: false,\r\n width: size,\r\n height: size,\r\n noCache: true\r\n //}, 'assets/img/TwoFactorSetupMonkeyClose.tgs').then(_animation => {\r\n }, 'assets/img/TwoFactorSetupMonkeyPeek.tgs').then(_animation => {\r\n //return;\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 getState()\r\n ]);\r\n};\r\nconst page = new page_1.default('page-password', true, onFirstMount);\r\nexports.default = page;\r\n" - }, - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "index": 0, - "index2": 113, - "size": 6409, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": null, - "issuerId": null, - "issuerName": null, - "issuerPath": null, - "profile": { - "factory": 24, - "building": 3521 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": null, - "moduleIdentifier": null, - "module": null, - "moduleName": null, - "type": "single entry", - "userRequest": "./src/index.ts", - "loc": "main" - } - ], - "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/* import { computeCheck } from './lib/crypto/srp';\r\nimport { salt1, salt2, g, p, srp_id, secure_random, srp_B, password } from './mock/srp'; */\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 const setVH = () => {\r\n const 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 const [config, _, __, AppStorage] = yield Promise.all([\r\n Promise.resolve().then(() => __importStar(require('./lib/config'))),\r\n Promise.resolve().then(() => __importStar(require('./lib/mtproto/mtprotoworker'))),\r\n Promise.resolve().then(() => __importStar(require('./lib/polyfill'))),\r\n Promise.resolve().then(() => __importStar(require('./lib/storage')))\r\n ]);\r\n /* if(config.isServiceWorkerSupported) {\r\n await navigator.serviceWorker.ready;\r\n navigator.serviceWorker.controller ? true : await new Promise((resolve, reject) => {\r\n navigator.serviceWorker.addEventListener('controllerchange', resolve);\r\n });\r\n } */\r\n //console.time('get storage');\r\n const auth = yield AppStorage.default.get('user_auth');\r\n //console.log('got auth:', auth);\r\n //console.timeEnd('get storage');\r\n if (config.isApple) {\r\n document.documentElement.classList.add('is-mac', 'emoji-supported');\r\n if (config.isAppleMobile) {\r\n document.documentElement.classList.add('is-ios');\r\n }\r\n }\r\n else if (config.isAndroid) {\r\n document.documentElement.classList.add('is-android');\r\n }\r\n if (!config.touchSupport) {\r\n document.documentElement.classList.add('no-touch');\r\n }\r\n const userID = auth.id || 0;\r\n if (!userID /* || 1 == 1 */) {\r\n (yield Promise.resolve().then(() => __importStar(require('./pages/pageSignIn')))).default.mount();\r\n /* computeCheck(password, {\r\n current_algo: {\r\n salt1,\r\n salt2,\r\n p,\r\n g\r\n },\r\n srp_id,\r\n srp_B,\r\n secure_random,\r\n }).then(res => {\r\n console.log(res);\r\n }); */\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 const utils = yield Promise.resolve().then(() => __importStar(require('./lib/utils')));\r\n utils.$rootScope.myID = userID;\r\n const findUpClassName = utils.findUpClassName;\r\n Array.from(document.body.getElementsByClassName('popup-close')).forEach(el => {\r\n const popup = findUpClassName(el, 'popup');\r\n el.addEventListener('click', () => {\r\n popup.classList.remove('active');\r\n });\r\n });\r\n const ripple = (yield Promise.resolve().then(() => __importStar(require('./components/ripple')))).ripple;\r\n Array.from(document.getElementsByClassName('rp')).forEach(el => ripple(el));\r\n}));\r\n//});\r\n" - }, - { - "id": 68, - "identifier": "F:\\tweb\\node_modules\\mini-css-extract-plugin\\dist\\loader.js!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\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": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "issuerId": 67, - "issuerName": "./src/index.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - } - ], - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 67, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 69, - "identifier": "F:\\tweb\\node_modules\\mini-css-extract-plugin\\dist\\loader.js!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\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": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "issuerId": 67, - "issuerName": "./src/index.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - } - ], - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 67, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 70, - "identifier": "F:\\tweb\\node_modules\\mini-css-extract-plugin\\dist\\loader.js!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\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": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "issuerId": 67, - "issuerName": "./src/index.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - } - ], - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 67, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 71, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\helpers\\context.ts", - "name": "./src/helpers/context.ts", - "index": 13, - "index2": 10, - "size": 1471, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\storage.ts", - "issuerId": 19, - "issuerName": "./src/lib/storage.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\storage.ts", - "name": "./src/lib/storage.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - } - ], - "profile": { - "factory": 729, - "building": 176 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 19, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\storage.ts", - "module": "./src/lib/storage.ts", - "moduleName": "./src/lib/storage.ts", - "type": "cjs require", - "userRequest": "../helpers/context", - "loc": "4:18-47" - } - ], - "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.notifyAll = exports.notifySomeone = exports.isWorker = exports.isServiceWorker = exports.isWebWorker = void 0;\r\nexports.isWebWorker = typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope;\r\nexports.isServiceWorker = typeof ServiceWorkerGlobalScope !== 'undefined' && self instanceof ServiceWorkerGlobalScope;\r\nexports.isWorker = exports.isWebWorker || exports.isServiceWorker;\r\n// в SW может быть сразу две переменных TRUE, поэтому проверяю по последней\r\nconst notifyServiceWorker = (all, ...args) => {\r\n self\r\n .clients\r\n .matchAll({ includeUncontrolled: false, type: 'window' })\r\n .then((listeners) => {\r\n if (!listeners.length) {\r\n //console.trace('no listeners?', self, listeners);\r\n return;\r\n }\r\n listeners.slice(all ? 0 : -1).forEach(listener => {\r\n // @ts-ignore\r\n listener.postMessage(...args);\r\n });\r\n });\r\n};\r\nconst notifyWorker = (...args) => {\r\n // @ts-ignore\r\n self.postMessage(...args);\r\n};\r\nconst empty = () => { };\r\nexports.notifySomeone = exports.isServiceWorker ? notifyServiceWorker.bind(null, false) : (exports.isWebWorker ? notifyWorker : empty);\r\nexports.notifyAll = exports.isServiceWorker ? notifyServiceWorker.bind(null, true) : (exports.isWebWorker ? notifyWorker : empty);\r\n" - }, - { - "id": 72, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\crypto_methods.ts", - "name": "./src/lib/crypto/crypto_methods.ts", - "index": 14, - "index2": 14, - "size": 1544, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts", - "issuerId": 2, - "issuerName": "./src/lib/mtproto/mtprotoworker.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts", - "name": "./src/lib/mtproto/mtprotoworker.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - } - ], - "profile": { - "factory": 2342, - "building": 10824, - "dependencies": 20 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 2, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts", - "module": "./src/lib/mtproto/mtprotoworker.ts", - "moduleName": "./src/lib/mtproto/mtprotoworker.ts", - "type": "cjs require", - "userRequest": "../crypto/crypto_methods", - "loc": "8:41-76" - } - ], - "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('gzipUncompress', bytes, toString);\r\n }\r\n computeSRP(password, state) {\r\n return this.performTaskWorker('computeSRP', password, state);\r\n }\r\n}\r\nexports.default = CryptoWorkerMethods;\r\n" - }, - { - "id": 73, - "identifier": "F:\\tweb\\node_modules\\worker-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/worker-loader/dist/cjs.js!./src/lib/webp/webp.worker.ts", - "index": 19, - "index2": 16, - "size": 113, - "cacheable": false, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webpWorkerController.ts", - "issuerId": 53, - "issuerName": "./src/lib/webp/webpWorkerController.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts", - "name": "./src/lib/mtproto/mtprotoworker.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 53, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webpWorkerController.ts", - "name": "./src/lib/webp/webpWorkerController.ts", - "profile": { - "factory": 2342, - "building": 10824, - "dependencies": 20 - } - } - ], - "profile": { - "factory": 1033, - "building": 10993 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 53, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webpWorkerController.ts", - "module": "./src/lib/webp/webpWorkerController.ts", - "moduleName": "./src/lib/webp/webpWorkerController.ts", - "type": "cjs require", - "userRequest": "worker-loader!./webp.worker", - "loc": "7:38-76" - } - ], - "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__ + \"608dbdcf64455bd4cc24.worker.js\");\n};" - }, - { - "id": 74, - "identifier": "F:\\tweb\\node_modules\\worker-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/worker-loader/dist/cjs.js!./src/lib/mtproto/mtproto.worker.ts", - "index": 21, - "index2": 19, - "size": 113, - "cacheable": false, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts", - "issuerId": 2, - "issuerName": "./src/lib/mtproto/mtprotoworker.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts", - "name": "./src/lib/mtproto/mtprotoworker.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - } - ], - "profile": { - "factory": 2342, - "building": 10824, - "dependencies": 20 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 2, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts", - "module": "./src/lib/mtproto/mtprotoworker.ts", - "moduleName": "./src/lib/mtproto/mtprotoworker.ts", - "type": "cjs require", - "userRequest": "worker-loader!./mtproto.worker", - "loc": "11:41-82" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 2, - "source": "module.exports = function() {\n return new Worker(__webpack_public_path__ + \"b601bf8645daa9db7023.worker.js\");\n};" - }, - { - "id": 75, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\polyfill.ts", - "name": "./src/lib/polyfill.ts", - "index": 22, - "index2": 21, - "size": 1829, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "issuerId": 67, - "issuerName": "./src/index.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - } - ], - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 67, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "module": "./src/index.ts", - "moduleName": "./src/index.ts", - "type": "cjs require", - "userRequest": "./lib/polyfill", - "loc": "64:50-75" - } - ], - "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.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\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 const sec_num = parseInt(this + '', 10);\r\n const 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)\r\n leadZero = true;\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 (hours ? /* ('0' + hours).slice(-2) */ hours + ':' : '') + minutes + ':' + seconds;\r\n};\r\n" - }, - { - "id": 76, - "identifier": "F:\\tweb\\src\\vendor\\smoothscroll.js", - "name": "./src/vendor/smoothscroll.js", - "index": 26, - "index2": 23, - "size": 4025, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\scrollable_new.ts", - "issuerId": 6, - "issuerName": "./src/components/scrollable_new.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 49, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "name": "./src/pages/pageSignIn.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 6, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\scrollable_new.ts", - "name": "./src/components/scrollable_new.ts", - "profile": { - "factory": 104, - "building": 1053, - "dependencies": 527 - } - } - ], - "profile": { - "factory": 909, - "building": 6558 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 6, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\scrollable_new.ts", - "module": "./src/components/scrollable_new.ts", - "moduleName": "./src/components/scrollable_new.ts", - "type": "cjs require", - "userRequest": "../vendor/smoothscroll", - "loc": "7:39-72" - } - ], - "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+c1?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": 77, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\emoji\\regex.ts", - "name": "./src/emoji/regex.ts", - "index": 28, - "index2": 25, - "size": 8797, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\richtextprocessor.ts", - "issuerId": 3, - "issuerName": "./src/lib/richtextprocessor.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 49, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "name": "./src/pages/pageSignIn.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 3, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\richtextprocessor.ts", - "name": "./src/lib/richtextprocessor.ts", - "profile": { - "factory": 104, - "building": 1053, - "dependencies": 527 - } - } - ], - "profile": { - "factory": 7333, - "building": 114 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 3, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\richtextprocessor.ts", - "module": "./src/lib/richtextprocessor.ts", - "moduleName": "./src/lib/richtextprocessor.ts", - "type": "cjs require", - "userRequest": "../emoji/regex", - "loc": "9:32-57" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 3, - "source": "\"use strict\";\r\n// Copyright Twitter Inc. Licensed under MIT\r\n// https://github.com/twitter/twemoji-parser/blob/master/LICENSE.md\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.default = \"(?:\\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])|\\ufe0f\";\r\n" - }, - { - "id": 78, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\emoji\\index.ts", - "name": "./src/emoji/index.ts", - "index": 29, - "index2": 26, - "size": 1385, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\richtextprocessor.ts", - "issuerId": 3, - "issuerName": "./src/lib/richtextprocessor.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 49, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "name": "./src/pages/pageSignIn.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 3, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\richtextprocessor.ts", - "name": "./src/lib/richtextprocessor.ts", - "profile": { - "factory": 104, - "building": 1053, - "dependencies": 527 - } - } - ], - "profile": { - "factory": 7333, - "building": 114 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 3, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\richtextprocessor.ts", - "module": "./src/lib/richtextprocessor.ts", - "moduleName": "./src/lib/richtextprocessor.ts", - "type": "cjs require", - "userRequest": "../emoji", - "loc": "10:16-35" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 3, - "source": "\"use strict\";\r\n// https://github.com/twitter/twemoji-parser/blob/master/src/lib/regex.js\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.toCodePoints = exports.encodeEmoji = void 0;\r\nfunction encodeEmoji(emojiText) {\r\n const codepoints = toCodePoints(removeVS16s(emojiText)).join('-');\r\n return codepoints;\r\n}\r\nexports.encodeEmoji = encodeEmoji;\r\nconst vs16RegExp = /\\uFE0F/g;\r\n// avoid using a string literal like '\\u200D' here because minifiers expand it inline\r\nconst zeroWidthJoiner = String.fromCharCode(0x200d);\r\nconst removeVS16s = (rawEmoji) => (rawEmoji.indexOf(zeroWidthJoiner) < 0 ? rawEmoji.replace(vs16RegExp, '') : rawEmoji);\r\nfunction toCodePoints(unicodeSurrogates) {\r\n const points = [];\r\n let char = 0;\r\n let previous = 0;\r\n let i = 0;\r\n while (i < unicodeSurrogates.length) {\r\n char = unicodeSurrogates.charCodeAt(i++);\r\n if (previous) {\r\n points.push((0x10000 + ((previous - 0xd800) << 10) + (char - 0xdc00)).toString(16));\r\n previous = 0;\r\n }\r\n else if (char > 0xd800 && char <= 0xdbff) {\r\n previous = char;\r\n }\r\n else {\r\n points.push(char.toString(16));\r\n }\r\n }\r\n if (points.length && points[0].length == 2) {\r\n points[0] = '00' + points[0];\r\n }\r\n return points;\r\n}\r\nexports.toCodePoints = toCodePoints;\r\n" - }, - { - "id": 79, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageAuthCode.ts", - "name": "./src/pages/pageAuthCode.ts", - "index": 30, - "index2": 109, - "size": 10897, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "issuerId": 49, - "issuerName": "./src/pages/pageSignIn.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 49, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "name": "./src/pages/pageSignIn.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - } - ], - "profile": { - "factory": 104, - "building": 1053, - "dependencies": 527 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 49, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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\nconst config_1 = require(\"../lib/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.remove();\r\n if (idleAnimation)\r\n idleAnimation.remove();\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 const size = config_1.mediaSizes.isMobile ? 100 : 166;\r\n return Promise.all([\r\n lottieLoader_1.default.loadAnimationFromURL({\r\n container: imageDiv,\r\n loop: true,\r\n autoplay: true,\r\n width: size,\r\n height: size\r\n }, 'assets/img/TwoFactorSetupMonkeyIdle.tgs').then(animation => {\r\n idleAnimation = animation;\r\n }),\r\n lottieLoader_1.default.loadAnimationFromURL({\r\n container: imageDiv,\r\n loop: false,\r\n autoplay: false,\r\n width: size,\r\n height: size\r\n }, 'assets/img/TwoFactorSetupMonkeyTracking.tgs').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
with the code.';\r\n break;\r\n case 'auth.sentCodeTypeApp':\r\n sentTypeElement.innerHTML = 'We have sent you a message in Telegram
with the code.';\r\n break;\r\n case 'auth.sentCodeTypeCall':\r\n sentTypeElement.innerHTML = 'We will call you and voice
the code.';\r\n break;\r\n default:\r\n sentTypeElement.innerHTML = `Please check everything
for a code (type: ${authCode.type._})`;\r\n break;\r\n }\r\n});\r\nexports.default = page;\r\n" - }, - { - "id": 80, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignUp.ts", - "name": "./src/pages/pageSignUp.ts", - "index": 31, - "index2": 106, - "size": 5208, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageAuthCode.ts", - "issuerId": 79, - "issuerName": "./src/pages/pageAuthCode.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 49, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "name": "./src/pages/pageSignIn.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 79, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageAuthCode.ts", - "name": "./src/pages/pageAuthCode.ts", - "profile": { - "factory": 104, - "building": 1053, - "dependencies": 527 - } - } - ], - "profile": { - "factory": 575, - "building": 2297, - "dependencies": 2 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 79, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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 __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\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\nlet authCode = null;\r\nlet onFirstMount = () => Promise.resolve().then(() => __importStar(require('../lib/appManagers/appProfileManager'))).then(imported => {\r\n const pageElement = page.pageEl;\r\n const avatarPreview = pageElement.querySelector('#canvas-avatar');\r\n const appProfileManager = imported.default;\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.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": 81, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pagesManager.ts", - "name": "./src/pages/pagesManager.ts", - "index": 34, - "index2": 31, - "size": 1412, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\page.ts", - "issuerId": 25, - "issuerName": "./src/pages/page.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 49, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "name": "./src/pages/pageSignIn.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 25, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\page.ts", - "name": "./src/pages/page.ts", - "profile": { - "factory": 104, - "building": 1053, - "dependencies": 527 - } - } - ], - "profile": { - "factory": 565, - "building": 2305, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 25, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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 lottieLoader_1 = __importDefault(require(\"../lib/lottieLoader\"));\r\nconst horizontalMenu_1 = require(\"../components/horizontalMenu\");\r\nclass PagesManager {\r\n constructor() {\r\n this.pageID = -1;\r\n this.pagesDiv = document.getElementById('auth-pages');\r\n this.selectTab = horizontalMenu_1.horizontalMenu(null, this.pagesDiv.firstElementChild, null, null);\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\n// @ts-ignore\r\nif (process.env.NODE_ENV != 'production') {\r\n window.pagesManager = pagesManager;\r\n}\r\nexports.default = pagesManager;\r\n" - }, - { - "id": 82, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.ts", - "name": "./src/lib/mtproto/mtproto.ts", - "index": 49, - "index2": 39, - "size": 2926, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "issuerId": 7, - "issuerName": "./src/lib/appManagers/appMessagesManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "name": "./src/lib/appManagers/appMessagesManager.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 2083, - "building": 945, - "dependencies": 16 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 7, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "module": "./src/lib/appManagers/appMessagesManager.ts", - "moduleName": "./src/lib/appManagers/appMessagesManager.ts", - "type": "cjs require", - "userRequest": "../mtproto/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": 83, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\visibilityIntersector.ts", - "name": "./src/components/visibilityIntersector.ts", - "index": 66, - "index2": 57, - "size": 2816, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\lazyLoadQueue.ts", - "issuerId": 21, - "issuerName": "./src/components/lazyLoadQueue.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 21, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\lazyLoadQueue.ts", - "name": "./src/components/lazyLoadQueue.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 1009, - "building": 1430 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 21, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\lazyLoadQueue.ts", - "module": "./src/components/lazyLoadQueue.ts", - "moduleName": "./src/components/lazyLoadQueue.ts", - "type": "cjs require", - "userRequest": "./visibilityIntersector", - "loc": "17: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\nclass VisibilityIntersector {\r\n constructor(onVisibilityChange) {\r\n this.items = new Map();\r\n this.locked = false;\r\n this.observer = new IntersectionObserver((entries) => {\r\n if (this.locked) {\r\n return;\r\n }\r\n const changed = [];\r\n entries.forEach(entry => {\r\n const target = entry.target;\r\n if (this.items.get(target) == entry.isIntersecting) {\r\n return;\r\n }\r\n else {\r\n this.items.set(target, entry.isIntersecting);\r\n }\r\n /* if(entry.isIntersecting) {\r\n console.log('ooo', entry);\r\n } */\r\n /* if(this.locked) {\r\n return;\r\n } */\r\n changed[entry.isIntersecting ? 'unshift' : 'push']({ target, visible: entry.isIntersecting });\r\n //onVisibilityChange(target, entry.isIntersecting);\r\n });\r\n changed.forEach(smth => {\r\n onVisibilityChange(smth.target, smth.visible);\r\n });\r\n });\r\n }\r\n getVisible() {\r\n const items = [];\r\n this.items.forEach((value, key) => {\r\n if (value) {\r\n items.push(key);\r\n }\r\n });\r\n return items;\r\n }\r\n clearVisible() {\r\n const visible = this.getVisible();\r\n for (const target of visible) {\r\n this.items.set(target, false);\r\n }\r\n }\r\n isVisible(target) {\r\n return this.items.get(target);\r\n }\r\n disconnect() {\r\n this.observer.disconnect();\r\n this.items.clear();\r\n }\r\n refresh() {\r\n this.observer.disconnect();\r\n //window.requestAnimationFrame(() => {\r\n const targets = [...this.items.keys()];\r\n for (const target of targets) {\r\n //this.items.set(target, false);\r\n this.observer.observe(target);\r\n }\r\n //});\r\n }\r\n refreshVisible() {\r\n const visible = this.getVisible();\r\n for (const target of visible) {\r\n this.observer.unobserve(target);\r\n }\r\n for (const target of visible) {\r\n this.observer.observe(target);\r\n }\r\n }\r\n observe(target) {\r\n this.items.set(target, false);\r\n this.observer.observe(target);\r\n }\r\n unobserve(target) {\r\n this.observer.unobserve(target);\r\n this.items.delete(target);\r\n }\r\n unlock() {\r\n this.locked = false;\r\n }\r\n unlockAndRefresh() {\r\n this.unlock();\r\n this.refresh();\r\n }\r\n lock() {\r\n this.locked = true;\r\n }\r\n}\r\nexports.default = VisibilityIntersector;\r\n" - }, - { - "id": 84, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\audio.ts", - "name": "./src/components/audio.ts", - "index": 72, - "index2": 64, - "size": 18005, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "issuerId": 18, - "issuerName": "./src/components/wrappers.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 18, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "name": "./src/components/wrappers.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 1092, - "building": 1418, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 18, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "module": "./src/components/wrappers.ts", - "moduleName": "./src/components/wrappers.ts", - "type": "cjs require", - "userRequest": "./audio", - "loc": "29:32-50" - } - ], - "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.decodeWaveform = void 0;\r\nconst appDocsManager_1 = __importDefault(require(\"../lib/appManagers/appDocsManager\"));\r\nconst richtextprocessor_1 = require(\"../lib/richtextprocessor\");\r\nconst wrappers_1 = require(\"./wrappers\");\r\nconst preloader_1 = __importDefault(require(\"./preloader\"));\r\nconst mediaPlayer_1 = require(\"../lib/mediaPlayer\");\r\nconst appMediaPlaybackController_1 = __importDefault(require(\"./appMediaPlaybackController\"));\r\nconst config_1 = require(\"../lib/config\");\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\nexports.decodeWaveform = decodeWaveform;\r\nfunction wrapVoiceMessage(doc, audioEl) {\r\n audioEl.classList.add('is-voice');\r\n const barWidth = 2;\r\n const barMargin = config_1.mediaSizes.isMobile ? 2 : 1;\r\n const barHeightMin = config_1.mediaSizes.isMobile ? 3 : 2;\r\n const barHeightMax = config_1.mediaSizes.isMobile ? 16 : 23;\r\n const availW = config_1.mediaSizes.isMobile ? 152 : 190;\r\n const svg = document.createElementNS(\"http://www.w3.org/2000/svg\", \"svg\");\r\n svg.classList.add('audio-waveform');\r\n svg.setAttributeNS(null, 'width', '' + availW);\r\n svg.setAttributeNS(null, 'height', '' + barHeightMax);\r\n svg.setAttributeNS(null, 'viewBox', `0 0 ${availW} ${barHeightMax}`);\r\n const timeDiv = document.createElement('div');\r\n timeDiv.classList.add('audio-time');\r\n audioEl.append(svg, timeDiv);\r\n let waveform = doc.attributes.find(attribute => attribute._ == 'documentAttributeAudio').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 barCount = Math.min((availW / (barWidth + barMargin)) | 0, wfSize);\r\n let maxValue = 0;\r\n const 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 const h = `\r\n \r\n `;\r\n html += h;\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 const rects = Array.from(svg.children);\r\n let progress = audioEl.querySelector('.audio-waveform');\r\n const onLoad = () => {\r\n let interval = 0;\r\n let lastIndex = 0;\r\n let audio = audioEl.audio;\r\n if (!audio.paused || (audio.currentTime > 0 && audio.currentTime != audio.duration)) {\r\n lastIndex = Math.round(audio.currentTime / audio.duration * barCount);\r\n rects.slice(0, lastIndex + 1).forEach(node => node.classList.add('active'));\r\n }\r\n let start = () => {\r\n clearInterval(interval);\r\n interval = setInterval(() => {\r\n if (lastIndex > svg.childElementCount || isNaN(audio.duration) || audio.paused) {\r\n clearInterval(interval);\r\n return;\r\n }\r\n lastIndex = Math.round(audio.currentTime / audio.duration * barCount);\r\n //svg.children[lastIndex].setAttributeNS(null, 'fill', '#000');\r\n //svg.children[lastIndex].classList.add('active'); #Иногда пропускает полоски..\r\n rects.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 if (!audio.paused) {\r\n start();\r\n }\r\n audioEl.addAudioListener('playing', () => {\r\n //rects.forEach(node => node.classList.remove('active'));\r\n start();\r\n });\r\n audioEl.addAudioListener('pause', () => {\r\n clearInterval(interval);\r\n });\r\n audioEl.addAudioListener('ended', () => {\r\n clearInterval(interval);\r\n rects.forEach(node => node.classList.remove('active'));\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);\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);\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);\r\n });\r\n function scrub(e) {\r\n const scrubTime = e.offsetX / availW /* width */ * audio.duration;\r\n lastIndex = Math.round(scrubTime / audio.duration * barCount);\r\n rects.slice(0, lastIndex + 1).forEach(node => node.classList.add('active'));\r\n for (let i = lastIndex + 1; i < rects.length; ++i) {\r\n rects[i].classList.remove('active');\r\n }\r\n audio.currentTime = scrubTime;\r\n }\r\n return () => {\r\n clearInterval(interval);\r\n progress.remove();\r\n progress = null;\r\n audio = null;\r\n };\r\n };\r\n return onLoad;\r\n}\r\nfunction wrapAudio(doc, audioEl) {\r\n const withTime = !!+audioEl.getAttribute('with-time');\r\n const title = doc.audioTitle || doc.file_name;\r\n let subtitle = doc.audioPerformer ? richtextprocessor_1.RichTextProcessor.wrapPlainText(doc.audioPerformer) : '';\r\n if (withTime) {\r\n subtitle += (subtitle ? ' · ' : '') + wrappers_1.formatDate(doc.date);\r\n }\r\n else if (!subtitle) {\r\n subtitle = 'Unknown Artist';\r\n }\r\n const html = `\r\n
\r\n
${title}
\r\n
${subtitle}
\r\n
\r\n
`;\r\n audioEl.insertAdjacentHTML('beforeend', html);\r\n const onLoad = () => {\r\n const subtitleDiv = audioEl.querySelector('.audio-subtitle');\r\n let launched = false;\r\n let progressLine = new mediaPlayer_1.MediaProgressLine(audioEl.audio, doc.supportsStreaming);\r\n audioEl.addAudioListener('ended', () => {\r\n audioEl.classList.remove('audio-show-progress');\r\n // Reset subtitle\r\n subtitleDiv.innerHTML = subtitle;\r\n launched = false;\r\n });\r\n const onPlaying = () => {\r\n if (!launched) {\r\n audioEl.classList.add('audio-show-progress');\r\n launched = true;\r\n subtitleDiv.innerHTML = '';\r\n if (progressLine) {\r\n subtitleDiv.append(progressLine.container);\r\n }\r\n }\r\n };\r\n audioEl.addAudioListener('playing', onPlaying);\r\n if (!audioEl.audio.paused || audioEl.audio.currentTime > 0) {\r\n onPlaying();\r\n }\r\n return () => {\r\n progressLine.removeListeners();\r\n progressLine.container.remove();\r\n progressLine = null;\r\n };\r\n };\r\n return onLoad;\r\n}\r\nclass AudioElement extends HTMLElement {\r\n constructor() {\r\n super();\r\n this.attachedHandlers = {};\r\n // элемент создан\r\n }\r\n connectedCallback() {\r\n // браузер вызывает этот метод при добавлении элемента в документ\r\n // (может вызываться много раз, если элемент многократно добавляется/удаляется)\r\n this.classList.add('audio');\r\n const mid = +this.getAttribute('message-id');\r\n const docID = this.getAttribute('doc-id');\r\n const doc = appDocsManager_1.default.getDoc(docID);\r\n const uploading = +doc.id < 0;\r\n const durationStr = String(doc.duration | 0).toHHMMSS(true);\r\n this.innerHTML = `
`;\r\n const downloadDiv = document.createElement('div');\r\n downloadDiv.classList.add('audio-download');\r\n if (!uploading && doc.type != 'audio') {\r\n downloadDiv.innerHTML = '
';\r\n }\r\n if (doc.type != 'audio' || uploading) {\r\n this.append(downloadDiv);\r\n }\r\n const onTypeLoad = doc.type == 'voice' ? wrapVoiceMessage(doc, this) : wrapAudio(doc, this);\r\n const audioTimeDiv = this.querySelector('.audio-time');\r\n audioTimeDiv.innerHTML = durationStr;\r\n const onLoad = (autoload = true) => {\r\n const audio = this.audio = appMediaPlaybackController_1.default.addMedia(doc, mid, autoload);\r\n this.onTypeDisconnect = onTypeLoad();\r\n const toggle = this.querySelector('.audio-toggle');\r\n const onPlaying = () => {\r\n audioTimeDiv.innerText = String(audio.currentTime | 0).toHHMMSS(true) + ' / ' + durationStr;\r\n if (!audio.paused) {\r\n toggle.classList.remove('tgico-largeplay');\r\n toggle.classList.add('tgico-largepause');\r\n }\r\n };\r\n if (!audio.paused || (audio.currentTime > 0 && audio.currentTime != audio.duration)) {\r\n onPlaying();\r\n audioTimeDiv.innerText = String(audio.currentTime | 0).toHHMMSS(true) + ' / ' + durationStr;\r\n }\r\n toggle.addEventListener('click', () => {\r\n if (audio.paused)\r\n audio.play().catch(() => { });\r\n else\r\n audio.pause();\r\n });\r\n this.addAudioListener('ended', () => {\r\n toggle.classList.add('tgico-largeplay');\r\n toggle.classList.remove('tgico-largepause');\r\n });\r\n this.addAudioListener('timeupdate', () => {\r\n if (appMediaPlaybackController_1.default.isSafariBuffering(audio))\r\n return;\r\n audioTimeDiv.innerText = String(audio.currentTime | 0).toHHMMSS(true) + ' / ' + durationStr;\r\n });\r\n this.addAudioListener('pause', () => {\r\n toggle.classList.add('tgico-largeplay');\r\n toggle.classList.remove('tgico-largepause');\r\n });\r\n this.addAudioListener('playing', onPlaying);\r\n };\r\n if (!uploading) {\r\n let preloader = this.preloader;\r\n if (doc.type == 'voice') {\r\n let download;\r\n const onClick = () => {\r\n if (!download) {\r\n if (!preloader) {\r\n preloader = new preloader_1.default(null, true);\r\n }\r\n download = appDocsManager_1.default.downloadDocNew(doc);\r\n preloader.attach(downloadDiv, true, download);\r\n download.then(() => {\r\n downloadDiv.remove();\r\n this.removeEventListener('click', onClick);\r\n onLoad();\r\n }).catch(err => {\r\n if (err.name === 'AbortError') {\r\n download = null;\r\n }\r\n }).finally(() => {\r\n downloadDiv.classList.remove('downloading');\r\n });\r\n downloadDiv.classList.add('downloading');\r\n }\r\n else {\r\n download.cancel();\r\n }\r\n };\r\n this.addEventListener('click', onClick);\r\n this.click();\r\n }\r\n else {\r\n onLoad(false);\r\n //if(appMediaPlaybackController.mediaExists(mid)) { // чтобы показать прогресс, если аудио уже было скачано\r\n //onLoad();\r\n //} else {\r\n const r = () => {\r\n //onLoad();\r\n appMediaPlaybackController_1.default.resolveWaitingForLoadMedia(mid);\r\n appMediaPlaybackController_1.default.willBePlayed(this.audio); // prepare for loading audio\r\n if (!preloader) {\r\n preloader = new preloader_1.default(null, false);\r\n }\r\n if (config_1.isSafari) {\r\n this.audio.autoplay = true;\r\n this.audio.play().catch(() => { });\r\n }\r\n preloader.attach(downloadDiv);\r\n this.append(downloadDiv);\r\n new Promise((resolve) => {\r\n if (this.audio.readyState >= 2)\r\n resolve();\r\n else\r\n this.addAudioListener('canplay', resolve);\r\n }).then(() => {\r\n downloadDiv.remove();\r\n //setTimeout(() => {\r\n // release loaded audio\r\n if (appMediaPlaybackController_1.default.willBePlayedMedia == this.audio) {\r\n this.audio.play();\r\n appMediaPlaybackController_1.default.willBePlayedMedia = null;\r\n }\r\n //}, 10e3);\r\n });\r\n };\r\n this.addEventListener('click', r, { once: true });\r\n //}\r\n }\r\n }\r\n else {\r\n this.preloader.attach(downloadDiv, false);\r\n //onLoad();\r\n }\r\n }\r\n addAudioListener(name, callback) {\r\n if (!this.attachedHandlers[name])\r\n this.attachedHandlers[name] = [];\r\n this.attachedHandlers[name].push(callback);\r\n this.audio.addEventListener(name, callback);\r\n }\r\n disconnectedCallback() {\r\n // браузер вызывает этот метод при удалении элемента из документа\r\n // (может вызываться много раз, если элемент многократно добавляется/удаляется)\r\n if (this.onTypeDisconnect) {\r\n this.onTypeDisconnect();\r\n this.onTypeDisconnect = null;\r\n }\r\n for (let name in this.attachedHandlers) {\r\n for (let callback of this.attachedHandlers[name]) {\r\n this.audio.removeEventListener(name, callback);\r\n }\r\n delete this.attachedHandlers[name];\r\n }\r\n this.preloader = null;\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}\r\nexports.default = AudioElement;\r\ncustomElements.define(\"audio-element\", AudioElement);\r\n" - }, - { - "id": 85, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\stickers.ts", - "name": "./src/components/sidebarRight/stickers.ts", - "index": 77, - "index2": 72, - "size": 9850, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "issuerId": 24, - "issuerName": "./src/lib/appManagers/appSidebarRight.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 24, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "name": "./src/lib/appManagers/appSidebarRight.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 1584, - "building": 1606, - "dependencies": 2 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 24, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", - "type": "cjs require", - "userRequest": "../../components/sidebarRight/stickers", - "loc": "56:35-84" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 4, - "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 searchInput_1 = __importDefault(require(\"../searchInput\"));\r\nconst scrollable_new_1 = __importDefault(require(\"../scrollable_new\"));\r\nconst lazyLoadQueue_1 = __importDefault(require(\"../lazyLoadQueue\"));\r\nconst utils_1 = require(\"../../lib/utils\");\r\nconst appImManager_1 = __importDefault(require(\"../../lib/appManagers/appImManager\"));\r\nconst appStickersManager_1 = __importDefault(require(\"../../lib/appManagers/appStickersManager\"));\r\nconst popupStickers_1 = __importDefault(require(\"../popupStickers\"));\r\nconst animationIntersector_1 = __importDefault(require(\"../animationIntersector\"));\r\nconst richtextprocessor_1 = require(\"../../lib/richtextprocessor\");\r\nconst wrappers_1 = require(\"../wrappers\");\r\nconst appSidebarRight_1 = __importStar(require(\"../../lib/appManagers/appSidebarRight\"));\r\nclass AppStickersTab {\r\n constructor() {\r\n this.container = document.getElementById('stickers-container');\r\n this.contentDiv = this.container.querySelector('.sidebar-content');\r\n this.backBtn = this.container.querySelector('.sidebar-close-button');\r\n this.setsDiv = this.contentDiv.firstElementChild;\r\n this.scrollable = new scrollable_new_1.default(this.contentDiv, 'y', 'STICKERS-SEARCH', undefined, undefined, 2);\r\n this.scrollable.setVirtualContainer(this.setsDiv);\r\n this.lazyLoadQueue = new lazyLoadQueue_1.default();\r\n this.searchInput = new searchInput_1.default('Search Stickers', (value) => {\r\n this.search(value);\r\n });\r\n this.backBtn.parentElement.append(this.searchInput.container);\r\n this.setsDiv.addEventListener('click', (e) => {\r\n const sticker = utils_1.findUpClassName(e.target, 'sticker-set-sticker');\r\n if (sticker) {\r\n const docID = sticker.dataset.docID;\r\n appImManager_1.default.chatInputC.sendMessageWithDocument(docID);\r\n return;\r\n }\r\n const target = utils_1.findUpClassName(e.target, 'sticker-set');\r\n if (!target)\r\n return;\r\n const id = target.dataset.stickerSet;\r\n const access_hash = target.dataset.stickerSet;\r\n const button = utils_1.findUpClassName(e.target, 'sticker-set-button');\r\n if (button) {\r\n e.preventDefault();\r\n e.cancelBubble = true;\r\n button.setAttribute('disabled', 'true');\r\n appStickersManager_1.default.getStickerSet({ id, access_hash }).then(full => {\r\n appStickersManager_1.default.toggleStickerSet(full.set).then(changed => {\r\n if (changed) {\r\n button.innerText = full.set.installed_date ? 'Added' : 'Add';\r\n button.classList.toggle('gray', !!full.set.installed_date);\r\n }\r\n }).finally(() => {\r\n //button.style.width = set.installed_date ? '68px' : '52px';\r\n button.removeAttribute('disabled');\r\n });\r\n });\r\n }\r\n else {\r\n appStickersManager_1.default.getStickerSet({ id, access_hash }).then(full => {\r\n new popupStickers_1.default(full.set).show();\r\n });\r\n }\r\n });\r\n }\r\n onCloseAfterTimeout() {\r\n this.setsDiv.innerHTML = '';\r\n this.searchInput.value = '';\r\n animationIntersector_1.default.checkAnimations(undefined, 'STICKERS-SEARCH');\r\n }\r\n renderSet(set) {\r\n //console.log('renderSet:', set);\r\n const div = document.createElement('div');\r\n div.classList.add('sticker-set');\r\n const header = document.createElement('div');\r\n header.classList.add('sticker-set-header');\r\n const details = document.createElement('div');\r\n details.classList.add('sticker-set-details');\r\n details.innerHTML = `\r\n
${richtextprocessor_1.RichTextProcessor.wrapEmojiText(set.title)}
\r\n
${set.count} stickers
\r\n `;\r\n const button = document.createElement('button');\r\n button.classList.add('btn-primary', 'sticker-set-button');\r\n button.innerText = set.installed_date ? 'Added' : 'Add';\r\n // button.style.width = set.installed_date ? '68px' : '52px';\r\n if (set.installed_date) {\r\n button.classList.add('gray');\r\n }\r\n //ripple(button);\r\n header.append(details, button);\r\n const stickersDiv = document.createElement('div');\r\n stickersDiv.classList.add('sticker-set-stickers');\r\n const count = Math.min(5, set.count);\r\n for (let i = 0; i < count; ++i) {\r\n const stickerDiv = document.createElement('div');\r\n stickerDiv.classList.add('sticker-set-sticker');\r\n stickersDiv.append(stickerDiv);\r\n }\r\n appStickersManager_1.default.getStickerSet(set).then(set => {\r\n //console.log('renderSet got set:', set);\r\n for (let i = 0; i < count; ++i) {\r\n const div = stickersDiv.children[i];\r\n const doc = set.documents[i];\r\n if (doc._ == 'documentEmpty') {\r\n continue;\r\n }\r\n wrappers_1.wrapSticker({\r\n doc,\r\n div,\r\n lazyLoadQueue: this.lazyLoadQueue,\r\n group: 'STICKERS-SEARCH',\r\n /* play: false,\r\n loop: false, */\r\n play: true,\r\n loop: true,\r\n width: 68,\r\n height: 68\r\n });\r\n }\r\n });\r\n /* const onMouseOver = () => {\r\n const animations: AnimationItem['animation'][] = [];\r\n for(let i = 0; i < count; ++i) {\r\n const stickerDiv = stickersDiv.children[i] as HTMLElement;\r\n const animationItem = animationIntersector.getAnimation(stickerDiv);\r\n if(!animationItem) continue;\r\n \r\n const animation = animationItem.animation;\r\n \r\n animations.push(animation);\r\n animation.loop = true;\r\n animation.play();\r\n }\r\n \r\n div.addEventListener('mouseout', () => {\r\n animations.forEach(animation => {\r\n animation.loop = false;\r\n });\r\n \r\n div.addEventListener('mouseover', onMouseOver, {once: true});\r\n }, {once: true});\r\n };\r\n \r\n div.addEventListener('mouseover', onMouseOver, {once: true}); */\r\n div.dataset.stickerSet = set.id;\r\n div.dataset.access_hash = set.access_hash;\r\n div.dataset.title = set.title;\r\n div.append(header, stickersDiv);\r\n this.scrollable.append(div);\r\n }\r\n init() {\r\n appSidebarRight_1.default.selectTab(appSidebarRight_1.AppSidebarRight.SLIDERITEMSIDS.stickers);\r\n appSidebarRight_1.default.toggleSidebar(true).then(() => {\r\n this.renderFeatured();\r\n });\r\n }\r\n renderFeatured() {\r\n return appStickersManager_1.default.getFeaturedStickers().then(coveredSets => {\r\n if (this.searchInput.value) {\r\n return;\r\n }\r\n coveredSets = this.filterRendered('', coveredSets);\r\n coveredSets.forEach(set => {\r\n this.renderSet(set.set);\r\n });\r\n });\r\n }\r\n filterRendered(query, coveredSets) {\r\n coveredSets = coveredSets.slice();\r\n const children = Array.from(this.setsDiv.children);\r\n children.forEachReverse(el => {\r\n const id = el.dataset.stickerSet;\r\n const index = coveredSets.findIndex(covered => covered.set.id == id);\r\n if (index !== -1) {\r\n coveredSets.splice(index, 1);\r\n }\r\n else if (!query || !el.dataset.title.toLowerCase().includes(query.toLowerCase())) {\r\n el.remove();\r\n }\r\n });\r\n animationIntersector_1.default.checkAnimations(undefined, 'STICKERS-SEARCH');\r\n return coveredSets;\r\n }\r\n search(query) {\r\n if (!query) {\r\n return this.renderFeatured();\r\n }\r\n return appStickersManager_1.default.searchStickerSets(query, false).then(coveredSets => {\r\n if (this.searchInput.value != query) {\r\n return;\r\n }\r\n //console.log('search result:', coveredSets);\r\n coveredSets = this.filterRendered(query, coveredSets);\r\n coveredSets.forEach(set => {\r\n this.renderSet(set.set);\r\n });\r\n });\r\n }\r\n}\r\nexports.default = AppStickersTab;\r\n" - }, - { - "id": 86, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\pollResults.ts", - "name": "./src/components/sidebarRight/pollResults.ts", - "index": 80, - "index2": 73, - "size": 5816, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "issuerId": 24, - "issuerName": "./src/lib/appManagers/appSidebarRight.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 24, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "name": "./src/lib/appManagers/appSidebarRight.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 1584, - "building": 1606, - "dependencies": 2 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 24, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", - "type": "cjs require", - "userRequest": "../../components/sidebarRight/pollResults", - "loc": "57:38-90" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 4, - "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 scrollable_new_1 = __importDefault(require(\"../scrollable_new\"));\r\nconst appSidebarRight_1 = __importStar(require(\"../../lib/appManagers/appSidebarRight\"));\r\nconst appPollsManager_1 = __importDefault(require(\"../../lib/appManagers/appPollsManager\"));\r\nconst poll_1 = require(\"../poll\");\r\nconst richtextprocessor_1 = require(\"../../lib/richtextprocessor\");\r\nconst appDialogsManager_1 = __importDefault(require(\"../../lib/appManagers/appDialogsManager\"));\r\nconst ripple_1 = require(\"../ripple\");\r\nclass AppPollResultsTab {\r\n constructor() {\r\n this.container = document.getElementById('poll-results-container');\r\n this.contentDiv = this.container.querySelector('.sidebar-content');\r\n this.resultsDiv = this.contentDiv.firstElementChild;\r\n this.scrollable = new scrollable_new_1.default(this.contentDiv, 'y', 'POLL-RESULTS', undefined, undefined, 2);\r\n }\r\n cleanup() {\r\n this.resultsDiv.innerHTML = '';\r\n this.pollID = '';\r\n this.mid = 0;\r\n }\r\n onCloseAfterTimeout() {\r\n this.cleanup();\r\n }\r\n init(pollID, mid) {\r\n if (this.pollID == pollID && this.mid == mid)\r\n return;\r\n this.cleanup();\r\n this.pollID = pollID;\r\n this.mid = mid;\r\n appSidebarRight_1.default.selectTab(appSidebarRight_1.AppSidebarRight.SLIDERITEMSIDS.pollResults);\r\n const poll = appPollsManager_1.default.getPoll(pollID);\r\n const title = document.createElement('h3');\r\n title.innerHTML = poll.poll.rQuestion;\r\n const percents = poll.results.results.map(v => v.voters / poll.results.total_voters * 100);\r\n poll_1.roundPercents(percents);\r\n const fragment = document.createDocumentFragment();\r\n poll.results.results.forEach((result, idx) => {\r\n if (!result.voters)\r\n return;\r\n const hr = document.createElement('hr');\r\n const answer = poll.poll.answers[idx];\r\n // Head\r\n const answerEl = document.createElement('div');\r\n answerEl.classList.add('poll-results-answer');\r\n const answerTitle = document.createElement('div');\r\n answerTitle.innerHTML = richtextprocessor_1.RichTextProcessor.wrapEmojiText(answer.text);\r\n const answerPercents = document.createElement('div');\r\n answerPercents.innerText = Math.round(percents[idx]) + '%';\r\n answerEl.append(answerTitle, answerPercents);\r\n // Humans\r\n const list = document.createElement('ul');\r\n list.classList.add('poll-results-voters');\r\n appDialogsManager_1.default.setListClickListener(list);\r\n list.style.minHeight = Math.min(result.voters, 4) * 50 + 'px';\r\n fragment.append(hr, answerEl, list);\r\n let offset, limit = 4, loading = false, left = result.voters - 4;\r\n const load = () => {\r\n if (loading)\r\n return;\r\n loading = true;\r\n appPollsManager_1.default.getVotes(mid, answer.option, offset, limit).then(votesList => {\r\n votesList.votes.forEach(vote => {\r\n const { dom } = appDialogsManager_1.default.addDialog(vote.user_id, list, false, false, undefined, false);\r\n dom.lastMessageSpan.parentElement.remove();\r\n });\r\n if (offset) {\r\n left -= votesList.votes.length;\r\n showMore.lastElementChild.innerText = `Show ${Math.min(20, left)} more voter${left > 1 ? 's' : ''}`;\r\n }\r\n offset = votesList.next_offset;\r\n limit = 20;\r\n if (!left || !votesList.votes.length) {\r\n showMore.remove();\r\n }\r\n }).finally(() => {\r\n loading = false;\r\n });\r\n };\r\n load();\r\n if (left <= 0)\r\n return;\r\n const showMore = document.createElement('div');\r\n showMore.classList.add('poll-results-more', 'show-more');\r\n showMore.addEventListener('click', load);\r\n showMore.innerHTML = `
Show ${Math.min(20, left)} more voter${left > 1 ? 's' : ''}
`;\r\n ripple_1.ripple(showMore);\r\n fragment.append(showMore);\r\n });\r\n this.resultsDiv.append(title, fragment);\r\n appSidebarRight_1.default.toggleSidebar(true).then(() => {\r\n /* appPollsManager.getVotes(mid).then(votes => {\r\n console.log('gOt VotEs', votes);\r\n }); */\r\n });\r\n }\r\n}\r\nexports.default = AppPollResultsTab;\r\n" - }, - { - "id": 87, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\gifs.ts", - "name": "./src/components/sidebarRight/gifs.ts", - "index": 81, - "index2": 77, - "size": 6363, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "issuerId": 24, - "issuerName": "./src/lib/appManagers/appSidebarRight.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 24, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "name": "./src/lib/appManagers/appSidebarRight.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 1584, - "building": 1606, - "dependencies": 2 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 24, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", - "type": "cjs require", - "userRequest": "../../components/sidebarRight/gifs", - "loc": "58:31-76" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 4, - "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 searchInput_1 = __importDefault(require(\"../searchInput\"));\r\nconst scrollable_new_1 = __importDefault(require(\"../scrollable_new\"));\r\nconst animationIntersector_1 = __importDefault(require(\"../animationIntersector\"));\r\nconst appSidebarRight_1 = __importStar(require(\"../../lib/appManagers/appSidebarRight\"));\r\nconst appUsersManager_1 = __importDefault(require(\"../../lib/appManagers/appUsersManager\"));\r\nconst AppInlineBotsManager_1 = __importDefault(require(\"../../lib/appManagers/AppInlineBotsManager\"));\r\nconst gifsMasonry_1 = __importDefault(require(\"../gifsMasonry\"));\r\nconst utils_1 = require(\"../../lib/utils\");\r\nconst appImManager_1 = __importDefault(require(\"../../lib/appManagers/appImManager\"));\r\nconst ANIMATIONGROUP = 'GIFS-SEARCH';\r\nclass AppGifsTab {\r\n constructor() {\r\n this.container = document.getElementById('search-gifs-container');\r\n this.contentDiv = this.container.querySelector('.sidebar-content');\r\n this.backBtn = this.container.querySelector('.sidebar-close-button');\r\n this.gifsDiv = this.contentDiv.firstElementChild;\r\n this.nextOffset = '';\r\n this.loadedAll = false;\r\n this.onGifsClick = (e) => {\r\n const target = utils_1.findUpClassName(e.target, 'gif');\r\n if (!target)\r\n return;\r\n const fileID = target.dataset.docID;\r\n if (appImManager_1.default.chatInputC.sendMessageWithDocument(fileID)) {\r\n //this.closeBtn.click();\r\n }\r\n else {\r\n console.warn('got no doc by id:', fileID);\r\n }\r\n };\r\n this.scrollable = new scrollable_new_1.default(this.contentDiv, 'y', ANIMATIONGROUP, undefined, undefined, 2);\r\n this.scrollable.setVirtualContainer(this.gifsDiv);\r\n this.masonry = new gifsMasonry_1.default(this.gifsDiv, ANIMATIONGROUP, this.scrollable);\r\n this.searchInput = new searchInput_1.default('Search GIFs', (value) => {\r\n this.reset();\r\n this.search(value);\r\n });\r\n this.gifsDiv.addEventListener('click', this.onGifsClick);\r\n this.backBtn.parentElement.append(this.searchInput.container);\r\n }\r\n onClose() {\r\n this.scrollable.onScrolledBottom = () => { };\r\n }\r\n onCloseAfterTimeout() {\r\n this.reset();\r\n this.gifsDiv.innerHTML = '';\r\n this.searchInput.value = '';\r\n animationIntersector_1.default.checkAnimations(undefined, ANIMATIONGROUP);\r\n }\r\n reset() {\r\n this.searchPromise = null;\r\n this.nextOffset = '';\r\n this.loadedAll = false;\r\n this.masonry.lazyLoadQueue.clear();\r\n }\r\n init() {\r\n appSidebarRight_1.default.selectTab(appSidebarRight_1.AppSidebarRight.SLIDERITEMSIDS.gifs);\r\n appSidebarRight_1.default.toggleSidebar(true).then(() => {\r\n //this.renderFeatured();\r\n this.search('', true);\r\n this.reset();\r\n this.scrollable.onScrolledBottom = () => {\r\n this.search(this.searchInput.value, false);\r\n };\r\n });\r\n }\r\n search(query, newSearch = true) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (this.searchPromise || this.loadedAll)\r\n return;\r\n if (!this.gifBotPeerID) {\r\n this.gifBotPeerID = (yield appUsersManager_1.default.resolveUsername('gif')).id;\r\n }\r\n try {\r\n this.searchPromise = AppInlineBotsManager_1.default.getInlineResults(0, this.gifBotPeerID, query, this.nextOffset);\r\n const { results, next_offset } = yield this.searchPromise;\r\n if (this.searchInput.value != query) {\r\n return;\r\n }\r\n this.searchPromise = null;\r\n this.nextOffset = next_offset;\r\n if (newSearch) {\r\n this.gifsDiv.innerHTML = '';\r\n }\r\n if (results.length) {\r\n results.forEach((result) => {\r\n if (result._ === 'botInlineMediaResult' && result.document) {\r\n this.masonry.add(result.document);\r\n }\r\n });\r\n }\r\n else {\r\n this.loadedAll = true;\r\n }\r\n this.scrollable.onScroll();\r\n }\r\n catch (err) {\r\n this.searchPromise = null;\r\n throw new Error(JSON.stringify(err));\r\n }\r\n });\r\n }\r\n}\r\nexports.default = AppGifsTab;\r\n" - }, - { - "id": 88, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\newChannel.ts", - "name": "./src/components/sidebarLeft/newChannel.ts", - "index": 86, - "index2": 81, - "size": 3600, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "issuerId": 14, - "issuerName": "./src/lib/appManagers/appSidebarLeft.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 14, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "name": "./src/lib/appManagers/appSidebarLeft.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 1308, - "building": 1919, - "dependencies": 4 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 14, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "module": "./src/lib/appManagers/appSidebarLeft.ts", - "moduleName": "./src/lib/appManagers/appSidebarLeft.ts", - "type": "cjs require", - "userRequest": "../../components/sidebarLeft/newChannel", - "loc": "35:37-87" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 4, - "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 popupAvatar_1 = __importDefault(require(\"../popupAvatar\"));\r\nconst appChatsManager_1 = __importDefault(require(\"../../lib/appManagers/appChatsManager\"));\r\nconst appSidebarLeft_1 = __importStar(require(\"../../lib/appManagers/appSidebarLeft\"));\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_1.default.removeTabFromHistory(appSidebarLeft_1.AppSidebarLeft.SLIDERITEMSIDS.newChannel);\r\n appSidebarLeft_1.default.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\nexports.default = AppNewChannelTab;\r\n" - }, - { - "id": 89, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\cropper.ts", - "name": "./src/lib/cropper.ts", - "index": 88, - "index2": 79, - "size": 7890, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popupAvatar.ts", - "issuerId": 46, - "issuerName": "./src/components/popupAvatar.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 49, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "name": "./src/pages/pageSignIn.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 79, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageAuthCode.ts", - "name": "./src/pages/pageAuthCode.ts", - "profile": { - "factory": 104, - "building": 1053, - "dependencies": 527 - } - }, - { - "id": 80, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignUp.ts", - "name": "./src/pages/pageSignUp.ts", - "profile": { - "factory": 575, - "building": 2297, - "dependencies": 2 - } - }, - { - "id": 46, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popupAvatar.ts", - "name": "./src/components/popupAvatar.ts", - "profile": { - "factory": 4426, - "building": 735, - "dependencies": 0 - } - } - ], - "profile": { - "factory": 1359, - "building": 741 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 46, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 90, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\addMembers.ts", - "name": "./src/components/sidebarLeft/addMembers.ts", - "index": 89, - "index2": 82, - "size": 3413, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "issuerId": 14, - "issuerName": "./src/lib/appManagers/appSidebarLeft.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 14, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "name": "./src/lib/appManagers/appSidebarLeft.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 1308, - "building": 1919, - "dependencies": 4 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 14, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "module": "./src/lib/appManagers/appSidebarLeft.ts", - "moduleName": "./src/lib/appManagers/appSidebarLeft.ts", - "type": "cjs require", - "userRequest": "../../components/sidebarLeft/addMembers", - "loc": "36:37-87" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 4, - "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 appSelectPeers_1 = require(\"../appSelectPeers\");\r\nconst misc_1 = require(\"../misc\");\r\nconst appChatsManager_1 = __importDefault(require(\"../../lib/appManagers/appChatsManager\"));\r\nconst appSidebarLeft_1 = __importStar(require(\"../../lib/appManagers/appSidebarLeft\"));\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 if (this.skippable) {\r\n this.backBtn.click();\r\n return;\r\n }\r\n const 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, skippable, takeOut) {\r\n this.peerID = Math.abs(id);\r\n this.peerType = type;\r\n this.takeOut = takeOut;\r\n this.skippable = skippable;\r\n this.onCloseAfterTimeout();\r\n this.selector = new appSelectPeers_1.AppSelectPeers(this.contentDiv, skippable ? null : (length) => {\r\n this.nextBtn.classList.toggle('is-visible', !!length);\r\n }, ['contacts']);\r\n this.nextBtn.innerHTML = '';\r\n this.nextBtn.disabled = false;\r\n this.nextBtn.classList.add('tgico-next');\r\n this.nextBtn.classList.toggle('is-visible', skippable);\r\n appSidebarLeft_1.default.selectTab(appSidebarLeft_1.AppSidebarLeft.SLIDERITEMSIDS.addMembers);\r\n }\r\n}\r\nexports.default = AppAddMembersTab;\r\n" - }, - { - "id": 91, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\contacts.ts", - "name": "./src/components/sidebarLeft/contacts.ts", - "index": 90, - "index2": 83, - "size": 5220, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "issuerId": 14, - "issuerName": "./src/lib/appManagers/appSidebarLeft.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 14, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "name": "./src/lib/appManagers/appSidebarLeft.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 1308, - "building": 1919, - "dependencies": 4 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 14, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "module": "./src/lib/appManagers/appSidebarLeft.ts", - "moduleName": "./src/lib/appManagers/appSidebarLeft.ts", - "type": "cjs require", - "userRequest": "../../components/sidebarLeft/contacts", - "loc": "37:35-83" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 4, - "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 scrollable_new_1 = __importDefault(require(\"../scrollable_new\"));\r\nconst appDialogsManager_1 = __importDefault(require(\"../../lib/appManagers/appDialogsManager\"));\r\nconst appUsersManager_1 = __importDefault(require(\"../../lib/appManagers/appUsersManager\"));\r\nconst appPhotosManager_1 = __importDefault(require(\"../../lib/appManagers/appPhotosManager\"));\r\nconst appSidebarLeft_1 = __importStar(require(\"../../lib/appManagers/appSidebarLeft\"));\r\nconst utils_1 = require(\"../../lib/utils\");\r\nconst searchInput_1 = __importDefault(require(\"../searchInput\"));\r\n// TODO: поиск по людям глобальный, если не нашло в контактах никого\r\nclass AppContactsTab {\r\n constructor() {\r\n this.container = document.getElementById('contacts-container');\r\n this.list = this.container.querySelector('#contacts');\r\n appDialogsManager_1.default.setListClickListener(this.list);\r\n this.scrollable = new scrollable_new_1.default(this.list.parentElement);\r\n this.searchInput = new searchInput_1.default('Search', (value) => {\r\n this.list.innerHTML = '';\r\n this.openContacts(value);\r\n });\r\n this.container.firstElementChild.append(this.searchInput.container);\r\n // preload contacts\r\n // appUsersManager.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.searchInput.value = '';\r\n }\r\n openContacts(query) {\r\n if (appSidebarLeft_1.default.historyTabIDs.indexOf(appSidebarLeft_1.AppSidebarLeft.SLIDERITEMSIDS.contacts) === -1) {\r\n appSidebarLeft_1.default.selectTab(appSidebarLeft_1.AppSidebarLeft.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_1.default.historyTabIDs[appSidebarLeft_1.default.historyTabIDs.length - 1] != appSidebarLeft_1.AppSidebarLeft.SLIDERITEMSIDS.contacts) {\r\n console.warn('user closed contacts before it\\'s loaded');\r\n return;\r\n }\r\n const contacts = [..._contacts];\r\n if (!query) {\r\n contacts.findAndSplice(u => u == utils_1.$rootScope.myID);\r\n }\r\n /* if(query && 'saved messages'.includes(query.toLowerCase())) {\r\n contacts.unshift($rootScope.myID);\r\n } */\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' ? `${status}` : 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\nexports.default = AppContactsTab;\r\n" - }, - { - "id": 92, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\newGroup.ts", - "name": "./src/components/sidebarLeft/newGroup.ts", - "index": 91, - "index2": 84, - "size": 4686, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "issuerId": 14, - "issuerName": "./src/lib/appManagers/appSidebarLeft.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 14, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "name": "./src/lib/appManagers/appSidebarLeft.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 1308, - "building": 1919, - "dependencies": 4 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 14, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "module": "./src/lib/appManagers/appSidebarLeft.ts", - "moduleName": "./src/lib/appManagers/appSidebarLeft.ts", - "type": "cjs require", - "userRequest": "../../components/sidebarLeft/newGroup", - "loc": "38:35-83" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 4, - "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 appSearch_1 = require(\"../appSearch\");\r\nconst popupAvatar_1 = __importDefault(require(\"../popupAvatar\"));\r\nconst appChatsManager_1 = __importDefault(require(\"../../lib/appManagers/appChatsManager\"));\r\nconst appSidebarLeft_1 = __importStar(require(\"../../lib/appManagers/appSidebarLeft\"));\r\nconst scrollable_new_1 = __importDefault(require(\"../scrollable_new\"));\r\nconst appDialogsManager_1 = __importDefault(require(\"../../lib/appManagers/appDialogsManager\"));\r\nconst appUsersManager_1 = __importDefault(require(\"../../lib/appManagers/appUsersManager\"));\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 const value = this.groupNameInput.value;\r\n this.nextBtn.classList.toggle('is-visible', !!value.length);\r\n });\r\n this.nextBtn.addEventListener('click', () => {\r\n const 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_1.default.selectTab(0);\r\n });\r\n });\r\n const chatsContainer = document.createElement('div');\r\n chatsContainer.classList.add('chats-container');\r\n chatsContainer.append(this.searchGroup.container);\r\n const 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 const 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 this.searchGroup.clear();\r\n }\r\n init(userIDs) {\r\n this.userIDs = userIDs;\r\n appSidebarLeft_1.default.selectTab(appSidebarLeft_1.AppSidebarLeft.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 = `${subtitle}`;\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\nexports.default = AppNewGroupTab;\r\n" - }, - { - "id": 93, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\settings.ts", - "name": "./src/components/sidebarLeft/settings.ts", - "index": 92, - "index2": 85, - "size": 3061, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "issuerId": 14, - "issuerName": "./src/lib/appManagers/appSidebarLeft.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 14, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "name": "./src/lib/appManagers/appSidebarLeft.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 1308, - "building": 1919, - "dependencies": 4 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 14, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "module": "./src/lib/appManagers/appSidebarLeft.ts", - "moduleName": "./src/lib/appManagers/appSidebarLeft.ts", - "type": "cjs require", - "userRequest": "../../components/sidebarLeft/settings", - "loc": "39:35-83" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 4, - "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(\"../misc\");\r\nconst utils_1 = require(\"../../lib/utils\");\r\nconst mtprotoworker_1 = __importDefault(require(\"../../lib/mtproto/mtprotoworker\"));\r\nconst appSidebarLeft_1 = __importStar(require(\"../../lib/appManagers/appSidebarLeft\"));\r\nconst appUsersManager_1 = __importDefault(require(\"../../lib/appManagers/appUsersManager\"));\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().finally(() => {\r\n localStorage.clear();\r\n location.reload();\r\n });\r\n });\r\n this.buttons.edit.addEventListener('click', () => {\r\n appSidebarLeft_1.default.editProfileTab.fillElements();\r\n appSidebarLeft_1.default.selectTab(appSidebarLeft_1.AppSidebarLeft.SLIDERITEMSIDS.editProfile);\r\n });\r\n this.buttons.folders.addEventListener('click', () => {\r\n appSidebarLeft_1.default.selectTab(appSidebarLeft_1.AppSidebarLeft.SLIDERITEMSIDS.chatFolders);\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\nexports.default = AppSettingsTab;\r\n" - }, - { - "id": 94, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\editProfile.ts", - "name": "./src/components/sidebarLeft/editProfile.ts", - "index": 93, - "index2": 86, - "size": 8926, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "issuerId": 14, - "issuerName": "./src/lib/appManagers/appSidebarLeft.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 14, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "name": "./src/lib/appManagers/appSidebarLeft.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 1308, - "building": 1919, - "dependencies": 4 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 14, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "module": "./src/lib/appManagers/appSidebarLeft.ts", - "moduleName": "./src/lib/appManagers/appSidebarLeft.ts", - "type": "cjs require", - "userRequest": "../../components/sidebarLeft/editProfile", - "loc": "40:38-89" - } - ], - "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 popupAvatar_1 = __importDefault(require(\"../popupAvatar\"));\r\nconst mtprotoworker_1 = __importDefault(require(\"../../lib/mtproto/mtprotoworker\"));\r\nconst appProfileManager_1 = __importDefault(require(\"../../lib/appManagers/appProfileManager\"));\r\nconst appSidebarLeft_1 = __importDefault(require(\"../../lib/appManagers/appSidebarLeft\"));\r\nconst scrollable_new_1 = __importDefault(require(\"../scrollable_new\"));\r\nconst appUsersManager_1 = __importDefault(require(\"../../lib/appManagers/appUsersManager\"));\r\nconst utils_1 = require(\"../../lib/utils\");\r\n// TODO: аватарка не поменяется в этой вкладке после изменения почему-то (если поставить в другом клиенте, и потом тут проверить, для этого ещё вышел в чатлист)\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_1.default.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\nexports.default = AppEditProfileTab;\r\n" - }, - { - "id": 95, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\chatFolders.ts", - "name": "./src/components/sidebarLeft/chatFolders.ts", - "index": 94, - "index2": 87, - "size": 8187, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "issuerId": 14, - "issuerName": "./src/lib/appManagers/appSidebarLeft.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 14, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "name": "./src/lib/appManagers/appSidebarLeft.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 1308, - "building": 1919, - "dependencies": 4 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 14, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "module": "./src/lib/appManagers/appSidebarLeft.ts", - "moduleName": "./src/lib/appManagers/appSidebarLeft.ts", - "type": "cjs require", - "userRequest": "../../components/sidebarLeft/chatFolders", - "loc": "41:38-89" - } - ], - "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 lottieLoader_1 = __importDefault(require(\"../../lib/lottieLoader\"));\r\nconst mtprotoworker_1 = __importDefault(require(\"../../lib/mtproto/mtprotoworker\"));\r\nconst appMessagesManager_1 = __importDefault(require(\"../../lib/appManagers/appMessagesManager\"));\r\nconst richtextprocessor_1 = require(\"../../lib/richtextprocessor\");\r\nconst appPeersManager_1 = __importDefault(require(\"../../lib/appManagers/appPeersManager\"));\r\nconst utils_1 = require(\"../../lib/utils\");\r\nconst appSidebarLeft_1 = __importDefault(require(\"../../lib/appManagers/appSidebarLeft\"));\r\nconst ripple_1 = require(\"../ripple\");\r\nconst toast_1 = require(\"../toast\");\r\nclass AppChatFoldersTab {\r\n constructor() {\r\n this.filtersRendered = {};\r\n }\r\n renderFolder(dialogFilter, container, div = document.createElement('div')) {\r\n let filter;\r\n let description = '';\r\n let d = [];\r\n if (dialogFilter._ == 'dialogFilterSuggested') {\r\n filter = dialogFilter.filter;\r\n description = dialogFilter.description;\r\n }\r\n else {\r\n filter = dialogFilter;\r\n description = '';\r\n const filterID = filter.id;\r\n if (!this.filtersRendered.hasOwnProperty(filter.id)) {\r\n div.addEventListener('click', () => {\r\n appSidebarLeft_1.default.editFolderTab.open(appMessagesManager_1.default.filtersStorage.filters[filterID]);\r\n });\r\n }\r\n this.filtersRendered[filter.id] = div;\r\n let enabledFilters = Object.keys(filter.pFlags).length;\r\n /* (['include_peers', 'exclude_peers'] as ['include_peers', 'exclude_peers']).forEach(key => {\r\n enabledFilters += +!!filter[key].length;\r\n }); */\r\n if (enabledFilters == 1) {\r\n description = 'All ';\r\n const pFlags = filter.pFlags;\r\n if (pFlags.contacts)\r\n description += 'Contacts';\r\n else if (pFlags.non_contacts)\r\n description += 'Non-Contacts';\r\n else if (pFlags.groups)\r\n description += 'Groups';\r\n else if (pFlags.broadcasts)\r\n description += 'Channels';\r\n else if (pFlags.bots)\r\n description += 'Bots';\r\n else if (pFlags.exclude_muted)\r\n description += 'Unmuted';\r\n else if (pFlags.exclude_read)\r\n description += 'Unread';\r\n else if (pFlags.exclude_archived)\r\n description += 'Unarchived';\r\n d.push(description);\r\n }\r\n else {\r\n const folder = appMessagesManager_1.default.dialogsStorage.getFolder(filter.id);\r\n let chats = 0, channels = 0, groups = 0;\r\n for (const dialog of folder) {\r\n if (appPeersManager_1.default.isAnyGroup(dialog.peerID))\r\n groups++;\r\n else if (appPeersManager_1.default.isBroadcast(dialog.peerID))\r\n channels++;\r\n else\r\n chats++;\r\n }\r\n if (chats)\r\n d.push(chats + ' chats');\r\n if (channels)\r\n d.push(channels + ' channels');\r\n if (groups)\r\n d.push(groups + ' groups');\r\n }\r\n }\r\n div.classList.add('category', 'rp-square');\r\n div.innerHTML = `\r\n
\r\n

${richtextprocessor_1.RichTextProcessor.wrapEmojiText(filter.title)}

\r\n

${d.length ? d.join(', ') : description}

\r\n
\r\n `;\r\n ripple_1.ripple(div);\r\n if (container)\r\n container.append(div);\r\n return div;\r\n }\r\n init() {\r\n this.container = document.querySelector('.chat-folders-container');\r\n this.stickerContainer = this.container.querySelector('.sticker-container');\r\n this.foldersContainer = this.container.querySelector('.folders-my');\r\n this.suggestedContainer = this.container.querySelector('.folders-suggested');\r\n this.createFolderBtn = this.container.querySelector('.btn-create-folder');\r\n this.createFolderBtn.addEventListener('click', () => {\r\n if (Object.keys(this.filtersRendered).length >= 10) {\r\n toast_1.toast('Sorry, you can\\'t create more folders.');\r\n }\r\n else {\r\n appSidebarLeft_1.default.editFolderTab.open();\r\n }\r\n });\r\n lottieLoader_1.default.loadAnimationFromURL({\r\n container: this.stickerContainer,\r\n loop: false,\r\n autoplay: true,\r\n width: 86,\r\n height: 86\r\n }, 'assets/img/Folders_1.tgs').then(player => {\r\n this.animation = player;\r\n });\r\n appMessagesManager_1.default.filtersStorage.getDialogFilters().then(filters => {\r\n for (const filterID in filters) {\r\n const filter = filters[filterID];\r\n this.renderFolder(filter, this.foldersContainer);\r\n }\r\n });\r\n utils_1.$rootScope.$on('filter_update', (e) => {\r\n const filter = e.detail;\r\n if (this.filtersRendered.hasOwnProperty(filter.id)) {\r\n this.renderFolder(filter, null, this.filtersRendered[filter.id]);\r\n }\r\n else {\r\n this.renderFolder(filter, this.foldersContainer);\r\n }\r\n this.getSuggestedFilters();\r\n });\r\n utils_1.$rootScope.$on('filter_delete', (e) => {\r\n const filter = e.detail;\r\n if (this.filtersRendered.hasOwnProperty(filter.id)) {\r\n /* for(const suggested of this.suggestedFilters) {\r\n if(deepEqual(suggested.filter, filter)) {\r\n \r\n }\r\n } */\r\n this.getSuggestedFilters();\r\n this.filtersRendered[filter.id].remove();\r\n delete this.filtersRendered[filter.id];\r\n }\r\n });\r\n this.getSuggestedFilters();\r\n }\r\n getSuggestedFilters() {\r\n mtprotoworker_1.default.invokeApi('messages.getSuggestedDialogFilters').then(suggestedFilters => {\r\n this.suggestedContainer.style.display = suggestedFilters.length ? '' : 'none';\r\n Array.from(this.suggestedContainer.children).slice(1).forEach(el => el.remove());\r\n suggestedFilters.forEach(filter => {\r\n const div = this.renderFolder(filter);\r\n const button = document.createElement('button');\r\n button.classList.add('btn-primary');\r\n button.innerText = 'Add';\r\n div.append(button);\r\n this.suggestedContainer.append(div);\r\n button.addEventListener('click', (e) => {\r\n utils_1.cancelEvent(e);\r\n if (Object.keys(this.filtersRendered).length >= 10) {\r\n toast_1.toast('Sorry, you can\\'t create more folders.');\r\n return;\r\n }\r\n button.setAttribute('disabled', 'true');\r\n appMessagesManager_1.default.filtersStorage.createDialogFilter(filter.filter).then(bool => {\r\n if (bool) {\r\n div.remove();\r\n }\r\n }).finally(() => {\r\n button.removeAttribute('disabled');\r\n });\r\n });\r\n });\r\n });\r\n }\r\n onOpen() {\r\n if (this.init) {\r\n this.init();\r\n this.init = null;\r\n }\r\n else {\r\n if (this.animation) {\r\n this.animation.restart();\r\n }\r\n }\r\n }\r\n}\r\nexports.default = AppChatFoldersTab;\r\n" - }, - { - "id": 96, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\editFolder.ts", - "name": "./src/components/sidebarLeft/editFolder.ts", - "index": 95, - "index2": 88, - "size": 10311, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "issuerId": 14, - "issuerName": "./src/lib/appManagers/appSidebarLeft.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 14, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "name": "./src/lib/appManagers/appSidebarLeft.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 1308, - "building": 1919, - "dependencies": 4 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 14, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "module": "./src/lib/appManagers/appSidebarLeft.ts", - "moduleName": "./src/lib/appManagers/appSidebarLeft.ts", - "type": "cjs require", - "userRequest": "../../components/sidebarLeft/editFolder", - "loc": "42:37-87" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 4, - "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 appSidebarLeft_1 = __importStar(require(\"../../lib/appManagers/appSidebarLeft\"));\r\nconst lottieLoader_1 = __importDefault(require(\"../../lib/lottieLoader\"));\r\nconst appMessagesManager_1 = __importDefault(require(\"../../lib/appManagers/appMessagesManager\"));\r\nconst misc_1 = require(\"../misc\");\r\nconst appDialogsManager_1 = __importDefault(require(\"../../lib/appManagers/appDialogsManager\"));\r\nconst utils_1 = require(\"../../lib/utils\");\r\nconst toast_1 = require(\"../toast\");\r\nconst ripple_1 = require(\"../ripple\");\r\nconst MAX_FOLDER_NAME_LENGTH = 12;\r\nclass AppEditFolderTab {\r\n constructor() {\r\n this.flags = {};\r\n }\r\n init() {\r\n this.container = document.querySelector('.edit-folder-container');\r\n this.closeBtn = this.container.querySelector('.sidebar-close-button');\r\n this.title = this.container.querySelector('.sidebar-header__title');\r\n this.caption = this.container.querySelector('.caption');\r\n this.stickerContainer = this.container.querySelector('.sticker-container');\r\n this.confirmBtn = this.container.querySelector('.btn-confirm');\r\n this.menuBtn = this.container.querySelector('.btn-menu-toggle');\r\n this.deleteFolderBtn = this.menuBtn.querySelector('.menu-delete');\r\n this.nameInput = this.container.querySelector('#folder-name');\r\n this.include_peers = this.container.querySelector('.folder-list-included');\r\n this.exclude_peers = this.container.querySelector('.folder-list-excluded');\r\n const includedFlagsContainer = this.include_peers.querySelector('.folder-categories');\r\n const excludedFlagsContainer = this.exclude_peers.querySelector('.folder-categories');\r\n misc_1.parseMenuButtonsTo(this.flags, includedFlagsContainer.children);\r\n misc_1.parseMenuButtonsTo(this.flags, excludedFlagsContainer.children);\r\n includedFlagsContainer.firstElementChild.addEventListener('click', () => {\r\n appSidebarLeft_1.default.includedChatsTab.open(this.filter, 'included');\r\n });\r\n excludedFlagsContainer.firstElementChild.addEventListener('click', () => {\r\n appSidebarLeft_1.default.includedChatsTab.open(this.filter, 'excluded');\r\n });\r\n lottieLoader_1.default.loadAnimationFromURL({\r\n container: this.stickerContainer,\r\n loop: true,\r\n autoplay: true,\r\n width: 86,\r\n height: 86\r\n }, 'assets/img/Folders_2.tgs').then(player => {\r\n this.animation = player;\r\n });\r\n this.deleteFolderBtn.addEventListener('click', () => {\r\n this.deleteFolderBtn.setAttribute('disabled', 'true');\r\n appMessagesManager_1.default.filtersStorage.updateDialogFilter(this.filter, true).then(bool => {\r\n if (bool) {\r\n this.closeBtn.click();\r\n }\r\n }).finally(() => {\r\n this.deleteFolderBtn.removeAttribute('disabled');\r\n });\r\n });\r\n this.confirmBtn.addEventListener('click', () => {\r\n if (!this.nameInput.value.trim()) {\r\n this.nameInput.classList.add('error');\r\n return;\r\n }\r\n let include = Array.from(includedFlagsContainer.children).slice(1).reduce((acc, el) => acc + +!el.style.display, 0);\r\n if (this.include_peers.lastElementChild.tagName == 'UL') {\r\n include += this.include_peers.lastElementChild.childElementCount;\r\n }\r\n if (!include) {\r\n toast_1.toast('Please choose at least one chat for this folder.');\r\n return;\r\n }\r\n this.confirmBtn.setAttribute('disabled', 'true');\r\n let promise;\r\n if (!this.filter.id) {\r\n promise = appMessagesManager_1.default.filtersStorage.createDialogFilter(this.filter);\r\n }\r\n else {\r\n promise = appMessagesManager_1.default.filtersStorage.updateDialogFilter(this.filter);\r\n }\r\n promise.then(bool => {\r\n if (bool) {\r\n this.closeBtn.click();\r\n }\r\n }).catch(err => {\r\n if (err.type == 'DIALOG_FILTERS_TOO_MUCH') {\r\n toast_1.toast('Sorry, you can\\'t create more folders.');\r\n }\r\n else {\r\n console.error('updateDialogFilter error:', err);\r\n }\r\n }).finally(() => {\r\n this.confirmBtn.removeAttribute('disabled');\r\n });\r\n });\r\n this.nameInput.addEventListener('input', () => {\r\n if (this.nameInput.value.length > MAX_FOLDER_NAME_LENGTH) {\r\n this.nameInput.value = this.nameInput.value.slice(0, MAX_FOLDER_NAME_LENGTH);\r\n return;\r\n }\r\n this.filter.title = this.nameInput.value;\r\n this.nameInput.classList.remove('error');\r\n this.editCheckForChange();\r\n });\r\n }\r\n onOpen() {\r\n if (this.init) {\r\n this.init();\r\n this.init = null;\r\n }\r\n else {\r\n if (this.animation) {\r\n this.animation.restart();\r\n }\r\n }\r\n }\r\n onCloseAfterTimeout() {\r\n Array.from(this.container.querySelectorAll('ul, .show-more')).forEach(el => el.remove());\r\n }\r\n onCreateOpen() {\r\n this.caption.style.display = '';\r\n this.title.innerText = 'New Folder';\r\n this.menuBtn.classList.add('hide');\r\n this.confirmBtn.classList.remove('hide');\r\n this.nameInput.value = '';\r\n for (const flag in this.flags) {\r\n // @ts-ignore\r\n this.flags[flag].style.display = 'none';\r\n }\r\n }\r\n onEditOpen() {\r\n this.caption.style.display = 'none';\r\n this.title.innerText = this.type == 'create' ? 'New Folder' : 'Edit Folder';\r\n if (this.type == 'edit') {\r\n this.menuBtn.classList.remove('hide');\r\n this.confirmBtn.classList.add('hide');\r\n }\r\n const filter = this.filter;\r\n this.nameInput.value = filter.title;\r\n for (const flag in this.flags) {\r\n // @ts-ignore\r\n this.flags[flag].style.display = !!filter.pFlags[flag] ? '' : 'none';\r\n }\r\n ['include_peers', 'exclude_peers'].forEach(key => {\r\n const container = this[key];\r\n const ul = document.createElement('ul');\r\n const peers = filter[key].slice();\r\n const renderMore = (_length) => {\r\n for (let i = 0, length = Math.min(peers.length, _length); i < length; ++i) {\r\n const peerID = peers.shift();\r\n const { dom } = appDialogsManager_1.default.addDialog(peerID, ul, false, false, undefined, true);\r\n dom.lastMessageSpan.parentElement.remove();\r\n }\r\n if (peers.length) {\r\n showMore.innerHTML = `
Show ${Math.min(20, peers.length)} more chat${peers.length > 1 ? 's' : ''}
`;\r\n }\r\n else if (showMore) {\r\n showMore.remove();\r\n }\r\n };\r\n container.append(ul);\r\n let showMore;\r\n if (peers.length) {\r\n showMore = document.createElement('div');\r\n showMore.classList.add('show-more');\r\n showMore.addEventListener('click', () => renderMore(20));\r\n showMore.innerHTML = `
Show ${Math.min(20, peers.length)} more chat${peers.length > 1 ? 's' : ''}
`;\r\n ripple_1.ripple(showMore);\r\n container.append(showMore);\r\n }\r\n renderMore(4);\r\n });\r\n }\r\n editCheckForChange() {\r\n if (this.type == 'edit') {\r\n const changed = !utils_1.deepEqual(this.originalFilter, this.filter);\r\n this.confirmBtn.classList.toggle('hide', !changed);\r\n this.menuBtn.classList.toggle('hide', changed);\r\n }\r\n }\r\n ;\r\n setFilter(filter, firstTime) {\r\n // cleanup\r\n this.onCloseAfterTimeout();\r\n if (firstTime) {\r\n this.originalFilter = filter;\r\n this.filter = utils_1.copy(filter);\r\n }\r\n else {\r\n this.filter = filter;\r\n this.onEditOpen();\r\n this.editCheckForChange();\r\n }\r\n }\r\n open(filter) {\r\n appSidebarLeft_1.default.selectTab(appSidebarLeft_1.AppSidebarLeft.SLIDERITEMSIDS.editFolder);\r\n if (filter === undefined) {\r\n this.setFilter({\r\n _: 'dialogFilter',\r\n flags: 0,\r\n id: 0,\r\n title: '',\r\n pFlags: {},\r\n pinned_peers: [],\r\n include_peers: [],\r\n exclude_peers: []\r\n }, true);\r\n this.type = 'create';\r\n this.onCreateOpen();\r\n }\r\n else {\r\n this.setFilter(filter, true);\r\n this.type = 'edit';\r\n this.onEditOpen();\r\n }\r\n }\r\n}\r\nexports.default = AppEditFolderTab;\r\n" - }, - { - "id": 97, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\includedChats.ts", - "name": "./src/components/sidebarLeft/includedChats.ts", - "index": 96, - "index2": 89, - "size": 8766, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "issuerId": 14, - "issuerName": "./src/lib/appManagers/appSidebarLeft.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 14, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "name": "./src/lib/appManagers/appSidebarLeft.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 1308, - "building": 1919, - "dependencies": 4 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 14, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "module": "./src/lib/appManagers/appSidebarLeft.ts", - "moduleName": "./src/lib/appManagers/appSidebarLeft.ts", - "type": "cjs require", - "userRequest": "../../components/sidebarLeft/includedChats", - "loc": "43:40-93" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 4, - "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 appSelectPeers_1 = require(\"../appSelectPeers\");\r\nconst appSidebarLeft_1 = __importStar(require(\"../../lib/appManagers/appSidebarLeft\"));\r\nconst appDialogsManager_1 = __importDefault(require(\"../../lib/appManagers/appDialogsManager\"));\r\nconst appPeersManager_1 = __importDefault(require(\"../../lib/appManagers/appPeersManager\"));\r\nconst appUsersManager_1 = __importDefault(require(\"../../lib/appManagers/appUsersManager\"));\r\nconst utils_1 = require(\"../../lib/utils\");\r\nclass AppIncludedChatsTab {\r\n constructor() {\r\n this.renderResults = (peerIDs) => {\r\n const other = this.type == 'included' ? this.filter.exclude_peers : this.filter.include_peers;\r\n peerIDs.forEach(peerID => {\r\n if (other.includes(peerID))\r\n return;\r\n const { dom } = appDialogsManager_1.default.addDialog(peerID, this.selector.scrollable, false, false);\r\n const selected = this.selector.selected.has(peerID);\r\n dom.containerEl.insertAdjacentHTML('beforeend', this.checkbox(selected));\r\n if (selected)\r\n dom.listEl.classList.add('active');\r\n let subtitle = '';\r\n if (peerID > 0) {\r\n if (peerID == utils_1.$rootScope.myID) {\r\n subtitle = 'Chat with yourself';\r\n }\r\n else if (appUsersManager_1.default.isBot(peerID)) {\r\n subtitle = 'Bot';\r\n }\r\n else {\r\n subtitle = appUsersManager_1.default.contactsList.has(peerID) ? 'Contact' : 'Non-Contact';\r\n }\r\n }\r\n else {\r\n subtitle = appPeersManager_1.default.isBroadcast(peerID) ? 'Channel' : 'Group';\r\n }\r\n dom.lastMessageSpan.innerHTML = subtitle;\r\n });\r\n };\r\n this.onSelectChange = (length) => {\r\n //const changed = !deepEqual(this.filter, this.originalFilter);\r\n if (this.type == 'included') {\r\n this.confirmBtn.style.display = length ? '' : 'none';\r\n }\r\n };\r\n }\r\n init() {\r\n this.container = document.querySelector('.included-chats-container');\r\n this.closeBtn = this.container.querySelector('.sidebar-close-button');\r\n this.confirmBtn = this.container.querySelector('.btn-confirm');\r\n this.title = this.container.querySelector('.sidebar-header__title');\r\n this.confirmBtn.addEventListener('click', () => {\r\n const selected = this.selector.getSelected();\r\n //this.filter.pFlags = {};\r\n if (this.type == 'included') {\r\n for (const key in this.filter.pFlags) {\r\n if (key.indexOf('exclude_') === 0) {\r\n continue;\r\n }\r\n // @ts-ignore\r\n delete this.filter.pFlags[key];\r\n }\r\n }\r\n else {\r\n for (const key in this.filter.pFlags) {\r\n if (key.indexOf('exclude_') !== 0) {\r\n continue;\r\n }\r\n // @ts-ignore\r\n delete this.filter.pFlags[key];\r\n }\r\n }\r\n const peers = [];\r\n for (const key of selected) {\r\n if (typeof (key) === 'number') {\r\n peers.push(key);\r\n }\r\n else {\r\n // @ts-ignore\r\n this.filter.pFlags[key] = true;\r\n }\r\n }\r\n this.filter[this.type == 'included' ? 'include_peers' : 'exclude_peers'] = peers;\r\n appSidebarLeft_1.default.editFolderTab.setFilter(this.filter, false);\r\n this.closeBtn.click();\r\n });\r\n }\r\n checkbox(selected) {\r\n return `
`;\r\n }\r\n onOpen() {\r\n if (this.init) {\r\n this.init();\r\n this.init = null;\r\n }\r\n this.confirmBtn.style.display = this.type == 'excluded' ? '' : 'none';\r\n this.title.innerText = this.type == 'included' ? 'Included Chats' : 'Excluded Chats';\r\n const filter = this.filter;\r\n const fragment = document.createDocumentFragment();\r\n const dd = document.createElement('div');\r\n dd.classList.add('sidebar-left-h2');\r\n dd.innerText = 'Chat types';\r\n const categories = document.createElement('div');\r\n categories.classList.add('folder-categories');\r\n let details;\r\n if (this.type == 'excluded') {\r\n details = {\r\n exclude_muted: { ico: 'tgico-mute', text: 'Muted' },\r\n exclude_archived: { ico: 'tgico-archive', text: 'Archived' },\r\n exclude_read: { ico: 'tgico-readchats', text: 'Read' }\r\n };\r\n }\r\n else {\r\n details = {\r\n contacts: { ico: 'tgico-newprivate', text: 'Contacts' },\r\n non_contacts: { ico: 'tgico-noncontacts', text: 'Non-Contacts' },\r\n groups: { ico: 'tgico-group', text: 'Groups' },\r\n broadcasts: { ico: 'tgico-newchannel', text: 'Channels' },\r\n bots: { ico: 'tgico-bots', text: 'Bots' }\r\n };\r\n }\r\n let html = '';\r\n for (const key in details) {\r\n html += `

${details[key].text}

${this.checkbox()}
`;\r\n }\r\n categories.innerHTML = html;\r\n const hr = document.createElement('hr');\r\n hr.style.margin = '7px 0 9px';\r\n const d = document.createElement('div');\r\n d.classList.add('sidebar-left-h2');\r\n d.innerText = 'Chats';\r\n fragment.append(dd, categories, hr, d);\r\n /////////////////\r\n const selectedPeers = (this.type == 'included' ? filter.include_peers : filter.exclude_peers).slice();\r\n this.selector = new appSelectPeers_1.AppSelectPeers(this.container, this.onSelectChange, ['dialogs'], null, this.renderResults);\r\n this.selector.selected = new Set(selectedPeers);\r\n this.selector.input.placeholder = 'Search';\r\n const _add = this.selector.add.bind(this.selector);\r\n this.selector.add = (peerID, title) => {\r\n var _a;\r\n const div = _add(peerID, (_a = details[peerID]) === null || _a === void 0 ? void 0 : _a.text);\r\n if (details[peerID]) {\r\n div.querySelector('avatar-element').classList.add(details[peerID].ico);\r\n }\r\n return div;\r\n };\r\n this.selector.list.parentElement.insertBefore(fragment, this.selector.list);\r\n selectedPeers.forEach(peerID => {\r\n this.selector.add(peerID);\r\n });\r\n for (const flag in filter.pFlags) {\r\n // @ts-ignore\r\n if (details.hasOwnProperty(flag) && !!filter.pFlags[flag]) {\r\n categories.querySelector(`[data-peerID=\"${flag}\"]`).click();\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 open(filter, type) {\r\n this.originalFilter = filter;\r\n this.filter = utils_1.copy(this.originalFilter);\r\n this.type = type;\r\n appSidebarLeft_1.default.selectTab(appSidebarLeft_1.AppSidebarLeft.SLIDERITEMSIDS.includedChats);\r\n }\r\n}\r\nexports.default = AppIncludedChatsTab;\r\n" - }, - { - "id": 98, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\input.ts", - "name": "./src/components/chat/input.ts", - "index": 97, - "index2": 98, - "size": 33710, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "../../components/chat/input", - "loc": "25:16-54" - } - ], - "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.ChatInput = void 0;\r\nconst scrollable_new_1 = __importDefault(require(\"../scrollable_new\"));\r\nconst richtextprocessor_1 = require(\"../../lib/richtextprocessor\");\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 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\nconst config_1 = require(\"../../lib/config\");\r\nconst appDocsManager_1 = __importDefault(require(\"../../lib/appManagers/appDocsManager\"));\r\nconst emoticonsDropdown_1 = __importDefault(require(\"../emoticonsDropdown\"));\r\nconst popupCreatePoll_1 = __importDefault(require(\"../popupCreatePoll\"));\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.lastUrl = '';\r\n this.lastTimeType = 0;\r\n this.inputContainer = this.btnSend.parentElement.parentElement;\r\n this.chatInput = this.inputContainer.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.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.scrollTop = 0;\r\n this.scrollOffsetTop = 0;\r\n this.scrollDiff = 0;\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 try {\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 reuseWorker: true\r\n });\r\n }\r\n catch (err) {\r\n this.btnSend.classList.remove('tgico-microphone2');\r\n this.btnSend.classList.add('tgico-send');\r\n console.error('Recorder constructor error:', err);\r\n }\r\n this.messageInput.addEventListener('keydown', (e) => {\r\n if (e.key == 'Enter' && !config_1.touchSupport) {\r\n /* if(e.ctrlKey || e.metaKey) {\r\n this.messageInput.innerHTML += '
';\r\n placeCaretAtEnd(this.message)\r\n return;\r\n } */\r\n if (e.shiftKey || e.ctrlKey || e.metaKey) {\r\n return;\r\n }\r\n this.sendMessage();\r\n }\r\n });\r\n if (config_1.touchSupport) {\r\n this.messageInput.addEventListener('touchend', (e) => {\r\n this.saveScroll();\r\n emoticonsDropdown_1.default.toggle(false);\r\n });\r\n window.addEventListener('resize', () => {\r\n this.restoreScroll();\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 if (this.recorder) {\r\n this.btnSend.classList.remove('tgico-send');\r\n this.btnSend.classList.add('tgico-microphone2');\r\n }\r\n appMessagesManager_1.default.setTyping('sendMessageCancelAction');\r\n }\r\n else if (!this.btnSend.classList.contains('tgico-send') || !this.recorder) {\r\n if (this.recorder) {\r\n this.btnSend.classList.add('tgico-send');\r\n this.btnSend.classList.remove('tgico-microphone2');\r\n }\r\n let time = Date.now();\r\n if (time - this.lastTimeType >= 6000) {\r\n this.lastTimeType = time;\r\n appMessagesManager_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.muted = true;\r\n video.setAttribute('playsinline', '');\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 const isPhoto = file.type.indexOf('image/') !== -1;\r\n params.objectURL = URL.createObjectURL(file);\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: isPhoto ? 'photo' : 'doc',\r\n url: params.objectURL\r\n }, false, true);\r\n const finish = () => {\r\n itemDiv.append(docDiv);\r\n resolve(itemDiv);\r\n };\r\n if (isPhoto) {\r\n let img = new Image();\r\n img.src = params.objectURL;\r\n img.onload = () => {\r\n params.width = img.naturalWidth;\r\n params.height = img.naturalHeight;\r\n finish();\r\n };\r\n img.onerror = finish;\r\n }\r\n else {\r\n finish();\r\n }\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 this.fileInput.setAttribute('accept', 'image/*, video/*');\r\n willAttach.type = 'media';\r\n this.fileInput.click();\r\n });\r\n this.attachMenu.document.addEventListener('click', () => {\r\n this.fileInput.removeAttribute('accept');\r\n willAttach.type = 'document';\r\n this.fileInput.click();\r\n });\r\n this.attachMenu.poll.addEventListener('click', () => {\r\n new popupCreatePoll_1.default().show();\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 isMedia: params.file.type.includes('audio/') || 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 const onBtnSendClick = (e) => {\r\n utils_1.cancelEvent(e);\r\n if (this.btnSend.classList.contains('tgico-send') || !this.recorder) {\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.chatInput.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.btnSend.addEventListener('touchend', onBtnSendClick);\r\n this.btnSend.addEventListener('click', onBtnSendClick);\r\n if (this.recorder) {\r\n const onCancelRecordClick = (e) => {\r\n utils_1.cancelEvent(e);\r\n this.recordCanceled = true;\r\n this.recorder.stop();\r\n opusDecodeController_1.default.setKeepAlive(false);\r\n };\r\n this.btnCancelRecord.addEventListener('touchend', onCancelRecordClick);\r\n this.btnCancelRecord.addEventListener('click', onCancelRecordClick);\r\n this.recorder.onstop = () => {\r\n this.recording = false;\r\n this.chatInput.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 replyToMsgID: this.replyToMsgID\r\n });\r\n this.onMessageSent(false, true);\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 }\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 if (this.recorder) {\r\n this.btnSend.classList.remove('tgico-send');\r\n this.btnSend.classList.add('tgico-microphone2');\r\n }\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, clearReply) {\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.noWebPage = false;\r\n this.willSendWebPage = null;\r\n this.messageInput.innerText = '';\r\n if (this.recorder) {\r\n this.btnSend.classList.remove('tgico-send');\r\n this.btnSend.classList.add('tgico-microphone2');\r\n }\r\n }\r\n if (clearReply || clearInput) {\r\n this.replyToMsgID = 0;\r\n this.replyElements.container.classList.remove('active');\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 sendMessageWithDocument(document) {\r\n document = appDocsManager_1.default.getDoc(document);\r\n if (document && document._ != 'documentEmpty') {\r\n appMessagesManager_1.default.sendFile(appImManager_1.default.peerID, document, { isMedia: true, replyToMsgID: this.replyToMsgID });\r\n this.onMessageSent(false, true);\r\n if (document.type == 'sticker') {\r\n emoticonsDropdown_1.default.stickersTab.pushRecentSticker(document);\r\n }\r\n return true;\r\n }\r\n return false;\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 saveScroll() {\r\n this.scrollTop = appImManager_1.default.scrollable.container.scrollTop;\r\n this.scrollOffsetTop = this.chatInput.offsetTop;\r\n }\r\n restoreScroll() {\r\n if (this.chatInput.style.display)\r\n return;\r\n //console.log('input resize', offsetTop, this.chatInput.offsetTop);\r\n let newOffsetTop = this.chatInput.offsetTop;\r\n let container = appImManager_1.default.scrollable.container;\r\n let scrollTop = container.scrollTop;\r\n let clientHeight = container.clientHeight;\r\n let maxScrollTop = container.scrollHeight;\r\n if (newOffsetTop < this.scrollOffsetTop) {\r\n this.scrollDiff = this.scrollOffsetTop - newOffsetTop;\r\n container.scrollTop += this.scrollDiff;\r\n }\r\n else if (scrollTop != this.scrollTop) {\r\n let endDiff = maxScrollTop - (scrollTop + clientHeight);\r\n if (endDiff < this.scrollDiff /* && false */) {\r\n //container.scrollTop -= endDiff;\r\n }\r\n else {\r\n container.scrollTop -= this.scrollDiff;\r\n }\r\n }\r\n }\r\n}\r\nexports.ChatInput = ChatInput;\r\n" - }, - { - "id": 99, - "identifier": "F:\\tweb\\public\\recorder.min.js", - "name": "./public/recorder.min.js", - "index": 98, - "index2": 91, - "size": 6805, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\input.ts", - "issuerId": 98, - "issuerName": "./src/components/chat/input.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 98, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\input.ts", - "name": "./src/components/chat/input.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 2199, - "building": 778, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 98, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\input.ts", - "module": "./src/components/chat/input.ts", - "moduleName": "./src/components/chat/input.ts", - "type": "cjs require", - "userRequest": "../../../public/recorder.min", - "loc": "16:39-78" - } - ], - "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{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,this.initWorker().then(()=>this.initSourceNode(e)).then(e=>{this.sourceNode=e,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": 100, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\gifs.ts", - "name": "./src/components/emoticonsDropdown/tabs/gifs.ts", - "index": 100, - "index2": 92, - "size": 1783, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\index.ts", - "issuerId": 47, - "issuerName": "./src/components/emoticonsDropdown/index.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 98, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\input.ts", - "name": "./src/components/chat/input.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - }, - { - "id": 47, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\index.ts", - "name": "./src/components/emoticonsDropdown/index.ts", - "profile": { - "factory": 2199, - "building": 778, - "dependencies": 1 - } - } - ], - "profile": { - "factory": 120, - "building": 1077, - "dependencies": 2 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 47, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\index.ts", - "module": "./src/components/emoticonsDropdown/index.ts", - "moduleName": "./src/components/emoticonsDropdown/index.ts", - "type": "cjs require", - "userRequest": "./tabs/gifs", - "loc": "17:31-53" - } - ], - "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 __1 = require(\"..\");\r\nconst gifsMasonry_1 = __importDefault(require(\"../../gifsMasonry\"));\r\nconst scrollable_new_1 = __importDefault(require(\"../../scrollable_new\"));\r\nconst misc_1 = require(\"../../misc\");\r\nconst mtprotoworker_1 = __importDefault(require(\"../../../lib/mtproto/mtprotoworker\"));\r\nconst appDocsManager_1 = __importDefault(require(\"../../../lib/appManagers/appDocsManager\"));\r\nclass GifsTab {\r\n init() {\r\n this.content = document.getElementById('content-gifs');\r\n const gifsContainer = this.content.firstElementChild;\r\n gifsContainer.addEventListener('click', __1.EmoticonsDropdown.onMediaClick);\r\n const scroll = new scrollable_new_1.default(this.content, 'y', 'GIFS', null);\r\n const masonry = new gifsMasonry_1.default(gifsContainer, __1.EMOTICONSSTICKERGROUP, scroll);\r\n const preloader = misc_1.putPreloader(this.content, true);\r\n mtprotoworker_1.default.invokeApi('messages.getSavedGifs', { hash: 0 }).then((res) => {\r\n //console.log('getSavedGifs res:', res);\r\n if (res._ == 'messages.savedGifs') {\r\n res.gifs.forEach((doc, idx) => {\r\n res.gifs[idx] = doc = appDocsManager_1.default.saveDoc(doc);\r\n //if(doc._ == 'documentEmpty') return;\r\n //masonry.add(doc as MyDocument);\r\n });\r\n }\r\n //let line: MTDocument[] = [];\r\n preloader.remove();\r\n });\r\n this.init = null;\r\n }\r\n onClose() {\r\n }\r\n}\r\nexports.default = GifsTab;\r\n" - }, - { - "id": 101, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\emoji.ts", - "name": "./src/components/emoticonsDropdown/tabs/emoji.ts", - "index": 101, - "index2": 93, - "size": 7695, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\index.ts", - "issuerId": 47, - "issuerName": "./src/components/emoticonsDropdown/index.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 98, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\input.ts", - "name": "./src/components/chat/input.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - }, - { - "id": 47, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\index.ts", - "name": "./src/components/emoticonsDropdown/index.ts", - "profile": { - "factory": 2199, - "building": 778, - "dependencies": 1 - } - } - ], - "profile": { - "factory": 120, - "building": 1077, - "dependencies": 2 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 47, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\index.ts", - "module": "./src/components/emoticonsDropdown/index.ts", - "moduleName": "./src/components/emoticonsDropdown/index.ts", - "type": "cjs require", - "userRequest": "./tabs/emoji", - "loc": "24:32-55" - } - ], - "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 __1 = require(\"..\");\r\nconst scrollable_new_1 = __importDefault(require(\"../../scrollable_new\"));\r\nconst config_1 = __importDefault(require(\"../../../lib/config\"));\r\nconst misc_1 = require(\"../../misc\");\r\nconst appStateManager_1 = __importDefault(require(\"../../../lib/appManagers/appStateManager\"));\r\nconst richtextprocessor_1 = require(\"../../../lib/richtextprocessor\");\r\nconst appImManager_1 = __importDefault(require(\"../../../lib/appManagers/appImManager\"));\r\nclass EmojiTab {\r\n constructor() {\r\n this.recent = [];\r\n this.onContentClick = (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 appImManager_1.default.chatInputC.messageInput.innerHTML += target.outerHTML;\r\n // Recent\r\n const emoji = this.getEmojiFromElement(target);\r\n Array.from(this.recentItemsDiv.children).forEach((el, idx) => {\r\n const _emoji = this.getEmojiFromElement(el);\r\n if (emoji == _emoji) {\r\n el.remove();\r\n }\r\n });\r\n const scrollHeight = this.recentItemsDiv.scrollHeight;\r\n this.appendEmoji(emoji, this.recentItemsDiv, true);\r\n this.recent.findAndSplice(e => e == emoji);\r\n this.recent.unshift(emoji);\r\n if (this.recent.length > 36) {\r\n this.recent.length = 36;\r\n }\r\n appStateManager_1.default.pushToState('recentEmoji', this.recent);\r\n // Append to input\r\n const event = new Event('input', { bubbles: true, cancelable: true });\r\n appImManager_1.default.chatInputC.messageInput.dispatchEvent(event);\r\n };\r\n }\r\n init() {\r\n this.content = document.getElementById('content-emoji');\r\n const categories = [\"Smileys & Emotion\", \"Animals & Nature\", \"Food & Drink\", \"Travel & Places\", \"Activities\", \"Objects\", /* \"Symbols\", */ \"Flags\", \"Skin Tones\"];\r\n const divs = {};\r\n const sorted = {\r\n 'Recent': []\r\n };\r\n for (const emoji in config_1.default.Emoji) {\r\n const details = config_1.default.Emoji[emoji];\r\n const i = '' + details;\r\n const 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 (const category in sorted) {\r\n const div = document.createElement('div');\r\n div.classList.add('emoji-category');\r\n const titleDiv = document.createElement('div');\r\n titleDiv.classList.add('category-title');\r\n titleDiv.innerText = category;\r\n const itemsDiv = document.createElement('div');\r\n itemsDiv.classList.add('category-items');\r\n div.append(titleDiv, itemsDiv);\r\n const emojis = sorted[category];\r\n emojis.forEach(emoji => {\r\n /* if(emojiUnicode(emoji) == '1f481-200d-2642') {\r\n console.log('append emoji', emoji, emojiUnicode(emoji));\r\n } */\r\n emoji = emoji.split('-').reduce((prev, curr) => prev + String.fromCodePoint(parseInt(curr, 16)), '');\r\n this.appendEmoji(emoji /* .replace(/[\\ufe0f\\u2640\\u2642\\u2695]/g, '') */, itemsDiv, false /* , false */);\r\n /* if(category == 'Smileys & Emotion') {\r\n console.log('appended emoji', emoji, itemsDiv.children[itemsDiv.childElementCount - 1].innerHTML, emojiUnicode(emoji));\r\n } */\r\n });\r\n divs[category] = div;\r\n }\r\n //console.timeEnd('emojiParse');\r\n const menu = this.content.previousElementSibling.firstElementChild;\r\n const emojiScroll = this.scroll = new scrollable_new_1.default(this.content, 'y', 'EMOJI', null);\r\n //emojiScroll.setVirtualContainer(emojiScroll.container);\r\n const preloader = misc_1.putPreloader(this.content, true);\r\n Promise.all([\r\n new Promise((resolve) => setTimeout(resolve, 200)),\r\n appStateManager_1.default.getState().then(state => {\r\n if (Array.isArray(state.recentEmoji)) {\r\n this.recent = state.recentEmoji;\r\n }\r\n })\r\n ]).then(() => {\r\n preloader.remove();\r\n this.recentItemsDiv = divs['Recent'].querySelector('.category-items');\r\n for (const emoji of this.recent) {\r\n this.appendEmoji(emoji, this.recentItemsDiv);\r\n }\r\n categories.unshift('Recent');\r\n categories.map(category => {\r\n const 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 this.stickyIntersector.observeStickyHeaderChanges(div);\r\n return div;\r\n });\r\n });\r\n this.content.addEventListener('click', this.onContentClick);\r\n this.stickyIntersector = __1.EmoticonsDropdown.menuOnClick(menu, emojiScroll);\r\n this.init = null;\r\n }\r\n appendEmoji(emoji, container, prepend = false /* , unified = false */) {\r\n //const emoji = details.unified;\r\n //const emoji = (details.unified as string).split('-')\r\n //.reduce((prev, curr) => prev + String.fromCodePoint(parseInt(curr, 16)), '');\r\n const spanEmoji = document.createElement('span');\r\n let kek;\r\n /* if(unified) {\r\n kek = RichTextProcessor.wrapRichText('_', {\r\n entities: [{\r\n _: 'messageEntityEmoji',\r\n offset: 0,\r\n length: emoji.split('-').length,\r\n unicode: emoji\r\n }]\r\n });\r\n } else { */\r\n kek = richtextprocessor_1.RichTextProcessor.wrapEmojiText(emoji);\r\n //}\r\n /* if(!kek.includes('emoji')) {\r\n console.log(emoji, kek, spanEmoji, emoji.length, new TextEncoder().encode(emoji), emojiUnicode(emoji));\r\n return;\r\n } */\r\n //console.log(kek);\r\n spanEmoji.innerHTML = kek;\r\n if (spanEmoji.firstElementChild) {\r\n spanEmoji.firstElementChild.setAttribute('loading', 'lazy');\r\n }\r\n //spanEmoji = spanEmoji.firstElementChild as HTMLSpanElement;\r\n //spanEmoji.setAttribute('emoji', emoji);\r\n if (prepend)\r\n container.prepend(spanEmoji);\r\n else\r\n container.appendChild(spanEmoji);\r\n }\r\n getEmojiFromElement(element) {\r\n if (element.tagName == 'SPAN' && !element.classList.contains('emoji')) {\r\n element = element.firstElementChild;\r\n }\r\n return element.getAttribute('alt') || element.innerText;\r\n }\r\n onClose() {\r\n }\r\n}\r\nexports.default = EmojiTab;\r\n" - }, - { - "id": 102, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\stickers.ts", - "name": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "index": 102, - "index2": 94, - "size": 14642, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\index.ts", - "issuerId": 47, - "issuerName": "./src/components/emoticonsDropdown/index.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 98, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\input.ts", - "name": "./src/components/chat/input.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - }, - { - "id": 47, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\index.ts", - "name": "./src/components/emoticonsDropdown/index.ts", - "profile": { - "factory": 2199, - "building": 778, - "dependencies": 1 - } - } - ], - "profile": { - "factory": 120, - "building": 1077, - "dependencies": 2 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 47, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\index.ts", - "module": "./src/components/emoticonsDropdown/index.ts", - "moduleName": "./src/components/emoticonsDropdown/index.ts", - "type": "cjs require", - "userRequest": "./tabs/stickers", - "loc": "25:35-61" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 5, - "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 __1 = __importStar(require(\"..\"));\r\nconst scrollable_new_1 = __importDefault(require(\"../../scrollable_new\"));\r\nconst wrappers_1 = require(\"../../wrappers\");\r\nconst appStickersManager_1 = __importDefault(require(\"../../../lib/appManagers/appStickersManager\"));\r\nconst appDownloadManager_1 = __importDefault(require(\"../../../lib/appManagers/appDownloadManager\"));\r\nconst blob_1 = require(\"../../../helpers/blob\");\r\nconst lottieLoader_1 = __importDefault(require(\"../../../lib/lottieLoader\"));\r\nconst misc_1 = require(\"../../misc\");\r\nconst richtextprocessor_1 = require(\"../../../lib/richtextprocessor\");\r\nconst utils_1 = require(\"../../../lib/utils\");\r\nconst mtprotoworker_1 = __importDefault(require(\"../../../lib/mtproto/mtprotoworker\"));\r\nconst appDocsManager_1 = __importDefault(require(\"../../../lib/appManagers/appDocsManager\"));\r\nconst animationIntersector_1 = __importDefault(require(\"../../animationIntersector\"));\r\nconst lazyLoadQueue_1 = require(\"../../lazyLoadQueue\");\r\nclass StickersTab {\r\n constructor() {\r\n this.stickerSets = {};\r\n this.recentStickers = [];\r\n this.mounted = false;\r\n this.queueCategoryPush = [];\r\n this.animatedDivs = new Set();\r\n this.checkAnimationContainer = (div, visible) => {\r\n //console.error('checkAnimationContainer', div, visible);\r\n const players = animationIntersector_1.default.getAnimations(div);\r\n players.forEach(player => {\r\n if (!visible) {\r\n animationIntersector_1.default.checkAnimation(player, true, true);\r\n }\r\n else {\r\n animationIntersector_1.default.checkAnimation(player, false);\r\n }\r\n });\r\n };\r\n this.processVisibleDiv = (div) => {\r\n const docID = div.dataset.docID;\r\n const doc = appDocsManager_1.default.getDoc(docID);\r\n const promise = wrappers_1.wrapSticker({\r\n doc,\r\n div: div,\r\n width: 80,\r\n height: 80,\r\n lazyLoadQueue: null,\r\n group: __1.EMOTICONSSTICKERGROUP,\r\n onlyThumb: false,\r\n play: true,\r\n loop: true\r\n });\r\n promise.then(() => {\r\n //clearTimeout(timeout);\r\n this.checkAnimationContainer(div, this.lazyLoadQueue.intersector.isVisible(div));\r\n });\r\n /* let timeout = window.setTimeout(() => {\r\n console.error('processVisibleDiv timeout', div, doc);\r\n }, 1e3); */\r\n return promise;\r\n };\r\n this.processInvisibleDiv = (div) => {\r\n const docID = div.dataset.docID;\r\n const doc = appDocsManager_1.default.getDoc(docID);\r\n //console.log('STICKER INvisible:', /* div, */docID);\r\n this.checkAnimationContainer(div, false);\r\n div.innerHTML = '';\r\n this.renderSticker(doc, div);\r\n };\r\n }\r\n categoryPush(categoryDiv, categoryTitle, promise, prepend) {\r\n //if((docs.length % 5) != 0) categoryDiv.classList.add('not-full');\r\n const itemsDiv = document.createElement('div');\r\n itemsDiv.classList.add('category-items');\r\n const titleDiv = document.createElement('div');\r\n titleDiv.classList.add('category-title');\r\n titleDiv.innerHTML = categoryTitle;\r\n categoryDiv.append(titleDiv, itemsDiv);\r\n this.stickyIntersector.observeStickyHeaderChanges(categoryDiv);\r\n this.queueCategoryPush.push({ element: categoryDiv, prepend });\r\n promise.then(documents => {\r\n documents.forEach(doc => {\r\n //if(doc._ == 'documentEmpty') return;\r\n itemsDiv.append(this.renderSticker(doc));\r\n });\r\n if (this.queueCategoryPush.length) {\r\n this.queueCategoryPush.forEach(({ element, prepend }) => {\r\n if (prepend) {\r\n if (this.recentDiv.parentElement) {\r\n this.scroll.prepend(element);\r\n this.scroll.prepend(this.recentDiv);\r\n }\r\n else {\r\n this.scroll.prepend(element);\r\n }\r\n }\r\n else\r\n this.scroll.append(element);\r\n });\r\n this.queueCategoryPush.length = 0;\r\n }\r\n });\r\n }\r\n renderSticker(doc, div) {\r\n if (!div) {\r\n div = document.createElement('div');\r\n if (doc.sticker == 2) {\r\n this.animatedDivs.add(div);\r\n this.lazyLoadQueue.observe({\r\n div,\r\n load: this.processVisibleDiv\r\n });\r\n }\r\n }\r\n wrappers_1.wrapSticker({\r\n doc,\r\n div,\r\n /* width: 80,\r\n height: 80,\r\n play: false,\r\n loop: false, */\r\n lazyLoadQueue: __1.EmoticonsDropdown.lazyLoadQueue,\r\n group: __1.EMOTICONSSTICKERGROUP,\r\n onlyThumb: doc.sticker == 2\r\n });\r\n return div;\r\n }\r\n renderStickerSet(set, prepend = false) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const categoryDiv = document.createElement('div');\r\n categoryDiv.classList.add('sticker-category');\r\n const li = document.createElement('li');\r\n li.classList.add('btn-icon');\r\n this.stickerSets[set.id] = {\r\n stickers: categoryDiv,\r\n tab: li\r\n };\r\n if (prepend) {\r\n this.menu.insertBefore(li, this.menu.firstElementChild.nextSibling);\r\n }\r\n else {\r\n this.menu.append(li);\r\n }\r\n //stickersScroll.append(categoryDiv);\r\n const promise = appStickersManager_1.default.getStickerSet(set);\r\n this.categoryPush(categoryDiv, richtextprocessor_1.RichTextProcessor.wrapEmojiText(set.title), promise.then(stickerSet => stickerSet.documents), prepend);\r\n const stickerSet = yield promise;\r\n //console.log('got stickerSet', stickerSet, li);\r\n if (stickerSet.set.thumb) {\r\n const downloadOptions = appStickersManager_1.default.getStickerSetThumbDownloadOptions(stickerSet.set);\r\n const promise = appDownloadManager_1.default.download(downloadOptions);\r\n if (stickerSet.set.pFlags.animated) {\r\n promise\r\n .then(blob_1.readBlobAsText)\r\n .then(JSON.parse)\r\n .then(json => {\r\n lottieLoader_1.default.loadAnimationWorker({\r\n container: li,\r\n loop: true,\r\n autoplay: false,\r\n animationData: json,\r\n width: 32,\r\n height: 32\r\n }, __1.EMOTICONSSTICKERGROUP);\r\n });\r\n }\r\n else {\r\n const image = new Image();\r\n promise.then(blob => {\r\n misc_1.renderImageFromUrl(image, URL.createObjectURL(blob), () => {\r\n li.append(image);\r\n });\r\n });\r\n }\r\n }\r\n else if (stickerSet.documents[0]._ != 'documentEmpty') { // 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: __1.EMOTICONSSTICKERGROUP\r\n }); // kostil\r\n }\r\n });\r\n }\r\n init() {\r\n this.content = document.getElementById('content-stickers');\r\n //let stickersDiv = contentStickersDiv.querySelector('.os-content') as HTMLDivElement;\r\n this.recentDiv = document.createElement('div');\r\n this.recentDiv.classList.add('sticker-category');\r\n let menuWrapper = this.content.previousElementSibling;\r\n this.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 this.content.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 utils_1.$rootScope.$on('stickers_installed', (e) => {\r\n const set = e.detail;\r\n if (!this.stickerSets[set.id] && this.mounted) {\r\n this.renderStickerSet(set, true);\r\n }\r\n });\r\n utils_1.$rootScope.$on('stickers_deleted', (e) => {\r\n const set = e.detail;\r\n if (this.stickerSets[set.id] && this.mounted) {\r\n const elements = this.stickerSets[set.id];\r\n elements.stickers.remove();\r\n elements.tab.remove();\r\n delete this.stickerSets[set.id];\r\n }\r\n });\r\n stickersDiv.addEventListener('click', __1.EmoticonsDropdown.onMediaClick);\r\n this.scroll = new scrollable_new_1.default(this.content, 'y', 'STICKERS', undefined, undefined, 2);\r\n this.scroll.setVirtualContainer(stickersDiv);\r\n this.stickyIntersector = __1.EmoticonsDropdown.menuOnClick(this.menu, this.scroll, menuScroll);\r\n const preloader = misc_1.putPreloader(this.content, true);\r\n Promise.all([\r\n appStickersManager_1.default.getRecentStickers().then(stickers => {\r\n this.recentStickers = stickers.stickers.slice(0, 20);\r\n //stickersScroll.prepend(categoryDiv);\r\n this.stickerSets['recent'] = {\r\n stickers: this.recentDiv,\r\n tab: this.menu.firstElementChild\r\n };\r\n preloader.remove();\r\n this.categoryPush(this.recentDiv, 'Recent', Promise.resolve(this.recentStickers), true);\r\n }),\r\n mtprotoworker_1.default.invokeApi('messages.getAllStickers', { hash: 0 }).then((res) => __awaiter(this, void 0, void 0, function* () {\r\n let stickers = res;\r\n preloader.remove();\r\n for (let set of stickers.sets) {\r\n this.renderStickerSet(set);\r\n }\r\n }))\r\n ]).finally(() => {\r\n this.mounted = true;\r\n });\r\n this.lazyLoadQueue = new lazyLoadQueue_1.LazyLoadQueueRepeat(undefined, (target, visible) => {\r\n if (!visible) {\r\n this.processInvisibleDiv(target);\r\n }\r\n });\r\n __1.default.events.onClose.push(() => {\r\n this.lazyLoadQueue.lock();\r\n });\r\n __1.default.events.onCloseAfter.push(() => {\r\n const divs = this.lazyLoadQueue.intersector.getVisible();\r\n for (const div of divs) {\r\n this.processInvisibleDiv(div);\r\n }\r\n this.lazyLoadQueue.intersector.clearVisible();\r\n });\r\n __1.default.events.onOpenAfter.push(() => {\r\n this.lazyLoadQueue.unlockAndRefresh();\r\n });\r\n /* setInterval(() => {\r\n // @ts-ignore\r\n const players = Object.values(lottieLoader.players).filter(p => p.width == 80);\r\n \r\n console.log('STICKERS RENDERED IN PANEL:', players.length, players.filter(p => !p.paused).length, this.lazyLoadQueue.intersector.getVisible().length);\r\n }, .25e3); */\r\n this.init = null;\r\n }\r\n pushRecentSticker(doc) {\r\n if (!this.recentDiv.parentElement) {\r\n return;\r\n }\r\n let div = this.recentDiv.querySelector(`[data-doc-i-d=\"${doc.id}\"]`);\r\n if (!div) {\r\n div = this.renderSticker(doc);\r\n }\r\n const items = this.recentDiv.querySelector('.category-items');\r\n items.prepend(div);\r\n if (items.childElementCount > 20) {\r\n Array.from(items.children).slice(20).forEach(el => el.remove());\r\n }\r\n }\r\n onClose() {\r\n }\r\n}\r\nexports.default = StickersTab;\r\n" - }, - { - "id": 103, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popupCreatePoll.ts", - "name": "./src/components/popupCreatePoll.ts", - "index": 104, - "index2": 97, - "size": 4885, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\input.ts", - "issuerId": 98, - "issuerName": "./src/components/chat/input.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 98, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\input.ts", - "name": "./src/components/chat/input.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 2199, - "building": 778, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 98, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\input.ts", - "module": "./src/components/chat/input.ts", - "moduleName": "./src/components/chat/input.ts", - "type": "cjs require", - "userRequest": "../popupCreatePoll", - "loc": "22:42-71" - } - ], - "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 popup_1 = require(\"./popup\");\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 toast_1 = require(\"./toast\");\r\nconst InputField = (placeholder, label, name) => {\r\n const div = document.createElement('div');\r\n div.classList.add('input-field');\r\n div.innerHTML = `\r\n \r\n \r\n `;\r\n return div;\r\n};\r\nclass PopupCreatePoll extends popup_1.PopupElement {\r\n constructor() {\r\n super('popup-create-poll popup-new-media', null, { closable: true, withConfirm: 'CREATE', body: true });\r\n this.tempID = 0;\r\n this.onSubmitClick = (e) => {\r\n const question = this.questionInput.value;\r\n if (!question.trim()) {\r\n toast_1.toast('Please enter a question');\r\n return;\r\n }\r\n const answers = Array.from(this.questions.children).map((el, idx) => {\r\n const input = el.firstElementChild;\r\n return input.value;\r\n }).filter(v => !!v.trim());\r\n if (answers.length < 2) {\r\n toast_1.toast('Please enter at least two options');\r\n return;\r\n }\r\n this.closeBtn.click();\r\n this.confirmBtn.removeEventListener('click', this.onSubmitClick);\r\n //const randomID = [nextRandomInt(0xFFFFFFFF), nextRandomInt(0xFFFFFFFF)];\r\n //const randomIDS = bigint(randomID[0]).shiftLeft(32).add(bigint(randomID[1])).toString();\r\n const poll = {};\r\n poll._ = 'poll';\r\n //poll.id = randomIDS;\r\n poll.flags = 0;\r\n poll.question = question;\r\n poll.answers = answers.map((value, idx) => {\r\n return {\r\n _: 'pollAnswer',\r\n text: value,\r\n option: new Uint8Array([idx])\r\n };\r\n });\r\n appMessagesManager_1.default.sendOther(utils_1.$rootScope.selectedPeerID, {\r\n _: 'inputMediaPoll',\r\n flags: 0,\r\n poll\r\n });\r\n };\r\n this.onInput = (e) => {\r\n const target = e.target;\r\n if (target.value.length) {\r\n target.parentElement.classList.add('is-filled');\r\n }\r\n const isLast = !target.parentElement.nextElementSibling;\r\n if (isLast && target.value.length && this.questions.childElementCount < 10) {\r\n this.appendMoreField();\r\n }\r\n };\r\n this.onDeleteClick = (e) => {\r\n const target = e.target;\r\n target.parentElement.remove();\r\n Array.from(this.questions.children).forEach((el, idx) => {\r\n const label = el.firstElementChild.nextElementSibling;\r\n label.innerText = 'Option ' + (idx + 1);\r\n });\r\n };\r\n this.title.innerText = 'New Poll';\r\n const questionField = InputField('Ask a Question', 'Ask a Question', 'question');\r\n this.questionInput = questionField.firstElementChild;\r\n this.header.append(questionField);\r\n const hr = document.createElement('hr');\r\n const d = document.createElement('div');\r\n d.classList.add('caption');\r\n d.innerText = 'Options';\r\n this.questions = document.createElement('div');\r\n this.questions.classList.add('poll-create-questions');\r\n this.body.parentElement.insertBefore(hr, this.body);\r\n this.body.append(d, this.questions);\r\n this.confirmBtn.addEventListener('click', this.onSubmitClick);\r\n this.scrollable = new scrollable_new_1.default(this.body, 'y', undefined);\r\n this.appendMoreField();\r\n }\r\n appendMoreField() {\r\n const idx = this.questions.childElementCount + 1;\r\n const questionField = InputField('Add an Option', 'Option ' + idx, 'question-' + this.tempID++);\r\n questionField.firstElementChild.addEventListener('input', this.onInput);\r\n const deleteBtn = document.createElement('span');\r\n deleteBtn.classList.add('btn-icon', 'tgico-close');\r\n questionField.append(deleteBtn);\r\n deleteBtn.addEventListener('click', this.onDeleteClick, { once: true });\r\n this.questions.append(questionField);\r\n this.scrollable.scrollTo(this.scrollable.scrollHeight, true, true);\r\n }\r\n}\r\nexports.default = PopupCreatePoll;\r\n" - }, - { - "id": 104, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\bubbleGroups.ts", - "name": "./src/components/bubbleGroups.ts", - "index": 105, - "index2": 99, - "size": 6546, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "../../components/bubbleGroups", - "loc": "28: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 = 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": 105, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\audio.ts", - "name": "./src/components/chat/audio.ts", - "index": 107, - "index2": 101, - "size": 4010, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "../../components/chat/audio", - "loc": "43:16-54" - } - ], - "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.ChatAudio = void 0;\r\nconst appImManager_1 = __importDefault(require(\"../../lib/appManagers/appImManager\"));\r\nconst appMessagesManager_1 = __importDefault(require(\"../../lib/appManagers/appMessagesManager\"));\r\nconst appPeersManager_1 = __importDefault(require(\"../../lib/appManagers/appPeersManager\"));\r\nconst richtextprocessor_1 = require(\"../../lib/richtextprocessor\");\r\nconst utils_1 = require(\"../../lib/utils\");\r\nconst appMediaPlaybackController_1 = __importDefault(require(\"../appMediaPlaybackController\"));\r\nconst wrappers_1 = require(\"../wrappers\");\r\nclass ChatAudio {\r\n constructor() {\r\n this.container = document.createElement('div');\r\n this.container.classList.add('pinned-audio', 'pinned-container');\r\n this.container.style.display = 'none';\r\n this.toggle = document.createElement('div');\r\n this.toggle.classList.add('pinned-audio-ico', 'tgico');\r\n this.title = document.createElement('div');\r\n this.title.classList.add('pinned-audio-title');\r\n this.subtitle = document.createElement('div');\r\n this.subtitle.classList.add('pinned-audio-subtitle');\r\n this.close = document.createElement('button');\r\n this.close.classList.add('pinned-audio-close', 'btn-icon', 'tgico-close');\r\n this.container.append(this.toggle, this.title, this.subtitle, this.close);\r\n this.close.addEventListener('click', (e) => {\r\n utils_1.cancelEvent(e);\r\n const scrollTop = appImManager_1.default.scrollable.scrollTop;\r\n this.container.style.display = 'none';\r\n appImManager_1.default.topbar.classList.remove('is-audio-shown');\r\n if (this.toggle.classList.contains('flip-icon')) {\r\n appMediaPlaybackController_1.default.toggle();\r\n }\r\n if (!appImManager_1.default.topbar.classList.contains('is-pinned-shown')) {\r\n appImManager_1.default.scrollable.scrollTop = scrollTop - height;\r\n }\r\n });\r\n this.toggle.addEventListener('click', (e) => {\r\n utils_1.cancelEvent(e);\r\n appMediaPlaybackController_1.default.toggle();\r\n });\r\n const height = 52;\r\n utils_1.$rootScope.$on('audio_play', (e) => {\r\n const { doc, mid } = e.detail;\r\n let title, subtitle;\r\n if (doc.type == 'voice' || doc.type == 'round') {\r\n const message = appMessagesManager_1.default.getMessage(mid);\r\n title = appPeersManager_1.default.getPeerTitle(message.fromID, false, true);\r\n //subtitle = 'Voice message';\r\n subtitle = wrappers_1.formatDate(message.date, false, false);\r\n }\r\n else {\r\n title = doc.audioTitle || doc.file_name;\r\n subtitle = doc.audioPerformer ? richtextprocessor_1.RichTextProcessor.wrapPlainText(doc.audioPerformer) : 'Unknown Artist';\r\n }\r\n this.title.innerHTML = title;\r\n this.subtitle.innerHTML = subtitle;\r\n this.toggle.classList.add('flip-icon');\r\n this.container.dataset.mid = '' + mid;\r\n if (this.container.style.display) {\r\n const scrollTop = appImManager_1.default.scrollable.scrollTop;\r\n this.container.style.display = '';\r\n appImManager_1.default.topbar.classList.add('is-audio-shown');\r\n if (!appImManager_1.default.topbar.classList.contains('is-pinned-shown')) {\r\n appImManager_1.default.scrollable.scrollTop = scrollTop + height;\r\n }\r\n }\r\n });\r\n utils_1.$rootScope.$on('audio_pause', () => {\r\n this.toggle.classList.remove('flip-icon');\r\n });\r\n }\r\n}\r\nexports.ChatAudio = ChatAudio;\r\n" - }, - { - "id": 106, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\contextMenu.ts", - "name": "./src/components/chat/contextMenu.ts", - "index": 108, - "index2": 102, - "size": 6645, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "../../components/chat/contextMenu", - "loc": "44:22-66" - } - ], - "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.ChatContextMenu = void 0;\r\nconst appChatsManager_1 = __importDefault(require(\"../../lib/appManagers/appChatsManager\"));\r\nconst appImManager_1 = __importDefault(require(\"../../lib/appManagers/appImManager\"));\r\nconst appMessagesManager_1 = __importDefault(require(\"../../lib/appManagers/appMessagesManager\"));\r\nconst appPeersManager_1 = __importDefault(require(\"../../lib/appManagers/appPeersManager\"));\r\nconst utils_1 = require(\"../../lib/utils\");\r\nconst appForward_1 = __importDefault(require(\"../appForward\"));\r\nconst misc_1 = require(\"../misc\");\r\nconst popup_1 = require(\"../popup\");\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 misc_1.attachContextMenuListener(attachTo, (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 if (e instanceof MouseEvent)\r\n e.preventDefault();\r\n if (this.element.classList.contains('active')) {\r\n return false;\r\n }\r\n if (e instanceof MouseEvent)\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_1.default.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_1.default.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 appMessagesManager_1.default.updatePinnedMessage(utils_1.$rootScope.selectedPeerID, this.msgID);\r\n });\r\n }\r\n}\r\nexports.ChatContextMenu = ChatContextMenu;\r\n" - }, - { - "id": 107, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\search.ts", - "name": "./src/components/chat/search.ts", - "index": 109, - "index2": 103, - "size": 8283, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "../../components/chat/search", - "loc": "45:17-56" - } - ], - "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.ChatSearch = void 0;\r\nconst appImManager_1 = __importDefault(require(\"../../lib/appManagers/appImManager\"));\r\nconst utils_1 = require(\"../../lib/utils\");\r\nconst appSearch_1 = __importStar(require(\"../appSearch\"));\r\nconst popupDatepicker_1 = __importDefault(require(\"../popupDatepicker\"));\r\nconst ripple_1 = require(\"../ripple\");\r\nconst searchInput_1 = __importDefault(require(\"../searchInput\"));\r\nclass ChatSearch {\r\n constructor() {\r\n this.foundCount = 0;\r\n this.selectedIndex = 0;\r\n this.onDateClick = (e) => {\r\n utils_1.cancelEvent(e);\r\n new popupDatepicker_1.default(new Date(), appImManager_1.default.onDatePick).show();\r\n };\r\n this.selectResult = (elem) => {\r\n if (this.setPeerPromise)\r\n return this.setPeerPromise;\r\n const peerID = +elem.getAttribute('data-peerID');\r\n const lastMsgID = +elem.dataset.mid || undefined;\r\n const index = utils_1.whichChild(elem);\r\n if (index == (this.foundCount - 1)) {\r\n this.upBtn.setAttribute('disabled', 'true');\r\n }\r\n else {\r\n this.upBtn.removeAttribute('disabled');\r\n }\r\n if (!index) {\r\n this.downBtn.setAttribute('disabled', 'true');\r\n }\r\n else {\r\n this.downBtn.removeAttribute('disabled');\r\n }\r\n this.results.classList.remove('active');\r\n appImManager_1.default.bubblesContainer.classList.remove('search-results-active');\r\n const res = appImManager_1.default.setPeer(peerID, lastMsgID);\r\n this.setPeerPromise = (res instanceof Promise ? res : Promise.resolve(res)).then(() => {\r\n this.selectedIndex = index;\r\n this.foundCountEl.innerText = `${index + 1} of ${this.foundCount}`;\r\n const renderedCount = this.searchGroup.list.childElementCount;\r\n if (this.selectedIndex >= (renderedCount - 6)) {\r\n this.appSearch.searchMore();\r\n }\r\n }).finally(() => {\r\n this.setPeerPromise = null;\r\n });\r\n };\r\n this.onResultsClick = (e) => {\r\n const target = utils_1.findUpTag(e.target, 'LI');\r\n if (target) {\r\n this.selectResult(target);\r\n }\r\n };\r\n this.onFooterClick = (e) => {\r\n if (this.foundCount) {\r\n appImManager_1.default.bubblesContainer.classList.toggle('search-results-active');\r\n this.results.classList.toggle('active');\r\n }\r\n };\r\n this.onUpClick = (e) => {\r\n utils_1.cancelEvent(e);\r\n this.selectResult(this.searchGroup.list.children[this.selectedIndex + 1]);\r\n };\r\n this.onDownClick = (e) => {\r\n utils_1.cancelEvent(e);\r\n this.selectResult(this.searchGroup.list.children[this.selectedIndex - 1]);\r\n };\r\n this.element = document.createElement('div');\r\n this.element.classList.add('sidebar-header', 'chat-search', 'chats-container');\r\n this.backBtn = document.createElement('button');\r\n this.backBtn.classList.add('btn-icon', 'tgico-back', 'sidebar-close-button');\r\n ripple_1.ripple(this.backBtn);\r\n this.backBtn.addEventListener('click', () => {\r\n appImManager_1.default.topbar.classList.remove('hide-pinned');\r\n this.element.remove();\r\n this.searchInput.remove();\r\n this.results.remove();\r\n this.footer.remove();\r\n this.footer.removeEventListener('click', this.onFooterClick);\r\n this.dateBtn.removeEventListener('click', this.onDateClick);\r\n this.upBtn.removeEventListener('click', this.onUpClick);\r\n this.downBtn.removeEventListener('click', this.onDownClick);\r\n this.searchGroup.list.removeEventListener('click', this.onResultsClick);\r\n appImManager_1.default.bubblesContainer.classList.remove('search-results-active');\r\n }, { once: true });\r\n this.searchInput = new searchInput_1.default('Search');\r\n // Results\r\n this.results = document.createElement('div');\r\n this.results.classList.add('chat-search-results', 'chats-container');\r\n this.searchGroup = new appSearch_1.SearchGroup('', 'messages', undefined, '', false);\r\n this.searchGroup.list.addEventListener('click', this.onResultsClick);\r\n this.appSearch = new appSearch_1.default(this.results, this.searchInput, {\r\n messages: this.searchGroup\r\n }, (count) => {\r\n this.foundCount = count;\r\n if (!this.foundCount) {\r\n this.foundCountEl.innerText = this.searchInput.value ? 'No results' : '';\r\n this.results.classList.remove('active');\r\n appImManager_1.default.bubblesContainer.classList.remove('search-results-active');\r\n this.upBtn.setAttribute('disabled', 'true');\r\n this.downBtn.setAttribute('disabled', 'true');\r\n }\r\n else {\r\n this.selectResult(this.searchGroup.list.children[0]);\r\n }\r\n });\r\n this.appSearch.beginSearch(utils_1.$rootScope.selectedPeerID);\r\n //appImManager.topbar.parentElement.insertBefore(this.results, appImManager.bubblesContainer);\r\n appImManager_1.default.bubblesContainer.append(this.results);\r\n // Footer\r\n this.footer = document.createElement('div');\r\n this.footer.classList.add('chat-search-footer');\r\n this.footer.addEventListener('click', this.onFooterClick);\r\n ripple_1.ripple(this.footer);\r\n this.foundCountEl = document.createElement('span');\r\n this.foundCountEl.classList.add('chat-search-count');\r\n this.dateBtn = document.createElement('button');\r\n this.dateBtn.classList.add('btn-icon', 'tgico-calendar');\r\n this.controls = document.createElement('div');\r\n this.controls.classList.add('chat-search-controls');\r\n this.upBtn = document.createElement('button');\r\n this.upBtn.classList.add('btn-icon', 'tgico-up');\r\n this.downBtn = document.createElement('button');\r\n this.downBtn.classList.add('btn-icon', 'tgico-down');\r\n this.upBtn.setAttribute('disabled', 'true');\r\n this.downBtn.setAttribute('disabled', 'true');\r\n this.dateBtn.addEventListener('click', this.onDateClick);\r\n this.upBtn.addEventListener('click', this.onUpClick);\r\n this.downBtn.addEventListener('click', this.onDownClick);\r\n this.controls.append(this.upBtn, this.downBtn);\r\n this.footer.append(this.foundCountEl, this.dateBtn, this.controls);\r\n appImManager_1.default.topbar.parentElement.insertBefore(this.footer, appImManager_1.default.chatInput);\r\n // Append container\r\n this.element.append(this.backBtn, this.searchInput.container);\r\n appImManager_1.default.topbar.classList.add('hide-pinned');\r\n appImManager_1.default.topbar.parentElement.append(this.element);\r\n this.searchInput.input.focus();\r\n }\r\n}\r\nexports.ChatSearch = ChatSearch;\r\n" - }, - { - "id": 108, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\passwordManager.ts", - "name": "./src/lib/mtproto/passwordManager.ts", - "index": 111, - "index2": 107, - "size": 3129, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pagePassword.ts", - "issuerId": 66, - "issuerName": "./src/pages/pagePassword.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 49, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "name": "./src/pages/pageSignIn.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 79, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageAuthCode.ts", - "name": "./src/pages/pageAuthCode.ts", - "profile": { - "factory": 104, - "building": 1053, - "dependencies": 527 - } - }, - { - "id": 66, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pagePassword.ts", - "name": "./src/pages/pagePassword.ts", - "profile": { - "factory": 575, - "building": 2297, - "dependencies": 2 - } - } - ], - "profile": { - "factory": 4390, - "building": 785, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 66, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pagePassword.ts", - "module": "./src/pages/pagePassword.ts", - "moduleName": "./src/pages/pagePassword.ts", - "type": "cjs require", - "userRequest": "../lib/mtproto/passwordManager", - "loc": "15:42-83" - } - ], - "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.PasswordManager = void 0;\r\nconst mtprotoworker_1 = __importDefault(require(\"./mtprotoworker\"));\r\n//import { computeCheck } from \"../crypto/srp\";\r\nclass PasswordManager {\r\n getState(options = {}) {\r\n return mtprotoworker_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(password, state, options = {}) {\r\n return mtprotoworker_1.default.computeSRP(password, state).then((inputCheckPassword) => {\r\n return mtprotoworker_1.default.invokeApi('auth.checkPassword', {\r\n password: inputCheckPassword\r\n }, options);\r\n });\r\n }\r\n requestRecovery(options = {}) {\r\n return mtprotoworker_1.default.invokeApi('auth.requestPasswordRecovery', {}, options);\r\n }\r\n recover(code, options = {}) {\r\n return mtprotoworker_1.default.invokeApi('auth.recoverPassword', {\r\n code: code\r\n }, options);\r\n }\r\n}\r\nexports.PasswordManager = PasswordManager;\r\nconst passwordManager = new PasswordManager();\r\n// @ts-ignore\r\nif (process.env.NODE_ENV != 'production') {\r\n self.passwordManager = passwordManager;\r\n}\r\nexports.default = passwordManager;\r\n" - }, - { - "id": 109, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignQR.ts", - "name": "./src/pages/pageSignQR.ts", - "index": 112, - "index2": 111, - "size": 7042, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "issuerId": 49, - "issuerName": "./src/pages/pageSignIn.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 49, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "name": "./src/pages/pageSignIn.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - } - ], - "profile": { - "factory": 104, - "building": 1053, - "dependencies": 527 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 49, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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\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 const 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": 110, - "identifier": "F:\\tweb\\node_modules\\qr-code-styling\\lib\\qr-code-styling.js", - "name": "./node_modules/qr-code-styling/lib/qr-code-styling.js", - "index": 113, - "index2": 110, - "size": 28504, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignQR.ts", - "issuerId": 109, - "issuerName": "./src/pages/pageSignQR.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 49, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "name": "./src/pages/pageSignIn.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 109, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignQR.ts", - "name": "./src/pages/pageSignQR.ts", - "profile": { - "factory": 104, - "building": 1053, - "dependencies": 527 - } - } - ], - "profile": { - "factory": 7122, - "building": 761, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 109, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignQR.ts", - "module": "./src/pages/pageSignQR.ts", - "moduleName": "./src/pages/pageSignQR.ts", - "type": "cjs require", - "userRequest": "qr-code-styling", - "loc": "51: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=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>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>>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;i8*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=0?l.getAt(g):0}}var d=0;for(s=0;sn)&&(t=n,r=e)}return r}())},c.createTableTag=function(t,r){t=t||2;var e=\"\";e+='',e+=\"\";for(var n=0;n\";for(var o=0;o';e+=\"\"}return e+=\"\",e+=\"
\"},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+='\",h+=n.text?''+A(n.text)+\"\":\"\",h+=e.text?''+A(e.text)+\"\":\"\",h+='',h+='\"},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\"};var A=function(t){for(var r=\"\",e=0;e\":r+=\">\";break;case\"&\":r+=\"&\";break;case'\"':r+=\""\";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=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>>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<=0;)r^=7973<5&&(e+=3+i-5)}for(n=0;n=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>>7-r%8&1)},put:function(t,r){for(var n=0;n>>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>>8&255)+(255&n),t.put(n,13),e+=2}if(e>>8)},writeBytes:function(t,e,n){e=e||0,n=n||t.length;for(var o=0;o0&&(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<>>o!=0)throw\"length over\";for(;e+o>=8;)r.writeByte(255&(t<>>=8-e,n=0,e=0;n|=t<0&&r.writeByte(n)}};return o}(f);c.write(r,n);var s=0,h=String.fromCharCode(o[s]);for(s+=1;s=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>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;en.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;hn||o&&o=(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 F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\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": 3952, - "built": false, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\mini-css-extract-plugin\\dist\\loader.js!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\tweb\\src\\materialize.scss", - "issuerId": 68, - "issuerName": "./src/materialize.scss", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 68, - "identifier": "F:\\tweb\\node_modules\\mini-css-extract-plugin\\dist\\loader.js!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\tweb\\src\\materialize.scss", - "name": "./src/materialize.scss", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - } - ], - "profile": { - "factory": 0, - "building": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 68, - "moduleIdentifier": "F:\\tweb\\node_modules\\mini-css-extract-plugin\\dist\\loader.js!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\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 F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\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": 136301, - "built": false, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\mini-css-extract-plugin\\dist\\loader.js!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\tweb\\src\\scss\\style.scss", - "issuerId": 69, - "issuerName": "./src/scss/style.scss", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 69, - "identifier": "F:\\tweb\\node_modules\\mini-css-extract-plugin\\dist\\loader.js!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\tweb\\src\\scss\\style.scss", - "name": "./src/scss/style.scss", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - } - ], - "profile": { - "factory": 0, - "building": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 69, - "moduleIdentifier": "F:\\tweb\\node_modules\\mini-css-extract-plugin\\dist\\loader.js!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\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 F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\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": 4913, - "built": false, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\mini-css-extract-plugin\\dist\\loader.js!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\tweb\\src\\scss\\tgico.scss", - "issuerId": 70, - "issuerName": "./src/scss/tgico.scss", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 70, - "identifier": "F:\\tweb\\node_modules\\mini-css-extract-plugin\\dist\\loader.js!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\tweb\\src\\scss\\tgico.scss", - "name": "./src/scss/tgico.scss", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - } - ], - "profile": { - "factory": 0, - "building": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 70, - "moduleIdentifier": "F:\\tweb\\node_modules\\mini-css-extract-plugin\\dist\\loader.js!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\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": "main", - "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": "9f8ddf8202bec241fec9", - "siblings": [ - 0 - ], - "parents": [], - "children": [], - "childrenByOrder": {}, - "modules": [ - { - "id": 52, - "identifier": "F:\\tweb\\node_modules\\jsbn\\index.js", - "name": "./node_modules/jsbn/index.js", - "index": 16, - "index2": 12, - "size": 42308, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 1 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\polyfill.ts", - "issuerId": 75, - "issuerName": "./src/lib/polyfill.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 75, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\polyfill.ts", - "name": "./src/lib/polyfill.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - } - ], - "profile": { - "factory": 1813, - "building": 59, - "dependencies": 1052 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 22, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\bin_utils.ts", - "module": "./src/lib/bin_utils.ts", - "moduleName": "./src/lib/bin_utils.ts", - "type": "cjs require", - "userRequest": "jsbn", - "loc": "11:15-30" - }, - { - "moduleId": 75, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\polyfill.ts", - "module": "./src/lib/polyfill.ts", - "moduleName": "./src/lib/polyfill.ts", - "type": "cjs require", - "userRequest": "jsbn", - "loc": "6:15-30" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 2, - "source": "(function(){\n\n // Copyright (c) 2005 Tom Wu\n // All Rights Reserved.\n // See \"LICENSE\" for details.\n\n // Basic JavaScript BN library - subset useful for RSA encryption.\n\n // Bits per digit\n var dbits;\n\n // JavaScript engine analysis\n var canary = 0xdeadbeefcafe;\n var j_lm = ((canary&0xffffff)==0xefcafe);\n\n // (public) Constructor\n function BigInteger(a,b,c) {\n if(a != null)\n if(\"number\" == typeof a) this.fromNumber(a,b,c);\n else if(b == null && \"string\" != typeof a) this.fromString(a,256);\n else this.fromString(a,b);\n }\n\n // return new, unset BigInteger\n function nbi() { return new BigInteger(null); }\n\n // am: Compute w_j += (x*this_i), propagate carries,\n // c is initial carry, returns final carry.\n // c < 3*dvalue, x < 2*dvalue, this_i < dvalue\n // We need to select the fastest one that works in this environment.\n\n // am1: use a single mult and divide to get the high bits,\n // max digit bits should be 26 because\n // max internal value = 2*dvalue^2-2*dvalue (< 2^53)\n function am1(i,x,w,j,c,n) {\n while(--n >= 0) {\n var v = x*this[i++]+w[j]+c;\n c = Math.floor(v/0x4000000);\n w[j++] = v&0x3ffffff;\n }\n return c;\n }\n // am2 avoids a big mult-and-extract completely.\n // Max digit bits should be <= 30 because we do bitwise ops\n // on values up to 2*hdvalue^2-hdvalue-1 (< 2^31)\n function am2(i,x,w,j,c,n) {\n var xl = x&0x7fff, xh = x>>15;\n while(--n >= 0) {\n var l = this[i]&0x7fff;\n var h = this[i++]>>15;\n var m = xh*l+h*xl;\n l = xl*l+((m&0x7fff)<<15)+w[j]+(c&0x3fffffff);\n c = (l>>>30)+(m>>>15)+xh*h+(c>>>30);\n w[j++] = l&0x3fffffff;\n }\n return c;\n }\n // Alternately, set max digit bits to 28 since some\n // browsers slow down when dealing with 32-bit numbers.\n function am3(i,x,w,j,c,n) {\n var xl = x&0x3fff, xh = x>>14;\n while(--n >= 0) {\n var l = this[i]&0x3fff;\n var h = this[i++]>>14;\n var m = xh*l+h*xl;\n l = xl*l+((m&0x3fff)<<14)+w[j]+c;\n c = (l>>28)+(m>>14)+xh*h;\n w[j++] = l&0xfffffff;\n }\n return c;\n }\n var inBrowser = typeof navigator !== \"undefined\";\n if(inBrowser && j_lm && (navigator.appName == \"Microsoft Internet Explorer\")) {\n BigInteger.prototype.am = am2;\n dbits = 30;\n }\n else if(inBrowser && j_lm && (navigator.appName != \"Netscape\")) {\n BigInteger.prototype.am = am1;\n dbits = 26;\n }\n else { // Mozilla/Netscape seems to prefer am3\n BigInteger.prototype.am = am3;\n dbits = 28;\n }\n\n BigInteger.prototype.DB = dbits;\n BigInteger.prototype.DM = ((1<= 0; --i) r[i] = this[i];\n r.t = this.t;\n r.s = this.s;\n }\n\n // (protected) set from integer value x, -DV <= x < DV\n function bnpFromInt(x) {\n this.t = 1;\n this.s = (x<0)?-1:0;\n if(x > 0) this[0] = x;\n else if(x < -1) this[0] = x+this.DV;\n else this.t = 0;\n }\n\n // return bigint initialized to value\n function nbv(i) { var r = nbi(); r.fromInt(i); return r; }\n\n // (protected) set from string and radix\n function bnpFromString(s,b) {\n var k;\n if(b == 16) k = 4;\n else if(b == 8) k = 3;\n else if(b == 256) k = 8; // byte array\n else if(b == 2) k = 1;\n else if(b == 32) k = 5;\n else if(b == 4) k = 2;\n else { this.fromRadix(s,b); return; }\n this.t = 0;\n this.s = 0;\n var i = s.length, mi = false, sh = 0;\n while(--i >= 0) {\n var x = (k==8)?s[i]&0xff:intAt(s,i);\n if(x < 0) {\n if(s.charAt(i) == \"-\") mi = true;\n continue;\n }\n mi = false;\n if(sh == 0)\n this[this.t++] = x;\n else if(sh+k > this.DB) {\n this[this.t-1] |= (x&((1<<(this.DB-sh))-1))<>(this.DB-sh));\n }\n else\n this[this.t-1] |= x<= this.DB) sh -= this.DB;\n }\n if(k == 8 && (s[0]&0x80) != 0) {\n this.s = -1;\n if(sh > 0) this[this.t-1] |= ((1<<(this.DB-sh))-1)< 0 && this[this.t-1] == c) --this.t;\n }\n\n // (public) return string representation in given radix\n function bnToString(b) {\n if(this.s < 0) return \"-\"+this.negate().toString(b);\n var k;\n if(b == 16) k = 4;\n else if(b == 8) k = 3;\n else if(b == 2) k = 1;\n else if(b == 32) k = 5;\n else if(b == 4) k = 2;\n else return this.toRadix(b);\n var km = (1< 0) {\n if(p < this.DB && (d = this[i]>>p) > 0) { m = true; r = int2char(d); }\n while(i >= 0) {\n if(p < k) {\n d = (this[i]&((1<>(p+=this.DB-k);\n }\n else {\n d = (this[i]>>(p-=k))&km;\n if(p <= 0) { p += this.DB; --i; }\n }\n if(d > 0) m = true;\n if(m) r += int2char(d);\n }\n }\n return m?r:\"0\";\n }\n\n // (public) -this\n function bnNegate() { var r = nbi(); BigInteger.ZERO.subTo(this,r); return r; }\n\n // (public) |this|\n function bnAbs() { return (this.s<0)?this.negate():this; }\n\n // (public) return + if this > a, - if this < a, 0 if equal\n function bnCompareTo(a) {\n var r = this.s-a.s;\n if(r != 0) return r;\n var i = this.t;\n r = i-a.t;\n if(r != 0) return (this.s<0)?-r:r;\n while(--i >= 0) if((r=this[i]-a[i]) != 0) return r;\n return 0;\n }\n\n // returns bit length of the integer x\n function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }\n\n // (public) return the number of bits in \"this\"\n function bnBitLength() {\n if(this.t <= 0) return 0;\n return this.DB*(this.t-1)+nbits(this[this.t-1]^(this.s&this.DM));\n }\n\n // (protected) r = this << n*DB\n function bnpDLShiftTo(n,r) {\n var i;\n for(i = this.t-1; i >= 0; --i) r[i+n] = this[i];\n for(i = n-1; i >= 0; --i) r[i] = 0;\n r.t = this.t+n;\n r.s = this.s;\n }\n\n // (protected) r = this >> n*DB\n function bnpDRShiftTo(n,r) {\n for(var i = n; i < this.t; ++i) r[i-n] = this[i];\n r.t = Math.max(this.t-n,0);\n r.s = this.s;\n }\n\n // (protected) r = this << n\n function bnpLShiftTo(n,r) {\n var bs = n%this.DB;\n var cbs = this.DB-bs;\n var bm = (1<= 0; --i) {\n r[i+ds+1] = (this[i]>>cbs)|c;\n c = (this[i]&bm)<= 0; --i) r[i] = 0;\n r[ds] = c;\n r.t = this.t+ds+1;\n r.s = this.s;\n r.clamp();\n }\n\n // (protected) r = this >> n\n function bnpRShiftTo(n,r) {\n r.s = this.s;\n var ds = Math.floor(n/this.DB);\n if(ds >= this.t) { r.t = 0; return; }\n var bs = n%this.DB;\n var cbs = this.DB-bs;\n var bm = (1<>bs;\n for(var i = ds+1; i < this.t; ++i) {\n r[i-ds-1] |= (this[i]&bm)<>bs;\n }\n if(bs > 0) r[this.t-ds-1] |= (this.s&bm)<>= this.DB;\n }\n if(a.t < this.t) {\n c -= a.s;\n while(i < this.t) {\n c += this[i];\n r[i++] = c&this.DM;\n c >>= this.DB;\n }\n c += this.s;\n }\n else {\n c += this.s;\n while(i < a.t) {\n c -= a[i];\n r[i++] = c&this.DM;\n c >>= this.DB;\n }\n c -= a.s;\n }\n r.s = (c<0)?-1:0;\n if(c < -1) r[i++] = this.DV+c;\n else if(c > 0) r[i++] = c;\n r.t = i;\n r.clamp();\n }\n\n // (protected) r = this * a, r != this,a (HAC 14.12)\n // \"this\" should be the larger one if appropriate.\n function bnpMultiplyTo(a,r) {\n var x = this.abs(), y = a.abs();\n var i = x.t;\n r.t = i+y.t;\n while(--i >= 0) r[i] = 0;\n for(i = 0; i < y.t; ++i) r[i+x.t] = x.am(0,y[i],r,i,0,x.t);\n r.s = 0;\n r.clamp();\n if(this.s != a.s) BigInteger.ZERO.subTo(r,r);\n }\n\n // (protected) r = this^2, r != this (HAC 14.16)\n function bnpSquareTo(r) {\n var x = this.abs();\n var i = r.t = 2*x.t;\n while(--i >= 0) r[i] = 0;\n for(i = 0; i < x.t-1; ++i) {\n var c = x.am(i,x[i],r,2*i,0,1);\n if((r[i+x.t]+=x.am(i+1,2*x[i],r,2*i+1,c,x.t-i-1)) >= x.DV) {\n r[i+x.t] -= x.DV;\n r[i+x.t+1] = 1;\n }\n }\n if(r.t > 0) r[r.t-1] += x.am(i,x[i],r,2*i,0,1);\n r.s = 0;\n r.clamp();\n }\n\n // (protected) divide this by m, quotient and remainder to q, r (HAC 14.20)\n // r != q, this != m. q or r may be null.\n function bnpDivRemTo(m,q,r) {\n var pm = m.abs();\n if(pm.t <= 0) return;\n var pt = this.abs();\n if(pt.t < pm.t) {\n if(q != null) q.fromInt(0);\n if(r != null) this.copyTo(r);\n return;\n }\n if(r == null) r = nbi();\n var y = nbi(), ts = this.s, ms = m.s;\n var nsh = this.DB-nbits(pm[pm.t-1]); // normalize modulus\n if(nsh > 0) { pm.lShiftTo(nsh,y); pt.lShiftTo(nsh,r); }\n else { pm.copyTo(y); pt.copyTo(r); }\n var ys = y.t;\n var y0 = y[ys-1];\n if(y0 == 0) return;\n var yt = y0*(1<1)?y[ys-2]>>this.F2:0);\n var d1 = this.FV/yt, d2 = (1<= 0) {\n r[r.t++] = 1;\n r.subTo(t,r);\n }\n BigInteger.ONE.dlShiftTo(ys,t);\n t.subTo(y,y); // \"negative\" y so we can replace sub with am later\n while(y.t < ys) y[y.t++] = 0;\n while(--j >= 0) {\n // Estimate quotient digit\n var qd = (r[--i]==y0)?this.DM:Math.floor(r[i]*d1+(r[i-1]+e)*d2);\n if((r[i]+=y.am(0,qd,r,j,0,ys)) < qd) { // Try it out\n y.dlShiftTo(j,t);\n r.subTo(t,r);\n while(r[i] < --qd) r.subTo(t,r);\n }\n }\n if(q != null) {\n r.drShiftTo(ys,q);\n if(ts != ms) BigInteger.ZERO.subTo(q,q);\n }\n r.t = ys;\n r.clamp();\n if(nsh > 0) r.rShiftTo(nsh,r); // Denormalize remainder\n if(ts < 0) BigInteger.ZERO.subTo(r,r);\n }\n\n // (public) this mod a\n function bnMod(a) {\n var r = nbi();\n this.abs().divRemTo(a,null,r);\n if(this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) a.subTo(r,r);\n return r;\n }\n\n // Modular reduction using \"classic\" algorithm\n function Classic(m) { this.m = m; }\n function cConvert(x) {\n if(x.s < 0 || x.compareTo(this.m) >= 0) return x.mod(this.m);\n else return x;\n }\n function cRevert(x) { return x; }\n function cReduce(x) { x.divRemTo(this.m,null,x); }\n function cMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }\n function cSqrTo(x,r) { x.squareTo(r); this.reduce(r); }\n\n Classic.prototype.convert = cConvert;\n Classic.prototype.revert = cRevert;\n Classic.prototype.reduce = cReduce;\n Classic.prototype.mulTo = cMulTo;\n Classic.prototype.sqrTo = cSqrTo;\n\n // (protected) return \"-1/this % 2^DB\"; useful for Mont. reduction\n // justification:\n // xy == 1 (mod m)\n // xy = 1+km\n // xy(2-xy) = (1+km)(1-km)\n // x[y(2-xy)] = 1-k^2m^2\n // x[y(2-xy)] == 1 (mod m^2)\n // if y is 1/x mod m, then y(2-xy) is 1/x mod m^2\n // should reduce x and y(2-xy) by m^2 at each step to keep size bounded.\n // JS multiply \"overflows\" differently from C/C++, so care is needed here.\n function bnpInvDigit() {\n if(this.t < 1) return 0;\n var x = this[0];\n if((x&1) == 0) return 0;\n var y = x&3; // y == 1/x mod 2^2\n y = (y*(2-(x&0xf)*y))&0xf; // y == 1/x mod 2^4\n y = (y*(2-(x&0xff)*y))&0xff; // y == 1/x mod 2^8\n y = (y*(2-(((x&0xffff)*y)&0xffff)))&0xffff; // y == 1/x mod 2^16\n // last step - calculate inverse mod DV directly;\n // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints\n y = (y*(2-x*y%this.DV))%this.DV; // y == 1/x mod 2^dbits\n // we really want the negative inverse, and -DV < y < DV\n return (y>0)?this.DV-y:-y;\n }\n\n // Montgomery reduction\n function Montgomery(m) {\n this.m = m;\n this.mp = m.invDigit();\n this.mpl = this.mp&0x7fff;\n this.mph = this.mp>>15;\n this.um = (1<<(m.DB-15))-1;\n this.mt2 = 2*m.t;\n }\n\n // xR mod m\n function montConvert(x) {\n var r = nbi();\n x.abs().dlShiftTo(this.m.t,r);\n r.divRemTo(this.m,null,r);\n if(x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) this.m.subTo(r,r);\n return r;\n }\n\n // x/R mod m\n function montRevert(x) {\n var r = nbi();\n x.copyTo(r);\n this.reduce(r);\n return r;\n }\n\n // x = x/R mod m (HAC 14.32)\n function montReduce(x) {\n while(x.t <= this.mt2) // pad x so am has enough room later\n x[x.t++] = 0;\n for(var i = 0; i < this.m.t; ++i) {\n // faster way of calculating u0 = x[i]*mp mod DV\n var j = x[i]&0x7fff;\n var u0 = (j*this.mpl+(((j*this.mph+(x[i]>>15)*this.mpl)&this.um)<<15))&x.DM;\n // use am to combine the multiply-shift-add into one call\n j = i+this.m.t;\n x[j] += this.m.am(0,u0,x,i,0,this.m.t);\n // propagate carry\n while(x[j] >= x.DV) { x[j] -= x.DV; x[++j]++; }\n }\n x.clamp();\n x.drShiftTo(this.m.t,x);\n if(x.compareTo(this.m) >= 0) x.subTo(this.m,x);\n }\n\n // r = \"x^2/R mod m\"; x != r\n function montSqrTo(x,r) { x.squareTo(r); this.reduce(r); }\n\n // r = \"xy/R mod m\"; x,y != r\n function montMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }\n\n Montgomery.prototype.convert = montConvert;\n Montgomery.prototype.revert = montRevert;\n Montgomery.prototype.reduce = montReduce;\n Montgomery.prototype.mulTo = montMulTo;\n Montgomery.prototype.sqrTo = montSqrTo;\n\n // (protected) true iff this is even\n function bnpIsEven() { return ((this.t>0)?(this[0]&1):this.s) == 0; }\n\n // (protected) this^e, e < 2^32, doing sqr and mul with \"r\" (HAC 14.79)\n function bnpExp(e,z) {\n if(e > 0xffffffff || e < 1) return BigInteger.ONE;\n var r = nbi(), r2 = nbi(), g = z.convert(this), i = nbits(e)-1;\n g.copyTo(r);\n while(--i >= 0) {\n z.sqrTo(r,r2);\n if((e&(1< 0) z.mulTo(r2,g,r);\n else { var t = r; r = r2; r2 = t; }\n }\n return z.revert(r);\n }\n\n // (public) this^e % m, 0 <= e < 2^32\n function bnModPowInt(e,m) {\n var z;\n if(e < 256 || m.isEven()) z = new Classic(m); else z = new Montgomery(m);\n return this.exp(e,z);\n }\n\n // protected\n BigInteger.prototype.copyTo = bnpCopyTo;\n BigInteger.prototype.fromInt = bnpFromInt;\n BigInteger.prototype.fromString = bnpFromString;\n BigInteger.prototype.clamp = bnpClamp;\n BigInteger.prototype.dlShiftTo = bnpDLShiftTo;\n BigInteger.prototype.drShiftTo = bnpDRShiftTo;\n BigInteger.prototype.lShiftTo = bnpLShiftTo;\n BigInteger.prototype.rShiftTo = bnpRShiftTo;\n BigInteger.prototype.subTo = bnpSubTo;\n BigInteger.prototype.multiplyTo = bnpMultiplyTo;\n BigInteger.prototype.squareTo = bnpSquareTo;\n BigInteger.prototype.divRemTo = bnpDivRemTo;\n BigInteger.prototype.invDigit = bnpInvDigit;\n BigInteger.prototype.isEven = bnpIsEven;\n BigInteger.prototype.exp = bnpExp;\n\n // public\n BigInteger.prototype.toString = bnToString;\n BigInteger.prototype.negate = bnNegate;\n BigInteger.prototype.abs = bnAbs;\n BigInteger.prototype.compareTo = bnCompareTo;\n BigInteger.prototype.bitLength = bnBitLength;\n BigInteger.prototype.mod = bnMod;\n BigInteger.prototype.modPowInt = bnModPowInt;\n\n // \"constants\"\n BigInteger.ZERO = nbv(0);\n BigInteger.ONE = nbv(1);\n\n // Copyright (c) 2005-2009 Tom Wu\n // All Rights Reserved.\n // See \"LICENSE\" for details.\n\n // Extended JavaScript BN functions, required for RSA private ops.\n\n // Version 1.1: new BigInteger(\"0\", 10) returns \"proper\" zero\n // Version 1.2: square() API, isProbablePrime fix\n\n // (public)\n function bnClone() { var r = nbi(); this.copyTo(r); return r; }\n\n // (public) return value as integer\n function bnIntValue() {\n if(this.s < 0) {\n if(this.t == 1) return this[0]-this.DV;\n else if(this.t == 0) return -1;\n }\n else if(this.t == 1) return this[0];\n else if(this.t == 0) return 0;\n // assumes 16 < DB < 32\n return ((this[1]&((1<<(32-this.DB))-1))<>24; }\n\n // (public) return value as short (assumes DB>=16)\n function bnShortValue() { return (this.t==0)?this.s:(this[0]<<16)>>16; }\n\n // (protected) return x s.t. r^x < DV\n function bnpChunkSize(r) { return Math.floor(Math.LN2*this.DB/Math.log(r)); }\n\n // (public) 0 if this == 0, 1 if this > 0\n function bnSigNum() {\n if(this.s < 0) return -1;\n else if(this.t <= 0 || (this.t == 1 && this[0] <= 0)) return 0;\n else return 1;\n }\n\n // (protected) convert to radix string\n function bnpToRadix(b) {\n if(b == null) b = 10;\n if(this.signum() == 0 || b < 2 || b > 36) return \"0\";\n var cs = this.chunkSize(b);\n var a = Math.pow(b,cs);\n var d = nbv(a), y = nbi(), z = nbi(), r = \"\";\n this.divRemTo(d,y,z);\n while(y.signum() > 0) {\n r = (a+z.intValue()).toString(b).substr(1) + r;\n y.divRemTo(d,y,z);\n }\n return z.intValue().toString(b) + r;\n }\n\n // (protected) convert from radix string\n function bnpFromRadix(s,b) {\n this.fromInt(0);\n if(b == null) b = 10;\n var cs = this.chunkSize(b);\n var d = Math.pow(b,cs), mi = false, j = 0, w = 0;\n for(var i = 0; i < s.length; ++i) {\n var x = intAt(s,i);\n if(x < 0) {\n if(s.charAt(i) == \"-\" && this.signum() == 0) mi = true;\n continue;\n }\n w = b*w+x;\n if(++j >= cs) {\n this.dMultiply(d);\n this.dAddOffset(w,0);\n j = 0;\n w = 0;\n }\n }\n if(j > 0) {\n this.dMultiply(Math.pow(b,j));\n this.dAddOffset(w,0);\n }\n if(mi) BigInteger.ZERO.subTo(this,this);\n }\n\n // (protected) alternate constructor\n function bnpFromNumber(a,b,c) {\n if(\"number\" == typeof b) {\n // new BigInteger(int,int,RNG)\n if(a < 2) this.fromInt(1);\n else {\n this.fromNumber(a,c);\n if(!this.testBit(a-1)) // force MSB set\n this.bitwiseTo(BigInteger.ONE.shiftLeft(a-1),op_or,this);\n if(this.isEven()) this.dAddOffset(1,0); // force odd\n while(!this.isProbablePrime(b)) {\n this.dAddOffset(2,0);\n if(this.bitLength() > a) this.subTo(BigInteger.ONE.shiftLeft(a-1),this);\n }\n }\n }\n else {\n // new BigInteger(int,RNG)\n var x = new Array(), t = a&7;\n x.length = (a>>3)+1;\n b.nextBytes(x);\n if(t > 0) x[0] &= ((1< 0) {\n if(p < this.DB && (d = this[i]>>p) != (this.s&this.DM)>>p)\n r[k++] = d|(this.s<<(this.DB-p));\n while(i >= 0) {\n if(p < 8) {\n d = (this[i]&((1<>(p+=this.DB-8);\n }\n else {\n d = (this[i]>>(p-=8))&0xff;\n if(p <= 0) { p += this.DB; --i; }\n }\n if((d&0x80) != 0) d |= -256;\n if(k == 0 && (this.s&0x80) != (d&0x80)) ++k;\n if(k > 0 || d != this.s) r[k++] = d;\n }\n }\n return r;\n }\n\n function bnEquals(a) { return(this.compareTo(a)==0); }\n function bnMin(a) { return(this.compareTo(a)<0)?this:a; }\n function bnMax(a) { return(this.compareTo(a)>0)?this:a; }\n\n // (protected) r = this op a (bitwise)\n function bnpBitwiseTo(a,op,r) {\n var i, f, m = Math.min(a.t,this.t);\n for(i = 0; i < m; ++i) r[i] = op(this[i],a[i]);\n if(a.t < this.t) {\n f = a.s&this.DM;\n for(i = m; i < this.t; ++i) r[i] = op(this[i],f);\n r.t = this.t;\n }\n else {\n f = this.s&this.DM;\n for(i = m; i < a.t; ++i) r[i] = op(f,a[i]);\n r.t = a.t;\n }\n r.s = op(this.s,a.s);\n r.clamp();\n }\n\n // (public) this & a\n function op_and(x,y) { return x&y; }\n function bnAnd(a) { var r = nbi(); this.bitwiseTo(a,op_and,r); return r; }\n\n // (public) this | a\n function op_or(x,y) { return x|y; }\n function bnOr(a) { var r = nbi(); this.bitwiseTo(a,op_or,r); return r; }\n\n // (public) this ^ a\n function op_xor(x,y) { return x^y; }\n function bnXor(a) { var r = nbi(); this.bitwiseTo(a,op_xor,r); return r; }\n\n // (public) this & ~a\n function op_andnot(x,y) { return x&~y; }\n function bnAndNot(a) { var r = nbi(); this.bitwiseTo(a,op_andnot,r); return r; }\n\n // (public) ~this\n function bnNot() {\n var r = nbi();\n for(var i = 0; i < this.t; ++i) r[i] = this.DM&~this[i];\n r.t = this.t;\n r.s = ~this.s;\n return r;\n }\n\n // (public) this << n\n function bnShiftLeft(n) {\n var r = nbi();\n if(n < 0) this.rShiftTo(-n,r); else this.lShiftTo(n,r);\n return r;\n }\n\n // (public) this >> n\n function bnShiftRight(n) {\n var r = nbi();\n if(n < 0) this.lShiftTo(-n,r); else this.rShiftTo(n,r);\n return r;\n }\n\n // return index of lowest 1-bit in x, x < 2^31\n function lbit(x) {\n if(x == 0) return -1;\n var r = 0;\n if((x&0xffff) == 0) { x >>= 16; r += 16; }\n if((x&0xff) == 0) { x >>= 8; r += 8; }\n if((x&0xf) == 0) { x >>= 4; r += 4; }\n if((x&3) == 0) { x >>= 2; r += 2; }\n if((x&1) == 0) ++r;\n return r;\n }\n\n // (public) returns index of lowest 1-bit (or -1 if none)\n function bnGetLowestSetBit() {\n for(var i = 0; i < this.t; ++i)\n if(this[i] != 0) return i*this.DB+lbit(this[i]);\n if(this.s < 0) return this.t*this.DB;\n return -1;\n }\n\n // return number of 1 bits in x\n function cbit(x) {\n var r = 0;\n while(x != 0) { x &= x-1; ++r; }\n return r;\n }\n\n // (public) return number of set bits\n function bnBitCount() {\n var r = 0, x = this.s&this.DM;\n for(var i = 0; i < this.t; ++i) r += cbit(this[i]^x);\n return r;\n }\n\n // (public) true iff nth bit is set\n function bnTestBit(n) {\n var j = Math.floor(n/this.DB);\n if(j >= this.t) return(this.s!=0);\n return((this[j]&(1<<(n%this.DB)))!=0);\n }\n\n // (protected) this op (1<>= this.DB;\n }\n if(a.t < this.t) {\n c += a.s;\n while(i < this.t) {\n c += this[i];\n r[i++] = c&this.DM;\n c >>= this.DB;\n }\n c += this.s;\n }\n else {\n c += this.s;\n while(i < a.t) {\n c += a[i];\n r[i++] = c&this.DM;\n c >>= this.DB;\n }\n c += a.s;\n }\n r.s = (c<0)?-1:0;\n if(c > 0) r[i++] = c;\n else if(c < -1) r[i++] = this.DV+c;\n r.t = i;\n r.clamp();\n }\n\n // (public) this + a\n function bnAdd(a) { var r = nbi(); this.addTo(a,r); return r; }\n\n // (public) this - a\n function bnSubtract(a) { var r = nbi(); this.subTo(a,r); return r; }\n\n // (public) this * a\n function bnMultiply(a) { var r = nbi(); this.multiplyTo(a,r); return r; }\n\n // (public) this^2\n function bnSquare() { var r = nbi(); this.squareTo(r); return r; }\n\n // (public) this / a\n function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }\n\n // (public) this % a\n function bnRemainder(a) { var r = nbi(); this.divRemTo(a,null,r); return r; }\n\n // (public) [this/a,this%a]\n function bnDivideAndRemainder(a) {\n var q = nbi(), r = nbi();\n this.divRemTo(a,q,r);\n return new Array(q,r);\n }\n\n // (protected) this *= n, this >= 0, 1 < n < DV\n function bnpDMultiply(n) {\n this[this.t] = this.am(0,n-1,this,0,0,this.t);\n ++this.t;\n this.clamp();\n }\n\n // (protected) this += n << w words, this >= 0\n function bnpDAddOffset(n,w) {\n if(n == 0) return;\n while(this.t <= w) this[this.t++] = 0;\n this[w] += n;\n while(this[w] >= this.DV) {\n this[w] -= this.DV;\n if(++w >= this.t) this[this.t++] = 0;\n ++this[w];\n }\n }\n\n // A \"null\" reducer\n function NullExp() {}\n function nNop(x) { return x; }\n function nMulTo(x,y,r) { x.multiplyTo(y,r); }\n function nSqrTo(x,r) { x.squareTo(r); }\n\n NullExp.prototype.convert = nNop;\n NullExp.prototype.revert = nNop;\n NullExp.prototype.mulTo = nMulTo;\n NullExp.prototype.sqrTo = nSqrTo;\n\n // (public) this^e\n function bnPow(e) { return this.exp(e,new NullExp()); }\n\n // (protected) r = lower n words of \"this * a\", a.t <= n\n // \"this\" should be the larger one if appropriate.\n function bnpMultiplyLowerTo(a,n,r) {\n var i = Math.min(this.t+a.t,n);\n r.s = 0; // assumes a,this >= 0\n r.t = i;\n while(i > 0) r[--i] = 0;\n var j;\n for(j = r.t-this.t; i < j; ++i) r[i+this.t] = this.am(0,a[i],r,i,0,this.t);\n for(j = Math.min(a.t,n); i < j; ++i) this.am(0,a[i],r,i,0,n-i);\n r.clamp();\n }\n\n // (protected) r = \"this * a\" without lower n words, n > 0\n // \"this\" should be the larger one if appropriate.\n function bnpMultiplyUpperTo(a,n,r) {\n --n;\n var i = r.t = this.t+a.t-n;\n r.s = 0; // assumes a,this >= 0\n while(--i >= 0) r[i] = 0;\n for(i = Math.max(n-this.t,0); i < a.t; ++i)\n r[this.t+i-n] = this.am(n-i,a[i],r,0,0,this.t+i-n);\n r.clamp();\n r.drShiftTo(1,r);\n }\n\n // Barrett modular reduction\n function Barrett(m) {\n // setup Barrett\n this.r2 = nbi();\n this.q3 = nbi();\n BigInteger.ONE.dlShiftTo(2*m.t,this.r2);\n this.mu = this.r2.divide(m);\n this.m = m;\n }\n\n function barrettConvert(x) {\n if(x.s < 0 || x.t > 2*this.m.t) return x.mod(this.m);\n else if(x.compareTo(this.m) < 0) return x;\n else { var r = nbi(); x.copyTo(r); this.reduce(r); return r; }\n }\n\n function barrettRevert(x) { return x; }\n\n // x = x mod m (HAC 14.42)\n function barrettReduce(x) {\n x.drShiftTo(this.m.t-1,this.r2);\n if(x.t > this.m.t+1) { x.t = this.m.t+1; x.clamp(); }\n this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);\n this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);\n while(x.compareTo(this.r2) < 0) x.dAddOffset(1,this.m.t+1);\n x.subTo(this.r2,x);\n while(x.compareTo(this.m) >= 0) x.subTo(this.m,x);\n }\n\n // r = x^2 mod m; x != r\n function barrettSqrTo(x,r) { x.squareTo(r); this.reduce(r); }\n\n // r = x*y mod m; x,y != r\n function barrettMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }\n\n Barrett.prototype.convert = barrettConvert;\n Barrett.prototype.revert = barrettRevert;\n Barrett.prototype.reduce = barrettReduce;\n Barrett.prototype.mulTo = barrettMulTo;\n Barrett.prototype.sqrTo = barrettSqrTo;\n\n // (public) this^e % m (HAC 14.85)\n function bnModPow(e,m) {\n var i = e.bitLength(), k, r = nbv(1), z;\n if(i <= 0) return r;\n else if(i < 18) k = 1;\n else if(i < 48) k = 3;\n else if(i < 144) k = 4;\n else if(i < 768) k = 5;\n else k = 6;\n if(i < 8)\n z = new Classic(m);\n else if(m.isEven())\n z = new Barrett(m);\n else\n z = new Montgomery(m);\n\n // precomputation\n var g = new Array(), n = 3, k1 = k-1, km = (1< 1) {\n var g2 = nbi();\n z.sqrTo(g[1],g2);\n while(n <= km) {\n g[n] = nbi();\n z.mulTo(g2,g[n-2],g[n]);\n n += 2;\n }\n }\n\n var j = e.t-1, w, is1 = true, r2 = nbi(), t;\n i = nbits(e[j])-1;\n while(j >= 0) {\n if(i >= k1) w = (e[j]>>(i-k1))&km;\n else {\n w = (e[j]&((1<<(i+1))-1))<<(k1-i);\n if(j > 0) w |= e[j-1]>>(this.DB+i-k1);\n }\n\n n = k;\n while((w&1) == 0) { w >>= 1; --n; }\n if((i -= n) < 0) { i += this.DB; --j; }\n if(is1) { // ret == 1, don't bother squaring or multiplying it\n g[w].copyTo(r);\n is1 = false;\n }\n else {\n while(n > 1) { z.sqrTo(r,r2); z.sqrTo(r2,r); n -= 2; }\n if(n > 0) z.sqrTo(r,r2); else { t = r; r = r2; r2 = t; }\n z.mulTo(r2,g[w],r);\n }\n\n while(j >= 0 && (e[j]&(1< 0) {\n x.rShiftTo(g,x);\n y.rShiftTo(g,y);\n }\n while(x.signum() > 0) {\n if((i = x.getLowestSetBit()) > 0) x.rShiftTo(i,x);\n if((i = y.getLowestSetBit()) > 0) y.rShiftTo(i,y);\n if(x.compareTo(y) >= 0) {\n x.subTo(y,x);\n x.rShiftTo(1,x);\n }\n else {\n y.subTo(x,y);\n y.rShiftTo(1,y);\n }\n }\n if(g > 0) y.lShiftTo(g,y);\n return y;\n }\n\n // (protected) this % n, n < 2^26\n function bnpModInt(n) {\n if(n <= 0) return 0;\n var d = this.DV%n, r = (this.s<0)?n-1:0;\n if(this.t > 0)\n if(d == 0) r = this[0]%n;\n else for(var i = this.t-1; i >= 0; --i) r = (d*r+this[i])%n;\n return r;\n }\n\n // (public) 1/this % m (HAC 14.61)\n function bnModInverse(m) {\n var ac = m.isEven();\n if((this.isEven() && ac) || m.signum() == 0) return BigInteger.ZERO;\n var u = m.clone(), v = this.clone();\n var a = nbv(1), b = nbv(0), c = nbv(0), d = nbv(1);\n while(u.signum() != 0) {\n while(u.isEven()) {\n u.rShiftTo(1,u);\n if(ac) {\n if(!a.isEven() || !b.isEven()) { a.addTo(this,a); b.subTo(m,b); }\n a.rShiftTo(1,a);\n }\n else if(!b.isEven()) b.subTo(m,b);\n b.rShiftTo(1,b);\n }\n while(v.isEven()) {\n v.rShiftTo(1,v);\n if(ac) {\n if(!c.isEven() || !d.isEven()) { c.addTo(this,c); d.subTo(m,d); }\n c.rShiftTo(1,c);\n }\n else if(!d.isEven()) d.subTo(m,d);\n d.rShiftTo(1,d);\n }\n if(u.compareTo(v) >= 0) {\n u.subTo(v,u);\n if(ac) a.subTo(c,a);\n b.subTo(d,b);\n }\n else {\n v.subTo(u,v);\n if(ac) c.subTo(a,c);\n d.subTo(b,d);\n }\n }\n if(v.compareTo(BigInteger.ONE) != 0) return BigInteger.ZERO;\n if(d.compareTo(m) >= 0) return d.subtract(m);\n if(d.signum() < 0) d.addTo(m,d); else return d;\n if(d.signum() < 0) return d.add(m); else return d;\n }\n\n var lowprimes = [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997];\n var lplim = (1<<26)/lowprimes[lowprimes.length-1];\n\n // (public) test primality with certainty >= 1-.5^t\n function bnIsProbablePrime(t) {\n var i, x = this.abs();\n if(x.t == 1 && x[0] <= lowprimes[lowprimes.length-1]) {\n for(i = 0; i < lowprimes.length; ++i)\n if(x[0] == lowprimes[i]) return true;\n return false;\n }\n if(x.isEven()) return false;\n i = 1;\n while(i < lowprimes.length) {\n var m = lowprimes[i], j = i+1;\n while(j < lowprimes.length && m < lplim) m *= lowprimes[j++];\n m = x.modInt(m);\n while(i < j) if(m%lowprimes[i++] == 0) return false;\n }\n return x.millerRabin(t);\n }\n\n // (protected) true if probably prime (HAC 4.24, Miller-Rabin)\n function bnpMillerRabin(t) {\n var n1 = this.subtract(BigInteger.ONE);\n var k = n1.getLowestSetBit();\n if(k <= 0) return false;\n var r = n1.shiftRight(k);\n t = (t+1)>>1;\n if(t > lowprimes.length) t = lowprimes.length;\n var a = nbi();\n for(var i = 0; i < t; ++i) {\n //Pick bases at random, instead of starting at 2\n a.fromInt(lowprimes[Math.floor(Math.random()*lowprimes.length)]);\n var y = a.modPow(r,this);\n if(y.compareTo(BigInteger.ONE) != 0 && y.compareTo(n1) != 0) {\n var j = 1;\n while(j++ < k && y.compareTo(n1) != 0) {\n y = y.modPowInt(2,this);\n if(y.compareTo(BigInteger.ONE) == 0) return false;\n }\n if(y.compareTo(n1) != 0) return false;\n }\n }\n return true;\n }\n\n // protected\n BigInteger.prototype.chunkSize = bnpChunkSize;\n BigInteger.prototype.toRadix = bnpToRadix;\n BigInteger.prototype.fromRadix = bnpFromRadix;\n BigInteger.prototype.fromNumber = bnpFromNumber;\n BigInteger.prototype.bitwiseTo = bnpBitwiseTo;\n BigInteger.prototype.changeBit = bnpChangeBit;\n BigInteger.prototype.addTo = bnpAddTo;\n BigInteger.prototype.dMultiply = bnpDMultiply;\n BigInteger.prototype.dAddOffset = bnpDAddOffset;\n BigInteger.prototype.multiplyLowerTo = bnpMultiplyLowerTo;\n BigInteger.prototype.multiplyUpperTo = bnpMultiplyUpperTo;\n BigInteger.prototype.modInt = bnpModInt;\n BigInteger.prototype.millerRabin = bnpMillerRabin;\n\n // public\n BigInteger.prototype.clone = bnClone;\n BigInteger.prototype.intValue = bnIntValue;\n BigInteger.prototype.byteValue = bnByteValue;\n BigInteger.prototype.shortValue = bnShortValue;\n BigInteger.prototype.signum = bnSigNum;\n BigInteger.prototype.toByteArray = bnToByteArray;\n BigInteger.prototype.equals = bnEquals;\n BigInteger.prototype.min = bnMin;\n BigInteger.prototype.max = bnMax;\n BigInteger.prototype.and = bnAnd;\n BigInteger.prototype.or = bnOr;\n BigInteger.prototype.xor = bnXor;\n BigInteger.prototype.andNot = bnAndNot;\n BigInteger.prototype.not = bnNot;\n BigInteger.prototype.shiftLeft = bnShiftLeft;\n BigInteger.prototype.shiftRight = bnShiftRight;\n BigInteger.prototype.getLowestSetBit = bnGetLowestSetBit;\n BigInteger.prototype.bitCount = bnBitCount;\n BigInteger.prototype.testBit = bnTestBit;\n BigInteger.prototype.setBit = bnSetBit;\n BigInteger.prototype.clearBit = bnClearBit;\n BigInteger.prototype.flipBit = bnFlipBit;\n BigInteger.prototype.add = bnAdd;\n BigInteger.prototype.subtract = bnSubtract;\n BigInteger.prototype.multiply = bnMultiply;\n BigInteger.prototype.divide = bnDivide;\n BigInteger.prototype.remainder = bnRemainder;\n BigInteger.prototype.divideAndRemainder = bnDivideAndRemainder;\n BigInteger.prototype.modPow = bnModPow;\n BigInteger.prototype.modInverse = bnModInverse;\n BigInteger.prototype.pow = bnPow;\n BigInteger.prototype.gcd = bnGCD;\n BigInteger.prototype.isProbablePrime = bnIsProbablePrime;\n\n // JSBN-specific extension\n BigInteger.prototype.square = bnSquare;\n\n // Expose the Barrett function\n BigInteger.prototype.Barrett = Barrett\n\n // BigInteger interfaces not implemented in jsbn:\n\n // BigInteger(int signum, byte[] magnitude)\n // double doubleValue()\n // float floatValue()\n // int hashCode()\n // long longValue()\n // static BigInteger valueOf(long val)\n\n // Random number generator - requires a PRNG backend, e.g. prng4.js\n\n // For best results, put code like\n // \n // in your main HTML document.\n\n var rng_state;\n var rng_pool;\n var rng_pptr;\n\n // Mix in a 32-bit integer into the pool\n function rng_seed_int(x) {\n rng_pool[rng_pptr++] ^= x & 255;\n rng_pool[rng_pptr++] ^= (x >> 8) & 255;\n rng_pool[rng_pptr++] ^= (x >> 16) & 255;\n rng_pool[rng_pptr++] ^= (x >> 24) & 255;\n if(rng_pptr >= rng_psize) rng_pptr -= rng_psize;\n }\n\n // Mix in the current time (w/milliseconds) into the pool\n function rng_seed_time() {\n rng_seed_int(new Date().getTime());\n }\n\n // Initialize the pool with junk if needed.\n if(rng_pool == null) {\n rng_pool = new Array();\n rng_pptr = 0;\n var t;\n if(typeof window !== \"undefined\" && window.crypto) {\n if (window.crypto.getRandomValues) {\n // Use webcrypto if available\n var ua = new Uint8Array(32);\n window.crypto.getRandomValues(ua);\n for(t = 0; t < 32; ++t)\n rng_pool[rng_pptr++] = ua[t];\n }\n else if(navigator.appName == \"Netscape\" && navigator.appVersion < \"5\") {\n // Extract entropy (256 bits) from NS4 RNG if available\n var z = window.crypto.random(32);\n for(t = 0; t < z.length; ++t)\n rng_pool[rng_pptr++] = z.charCodeAt(t) & 255;\n }\n }\n while(rng_pptr < rng_psize) { // extract some randomness from Math.random()\n t = Math.floor(65536 * Math.random());\n rng_pool[rng_pptr++] = t >>> 8;\n rng_pool[rng_pptr++] = t & 255;\n }\n rng_pptr = 0;\n rng_seed_time();\n //rng_seed_int(window.screenX);\n //rng_seed_int(window.screenY);\n }\n\n function rng_get_byte() {\n if(rng_state == null) {\n rng_seed_time();\n rng_state = prng_newstate();\n rng_state.init(rng_pool);\n for(rng_pptr = 0; rng_pptr < rng_pool.length; ++rng_pptr)\n rng_pool[rng_pptr] = 0;\n rng_pptr = 0;\n //rng_pool = null;\n }\n // TODO: allow reseeding after first request\n return rng_state.next();\n }\n\n function rng_get_bytes(ba) {\n var i;\n for(i = 0; i < ba.length; ++i) ba[i] = rng_get_byte();\n }\n\n function SecureRandom() {}\n\n SecureRandom.prototype.nextBytes = rng_get_bytes;\n\n // prng4.js - uses Arcfour as a PRNG\n\n function Arcfour() {\n this.i = 0;\n this.j = 0;\n this.S = new Array();\n }\n\n // Initialize arcfour context from key, an array of ints, each from [0..255]\n function ARC4init(key) {\n var i, j, t;\n for(i = 0; i < 256; ++i)\n this.S[i] = i;\n j = 0;\n for(i = 0; i < 256; ++i) {\n j = (j + this.S[i] + key[i % key.length]) & 255;\n t = this.S[i];\n this.S[i] = this.S[j];\n this.S[j] = t;\n }\n this.i = 0;\n this.j = 0;\n }\n\n function ARC4next() {\n var t;\n this.i = (this.i + 1) & 255;\n this.j = (this.j + this.S[this.i]) & 255;\n t = this.S[this.i];\n this.S[this.i] = this.S[this.j];\n this.S[this.j] = t;\n return this.S[(t + this.S[this.i]) & 255];\n }\n\n Arcfour.prototype.init = ARC4init;\n Arcfour.prototype.next = ARC4next;\n\n // Plug in your RNG constructor here\n function prng_newstate() {\n return new Arcfour();\n }\n\n // Pool size must be a multiple of 4 and greater than 32.\n // An array of bytes the size of the pool will be passed to init()\n var rng_psize = 256;\n\n if (typeof exports !== 'undefined') {\n exports = module.exports = {\n default: BigInteger,\n BigInteger: BigInteger,\n SecureRandom: SecureRandom,\n };\n } else {\n this.jsbn = {\n BigInteger: BigInteger,\n SecureRandom: SecureRandom\n };\n }\n\n}).call(this);\n" - } - ], - "filteredModules": 0, - "origins": [ - { - "module": "", - "moduleIdentifier": "", - "moduleName": "", - "loc": "main", - "request": "./src/index.ts", - "reasons": [] - } - ] - } - ], - "modules": [ - { - "id": 0, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\utils.ts", - "name": "./src/lib/utils.ts", - "index": 10, - "index2": 8, - "size": 15771, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "issuerId": 67, - "issuerName": "./src/index.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - } - ], - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 2, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts", - "module": "./src/lib/mtproto/mtprotoworker.ts", - "moduleName": "./src/lib/mtproto/mtprotoworker.ts", - "type": "cjs require", - "userRequest": "../utils", - "loc": "6:16-35" - }, - { - "moduleId": 3, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\richtextprocessor.ts", - "module": "./src/lib/richtextprocessor.ts", - "moduleName": "./src/lib/richtextprocessor.ts", - "type": "cjs require", - "userRequest": "./utils", - "loc": "7:16-34" - }, - { - "moduleId": 5, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appUsersManager.ts", - "module": "./src/lib/appManagers/appUsersManager.ts", - "moduleName": "./src/lib/appManagers/appUsersManager.ts", - "type": "cjs require", - "userRequest": "../utils", - "loc": "16:16-35" - }, - { - "moduleId": 7, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "module": "./src/lib/appManagers/appMessagesManager.ts", - "moduleName": "./src/lib/appManagers/appMessagesManager.ts", - "type": "cjs require", - "userRequest": "../utils", - "loc": "16:16-35" - }, - { - "moduleId": 8, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appPeersManager.ts", - "module": "./src/lib/appManagers/appPeersManager.ts", - "moduleName": "./src/lib/appManagers/appPeersManager.ts", - "type": "cjs require", - "userRequest": "../utils", - "loc": "9:16-35" - }, - { - "moduleId": 9, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appChatsManager.ts", - "module": "./src/lib/appManagers/appChatsManager.ts", - "moduleName": "./src/lib/appManagers/appChatsManager.ts", - "type": "cjs require", - "userRequest": "../utils", - "loc": "16:16-35" - }, - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "../utils", - "loc": "9:16-35" - }, - { - "moduleId": 12, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDocsManager.ts", - "module": "./src/lib/appManagers/appDocsManager.ts", - "moduleName": "./src/lib/appManagers/appDocsManager.ts", - "type": "cjs require", - "userRequest": "../utils", - "loc": "16:16-35" - }, - { - "moduleId": 13, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appPhotosManager.ts", - "module": "./src/lib/appManagers/appPhotosManager.ts", - "moduleName": "./src/lib/appManagers/appPhotosManager.ts", - "type": "cjs require", - "userRequest": "../utils", - "loc": "7:16-35" - }, - { - "moduleId": 14, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "module": "./src/lib/appManagers/appSidebarLeft.ts", - "moduleName": "./src/lib/appManagers/appSidebarLeft.ts", - "type": "cjs require", - "userRequest": "../utils", - "loc": "28:16-35" - }, - { - "moduleId": 15, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\animationIntersector.ts", - "module": "./src/components/animationIntersector.ts", - "moduleName": "./src/components/animationIntersector.ts", - "type": "cjs require", - "userRequest": "../lib/utils", - "loc": "4:16-39" - }, - { - "moduleId": 16, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts", - "module": "./src/lib/appManagers/appDialogsManager.ts", - "moduleName": "./src/lib/appManagers/appDialogsManager.ts", - "type": "cjs require", - "userRequest": "../utils", - "loc": "16:16-35" - }, - { - "moduleId": 18, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "module": "./src/components/wrappers.ts", - "moduleName": "./src/components/wrappers.ts", - "type": "cjs require", - "userRequest": "../lib/utils", - "loc": "19:16-39" - }, - { - "moduleId": 20, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\lottieLoader.ts", - "module": "./src/lib/lottieLoader.ts", - "moduleName": "./src/lib/lottieLoader.ts", - "type": "cjs require", - "userRequest": "./utils", - "loc": "20:16-34" - }, - { - "moduleId": 24, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", - "type": "cjs require", - "userRequest": "../utils", - "loc": "38:16-35" - }, - { - "moduleId": 26, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\horizontalMenu.ts", - "module": "./src/components/horizontalMenu.ts", - "moduleName": "./src/components/horizontalMenu.ts", - "type": "cjs require", - "userRequest": "../lib/utils", - "loc": "4:16-39" - }, - { - "moduleId": 27, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appProfileManager.ts", - "module": "./src/lib/appManagers/appProfileManager.ts", - "moduleName": "./src/lib/appManagers/appProfileManager.ts", - "type": "cjs require", - "userRequest": "../utils", - "loc": "16:16-35" - }, - { - "moduleId": 28, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDownloadManager.ts", - "module": "./src/lib/appManagers/appDownloadManager.ts", - "moduleName": "./src/lib/appManagers/appDownloadManager.ts", - "type": "cjs require", - "userRequest": "../utils", - "loc": "7:16-35" - }, - { - "moduleId": 32, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\apiUpdatesManager.ts", - "module": "./src/lib/appManagers/apiUpdatesManager.ts", - "moduleName": "./src/lib/appManagers/apiUpdatesManager.ts", - "type": "cjs require", - "userRequest": "../utils", - "loc": "10:16-35" - }, - { - "moduleId": 34, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\serverTimeManager.ts", - "module": "./src/lib/mtproto/serverTimeManager.ts", - "moduleName": "./src/lib/mtproto/serverTimeManager.ts", - "type": "cjs require", - "userRequest": "../utils", - "loc": "8:16-35" - }, - { - "moduleId": 35, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 37, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\appMediaPlaybackController.ts", - "module": "./src/components/appMediaPlaybackController.ts", - "moduleName": "./src/components/appMediaPlaybackController.ts", - "type": "cjs require", - "userRequest": "../lib/utils", - "loc": "6:16-39" - }, - { - "moduleId": 39, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 40, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appStateManager.ts", - "module": "./src/lib/appManagers/appStateManager.ts", - "moduleName": "./src/lib/appManagers/appStateManager.ts", - "type": "cjs require", - "userRequest": "../utils", - "loc": "14:16-35" - }, - { - "moduleId": 41, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 43, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 44, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appStickersManager.ts", - "module": "./src/lib/appManagers/appStickersManager.ts", - "moduleName": "./src/lib/appManagers/appStickersManager.ts", - "type": "cjs require", - "userRequest": "../utils", - "loc": "19:16-35" - }, - { - "moduleId": 47, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\index.ts", - "module": "./src/components/emoticonsDropdown/index.ts", - "moduleName": "./src/components/emoticonsDropdown/index.ts", - "type": "cjs require", - "userRequest": "../../lib/utils", - "loc": "19:16-42" - }, - { - "moduleId": 49, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 50, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mediaPlayer.ts", - "module": "./src/lib/mediaPlayer.ts", - "moduleName": "./src/lib/mediaPlayer.ts", - "type": "cjs require", - "userRequest": "./utils", - "loc": "7:16-34" - }, - { - "moduleId": 51, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 55, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appWebPagesManager.ts", - "module": "./src/lib/appManagers/appWebPagesManager.ts", - "moduleName": "./src/lib/appManagers/appWebPagesManager.ts", - "type": "cjs require", - "userRequest": "../utils", - "loc": "6:16-35" - }, - { - "moduleId": 56, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts", - "module": "./src/lib/appManagers/appMediaViewer.ts", - "moduleName": "./src/lib/appManagers/appMediaViewer.ts", - "type": "cjs require", - "userRequest": "../utils", - "loc": "22:16-35" - }, - { - "moduleId": 58, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\poll.ts", - "module": "./src/components/poll.ts", - "moduleName": "./src/components/poll.ts", - "type": "cjs require", - "userRequest": "../lib/utils", - "loc": "9:16-39" - }, - { - "moduleId": 61, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popupStickers.ts", - "module": "./src/components/popupStickers.ts", - "moduleName": "./src/components/popupStickers.ts", - "type": "cjs require", - "userRequest": "../lib/utils", - "loc": "14:16-39" - }, - { - "moduleId": 63, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\gifsMasonry.ts", - "module": "./src/components/gifsMasonry.ts", - "moduleName": "./src/components/gifsMasonry.ts", - "type": "cjs require", - "userRequest": "../lib/utils", - "loc": "15:16-39" - }, - { - "moduleId": 66, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pagePassword.ts", - "module": "./src/pages/pagePassword.ts", - "moduleName": "./src/pages/pagePassword.ts", - "type": "cjs require", - "userRequest": "../lib/utils", - "loc": "16:16-39" - }, - { - "moduleId": 67, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "module": "./src/index.ts", - "moduleName": "./src/index.ts", - "type": "cjs require", - "userRequest": "./lib/utils", - "loc": "139:66-88" - }, - { - "moduleId": 81, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pagesManager.ts", - "module": "./src/pages/pagesManager.ts", - "moduleName": "./src/pages/pagesManager.ts", - "type": "cjs require", - "userRequest": "../lib/utils", - "loc": "6:16-39" - }, - { - "moduleId": 85, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\stickers.ts", - "module": "./src/components/sidebarRight/stickers.ts", - "moduleName": "./src/components/sidebarRight/stickers.ts", - "type": "cjs require", - "userRequest": "../../lib/utils", - "loc": "28:16-42" - }, - { - "moduleId": 87, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\gifs.ts", - "module": "./src/components/sidebarRight/gifs.ts", - "moduleName": "./src/components/sidebarRight/gifs.ts", - "type": "cjs require", - "userRequest": "../../lib/utils", - "loc": "41:16-42" - }, - { - "moduleId": 91, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\contacts.ts", - "module": "./src/components/sidebarLeft/contacts.ts", - "moduleName": "./src/components/sidebarLeft/contacts.ts", - "type": "cjs require", - "userRequest": "../../lib/utils", - "loc": "30:16-42" - }, - { - "moduleId": 93, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\settings.ts", - "module": "./src/components/sidebarLeft/settings.ts", - "moduleName": "./src/components/sidebarLeft/settings.ts", - "type": "cjs require", - "userRequest": "../../lib/utils", - "loc": "26:16-42" - }, - { - "moduleId": 94, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\editProfile.ts", - "module": "./src/components/sidebarLeft/editProfile.ts", - "moduleName": "./src/components/sidebarLeft/editProfile.ts", - "type": "cjs require", - "userRequest": "../../lib/utils", - "loc": "12:16-42" - }, - { - "moduleId": 95, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\chatFolders.ts", - "module": "./src/components/sidebarLeft/chatFolders.ts", - "moduleName": "./src/components/sidebarLeft/chatFolders.ts", - "type": "cjs require", - "userRequest": "../../lib/utils", - "loc": "11:16-42" - }, - { - "moduleId": 96, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\editFolder.ts", - "module": "./src/components/sidebarLeft/editFolder.ts", - "moduleName": "./src/components/sidebarLeft/editFolder.ts", - "type": "cjs require", - "userRequest": "../../lib/utils", - "loc": "30:16-42" - }, - { - "moduleId": 97, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\includedChats.ts", - "module": "./src/components/sidebarLeft/includedChats.ts", - "moduleName": "./src/components/sidebarLeft/includedChats.ts", - "type": "cjs require", - "userRequest": "../../lib/utils", - "loc": "30:16-42" - }, - { - "moduleId": 98, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\input.ts", - "module": "./src/components/chat/input.ts", - "moduleName": "./src/components/chat/input.ts", - "type": "cjs require", - "userRequest": "../../lib/utils", - "loc": "12:16-42" - }, - { - "moduleId": 102, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\stickers.ts", - "module": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "type": "cjs require", - "userRequest": "../../../lib/utils", - "loc": "43:16-45" - }, - { - "moduleId": 103, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popupCreatePoll.ts", - "module": "./src/components/popupCreatePoll.ts", - "moduleName": "./src/components/popupCreatePoll.ts", - "type": "cjs require", - "userRequest": "../lib/utils", - "loc": "9:16-39" - }, - { - "moduleId": 104, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\bubbleGroups.ts", - "module": "./src/components/bubbleGroups.ts", - "moduleName": "./src/components/bubbleGroups.ts", - "type": "cjs require", - "userRequest": "../lib/utils", - "loc": "3:16-39" - }, - { - "moduleId": 105, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\audio.ts", - "module": "./src/components/chat/audio.ts", - "moduleName": "./src/components/chat/audio.ts", - "type": "cjs require", - "userRequest": "../../lib/utils", - "loc": "11:16-42" - }, - { - "moduleId": 106, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\contextMenu.ts", - "module": "./src/components/chat/contextMenu.ts", - "moduleName": "./src/components/chat/contextMenu.ts", - "type": "cjs require", - "userRequest": "../../lib/utils", - "loc": "11:16-42" - }, - { - "moduleId": 107, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\search.ts", - "module": "./src/components/chat/search.ts", - "moduleName": "./src/components/chat/search.ts", - "type": "cjs require", - "userRequest": "../../lib/utils", - "loc": "27:16-42" - } - ], - "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.positionElementByIndex = exports.getFileURL = exports.getEmojiToneIndex = exports.calcImageInBox = exports.fillPropertyValue = exports.encodeEntities = exports.escapeRegExp = exports.listMergeSorted = exports.deepEqual = exports.formatNumber = exports.formatBytes = exports.copy = exports.whichChild = exports.getObjectKeysAndSort = exports.findUpAttribute = exports.findUpTag = exports.findUpClassName = exports.numberWithCommas = exports.safeReplaceObject = exports.tsNow = exports.isObject = exports.langPack = exports.generatePathData = exports.$rootScope = exports.getRichElementValue = exports.placeCaretAtEnd = exports.getRichValue = exports.cancelEvent = exports.checkDragEvent = exports.isInDOM = exports.dT = void 0;\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 isInDOM(element, parentNode) {\r\n if (!element) {\r\n return false;\r\n }\r\n parentNode = parentNode || document.body;\r\n if (element == parentNode) {\r\n return true;\r\n }\r\n return isInDOM(element.parentNode, parentNode);\r\n}\r\nexports.isInDOM = isInDOM;\r\nfunction checkDragEvent(e) {\r\n if (!e || e.target && (e.target.tagName == 'IMG' || e.target.tagName == 'A'))\r\n 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 }\r\n else {\r\n return true;\r\n }\r\n return false;\r\n}\r\nexports.checkDragEvent = checkDragEvent;\r\nfunction cancelEvent(event) {\r\n event = event || window.event;\r\n if (event) {\r\n // @ts-ignore\r\n event = event.originalEvent || event;\r\n try {\r\n if (event.stopPropagation)\r\n event.stopPropagation();\r\n if (event.preventDefault)\r\n event.preventDefault();\r\n event.returnValue = false;\r\n event.cancelBubble = true;\r\n }\r\n catch (err) { }\r\n }\r\n return false;\r\n}\r\nexports.cancelEvent = cancelEvent;\r\nfunction getRichValue(field) {\r\n if (!field) {\r\n return '';\r\n }\r\n var lines = [];\r\n var line = [];\r\n getRichElementValue(field, lines, line);\r\n if (line.length) {\r\n lines.push(line.join(''));\r\n }\r\n var value = lines.join('\\n');\r\n value = value.replace(/\\u00A0/g, ' ');\r\n return value;\r\n}\r\nexports.getRichValue = getRichValue;\r\nfunction placeCaretAtEnd(el) {\r\n el.focus();\r\n if (typeof window.getSelection != \"undefined\" && 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 // @ts-ignore\r\n }\r\n else if (typeof document.body.createTextRange != \"undefined\") {\r\n // @ts-ignore\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\nexports.placeCaretAtEnd = placeCaretAtEnd;\r\nfunction 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 }\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\nexports.getRichElementValue = getRichElementValue;\r\nexports.$rootScope = {\r\n $broadcast: (name, detail) => {\r\n /* if(name != 'user_update') {\r\n console.debug(dT(), 'Broadcasting ' + name + ' event, with args:', detail);\r\n } */\r\n let myCustomEvent = new CustomEvent(name, { detail });\r\n document.dispatchEvent(myCustomEvent);\r\n },\r\n $on: (name, callback) => {\r\n // @ts-ignore\r\n document.addEventListener(name, callback);\r\n },\r\n $off: (name, callback) => {\r\n // @ts-ignore\r\n document.removeEventListener(name, callback);\r\n },\r\n selectedPeerID: 0,\r\n myID: 0,\r\n idle: {\r\n isIDLE: false\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\nfunction generatePathData(x, y, width, height, tl, tr, br, bl) {\r\n var data = [];\r\n // start point in top-middle of the rectangle\r\n data.push('M' + (x + width / 2) + ',' + y);\r\n // next we go to the right\r\n data.push('H' + (x + width - tr));\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 // next we go down\r\n data.push('V' + (y + height - br));\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 // now we go to the left\r\n data.push('H' + (x + bl));\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 // next we go up\r\n data.push('V' + (y + tl));\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 // and we close the path\r\n data.push('Z');\r\n return data.join(' ');\r\n}\r\nexports.generatePathData = generatePathData;\r\n;\r\nexports.langPack = {\r\n \"messageActionChatCreate\": \"created the group\",\r\n \"messageActionChatEditTitle\": \"changed group name\",\r\n \"messageActionChatEditPhoto\": \"changed group photo\",\r\n \"messageActionChatDeletePhoto\": \"removed group photo\",\r\n \"messageActionChatReturn\": \"returned to group\",\r\n \"messageActionChatJoined\": \"joined the group\",\r\n \"messageActionChatAddUser\": \"invited {user}\",\r\n \"messageActionChatAddUsers\": \"invited {} users\",\r\n \"messageActionChatLeave\": \"left the group\",\r\n \"messageActionChatDeleteUser\": \"removed user\",\r\n \"messageActionChatJoinedByLink\": \"joined the group\",\r\n \"messageActionPinMessage\": \"pinned message\",\r\n \"messageActionContactSignUp\": \"joined Telegram\",\r\n \"messageActionChannelCreate\": \"Channel created\",\r\n \"messageActionChannelEditTitle\": \"Channel renamed\",\r\n \"messageActionChannelEditPhoto\": \"Channel photo updated\",\r\n \"messageActionChannelDeletePhoto\": \"Channel photo removed\",\r\n \"messageActionHistoryClear\": \"\",\r\n \"messageActionChannelMigrateFrom\": \"\",\r\n \"messageActionPhoneCall.in_ok\": \"Incoming Call\",\r\n \"messageActionPhoneCall.out_ok\": \"Outgoing Call\",\r\n \"messageActionPhoneCall.in_missed\": \"Missed Call\",\r\n \"messageActionPhoneCall.out_missed\": \"Cancelled Call\",\r\n};\r\nfunction isObject(object) {\r\n return typeof (object) === 'object' && object !== null;\r\n}\r\nexports.isObject = isObject;\r\nfunction tsNow(seconds) {\r\n var t = +new Date();\r\n return seconds ? Math.floor(t / 1000) : t;\r\n}\r\nexports.tsNow = tsNow;\r\nfunction 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)) { // useless\r\n wasObject[key] = newObject[key];\r\n //}\r\n }\r\n}\r\nexports.safeReplaceObject = safeReplaceObject;\r\nfunction 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\nexports.numberWithCommas = numberWithCommas;\r\n//export function findUpClassName(el: any, className: string): T;\r\nfunction findUpClassName(el, className) {\r\n if (el.classList.contains(className))\r\n return el; // 03.02.2020\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\nexports.findUpClassName = findUpClassName;\r\nfunction findUpTag(el, tag) {\r\n if (el.tagName == tag)\r\n return el; // 03.02.2020\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\nexports.findUpTag = findUpTag;\r\nfunction findUpAttribute(el, attribute) {\r\n if (el.getAttribute(attribute) != null)\r\n return el; // 03.02.2020\r\n while (el.parentElement) {\r\n el = el.parentElement;\r\n if (el.getAttribute(attribute) != null)\r\n return el;\r\n }\r\n return null;\r\n}\r\nexports.findUpAttribute = findUpAttribute;\r\nfunction getObjectKeysAndSort(object, sort = 'asc') {\r\n const ids = Object.keys(object).map(i => +i);\r\n if (sort == 'asc')\r\n return ids.sort((a, b) => a - b);\r\n else\r\n return ids.sort((a, b) => b - a);\r\n}\r\nexports.getObjectKeysAndSort = getObjectKeysAndSort;\r\nfunction whichChild(elem) {\r\n if (!elem.parentNode) {\r\n return -1;\r\n }\r\n let i = 0;\r\n // @ts-ignore\r\n while ((elem = elem.previousElementSibling) != null)\r\n ++i;\r\n return i;\r\n}\r\nexports.whichChild = whichChild;\r\n;\r\nfunction copy(obj) {\r\n //in case of premitives\r\n if (obj === null || typeof obj !== \"object\") {\r\n return obj;\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 //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 //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\nexports.copy = copy;\r\nfunction formatBytes(bytes, decimals = 2) {\r\n if (bytes === 0)\r\n return '0 Bytes';\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 const i = Math.floor(Math.log(bytes) / Math.log(k));\r\n return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];\r\n}\r\nexports.formatBytes = formatBytes;\r\nfunction formatNumber(bytes, decimals = 2) {\r\n if (bytes === 0)\r\n return '0';\r\n const k = 1000;\r\n const dm = decimals < 0 ? 0 : decimals;\r\n const sizes = ['', 'K', 'M', 'B', 'T'];\r\n const i = Math.floor(Math.log(bytes) / Math.log(k));\r\n return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + sizes[i];\r\n}\r\nexports.formatNumber = formatNumber;\r\nfunction deepEqual(x, y) {\r\n const ok = Object.keys, tx = typeof x, ty = typeof y;\r\n return x && y && tx === 'object' && tx === ty ? (ok(x).length === ok(y).length &&\r\n ok(x).every(key => deepEqual(x[key], y[key]))) : (x === y);\r\n}\r\nexports.deepEqual = deepEqual;\r\nfunction listMergeSorted(list1, list2) {\r\n list1 = list1 || [];\r\n list2 = list2 || [];\r\n var result = copy(list1);\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 return result;\r\n}\r\nexports.listMergeSorted = listMergeSorted;\r\n// credits to https://github.com/sindresorhus/escape-string-regexp/blob/master/index.js\r\nfunction escapeRegExp(str) {\r\n return str\r\n .replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&')\r\n .replace(/-/g, '\\\\x2d');\r\n}\r\nexports.escapeRegExp = escapeRegExp;\r\nfunction encodeEntities(value) {\r\n return value.replace(/&/g, '&').replace(/[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g, (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, (value) => {\r\n return '&#' + value.charCodeAt(0) + ';';\r\n }).replace(//g, '>');\r\n}\r\nexports.encodeEntities = encodeEntities;\r\nfunction fillPropertyValue(str) {\r\n let splitted = str.split(' ');\r\n if (splitted.length != 4) {\r\n if (!splitted[0])\r\n 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 return splitted;\r\n}\r\nexports.fillPropertyValue = fillPropertyValue;\r\nfunction calcImageInBox(imageW, imageH, boxW, boxH, noZoom) {\r\n if (imageW < boxW && imageH < boxH) {\r\n return { w: imageW, h: imageH };\r\n }\r\n var boxedImageW = boxW;\r\n var boxedImageH = boxH;\r\n if ((imageW / imageH) > (boxW / boxH)) {\r\n boxedImageH = (imageH * boxW / imageW) | 0;\r\n }\r\n else {\r\n boxedImageW = (imageW * boxH / imageH) | 0;\r\n if (boxedImageW > boxW) {\r\n boxedImageH = (boxedImageH * boxW / boxedImageW) | 0;\r\n boxedImageW = boxW;\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 if (noZoom && boxedImageW >= imageW && boxedImageH >= imageH) {\r\n boxedImageW = imageW;\r\n boxedImageH = imageH;\r\n }\r\n return { w: boxedImageW, h: boxedImageH };\r\n}\r\nexports.calcImageInBox = calcImageInBox;\r\nfunction getEmojiToneIndex(input) {\r\n let match = input.match(/[\\uDFFB-\\uDFFF]/);\r\n return match ? 5 - (57343 - match[0].charCodeAt(0)) : 0;\r\n}\r\nexports.getEmojiToneIndex = getEmojiToneIndex;\r\nfunction getFileURL(type, options) {\r\n //console.log('getFileURL', location);\r\n //const perf = performance.now();\r\n const encoded = encodeURIComponent(JSON.stringify(options));\r\n //console.log('getFileURL encode:', performance.now() - perf, encoded);\r\n return '/' + type + '/' + encoded;\r\n}\r\nexports.getFileURL = getFileURL;\r\nfunction positionElementByIndex(element, container, pos) {\r\n const prevPos = whichChild(element);\r\n if (prevPos == pos) {\r\n return false;\r\n }\r\n else if (prevPos != -1 && prevPos < pos) { // was higher\r\n pos += 1;\r\n }\r\n if (container.childElementCount > pos) {\r\n container.insertBefore(element, container.children[pos]);\r\n }\r\n else {\r\n container.append(element);\r\n }\r\n return true;\r\n}\r\nexports.positionElementByIndex = positionElementByIndex;\r\n" - }, - { - "id": 1, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\config.ts", - "name": "./src/lib/config.ts", - "index": 7, - "index2": 7, - "size": 117449, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "issuerId": 67, - "issuerName": "./src/index.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - } - ], - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 2, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts", - "module": "./src/lib/mtproto/mtprotoworker.ts", - "moduleName": "./src/lib/mtproto/mtprotoworker.ts", - "type": "cjs require", - "userRequest": "../config", - "loc": "12:17-37" - }, - { - "moduleId": 3, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\richtextprocessor.ts", - "module": "./src/lib/richtextprocessor.ts", - "moduleName": "./src/lib/richtextprocessor.ts", - "type": "cjs require", - "userRequest": "./config", - "loc": "8:33-52" - }, - { - "moduleId": 4, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\misc.ts", - "module": "./src/components/misc.ts", - "moduleName": "./src/components/misc.ts", - "type": "cjs require", - "userRequest": "../lib/config", - "loc": "23:30-54" - }, - { - "moduleId": 6, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\scrollable_new.ts", - "module": "./src/components/scrollable_new.ts", - "moduleName": "./src/components/scrollable_new.ts", - "type": "cjs require", - "userRequest": "../lib/config", - "loc": "8:17-41" - }, - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "../config", - "loc": "36:17-37" - }, - { - "moduleId": 12, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDocsManager.ts", - "module": "./src/lib/appManagers/appDocsManager.ts", - "moduleName": "./src/lib/appManagers/appDocsManager.ts", - "type": "cjs require", - "userRequest": "../config", - "loc": "21:17-37" - }, - { - "moduleId": 16, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts", - "module": "./src/lib/appManagers/appDialogsManager.ts", - "moduleName": "./src/lib/appManagers/appDialogsManager.ts", - "type": "cjs require", - "userRequest": "../config", - "loc": "30:17-37" - }, - { - "moduleId": 17, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\ripple.ts", - "module": "./src/components/ripple.ts", - "moduleName": "./src/components/ripple.ts", - "type": "cjs require", - "userRequest": "../lib/config", - "loc": "4:17-41" - }, - { - "moduleId": 18, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "module": "./src/components/wrappers.ts", - "moduleName": "./src/components/wrappers.ts", - "type": "cjs require", - "userRequest": "../lib/config", - "loc": "27:17-41" - }, - { - "moduleId": 20, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\lottieLoader.ts", - "module": "./src/lib/lottieLoader.ts", - "moduleName": "./src/lib/lottieLoader.ts", - "type": "cjs require", - "userRequest": "./config", - "loc": "16:17-36" - }, - { - "moduleId": 24, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", - "type": "cjs require", - "userRequest": "../config", - "loc": "52:17-37" - }, - { - "moduleId": 37, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\appMediaPlaybackController.ts", - "module": "./src/components/appMediaPlaybackController.ts", - "moduleName": "./src/components/appMediaPlaybackController.ts", - "type": "cjs require", - "userRequest": "../lib/config", - "loc": "9:17-41" - }, - { - "moduleId": 38, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 47, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\index.ts", - "module": "./src/components/emoticonsDropdown/index.ts", - "moduleName": "./src/components/emoticonsDropdown/index.ts", - "type": "cjs require", - "userRequest": "../../lib/config", - "loc": "18:17-44" - }, - { - "moduleId": 49, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 50, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mediaPlayer.ts", - "module": "./src/lib/mediaPlayer.ts", - "moduleName": "./src/lib/mediaPlayer.ts", - "type": "cjs require", - "userRequest": "./config", - "loc": "8:17-36" - }, - { - "moduleId": 54, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\opusDecodeController.ts", - "module": "./src/lib/opusDecodeController.ts", - "moduleName": "./src/lib/opusDecodeController.ts", - "type": "cjs require", - "userRequest": "./config", - "loc": "13:17-36" - }, - { - "moduleId": 56, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts", - "module": "./src/lib/appManagers/appMediaViewer.ts", - "moduleName": "./src/lib/appManagers/appMediaViewer.ts", - "type": "cjs require", - "userRequest": "../config", - "loc": "28:17-37" - }, - { - "moduleId": 58, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\poll.ts", - "module": "./src/components/poll.ts", - "moduleName": "./src/components/poll.ts", - "type": "cjs require", - "userRequest": "../lib/config", - "loc": "10:17-41" - }, - { - "moduleId": 66, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pagePassword.ts", - "module": "./src/pages/pagePassword.ts", - "moduleName": "./src/pages/pagePassword.ts", - "type": "cjs require", - "userRequest": "../lib/config", - "loc": "14:17-41" - }, - { - "moduleId": 67, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "module": "./src/index.ts", - "moduleName": "./src/index.ts", - "type": "cjs require", - "userRequest": "./lib/config", - "loc": "62:50-73" - }, - { - "moduleId": 79, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageAuthCode.ts", - "module": "./src/pages/pageAuthCode.ts", - "moduleName": "./src/pages/pageAuthCode.ts", - "type": "cjs require", - "userRequest": "../lib/config", - "loc": "16:17-41" - }, - { - "moduleId": 84, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\audio.ts", - "module": "./src/components/audio.ts", - "moduleName": "./src/components/audio.ts", - "type": "cjs require", - "userRequest": "../lib/config", - "loc": "13:17-41" - }, - { - "moduleId": 98, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\input.ts", - "module": "./src/components/chat/input.ts", - "moduleName": "./src/components/chat/input.ts", - "type": "cjs require", - "userRequest": "../../lib/config", - "loc": "19:17-44" - }, - { - "moduleId": 101, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\emoji.ts", - "module": "./src/components/emoticonsDropdown/tabs/emoji.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/emoji.ts", - "type": "cjs require", - "userRequest": "../../../lib/config", - "loc": "8:33-63" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 1, - "source": "\"use strict\";\r\n/*!\r\n * Webogram v0.7.0 - messaging web application for MTProto\r\n * https://github.com/zhukov/webogram\r\n * Copyright (C) 2014 Igor Zhukov \r\n * https://github.com/zhukov/webogram/blob/master/LICENSE\r\n */\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.isServiceWorkerSupported = exports.touchSupport = exports.mediaSizes = exports.LatinizeMap = exports.TLD = exports.Countries = exports.Emoji = exports.isAppleMobile = exports.isApple = exports.isAndroid = exports.isSafari = void 0;\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 userAgent_1 = require(\"../helpers/userAgent\");\r\nObject.defineProperty(exports, \"isSafari\", { enumerable: true, get: function () { return userAgent_1.isSafari; } });\r\nObject.defineProperty(exports, \"isAndroid\", { enumerable: true, get: function () { return userAgent_1.isAndroid; } });\r\nObject.defineProperty(exports, \"isApple\", { enumerable: true, get: function () { return userAgent_1.isApple; } });\r\nObject.defineProperty(exports, \"isAppleMobile\", { enumerable: true, get: function () { return userAgent_1.isAppleMobile; } });\r\n// !WARNING, ТУТ СЛОЖНО! по-хорошему, надо бы это переделать без fe0f, но они здесь необходимы чтобы отрендерить панель, и ниже дописаны 3 элемента которые не воспроизводятся без fe0f\r\nexports.Emoji = { \"2049\": 6356, \"2122\": 6364, \"2139\": 6389, \"2194\": 6269, \"2195\": 6268, \"2196\": 6267, \"2197\": 6261, \"2198\": 6263, \"2199\": 6265, \"2328\": 680, \"2600\": 4177, \"2601\": 4185, \"2602\": 4200, \"2603\": 4205, \"2604\": 4207, \"2611\": 6341, \"2614\": 4201, \"2615\": 3101, \"2618\": 2123, \"2620\": 194, \"2622\": 6258, \"2623\": 6259, \"2626\": 6288, \"2638\": 6285, \"2639\": 166, \"2648\": 6293, \"2649\": 6294, \"2650\": 6301, \"2651\": 6302, \"2652\": 6303, \"2653\": 6304, \"2660\": 567, \"2663\": 570, \"2665\": 568, \"2666\": 569, \"2668\": 457, \"2692\": 6184, \"2693\": 4110, \"2694\": 6187, \"2696\": 6195, \"2697\": 6201, \"2699\": 6193, \"2702\": 6171, \"2705\": 6340, \"2708\": 4118, \"2709\": 6132, \"2712\": 6146, \"2714\": 6342, \"2716\": 6343, \"2721\": 6284, \"2728\": 56, \"2733\": 6352, \"2734\": 6353, \"2744\": 4204, \"2747\": 6354, \"2753\": 6357, \"2754\": 6358, \"2755\": 6359, \"2757\": 6360, \"2763\": 1125, \"2764\": 1127, \"2795\": 6346, \"2796\": 6347, \"2797\": 6348, \"2934\": 6272, \"2935\": 6273, \"3030\": 6361, \"3297\": 6413, \"3299\": 6414, \"0023-20e3\": 6365, \"002a-20e3\": 6366, \"0030-20e3\": 6367, \"0031-20e3\": 6368, \"0032-20e3\": 6369, \"0033-20e3\": 6370, \"0034-20e3\": 6371, \"0035-20e3\": 6372, \"0036-20e3\": 6373, \"0037-20e3\": 6374, \"0038-20e3\": 6375, \"0039-20e3\": 6376, \"00a9\": 6362, \"00ae\": 6363, \"1f004\": 573, \"1f0cf\": 572, \"1f170\": 6383, \"1f171\": 6385, \"1f17e\": 6394, \"1f17f\": 6396, \"1f18e\": 6384, \"1f191\": 6386, \"1f192\": 6387, \"1f193\": 6388, \"1f194\": 6390, \"1f195\": 6392, \"1f196\": 6393, \"1f197\": 6395, \"1f198\": 6397, \"1f199\": 6398, \"1f19a\": 6399, \"1f1e6-1f1e8\": 78, \"1f1e6-1f1e9\": 79, \"1f1e6-1f1ea\": 710, \"1f1e6-1f1eb\": 711, \"1f1e6-1f1ec\": 712, \"1f1e6-1f1ee\": 713, \"1f1e6-1f1f1\": 714, \"1f1e6-1f1f2\": 715, \"1f1e6-1f1f4\": 716, \"1f1e6-1f1f6\": 717, \"1f1e6-1f1f7\": 718, \"1f1e6-1f1f8\": 719, \"1f1e6-1f1f9\": 720, \"1f1e6-1f1fa\": 721, \"1f1e6-1f1fc\": 722, \"1f1e6-1f1fd\": 723, \"1f1e6-1f1ff\": 724, \"1f1e7-1f1e6\": 725, \"1f1e7-1f1e7\": 726, \"1f1e7-1f1e9\": 727, \"1f1e7-1f1ea\": 728, \"1f1e7-1f1eb\": 729, \"1f1e7-1f1ec\": 730, \"1f1e7-1f1ed\": 731, \"1f1e7-1f1ee\": 732, \"1f1e7-1f1ef\": 733, \"1f1e7-1f1f1\": 734, \"1f1e7-1f1f2\": 735, \"1f1e7-1f1f3\": 736, \"1f1e7-1f1f4\": 737, \"1f1e7-1f1f6\": 738, \"1f1e7-1f1f7\": 739, \"1f1e7-1f1f8\": 740, \"1f1e7-1f1f9\": 741, \"1f1e7-1f1fb\": 742, \"1f1e7-1f1fc\": 743, \"1f1e7-1f1fe\": 744, \"1f1e7-1f1ff\": 745, \"1f1e8-1f1e6\": 746, \"1f1e8-1f1e8\": 747, \"1f1e8-1f1e9\": 748, \"1f1e8-1f1eb\": 749, \"1f1e8-1f1ec\": 750, \"1f1e8-1f1ed\": 751, \"1f1e8-1f1ee\": 752, \"1f1e8-1f1f0\": 753, \"1f1e8-1f1f1\": 754, \"1f1e8-1f1f2\": 755, \"1f1e8-1f1f3\": 756, \"1f1e8-1f1f4\": 757, \"1f1e8-1f1f5\": 758, \"1f1e8-1f1f7\": 759, \"1f1e8-1f1fa\": 760, \"1f1e8-1f1fb\": 761, \"1f1e8-1f1fc\": 762, \"1f1e8-1f1fd\": 763, \"1f1e8-1f1fe\": 764, \"1f1e8-1f1ff\": 765, \"1f1e9-1f1ea\": 766, \"1f1e9-1f1ec\": 767, \"1f1e9-1f1ef\": 768, \"1f1e9-1f1f0\": 769, \"1f1e9-1f1f2\": 770, \"1f1e9-1f1f4\": 771, \"1f1e9-1f1ff\": 772, \"1f1ea-1f1e6\": 773, \"1f1ea-1f1e8\": 774, \"1f1ea-1f1ea\": 775, \"1f1ea-1f1ec\": 776, \"1f1ea-1f1ed\": 777, \"1f1ea-1f1f7\": 778, \"1f1ea-1f1f8\": 779, \"1f1ea-1f1f9\": 780, \"1f1ea-1f1fa\": 781, \"1f1eb-1f1ee\": 782, \"1f1eb-1f1ef\": 783, \"1f1eb-1f1f0\": 784, \"1f1eb-1f1f2\": 785, \"1f1eb-1f1f4\": 786, \"1f1eb-1f1f7\": 787, \"1f1ec-1f1e6\": 788, \"1f1ec-1f1e7\": 789, \"1f1ec-1f1e9\": 790, \"1f1ec-1f1ea\": 791, \"1f1ec-1f1eb\": 792, \"1f1ec-1f1ec\": 793, \"1f1ec-1f1ed\": 794, \"1f1ec-1f1ee\": 795, \"1f1ec-1f1f1\": 796, \"1f1ec-1f1f2\": 797, \"1f1ec-1f1f3\": 798, \"1f1ec-1f1f5\": 799, \"1f1ec-1f1f6\": 7100, \"1f1ec-1f1f7\": 7101, \"1f1ec-1f1f8\": 7102, \"1f1ec-1f1f9\": 7103, \"1f1ec-1f1fa\": 7104, \"1f1ec-1f1fc\": 7105, \"1f1ec-1f1fe\": 7106, \"1f1ed-1f1f0\": 7107, \"1f1ed-1f1f2\": 7108, \"1f1ed-1f1f3\": 7109, \"1f1ed-1f1f7\": 7110, \"1f1ed-1f1f9\": 7111, \"1f1ed-1f1fa\": 7112, \"1f1ee-1f1e8\": 7113, \"1f1ee-1f1e9\": 7114, \"1f1ee-1f1ea\": 7115, \"1f1ee-1f1f1\": 7116, \"1f1ee-1f1f2\": 7117, \"1f1ee-1f1f3\": 7118, \"1f1ee-1f1f4\": 7119, \"1f1ee-1f1f6\": 7120, \"1f1ee-1f1f7\": 7121, \"1f1ee-1f1f8\": 7122, \"1f1ee-1f1f9\": 7123, \"1f1ef-1f1ea\": 7124, \"1f1ef-1f1f2\": 7125, \"1f1ef-1f1f4\": 7126, \"1f1ef-1f1f5\": 7127, \"1f1f0-1f1ea\": 7128, \"1f1f0-1f1ec\": 7129, \"1f1f0-1f1ed\": 7130, \"1f1f0-1f1ee\": 7131, \"1f1f0-1f1f2\": 7132, \"1f1f0-1f1f3\": 7133, \"1f1f0-1f1f5\": 7134, \"1f1f0-1f1f7\": 7135, \"1f1f0-1f1fc\": 7136, \"1f1f0-1f1fe\": 7137, \"1f1f0-1f1ff\": 7138, \"1f1f1-1f1e6\": 7139, \"1f1f1-1f1e7\": 7140, \"1f1f1-1f1e8\": 7141, \"1f1f1-1f1ee\": 7142, \"1f1f1-1f1f0\": 7143, \"1f1f1-1f1f7\": 7144, \"1f1f1-1f1f8\": 7145, \"1f1f1-1f1f9\": 7146, \"1f1f1-1f1fa\": 7147, \"1f1f1-1f1fb\": 7148, \"1f1f1-1f1fe\": 7149, \"1f1f2-1f1e6\": 7150, \"1f1f2-1f1e8\": 7151, \"1f1f2-1f1e9\": 7152, \"1f1f2-1f1ea\": 7153, \"1f1f2-1f1eb\": 7154, \"1f1f2-1f1ec\": 7155, \"1f1f2-1f1ed\": 7156, \"1f1f2-1f1f0\": 7157, \"1f1f2-1f1f1\": 7158, \"1f1f2-1f1f2\": 7159, \"1f1f2-1f1f3\": 7160, \"1f1f2-1f1f4\": 7161, \"1f1f2-1f1f5\": 7162, \"1f1f2-1f1f6\": 7163, \"1f1f2-1f1f7\": 7164, \"1f1f2-1f1f8\": 7165, \"1f1f2-1f1f9\": 7166, \"1f1f2-1f1fa\": 7167, \"1f1f2-1f1fb\": 7168, \"1f1f2-1f1fc\": 7169, \"1f1f2-1f1fd\": 7170, \"1f1f2-1f1fe\": 7171, \"1f1f2-1f1ff\": 7172, \"1f1f3-1f1e6\": 7173, \"1f1f3-1f1e8\": 7174, \"1f1f3-1f1ea\": 7175, \"1f1f3-1f1eb\": 7176, \"1f1f3-1f1ec\": 7177, \"1f1f3-1f1ee\": 7178, \"1f1f3-1f1f1\": 7179, \"1f1f3-1f1f4\": 7180, \"1f1f3-1f1f5\": 7181, \"1f1f3-1f1f7\": 7182, \"1f1f3-1f1fa\": 7183, \"1f1f3-1f1ff\": 7184, \"1f1f4-1f1f2\": 7185, \"1f1f5-1f1e6\": 7186, \"1f1f5-1f1ea\": 7187, \"1f1f5-1f1eb\": 7188, \"1f1f5-1f1ec\": 7189, \"1f1f5-1f1ed\": 7190, \"1f1f5-1f1f0\": 7191, \"1f1f5-1f1f1\": 7192, \"1f1f5-1f1f2\": 7193, \"1f1f5-1f1f3\": 7194, \"1f1f5-1f1f7\": 7195, \"1f1f5-1f1f8\": 7196, \"1f1f5-1f1f9\": 7197, \"1f1f5-1f1fc\": 7198, \"1f1f5-1f1fe\": 7199, \"1f1f6-1f1e6\": 7200, \"1f1f7-1f1ea\": 7201, \"1f1f7-1f1f4\": 7202, \"1f1f7-1f1f8\": 7203, \"1f1f7-1f1fa\": 7204, \"1f1f7-1f1fc\": 7205, \"1f1f8-1f1e6\": 7206, \"1f1f8-1f1e7\": 7207, \"1f1f8-1f1e8\": 7208, \"1f1f8-1f1e9\": 7209, \"1f1f8-1f1ea\": 7210, \"1f1f8-1f1ec\": 7211, \"1f1f8-1f1ed\": 7212, \"1f1f8-1f1ee\": 7213, \"1f1f8-1f1ef\": 7214, \"1f1f8-1f1f0\": 7215, \"1f1f8-1f1f1\": 7216, \"1f1f8-1f1f2\": 7217, \"1f1f8-1f1f3\": 7218, \"1f1f8-1f1f4\": 7219, \"1f1f8-1f1f7\": 7220, \"1f1f8-1f1f8\": 7221, \"1f1f8-1f1f9\": 7222, \"1f1f8-1f1fb\": 7223, \"1f1f8-1f1fd\": 7224, \"1f1f8-1f1fe\": 7225, \"1f1f8-1f1ff\": 7226, \"1f1f9-1f1e6\": 7227, \"1f1f9-1f1e8\": 7228, \"1f1f9-1f1e9\": 7229, \"1f1f9-1f1eb\": 7230, \"1f1f9-1f1ec\": 7231, \"1f1f9-1f1ed\": 7232, \"1f1f9-1f1ef\": 7233, \"1f1f9-1f1f0\": 7234, \"1f1f9-1f1f1\": 7235, \"1f1f9-1f1f2\": 7236, \"1f1f9-1f1f3\": 7237, \"1f1f9-1f1f4\": 7238, \"1f1f9-1f1f7\": 7239, \"1f1f9-1f1f9\": 7240, \"1f1f9-1f1fb\": 7241, \"1f1f9-1f1fc\": 7242, \"1f1f9-1f1ff\": 7243, \"1f1fa-1f1e6\": 7244, \"1f1fa-1f1ec\": 7245, \"1f1fa-1f1f2\": 7246, \"1f1fa-1f1f3\": 7247, \"1f1fa-1f1f8\": 7248, \"1f1fa-1f1fe\": 7249, \"1f1fa-1f1ff\": 7250, \"1f1fb-1f1e6\": 7251, \"1f1fb-1f1e8\": 7252, \"1f1fb-1f1ea\": 7253, \"1f1fb-1f1ec\": 7254, \"1f1fb-1f1ee\": 7255, \"1f1fb-1f1f3\": 7256, \"1f1fb-1f1fa\": 7257, \"1f1fc-1f1eb\": 7258, \"1f1fc-1f1f8\": 7259, \"1f1fd-1f1f0\": 7260, \"1f1fe-1f1ea\": 7261, \"1f1fe-1f1f9\": 7262, \"1f1ff-1f1e6\": 7263, \"1f1ff-1f1f2\": 7264, \"1f1ff-1f1fc\": 7265, \"1f201\": 6400, \"1f202\": 6401, \"1f21a\": 6407, \"1f22f\": 6404, \"1f232\": 6408, \"1f233\": 6412, \"1f234\": 6411, \"1f235\": 6416, \"1f236\": 6403, \"1f237\": 6402, \"1f238\": 6410, \"1f239\": 6406, \"1f23a\": 6415, \"1f250\": 6405, \"1f251\": 6409, \"1f300\": 4197, \"1f301\": 449, \"1f302\": 4199, \"1f303\": 450, \"1f304\": 452, \"1f305\": 453, \"1f306\": 454, \"1f307\": 455, \"1f308\": 4198, \"1f309\": 456, \"1f30a\": 4210, \"1f30b\": 410, \"1f30c\": 4184, \"1f30d\": 41, \"1f30e\": 42, \"1f30f\": 43, \"1f310\": 44, \"1f311\": 4164, \"1f312\": 4165, \"1f313\": 4166, \"1f314\": 4167, \"1f315\": 4168, \"1f316\": 4169, \"1f317\": 4170, \"1f318\": 4171, \"1f319\": 4172, \"1f31a\": 4173, \"1f31b\": 4174, \"1f31c\": 4175, \"1f31d\": 4178, \"1f31e\": 4179, \"1f31f\": 4182, \"1f320\": 4183, \"1f321\": 4176, \"1f324\": 4188, \"1f325\": 4189, \"1f326\": 4190, \"1f327\": 4191, \"1f328\": 4192, \"1f329\": 4193, \"1f32a\": 4194, \"1f32b\": 4195, \"1f32c\": 4196, \"1f32d\": 347, \"1f32e\": 349, \"1f32f\": 350, \"1f330\": 331, \"1f331\": 2116, \"1f332\": 2117, \"1f333\": 2118, \"1f334\": 2119, \"1f335\": 2120, \"1f336\": 323, \"1f337\": 2115, \"1f338\": 2107, \"1f339\": 2110, \"1f33a\": 2112, \"1f33b\": 2113, \"1f33c\": 2114, \"1f33d\": 322, \"1f33e\": 2121, \"1f33f\": 2122, \"1f340\": 2124, \"1f341\": 2125, \"1f342\": 2126, \"1f343\": 2127, \"1f344\": 329, \"1f345\": 316, \"1f346\": 319, \"1f347\": 31, \"1f348\": 32, \"1f349\": 33, \"1f34a\": 34, \"1f34b\": 35, \"1f34c\": 36, \"1f34d\": 37, \"1f34e\": 39, \"1f34f\": 310, \"1f350\": 311, \"1f351\": 312, \"1f352\": 313, \"1f353\": 314, \"1f354\": 344, \"1f355\": 346, \"1f356\": 340, \"1f357\": 341, \"1f358\": 364, \"1f359\": 365, \"1f35a\": 366, \"1f35b\": 367, \"1f35c\": 368, \"1f35d\": 369, \"1f35e\": 332, \"1f35f\": 345, \"1f360\": 370, \"1f361\": 376, \"1f362\": 371, \"1f363\": 372, \"1f364\": 373, \"1f365\": 374, \"1f366\": 385, \"1f367\": 386, \"1f368\": 387, \"1f369\": 388, \"1f36a\": 389, \"1f36b\": 394, \"1f36c\": 395, \"1f36d\": 396, \"1f36e\": 397, \"1f36f\": 398, \"1f370\": 391, \"1f371\": 363, \"1f372\": 356, \"1f373\": 354, \"1f374\": 3118, \"1f375\": 3102, \"1f376\": 3103, \"1f377\": 3105, \"1f378\": 3106, \"1f379\": 3107, \"1f37a\": 3108, \"1f37b\": 3109, \"1f37c\": 399, \"1f37d\": 3117, \"1f37e\": 3104, \"1f37f\": 359, \"1f380\": 517, \"1f381\": 518, \"1f382\": 390, \"1f383\": 51, \"1f384\": 52, \"1f385\": 1326, \"1f386\": 53, \"1f387\": 54, \"1f388\": 57, \"1f389\": 58, \"1f38a\": 59, \"1f38b\": 510, \"1f38c\": 73, \"1f38d\": 511, \"1f38e\": 512, \"1f38f\": 513, \"1f390\": 514, \"1f391\": 515, \"1f392\": 625, \"1f393\": 637, \"1f396\": 522, \"1f397\": 519, \"1f399\": 656, \"1f39a\": 657, \"1f39b\": 658, \"1f39e\": 689, \"1f39f\": 520, \"1f3a0\": 458, \"1f3a1\": 459, \"1f3a2\": 460, \"1f3a3\": 549, \"1f3a4\": 659, \"1f3a5\": 688, \"1f3a6\": 6324, \"1f3a7\": 660, \"1f3a8\": 577, \"1f3a9\": 636, \"1f3aa\": 462, \"1f3ab\": 521, \"1f3ac\": 691, \"1f3ad\": 575, \"1f3ae\": 561, \"1f3af\": 555, \"1f3b0\": 563, \"1f3b1\": 558, \"1f3b2\": 564, \"1f3b3\": 537, \"1f3b4\": 574, \"1f3b5\": 654, \"1f3b6\": 655, \"1f3b7\": 662, \"1f3b8\": 663, \"1f3b9\": 664, \"1f3ba\": 665, \"1f3bb\": 666, \"1f3bc\": 653, \"1f3bd\": 551, \"1f3be\": 535, \"1f3bf\": 552, \"1f3c0\": 531, \"1f3c1\": 71, \"1f3c2\": 1397, \"1f3c3-200d-2640-fe0f\": 1381, \"1f3c3-200d-2642-fe0f\": 1380, \"1f3c3\": 1379, \"1f3c4-200d-2640-fe0f\": 1403, \"1f3c4-200d-2642-fe0f\": 1402, \"1f3c4\": 1401, \"1f3c5\": 524, \"1f3c6\": 523, \"1f3c7\": 1395, \"1f3c8\": 533, \"1f3c9\": 534, \"1f3ca-200d-2640-fe0f\": 1409, \"1f3ca-200d-2642-fe0f\": 1408, \"1f3ca\": 1407, \"1f3cb-fe0f-200d-2640-fe0f\": 1415, \"1f3cb-fe0f-200d-2642-fe0f\": 1414, \"1f3cb\": 1413, \"1f3cc-fe0f-200d-2640-fe0f\": 1400, \"1f3cc-fe0f-200d-2642-fe0f\": 1399, \"1f3cc\": 1398, \"1f3cd\": 492, \"1f3ce\": 491, \"1f3cf\": 538, \"1f3d0\": 532, \"1f3d1\": 539, \"1f3d2\": 540, \"1f3d3\": 542, \"1f3d4\": 48, \"1f3d5\": 412, \"1f3d6\": 413, \"1f3d7\": 419, \"1f3d8\": 421, \"1f3d9\": 451, \"1f3da\": 422, \"1f3db\": 418, \"1f3dc\": 414, \"1f3dd\": 415, \"1f3de\": 416, \"1f3df\": 417, \"1f3e0\": 423, \"1f3e1\": 424, \"1f3e2\": 425, \"1f3e3\": 426, \"1f3e4\": 427, \"1f3e5\": 428, \"1f3e6\": 429, \"1f3e7\": 6234, \"1f3e8\": 430, \"1f3e9\": 431, \"1f3ea\": 432, \"1f3eb\": 433, \"1f3ec\": 434, \"1f3ed\": 435, \"1f3ee\": 6102, \"1f3ef\": 436, \"1f3f0\": 437, \"1f3f3-fe0f-200d-1f308\": 76, \"1f3f3\": 75, \"1f3f4-200d-2620-fe0f\": 77, \"1f3f4-e0067-e0062-e0065-e006e-e0067-e007f\": 7266, \"1f3f4-e0067-e0062-e0073-e0063-e0074-e007f\": 7267, \"1f3f4-e0067-e0062-e0077-e006c-e0073-e007f\": 7268, \"1f3f4\": 74, \"1f3f5\": 2109, \"1f3f7\": 6120, \"1f3f8\": 543, \"1f3f9\": 6189, \"1f3fa\": 3121, \"1f3fb\": 81, \"1f3fc\": 82, \"1f3fd\": 83, \"1f3fe\": 84, \"1f3ff\": 85, \"1f400\": 244, \"1f401\": 243, \"1f402\": 225, \"1f403\": 226, \"1f404\": 227, \"1f405\": 217, \"1f406\": 218, \"1f407\": 247, \"1f408\": 214, \"1f409\": 282, \"1f40a\": 277, \"1f40b\": 286, \"1f40c\": 294, \"1f40d\": 280, \"1f40e\": 220, \"1f40f\": 232, \"1f410\": 234, \"1f411\": 233, \"1f412\": 22, \"1f413\": 262, \"1f414\": 261, \"1f415-200d-1f9ba\": 28, \"1f415\": 26, \"1f416\": 229, \"1f417\": 230, \"1f418\": 239, \"1f419\": 292, \"1f41a\": 293, \"1f41b\": 296, \"1f41c\": 297, \"1f41d\": 298, \"1f41e\": 299, \"1f41f\": 288, \"1f420\": 289, \"1f421\": 290, \"1f422\": 278, \"1f423\": 263, \"1f424\": 264, \"1f425\": 265, \"1f426\": 266, \"1f427\": 267, \"1f428\": 252, \"1f429\": 29, \"1f42a\": 235, \"1f42b\": 236, \"1f42c\": 287, \"1f42d\": 242, \"1f42e\": 224, \"1f42f\": 216, \"1f430\": 246, \"1f431\": 213, \"1f432\": 281, \"1f433\": 285, \"1f434\": 219, \"1f435\": 21, \"1f436\": 25, \"1f437\": 228, \"1f438\": 276, \"1f439\": 245, \"1f43a\": 210, \"1f43b\": 251, \"1f43c\": 253, \"1f43d\": 231, \"1f43e\": 259, \"1f43f\": 248, \"1f440\": 1194, \"1f441-fe0f-200d-1f5e8-fe0f\": 1145, \"1f441\": 1195, \"1f442\": 1188, \"1f443\": 1190, \"1f444\": 1197, \"1f445\": 1196, \"1f446\": 1164, \"1f447\": 1166, \"1f448\": 1162, \"1f449\": 1163, \"1f44a\": 1171, \"1f44b\": 1150, \"1f44c\": 1155, \"1f44d\": 1168, \"1f44e\": 1169, \"1f44f\": 1174, \"1f450\": 1176, \"1f451\": 634, \"1f452\": 635, \"1f453\": 61, \"1f454\": 66, \"1f455\": 67, \"1f456\": 68, \"1f457\": 613, \"1f458\": 614, \"1f459\": 619, \"1f45a\": 620, \"1f45b\": 621, \"1f45c\": 622, \"1f45d\": 623, \"1f45e\": 626, \"1f45f\": 627, \"1f460\": 630, \"1f461\": 631, \"1f462\": 633, \"1f463\": 1483, \"1f464\": 1481, \"1f465\": 1482, \"1f466\": 1200, \"1f467\": 1201, \"1f468-200d-1f33e\": 1267, \"1f468-200d-1f373\": 1270, \"1f468-200d-1f393\": 1258, \"1f468-200d-1f3a4\": 1288, \"1f468-200d-1f3a8\": 1291, \"1f468-200d-1f3eb\": 1261, \"1f468-200d-1f3ed\": 1276, \"1f468-200d-1f466-200d-1f466\": 1471, \"1f468-200d-1f466\": 1470, \"1f468-200d-1f467-200d-1f466\": 1473, \"1f468-200d-1f467-200d-1f467\": 1474, \"1f468-200d-1f467\": 1472, \"1f468-200d-1f468-200d-1f466\": 1460, \"1f468-200d-1f468-200d-1f466-200d-1f466\": 1463, \"1f468-200d-1f468-200d-1f467\": 1461, \"1f468-200d-1f468-200d-1f467-200d-1f466\": 1462, \"1f468-200d-1f468-200d-1f467-200d-1f467\": 1464, \"1f468-200d-1f469-200d-1f466\": 1455, \"1f468-200d-1f469-200d-1f466-200d-1f466\": 1458, \"1f468-200d-1f469-200d-1f467\": 1456, \"1f468-200d-1f469-200d-1f467-200d-1f466\": 1457, \"1f468-200d-1f469-200d-1f467-200d-1f467\": 1459, \"1f468-200d-1f4bb\": 1285, \"1f468-200d-1f4bc\": 1279, \"1f468-200d-1f527\": 1273, \"1f468-200d-1f52c\": 1282, \"1f468-200d-1f680\": 1297, \"1f468-200d-1f692\": 1300, \"1f468-200d-1f9af\": 1371, \"1f468-200d-1f9b0\": 1206, \"1f468-200d-1f9b1\": 1207, \"1f468-200d-1f9b2\": 1209, \"1f468-200d-1f9b3\": 1208, \"1f468-200d-1f9bc\": 1374, \"1f468-200d-1f9bd\": 1377, \"1f468-200d-2695-fe0f\": 1255, \"1f468-200d-2696-fe0f\": 1264, \"1f468-200d-2708-fe0f\": 1294, \"1f468-200d-2764-fe0f-200d-1f468\": 1452, \"1f468-200d-2764-fe0f-200d-1f48b-200d-1f468\": 1448, \"1f468\": 1204, \"1f469-200d-1f33e\": 1268, \"1f469-200d-1f373\": 1271, \"1f469-200d-1f393\": 1259, \"1f469-200d-1f3a4\": 1289, \"1f469-200d-1f3a8\": 1292, \"1f469-200d-1f3eb\": 1262, \"1f469-200d-1f3ed\": 1277, \"1f469-200d-1f466-200d-1f466\": 1476, \"1f469-200d-1f466\": 1475, \"1f469-200d-1f467-200d-1f466\": 1478, \"1f469-200d-1f467-200d-1f467\": 1479, \"1f469-200d-1f467\": 1477, \"1f469-200d-1f469-200d-1f466\": 1465, \"1f469-200d-1f469-200d-1f466-200d-1f466\": 1468, \"1f469-200d-1f469-200d-1f467\": 1466, \"1f469-200d-1f469-200d-1f467-200d-1f466\": 1467, \"1f469-200d-1f469-200d-1f467-200d-1f467\": 1469, \"1f469-200d-1f4bb\": 1286, \"1f469-200d-1f4bc\": 1280, \"1f469-200d-1f527\": 1274, \"1f469-200d-1f52c\": 1283, \"1f469-200d-1f680\": 1298, \"1f469-200d-1f692\": 1301, \"1f469-200d-1f9af\": 1372, \"1f469-200d-1f9b0\": 1211, \"1f469-200d-1f9b1\": 1213, \"1f469-200d-1f9b2\": 1217, \"1f469-200d-1f9b3\": 1215, \"1f469-200d-1f9bc\": 1375, \"1f469-200d-1f9bd\": 1378, \"1f469-200d-2695-fe0f\": 1256, \"1f469-200d-2696-fe0f\": 1265, \"1f469-200d-2708-fe0f\": 1295, \"1f469-200d-2764-fe0f-200d-1f468\": 1451, \"1f469-200d-2764-fe0f-200d-1f469\": 1453, \"1f469-200d-2764-fe0f-200d-1f48b-200d-1f468\": 1447, \"1f469-200d-2764-fe0f-200d-1f48b-200d-1f469\": 1449, \"1f469\": 1210, \"1f46a\": 1454, \"1f46b\": 1444, \"1f46c\": 1445, \"1f46d\": 1443, \"1f46e-200d-2640-fe0f\": 1304, \"1f46e-200d-2642-fe0f\": 1303, \"1f46e\": 1302, \"1f46f-200d-2640-fe0f\": 1387, \"1f46f-200d-2642-fe0f\": 1386, \"1f46f\": 1385, \"1f470\": 1322, \"1f471-200d-2640-fe0f\": 1219, \"1f471-200d-2642-fe0f\": 1220, \"1f471\": 1203, \"1f472\": 1319, \"1f473-200d-2640-fe0f\": 1318, \"1f473-200d-2642-fe0f\": 1317, \"1f473\": 1316, \"1f474\": 1222, \"1f475\": 1223, \"1f476\": 1198, \"1f477-200d-2640-fe0f\": 1313, \"1f477-200d-2642-fe0f\": 1312, \"1f477\": 1311, \"1f478\": 1315, \"1f479\": 197, \"1f47a\": 198, \"1f47b\": 199, \"1f47c\": 1325, \"1f47d\": 1100, \"1f47e\": 1101, \"1f47f\": 192, \"1f480\": 193, \"1f481-200d-2640-fe0f\": 1238, \"1f481-200d-2642-fe0f\": 1237, \"1f481\": 1236, \"1f482-200d-2640-fe0f\": 1310, \"1f482-200d-2642-fe0f\": 1309, \"1f482\": 1308, \"1f483\": 1382, \"1f484\": 641, \"1f485\": 1181, \"1f486-200d-2640-fe0f\": 1357, \"1f486-200d-2642-fe0f\": 1356, \"1f486\": 1355, \"1f487-200d-2640-fe0f\": 1360, \"1f487-200d-2642-fe0f\": 1359, \"1f487\": 1358, \"1f488\": 461, \"1f489\": 6208, \"1f48a\": 6210, \"1f48b\": 1115, \"1f48c\": 1116, \"1f48d\": 642, \"1f48e\": 643, \"1f48f\": 1446, \"1f490\": 2106, \"1f491\": 1450, \"1f492\": 438, \"1f493\": 1121, \"1f494\": 1126, \"1f495\": 1123, \"1f496\": 1119, \"1f497\": 1120, \"1f498\": 1117, \"1f499\": 1131, \"1f49a\": 1130, \"1f49b\": 1129, \"1f49c\": 1132, \"1f49d\": 1118, \"1f49e\": 1122, \"1f49f\": 1124, \"1f4a0\": 6447, \"1f4a1\": 6100, \"1f4a2\": 1137, \"1f4a3\": 1143, \"1f4a4\": 1149, \"1f4a5\": 1138, \"1f4a6\": 1140, \"1f4a7\": 4209, \"1f4a8\": 1141, \"1f4a9\": 195, \"1f4aa\": 1183, \"1f4ab\": 1139, \"1f4ac\": 1144, \"1f4ad\": 1148, \"1f4ae\": 2108, \"1f4af\": 1136, \"1f4b0\": 6121, \"1f4b1\": 6130, \"1f4b2\": 6131, \"1f4b3\": 6127, \"1f4b4\": 6122, \"1f4b5\": 6123, \"1f4b6\": 6124, \"1f4b7\": 6125, \"1f4b8\": 6126, \"1f4b9\": 6129, \"1f4ba\": 4123, \"1f4bb\": 677, \"1f4bc\": 6152, \"1f4bd\": 683, \"1f4be\": 684, \"1f4bf\": 685, \"1f4c0\": 686, \"1f4c1\": 6153, \"1f4c2\": 6154, \"1f4c3\": 6113, \"1f4c4\": 6115, \"1f4c5\": 6156, \"1f4c6\": 6157, \"1f4c7\": 6160, \"1f4c8\": 6161, \"1f4c9\": 6162, \"1f4ca\": 6163, \"1f4cb\": 6164, \"1f4cc\": 6165, \"1f4cd\": 6166, \"1f4ce\": 6167, \"1f4cf\": 6169, \"1f4d0\": 6170, \"1f4d1\": 6118, \"1f4d2\": 6112, \"1f4d3\": 6111, \"1f4d4\": 6104, \"1f4d5\": 6105, \"1f4d6\": 6106, \"1f4d7\": 6107, \"1f4d8\": 6108, \"1f4d9\": 6109, \"1f4da\": 6110, \"1f4db\": 6337, \"1f4dc\": 6114, \"1f4dd\": 6151, \"1f4de\": 672, \"1f4df\": 673, \"1f4e0\": 674, \"1f4e1\": 6207, \"1f4e2\": 648, \"1f4e3\": 649, \"1f4e4\": 6136, \"1f4e5\": 6137, \"1f4e6\": 6138, \"1f4e7\": 6133, \"1f4e8\": 6134, \"1f4e9\": 6135, \"1f4ea\": 6140, \"1f4eb\": 6139, \"1f4ec\": 6141, \"1f4ed\": 6142, \"1f4ee\": 6143, \"1f4ef\": 650, \"1f4f0\": 6116, \"1f4f1\": 669, \"1f4f2\": 670, \"1f4f3\": 6328, \"1f4f4\": 6329, \"1f4f5\": 6256, \"1f4f6\": 6327, \"1f4f7\": 693, \"1f4f8\": 694, \"1f4f9\": 695, \"1f4fa\": 692, \"1f4fb\": 661, \"1f4fc\": 696, \"1f4fd\": 690, \"1f4ff\": 640, \"1f500\": 6306, \"1f501\": 6307, \"1f502\": 6308, \"1f503\": 6274, \"1f504\": 6275, \"1f505\": 6325, \"1f506\": 6326, \"1f507\": 644, \"1f508\": 645, \"1f509\": 646, \"1f50a\": 647, \"1f50b\": 675, \"1f50c\": 676, \"1f50d\": 697, \"1f50e\": 698, \"1f50f\": 6177, \"1f510\": 6178, \"1f511\": 6179, \"1f512\": 6175, \"1f513\": 6176, \"1f514\": 651, \"1f515\": 652, \"1f516\": 6119, \"1f517\": 6197, \"1f518\": 6448, \"1f519\": 6276, \"1f51a\": 6277, \"1f51b\": 6278, \"1f51c\": 6279, \"1f51d\": 6280, \"1f51e\": 6257, \"1f51f\": 6377, \"1f520\": 6378, \"1f521\": 6379, \"1f522\": 6380, \"1f523\": 6381, \"1f524\": 6382, \"1f525\": 4208, \"1f526\": 6101, \"1f527\": 6191, \"1f528\": 6181, \"1f529\": 6192, \"1f52a\": 3120, \"1f52b\": 6188, \"1f52c\": 6205, \"1f52d\": 6206, \"1f52e\": 559, \"1f52f\": 6292, \"1f530\": 6338, \"1f531\": 6336, \"1f532\": 6450, \"1f533\": 6449, \"1f534\": 6417, \"1f535\": 6421, \"1f536\": 6441, \"1f537\": 6442, \"1f538\": 6443, \"1f539\": 6444, \"1f53a\": 6445, \"1f53b\": 6446, \"1f53c\": 6316, \"1f53d\": 6318, \"1f549\": 6283, \"1f54a\": 268, \"1f54b\": 446, \"1f54c\": 442, \"1f54d\": 444, \"1f54e\": 6291, \"1f550\": 4142, \"1f551\": 4144, \"1f552\": 4146, \"1f553\": 4148, \"1f554\": 4150, \"1f555\": 4152, \"1f556\": 4154, \"1f557\": 4156, \"1f558\": 4158, \"1f559\": 4160, \"1f55a\": 4162, \"1f55b\": 4140, \"1f55c\": 4143, \"1f55d\": 4145, \"1f55e\": 4147, \"1f55f\": 4149, \"1f560\": 4151, \"1f561\": 4153, \"1f562\": 4155, \"1f563\": 4157, \"1f564\": 4159, \"1f565\": 4161, \"1f566\": 4163, \"1f567\": 4141, \"1f56f\": 699, \"1f570\": 4139, \"1f573\": 1142, \"1f574\": 1384, \"1f575-fe0f-200d-2640-fe0f\": 1307, \"1f575-fe0f-200d-2642-fe0f\": 1306, \"1f575\": 1305, \"1f576\": 62, \"1f577\": 2101, \"1f578\": 2102, \"1f579\": 562, \"1f57a\": 1383, \"1f587\": 6168, \"1f58a\": 6148, \"1f58b\": 6147, \"1f58c\": 6149, \"1f58d\": 6150, \"1f590\": 1152, \"1f595\": 1165, \"1f596\": 1154, \"1f5a4\": 1134, \"1f5a5\": 678, \"1f5a8\": 679, \"1f5b1\": 681, \"1f5b2\": 682, \"1f5bc\": 576, \"1f5c2\": 6155, \"1f5c3\": 6172, \"1f5c4\": 6173, \"1f5d1\": 6174, \"1f5d2\": 6158, \"1f5d3\": 6159, \"1f5dc\": 6194, \"1f5dd\": 6180, \"1f5de\": 6117, \"1f5e1\": 6186, \"1f5e3\": 1480, \"1f5e8\": 1146, \"1f5ef\": 1147, \"1f5f3\": 6144, \"1f5fa\": 45, \"1f5fb\": 411, \"1f5fc\": 439, \"1f5fd\": 440, \"1f5fe\": 46, \"1f5ff\": 6233, \"1f600\": 11, \"1f601\": 14, \"1f602\": 18, \"1f603\": 12, \"1f604\": 13, \"1f605\": 16, \"1f606\": 15, \"1f607\": 113, \"1f608\": 191, \"1f609\": 111, \"1f60a\": 112, \"1f60b\": 122, \"1f60c\": 142, \"1f60d\": 115, \"1f60e\": 160, \"1f60f\": 137, \"1f610\": 134, \"1f611\": 135, \"1f612\": 138, \"1f613\": 183, \"1f614\": 143, \"1f615\": 163, \"1f616\": 180, \"1f617\": 118, \"1f618\": 117, \"1f619\": 121, \"1f61a\": 120, \"1f61b\": 123, \"1f61c\": 124, \"1f61d\": 126, \"1f61e\": 182, \"1f61f\": 164, \"1f620\": 189, \"1f621\": 188, \"1f622\": 177, \"1f623\": 181, \"1f624\": 187, \"1f625\": 176, \"1f626\": 172, \"1f627\": 173, \"1f628\": 174, \"1f629\": 184, \"1f62a\": 144, \"1f62b\": 185, \"1f62c\": 140, \"1f62d\": 178, \"1f62e\": 167, \"1f62f\": 168, \"1f630\": 175, \"1f631\": 179, \"1f632\": 169, \"1f633\": 170, \"1f634\": 146, \"1f635\": 156, \"1f636\": 136, \"1f637\": 147, \"1f638\": 1104, \"1f639\": 1105, \"1f63a\": 1103, \"1f63b\": 1106, \"1f63c\": 1107, \"1f63d\": 1108, \"1f63e\": 1111, \"1f63f\": 1110, \"1f640\": 1109, \"1f641\": 165, \"1f642\": 19, \"1f643\": 110, \"1f644\": 139, \"1f645-200d-2640-fe0f\": 1232, \"1f645-200d-2642-fe0f\": 1231, \"1f645\": 1230, \"1f646-200d-2640-fe0f\": 1235, \"1f646-200d-2642-fe0f\": 1234, \"1f646\": 1233, \"1f647-200d-2640-fe0f\": 1247, \"1f647-200d-2642-fe0f\": 1246, \"1f647\": 1245, \"1f648\": 1112, \"1f649\": 1113, \"1f64a\": 1114, \"1f64b-200d-2640-fe0f\": 1241, \"1f64b-200d-2642-fe0f\": 1240, \"1f64b\": 1239, \"1f64c\": 1175, \"1f64d-200d-2640-fe0f\": 1226, \"1f64d-200d-2642-fe0f\": 1225, \"1f64d\": 1224, \"1f64e-200d-2640-fe0f\": 1229, \"1f64e-200d-2642-fe0f\": 1228, \"1f64e\": 1227, \"1f64f\": 1179, \"1f680\": 4129, \"1f681\": 4124, \"1f682\": 463, \"1f683\": 464, \"1f684\": 465, \"1f685\": 466, \"1f686\": 467, \"1f687\": 468, \"1f688\": 469, \"1f689\": 470, \"1f68a\": 471, \"1f68b\": 474, \"1f68c\": 475, \"1f68d\": 476, \"1f68e\": 477, \"1f68f\": 4100, \"1f690\": 478, \"1f691\": 479, \"1f692\": 480, \"1f693\": 481, \"1f694\": 482, \"1f695\": 483, \"1f696\": 484, \"1f697\": 485, \"1f698\": 486, \"1f699\": 487, \"1f69a\": 488, \"1f69b\": 489, \"1f69c\": 490, \"1f69d\": 472, \"1f69e\": 473, \"1f69f\": 4125, \"1f6a0\": 4126, \"1f6a1\": 4127, \"1f6a2\": 4117, \"1f6a3-200d-2640-fe0f\": 1406, \"1f6a3-200d-2642-fe0f\": 1405, \"1f6a3\": 1404, \"1f6a4\": 4113, \"1f6a5\": 4106, \"1f6a6\": 4107, \"1f6a7\": 4109, \"1f6a8\": 4105, \"1f6a9\": 72, \"1f6aa\": 6213, \"1f6ab\": 6250, \"1f6ac\": 6230, \"1f6ad\": 6252, \"1f6ae\": 6235, \"1f6af\": 6253, \"1f6b0\": 6236, \"1f6b1\": 6254, \"1f6b2\": 497, \"1f6b3\": 6251, \"1f6b4-200d-2640-fe0f\": 1418, \"1f6b4-200d-2642-fe0f\": 1417, \"1f6b4\": 1416, \"1f6b5-200d-2640-fe0f\": 1421, \"1f6b5-200d-2642-fe0f\": 1420, \"1f6b5\": 1419, \"1f6b6-200d-2640-fe0f\": 1363, \"1f6b6-200d-2642-fe0f\": 1362, \"1f6b6\": 1361, \"1f6b7\": 6255, \"1f6b8\": 6248, \"1f6b9\": 6238, \"1f6ba\": 6239, \"1f6bb\": 6240, \"1f6bc\": 6241, \"1f6bd\": 6217, \"1f6be\": 6242, \"1f6bf\": 6218, \"1f6c0\": 1440, \"1f6c1\": 6219, \"1f6c2\": 6243, \"1f6c3\": 6244, \"1f6c4\": 6245, \"1f6c5\": 6246, \"1f6cb\": 6215, \"1f6cc\": 1441, \"1f6cd\": 624, \"1f6ce\": 4131, \"1f6cf\": 6214, \"1f6d0\": 6281, \"1f6d1\": 4108, \"1f6d2\": 6229, \"1f6d5\": 443, \"1f6e0\": 6185, \"1f6e1\": 6190, \"1f6e2\": 4103, \"1f6e3\": 4101, \"1f6e4\": 4102, \"1f6e5\": 4116, \"1f6e9\": 4119, \"1f6eb\": 4120, \"1f6ec\": 4121, \"1f6f0\": 4128, \"1f6f3\": 4114, \"1f6f4\": 498, \"1f6f5\": 493, \"1f6f6\": 4112, \"1f6f7\": 553, \"1f6f8\": 4130, \"1f6f9\": 499, \"1f6fa\": 496, \"1f7e0\": 6418, \"1f7e1\": 6419, \"1f7e2\": 6420, \"1f7e3\": 6422, \"1f7e4\": 6423, \"1f7e5\": 6426, \"1f7e6\": 6430, \"1f7e7\": 6427, \"1f7e8\": 6428, \"1f7e9\": 6429, \"1f7ea\": 6431, \"1f7eb\": 6432, \"1f90d\": 1135, \"1f90e\": 1133, \"1f90f\": 1156, \"1f910\": 132, \"1f911\": 127, \"1f912\": 148, \"1f913\": 161, \"1f914\": 131, \"1f915\": 149, \"1f916\": 1102, \"1f917\": 128, \"1f918\": 1160, \"1f919\": 1161, \"1f91a\": 1151, \"1f91b\": 1172, \"1f91c\": 1173, \"1f91d\": 1178, \"1f91e\": 1158, \"1f91f\": 1159, \"1f920\": 158, \"1f921\": 196, \"1f922\": 150, \"1f923\": 17, \"1f924\": 145, \"1f925\": 141, \"1f926-200d-2640-fe0f\": 1250, \"1f926-200d-2642-fe0f\": 1249, \"1f926\": 1248, \"1f927\": 152, \"1f928\": 133, \"1f929\": 116, \"1f92a\": 125, \"1f92b\": 130, \"1f92c\": 190, \"1f92d\": 129, \"1f92e\": 151, \"1f92f\": 157, \"1f930\": 1323, \"1f931\": 1324, \"1f932\": 1177, \"1f933\": 1182, \"1f934\": 1314, \"1f935\": 1321, \"1f936\": 1327, \"1f937-200d-2640-fe0f\": 1253, \"1f937-200d-2642-fe0f\": 1252, \"1f937\": 1251, \"1f938-200d-2640-fe0f\": 1424, \"1f938-200d-2642-fe0f\": 1423, \"1f938\": 1422, \"1f939-200d-2640-fe0f\": 1436, \"1f939-200d-2642-fe0f\": 1435, \"1f939\": 1434, \"1f93a\": 1394, \"1f93c-200d-2640-fe0f\": 1427, \"1f93c-200d-2642-fe0f\": 1426, \"1f93c\": 1425, \"1f93d-200d-2640-fe0f\": 1430, \"1f93d-200d-2642-fe0f\": 1429, \"1f93d\": 1428, \"1f93e-200d-2640-fe0f\": 1433, \"1f93e-200d-2642-fe0f\": 1432, \"1f93e\": 1431, \"1f93f\": 550, \"1f940\": 2111, \"1f941\": 668, \"1f942\": 3110, \"1f943\": 3111, \"1f944\": 3119, \"1f945\": 546, \"1f947\": 525, \"1f948\": 526, \"1f949\": 527, \"1f94a\": 544, \"1f94b\": 545, \"1f94c\": 554, \"1f94d\": 541, \"1f94e\": 530, \"1f94f\": 536, \"1f950\": 333, \"1f951\": 318, \"1f952\": 324, \"1f953\": 343, \"1f954\": 320, \"1f955\": 321, \"1f956\": 334, \"1f957\": 358, \"1f958\": 355, \"1f959\": 351, \"1f95a\": 353, \"1f95b\": 3100, \"1f95c\": 330, \"1f95d\": 315, \"1f95e\": 337, \"1f95f\": 377, \"1f960\": 378, \"1f961\": 379, \"1f962\": 3116, \"1f963\": 357, \"1f964\": 3112, \"1f965\": 317, \"1f966\": 326, \"1f967\": 393, \"1f968\": 335, \"1f969\": 342, \"1f96a\": 348, \"1f96b\": 362, \"1f96c\": 325, \"1f96d\": 38, \"1f96e\": 375, \"1f96f\": 336, \"1f970\": 114, \"1f971\": 186, \"1f973\": 159, \"1f974\": 155, \"1f975\": 153, \"1f976\": 154, \"1f97a\": 171, \"1f97b\": 615, \"1f97c\": 64, \"1f97d\": 63, \"1f97e\": 628, \"1f97f\": 629, \"1f980\": 380, \"1f981\": 215, \"1f982\": 2103, \"1f983\": 260, \"1f984\": 221, \"1f985\": 269, \"1f986\": 270, \"1f987\": 250, \"1f988\": 291, \"1f989\": 272, \"1f98a\": 211, \"1f98b\": 295, \"1f98c\": 223, \"1f98d\": 23, \"1f98e\": 279, \"1f98f\": 240, \"1f990\": 382, \"1f991\": 383, \"1f992\": 238, \"1f993\": 222, \"1f994\": 249, \"1f995\": 283, \"1f996\": 284, \"1f997\": 2100, \"1f998\": 257, \"1f999\": 237, \"1f99a\": 274, \"1f99b\": 241, \"1f99c\": 275, \"1f99d\": 212, \"1f99e\": 381, \"1f99f\": 2104, \"1f9a0\": 2105, \"1f9a1\": 258, \"1f9a2\": 271, \"1f9a5\": 254, \"1f9a6\": 255, \"1f9a7\": 24, \"1f9a8\": 256, \"1f9a9\": 273, \"1f9aa\": 384, \"1f9ae\": 27, \"1f9af\": 6196, \"1f9b4\": 1193, \"1f9b5\": 1186, \"1f9b6\": 1187, \"1f9b7\": 1192, \"1f9b8-200d-2640-fe0f\": 1330, \"1f9b8-200d-2642-fe0f\": 1329, \"1f9b8\": 1328, \"1f9b9-200d-2640-fe0f\": 1333, \"1f9b9-200d-2642-fe0f\": 1332, \"1f9b9\": 1331, \"1f9ba\": 65, \"1f9bb\": 1189, \"1f9bc\": 495, \"1f9bd\": 494, \"1f9be\": 1184, \"1f9bf\": 1185, \"1f9c0\": 339, \"1f9c1\": 392, \"1f9c2\": 361, \"1f9c3\": 3113, \"1f9c4\": 327, \"1f9c5\": 328, \"1f9c6\": 352, \"1f9c7\": 338, \"1f9c8\": 360, \"1f9c9\": 3114, \"1f9ca\": 3115, \"1f9cd-200d-2640-fe0f\": 1366, \"1f9cd-200d-2642-fe0f\": 1365, \"1f9cd\": 1364, \"1f9ce-200d-2640-fe0f\": 1369, \"1f9ce-200d-2642-fe0f\": 1368, \"1f9ce\": 1367, \"1f9cf-200d-2640-fe0f\": 1244, \"1f9cf-200d-2642-fe0f\": 1243, \"1f9cf\": 1242, \"1f9d0\": 162, \"1f9d1-200d-1f33e\": 1266, \"1f9d1-200d-1f373\": 1269, \"1f9d1-200d-1f393\": 1257, \"1f9d1-200d-1f3a4\": 1287, \"1f9d1-200d-1f3a8\": 1290, \"1f9d1-200d-1f3eb\": 1260, \"1f9d1-200d-1f3ed\": 1275, \"1f9d1-200d-1f4bb\": 1284, \"1f9d1-200d-1f4bc\": 1278, \"1f9d1-200d-1f527\": 1272, \"1f9d1-200d-1f52c\": 1281, \"1f9d1-200d-1f680\": 1296, \"1f9d1-200d-1f692\": 1299, \"1f9d1-200d-1f91d-200d-1f9d1\": 1442, \"1f9d1-200d-1f9af\": 1370, \"1f9d1-200d-1f9b0\": 1212, \"1f9d1-200d-1f9b1\": 1214, \"1f9d1-200d-1f9b2\": 1218, \"1f9d1-200d-1f9b3\": 1216, \"1f9d1-200d-1f9bc\": 1373, \"1f9d1-200d-1f9bd\": 1376, \"1f9d1-200d-2695-fe0f\": 1254, \"1f9d1-200d-2696-fe0f\": 1263, \"1f9d1-200d-2708-fe0f\": 1293, \"1f9d1\": 1202, \"1f9d2\": 1199, \"1f9d3\": 1221, \"1f9d4\": 1205, \"1f9d5\": 1320, \"1f9d6-200d-2640-fe0f\": 1390, \"1f9d6-200d-2642-fe0f\": 1389, \"1f9d6\": 1388, \"1f9d7-200d-2640-fe0f\": 1393, \"1f9d7-200d-2642-fe0f\": 1392, \"1f9d7\": 1391, \"1f9d8-200d-2640-fe0f\": 1439, \"1f9d8-200d-2642-fe0f\": 1438, \"1f9d8\": 1437, \"1f9d9-200d-2640-fe0f\": 1336, \"1f9d9-200d-2642-fe0f\": 1335, \"1f9d9\": 1334, \"1f9da-200d-2640-fe0f\": 1339, \"1f9da-200d-2642-fe0f\": 1338, \"1f9da\": 1337, \"1f9db-200d-2640-fe0f\": 1342, \"1f9db-200d-2642-fe0f\": 1341, \"1f9db\": 1340, \"1f9dc-200d-2640-fe0f\": 1345, \"1f9dc-200d-2642-fe0f\": 1344, \"1f9dc\": 1343, \"1f9dd-200d-2640-fe0f\": 1348, \"1f9dd-200d-2642-fe0f\": 1347, \"1f9dd\": 1346, \"1f9de-200d-2640-fe0f\": 1351, \"1f9de-200d-2642-fe0f\": 1350, \"1f9de\": 1349, \"1f9df-200d-2640-fe0f\": 1354, \"1f9df-200d-2642-fe0f\": 1353, \"1f9df\": 1352, \"1f9e0\": 1191, \"1f9e1\": 1128, \"1f9e2\": 638, \"1f9e3\": 69, \"1f9e4\": 610, \"1f9e5\": 611, \"1f9e6\": 612, \"1f9e7\": 516, \"1f9e8\": 55, \"1f9e9\": 565, \"1f9ea\": 6202, \"1f9eb\": 6203, \"1f9ec\": 6204, \"1f9ed\": 47, \"1f9ee\": 687, \"1f9ef\": 6228, \"1f9f0\": 6199, \"1f9f1\": 420, \"1f9f2\": 6200, \"1f9f3\": 4132, \"1f9f4\": 6221, \"1f9f5\": 578, \"1f9f6\": 579, \"1f9f7\": 6222, \"1f9f8\": 566, \"1f9f9\": 6223, \"1f9fa\": 6224, \"1f9fb\": 6225, \"1f9fc\": 6226, \"1f9fd\": 6227, \"1f9fe\": 6128, \"1f9ff\": 560, \"1fa70\": 632, \"1fa71\": 616, \"1fa72\": 617, \"1fa73\": 618, \"1fa78\": 6209, \"1fa79\": 6211, \"1fa7a\": 6212, \"1fa80\": 556, \"1fa81\": 557, \"1fa82\": 4122, \"1fa90\": 4180, \"1fa91\": 6216, \"1fa92\": 6220, \"1fa93\": 6182, \"1fa94\": 6103, \"1fa95\": 667, \"203c\": 6355, \"21a9\": 6270, \"21aa\": 6271, \"231a\": 4135, \"231b\": 4133, \"23cf\": 6323, \"23e9\": 6310, \"23ea\": 6314, \"23eb\": 6317, \"23ec\": 6319, \"23ed\": 6311, \"23ee\": 6315, \"23ef\": 6312, \"23f0\": 4136, \"23f1\": 4137, \"23f2\": 4138, \"23f3\": 4134, \"23f8\": 6320, \"23f9\": 6321, \"23fa\": 6322, \"24c2\": 6391, \"25aa\": 6439, \"25ab\": 6440, \"25b6\": 6309, \"25c0\": 6313, \"25fb\": 6436, \"25fc\": 6435, \"25fd\": 6438, \"25fe\": 6437, \"260e\": 671, \"261d\": 1167, \"262a\": 6289, \"262e\": 6290, \"262f\": 6286, \"263a\": 119, \"264a\": 6295, \"264b\": 6296, \"264c\": 6297, \"264d\": 6298, \"264e\": 6299, \"264f\": 6300, \"265f\": 571, \"267b\": 6334, \"267e\": 6333, \"267f\": 6237, \"269b\": 6282, \"269c\": 6335, \"26a0\": 6247, \"26a1\": 4203, \"26aa\": 6425, \"26ab\": 6424, \"26b0\": 6231, \"26b1\": 6232, \"26bd\": 528, \"26be\": 529, \"26c4\": 4206, \"26c5\": 4186, \"26c8\": 4187, \"26ce\": 6305, \"26cf\": 6183, \"26d1\": 639, \"26d3\": 6198, \"26d4\": 6249, \"26e9\": 445, \"26ea\": 441, \"26f0\": 49, \"26f1\": 4202, \"26f2\": 447, \"26f3\": 547, \"26f4\": 4115, \"26f5\": 4111, \"26f7\": 1396, \"26f8\": 548, \"26f9-fe0f-200d-2640-fe0f\": 1412, \"26f9-fe0f-200d-2642-fe0f\": 1411, \"26f9\": 1410, \"26fa\": 448, \"26fd\": 4104, \"270a\": 1170, \"270b\": 1153, \"270c\": 1157, \"270d\": 1180, \"270f\": 6145, \"271d\": 6287, \"274c\": 6344, \"274e\": 6345, \"27a1\": 6262, \"27b0\": 6349, \"27bf\": 6350, \"2b05\": 6266, \"2b06\": 6260, \"2b07\": 6264, \"2b1b\": 6433, \"2b1c\": 6434, \"2b50\": 4181, \"2b55\": 6339, \"303d\": 6351, \"1f385-1f3fb\": 0, \"1f385-1f3fc\": 0, \"1f385-1f3fd\": 0, \"1f385-1f3fe\": 0, \"1f385-1f3ff\": 0, \"1f3c2-1f3fb\": 0, \"1f3c2-1f3fc\": 0, \"1f3c2-1f3fd\": 0, \"1f3c2-1f3fe\": 0, \"1f3c2-1f3ff\": 0, \"1f3c3-1f3fb-200d-2640-fe0f\": 0, \"1f3c3-1f3fc-200d-2640-fe0f\": 0, \"1f3c3-1f3fd-200d-2640-fe0f\": 0, \"1f3c3-1f3fe-200d-2640-fe0f\": 0, \"1f3c3-1f3ff-200d-2640-fe0f\": 0, \"1f3c3-1f3fb-200d-2642-fe0f\": 0, \"1f3c3-1f3fc-200d-2642-fe0f\": 0, \"1f3c3-1f3fd-200d-2642-fe0f\": 0, \"1f3c3-1f3fe-200d-2642-fe0f\": 0, \"1f3c3-1f3ff-200d-2642-fe0f\": 0, \"1f3c3-1f3fb\": 0, \"1f3c3-1f3fc\": 0, \"1f3c3-1f3fd\": 0, \"1f3c3-1f3fe\": 0, \"1f3c3-1f3ff\": 0, \"1f3c4-1f3fb-200d-2640-fe0f\": 0, \"1f3c4-1f3fc-200d-2640-fe0f\": 0, \"1f3c4-1f3fd-200d-2640-fe0f\": 0, \"1f3c4-1f3fe-200d-2640-fe0f\": 0, \"1f3c4-1f3ff-200d-2640-fe0f\": 0, \"1f3c4-1f3fb-200d-2642-fe0f\": 0, \"1f3c4-1f3fc-200d-2642-fe0f\": 0, \"1f3c4-1f3fd-200d-2642-fe0f\": 0, \"1f3c4-1f3fe-200d-2642-fe0f\": 0, \"1f3c4-1f3ff-200d-2642-fe0f\": 0, \"1f3c4-1f3fb\": 0, \"1f3c4-1f3fc\": 0, \"1f3c4-1f3fd\": 0, \"1f3c4-1f3fe\": 0, \"1f3c4-1f3ff\": 0, \"1f3c7-1f3fb\": 0, \"1f3c7-1f3fc\": 0, \"1f3c7-1f3fd\": 0, \"1f3c7-1f3fe\": 0, \"1f3c7-1f3ff\": 0, \"1f3ca-1f3fb-200d-2640-fe0f\": 0, \"1f3ca-1f3fc-200d-2640-fe0f\": 0, \"1f3ca-1f3fd-200d-2640-fe0f\": 0, \"1f3ca-1f3fe-200d-2640-fe0f\": 0, \"1f3ca-1f3ff-200d-2640-fe0f\": 0, \"1f3ca-1f3fb-200d-2642-fe0f\": 0, \"1f3ca-1f3fc-200d-2642-fe0f\": 0, \"1f3ca-1f3fd-200d-2642-fe0f\": 0, \"1f3ca-1f3fe-200d-2642-fe0f\": 0, \"1f3ca-1f3ff-200d-2642-fe0f\": 0, \"1f3ca-1f3fb\": 0, \"1f3ca-1f3fc\": 0, \"1f3ca-1f3fd\": 0, \"1f3ca-1f3fe\": 0, \"1f3ca-1f3ff\": 0, \"1f3cb-1f3fb-200d-2640-fe0f\": 0, \"1f3cb-1f3fc-200d-2640-fe0f\": 0, \"1f3cb-1f3fd-200d-2640-fe0f\": 0, \"1f3cb-1f3fe-200d-2640-fe0f\": 0, \"1f3cb-1f3ff-200d-2640-fe0f\": 0, \"1f3cb-1f3fb-200d-2642-fe0f\": 0, \"1f3cb-1f3fc-200d-2642-fe0f\": 0, \"1f3cb-1f3fd-200d-2642-fe0f\": 0, \"1f3cb-1f3fe-200d-2642-fe0f\": 0, \"1f3cb-1f3ff-200d-2642-fe0f\": 0, \"1f3cb-1f3fb\": 0, \"1f3cb-1f3fc\": 0, \"1f3cb-1f3fd\": 0, \"1f3cb-1f3fe\": 0, \"1f3cb-1f3ff\": 0, \"1f3cc-1f3fb-200d-2640-fe0f\": 0, \"1f3cc-1f3fc-200d-2640-fe0f\": 0, \"1f3cc-1f3fd-200d-2640-fe0f\": 0, \"1f3cc-1f3fe-200d-2640-fe0f\": 0, \"1f3cc-1f3ff-200d-2640-fe0f\": 0, \"1f3cc-1f3fb-200d-2642-fe0f\": 0, \"1f3cc-1f3fc-200d-2642-fe0f\": 0, \"1f3cc-1f3fd-200d-2642-fe0f\": 0, \"1f3cc-1f3fe-200d-2642-fe0f\": 0, \"1f3cc-1f3ff-200d-2642-fe0f\": 0, \"1f3cc-1f3fb\": 0, \"1f3cc-1f3fc\": 0, \"1f3cc-1f3fd\": 0, \"1f3cc-1f3fe\": 0, \"1f3cc-1f3ff\": 0, \"1f442-1f3fb\": 0, \"1f442-1f3fc\": 0, \"1f442-1f3fd\": 0, \"1f442-1f3fe\": 0, \"1f442-1f3ff\": 0, \"1f443-1f3fb\": 0, \"1f443-1f3fc\": 0, \"1f443-1f3fd\": 0, \"1f443-1f3fe\": 0, \"1f443-1f3ff\": 0, \"1f446-1f3fb\": 0, \"1f446-1f3fc\": 0, \"1f446-1f3fd\": 0, \"1f446-1f3fe\": 0, \"1f446-1f3ff\": 0, \"1f447-1f3fb\": 0, \"1f447-1f3fc\": 0, \"1f447-1f3fd\": 0, \"1f447-1f3fe\": 0, \"1f447-1f3ff\": 0, \"1f448-1f3fb\": 0, \"1f448-1f3fc\": 0, \"1f448-1f3fd\": 0, \"1f448-1f3fe\": 0, \"1f448-1f3ff\": 0, \"1f449-1f3fb\": 0, \"1f449-1f3fc\": 0, \"1f449-1f3fd\": 0, \"1f449-1f3fe\": 0, \"1f449-1f3ff\": 0, \"1f44a-1f3fb\": 0, \"1f44a-1f3fc\": 0, \"1f44a-1f3fd\": 0, \"1f44a-1f3fe\": 0, \"1f44a-1f3ff\": 0, \"1f44b-1f3fb\": 0, \"1f44b-1f3fc\": 0, \"1f44b-1f3fd\": 0, \"1f44b-1f3fe\": 0, \"1f44b-1f3ff\": 0, \"1f44c-1f3fb\": 0, \"1f44c-1f3fc\": 0, \"1f44c-1f3fd\": 0, \"1f44c-1f3fe\": 0, \"1f44c-1f3ff\": 0, \"1f44d-1f3fb\": 0, \"1f44d-1f3fc\": 0, \"1f44d-1f3fd\": 0, \"1f44d-1f3fe\": 0, \"1f44d-1f3ff\": 0, \"1f44e-1f3fb\": 0, \"1f44e-1f3fc\": 0, \"1f44e-1f3fd\": 0, \"1f44e-1f3fe\": 0, \"1f44e-1f3ff\": 0, \"1f44f-1f3fb\": 0, \"1f44f-1f3fc\": 0, \"1f44f-1f3fd\": 0, \"1f44f-1f3fe\": 0, \"1f44f-1f3ff\": 0, \"1f450-1f3fb\": 0, \"1f450-1f3fc\": 0, \"1f450-1f3fd\": 0, \"1f450-1f3fe\": 0, \"1f450-1f3ff\": 0, \"1f466-1f3fb\": 0, \"1f466-1f3fc\": 0, \"1f466-1f3fd\": 0, \"1f466-1f3fe\": 0, \"1f466-1f3ff\": 0, \"1f467-1f3fb\": 0, \"1f467-1f3fc\": 0, \"1f467-1f3fd\": 0, \"1f467-1f3fe\": 0, \"1f467-1f3ff\": 0, \"1f468-1f3fb-200d-1f33e\": 0, \"1f468-1f3fc-200d-1f33e\": 0, \"1f468-1f3fd-200d-1f33e\": 0, \"1f468-1f3fe-200d-1f33e\": 0, \"1f468-1f3ff-200d-1f33e\": 0, \"1f468-1f3fb-200d-1f373\": 0, \"1f468-1f3fc-200d-1f373\": 0, \"1f468-1f3fd-200d-1f373\": 0, \"1f468-1f3fe-200d-1f373\": 0, \"1f468-1f3ff-200d-1f373\": 0, \"1f468-1f3fb-200d-1f393\": 0, \"1f468-1f3fc-200d-1f393\": 0, \"1f468-1f3fd-200d-1f393\": 0, \"1f468-1f3fe-200d-1f393\": 0, \"1f468-1f3ff-200d-1f393\": 0, \"1f468-1f3fb-200d-1f3a4\": 0, \"1f468-1f3fc-200d-1f3a4\": 0, \"1f468-1f3fd-200d-1f3a4\": 0, \"1f468-1f3fe-200d-1f3a4\": 0, \"1f468-1f3ff-200d-1f3a4\": 0, \"1f468-1f3fb-200d-1f3a8\": 0, \"1f468-1f3fc-200d-1f3a8\": 0, \"1f468-1f3fd-200d-1f3a8\": 0, \"1f468-1f3fe-200d-1f3a8\": 0, \"1f468-1f3ff-200d-1f3a8\": 0, \"1f468-1f3fb-200d-1f3eb\": 0, \"1f468-1f3fc-200d-1f3eb\": 0, \"1f468-1f3fd-200d-1f3eb\": 0, \"1f468-1f3fe-200d-1f3eb\": 0, \"1f468-1f3ff-200d-1f3eb\": 0, \"1f468-1f3fb-200d-1f3ed\": 0, \"1f468-1f3fc-200d-1f3ed\": 0, \"1f468-1f3fd-200d-1f3ed\": 0, \"1f468-1f3fe-200d-1f3ed\": 0, \"1f468-1f3ff-200d-1f3ed\": 0, \"1f468-1f3fb-200d-1f4bb\": 0, \"1f468-1f3fc-200d-1f4bb\": 0, \"1f468-1f3fd-200d-1f4bb\": 0, \"1f468-1f3fe-200d-1f4bb\": 0, \"1f468-1f3ff-200d-1f4bb\": 0, \"1f468-1f3fb-200d-1f4bc\": 0, \"1f468-1f3fc-200d-1f4bc\": 0, \"1f468-1f3fd-200d-1f4bc\": 0, \"1f468-1f3fe-200d-1f4bc\": 0, \"1f468-1f3ff-200d-1f4bc\": 0, \"1f468-1f3fb-200d-1f527\": 0, \"1f468-1f3fc-200d-1f527\": 0, \"1f468-1f3fd-200d-1f527\": 0, \"1f468-1f3fe-200d-1f527\": 0, \"1f468-1f3ff-200d-1f527\": 0, \"1f468-1f3fb-200d-1f52c\": 0, \"1f468-1f3fc-200d-1f52c\": 0, \"1f468-1f3fd-200d-1f52c\": 0, \"1f468-1f3fe-200d-1f52c\": 0, \"1f468-1f3ff-200d-1f52c\": 0, \"1f468-1f3fb-200d-1f680\": 0, \"1f468-1f3fc-200d-1f680\": 0, \"1f468-1f3fd-200d-1f680\": 0, \"1f468-1f3fe-200d-1f680\": 0, \"1f468-1f3ff-200d-1f680\": 0, \"1f468-1f3fb-200d-1f692\": 0, \"1f468-1f3fc-200d-1f692\": 0, \"1f468-1f3fd-200d-1f692\": 0, \"1f468-1f3fe-200d-1f692\": 0, \"1f468-1f3ff-200d-1f692\": 0, \"1f468-1f3fb-200d-1f9af\": 0, \"1f468-1f3fc-200d-1f9af\": 0, \"1f468-1f3fd-200d-1f9af\": 0, \"1f468-1f3fe-200d-1f9af\": 0, \"1f468-1f3ff-200d-1f9af\": 0, \"1f468-1f3fb-200d-1f9b0\": 0, \"1f468-1f3fc-200d-1f9b0\": 0, \"1f468-1f3fd-200d-1f9b0\": 0, \"1f468-1f3fe-200d-1f9b0\": 0, \"1f468-1f3ff-200d-1f9b0\": 0, \"1f468-1f3fb-200d-1f9b1\": 0, \"1f468-1f3fc-200d-1f9b1\": 0, \"1f468-1f3fd-200d-1f9b1\": 0, \"1f468-1f3fe-200d-1f9b1\": 0, \"1f468-1f3ff-200d-1f9b1\": 0, \"1f468-1f3fb-200d-1f9b2\": 0, \"1f468-1f3fc-200d-1f9b2\": 0, \"1f468-1f3fd-200d-1f9b2\": 0, \"1f468-1f3fe-200d-1f9b2\": 0, \"1f468-1f3ff-200d-1f9b2\": 0, \"1f468-1f3fb-200d-1f9b3\": 0, \"1f468-1f3fc-200d-1f9b3\": 0, \"1f468-1f3fd-200d-1f9b3\": 0, \"1f468-1f3fe-200d-1f9b3\": 0, \"1f468-1f3ff-200d-1f9b3\": 0, \"1f468-1f3fb-200d-1f9bc\": 0, \"1f468-1f3fc-200d-1f9bc\": 0, \"1f468-1f3fd-200d-1f9bc\": 0, \"1f468-1f3fe-200d-1f9bc\": 0, \"1f468-1f3ff-200d-1f9bc\": 0, \"1f468-1f3fb-200d-1f9bd\": 0, \"1f468-1f3fc-200d-1f9bd\": 0, \"1f468-1f3fd-200d-1f9bd\": 0, \"1f468-1f3fe-200d-1f9bd\": 0, \"1f468-1f3ff-200d-1f9bd\": 0, \"1f468-1f3fb-200d-2695-fe0f\": 0, \"1f468-1f3fc-200d-2695-fe0f\": 0, \"1f468-1f3fd-200d-2695-fe0f\": 0, \"1f468-1f3fe-200d-2695-fe0f\": 0, \"1f468-1f3ff-200d-2695-fe0f\": 0, \"1f468-1f3fb-200d-2696-fe0f\": 0, \"1f468-1f3fc-200d-2696-fe0f\": 0, \"1f468-1f3fd-200d-2696-fe0f\": 0, \"1f468-1f3fe-200d-2696-fe0f\": 0, \"1f468-1f3ff-200d-2696-fe0f\": 0, \"1f468-1f3fb-200d-2708-fe0f\": 0, \"1f468-1f3fc-200d-2708-fe0f\": 0, \"1f468-1f3fd-200d-2708-fe0f\": 0, \"1f468-1f3fe-200d-2708-fe0f\": 0, \"1f468-1f3ff-200d-2708-fe0f\": 0, \"1f468-1f3fb\": 0, \"1f468-1f3fc\": 0, \"1f468-1f3fd\": 0, \"1f468-1f3fe\": 0, \"1f468-1f3ff\": 0, \"1f469-1f3fb-200d-1f33e\": 0, \"1f469-1f3fc-200d-1f33e\": 0, \"1f469-1f3fd-200d-1f33e\": 0, \"1f469-1f3fe-200d-1f33e\": 0, \"1f469-1f3ff-200d-1f33e\": 0, \"1f469-1f3fb-200d-1f373\": 0, \"1f469-1f3fc-200d-1f373\": 0, \"1f469-1f3fd-200d-1f373\": 0, \"1f469-1f3fe-200d-1f373\": 0, \"1f469-1f3ff-200d-1f373\": 0, \"1f469-1f3fb-200d-1f393\": 0, \"1f469-1f3fc-200d-1f393\": 0, \"1f469-1f3fd-200d-1f393\": 0, \"1f469-1f3fe-200d-1f393\": 0, \"1f469-1f3ff-200d-1f393\": 0, \"1f469-1f3fb-200d-1f3a4\": 0, \"1f469-1f3fc-200d-1f3a4\": 0, \"1f469-1f3fd-200d-1f3a4\": 0, \"1f469-1f3fe-200d-1f3a4\": 0, \"1f469-1f3ff-200d-1f3a4\": 0, \"1f469-1f3fb-200d-1f3a8\": 0, \"1f469-1f3fc-200d-1f3a8\": 0, \"1f469-1f3fd-200d-1f3a8\": 0, \"1f469-1f3fe-200d-1f3a8\": 0, \"1f469-1f3ff-200d-1f3a8\": 0, \"1f469-1f3fb-200d-1f3eb\": 0, \"1f469-1f3fc-200d-1f3eb\": 0, \"1f469-1f3fd-200d-1f3eb\": 0, \"1f469-1f3fe-200d-1f3eb\": 0, \"1f469-1f3ff-200d-1f3eb\": 0, \"1f469-1f3fb-200d-1f3ed\": 0, \"1f469-1f3fc-200d-1f3ed\": 0, \"1f469-1f3fd-200d-1f3ed\": 0, \"1f469-1f3fe-200d-1f3ed\": 0, \"1f469-1f3ff-200d-1f3ed\": 0, \"1f469-1f3fb-200d-1f4bb\": 0, \"1f469-1f3fc-200d-1f4bb\": 0, \"1f469-1f3fd-200d-1f4bb\": 0, \"1f469-1f3fe-200d-1f4bb\": 0, \"1f469-1f3ff-200d-1f4bb\": 0, \"1f469-1f3fb-200d-1f4bc\": 0, \"1f469-1f3fc-200d-1f4bc\": 0, \"1f469-1f3fd-200d-1f4bc\": 0, \"1f469-1f3fe-200d-1f4bc\": 0, \"1f469-1f3ff-200d-1f4bc\": 0, \"1f469-1f3fb-200d-1f527\": 0, \"1f469-1f3fc-200d-1f527\": 0, \"1f469-1f3fd-200d-1f527\": 0, \"1f469-1f3fe-200d-1f527\": 0, \"1f469-1f3ff-200d-1f527\": 0, \"1f469-1f3fb-200d-1f52c\": 0, \"1f469-1f3fc-200d-1f52c\": 0, \"1f469-1f3fd-200d-1f52c\": 0, \"1f469-1f3fe-200d-1f52c\": 0, \"1f469-1f3ff-200d-1f52c\": 0, \"1f469-1f3fb-200d-1f680\": 0, \"1f469-1f3fc-200d-1f680\": 0, \"1f469-1f3fd-200d-1f680\": 0, \"1f469-1f3fe-200d-1f680\": 0, \"1f469-1f3ff-200d-1f680\": 0, \"1f469-1f3fb-200d-1f692\": 0, \"1f469-1f3fc-200d-1f692\": 0, \"1f469-1f3fd-200d-1f692\": 0, \"1f469-1f3fe-200d-1f692\": 0, \"1f469-1f3ff-200d-1f692\": 0, \"1f469-1f3fb-200d-1f9af\": 0, \"1f469-1f3fc-200d-1f9af\": 0, \"1f469-1f3fd-200d-1f9af\": 0, \"1f469-1f3fe-200d-1f9af\": 0, \"1f469-1f3ff-200d-1f9af\": 0, \"1f469-1f3fb-200d-1f9b0\": 0, \"1f469-1f3fc-200d-1f9b0\": 0, \"1f469-1f3fd-200d-1f9b0\": 0, \"1f469-1f3fe-200d-1f9b0\": 0, \"1f469-1f3ff-200d-1f9b0\": 0, \"1f469-1f3fb-200d-1f9b1\": 0, \"1f469-1f3fc-200d-1f9b1\": 0, \"1f469-1f3fd-200d-1f9b1\": 0, \"1f469-1f3fe-200d-1f9b1\": 0, \"1f469-1f3ff-200d-1f9b1\": 0, \"1f469-1f3fb-200d-1f9b2\": 0, \"1f469-1f3fc-200d-1f9b2\": 0, \"1f469-1f3fd-200d-1f9b2\": 0, \"1f469-1f3fe-200d-1f9b2\": 0, \"1f469-1f3ff-200d-1f9b2\": 0, \"1f469-1f3fb-200d-1f9b3\": 0, \"1f469-1f3fc-200d-1f9b3\": 0, \"1f469-1f3fd-200d-1f9b3\": 0, \"1f469-1f3fe-200d-1f9b3\": 0, \"1f469-1f3ff-200d-1f9b3\": 0, \"1f469-1f3fb-200d-1f9bc\": 0, \"1f469-1f3fc-200d-1f9bc\": 0, \"1f469-1f3fd-200d-1f9bc\": 0, \"1f469-1f3fe-200d-1f9bc\": 0, \"1f469-1f3ff-200d-1f9bc\": 0, \"1f469-1f3fb-200d-1f9bd\": 0, \"1f469-1f3fc-200d-1f9bd\": 0, \"1f469-1f3fd-200d-1f9bd\": 0, \"1f469-1f3fe-200d-1f9bd\": 0, \"1f469-1f3ff-200d-1f9bd\": 0, \"1f469-1f3fb-200d-2695-fe0f\": 0, \"1f469-1f3fc-200d-2695-fe0f\": 0, \"1f469-1f3fd-200d-2695-fe0f\": 0, \"1f469-1f3fe-200d-2695-fe0f\": 0, \"1f469-1f3ff-200d-2695-fe0f\": 0, \"1f469-1f3fb-200d-2696-fe0f\": 0, \"1f469-1f3fc-200d-2696-fe0f\": 0, \"1f469-1f3fd-200d-2696-fe0f\": 0, \"1f469-1f3fe-200d-2696-fe0f\": 0, \"1f469-1f3ff-200d-2696-fe0f\": 0, \"1f469-1f3fb-200d-2708-fe0f\": 0, \"1f469-1f3fc-200d-2708-fe0f\": 0, \"1f469-1f3fd-200d-2708-fe0f\": 0, \"1f469-1f3fe-200d-2708-fe0f\": 0, \"1f469-1f3ff-200d-2708-fe0f\": 0, \"1f469-1f3fb\": 0, \"1f469-1f3fc\": 0, \"1f469-1f3fd\": 0, \"1f469-1f3fe\": 0, \"1f469-1f3ff\": 0, \"1f46b-1f3fb\": 0, \"1f46b-1f3fc\": 0, \"1f46b-1f3fd\": 0, \"1f46b-1f3fe\": 0, \"1f46b-1f3ff\": 0, \"1f469-1f3fb-200d-1f91d-200d-1f468-1f3fc\": 0, \"1f469-1f3fb-200d-1f91d-200d-1f468-1f3fd\": 0, \"1f469-1f3fb-200d-1f91d-200d-1f468-1f3fe\": 0, \"1f469-1f3fb-200d-1f91d-200d-1f468-1f3ff\": 0, \"1f469-1f3fc-200d-1f91d-200d-1f468-1f3fb\": 0, \"1f469-1f3fc-200d-1f91d-200d-1f468-1f3fd\": 0, \"1f469-1f3fc-200d-1f91d-200d-1f468-1f3fe\": 0, \"1f469-1f3fc-200d-1f91d-200d-1f468-1f3ff\": 0, \"1f469-1f3fd-200d-1f91d-200d-1f468-1f3fb\": 0, \"1f469-1f3fd-200d-1f91d-200d-1f468-1f3fc\": 0, \"1f469-1f3fd-200d-1f91d-200d-1f468-1f3fe\": 0, \"1f469-1f3fd-200d-1f91d-200d-1f468-1f3ff\": 0, \"1f469-1f3fe-200d-1f91d-200d-1f468-1f3fb\": 0, \"1f469-1f3fe-200d-1f91d-200d-1f468-1f3fc\": 0, \"1f469-1f3fe-200d-1f91d-200d-1f468-1f3fd\": 0, \"1f469-1f3fe-200d-1f91d-200d-1f468-1f3ff\": 0, \"1f469-1f3ff-200d-1f91d-200d-1f468-1f3fb\": 0, \"1f469-1f3ff-200d-1f91d-200d-1f468-1f3fc\": 0, \"1f469-1f3ff-200d-1f91d-200d-1f468-1f3fd\": 0, \"1f469-1f3ff-200d-1f91d-200d-1f468-1f3fe\": 0, \"1f46c-1f3fb\": 0, \"1f46c-1f3fc\": 0, \"1f46c-1f3fd\": 0, \"1f46c-1f3fe\": 0, \"1f46c-1f3ff\": 0, \"1f468-1f3fb-200d-1f91d-200d-1f468-1f3fc\": 0, \"1f468-1f3fb-200d-1f91d-200d-1f468-1f3fd\": 0, \"1f468-1f3fb-200d-1f91d-200d-1f468-1f3fe\": 0, \"1f468-1f3fb-200d-1f91d-200d-1f468-1f3ff\": 0, \"1f468-1f3fc-200d-1f91d-200d-1f468-1f3fb\": 0, \"1f468-1f3fc-200d-1f91d-200d-1f468-1f3fd\": 0, \"1f468-1f3fc-200d-1f91d-200d-1f468-1f3fe\": 0, \"1f468-1f3fc-200d-1f91d-200d-1f468-1f3ff\": 0, \"1f468-1f3fd-200d-1f91d-200d-1f468-1f3fb\": 0, \"1f468-1f3fd-200d-1f91d-200d-1f468-1f3fc\": 0, \"1f468-1f3fd-200d-1f91d-200d-1f468-1f3fe\": 0, \"1f468-1f3fd-200d-1f91d-200d-1f468-1f3ff\": 0, \"1f468-1f3fe-200d-1f91d-200d-1f468-1f3fb\": 0, \"1f468-1f3fe-200d-1f91d-200d-1f468-1f3fc\": 0, \"1f468-1f3fe-200d-1f91d-200d-1f468-1f3fd\": 0, \"1f468-1f3fe-200d-1f91d-200d-1f468-1f3ff\": 0, \"1f468-1f3ff-200d-1f91d-200d-1f468-1f3fb\": 0, \"1f468-1f3ff-200d-1f91d-200d-1f468-1f3fc\": 0, \"1f468-1f3ff-200d-1f91d-200d-1f468-1f3fd\": 0, \"1f468-1f3ff-200d-1f91d-200d-1f468-1f3fe\": 0, \"1f46d-1f3fb\": 0, \"1f46d-1f3fc\": 0, \"1f46d-1f3fd\": 0, \"1f46d-1f3fe\": 0, \"1f46d-1f3ff\": 0, \"1f469-1f3fb-200d-1f91d-200d-1f469-1f3fc\": 0, \"1f469-1f3fb-200d-1f91d-200d-1f469-1f3fd\": 0, \"1f469-1f3fb-200d-1f91d-200d-1f469-1f3fe\": 0, \"1f469-1f3fb-200d-1f91d-200d-1f469-1f3ff\": 0, \"1f469-1f3fc-200d-1f91d-200d-1f469-1f3fb\": 0, \"1f469-1f3fc-200d-1f91d-200d-1f469-1f3fd\": 0, \"1f469-1f3fc-200d-1f91d-200d-1f469-1f3fe\": 0, \"1f469-1f3fc-200d-1f91d-200d-1f469-1f3ff\": 0, \"1f469-1f3fd-200d-1f91d-200d-1f469-1f3fb\": 0, \"1f469-1f3fd-200d-1f91d-200d-1f469-1f3fc\": 0, \"1f469-1f3fd-200d-1f91d-200d-1f469-1f3fe\": 0, \"1f469-1f3fd-200d-1f91d-200d-1f469-1f3ff\": 0, \"1f469-1f3fe-200d-1f91d-200d-1f469-1f3fb\": 0, \"1f469-1f3fe-200d-1f91d-200d-1f469-1f3fc\": 0, \"1f469-1f3fe-200d-1f91d-200d-1f469-1f3fd\": 0, \"1f469-1f3fe-200d-1f91d-200d-1f469-1f3ff\": 0, \"1f469-1f3ff-200d-1f91d-200d-1f469-1f3fb\": 0, \"1f469-1f3ff-200d-1f91d-200d-1f469-1f3fc\": 0, \"1f469-1f3ff-200d-1f91d-200d-1f469-1f3fd\": 0, \"1f469-1f3ff-200d-1f91d-200d-1f469-1f3fe\": 0, \"1f46e-1f3fb-200d-2640-fe0f\": 0, \"1f46e-1f3fc-200d-2640-fe0f\": 0, \"1f46e-1f3fd-200d-2640-fe0f\": 0, \"1f46e-1f3fe-200d-2640-fe0f\": 0, \"1f46e-1f3ff-200d-2640-fe0f\": 0, \"1f46e-1f3fb-200d-2642-fe0f\": 0, \"1f46e-1f3fc-200d-2642-fe0f\": 0, \"1f46e-1f3fd-200d-2642-fe0f\": 0, \"1f46e-1f3fe-200d-2642-fe0f\": 0, \"1f46e-1f3ff-200d-2642-fe0f\": 0, \"1f46e-1f3fb\": 0, \"1f46e-1f3fc\": 0, \"1f46e-1f3fd\": 0, \"1f46e-1f3fe\": 0, \"1f46e-1f3ff\": 0, \"1f470-1f3fb\": 0, \"1f470-1f3fc\": 0, \"1f470-1f3fd\": 0, \"1f470-1f3fe\": 0, \"1f470-1f3ff\": 0, \"1f471-1f3fb-200d-2640-fe0f\": 0, \"1f471-1f3fc-200d-2640-fe0f\": 0, \"1f471-1f3fd-200d-2640-fe0f\": 0, \"1f471-1f3fe-200d-2640-fe0f\": 0, \"1f471-1f3ff-200d-2640-fe0f\": 0, \"1f471-1f3fb-200d-2642-fe0f\": 0, \"1f471-1f3fc-200d-2642-fe0f\": 0, \"1f471-1f3fd-200d-2642-fe0f\": 0, \"1f471-1f3fe-200d-2642-fe0f\": 0, \"1f471-1f3ff-200d-2642-fe0f\": 0, \"1f471-1f3fb\": 0, \"1f471-1f3fc\": 0, \"1f471-1f3fd\": 0, \"1f471-1f3fe\": 0, \"1f471-1f3ff\": 0, \"1f472-1f3fb\": 0, \"1f472-1f3fc\": 0, \"1f472-1f3fd\": 0, \"1f472-1f3fe\": 0, \"1f472-1f3ff\": 0, \"1f473-1f3fb-200d-2640-fe0f\": 0, \"1f473-1f3fc-200d-2640-fe0f\": 0, \"1f473-1f3fd-200d-2640-fe0f\": 0, \"1f473-1f3fe-200d-2640-fe0f\": 0, \"1f473-1f3ff-200d-2640-fe0f\": 0, \"1f473-1f3fb-200d-2642-fe0f\": 0, \"1f473-1f3fc-200d-2642-fe0f\": 0, \"1f473-1f3fd-200d-2642-fe0f\": 0, \"1f473-1f3fe-200d-2642-fe0f\": 0, \"1f473-1f3ff-200d-2642-fe0f\": 0, \"1f473-1f3fb\": 0, \"1f473-1f3fc\": 0, \"1f473-1f3fd\": 0, \"1f473-1f3fe\": 0, \"1f473-1f3ff\": 0, \"1f474-1f3fb\": 0, \"1f474-1f3fc\": 0, \"1f474-1f3fd\": 0, \"1f474-1f3fe\": 0, \"1f474-1f3ff\": 0, \"1f475-1f3fb\": 0, \"1f475-1f3fc\": 0, \"1f475-1f3fd\": 0, \"1f475-1f3fe\": 0, \"1f475-1f3ff\": 0, \"1f476-1f3fb\": 0, \"1f476-1f3fc\": 0, \"1f476-1f3fd\": 0, \"1f476-1f3fe\": 0, \"1f476-1f3ff\": 0, \"1f477-1f3fb-200d-2640-fe0f\": 0, \"1f477-1f3fc-200d-2640-fe0f\": 0, \"1f477-1f3fd-200d-2640-fe0f\": 0, \"1f477-1f3fe-200d-2640-fe0f\": 0, \"1f477-1f3ff-200d-2640-fe0f\": 0, \"1f477-1f3fb-200d-2642-fe0f\": 0, \"1f477-1f3fc-200d-2642-fe0f\": 0, \"1f477-1f3fd-200d-2642-fe0f\": 0, \"1f477-1f3fe-200d-2642-fe0f\": 0, \"1f477-1f3ff-200d-2642-fe0f\": 0, \"1f477-1f3fb\": 0, \"1f477-1f3fc\": 0, \"1f477-1f3fd\": 0, \"1f477-1f3fe\": 0, \"1f477-1f3ff\": 0, \"1f478-1f3fb\": 0, \"1f478-1f3fc\": 0, \"1f478-1f3fd\": 0, \"1f478-1f3fe\": 0, \"1f478-1f3ff\": 0, \"1f47c-1f3fb\": 0, \"1f47c-1f3fc\": 0, \"1f47c-1f3fd\": 0, \"1f47c-1f3fe\": 0, \"1f47c-1f3ff\": 0, \"1f481-1f3fb-200d-2640-fe0f\": 0, \"1f481-1f3fc-200d-2640-fe0f\": 0, \"1f481-1f3fd-200d-2640-fe0f\": 0, \"1f481-1f3fe-200d-2640-fe0f\": 0, \"1f481-1f3ff-200d-2640-fe0f\": 0, \"1f481-1f3fb-200d-2642-fe0f\": 0, \"1f481-1f3fc-200d-2642-fe0f\": 0, \"1f481-1f3fd-200d-2642-fe0f\": 0, \"1f481-1f3fe-200d-2642-fe0f\": 0, \"1f481-1f3ff-200d-2642-fe0f\": 0, \"1f481-1f3fb\": 0, \"1f481-1f3fc\": 0, \"1f481-1f3fd\": 0, \"1f481-1f3fe\": 0, \"1f481-1f3ff\": 0, \"1f482-1f3fb-200d-2640-fe0f\": 0, \"1f482-1f3fc-200d-2640-fe0f\": 0, \"1f482-1f3fd-200d-2640-fe0f\": 0, \"1f482-1f3fe-200d-2640-fe0f\": 0, \"1f482-1f3ff-200d-2640-fe0f\": 0, \"1f482-1f3fb-200d-2642-fe0f\": 0, \"1f482-1f3fc-200d-2642-fe0f\": 0, \"1f482-1f3fd-200d-2642-fe0f\": 0, \"1f482-1f3fe-200d-2642-fe0f\": 0, \"1f482-1f3ff-200d-2642-fe0f\": 0, \"1f482-1f3fb\": 0, \"1f482-1f3fc\": 0, \"1f482-1f3fd\": 0, \"1f482-1f3fe\": 0, \"1f482-1f3ff\": 0, \"1f483-1f3fb\": 0, \"1f483-1f3fc\": 0, \"1f483-1f3fd\": 0, \"1f483-1f3fe\": 0, \"1f483-1f3ff\": 0, \"1f485-1f3fb\": 0, \"1f485-1f3fc\": 0, \"1f485-1f3fd\": 0, \"1f485-1f3fe\": 0, \"1f485-1f3ff\": 0, \"1f486-1f3fb-200d-2640-fe0f\": 0, \"1f486-1f3fc-200d-2640-fe0f\": 0, \"1f486-1f3fd-200d-2640-fe0f\": 0, \"1f486-1f3fe-200d-2640-fe0f\": 0, \"1f486-1f3ff-200d-2640-fe0f\": 0, \"1f486-1f3fb-200d-2642-fe0f\": 0, \"1f486-1f3fc-200d-2642-fe0f\": 0, \"1f486-1f3fd-200d-2642-fe0f\": 0, \"1f486-1f3fe-200d-2642-fe0f\": 0, \"1f486-1f3ff-200d-2642-fe0f\": 0, \"1f486-1f3fb\": 0, \"1f486-1f3fc\": 0, \"1f486-1f3fd\": 0, \"1f486-1f3fe\": 0, \"1f486-1f3ff\": 0, \"1f487-1f3fb-200d-2640-fe0f\": 0, \"1f487-1f3fc-200d-2640-fe0f\": 0, \"1f487-1f3fd-200d-2640-fe0f\": 0, \"1f487-1f3fe-200d-2640-fe0f\": 0, \"1f487-1f3ff-200d-2640-fe0f\": 0, \"1f487-1f3fb-200d-2642-fe0f\": 0, \"1f487-1f3fc-200d-2642-fe0f\": 0, \"1f487-1f3fd-200d-2642-fe0f\": 0, \"1f487-1f3fe-200d-2642-fe0f\": 0, \"1f487-1f3ff-200d-2642-fe0f\": 0, \"1f487-1f3fb\": 0, \"1f487-1f3fc\": 0, \"1f487-1f3fd\": 0, \"1f487-1f3fe\": 0, \"1f487-1f3ff\": 0, \"1f4aa-1f3fb\": 0, \"1f4aa-1f3fc\": 0, \"1f4aa-1f3fd\": 0, \"1f4aa-1f3fe\": 0, \"1f4aa-1f3ff\": 0, \"1f574-1f3fb\": 0, \"1f574-1f3fc\": 0, \"1f574-1f3fd\": 0, \"1f574-1f3fe\": 0, \"1f574-1f3ff\": 0, \"1f575-1f3fb-200d-2640-fe0f\": 0, \"1f575-1f3fc-200d-2640-fe0f\": 0, \"1f575-1f3fd-200d-2640-fe0f\": 0, \"1f575-1f3fe-200d-2640-fe0f\": 0, \"1f575-1f3ff-200d-2640-fe0f\": 0, \"1f575-1f3fb-200d-2642-fe0f\": 0, \"1f575-1f3fc-200d-2642-fe0f\": 0, \"1f575-1f3fd-200d-2642-fe0f\": 0, \"1f575-1f3fe-200d-2642-fe0f\": 0, \"1f575-1f3ff-200d-2642-fe0f\": 0, \"1f575-1f3fb\": 0, \"1f575-1f3fc\": 0, \"1f575-1f3fd\": 0, \"1f575-1f3fe\": 0, \"1f575-1f3ff\": 0, \"1f57a-1f3fb\": 0, \"1f57a-1f3fc\": 0, \"1f57a-1f3fd\": 0, \"1f57a-1f3fe\": 0, \"1f57a-1f3ff\": 0, \"1f590-1f3fb\": 0, \"1f590-1f3fc\": 0, \"1f590-1f3fd\": 0, \"1f590-1f3fe\": 0, \"1f590-1f3ff\": 0, \"1f595-1f3fb\": 0, \"1f595-1f3fc\": 0, \"1f595-1f3fd\": 0, \"1f595-1f3fe\": 0, \"1f595-1f3ff\": 0, \"1f596-1f3fb\": 0, \"1f596-1f3fc\": 0, \"1f596-1f3fd\": 0, \"1f596-1f3fe\": 0, \"1f596-1f3ff\": 0, \"1f645-1f3fb-200d-2640-fe0f\": 0, \"1f645-1f3fc-200d-2640-fe0f\": 0, \"1f645-1f3fd-200d-2640-fe0f\": 0, \"1f645-1f3fe-200d-2640-fe0f\": 0, \"1f645-1f3ff-200d-2640-fe0f\": 0, \"1f645-1f3fb-200d-2642-fe0f\": 0, \"1f645-1f3fc-200d-2642-fe0f\": 0, \"1f645-1f3fd-200d-2642-fe0f\": 0, \"1f645-1f3fe-200d-2642-fe0f\": 0, \"1f645-1f3ff-200d-2642-fe0f\": 0, \"1f645-1f3fb\": 0, \"1f645-1f3fc\": 0, \"1f645-1f3fd\": 0, \"1f645-1f3fe\": 0, \"1f645-1f3ff\": 0, \"1f646-1f3fb-200d-2640-fe0f\": 0, \"1f646-1f3fc-200d-2640-fe0f\": 0, \"1f646-1f3fd-200d-2640-fe0f\": 0, \"1f646-1f3fe-200d-2640-fe0f\": 0, \"1f646-1f3ff-200d-2640-fe0f\": 0, \"1f646-1f3fb-200d-2642-fe0f\": 0, \"1f646-1f3fc-200d-2642-fe0f\": 0, \"1f646-1f3fd-200d-2642-fe0f\": 0, \"1f646-1f3fe-200d-2642-fe0f\": 0, \"1f646-1f3ff-200d-2642-fe0f\": 0, \"1f646-1f3fb\": 0, \"1f646-1f3fc\": 0, \"1f646-1f3fd\": 0, \"1f646-1f3fe\": 0, \"1f646-1f3ff\": 0, \"1f647-1f3fb-200d-2640-fe0f\": 0, \"1f647-1f3fc-200d-2640-fe0f\": 0, \"1f647-1f3fd-200d-2640-fe0f\": 0, \"1f647-1f3fe-200d-2640-fe0f\": 0, \"1f647-1f3ff-200d-2640-fe0f\": 0, \"1f647-1f3fb-200d-2642-fe0f\": 0, \"1f647-1f3fc-200d-2642-fe0f\": 0, \"1f647-1f3fd-200d-2642-fe0f\": 0, \"1f647-1f3fe-200d-2642-fe0f\": 0, \"1f647-1f3ff-200d-2642-fe0f\": 0, \"1f647-1f3fb\": 0, \"1f647-1f3fc\": 0, \"1f647-1f3fd\": 0, \"1f647-1f3fe\": 0, \"1f647-1f3ff\": 0, \"1f64b-1f3fb-200d-2640-fe0f\": 0, \"1f64b-1f3fc-200d-2640-fe0f\": 0, \"1f64b-1f3fd-200d-2640-fe0f\": 0, \"1f64b-1f3fe-200d-2640-fe0f\": 0, \"1f64b-1f3ff-200d-2640-fe0f\": 0, \"1f64b-1f3fb-200d-2642-fe0f\": 0, \"1f64b-1f3fc-200d-2642-fe0f\": 0, \"1f64b-1f3fd-200d-2642-fe0f\": 0, \"1f64b-1f3fe-200d-2642-fe0f\": 0, \"1f64b-1f3ff-200d-2642-fe0f\": 0, \"1f64b-1f3fb\": 0, \"1f64b-1f3fc\": 0, \"1f64b-1f3fd\": 0, \"1f64b-1f3fe\": 0, \"1f64b-1f3ff\": 0, \"1f64c-1f3fb\": 0, \"1f64c-1f3fc\": 0, \"1f64c-1f3fd\": 0, \"1f64c-1f3fe\": 0, \"1f64c-1f3ff\": 0, \"1f64d-1f3fb-200d-2640-fe0f\": 0, \"1f64d-1f3fc-200d-2640-fe0f\": 0, \"1f64d-1f3fd-200d-2640-fe0f\": 0, \"1f64d-1f3fe-200d-2640-fe0f\": 0, \"1f64d-1f3ff-200d-2640-fe0f\": 0, \"1f64d-1f3fb-200d-2642-fe0f\": 0, \"1f64d-1f3fc-200d-2642-fe0f\": 0, \"1f64d-1f3fd-200d-2642-fe0f\": 0, \"1f64d-1f3fe-200d-2642-fe0f\": 0, \"1f64d-1f3ff-200d-2642-fe0f\": 0, \"1f64d-1f3fb\": 0, \"1f64d-1f3fc\": 0, \"1f64d-1f3fd\": 0, \"1f64d-1f3fe\": 0, \"1f64d-1f3ff\": 0, \"1f64e-1f3fb-200d-2640-fe0f\": 0, \"1f64e-1f3fc-200d-2640-fe0f\": 0, \"1f64e-1f3fd-200d-2640-fe0f\": 0, \"1f64e-1f3fe-200d-2640-fe0f\": 0, \"1f64e-1f3ff-200d-2640-fe0f\": 0, \"1f64e-1f3fb-200d-2642-fe0f\": 0, \"1f64e-1f3fc-200d-2642-fe0f\": 0, \"1f64e-1f3fd-200d-2642-fe0f\": 0, \"1f64e-1f3fe-200d-2642-fe0f\": 0, \"1f64e-1f3ff-200d-2642-fe0f\": 0, \"1f64e-1f3fb\": 0, \"1f64e-1f3fc\": 0, \"1f64e-1f3fd\": 0, \"1f64e-1f3fe\": 0, \"1f64e-1f3ff\": 0, \"1f64f-1f3fb\": 0, \"1f64f-1f3fc\": 0, \"1f64f-1f3fd\": 0, \"1f64f-1f3fe\": 0, \"1f64f-1f3ff\": 0, \"1f6a3-1f3fb-200d-2640-fe0f\": 0, \"1f6a3-1f3fc-200d-2640-fe0f\": 0, \"1f6a3-1f3fd-200d-2640-fe0f\": 0, \"1f6a3-1f3fe-200d-2640-fe0f\": 0, \"1f6a3-1f3ff-200d-2640-fe0f\": 0, \"1f6a3-1f3fb-200d-2642-fe0f\": 0, \"1f6a3-1f3fc-200d-2642-fe0f\": 0, \"1f6a3-1f3fd-200d-2642-fe0f\": 0, \"1f6a3-1f3fe-200d-2642-fe0f\": 0, \"1f6a3-1f3ff-200d-2642-fe0f\": 0, \"1f6a3-1f3fb\": 0, \"1f6a3-1f3fc\": 0, \"1f6a3-1f3fd\": 0, \"1f6a3-1f3fe\": 0, \"1f6a3-1f3ff\": 0, \"1f6b4-1f3fb-200d-2640-fe0f\": 0, \"1f6b4-1f3fc-200d-2640-fe0f\": 0, \"1f6b4-1f3fd-200d-2640-fe0f\": 0, \"1f6b4-1f3fe-200d-2640-fe0f\": 0, \"1f6b4-1f3ff-200d-2640-fe0f\": 0, \"1f6b4-1f3fb-200d-2642-fe0f\": 0, \"1f6b4-1f3fc-200d-2642-fe0f\": 0, \"1f6b4-1f3fd-200d-2642-fe0f\": 0, \"1f6b4-1f3fe-200d-2642-fe0f\": 0, \"1f6b4-1f3ff-200d-2642-fe0f\": 0, \"1f6b4-1f3fb\": 0, \"1f6b4-1f3fc\": 0, \"1f6b4-1f3fd\": 0, \"1f6b4-1f3fe\": 0, \"1f6b4-1f3ff\": 0, \"1f6b5-1f3fb-200d-2640-fe0f\": 0, \"1f6b5-1f3fc-200d-2640-fe0f\": 0, \"1f6b5-1f3fd-200d-2640-fe0f\": 0, \"1f6b5-1f3fe-200d-2640-fe0f\": 0, \"1f6b5-1f3ff-200d-2640-fe0f\": 0, \"1f6b5-1f3fb-200d-2642-fe0f\": 0, \"1f6b5-1f3fc-200d-2642-fe0f\": 0, \"1f6b5-1f3fd-200d-2642-fe0f\": 0, \"1f6b5-1f3fe-200d-2642-fe0f\": 0, \"1f6b5-1f3ff-200d-2642-fe0f\": 0, \"1f6b5-1f3fb\": 0, \"1f6b5-1f3fc\": 0, \"1f6b5-1f3fd\": 0, \"1f6b5-1f3fe\": 0, \"1f6b5-1f3ff\": 0, \"1f6b6-1f3fb-200d-2640-fe0f\": 0, \"1f6b6-1f3fc-200d-2640-fe0f\": 0, \"1f6b6-1f3fd-200d-2640-fe0f\": 0, \"1f6b6-1f3fe-200d-2640-fe0f\": 0, \"1f6b6-1f3ff-200d-2640-fe0f\": 0, \"1f6b6-1f3fb-200d-2642-fe0f\": 0, \"1f6b6-1f3fc-200d-2642-fe0f\": 0, \"1f6b6-1f3fd-200d-2642-fe0f\": 0, \"1f6b6-1f3fe-200d-2642-fe0f\": 0, \"1f6b6-1f3ff-200d-2642-fe0f\": 0, \"1f6b6-1f3fb\": 0, \"1f6b6-1f3fc\": 0, \"1f6b6-1f3fd\": 0, \"1f6b6-1f3fe\": 0, \"1f6b6-1f3ff\": 0, \"1f6c0-1f3fb\": 0, \"1f6c0-1f3fc\": 0, \"1f6c0-1f3fd\": 0, \"1f6c0-1f3fe\": 0, \"1f6c0-1f3ff\": 0, \"1f6cc-1f3fb\": 0, \"1f6cc-1f3fc\": 0, \"1f6cc-1f3fd\": 0, \"1f6cc-1f3fe\": 0, \"1f6cc-1f3ff\": 0, \"1f90f-1f3fb\": 0, \"1f90f-1f3fc\": 0, \"1f90f-1f3fd\": 0, \"1f90f-1f3fe\": 0, \"1f90f-1f3ff\": 0, \"1f918-1f3fb\": 0, \"1f918-1f3fc\": 0, \"1f918-1f3fd\": 0, \"1f918-1f3fe\": 0, \"1f918-1f3ff\": 0, \"1f919-1f3fb\": 0, \"1f919-1f3fc\": 0, \"1f919-1f3fd\": 0, \"1f919-1f3fe\": 0, \"1f919-1f3ff\": 0, \"1f91a-1f3fb\": 0, \"1f91a-1f3fc\": 0, \"1f91a-1f3fd\": 0, \"1f91a-1f3fe\": 0, \"1f91a-1f3ff\": 0, \"1f91b-1f3fb\": 0, \"1f91b-1f3fc\": 0, \"1f91b-1f3fd\": 0, \"1f91b-1f3fe\": 0, \"1f91b-1f3ff\": 0, \"1f91c-1f3fb\": 0, \"1f91c-1f3fc\": 0, \"1f91c-1f3fd\": 0, \"1f91c-1f3fe\": 0, \"1f91c-1f3ff\": 0, \"1f91e-1f3fb\": 0, \"1f91e-1f3fc\": 0, \"1f91e-1f3fd\": 0, \"1f91e-1f3fe\": 0, \"1f91e-1f3ff\": 0, \"1f91f-1f3fb\": 0, \"1f91f-1f3fc\": 0, \"1f91f-1f3fd\": 0, \"1f91f-1f3fe\": 0, \"1f91f-1f3ff\": 0, \"1f926-1f3fb-200d-2640-fe0f\": 0, \"1f926-1f3fc-200d-2640-fe0f\": 0, \"1f926-1f3fd-200d-2640-fe0f\": 0, \"1f926-1f3fe-200d-2640-fe0f\": 0, \"1f926-1f3ff-200d-2640-fe0f\": 0, \"1f926-1f3fb-200d-2642-fe0f\": 0, \"1f926-1f3fc-200d-2642-fe0f\": 0, \"1f926-1f3fd-200d-2642-fe0f\": 0, \"1f926-1f3fe-200d-2642-fe0f\": 0, \"1f926-1f3ff-200d-2642-fe0f\": 0, \"1f926-1f3fb\": 0, \"1f926-1f3fc\": 0, \"1f926-1f3fd\": 0, \"1f926-1f3fe\": 0, \"1f926-1f3ff\": 0, \"1f930-1f3fb\": 0, \"1f930-1f3fc\": 0, \"1f930-1f3fd\": 0, \"1f930-1f3fe\": 0, \"1f930-1f3ff\": 0, \"1f931-1f3fb\": 0, \"1f931-1f3fc\": 0, \"1f931-1f3fd\": 0, \"1f931-1f3fe\": 0, \"1f931-1f3ff\": 0, \"1f932-1f3fb\": 0, \"1f932-1f3fc\": 0, \"1f932-1f3fd\": 0, \"1f932-1f3fe\": 0, \"1f932-1f3ff\": 0, \"1f933-1f3fb\": 0, \"1f933-1f3fc\": 0, \"1f933-1f3fd\": 0, \"1f933-1f3fe\": 0, \"1f933-1f3ff\": 0, \"1f934-1f3fb\": 0, \"1f934-1f3fc\": 0, \"1f934-1f3fd\": 0, \"1f934-1f3fe\": 0, \"1f934-1f3ff\": 0, \"1f935-1f3fb\": 0, \"1f935-1f3fc\": 0, \"1f935-1f3fd\": 0, \"1f935-1f3fe\": 0, \"1f935-1f3ff\": 0, \"1f936-1f3fb\": 0, \"1f936-1f3fc\": 0, \"1f936-1f3fd\": 0, \"1f936-1f3fe\": 0, \"1f936-1f3ff\": 0, \"1f937-1f3fb-200d-2640-fe0f\": 0, \"1f937-1f3fc-200d-2640-fe0f\": 0, \"1f937-1f3fd-200d-2640-fe0f\": 0, \"1f937-1f3fe-200d-2640-fe0f\": 0, \"1f937-1f3ff-200d-2640-fe0f\": 0, \"1f937-1f3fb-200d-2642-fe0f\": 0, \"1f937-1f3fc-200d-2642-fe0f\": 0, \"1f937-1f3fd-200d-2642-fe0f\": 0, \"1f937-1f3fe-200d-2642-fe0f\": 0, \"1f937-1f3ff-200d-2642-fe0f\": 0, \"1f937-1f3fb\": 0, \"1f937-1f3fc\": 0, \"1f937-1f3fd\": 0, \"1f937-1f3fe\": 0, \"1f937-1f3ff\": 0, \"1f938-1f3fb-200d-2640-fe0f\": 0, \"1f938-1f3fc-200d-2640-fe0f\": 0, \"1f938-1f3fd-200d-2640-fe0f\": 0, \"1f938-1f3fe-200d-2640-fe0f\": 0, \"1f938-1f3ff-200d-2640-fe0f\": 0, \"1f938-1f3fb-200d-2642-fe0f\": 0, \"1f938-1f3fc-200d-2642-fe0f\": 0, \"1f938-1f3fd-200d-2642-fe0f\": 0, \"1f938-1f3fe-200d-2642-fe0f\": 0, \"1f938-1f3ff-200d-2642-fe0f\": 0, \"1f938-1f3fb\": 0, \"1f938-1f3fc\": 0, \"1f938-1f3fd\": 0, \"1f938-1f3fe\": 0, \"1f938-1f3ff\": 0, \"1f939-1f3fb-200d-2640-fe0f\": 0, \"1f939-1f3fc-200d-2640-fe0f\": 0, \"1f939-1f3fd-200d-2640-fe0f\": 0, \"1f939-1f3fe-200d-2640-fe0f\": 0, \"1f939-1f3ff-200d-2640-fe0f\": 0, \"1f939-1f3fb-200d-2642-fe0f\": 0, \"1f939-1f3fc-200d-2642-fe0f\": 0, \"1f939-1f3fd-200d-2642-fe0f\": 0, \"1f939-1f3fe-200d-2642-fe0f\": 0, \"1f939-1f3ff-200d-2642-fe0f\": 0, \"1f939-1f3fb\": 0, \"1f939-1f3fc\": 0, \"1f939-1f3fd\": 0, \"1f939-1f3fe\": 0, \"1f939-1f3ff\": 0, \"1f93d-1f3fb-200d-2640-fe0f\": 0, \"1f93d-1f3fc-200d-2640-fe0f\": 0, \"1f93d-1f3fd-200d-2640-fe0f\": 0, \"1f93d-1f3fe-200d-2640-fe0f\": 0, \"1f93d-1f3ff-200d-2640-fe0f\": 0, \"1f93d-1f3fb-200d-2642-fe0f\": 0, \"1f93d-1f3fc-200d-2642-fe0f\": 0, \"1f93d-1f3fd-200d-2642-fe0f\": 0, \"1f93d-1f3fe-200d-2642-fe0f\": 0, \"1f93d-1f3ff-200d-2642-fe0f\": 0, \"1f93d-1f3fb\": 0, \"1f93d-1f3fc\": 0, \"1f93d-1f3fd\": 0, \"1f93d-1f3fe\": 0, \"1f93d-1f3ff\": 0, \"1f93e-1f3fb-200d-2640-fe0f\": 0, \"1f93e-1f3fc-200d-2640-fe0f\": 0, \"1f93e-1f3fd-200d-2640-fe0f\": 0, \"1f93e-1f3fe-200d-2640-fe0f\": 0, \"1f93e-1f3ff-200d-2640-fe0f\": 0, \"1f93e-1f3fb-200d-2642-fe0f\": 0, \"1f93e-1f3fc-200d-2642-fe0f\": 0, \"1f93e-1f3fd-200d-2642-fe0f\": 0, \"1f93e-1f3fe-200d-2642-fe0f\": 0, \"1f93e-1f3ff-200d-2642-fe0f\": 0, \"1f93e-1f3fb\": 0, \"1f93e-1f3fc\": 0, \"1f93e-1f3fd\": 0, \"1f93e-1f3fe\": 0, \"1f93e-1f3ff\": 0, \"1f9b5-1f3fb\": 0, \"1f9b5-1f3fc\": 0, \"1f9b5-1f3fd\": 0, \"1f9b5-1f3fe\": 0, \"1f9b5-1f3ff\": 0, \"1f9b6-1f3fb\": 0, \"1f9b6-1f3fc\": 0, \"1f9b6-1f3fd\": 0, \"1f9b6-1f3fe\": 0, \"1f9b6-1f3ff\": 0, \"1f9b8-1f3fb-200d-2640-fe0f\": 0, \"1f9b8-1f3fc-200d-2640-fe0f\": 0, \"1f9b8-1f3fd-200d-2640-fe0f\": 0, \"1f9b8-1f3fe-200d-2640-fe0f\": 0, \"1f9b8-1f3ff-200d-2640-fe0f\": 0, \"1f9b8-1f3fb-200d-2642-fe0f\": 0, \"1f9b8-1f3fc-200d-2642-fe0f\": 0, \"1f9b8-1f3fd-200d-2642-fe0f\": 0, \"1f9b8-1f3fe-200d-2642-fe0f\": 0, \"1f9b8-1f3ff-200d-2642-fe0f\": 0, \"1f9b8-1f3fb\": 0, \"1f9b8-1f3fc\": 0, \"1f9b8-1f3fd\": 0, \"1f9b8-1f3fe\": 0, \"1f9b8-1f3ff\": 0, \"1f9b9-1f3fb-200d-2640-fe0f\": 0, \"1f9b9-1f3fc-200d-2640-fe0f\": 0, \"1f9b9-1f3fd-200d-2640-fe0f\": 0, \"1f9b9-1f3fe-200d-2640-fe0f\": 0, \"1f9b9-1f3ff-200d-2640-fe0f\": 0, \"1f9b9-1f3fb-200d-2642-fe0f\": 0, \"1f9b9-1f3fc-200d-2642-fe0f\": 0, \"1f9b9-1f3fd-200d-2642-fe0f\": 0, \"1f9b9-1f3fe-200d-2642-fe0f\": 0, \"1f9b9-1f3ff-200d-2642-fe0f\": 0, \"1f9b9-1f3fb\": 0, \"1f9b9-1f3fc\": 0, \"1f9b9-1f3fd\": 0, \"1f9b9-1f3fe\": 0, \"1f9b9-1f3ff\": 0, \"1f9bb-1f3fb\": 0, \"1f9bb-1f3fc\": 0, \"1f9bb-1f3fd\": 0, \"1f9bb-1f3fe\": 0, \"1f9bb-1f3ff\": 0, \"1f9cd-1f3fb-200d-2640-fe0f\": 0, \"1f9cd-1f3fc-200d-2640-fe0f\": 0, \"1f9cd-1f3fd-200d-2640-fe0f\": 0, \"1f9cd-1f3fe-200d-2640-fe0f\": 0, \"1f9cd-1f3ff-200d-2640-fe0f\": 0, \"1f9cd-1f3fb-200d-2642-fe0f\": 0, \"1f9cd-1f3fc-200d-2642-fe0f\": 0, \"1f9cd-1f3fd-200d-2642-fe0f\": 0, \"1f9cd-1f3fe-200d-2642-fe0f\": 0, \"1f9cd-1f3ff-200d-2642-fe0f\": 0, \"1f9cd-1f3fb\": 0, \"1f9cd-1f3fc\": 0, \"1f9cd-1f3fd\": 0, \"1f9cd-1f3fe\": 0, \"1f9cd-1f3ff\": 0, \"1f9ce-1f3fb-200d-2640-fe0f\": 0, \"1f9ce-1f3fc-200d-2640-fe0f\": 0, \"1f9ce-1f3fd-200d-2640-fe0f\": 0, \"1f9ce-1f3fe-200d-2640-fe0f\": 0, \"1f9ce-1f3ff-200d-2640-fe0f\": 0, \"1f9ce-1f3fb-200d-2642-fe0f\": 0, \"1f9ce-1f3fc-200d-2642-fe0f\": 0, \"1f9ce-1f3fd-200d-2642-fe0f\": 0, \"1f9ce-1f3fe-200d-2642-fe0f\": 0, \"1f9ce-1f3ff-200d-2642-fe0f\": 0, \"1f9ce-1f3fb\": 0, \"1f9ce-1f3fc\": 0, \"1f9ce-1f3fd\": 0, \"1f9ce-1f3fe\": 0, \"1f9ce-1f3ff\": 0, \"1f9cf-1f3fb-200d-2640-fe0f\": 0, \"1f9cf-1f3fc-200d-2640-fe0f\": 0, \"1f9cf-1f3fd-200d-2640-fe0f\": 0, \"1f9cf-1f3fe-200d-2640-fe0f\": 0, \"1f9cf-1f3ff-200d-2640-fe0f\": 0, \"1f9cf-1f3fb-200d-2642-fe0f\": 0, \"1f9cf-1f3fc-200d-2642-fe0f\": 0, \"1f9cf-1f3fd-200d-2642-fe0f\": 0, \"1f9cf-1f3fe-200d-2642-fe0f\": 0, \"1f9cf-1f3ff-200d-2642-fe0f\": 0, \"1f9cf-1f3fb\": 0, \"1f9cf-1f3fc\": 0, \"1f9cf-1f3fd\": 0, \"1f9cf-1f3fe\": 0, \"1f9cf-1f3ff\": 0, \"1f9d1-1f3fb-200d-1f33e\": 0, \"1f9d1-1f3fc-200d-1f33e\": 0, \"1f9d1-1f3fd-200d-1f33e\": 0, \"1f9d1-1f3fe-200d-1f33e\": 0, \"1f9d1-1f3ff-200d-1f33e\": 0, \"1f9d1-1f3fb-200d-1f373\": 0, \"1f9d1-1f3fc-200d-1f373\": 0, \"1f9d1-1f3fd-200d-1f373\": 0, \"1f9d1-1f3fe-200d-1f373\": 0, \"1f9d1-1f3ff-200d-1f373\": 0, \"1f9d1-1f3fb-200d-1f393\": 0, \"1f9d1-1f3fc-200d-1f393\": 0, \"1f9d1-1f3fd-200d-1f393\": 0, \"1f9d1-1f3fe-200d-1f393\": 0, \"1f9d1-1f3ff-200d-1f393\": 0, \"1f9d1-1f3fb-200d-1f3a4\": 0, \"1f9d1-1f3fc-200d-1f3a4\": 0, \"1f9d1-1f3fd-200d-1f3a4\": 0, \"1f9d1-1f3fe-200d-1f3a4\": 0, \"1f9d1-1f3ff-200d-1f3a4\": 0, \"1f9d1-1f3fb-200d-1f3a8\": 0, \"1f9d1-1f3fc-200d-1f3a8\": 0, \"1f9d1-1f3fd-200d-1f3a8\": 0, \"1f9d1-1f3fe-200d-1f3a8\": 0, \"1f9d1-1f3ff-200d-1f3a8\": 0, \"1f9d1-1f3fb-200d-1f3eb\": 0, \"1f9d1-1f3fc-200d-1f3eb\": 0, \"1f9d1-1f3fd-200d-1f3eb\": 0, \"1f9d1-1f3fe-200d-1f3eb\": 0, \"1f9d1-1f3ff-200d-1f3eb\": 0, \"1f9d1-1f3fb-200d-1f3ed\": 0, \"1f9d1-1f3fc-200d-1f3ed\": 0, \"1f9d1-1f3fd-200d-1f3ed\": 0, \"1f9d1-1f3fe-200d-1f3ed\": 0, \"1f9d1-1f3ff-200d-1f3ed\": 0, \"1f9d1-1f3fb-200d-1f4bb\": 0, \"1f9d1-1f3fc-200d-1f4bb\": 0, \"1f9d1-1f3fd-200d-1f4bb\": 0, \"1f9d1-1f3fe-200d-1f4bb\": 0, \"1f9d1-1f3ff-200d-1f4bb\": 0, \"1f9d1-1f3fb-200d-1f4bc\": 0, \"1f9d1-1f3fc-200d-1f4bc\": 0, \"1f9d1-1f3fd-200d-1f4bc\": 0, \"1f9d1-1f3fe-200d-1f4bc\": 0, \"1f9d1-1f3ff-200d-1f4bc\": 0, \"1f9d1-1f3fb-200d-1f527\": 0, \"1f9d1-1f3fc-200d-1f527\": 0, \"1f9d1-1f3fd-200d-1f527\": 0, \"1f9d1-1f3fe-200d-1f527\": 0, \"1f9d1-1f3ff-200d-1f527\": 0, \"1f9d1-1f3fb-200d-1f52c\": 0, \"1f9d1-1f3fc-200d-1f52c\": 0, \"1f9d1-1f3fd-200d-1f52c\": 0, \"1f9d1-1f3fe-200d-1f52c\": 0, \"1f9d1-1f3ff-200d-1f52c\": 0, \"1f9d1-1f3fb-200d-1f680\": 0, \"1f9d1-1f3fc-200d-1f680\": 0, \"1f9d1-1f3fd-200d-1f680\": 0, \"1f9d1-1f3fe-200d-1f680\": 0, \"1f9d1-1f3ff-200d-1f680\": 0, \"1f9d1-1f3fb-200d-1f692\": 0, \"1f9d1-1f3fc-200d-1f692\": 0, \"1f9d1-1f3fd-200d-1f692\": 0, \"1f9d1-1f3fe-200d-1f692\": 0, \"1f9d1-1f3ff-200d-1f692\": 0, \"1f9d1-1f3fb-200d-1f91d-200d-1f9d1-1f3fb\": 0, \"1f9d1-1f3fb-200d-1f91d-200d-1f9d1-1f3fc\": 0, \"1f9d1-1f3fb-200d-1f91d-200d-1f9d1-1f3fd\": 0, \"1f9d1-1f3fb-200d-1f91d-200d-1f9d1-1f3fe\": 0, \"1f9d1-1f3fb-200d-1f91d-200d-1f9d1-1f3ff\": 0, \"1f9d1-1f3fc-200d-1f91d-200d-1f9d1-1f3fb\": 0, \"1f9d1-1f3fc-200d-1f91d-200d-1f9d1-1f3fc\": 0, \"1f9d1-1f3fc-200d-1f91d-200d-1f9d1-1f3fd\": 0, \"1f9d1-1f3fc-200d-1f91d-200d-1f9d1-1f3fe\": 0, \"1f9d1-1f3fc-200d-1f91d-200d-1f9d1-1f3ff\": 0, \"1f9d1-1f3fd-200d-1f91d-200d-1f9d1-1f3fb\": 0, \"1f9d1-1f3fd-200d-1f91d-200d-1f9d1-1f3fc\": 0, \"1f9d1-1f3fd-200d-1f91d-200d-1f9d1-1f3fd\": 0, \"1f9d1-1f3fd-200d-1f91d-200d-1f9d1-1f3fe\": 0, \"1f9d1-1f3fd-200d-1f91d-200d-1f9d1-1f3ff\": 0, \"1f9d1-1f3fe-200d-1f91d-200d-1f9d1-1f3fb\": 0, \"1f9d1-1f3fe-200d-1f91d-200d-1f9d1-1f3fc\": 0, \"1f9d1-1f3fe-200d-1f91d-200d-1f9d1-1f3fd\": 0, \"1f9d1-1f3fe-200d-1f91d-200d-1f9d1-1f3fe\": 0, \"1f9d1-1f3fe-200d-1f91d-200d-1f9d1-1f3ff\": 0, \"1f9d1-1f3ff-200d-1f91d-200d-1f9d1-1f3fb\": 0, \"1f9d1-1f3ff-200d-1f91d-200d-1f9d1-1f3fc\": 0, \"1f9d1-1f3ff-200d-1f91d-200d-1f9d1-1f3fd\": 0, \"1f9d1-1f3ff-200d-1f91d-200d-1f9d1-1f3fe\": 0, \"1f9d1-1f3ff-200d-1f91d-200d-1f9d1-1f3ff\": 0, \"1f9d1-1f3fb-200d-1f9af\": 0, \"1f9d1-1f3fc-200d-1f9af\": 0, \"1f9d1-1f3fd-200d-1f9af\": 0, \"1f9d1-1f3fe-200d-1f9af\": 0, \"1f9d1-1f3ff-200d-1f9af\": 0, \"1f9d1-1f3fb-200d-1f9b0\": 0, \"1f9d1-1f3fc-200d-1f9b0\": 0, \"1f9d1-1f3fd-200d-1f9b0\": 0, \"1f9d1-1f3fe-200d-1f9b0\": 0, \"1f9d1-1f3ff-200d-1f9b0\": 0, \"1f9d1-1f3fb-200d-1f9b1\": 0, \"1f9d1-1f3fc-200d-1f9b1\": 0, \"1f9d1-1f3fd-200d-1f9b1\": 0, \"1f9d1-1f3fe-200d-1f9b1\": 0, \"1f9d1-1f3ff-200d-1f9b1\": 0, \"1f9d1-1f3fb-200d-1f9b2\": 0, \"1f9d1-1f3fc-200d-1f9b2\": 0, \"1f9d1-1f3fd-200d-1f9b2\": 0, \"1f9d1-1f3fe-200d-1f9b2\": 0, \"1f9d1-1f3ff-200d-1f9b2\": 0, \"1f9d1-1f3fb-200d-1f9b3\": 0, \"1f9d1-1f3fc-200d-1f9b3\": 0, \"1f9d1-1f3fd-200d-1f9b3\": 0, \"1f9d1-1f3fe-200d-1f9b3\": 0, \"1f9d1-1f3ff-200d-1f9b3\": 0, \"1f9d1-1f3fb-200d-1f9bc\": 0, \"1f9d1-1f3fc-200d-1f9bc\": 0, \"1f9d1-1f3fd-200d-1f9bc\": 0, \"1f9d1-1f3fe-200d-1f9bc\": 0, \"1f9d1-1f3ff-200d-1f9bc\": 0, \"1f9d1-1f3fb-200d-1f9bd\": 0, \"1f9d1-1f3fc-200d-1f9bd\": 0, \"1f9d1-1f3fd-200d-1f9bd\": 0, \"1f9d1-1f3fe-200d-1f9bd\": 0, \"1f9d1-1f3ff-200d-1f9bd\": 0, \"1f9d1-1f3fb-200d-2695-fe0f\": 0, \"1f9d1-1f3fc-200d-2695-fe0f\": 0, \"1f9d1-1f3fd-200d-2695-fe0f\": 0, \"1f9d1-1f3fe-200d-2695-fe0f\": 0, \"1f9d1-1f3ff-200d-2695-fe0f\": 0, \"1f9d1-1f3fb-200d-2696-fe0f\": 0, \"1f9d1-1f3fc-200d-2696-fe0f\": 0, \"1f9d1-1f3fd-200d-2696-fe0f\": 0, \"1f9d1-1f3fe-200d-2696-fe0f\": 0, \"1f9d1-1f3ff-200d-2696-fe0f\": 0, \"1f9d1-1f3fb-200d-2708-fe0f\": 0, \"1f9d1-1f3fc-200d-2708-fe0f\": 0, \"1f9d1-1f3fd-200d-2708-fe0f\": 0, \"1f9d1-1f3fe-200d-2708-fe0f\": 0, \"1f9d1-1f3ff-200d-2708-fe0f\": 0, \"1f9d1-1f3fb\": 0, \"1f9d1-1f3fc\": 0, \"1f9d1-1f3fd\": 0, \"1f9d1-1f3fe\": 0, \"1f9d1-1f3ff\": 0, \"1f9d2-1f3fb\": 0, \"1f9d2-1f3fc\": 0, \"1f9d2-1f3fd\": 0, \"1f9d2-1f3fe\": 0, \"1f9d2-1f3ff\": 0, \"1f9d3-1f3fb\": 0, \"1f9d3-1f3fc\": 0, \"1f9d3-1f3fd\": 0, \"1f9d3-1f3fe\": 0, \"1f9d3-1f3ff\": 0, \"1f9d4-1f3fb\": 0, \"1f9d4-1f3fc\": 0, \"1f9d4-1f3fd\": 0, \"1f9d4-1f3fe\": 0, \"1f9d4-1f3ff\": 0, \"1f9d5-1f3fb\": 0, \"1f9d5-1f3fc\": 0, \"1f9d5-1f3fd\": 0, \"1f9d5-1f3fe\": 0, \"1f9d5-1f3ff\": 0, \"1f9d6-1f3fb-200d-2640-fe0f\": 0, \"1f9d6-1f3fc-200d-2640-fe0f\": 0, \"1f9d6-1f3fd-200d-2640-fe0f\": 0, \"1f9d6-1f3fe-200d-2640-fe0f\": 0, \"1f9d6-1f3ff-200d-2640-fe0f\": 0, \"1f9d6-1f3fb-200d-2642-fe0f\": 0, \"1f9d6-1f3fc-200d-2642-fe0f\": 0, \"1f9d6-1f3fd-200d-2642-fe0f\": 0, \"1f9d6-1f3fe-200d-2642-fe0f\": 0, \"1f9d6-1f3ff-200d-2642-fe0f\": 0, \"1f9d6-1f3fb\": 0, \"1f9d6-1f3fc\": 0, \"1f9d6-1f3fd\": 0, \"1f9d6-1f3fe\": 0, \"1f9d6-1f3ff\": 0, \"1f9d7-1f3fb-200d-2640-fe0f\": 0, \"1f9d7-1f3fc-200d-2640-fe0f\": 0, \"1f9d7-1f3fd-200d-2640-fe0f\": 0, \"1f9d7-1f3fe-200d-2640-fe0f\": 0, \"1f9d7-1f3ff-200d-2640-fe0f\": 0, \"1f9d7-1f3fb-200d-2642-fe0f\": 0, \"1f9d7-1f3fc-200d-2642-fe0f\": 0, \"1f9d7-1f3fd-200d-2642-fe0f\": 0, \"1f9d7-1f3fe-200d-2642-fe0f\": 0, \"1f9d7-1f3ff-200d-2642-fe0f\": 0, \"1f9d7-1f3fb\": 0, \"1f9d7-1f3fc\": 0, \"1f9d7-1f3fd\": 0, \"1f9d7-1f3fe\": 0, \"1f9d7-1f3ff\": 0, \"1f9d8-1f3fb-200d-2640-fe0f\": 0, \"1f9d8-1f3fc-200d-2640-fe0f\": 0, \"1f9d8-1f3fd-200d-2640-fe0f\": 0, \"1f9d8-1f3fe-200d-2640-fe0f\": 0, \"1f9d8-1f3ff-200d-2640-fe0f\": 0, \"1f9d8-1f3fb-200d-2642-fe0f\": 0, \"1f9d8-1f3fc-200d-2642-fe0f\": 0, \"1f9d8-1f3fd-200d-2642-fe0f\": 0, \"1f9d8-1f3fe-200d-2642-fe0f\": 0, \"1f9d8-1f3ff-200d-2642-fe0f\": 0, \"1f9d8-1f3fb\": 0, \"1f9d8-1f3fc\": 0, \"1f9d8-1f3fd\": 0, \"1f9d8-1f3fe\": 0, \"1f9d8-1f3ff\": 0, \"1f9d9-1f3fb-200d-2640-fe0f\": 0, \"1f9d9-1f3fc-200d-2640-fe0f\": 0, \"1f9d9-1f3fd-200d-2640-fe0f\": 0, \"1f9d9-1f3fe-200d-2640-fe0f\": 0, \"1f9d9-1f3ff-200d-2640-fe0f\": 0, \"1f9d9-1f3fb-200d-2642-fe0f\": 0, \"1f9d9-1f3fc-200d-2642-fe0f\": 0, \"1f9d9-1f3fd-200d-2642-fe0f\": 0, \"1f9d9-1f3fe-200d-2642-fe0f\": 0, \"1f9d9-1f3ff-200d-2642-fe0f\": 0, \"1f9d9-1f3fb\": 0, \"1f9d9-1f3fc\": 0, \"1f9d9-1f3fd\": 0, \"1f9d9-1f3fe\": 0, \"1f9d9-1f3ff\": 0, \"1f9da-1f3fb-200d-2640-fe0f\": 0, \"1f9da-1f3fc-200d-2640-fe0f\": 0, \"1f9da-1f3fd-200d-2640-fe0f\": 0, \"1f9da-1f3fe-200d-2640-fe0f\": 0, \"1f9da-1f3ff-200d-2640-fe0f\": 0, \"1f9da-1f3fb-200d-2642-fe0f\": 0, \"1f9da-1f3fc-200d-2642-fe0f\": 0, \"1f9da-1f3fd-200d-2642-fe0f\": 0, \"1f9da-1f3fe-200d-2642-fe0f\": 0, \"1f9da-1f3ff-200d-2642-fe0f\": 0, \"1f9da-1f3fb\": 0, \"1f9da-1f3fc\": 0, \"1f9da-1f3fd\": 0, \"1f9da-1f3fe\": 0, \"1f9da-1f3ff\": 0, \"1f9db-1f3fb-200d-2640-fe0f\": 0, \"1f9db-1f3fc-200d-2640-fe0f\": 0, \"1f9db-1f3fd-200d-2640-fe0f\": 0, \"1f9db-1f3fe-200d-2640-fe0f\": 0, \"1f9db-1f3ff-200d-2640-fe0f\": 0, \"1f9db-1f3fb-200d-2642-fe0f\": 0, \"1f9db-1f3fc-200d-2642-fe0f\": 0, \"1f9db-1f3fd-200d-2642-fe0f\": 0, \"1f9db-1f3fe-200d-2642-fe0f\": 0, \"1f9db-1f3ff-200d-2642-fe0f\": 0, \"1f9db-1f3fb\": 0, \"1f9db-1f3fc\": 0, \"1f9db-1f3fd\": 0, \"1f9db-1f3fe\": 0, \"1f9db-1f3ff\": 0, \"1f9dc-1f3fb-200d-2640-fe0f\": 0, \"1f9dc-1f3fc-200d-2640-fe0f\": 0, \"1f9dc-1f3fd-200d-2640-fe0f\": 0, \"1f9dc-1f3fe-200d-2640-fe0f\": 0, \"1f9dc-1f3ff-200d-2640-fe0f\": 0, \"1f9dc-1f3fb-200d-2642-fe0f\": 0, \"1f9dc-1f3fc-200d-2642-fe0f\": 0, \"1f9dc-1f3fd-200d-2642-fe0f\": 0, \"1f9dc-1f3fe-200d-2642-fe0f\": 0, \"1f9dc-1f3ff-200d-2642-fe0f\": 0, \"1f9dc-1f3fb\": 0, \"1f9dc-1f3fc\": 0, \"1f9dc-1f3fd\": 0, \"1f9dc-1f3fe\": 0, \"1f9dc-1f3ff\": 0, \"1f9dd-1f3fb-200d-2640-fe0f\": 0, \"1f9dd-1f3fc-200d-2640-fe0f\": 0, \"1f9dd-1f3fd-200d-2640-fe0f\": 0, \"1f9dd-1f3fe-200d-2640-fe0f\": 0, \"1f9dd-1f3ff-200d-2640-fe0f\": 0, \"1f9dd-1f3fb-200d-2642-fe0f\": 0, \"1f9dd-1f3fc-200d-2642-fe0f\": 0, \"1f9dd-1f3fd-200d-2642-fe0f\": 0, \"1f9dd-1f3fe-200d-2642-fe0f\": 0, \"1f9dd-1f3ff-200d-2642-fe0f\": 0, \"1f9dd-1f3fb\": 0, \"1f9dd-1f3fc\": 0, \"1f9dd-1f3fd\": 0, \"1f9dd-1f3fe\": 0, \"1f9dd-1f3ff\": 0, \"261d-1f3fb\": 0, \"261d-1f3fc\": 0, \"261d-1f3fd\": 0, \"261d-1f3fe\": 0, \"261d-1f3ff\": 0, \"26f9-1f3fb-200d-2640-fe0f\": 0, \"26f9-1f3fc-200d-2640-fe0f\": 0, \"26f9-1f3fd-200d-2640-fe0f\": 0, \"26f9-1f3fe-200d-2640-fe0f\": 0, \"26f9-1f3ff-200d-2640-fe0f\": 0, \"26f9-1f3fb-200d-2642-fe0f\": 0, \"26f9-1f3fc-200d-2642-fe0f\": 0, \"26f9-1f3fd-200d-2642-fe0f\": 0, \"26f9-1f3fe-200d-2642-fe0f\": 0, \"26f9-1f3ff-200d-2642-fe0f\": 0, \"26f9-1f3fb\": 0, \"26f9-1f3fc\": 0, \"26f9-1f3fd\": 0, \"26f9-1f3fe\": 0, \"26f9-1f3ff\": 0, \"270a-1f3fb\": 0, \"270a-1f3fc\": 0, \"270a-1f3fd\": 0, \"270a-1f3fe\": 0, \"270a-1f3ff\": 0, \"270b-1f3fb\": 0, \"270b-1f3fc\": 0, \"270b-1f3fd\": 0, \"270b-1f3fe\": 0, \"270b-1f3ff\": 0, \"270c-1f3fb\": 0, \"270c-1f3fc\": 0, \"270c-1f3fd\": 0, \"270c-1f3fe\": 0, \"270c-1f3ff\": 0, \"270d-1f3fb\": 0, \"270d-1f3fc\": 0, \"270d-1f3fd\": 0, \"270d-1f3fe\": 0, \"270d-1f3ff\": 0 };\r\nexports.Emoji[\"00a9-fe0f\"] = 6362;\r\nexports.Emoji[\"00ae-fe0f\"] = 6363;\r\nexports.Emoji[\"2122-fe0f\"] = 6364;\r\nexports.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\nexports.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\nexports.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 MOBILE_SIZE = 896;\r\nconst MEDIUM_SIZE = 1275;\r\nconst LARGE_SIZE = 1680;\r\nclass MediaSizes {\r\n constructor() {\r\n this.screenSizes = [\r\n { key: 'mobile', value: MOBILE_SIZE - 1 },\r\n { key: 'medium', value: MEDIUM_SIZE },\r\n { key: 'large', value: LARGE_SIZE }\r\n ];\r\n this.sizes = {\r\n handhelds: {\r\n regular: {\r\n width: 293,\r\n height: 293\r\n },\r\n webpage: {\r\n width: 293,\r\n height: 213\r\n },\r\n album: {\r\n width: 293,\r\n height: 0\r\n }\r\n },\r\n desktop: {\r\n regular: {\r\n width: 480,\r\n height: 480\r\n },\r\n webpage: {\r\n width: 480,\r\n height: 400\r\n },\r\n album: {\r\n width: 451,\r\n height: 0\r\n }\r\n }\r\n };\r\n this.isMobile = false;\r\n this.handleResize = () => {\r\n const innerWidth = window.innerWidth;\r\n //this.isMobile = innerWidth <= 720;\r\n let activeScreen = this.screenSizes[0].key;\r\n for (let i = this.screenSizes.length - 1; i >= 0; --i) {\r\n if (this.screenSizes[i].value < innerWidth) {\r\n activeScreen = this.screenSizes[i].key;\r\n break;\r\n }\r\n }\r\n this.activeScreen = activeScreen;\r\n this.isMobile = this.activeScreen == 'mobile';\r\n this.active = this.isMobile ? this.sizes.handhelds : this.sizes.desktop;\r\n /* if(this.isMobile) {\r\n for(let i in this.active) {\r\n // @ts-ignore\r\n let size = this.active[i];\r\n size.width = innerWidth\r\n }\r\n } */\r\n };\r\n window.addEventListener('resize', this.handleResize);\r\n this.handleResize();\r\n }\r\n}\r\nexports.mediaSizes = new MediaSizes();\r\n// @ts-ignore\r\nexports.touchSupport = ('ontouchstart' in window) || (window.DocumentTouch && document instanceof DocumentTouch);\r\nexports.isServiceWorkerSupported = 'serviceWorker' in navigator;\r\nconst Config = {\r\n Emoji: exports.Emoji,\r\n LatinizeMap: exports.LatinizeMap,\r\n TLD: exports.TLD,\r\n Countries: exports.Countries,\r\n MediaSizes: exports.mediaSizes,\r\n touchSupport: exports.touchSupport,\r\n isApple: userAgent_1.isApple,\r\n isSafari: userAgent_1.isSafari,\r\n isAndroid: userAgent_1.isAndroid\r\n};\r\nwindow.Config = Config;\r\nexports.default = Config;\r\n" - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts", - "name": "./src/lib/mtproto/mtprotoworker.ts", - "index": 9, - "index2": 20, - "size": 6585, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "issuerId": 67, - "issuerName": "./src/index.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - } - ], - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 5, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appUsersManager.ts", - "module": "./src/lib/appManagers/appUsersManager.ts", - "moduleName": "./src/lib/appManagers/appUsersManager.ts", - "type": "cjs require", - "userRequest": "../mtproto/mtprotoworker", - "loc": "20:40-75" - }, - { - "moduleId": 7, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "module": "./src/lib/appManagers/appMessagesManager.ts", - "moduleName": "./src/lib/appManagers/appMessagesManager.ts", - "type": "cjs require", - "userRequest": "../mtproto/mtprotoworker", - "loc": "32:40-75" - }, - { - "moduleId": 9, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "../mtproto/mtprotoworker", - "loc": "8:40-75" - }, - { - "moduleId": 20, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\lottieLoader.ts", - "module": "./src/lib/lottieLoader.ts", - "moduleName": "./src/lib/lottieLoader.ts", - "type": "cjs require", - "userRequest": "./mtproto/mtprotoworker", - "loc": "19:40-74" - }, - { - "moduleId": 27, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appProfileManager.ts", - "module": "./src/lib/appManagers/appProfileManager.ts", - "moduleName": "./src/lib/appManagers/appProfileManager.ts", - "type": "cjs require", - "userRequest": "../mtproto/mtprotoworker", - "loc": "26:40-75" - }, - { - "moduleId": 28, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDownloadManager.ts", - "module": "./src/lib/appManagers/appDownloadManager.ts", - "moduleName": "./src/lib/appManagers/appDownloadManager.ts", - "type": "cjs require", - "userRequest": "../mtproto/mtprotoworker", - "loc": "8:40-75" - }, - { - "moduleId": 32, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\apiUpdatesManager.ts", - "module": "./src/lib/appManagers/apiUpdatesManager.ts", - "moduleName": "./src/lib/appManagers/apiUpdatesManager.ts", - "type": "cjs require", - "userRequest": "../mtproto/mtprotoworker", - "loc": "8:40-75" - }, - { - "moduleId": 39, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 44, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appStickersManager.ts", - "module": "./src/lib/appManagers/appStickersManager.ts", - "moduleName": "./src/lib/appManagers/appStickersManager.ts", - "type": "cjs require", - "userRequest": "../mtproto/mtprotoworker", - "loc": "17:40-75" - }, - { - "moduleId": 49, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "module": "./src/pages/pageSignIn.ts", - "moduleName": "./src/pages/pageSignIn.ts", - "type": "cjs require", - "userRequest": "../lib/mtproto/mtprotoworker", - "loc": "13:40-79" - }, - { - "moduleId": 53, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webpWorkerController.ts", - "module": "./src/lib/webp/webpWorkerController.ts", - "moduleName": "./src/lib/webp/webpWorkerController.ts", - "type": "cjs require", - "userRequest": "../mtproto/mtprotoworker", - "loc": "9:40-75" - }, - { - "moduleId": 62, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 66, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 67, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "module": "./src/index.ts", - "moduleName": "./src/index.ts", - "type": "cjs require", - "userRequest": "./lib/mtproto/mtprotoworker", - "loc": "63:50-88" - }, - { - "moduleId": 79, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 80, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignUp.ts", - "module": "./src/pages/pageSignUp.ts", - "moduleName": "./src/pages/pageSignUp.ts", - "type": "cjs require", - "userRequest": "../lib/mtproto/mtprotoworker", - "loc": "28:40-79" - }, - { - "moduleId": 93, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\settings.ts", - "module": "./src/components/sidebarLeft/settings.ts", - "moduleName": "./src/components/sidebarLeft/settings.ts", - "type": "cjs require", - "userRequest": "../../lib/mtproto/mtprotoworker", - "loc": "27:40-82" - }, - { - "moduleId": 94, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\editProfile.ts", - "module": "./src/components/sidebarLeft/editProfile.ts", - "moduleName": "./src/components/sidebarLeft/editProfile.ts", - "type": "cjs require", - "userRequest": "../../lib/mtproto/mtprotoworker", - "loc": "7:40-82" - }, - { - "moduleId": 95, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\chatFolders.ts", - "module": "./src/components/sidebarLeft/chatFolders.ts", - "moduleName": "./src/components/sidebarLeft/chatFolders.ts", - "type": "cjs require", - "userRequest": "../../lib/mtproto/mtprotoworker", - "loc": "7:40-82" - }, - { - "moduleId": 98, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\input.ts", - "module": "./src/components/chat/input.ts", - "moduleName": "./src/components/chat/input.ts", - "type": "cjs require", - "userRequest": "../../lib/mtproto/mtprotoworker", - "loc": "9:40-82" - }, - { - "moduleId": 100, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\gifs.ts", - "module": "./src/components/emoticonsDropdown/tabs/gifs.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/gifs.ts", - "type": "cjs require", - "userRequest": "../../../lib/mtproto/mtprotoworker", - "loc": "10:40-85" - }, - { - "moduleId": 102, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\stickers.ts", - "module": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "type": "cjs require", - "userRequest": "../../../lib/mtproto/mtprotoworker", - "loc": "44:40-85" - }, - { - "moduleId": 108, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\passwordManager.ts", - "module": "./src/lib/mtproto/passwordManager.ts", - "moduleName": "./src/lib/mtproto/passwordManager.ts", - "type": "cjs require", - "userRequest": "./mtprotoworker", - "loc": "7:40-66" - }, - { - "moduleId": 109, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 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 utils_1 = require(\"../utils\");\r\nconst storage_1 = __importDefault(require(\"../storage\"));\r\nconst crypto_methods_1 = __importDefault(require(\"../crypto/crypto_methods\"));\r\nconst logger_1 = require(\"../logger\");\r\nconst webpWorkerController_1 = __importDefault(require(\"../webp/webpWorkerController\"));\r\nconst mtproto_worker_1 = __importDefault(require(\"worker-loader!./mtproto.worker\"));\r\nconst config_1 = require(\"../config\");\r\nconst USEWORKERASWORKER = true;\r\nclass ApiManagerProxy extends crypto_methods_1.default {\r\n constructor() {\r\n super();\r\n this.taskID = 0;\r\n this.awaiting = {};\r\n this.pending = [];\r\n this.updatesProcessor = null;\r\n this.log = logger_1.logger('API-PROXY');\r\n this.log('constructor');\r\n this.registerServiceWorker();\r\n this.registerWorker();\r\n }\r\n registerServiceWorker() {\r\n if (!config_1.isServiceWorkerSupported)\r\n return;\r\n navigator.serviceWorker.register('./sw.js', { scope: './' }).then(registration => {\r\n }, (err) => {\r\n this.log.error('SW registration failed!', err);\r\n });\r\n navigator.serviceWorker.ready.then((registration) => {\r\n this.log('set SW');\r\n this.releasePending();\r\n if (!USEWORKERASWORKER) {\r\n this.postMessage = navigator.serviceWorker.controller.postMessage.bind(navigator.serviceWorker.controller);\r\n }\r\n //registration.update();\r\n });\r\n navigator.serviceWorker.addEventListener('controllerchange', () => {\r\n this.log.warn('controllerchange');\r\n this.releasePending();\r\n navigator.serviceWorker.controller.addEventListener('error', (e) => {\r\n this.log.error('controller error:', e);\r\n });\r\n });\r\n /**\r\n * Message resolver\r\n */\r\n navigator.serviceWorker.addEventListener('message', (e) => {\r\n const task = e.data;\r\n if (!utils_1.isObject(task)) {\r\n return;\r\n }\r\n this.postMessage(task);\r\n });\r\n navigator.serviceWorker.addEventListener('messageerror', (e) => {\r\n this.log.error('SW messageerror:', e);\r\n });\r\n }\r\n registerWorker() {\r\n const worker = new mtproto_worker_1.default();\r\n worker.addEventListener('message', (e) => {\r\n if (!this.worker) {\r\n this.worker = worker;\r\n this.log('set webWorker');\r\n if (USEWORKERASWORKER) {\r\n this.postMessage = this.worker.postMessage.bind(this.worker);\r\n }\r\n this.releasePending();\r\n }\r\n //this.log('got message from worker:', e.data);\r\n const task = e.data;\r\n if (!utils_1.isObject(task)) {\r\n return;\r\n }\r\n if (task.useLs) {\r\n // @ts-ignore\r\n storage_1.default[task.task](...task.args).then(res => {\r\n this.postMessage({ useLs: true, taskID: task.taskID, args: res });\r\n });\r\n }\r\n else if (task.update) {\r\n if (this.updatesProcessor) {\r\n this.updatesProcessor(task.update.obj, task.update.bool);\r\n }\r\n }\r\n else if (task.progress) {\r\n utils_1.$rootScope.$broadcast('download_progress', task.progress);\r\n }\r\n else if (task.type == 'convertWebp') {\r\n webpWorkerController_1.default.postMessage(task);\r\n }\r\n else if (task.type == 'requestFilePart') {\r\n navigator.serviceWorker.controller.postMessage(task);\r\n }\r\n else {\r\n this.finalizeTask(task.taskID, task.result, task.error);\r\n }\r\n });\r\n }\r\n finalizeTask(taskID, result, error) {\r\n const deferred = this.awaiting[taskID];\r\n if (deferred !== undefined) {\r\n this.log.debug('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.log.debug('start', task, args);\r\n return new Promise((resolve, reject) => {\r\n this.awaiting[this.taskID] = { resolve, reject, taskName: task };\r\n const params = {\r\n task,\r\n taskID: this.taskID,\r\n args\r\n };\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.postMessage) {\r\n this.log.debug('releasing tasks, length:', this.pending.length);\r\n this.pending.forEach(pending => {\r\n this.postMessage(pending);\r\n });\r\n this.log.debug('released tasks');\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 cancelDownload(fileName) {\r\n return this.performTaskWorker('cancelDownload', fileName);\r\n }\r\n downloadFile(options) {\r\n return this.performTaskWorker('downloadFile', options);\r\n }\r\n uploadFile(options) {\r\n return this.performTaskWorker('uploadFile', options);\r\n }\r\n}\r\nconst apiManagerProxy = new ApiManagerProxy();\r\n// @ts-ignore\r\nif (process.env.NODE_ENV != 'production') {\r\n window.apiManagerProxy = apiManagerProxy;\r\n}\r\nexports.default = apiManagerProxy;\r\n" - }, - { - "id": 3, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\richtextprocessor.ts", - "name": "./src/lib/richtextprocessor.ts", - "index": 27, - "index2": 27, - "size": 27232, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "issuerId": 49, - "issuerName": "./src/pages/pageSignIn.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 49, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "name": "./src/pages/pageSignIn.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - } - ], - "profile": { - "factory": 104, - "building": 1053, - "dependencies": 527 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 5, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appUsersManager.ts", - "module": "./src/lib/appManagers/appUsersManager.ts", - "moduleName": "./src/lib/appManagers/appUsersManager.ts", - "type": "cjs require", - "userRequest": "../richtextprocessor", - "loc": "17:28-59" - }, - { - "moduleId": 7, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 8, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appPeersManager.ts", - "module": "./src/lib/appManagers/appPeersManager.ts", - "moduleName": "./src/lib/appManagers/appPeersManager.ts", - "type": "cjs require", - "userRequest": "../richtextprocessor", - "loc": "10:28-59" - }, - { - "moduleId": 9, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "../richtextprocessor", - "loc": "15:28-59" - }, - { - "moduleId": 12, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDocsManager.ts", - "module": "./src/lib/appManagers/appDocsManager.ts", - "moduleName": "./src/lib/appManagers/appDocsManager.ts", - "type": "cjs require", - "userRequest": "../richtextprocessor", - "loc": "15:28-59" - }, - { - "moduleId": 16, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts", - "module": "./src/lib/appManagers/appDialogsManager.ts", - "moduleName": "./src/lib/appManagers/appDialogsManager.ts", - "type": "cjs require", - "userRequest": "../richtextprocessor", - "loc": "21:28-59" - }, - { - "moduleId": 18, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "module": "./src/components/wrappers.ts", - "moduleName": "./src/components/wrappers.ts", - "type": "cjs require", - "userRequest": "../lib/richtextprocessor", - "loc": "22:28-63" - }, - { - "moduleId": 24, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", - "type": "cjs require", - "userRequest": "../richtextprocessor", - "loc": "44:28-59" - }, - { - "moduleId": 27, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appProfileManager.ts", - "module": "./src/lib/appManagers/appProfileManager.ts", - "moduleName": "./src/lib/appManagers/appProfileManager.ts", - "type": "cjs require", - "userRequest": "../richtextprocessor", - "loc": "21:28-59" - }, - { - "moduleId": 39, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 49, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 55, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 56, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts", - "module": "./src/lib/appManagers/appMediaViewer.ts", - "moduleName": "./src/lib/appManagers/appMediaViewer.ts", - "type": "cjs require", - "userRequest": "../richtextprocessor", - "loc": "19:28-59" - }, - { - "moduleId": 58, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\poll.ts", - "module": "./src/components/poll.ts", - "moduleName": "./src/components/poll.ts", - "type": "cjs require", - "userRequest": "../lib/richtextprocessor", - "loc": "8:28-63" - }, - { - "moduleId": 61, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popupStickers.ts", - "module": "./src/components/popupStickers.ts", - "moduleName": "./src/components/popupStickers.ts", - "type": "cjs require", - "userRequest": "../lib/richtextprocessor", - "loc": "8:28-63" - }, - { - "moduleId": 62, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\AppInlineBotsManager.ts", - "module": "./src/lib/appManagers/AppInlineBotsManager.ts", - "moduleName": "./src/lib/appManagers/AppInlineBotsManager.ts", - "type": "cjs require", - "userRequest": "../richtextprocessor", - "loc": "11:28-59" - }, - { - "moduleId": 84, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\audio.ts", - "module": "./src/components/audio.ts", - "moduleName": "./src/components/audio.ts", - "type": "cjs require", - "userRequest": "../lib/richtextprocessor", - "loc": "8:28-63" - }, - { - "moduleId": 85, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\stickers.ts", - "module": "./src/components/sidebarRight/stickers.ts", - "moduleName": "./src/components/sidebarRight/stickers.ts", - "type": "cjs require", - "userRequest": "../../lib/richtextprocessor", - "loc": "33:28-66" - }, - { - "moduleId": 86, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\pollResults.ts", - "module": "./src/components/sidebarRight/pollResults.ts", - "moduleName": "./src/components/sidebarRight/pollResults.ts", - "type": "cjs require", - "userRequest": "../../lib/richtextprocessor", - "loc": "29:28-66" - }, - { - "moduleId": 95, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\chatFolders.ts", - "module": "./src/components/sidebarLeft/chatFolders.ts", - "moduleName": "./src/components/sidebarLeft/chatFolders.ts", - "type": "cjs require", - "userRequest": "../../lib/richtextprocessor", - "loc": "9:28-66" - }, - { - "moduleId": 98, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\input.ts", - "module": "./src/components/chat/input.ts", - "moduleName": "./src/components/chat/input.ts", - "type": "cjs require", - "userRequest": "../../lib/richtextprocessor", - "loc": "8:28-66" - }, - { - "moduleId": 101, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\emoji.ts", - "module": "./src/components/emoticonsDropdown/tabs/emoji.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/emoji.ts", - "type": "cjs require", - "userRequest": "../../../lib/richtextprocessor", - "loc": "11:28-69" - }, - { - "moduleId": 102, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\stickers.ts", - "module": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "type": "cjs require", - "userRequest": "../../../lib/richtextprocessor", - "loc": "42:28-69" - }, - { - "moduleId": 105, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\audio.ts", - "module": "./src/components/chat/audio.ts", - "moduleName": "./src/components/chat/audio.ts", - "type": "cjs require", - "userRequest": "../../lib/richtextprocessor", - "loc": "10:28-66" - } - ], - "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.RichTextProcessor = void 0;\r\nconst utils_1 = require(\"./utils\");\r\nconst config_1 = __importDefault(require(\"./config\"));\r\nconst regex_1 = __importDefault(require(\"../emoji/regex\"));\r\nconst emoji_1 = require(\"../emoji\");\r\nvar EmojiHelper = {\r\n emojiMap: (code) => { return code; },\r\n shortcuts: [],\r\n emojis: []\r\n};\r\nvar emojiData = config_1.default.Emoji;\r\nvar emojiSupported = navigator.userAgent.search(/OS X|iPhone|iPad|iOS/i) != -1 /* && false */ /* || true */, emojiCode;\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)|(' + regex_1.default + ')|(^|[\\\\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 unified = emoji_1.encodeEmoji(emojiCode) /* .replace(/(-fe0f|fe0f)/g, '') */;\r\n if (unified == '1f441-200d-1f5e8') {\r\n unified = '1f441-fe0f-200d-1f5e8-fe0f';\r\n }\r\n if (!emojiData.hasOwnProperty(unified) /* && !emojiData.hasOwnProperty(unified.replace(/(-fe0f|fe0f)/g, '')) */) {\r\n //if(!emojiData.hasOwnProperty(emojiCode) && !emojiData.hasOwnProperty(emojiCode.replace(/[\\ufe0f\\u200d]/g, ''))) {\r\n //console.error('lol', unified);\r\n return null;\r\n }\r\n return unified.replace(/(-fe0f|fe0f)/g, '');\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 //console.log('parseEntities match:', match);\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 }\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 }\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_1.default.TLD.indexOf(tld.toLowerCase()) !== -1)) {\r\n protocol = 'http://';\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 url = (match[5] ? '' : protocol) + match[4];\r\n }\r\n }\r\n else { // IP address\r\n url = (match[5] ? '' : 'http://') + match[4];\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 }\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 }\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 }\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 }\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 raw = raw.substr(match.index + match[0].length);\r\n rawOffset += match.index + match[0].length;\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 }\r\n else if (match[7]) { // code|italic|bold\r\n newText.push(match[6] + text + match[9]);\r\n entities.push({\r\n // @ts-ignore\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 }\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(utils_1.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((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 utils_1.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 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 //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(utils_1.encodeEntities(text.substr(lastOffset, entity.offset - lastOffset)));\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 '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('', utils_1.encodeEntities(entityText), '');\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('', utils_1.encodeEntities(entityText), '');\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('', utils_1.encodeEntities(entityText), '');\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('', utils_1.encodeEntities(entityText), '');\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 }\r\n else {\r\n url = wrapUrl(entityText, false);\r\n inner = utils_1.encodeEntities(replaceUrlEncodings(entityText));\r\n }\r\n if (options.noLinks) {\r\n html.push(inner);\r\n }\r\n else {\r\n html.push('', inner, '');\r\n }\r\n break;\r\n case 'messageEntityLinebreak':\r\n html.push(options.noLinebreaks ? ' ' : '
');\r\n break;\r\n case 'messageEntityEmoji':\r\n html.push(emojiSupported ?\r\n `${utils_1.encodeEntities(entityText)}` :\r\n `\"${utils_1.encodeEntities(entityText)}\"`);\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 }\r\n else {\r\n bot = options.fromBot;\r\n }\r\n html.push('', utils_1.encodeEntities(entityText), '');\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 html.push('', wrapRichNestedText(entityText, entity.nested, options), '');\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 html.push('', wrapRichNestedText(entityText, entity.nested, options), '');\r\n break;\r\n case 'messageEntityHighlight':\r\n html.push('', wrapRichNestedText(entityText, entity.nested, options), '');\r\n break;\r\n case 'messageEntityCode':\r\n if (options.noTextFormat) {\r\n html.push(utils_1.encodeEntities(entityText));\r\n break;\r\n }\r\n html.push('', utils_1.encodeEntities(entityText), '');\r\n break;\r\n case 'messageEntityPre':\r\n if (options.noTextFormat) {\r\n html.push(utils_1.encodeEntities(entityText));\r\n break;\r\n }\r\n html.push('
', utils_1.encodeEntities(entityText), '
');\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 html.push(utils_1.encodeEntities(text.substr(lastOffset))); // may be empty string\r\n //console.log(html);\r\n text = html.join(''); //$sanitize(html.join(''))\r\n /* if (!options.nested && (emojiFound || options.hasNested)) {\r\n text = text.replace(/\\ufe0f|️|�|‍/g, '', text)\r\n var emojiSizeClass = curEmojiSize == 18 ? '' : (' emoji-w' + curEmojiSize)\r\n text = text.replace(/]*)?) class=\"emoji emoji-(\\d)-(\\d+)-(\\d+)\"(.+?)<\\/span>/g,\r\n '')\r\n } */\r\n return text; //$sce.trustAs('html', text)\r\n}\r\nfunction wrapDraftText(text, options = {}) {\r\n if (!text || !text.length) {\r\n return '';\r\n }\r\n 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(text.substr(lastOffset, entity.offset - lastOffset));\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(':', entity.title, ':');\r\n break;\r\n case 'messageEntityCode':\r\n code.push('`', entityText, '`');\r\n break;\r\n case 'messageEntityBold':\r\n code.push('**', entityText, '**');\r\n break;\r\n case 'messageEntityItalic':\r\n code.push('__', entityText, '__');\r\n break;\r\n case 'messageEntityPre':\r\n code.push('```', entityText, '```');\r\n break;\r\n case 'messageEntityMentionName':\r\n code.push('@', entity.user_id, ' (', entityText, ')');\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\nfunction replaceUrlEncodings(urlWithEncoded) {\r\n return urlWithEncoded.replace(/(%[A-Z\\d]{2})+/g, (str) => {\r\n try {\r\n return decodeURIComponent(str);\r\n }\r\n catch (e) {\r\n return str;\r\n }\r\n });\r\n}\r\nfunction wrapPlainText(text, options = {}) {\r\n if (emojiSupported) {\r\n return text;\r\n }\r\n if (!text || !text.length) {\r\n return '';\r\n }\r\n text = text.replace(/\\ufe0f/g, '', text);\r\n var match;\r\n var raw = text;\r\n var text = [], emojiTitle;\r\n while ((match = raw.match(fullRegExp))) {\r\n text.push(raw.substr(0, match.index));\r\n if (match[8]) {\r\n // @ts-ignore\r\n if ((emojiCode = EmojiHelper.emojiMap[match[8]]) &&\r\n // @ts-ignore\r\n (emojiTitle = emojiData[emojiCode][1][0])) {\r\n text.push(':' + emojiTitle + ':');\r\n }\r\n else {\r\n text.push(match[0]);\r\n }\r\n }\r\n else {\r\n text.push(match[0]);\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)\r\n return '';\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 }\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\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\nexports.RichTextProcessor = RichTextProcessor;\r\n// @ts-ignore\r\nif (process.env.NODE_ENV != 'production') {\r\n window.RichTextProcessor = RichTextProcessor;\r\n}\r\n" - }, - { - "id": 4, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\misc.ts", - "name": "./src/components/misc.ts", - "index": 24, - "index2": 22, - "size": 10517, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "issuerId": 49, - "issuerName": "./src/pages/pageSignIn.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 49, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "name": "./src/pages/pageSignIn.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - } - ], - "profile": { - "factory": 104, - "building": 1053, - "dependencies": 527 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 5, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": "22:15-47" - }, - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "../../components/misc", - "loc": "24:15-47" - }, - { - "moduleId": 14, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": "31:15-47" - }, - { - "moduleId": 16, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts", - "module": "./src/lib/appManagers/appDialogsManager.ts", - "moduleName": "./src/lib/appManagers/appDialogsManager.ts", - "type": "cjs require", - "userRequest": "../../components/misc", - "loc": "22:15-47" - }, - { - "moduleId": 18, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "module": "./src/components/wrappers.ts", - "moduleName": "./src/components/wrappers.ts", - "type": "cjs require", - "userRequest": "./misc", - "loc": "23:15-32" - }, - { - "moduleId": 24, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", - "type": "cjs require", - "userRequest": "../../components/misc", - "loc": "35:15-47" - }, - { - "moduleId": 27, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appProfileManager.ts", - "module": "./src/lib/appManagers/appProfileManager.ts", - "moduleName": "./src/lib/appManagers/appProfileManager.ts", - "type": "cjs require", - "userRequest": "../../components/misc", - "loc": "27:15-47" - }, - { - "moduleId": 31, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 42, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 49, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 56, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 61, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popupStickers.ts", - "module": "./src/components/popupStickers.ts", - "moduleName": "./src/components/popupStickers.ts", - "type": "cjs require", - "userRequest": "./misc", - "loc": "12:15-32" - }, - { - "moduleId": 63, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\gifsMasonry.ts", - "module": "./src/components/gifsMasonry.ts", - "moduleName": "./src/components/gifsMasonry.ts", - "type": "cjs require", - "userRequest": "./misc", - "loc": "18:15-32" - }, - { - "moduleId": 66, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pagePassword.ts", - "module": "./src/pages/pagePassword.ts", - "moduleName": "./src/pages/pagePassword.ts", - "type": "cjs require", - "userRequest": "../components/misc", - "loc": "9:15-44" - }, - { - "moduleId": 80, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignUp.ts", - "module": "./src/pages/pageSignUp.ts", - "moduleName": "./src/pages/pageSignUp.ts", - "type": "cjs require", - "userRequest": "../components/misc", - "loc": "25:15-44" - }, - { - "moduleId": 90, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\addMembers.ts", - "module": "./src/components/sidebarLeft/addMembers.ts", - "moduleName": "./src/components/sidebarLeft/addMembers.ts", - "type": "cjs require", - "userRequest": "../misc", - "loc": "26:15-33" - }, - { - "moduleId": 93, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\settings.ts", - "module": "./src/components/sidebarLeft/settings.ts", - "moduleName": "./src/components/sidebarLeft/settings.ts", - "type": "cjs require", - "userRequest": "../misc", - "loc": "25:15-33" - }, - { - "moduleId": 96, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\editFolder.ts", - "module": "./src/components/sidebarLeft/editFolder.ts", - "moduleName": "./src/components/sidebarLeft/editFolder.ts", - "type": "cjs require", - "userRequest": "../misc", - "loc": "28:15-33" - }, - { - "moduleId": 100, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\gifs.ts", - "module": "./src/components/emoticonsDropdown/tabs/gifs.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/gifs.ts", - "type": "cjs require", - "userRequest": "../../misc", - "loc": "9:15-36" - }, - { - "moduleId": 101, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\emoji.ts", - "module": "./src/components/emoticonsDropdown/tabs/emoji.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/emoji.ts", - "type": "cjs require", - "userRequest": "../../misc", - "loc": "9:15-36" - }, - { - "moduleId": 102, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\stickers.ts", - "module": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "type": "cjs require", - "userRequest": "../../misc", - "loc": "41:15-36" - }, - { - "moduleId": 106, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\contextMenu.ts", - "module": "./src/components/chat/contextMenu.ts", - "moduleName": "./src/components/chat/contextMenu.ts", - "type": "cjs require", - "userRequest": "../misc", - "loc": "13:15-33" - } - ], - "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\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.attachContextMenuListener = exports.positionMenu = exports.openBtnMenu = exports.parseMenuButtonsTo = exports.formatPhoneNumber = exports.putPreloader = exports.renderImageFromUrl = exports.loadedURLs = void 0;\r\nconst config_1 = __importStar(require(\"../lib/config\"));\r\nexports.loadedURLs = {};\r\nconst set = (elem, url) => {\r\n if (elem instanceof HTMLImageElement || elem instanceof HTMLVideoElement)\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\n// проблема функции в том, что она не подходит для ссылок, пригодна только для blob'ов, потому что обычным ссылкам нужен 'load' каждый раз.\r\nfunction renderImageFromUrl(elem, url, callback) {\r\n if ((exports.loadedURLs[url] /* && false */) || elem instanceof HTMLVideoElement) {\r\n set(elem, url);\r\n callback && callback();\r\n return true;\r\n }\r\n else {\r\n const isImage = elem instanceof HTMLImageElement;\r\n const loader = isImage ? elem : new Image();\r\n //const loader = new Image();\r\n loader.src = url;\r\n //let perf = performance.now();\r\n loader.addEventListener('load', () => {\r\n if (!isImage) {\r\n set(elem, url);\r\n }\r\n exports.loadedURLs[url] = true;\r\n //console.log('onload:', url, performance.now() - perf);\r\n callback && callback();\r\n });\r\n if (callback) {\r\n loader.addEventListener('error', callback);\r\n }\r\n return false;\r\n }\r\n}\r\nexports.renderImageFromUrl = renderImageFromUrl;\r\nfunction putPreloader(elem, returnDiv = false) {\r\n const html = `\r\n \r\n \r\n `;\r\n if (returnDiv) {\r\n let div = document.createElement('div');\r\n div.classList.add('preloader');\r\n div.innerHTML = html;\r\n if (elem) {\r\n elem.appendChild(div);\r\n }\r\n return div;\r\n }\r\n elem.innerHTML += html;\r\n}\r\nexports.putPreloader = putPreloader;\r\nfunction 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 const match = el.className.match(/(?:^|\\s)menu-(.+?)(?:$|\\s)/);\r\n if (!match)\r\n return;\r\n to[match[1]] = 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) => {\r\n /* if(touchSupport && e.type == 'touchstart') {\r\n const target = findUpClassName(e.target, 'btn-menu');\r\n if(!target) {\r\n window.addEventListener('touchend', (e) => {\r\n return cancelEvent(e);\r\n }, {once: true});\r\n }\r\n } */ /* else if(!touchSupport && e.type == 'mousedown') {\r\n const target = findUpClassName(e.target, 'btn-menu');\r\n if(!target) {\r\n closeBtnMenu();\r\n return cancelEvent(e);\r\n }\r\n } */\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 if (config_1.touchSupport) {\r\n window.removeEventListener('touchmove', onClick);\r\n //window.removeEventListener('touchstart', onClick);\r\n }\r\n else {\r\n window.removeEventListener('mousemove', onMouseMove);\r\n //window.removeEventListener('mousedown', onClick);\r\n //window.removeEventListener('click', onClick);\r\n }\r\n window.removeEventListener('click', onClick);\r\n window.removeEventListener('contextmenu', onClick);\r\n};\r\nwindow.addEventListener('resize', () => {\r\n if (openedMenu) {\r\n closeBtnMenu();\r\n }\r\n /* if(openedMenu && (openedMenu.style.top || openedMenu.style.left)) {\r\n const rect = openedMenu.getBoundingClientRect();\r\n const {innerWidth, innerHeight} = window;\r\n \r\n console.log(innerWidth, innerHeight, rect);\r\n } */\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 if (config_1.touchSupport) {\r\n window.addEventListener('touchmove', onClick, { once: true });\r\n //window.addEventListener('touchstart', onClick);\r\n }\r\n else {\r\n window.addEventListener('mousemove', onMouseMove);\r\n //window.addEventListener('mousedown', onClick);\r\n //window.addEventListener('click', onClick, {once: true});\r\n }\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({ clientX, clientY } /* e: MouseEvent */, elem, side) {\r\n //let {clientX, clientY} = e;\r\n let { scrollWidth, scrollHeight } = elem;\r\n let { innerWidth, innerHeight } = window;\r\n if (config_1.mediaSizes.isMobile) {\r\n side = undefined;\r\n }\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\nfunction attachContextMenuListener(element, callback) {\r\n if (config_1.isApple && config_1.touchSupport) {\r\n let timeout;\r\n const onCancel = () => {\r\n clearTimeout(timeout);\r\n element.removeEventListener('touchmove', onCancel);\r\n element.removeEventListener('touchend', onCancel);\r\n element.removeEventListener('touchcancel', onCancel);\r\n };\r\n element.addEventListener('touchstart', (e) => {\r\n if (e.touches.length > 1) {\r\n clearTimeout(timeout);\r\n return;\r\n }\r\n element.addEventListener('touchmove', onCancel, { once: true });\r\n element.addEventListener('touchend', onCancel, { once: true });\r\n element.addEventListener('touchcancel', onCancel, { once: true });\r\n /* let eee = (e: TouchEvent) => {\r\n const target = findUpClassName(e.target, 'btn-menu');\r\n if(!target) {\r\n closeBtnMenu();\r\n window.addEventListener('touchend', (e) => {\r\n return cancelEvent(e);\r\n }, {once: true});\r\n }\r\n }; */\r\n timeout = window.setTimeout(() => {\r\n callback(e.touches[0]);\r\n onCancel();\r\n /* window.requestAnimationFrame(() => {\r\n window.addEventListener('touchstart', eee);\r\n window.addEventListener('touchend', (e) => {\r\n window.removeEventListener('touchstart', eee);\r\n }, {once: true});\r\n }); */\r\n }, .4e3);\r\n });\r\n }\r\n else {\r\n element.addEventListener('contextmenu', callback);\r\n }\r\n}\r\nexports.attachContextMenuListener = attachContextMenuListener;\r\n;\r\n" - }, - { - "id": 5, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appUsersManager.ts", - "name": "./src/lib/appManagers/appUsersManager.ts", - "index": 39, - "index2": 50, - "size": 21672, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 7, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 8, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appPeersManager.ts", - "module": "./src/lib/appManagers/appPeersManager.ts", - "moduleName": "./src/lib/appManagers/appPeersManager.ts", - "type": "cjs require", - "userRequest": "./appUsersManager", - "loc": "7:42-70" - }, - { - "moduleId": 9, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "./appUsersManager", - "loc": "10:42-70" - }, - { - "moduleId": 14, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "module": "./src/lib/appManagers/appSidebarLeft.ts", - "moduleName": "./src/lib/appManagers/appSidebarLeft.ts", - "type": "cjs require", - "userRequest": "./appUsersManager", - "loc": "32:42-70" - }, - { - "moduleId": 16, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts", - "module": "./src/lib/appManagers/appDialogsManager.ts", - "moduleName": "./src/lib/appManagers/appDialogsManager.ts", - "type": "cjs require", - "userRequest": "./appUsersManager", - "loc": "20:42-70" - }, - { - "moduleId": 24, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", - "type": "cjs require", - "userRequest": "./appUsersManager", - "loc": "42:42-70" - }, - { - "moduleId": 27, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appProfileManager.ts", - "module": "./src/lib/appManagers/appProfileManager.ts", - "moduleName": "./src/lib/appManagers/appProfileManager.ts", - "type": "cjs require", - "userRequest": "./appUsersManager", - "loc": "20:42-70" - }, - { - "moduleId": 32, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\apiUpdatesManager.ts", - "module": "./src/lib/appManagers/apiUpdatesManager.ts", - "moduleName": "./src/lib/appManagers/apiUpdatesManager.ts", - "type": "cjs require", - "userRequest": "./appUsersManager", - "loc": "12:42-70" - }, - { - "moduleId": 39, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appPollsManager.ts", - "module": "./src/lib/appManagers/appPollsManager.ts", - "moduleName": "./src/lib/appManagers/appPollsManager.ts", - "type": "cjs require", - "userRequest": "./appUsersManager", - "loc": "13:42-70" - }, - { - "moduleId": 40, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appStateManager.ts", - "module": "./src/lib/appManagers/appStateManager.ts", - "moduleName": "./src/lib/appManagers/appStateManager.ts", - "type": "cjs require", - "userRequest": "./appUsersManager", - "loc": "12:42-70" - }, - { - "moduleId": 43, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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" - }, - { - "moduleId": 51, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 62, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\AppInlineBotsManager.ts", - "module": "./src/lib/appManagers/AppInlineBotsManager.ts", - "moduleName": "./src/lib/appManagers/AppInlineBotsManager.ts", - "type": "cjs require", - "userRequest": "./appUsersManager", - "loc": "13:42-70" - }, - { - "moduleId": 87, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\gifs.ts", - "module": "./src/components/sidebarRight/gifs.ts", - "moduleName": "./src/components/sidebarRight/gifs.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appUsersManager", - "loc": "38:42-90" - }, - { - "moduleId": 91, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\contacts.ts", - "module": "./src/components/sidebarLeft/contacts.ts", - "moduleName": "./src/components/sidebarLeft/contacts.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appUsersManager", - "loc": "27:42-90" - }, - { - "moduleId": 92, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\newGroup.ts", - "module": "./src/components/sidebarLeft/newGroup.ts", - "moduleName": "./src/components/sidebarLeft/newGroup.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appUsersManager", - "loc": "31:42-90" - }, - { - "moduleId": 93, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\settings.ts", - "module": "./src/components/sidebarLeft/settings.ts", - "moduleName": "./src/components/sidebarLeft/settings.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appUsersManager", - "loc": "29:42-90" - }, - { - "moduleId": 94, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\editProfile.ts", - "module": "./src/components/sidebarLeft/editProfile.ts", - "moduleName": "./src/components/sidebarLeft/editProfile.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appUsersManager", - "loc": "11:42-90" - }, - { - "moduleId": 97, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\includedChats.ts", - "module": "./src/components/sidebarLeft/includedChats.ts", - "moduleName": "./src/components/sidebarLeft/includedChats.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appUsersManager", - "loc": "29:42-90" - } - ], - "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.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\nconst appPeersManager_1 = __importDefault(require(\"./appPeersManager\"));\r\nconst appStateManager_1 = __importDefault(require(\"./appStateManager\"));\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 this.contactsList = new Set();\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 ('expires' in user.status) {\r\n user.status.expires -= serverTimeManager_1.default.serverTimeOffset;\r\n }\r\n if ('was_online' in user.status) {\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 this.saveApiUsers(result.users);\r\n result.contacts.forEach((contact) => {\r\n this.pushContact(contact.user_id);\r\n });\r\n return this.contactsList;\r\n });\r\n }\r\n resolveUsername(username) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (this.usernames[username]) {\r\n return this.users[this.usernames[username]];\r\n }\r\n return yield mtprotoworker_1.default.invokeApi('contacts.resolveUsername', { username }).then(resolvedPeer => {\r\n this.saveApiUser(resolvedPeer.users[0]);\r\n appChatsManager_1.default.saveApiChats(resolvedPeer.chats);\r\n return this.users[this.usernames[username]];\r\n });\r\n });\r\n }\r\n pushContact(userID) {\r\n this.contactsList.add(userID);\r\n searchIndexManager_1.default.indexObject(userID, this.getUserSearchText(userID), this.contactsIndex);\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 let contactsList = [..._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 /* public resolveUsername(username: string) {\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 const expires = status._ == 'userStatusOnline' ? status.expires : (status._ == 'userStatusOffline' ? status.was_online : 0);\r\n if (expires) {\r\n return expires;\r\n }\r\n const 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 var _a;\r\n if (this.isBot(userID)) {\r\n return 'bot';\r\n }\r\n const user = this.getUser(userID);\r\n if (!user) {\r\n return '';\r\n }\r\n let str = '';\r\n switch ((_a = user.status) === null || _a === void 0 ? void 0 : _a._) {\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 const date = user.status.was_online;\r\n const 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 const 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 const c = (now - date) / 3600 | 0;\r\n str += c + ' ' + (c == 1 ? 'hour' : 'hours') + ' ago';\r\n }\r\n else {\r\n const 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 default: {\r\n str = 'last seen a long time ago';\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 isContact(id) {\r\n return this.contactsList.has(id);\r\n }\r\n isRegularUser(id) {\r\n const user = this.users[id];\r\n return user && !this.isBot(id) && !user.pFlags.deleted && !user.pFlags.support;\r\n }\r\n isNonContactUser(id) {\r\n return this.isRegularUser(id) && !this.isContact(id) && id != utils_1.$rootScope.myID;\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 const user = this.getUser(id);\r\n return 'u' + id + (user.access_hash ? '_' + user.access_hash : '');\r\n }\r\n getUserInput(id) {\r\n const 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\r\n };\r\n }\r\n updateUsersStatuses() {\r\n const timestampNow = utils_1.tsNow(true);\r\n for (const i in this.users) {\r\n const user = this.users[i];\r\n if (user.status &&\r\n user.status._ == 'userStatusOnline' &&\r\n user.status.expires < timestampNow) {\r\n user.status = { _: 'userStatusOffline', was_online: user.status.expires };\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 const user = this.getUser(id);\r\n if (user &&\r\n user.status &&\r\n user.status._ != 'userStatusOnline' &&\r\n user.status._ != 'userStatusEmpty' &&\r\n !user.pFlags.support) {\r\n user.status = {\r\n _: 'userStatusOnline',\r\n expires: utils_1.tsNow(true) + 60\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 /* public deleteContacts(userIDs: number[]) {\r\n var ids: any[] = [];\r\n userIDs.forEach((userID) => {\r\n ids.push(this.getUserInput(userID));\r\n })\r\n \r\n return apiManager.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 if (this.getPeersPromise)\r\n return this.getPeersPromise;\r\n return this.getPeersPromise = appStateManager_1.default.getState().then((state) => {\r\n var _a;\r\n if ((_a = state === null || state === void 0 ? void 0 : state.topPeers) === null || _a === void 0 ? void 0 : _a.length) {\r\n return state.topPeers;\r\n }\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((result) => {\r\n let peerIDs;\r\n if (result._ == 'contacts.topPeers') {\r\n //console.log(result);\r\n this.saveApiUsers(result.users);\r\n appChatsManager_1.default.saveApiChats(result.chats);\r\n peerIDs = result.categories[0].peers.map((topPeer) => {\r\n const peerID = appPeersManager_1.default.getPeerID(topPeer.peer);\r\n appStateManager_1.default.pushPeer(peerID);\r\n return peerID;\r\n });\r\n }\r\n appStateManager_1.default.pushToState('topPeers', peerIDs);\r\n return peerIDs;\r\n });\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 /* public onContactUpdated(userID: number, isContact: boolean) {\r\n userID = parseInt('' + userID);\r\n \r\n if(Array.isArray(this.contactsList)) {\r\n var curPos = this.contactsList.indexOf(userID);\r\n var curIsContact = curPos != -1;\r\n \r\n if(isContact != curIsContact) {\r\n if(isContact) {\r\n this.contactsList.push(userID)\r\n searchIndexManager.indexObject(userID, this.getUserSearchText(userID), this.contactsIndex);\r\n } else {\r\n this.contactsList.splice(curPos, 1);\r\n }\r\n \r\n $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": 6, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\scrollable_new.ts", - "name": "./src/components/scrollable_new.ts", - "index": 25, - "index2": 24, - "size": 17773, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "issuerId": 49, - "issuerName": "./src/pages/pageSignIn.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 49, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "name": "./src/pages/pageSignIn.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - } - ], - "profile": { - "factory": 104, - "building": 1053, - "dependencies": 527 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "../../components/scrollable_new", - "loc": "27:41-83" - }, - { - "moduleId": 14, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": "33:41-83" - }, - { - "moduleId": 16, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts", - "module": "./src/lib/appManagers/appDialogsManager.ts", - "moduleName": "./src/lib/appManagers/appDialogsManager.ts", - "type": "cjs require", - "userRequest": "../../components/scrollable_new", - "loc": "24:41-83" - }, - { - "moduleId": 24, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", - "type": "cjs require", - "userRequest": "../../components/scrollable_new", - "loc": "37:41-83" - }, - { - "moduleId": 43, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 49, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 51, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 61, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popupStickers.ts", - "module": "./src/components/popupStickers.ts", - "moduleName": "./src/components/popupStickers.ts", - "type": "cjs require", - "userRequest": "./scrollable_new", - "loc": "9:41-68" - }, - { - "moduleId": 85, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\stickers.ts", - "module": "./src/components/sidebarRight/stickers.ts", - "moduleName": "./src/components/sidebarRight/stickers.ts", - "type": "cjs require", - "userRequest": "../scrollable_new", - "loc": "26:41-69" - }, - { - "moduleId": 86, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\pollResults.ts", - "module": "./src/components/sidebarRight/pollResults.ts", - "moduleName": "./src/components/sidebarRight/pollResults.ts", - "type": "cjs require", - "userRequest": "../scrollable_new", - "loc": "25:41-69" - }, - { - "moduleId": 87, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\gifs.ts", - "module": "./src/components/sidebarRight/gifs.ts", - "moduleName": "./src/components/sidebarRight/gifs.ts", - "type": "cjs require", - "userRequest": "../scrollable_new", - "loc": "35:41-69" - }, - { - "moduleId": 91, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\contacts.ts", - "module": "./src/components/sidebarLeft/contacts.ts", - "moduleName": "./src/components/sidebarLeft/contacts.ts", - "type": "cjs require", - "userRequest": "../scrollable_new", - "loc": "25:41-69" - }, - { - "moduleId": 92, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\newGroup.ts", - "module": "./src/components/sidebarLeft/newGroup.ts", - "moduleName": "./src/components/sidebarLeft/newGroup.ts", - "type": "cjs require", - "userRequest": "../scrollable_new", - "loc": "29:41-69" - }, - { - "moduleId": 94, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\editProfile.ts", - "module": "./src/components/sidebarLeft/editProfile.ts", - "moduleName": "./src/components/sidebarLeft/editProfile.ts", - "type": "cjs require", - "userRequest": "../scrollable_new", - "loc": "10:41-69" - }, - { - "moduleId": 98, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\input.ts", - "module": "./src/components/chat/input.ts", - "moduleName": "./src/components/chat/input.ts", - "type": "cjs require", - "userRequest": "../scrollable_new", - "loc": "7:41-69" - }, - { - "moduleId": 100, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\gifs.ts", - "module": "./src/components/emoticonsDropdown/tabs/gifs.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/gifs.ts", - "type": "cjs require", - "userRequest": "../../scrollable_new", - "loc": "8:41-72" - }, - { - "moduleId": 101, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\emoji.ts", - "module": "./src/components/emoticonsDropdown/tabs/emoji.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/emoji.ts", - "type": "cjs require", - "userRequest": "../../scrollable_new", - "loc": "7:41-72" - }, - { - "moduleId": 102, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\stickers.ts", - "module": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "type": "cjs require", - "userRequest": "../../scrollable_new", - "loc": "35:41-72" - }, - { - "moduleId": 103, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popupCreatePoll.ts", - "module": "./src/components/popupCreatePoll.ts", - "moduleName": "./src/components/popupCreatePoll.ts", - "type": "cjs require", - "userRequest": "./scrollable_new", - "loc": "7: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 logger_1 = require(\"../lib/logger\");\r\nconst smoothscroll_1 = __importDefault(require(\"../vendor/smoothscroll\"));\r\nconst config_1 = require(\"../lib/config\");\r\n//import { CancellablePromise, deferredPromise } from \"../lib/polyfill\";\r\n//import { isInDOM } from \"../lib/utils\";\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 = 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, container = document.createElement('div')) {\r\n this.el = el;\r\n this.appendTo = appendTo;\r\n this.onScrollOffset = onScrollOffset;\r\n this.splitCount = splitCount;\r\n this.container = container;\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.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 /* private onScrolledTopFired = false;\r\n private onScrolledBottomFired = false; */\r\n this.scrollLocked = 0;\r\n //public scrollLockedPromise: CancellablePromise = Promise.resolve();\r\n this.isVisible = false;\r\n this.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 // this.log('onScroll:', this.container.scrollTop);\r\n // if(this.container.scrollTop <= 0) {\r\n // /* touchSupport && */(this.container.style.overflow = 'hidden');\r\n // this.scrollTop = 0;\r\n // /* touchSupport && */(this.container.style.overflow = '');\r\n // }\r\n if (this.splitUp) {\r\n clearTimeout(this.disableHoverTimeout);\r\n this.disableHoverTimeout = window.setTimeout(() => {\r\n //appendTo.classList.remove('disable-hover');\r\n this.lastScrollDirection = 0;\r\n }, 100);\r\n }\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 if (this.onScrollMeasure || ((this.scrollLocked || (!this.onScrolledTop && !this.onScrolledBottom)) && !this.splitUp))\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 const 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 this.container.classList.add('scrollable');\r\n this.visible = new Set();\r\n this.observer = new IntersectionObserver(entries => {\r\n const filtered = entries.filter(entry => entry.isIntersecting);\r\n //return;\r\n //this.log('entries:', entries);\r\n entries.forEach(entry => {\r\n const target = entry.target;\r\n if (entry.isIntersecting) {\r\n this.setVisible(target);\r\n this.log.debug('intersection entry:', entry, this.lastTopID, this.lastBottomID);\r\n }\r\n else {\r\n const id = +target.dataset.virtual;\r\n const 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.log.debug('entries:', entries, filtered, this.lastScrollDirection, this.lastTopID, this.lastBottomID);\r\n const minVisibleID = this.lastTopID - this.splitCount;\r\n const maxVisibleID = this.lastBottomID + this.splitCount;\r\n for (const target of this.visible) {\r\n const 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 = logger_1.logger('SCROLL' + (logPrefix ? '-' + logPrefix : ''), logger_1.LogLevels.error);\r\n if (axis == 'x') {\r\n this.container.classList.add('scrollable-x');\r\n if (!config_1.touchSupport) {\r\n const scrollHorizontally = (e) => {\r\n e = window.event || e;\r\n if (e.which == 1) {\r\n // maybe horizontal scroll is natively supports, works on macbook\r\n return;\r\n }\r\n const 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 }\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 window.addEventListener('resize', () => {\r\n this.overflowContainer = config_1.mediaSizes.isMobile && false ? document.documentElement : this.container;\r\n this.onScroll();\r\n });\r\n this.container.addEventListener('scroll', this.onScroll, { 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 if (el) {\r\n Array.from(el.children).forEach(c => this.container.append(c));\r\n el.append(this.container);\r\n }\r\n //this.onScroll();\r\n this.overflowContainer = config_1.mediaSizes.isMobile && 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.log.debug('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.log.debug('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 checkForTriggers(container) {\r\n if (this.scrollLocked || (!this.onScrolledTop && !this.onScrolledBottom))\r\n return;\r\n const scrollHeight = container.scrollHeight;\r\n if (!scrollHeight) { // незачем вызывать триггеры если блок пустой или не виден\r\n return;\r\n }\r\n const { clientHeight, scrollTop } = container;\r\n const maxScrollTop = scrollHeight - 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 if (!this.splitUp || this.reorderTimeout)\r\n return;\r\n this.reorderTimeout = window.setTimeout(() => {\r\n this.reorderTimeout = 0;\r\n Array.from(this.splitUp.children).forEach((el, idx) => {\r\n el.dataset.virtual = '' + idx;\r\n });\r\n }, 0);\r\n }\r\n updateElement(element) {\r\n element.style.minHeight = '';\r\n window.requestAnimationFrame(() => {\r\n const 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 if (!this.splitUp)\r\n return;\r\n //return;\r\n element.dataset.virtual = '' + (append ? this.virtualTempIDBottom++ : this.virtualTempIDTop--);\r\n this.log.debug('prepareElement: prepared');\r\n window.requestAnimationFrame(() => {\r\n const { scrollHeight /* , scrollWidth */ } = element;\r\n this.log.debug('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 const 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 const clientHeight = this.container.clientHeight;\r\n const height = element.scrollHeight;\r\n const 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 const 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 /* else {\r\n this.scrollLockedPromise = deferredPromise();\r\n } */\r\n this.scrollLocked = window.setTimeout(() => {\r\n this.scrollLocked = 0;\r\n //this.scrollLockedPromise.resolve();\r\n //this.onScroll();\r\n this.container.dispatchEvent(new CustomEvent('scroll'));\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": 7, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "name": "./src/lib/appManagers/appMessagesManager.ts", - "index": 48, - "index2": 46, - "size": 170131, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 16, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 18, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "module": "./src/components/wrappers.ts", - "moduleName": "./src/components/wrappers.ts", - "type": "cjs require", - "userRequest": "../lib/appManagers/appMessagesManager", - "loc": "24:45-93" - }, - { - "moduleId": 24, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", - "type": "cjs require", - "userRequest": "./appMessagesManager", - "loc": "39:45-76" - }, - { - "moduleId": 27, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appProfileManager.ts", - "module": "./src/lib/appManagers/appProfileManager.ts", - "moduleName": "./src/lib/appManagers/appProfileManager.ts", - "type": "cjs require", - "userRequest": "./appMessagesManager", - "loc": "29:45-76" - }, - { - "moduleId": 37, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\appMediaPlaybackController.ts", - "module": "./src/components/appMediaPlaybackController.ts", - "moduleName": "./src/components/appMediaPlaybackController.ts", - "type": "cjs require", - "userRequest": "../lib/appManagers/appMessagesManager", - "loc": "7:45-93" - }, - { - "moduleId": 39, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 40, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appStateManager.ts", - "module": "./src/lib/appManagers/appStateManager.ts", - "moduleName": "./src/lib/appManagers/appStateManager.ts", - "type": "cjs require", - "userRequest": "./appMessagesManager", - "loc": "8:45-76" - }, - { - "moduleId": 42, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 43, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 51, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 56, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 62, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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" - }, - { - "moduleId": 95, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\chatFolders.ts", - "module": "./src/components/sidebarLeft/chatFolders.ts", - "moduleName": "./src/components/sidebarLeft/chatFolders.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appMessagesManager", - "loc": "8:45-96" - }, - { - "moduleId": 96, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\editFolder.ts", - "module": "./src/components/sidebarLeft/editFolder.ts", - "moduleName": "./src/components/sidebarLeft/editFolder.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appMessagesManager", - "loc": "27:45-96" - }, - { - "moduleId": 98, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\input.ts", - "module": "./src/components/chat/input.ts", - "moduleName": "./src/components/chat/input.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appMessagesManager", - "loc": "14:45-96" - }, - { - "moduleId": 103, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popupCreatePoll.ts", - "module": "./src/components/popupCreatePoll.ts", - "moduleName": "./src/components/popupCreatePoll.ts", - "type": "cjs require", - "userRequest": "../lib/appManagers/appMessagesManager", - "loc": "8:45-93" - }, - { - "moduleId": 105, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\audio.ts", - "module": "./src/components/chat/audio.ts", - "moduleName": "./src/components/chat/audio.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appMessagesManager", - "loc": "8:45-96" - }, - { - "moduleId": 106, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\contextMenu.ts", - "module": "./src/components/chat/contextMenu.ts", - "moduleName": "./src/components/chat/contextMenu.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appMessagesManager", - "loc": "9:45-96" - } - ], - "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 = exports.FiltersStorage = exports.DialogsStorage = 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 appDocsManager_1 = __importDefault(require(\"./appDocsManager\"));\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 cancellablePromise_1 = require(\"../../helpers/cancellablePromise\");\r\nconst appPollsManager_1 = __importDefault(require(\"./appPollsManager\"));\r\nconst searchIndexManager_1 = __importDefault(require(\"../searchIndexManager\"));\r\nconst logger_1 = require(\"../logger\");\r\nconst appDownloadManager_1 = __importDefault(require(\"./appDownloadManager\"));\r\n//console.trace('include');\r\n// TODO: если удалить сообщение в непрогруженном диалоге, то при обновлении, из-за стейта, последнего сообщения в чатлисте не будет\r\nconst APITIMEOUT = 0;\r\nclass DialogsStorage {\r\n constructor() {\r\n this.dialogs = {};\r\n this.byFolders = {};\r\n this.allDialogsLoaded = {};\r\n this.dialogsOffsetDate = {};\r\n this.pinnedOrders = {\r\n 0: [],\r\n 1: []\r\n };\r\n this.dialogsNum = 0;\r\n }\r\n getFolder(id) {\r\n var _a, _b;\r\n if (id <= 1) {\r\n return (_a = this.byFolders[id]) !== null && _a !== void 0 ? _a : (this.byFolders[id] = []);\r\n }\r\n const dialogs = [];\r\n const filter = appMessagesManager.filtersStorage.filters[id];\r\n for (const peerID in this.dialogs) {\r\n const dialog = this.dialogs[peerID];\r\n if (appMessagesManager.filtersStorage.testDialogForFilter(dialog, filter)) {\r\n let index;\r\n const pinnedIndex = filter.pinned_peers.indexOf(dialog.peerID);\r\n if (pinnedIndex !== -1) {\r\n index = this.generateDialogIndex(this.generateDialogPinnedDateByIndex(filter.pinned_peers.length - 1 - pinnedIndex));\r\n }\r\n else if ((_b = dialog.pFlags) === null || _b === void 0 ? void 0 : _b.pinned) {\r\n index = this.generateIndexForDialog(dialog, true);\r\n }\r\n else {\r\n index = dialog.index;\r\n }\r\n dialogs.push({ dialog, index });\r\n }\r\n }\r\n dialogs.sort((a, b) => b.index - a.index);\r\n return dialogs.map(d => d.dialog);\r\n }\r\n getDialog(peerID, folderID) {\r\n const folders = [];\r\n if (folderID === undefined) {\r\n const dialogs = this.byFolders;\r\n for (const folderID in dialogs) {\r\n folders.push(dialogs[folderID]);\r\n }\r\n }\r\n else {\r\n folders.push(this.getFolder(folderID));\r\n }\r\n for (let folder of folders) {\r\n const index = folder.findIndex(dialog => dialog.peerID == peerID);\r\n if (index !== -1) {\r\n return [folder[index], index];\r\n }\r\n }\r\n return [];\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, justReturn = false) {\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 = appMessagesManager.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 && !justReturn) {\r\n topDate = this.generateDialogPinnedDate(dialog);\r\n //this.log('topDate', peerID, topDate);\r\n }\r\n const index = this.generateDialogIndex(topDate);\r\n if (justReturn)\r\n return index;\r\n dialog.index = index;\r\n }\r\n generateDialogPinnedDateByIndex(pinnedIndex) {\r\n return 0x7fff0000 + (pinnedIndex & 0xFFFF); // 0xFFFF - потому что в папках может быть бесконечное число пиннедов\r\n }\r\n generateDialogPinnedDate(dialog) {\r\n const order = this.pinnedOrders[dialog.folder_id];\r\n const foundIndex = order.indexOf(dialog.peerID);\r\n const pinnedIndex = foundIndex === -1 ? order.push(dialog.peerID) - 1 : foundIndex;\r\n return this.generateDialogPinnedDateByIndex(pinnedIndex);\r\n }\r\n pushDialog(dialog, offsetDate) {\r\n const dialogs = this.getFolder(dialog.folder_id);\r\n const pos = dialogs.findIndex(d => d.peerID == dialog.peerID);\r\n if (pos !== -1) {\r\n dialogs.splice(pos, 1);\r\n }\r\n //if(!this.dialogs[dialog.peerID]) {\r\n this.dialogs[dialog.peerID] = dialog;\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 const index = dialog.index;\r\n const 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 dropDialog(peerID) {\r\n const foundDialog = this.getDialog(peerID);\r\n if (foundDialog[0]) {\r\n this.byFolders[foundDialog[0].folder_id].splice(foundDialog[1], 1);\r\n delete this.dialogs[peerID];\r\n }\r\n return foundDialog;\r\n }\r\n}\r\nexports.DialogsStorage = DialogsStorage;\r\nclass FiltersStorage {\r\n constructor() {\r\n this.filters = {};\r\n this.orderIndex = 0;\r\n utils_1.$rootScope.$on('apiUpdate', (e) => {\r\n this.handleUpdate(e.detail);\r\n });\r\n }\r\n handleUpdate(update) {\r\n switch (update._) {\r\n case 'updateDialogFilter': {\r\n //console.log('updateDialogFilter', update);\r\n if (update.filter) {\r\n this.saveDialogFilter(update.filter);\r\n }\r\n else if (this.filters[update.id]) { // Папка удалена\r\n //this.getDialogFilters(true);\r\n utils_1.$rootScope.$broadcast('filter_delete', this.filters[update.id]);\r\n delete this.filters[update.id];\r\n }\r\n break;\r\n }\r\n }\r\n }\r\n testDialogForFilter(dialog, filter) {\r\n var _a;\r\n // exclude_peers\r\n for (const peerID of filter.exclude_peers) {\r\n if (peerID == dialog.peerID) {\r\n return false;\r\n }\r\n }\r\n // include_peers\r\n for (const peerID of filter.include_peers) {\r\n if (peerID == dialog.peerID) {\r\n return true;\r\n }\r\n }\r\n const pFlags = filter.pFlags;\r\n // exclude_archived\r\n if (pFlags.exclude_archived && dialog.folder_id == 1) {\r\n return false;\r\n }\r\n // exclude_read\r\n if (pFlags.exclude_read && !dialog.unread_count) {\r\n return false;\r\n }\r\n // exclude_muted\r\n if (pFlags.exclude_muted) {\r\n const isMuted = (((_a = dialog.notify_settings) === null || _a === void 0 ? void 0 : _a.mute_until) * 1000) > Date.now();\r\n if (isMuted) {\r\n return false;\r\n }\r\n }\r\n const peerID = dialog.peerID;\r\n if (peerID < 0) {\r\n // broadcasts\r\n if (pFlags.broadcasts && appPeersManager_1.default.isBroadcast(peerID)) {\r\n return true;\r\n }\r\n // groups\r\n if (pFlags.groups && appPeersManager_1.default.isAnyGroup(peerID)) {\r\n return true;\r\n }\r\n }\r\n else {\r\n // bots\r\n if (appPeersManager_1.default.isBot(peerID)) {\r\n return !!pFlags.bots;\r\n }\r\n // non_contacts\r\n if (pFlags.non_contacts && !appUsersManager_1.default.contactsList.has(peerID)) {\r\n return true;\r\n }\r\n // contacts\r\n if (pFlags.contacts && appUsersManager_1.default.contactsList.has(peerID)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n toggleDialogPin(peerID, filterID) {\r\n const filter = this.filters[filterID];\r\n const wasPinned = filter.pinned_peers.findAndSplice(p => p == peerID);\r\n if (!wasPinned) {\r\n filter.pinned_peers.unshift(peerID);\r\n }\r\n return this.updateDialogFilter(filter);\r\n }\r\n createDialogFilter(filter) {\r\n let maxID = Math.max(1, ...Object.keys(this.filters).map(i => +i));\r\n filter = utils_1.copy(filter);\r\n filter.id = maxID + 1;\r\n return this.updateDialogFilter(filter);\r\n }\r\n updateDialogFilter(filter, remove = false) {\r\n const flags = remove ? 0 : 1;\r\n if (!remove) {\r\n filter.flags = 0;\r\n const f = {\r\n contacts: 0,\r\n non_contacts: 1,\r\n groups: 2,\r\n broadcasts: 3,\r\n bots: 4,\r\n exclude_muted: 11,\r\n exclude_read: 12,\r\n exclude_archived: 13\r\n };\r\n for (const key in f) {\r\n // @ts-ignore\r\n if (filter.pFlags[key]) {\r\n filter.flags |= 1 << f[key];\r\n }\r\n }\r\n if (filter.emoticon) {\r\n filter.flags |= 1 << 25;\r\n }\r\n }\r\n return mtprotoworker_1.default.invokeApi('messages.updateDialogFilter', {\r\n flags,\r\n id: filter.id,\r\n filter: remove ? undefined : this.getOutputDialogFilter(filter)\r\n }).then((bool) => {\r\n //console.log('updateDialogFilter bool:', bool);\r\n if (bool) {\r\n /* if(!this.filters[filter.id]) {\r\n this.saveDialogFilter(filter);\r\n }\r\n \r\n $rootScope.$broadcast('filter_update', filter); */\r\n this.handleUpdate({\r\n _: 'updateDialogFilter',\r\n id: filter.id,\r\n filter: remove ? undefined : filter\r\n });\r\n }\r\n return bool;\r\n });\r\n }\r\n getOutputDialogFilter(filter) {\r\n const c = utils_1.copy(filter);\r\n ['pinned_peers', 'exclude_peers', 'include_peers'].forEach(key => {\r\n // @ts-ignore\r\n c[key] = c[key].map((peerID) => appPeersManager_1.default.getInputPeerByID(peerID));\r\n });\r\n c.include_peers.forEachReverse((peerID, idx) => {\r\n if (c.pinned_peers.includes(peerID)) {\r\n c.include_peers.splice(idx, 1);\r\n }\r\n });\r\n return c;\r\n }\r\n getDialogFilters(overwrite = false) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (Object.keys(this.filters).length && !overwrite) {\r\n return this.filters;\r\n }\r\n const filters = yield mtprotoworker_1.default.invokeApi('messages.getDialogFilters');\r\n for (const filter of filters) {\r\n this.saveDialogFilter(filter, false);\r\n }\r\n //console.log(this.filters);\r\n return this.filters;\r\n });\r\n }\r\n saveDialogFilter(filter, update = true) {\r\n ['pinned_peers', 'exclude_peers', 'include_peers'].forEach(key => {\r\n // @ts-ignore\r\n filter[key] = filter[key].map((peer) => appPeersManager_1.default.getPeerID(peer));\r\n });\r\n filter.include_peers.forEachReverse((peerID, idx) => {\r\n if (filter.pinned_peers.includes(peerID)) {\r\n filter.include_peers.splice(idx, 1);\r\n }\r\n });\r\n filter.include_peers = filter.pinned_peers.concat(filter.include_peers);\r\n if (this.filters[filter.id]) {\r\n Object.assign(this.filters[filter.id], filter);\r\n }\r\n else {\r\n this.filters[filter.id] = filter;\r\n }\r\n this.setOrderIndex(filter);\r\n if (update) {\r\n utils_1.$rootScope.$broadcast('filter_update', filter);\r\n }\r\n }\r\n setOrderIndex(filter) {\r\n if (filter.hasOwnProperty('orderIndex')) {\r\n if (filter.orderIndex > this.orderIndex) {\r\n this.orderIndex = filter.orderIndex;\r\n }\r\n }\r\n else {\r\n filter.orderIndex = this.orderIndex++;\r\n }\r\n }\r\n}\r\nexports.FiltersStorage = FiltersStorage;\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.pinnedMessages = {};\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.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.reloadConversationsPeers = [];\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 this.log = logger_1.logger('MESSAGES', logger_1.LogLevels.error);\r\n this.dialogsStorage = new DialogsStorage();\r\n this.filtersStorage = new FiltersStorage();\r\n this.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 this.handleNewDialogs = () => {\r\n clearTimeout(this.newDialogsHandlePromise);\r\n this.newDialogsHandlePromise = 0;\r\n let newMaxSeenID = 0;\r\n for (const peerID in this.newDialogsToHandle) {\r\n const 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.dialogsStorage.pushDialog(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 //this.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 utils_1.$rootScope.$on('apiUpdate', (e) => {\r\n this.handleUpdate(e.detail);\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 /* $rootScope.$on('draft_updated', (e) => {\r\n let eventData = e.detail;;\r\n var peerID = eventData.peerID;\r\n var draft = eventData.draft;\r\n \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 } else {\r\n var channelID = appPeersManager.isChannel(peerID) ? -peerID : 0\r\n var topDate = this.getMessage(dialog.top_message).date;\r\n \r\n if(channelID) {\r\n var channel = appChatsManager.getChat(channelID);\r\n if(!topDate || channel.date && channel.date > topDate) {\r\n topDate = channel.date;\r\n }\r\n }\r\n }\r\n \r\n if(!dialog.pFlags.pinned) {\r\n dialog.index = this.dialogsStorage.generateDialogIndex(topDate);\r\n }\r\n \r\n this.dialogsStorage.pushDialog(dialog);\r\n \r\n $rootScope.$broadcast('dialog_draft', {\r\n peerID,\r\n draft,\r\n index: dialog.index\r\n });\r\n }\r\n }); */\r\n }\r\n getInputEntities(entities) {\r\n var sendEntites = utils_1.copy(entities);\r\n sendEntites.forEach((entity) => {\r\n if (entity._ == 'messageEntityMentionName') {\r\n entity._ = 'inputMessageEntityMentionName';\r\n entity.user_id = appUsersManager_1.default.getUserInput(entity.user_id);\r\n }\r\n });\r\n return sendEntites;\r\n }\r\n editMessage(messageID, text, options = {}) {\r\n if (typeof (text) !== 'string' || !this.canEditMessage(messageID)) {\r\n return Promise.reject();\r\n }\r\n if (messageID < 0) {\r\n if (this.tempFinalizeCallbacks[messageID] === undefined) {\r\n this.tempFinalizeCallbacks[messageID] = {};\r\n }\r\n let promise = new Promise((resolve, reject) => {\r\n this.tempFinalizeCallbacks[messageID].edit = (mid) => {\r\n this.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 || undefined,\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 || undefined,\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 // this.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, 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 const fileType = 'mime_type' in file ? file.mime_type : file.type;\r\n const fileName = file instanceof File ? file.name : '';\r\n const isDocument = !(file instanceof File) && !(file instanceof Blob);\r\n let caption = options.caption || '';\r\n const date = utils_1.tsNow(true) + serverTimeManager_1.default.serverTimeOffset;\r\n this.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 const attributes = [];\r\n const isPhoto = ['image/jpeg', 'image/png', 'image/bmp'].indexOf(fileType) >= 0;\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 (isPhoto) {\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: 'full',\r\n location: null,\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 || undefined\r\n },\r\n waveform: options.waveform,\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 || undefined\r\n },\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 && !isDocument) {\r\n const thumbs = [];\r\n const doc = {\r\n _: 'document',\r\n id: '' + messageID,\r\n duration: options.duration,\r\n 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 if (isPhoto) {\r\n attributes.push({\r\n _: 'documentAttributeImageSize',\r\n w: options.width,\r\n h: options.height\r\n });\r\n thumbs.push({\r\n _: 'photoSize',\r\n w: options.width,\r\n h: options.height,\r\n type: 'full',\r\n location: null,\r\n size: file.size,\r\n url: options.objectURL\r\n });\r\n }\r\n appDocsManager_1.default.saveDoc(doc);\r\n }\r\n this.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 const preloader = new preloader_1.default(null, true);\r\n const 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 };\r\n const 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 const 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 let uploaded = false, uploadPromise = null;\r\n const invoke = (flags, inputMedia) => {\r\n this.setTyping('sendMessageCancelAction');\r\n return mtprotoworker_1.default.invokeApi('messages.sendMedia', {\r\n flags: flags,\r\n background: options.background || undefined,\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 const { id, access_hash, file_reference } = file;\r\n const 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 const deferred = cancellablePromise_1.deferredPromise();\r\n this.sendFilePromise.then(() => {\r\n if (!uploaded || message.error) {\r\n uploaded = false;\r\n uploadPromise = appDownloadManager_1.default.upload(file);\r\n preloader.attachPromise(uploadPromise);\r\n }\r\n uploadPromise && uploadPromise.then((inputFile) => {\r\n this.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.addNotifyListener((progress) => {\r\n this.log('upload progress', progress);\r\n const percents = Math.max(1, Math.floor(100 * progress.done / progress.total));\r\n this.setTyping({ _: actionName, progress: percents | 0 });\r\n });\r\n uploadPromise.catch(err => {\r\n if (err.name === 'AbortError' && !uploaded) {\r\n this.log('cancelling upload', media);\r\n deferred.resolve();\r\n this.cancelPendingMessage(randomIDS);\r\n this.setTyping('sendMessageCancelAction');\r\n }\r\n });\r\n uploadPromise.finally(deferred.resolve);\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, 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 this.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 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 },\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 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, 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 this.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 const file = files[i];\r\n const message = messages[i];\r\n const media = message.media;\r\n const preloader = media.preloader;\r\n const actionName = file.type.indexOf('video/') === 0 ? 'sendMessageUploadVideoAction' : 'sendMessageUploadPhotoAction';\r\n const deferred = cancellablePromise_1.deferredPromise();\r\n let canceled = false;\r\n let apiFileName;\r\n if (file.type.indexOf('video/') === 0) {\r\n apiFileName = 'video.mp4';\r\n }\r\n else {\r\n apiFileName = 'photo.' + file.type.split('/')[1];\r\n }\r\n yield this.sendFilePromise;\r\n this.sendFilePromise = deferred;\r\n if (!uploaded || message.error) {\r\n uploaded = false;\r\n uploadPromise = appDownloadManager_1.default.upload(file);\r\n preloader.attachPromise(uploadPromise);\r\n }\r\n uploadPromise.addNotifyListener((progress) => {\r\n this.log('upload progress', progress);\r\n const percents = Math.max(1, Math.floor(100 * progress.done / progress.total));\r\n this.setTyping({ _: actionName, progress: percents | 0 });\r\n });\r\n uploadPromise.catch(err => {\r\n if (err.name === 'AbortError' && !uploaded) {\r\n this.log('cancelling upload item', media);\r\n canceled = true;\r\n }\r\n });\r\n yield uploadPromise.then((inputFile) => {\r\n this.log('appMessagesManager: sendAlbum file uploaded:', inputFile);\r\n if (canceled) {\r\n return;\r\n }\r\n inputFile.name = apiFileName;\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 if (canceled) {\r\n return;\r\n }\r\n let inputMedia;\r\n if (messageMedia._ == 'messageMediaPhoto') {\r\n const photo = appPhotosManager_1.default.savePhoto(messageMedia.photo);\r\n inputMedia = appPhotosManager_1.default.getInput(photo);\r\n }\r\n else if (messageMedia._ == 'messageMediaDocument') {\r\n const doc = appDocsManager_1.default.saveDoc(messageMedia.document);\r\n inputMedia = appDocsManager_1.default.getMediaInput(doc);\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 this.log('appMessagesManager: sendAlbum uploadPromise.finally!');\r\n deferred.resolve();\r\n }\r\n uploaded = true;\r\n invoke(inputs);\r\n });\r\n }\r\n sendOther(peerID, inputMedia, options = {}) {\r\n var _a;\r\n peerID = appPeersManager_1.default.getPeerMigratedTo(peerID) || peerID;\r\n const messageID = this.tempID--;\r\n const randomID = [bin_utils_1.nextRandomInt(0xFFFFFFFF), bin_utils_1.nextRandomInt(0xFFFFFFFF)];\r\n const randomIDS = bin_utils_1.bigint(randomID[0]).shiftLeft(32).add(bin_utils_1.bigint(randomID[1])).toString();\r\n const historyStorage = (_a = this.historiesStorage[peerID]) !== null && _a !== void 0 ? _a : (this.historiesStorage[peerID] = { count: null, history: [], pending: [] });\r\n const replyToMsgID = options.replyToMsgID;\r\n const isChannel = appPeersManager_1.default.isChannel(peerID);\r\n const isMegagroup = isChannel && appPeersManager_1.default.isMegagroup(peerID);\r\n const asChannel = isChannel && !isMegagroup ? true : false;\r\n let fromID = appUsersManager_1.default.getSelf().id;\r\n let media;\r\n switch (inputMedia._) {\r\n case 'inputMediaPoll': {\r\n inputMedia.poll.id = messageID;\r\n appPollsManager_1.default.savePoll(inputMedia.poll, {\r\n _: 'pollResults',\r\n flags: 4,\r\n total_voters: 0,\r\n pFlags: {},\r\n });\r\n const { poll, results } = appPollsManager_1.default.getPoll('' + messageID);\r\n media = {\r\n _: 'messageMediaPoll',\r\n poll,\r\n results\r\n };\r\n break;\r\n }\r\n /* case 'inputMediaPhoto':\r\n media = {\r\n _: 'messageMediaPhoto',\r\n photo: appPhotosManager.getPhoto(inputMedia.id.id),\r\n caption: inputMedia.caption || ''\r\n };\r\n break;\r\n \r\n case 'inputMediaDocument':\r\n var doc = appDocsManager.getDoc(inputMedia.id.id);\r\n if(doc.sticker && doc.stickerSetInput) {\r\n appStickersManager.pushPopularSticker(doc.id);\r\n }\r\n media = {\r\n _: 'messageMediaDocument',\r\n 'document': doc,\r\n caption: inputMedia.caption || ''\r\n };\r\n break;\r\n \r\n case 'inputMediaContact':\r\n media = {\r\n _: 'messageMediaContact',\r\n phone_number: inputMedia.phone_number,\r\n first_name: inputMedia.first_name,\r\n last_name: inputMedia.last_name,\r\n user_id: 0\r\n };\r\n break;\r\n \r\n case 'inputMediaGeoPoint':\r\n media = {\r\n _: 'messageMediaGeo',\r\n geo: {\r\n _: 'geoPoint',\r\n 'lat': inputMedia.geo_point['lat'],\r\n 'long': inputMedia.geo_point['long']\r\n }\r\n };\r\n break;\r\n \r\n case 'inputMediaVenue':\r\n media = {\r\n _: 'messageMediaVenue',\r\n geo: {\r\n _: 'geoPoint',\r\n 'lat': inputMedia.geo_point['lat'],\r\n 'long': inputMedia.geo_point['long']\r\n },\r\n title: inputMedia.title,\r\n address: inputMedia.address,\r\n provider: inputMedia.provider,\r\n venue_id: inputMedia.venue_id\r\n };\r\n break;\r\n \r\n case 'messageMediaPending':\r\n media = inputMedia;\r\n break; */\r\n }\r\n let flags = 0;\r\n let pFlags = {};\r\n if (peerID != fromID) {\r\n flags |= 2;\r\n pFlags.out = true;\r\n if (!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 const 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_1.default.serverTimeOffset,\r\n message: '',\r\n media: media,\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 views: asChannel && 1,\r\n pending: true,\r\n };\r\n let toggleError = (on) => {\r\n /* const historyMessage = this.messagesForHistory[messageID];\r\n if (on) {\r\n message.error = true\r\n if (historyMessage) {\r\n historyMessage.error = true\r\n }\r\n } else {\r\n delete message.error\r\n if (historyMessage) {\r\n delete historyMessage.error\r\n }\r\n } */\r\n utils_1.$rootScope.$broadcast('messages_pending');\r\n };\r\n message.send = () => {\r\n let flags = 0;\r\n if (replyToMsgID) {\r\n flags |= 1;\r\n }\r\n if (asChannel) {\r\n flags |= 16;\r\n }\r\n if (options.clearDraft) {\r\n flags |= 128;\r\n }\r\n const sentRequestOptions = {};\r\n if (this.pendingAfterMsgs[peerID]) {\r\n sentRequestOptions.afterMessageID = this.pendingAfterMsgs[peerID].messageID;\r\n }\r\n let 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 apiPromise = mtprotoworker_1.default.invokeApi('messages.sendMedia', {\r\n flags: flags,\r\n peer: appPeersManager_1.default.getInputPeerByID(peerID),\r\n media: inputMedia,\r\n random_id: randomID,\r\n reply_to_msg_id: appMessagesIDsManager_1.default.getMessageLocalID(replyToMsgID),\r\n message: ''\r\n }, sentRequestOptions);\r\n }\r\n apiPromise.then((updates) => {\r\n 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 apiUpdatesManager_1.default.processUpdateMessage(updates);\r\n }, (error) => {\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, messageID, my: true });\r\n setTimeout(message.send, 0);\r\n /* if(options.clearDraft) {\r\n DraftsManager.clearDraft(peerID)\r\n } */\r\n this.pendingByRandomID[randomIDS] = [peerID, messageID];\r\n }\r\n cancelPendingMessage(randomID) {\r\n var pendingData = this.pendingByRandomID[randomID];\r\n this.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 getConversationsAll(query = '') {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const limit = 100, outDialogs = [];\r\n for (let folderID = 0; folderID < 2; ++folderID) {\r\n let offsetIndex = 0;\r\n for (;;) {\r\n const { dialogs } = yield appMessagesManager.getConversations(query, offsetIndex, limit, folderID);\r\n if (dialogs.length) {\r\n outDialogs.push(...dialogs);\r\n offsetIndex = dialogs[dialogs.length - 1].index || 0;\r\n }\r\n else {\r\n break;\r\n }\r\n }\r\n }\r\n return outDialogs;\r\n });\r\n }\r\n getConversations(query = '', offsetIndex, limit = 20, folderID = 0) {\r\n const realFolderID = folderID > 1 ? 0 : folderID;\r\n let curDialogStorage = this.dialogsStorage.getFolder(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 for (const peerID in this.dialogsStorage.dialogs) {\r\n const dialog = this.dialogsStorage.dialogs[peerID];\r\n if (results[dialog.peerID]) {\r\n this.cachedResults.dialogs.push(dialog);\r\n }\r\n }\r\n this.cachedResults.count = this.cachedResults.dialogs.length;\r\n }\r\n curDialogStorage = this.cachedResults.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.dialogsStorage.allDialogsLoaded[realFolderID] || curDialogStorage.length >= offset + limit) {\r\n return Promise.resolve({\r\n dialogs: curDialogStorage.slice(offset, offset + limit),\r\n count: this.dialogsStorage.allDialogsLoaded[realFolderID] ? curDialogStorage.length : null\r\n });\r\n }\r\n return this.getTopMessages(limit, realFolderID).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 //this.log.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.getFolder(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.dialogsStorage.dialogsOffsetDate[folderID]) {\r\n offsetDate = this.dialogsStorage.dialogsOffsetDate[folderID] + serverTimeManager_2.default.serverTimeOffset;\r\n offsetIndex = this.dialogsStorage.dialogsOffsetDate[folderID] * 0x10000;\r\n //flags |= 1; // means pinned already loaded\r\n }\r\n /* if(this.dialogsStorage.dialogsOffsetDate[0]) {\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 // ! ВНИМАНИЕ: ОЧЕНЬ СЛОЖНАЯ ЛОГИКА:\r\n // ! если делать запрос сначала по папке 0, потом по папке 1, по индексу 0 в массиве будет один и тот же диалог, с dialog.pFlags.pinned, ЛОЛ???\r\n // ! т.е., с запросом folder_id: 1, и exclude_pinned: 0, в результате будут ещё и закреплённые с папки 0\r\n return mtprotoworker_1.default.invokeApi('messages.getDialogs', {\r\n 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,\r\n hash: 0\r\n }, {\r\n //timeout: APITIMEOUT,\r\n noErrorBox: true\r\n }).then((dialogsResult) => {\r\n if (dialogsResult._ == 'messages.dialogsNotModified')\r\n return null;\r\n //this.log.error('messages.getDialogs result:', dialogsResult.dialogs, {...dialogsResult.dialogs[0]});\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 let maxSeenIdIncremented = offsetDate ? true : false;\r\n let hasPrepend = false;\r\n const noIDsDialogs = {};\r\n dialogsResult.dialogs.forEachReverse(dialog => {\r\n //const d = Object.assign({}, dialog);\r\n // ! нужно передавать folderID, так как по папке != 0 нет свойства folder_id\r\n this.saveConversation(dialog, folderID);\r\n /* if(dialog.peerID == -1213511294) {\r\n this.log.error('lun bot', folderID, d);\r\n } */\r\n if (offsetIndex && dialog.index > offsetIndex) {\r\n this.newDialogsToHandle[dialog.peerID] = dialog;\r\n hasPrepend = true;\r\n }\r\n // ! это может случиться, если запрос идёт не по папке 0, а по 1. почему-то read'ов нет\r\n // ! в итоге, чтобы получить 1 диалог, делается первый запрос по папке 0, потом запрос для архивных по папке 1, и потом ещё перезагрузка архивного диалога\r\n if (!dialog.read_inbox_max_id && !dialog.read_outbox_max_id) {\r\n noIDsDialogs[dialog.peerID] = dialog;\r\n /* if(dialog.peerID == -1213511294) {\r\n this.log.error('lun bot', folderID);\r\n } */\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 const count = dialogsResult.count;\r\n if (!dialogsResult.dialogs.length ||\r\n !count ||\r\n dialogs.length >= count) {\r\n this.dialogsStorage.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 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 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 return this.dialogsStorage.getDialog(peerID);\r\n }\r\n reloadConversation(peerID) {\r\n [].concat(peerID).forEach(peerID => {\r\n if (!this.reloadConversationsPeers.includes(peerID)) {\r\n this.reloadConversationsPeers.push(peerID);\r\n this.log('will reloadConversation', peerID);\r\n }\r\n });\r\n if (this.reloadConversationsPromise)\r\n return this.reloadConversationsPromise;\r\n return this.reloadConversationsPromise = new Promise((resolve, reject) => {\r\n setTimeout(() => {\r\n const peers = this.reloadConversationsPeers.map(peerID => appPeersManager_1.default.getInputDialogPeerByID(peerID));\r\n this.reloadConversationsPeers.length = 0;\r\n mtprotoworker_1.default.invokeApi('messages.getPeerDialogs', { peers }).then((result) => {\r\n this.applyConversations(result);\r\n resolve();\r\n }, reject).finally(() => {\r\n this.reloadConversationsPromise = null;\r\n });\r\n }, 0);\r\n });\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 });\r\n }\r\n else {\r\n this.dialogsStorage.dropDialog(peerID);\r\n utils_1.$rootScope.$broadcast('dialog_drop', { peerID });\r\n }\r\n });\r\n });\r\n }\r\n savePinnedMessage(peerID, mid) {\r\n if (!mid) {\r\n delete this.pinnedMessages[peerID];\r\n return;\r\n }\r\n this.pinnedMessages[peerID] = mid;\r\n this.wrapSingleMessage(mid);\r\n }\r\n getPinnedMessage(peerID) {\r\n return this.getMessage(this.pinnedMessages[peerID] || 0);\r\n }\r\n updatePinnedMessage(peerID, msgID) {\r\n mtprotoworker_1.default.invokeApi('messages.updatePinnedMessage', {\r\n flags: 0,\r\n peer: appPeersManager_1.default.getInputPeerByID(peerID),\r\n id: 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 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 // this.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 += 'Album' + (message.message ? ', ' : '') + '';\r\n }\r\n else\r\n switch (message.media._) {\r\n case 'messageMediaPhoto':\r\n messageText += 'Photo' + (message.message ? ', ' : '') + '';\r\n break;\r\n case 'messageMediaGeo':\r\n messageText += 'Geolocation';\r\n break;\r\n case 'messageMediaPoll':\r\n messageText += '' + message.media.poll.rReply + '';\r\n break;\r\n case 'messageMediaContact':\r\n messageText += 'Contact';\r\n break;\r\n case 'messageMediaDocument':\r\n let document = message.media.document;\r\n if (document.type == 'video') {\r\n messageText = 'Video' + (message.message ? ', ' : '') + '';\r\n }\r\n else if (document.type == 'voice') {\r\n messageText = 'Voice message';\r\n }\r\n else if (document.type == 'gif') {\r\n messageText = 'GIF' + (message.message ? ', ' : '') + '';\r\n }\r\n else if (document.type == 'round') {\r\n messageText = 'Video message' + (message.message ? ', ' : '') + '';\r\n }\r\n else if (document.type == 'sticker') {\r\n messageText = (document.stickerEmoji || '') + 'Sticker';\r\n }\r\n else {\r\n messageText = '' + document.file_name + '';\r\n }\r\n break;\r\n default:\r\n ///////this.log.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[_] || action._) + suffix;\r\n }\r\n //this.log('message action:', action);\r\n messageText = str ? '' + str + '' : '';\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 this.log('editPeerFolders updates:', updates);\r\n apiUpdatesManager_1.default.processUpdateMessage(updates); // WARNING! возможно тут нужно добавлять channelID, и вызывать апдейт для каждого канала отдельно\r\n });\r\n }\r\n toggleDialogPin(peerID, filterID) {\r\n var _a;\r\n if (filterID > 1) {\r\n this.filtersStorage.toggleDialogPin(peerID, filterID);\r\n return;\r\n }\r\n const dialog = this.getDialogByPeerID(peerID)[0];\r\n if (!dialog)\r\n return Promise.reject();\r\n const peer = appPeersManager_1.default.getInputDialogPeerByID(peerID);\r\n const 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 if (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 }\r\n markDialogUnread(peerID, read) {\r\n var _a;\r\n const dialog = this.getDialogByPeerID(peerID)[0];\r\n if (!dialog)\r\n return Promise.reject();\r\n const peer = appPeersManager_1.default.getInputDialogPeerByID(peerID);\r\n const flags = read || ((_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 if (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 }\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 const 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 const dropped = this.dialogsStorage.dropDialog(migrateFrom);\r\n if (dropped.length) {\r\n utils_1.$rootScope.$broadcast('dialog_drop', { peerID: migrateFrom, dialog: dropped[0] });\r\n }\r\n utils_1.$rootScope.$broadcast('dialog_migrate', { migrateFrom, 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 // * В эту функцию попадут только те диалоги, в которых есть read_inbox_max_id и read_outbox_max_id, в отличие от тех, что будут в getTopMessages\r\n appUsersManager_1.default.saveApiUsers(dialogsResult.users);\r\n appChatsManager_1.default.saveApiChats(dialogsResult.chats);\r\n this.saveMessages(dialogsResult.messages);\r\n //this.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 topPendingMessage = this.pendingTopMsgs[peerID];\r\n if (topPendingMessage) {\r\n if (!topMessage || this.getMessage(topPendingMessage).date > this.getMessage(topMessage).date) {\r\n dialog.top_message = topMessage = topPendingMessage;\r\n }\r\n }\r\n /* const d = Object.assign({}, dialog);\r\n if(peerID == 239602833) {\r\n this.log.error('applyConversation lun', dialog, d);\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?.pFlags?.pinned && !dialog?.pFlags?.pinned) {\r\n this.log.error('here need to just replace, not FULL replace dialog! WARNING', wasDialogBefore, dialog);\r\n if(!dialog.pFlags) dialog.pFlags = {};\r\n dialog.pFlags.pinned = true;\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 dropped = this.dialogsStorage.dropDialog(peerID);\r\n if (dropped.length) {\r\n utils_1.$rootScope.$broadcast('dialog_drop', { peerID: peerID, dialog: dropped[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, folderID = 0) {\r\n const peerID = appPeersManager_1.default.getPeerID(dialog.peer);\r\n if (!peerID) {\r\n return false;\r\n }\r\n if (dialog._ != 'dialog' /* || peerID == 239602833 */) {\r\n console.error('saveConversation not regular dialog', dialog, Object.assign({}, dialog));\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 if (dialog._ == 'dialog') {\r\n // ! СЛОЖНО ! СМОТРИ В getTopMessages\r\n const wasDialogBefore = this.getDialogByPeerID(peerID)[0];\r\n dialog.folder_id = wasDialogBefore ? wasDialogBefore.folder_id : folderID;\r\n } /* else if(dialog._ == 'dialogFolder') {\r\n dialog.folder_id = dialog.folder.id;\r\n } */\r\n }\r\n dialog.peerID = peerID;\r\n this.dialogsStorage.generateIndexForDialog(dialog);\r\n this.dialogsStorage.pushDialog(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 });\r\n }\r\n }\r\n if (channelID && dialog.pts) {\r\n apiUpdatesManager_1.default.addChannelState(channelID, dialog.pts);\r\n }\r\n //if(this.filtersStorage.inited) {\r\n //this.filtersStorage.processDialog(dialog);\r\n //}\r\n }\r\n mergeReplyKeyboard(historyStorage, message) {\r\n // this.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 // this.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 // this.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 // this.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 // this.log.warn(dT(), 'new search filter', lastSearchFilter, newSearchFilter)\r\n this.lastSearchFilter = newSearchFilter;\r\n this.lastSearchResults = [];\r\n }\r\n //this.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 = {}, neededDocTypes = [];\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 neededDocTypes.push('video');\r\n break;\r\n case 'inputMessagesFilterVideo':\r\n neededContents['messageMediaDocument'] = true;\r\n neededDocTypes.push('video');\r\n break;\r\n case 'inputMessagesFilterDocument':\r\n neededContents['messageMediaDocument'] = true;\r\n break;\r\n case 'inputMessagesFilterVoice':\r\n neededContents['messageMediaDocument'] = true;\r\n neededDocTypes.push('voice');\r\n break;\r\n case 'inputMessagesFilterRoundVoice':\r\n neededContents['messageMediaDocument'] = true;\r\n neededDocTypes.push('round', 'voice');\r\n break;\r\n case 'inputMessagesFilterRoundVideo':\r\n neededContents['messageMediaDocument'] = true;\r\n neededDocTypes.push('round');\r\n break;\r\n case 'inputMessagesFilterMusic':\r\n neededContents['messageMediaDocument'] = true;\r\n neededDocTypes.push('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 (neededDocTypes.length &&\r\n message.media._ == 'messageMediaDocument' &&\r\n !neededDocTypes.includes(message.media.document.type)) {\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 // this.log.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 // this.log.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 let 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 hash: 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 flags: 0,\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 ///////////this.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 // this.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 scheduleHandleNewDialogs() {\r\n if (!this.newDialogsHandlePromise) {\r\n this.newDialogsHandlePromise = window.setTimeout(this.handleNewDialogs, 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 // this.log('done read history', peerID)\r\n if (historyStorage.history.length) {\r\n ////////this.log.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 this.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 var _a, _b;\r\n this.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 //this.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 // this.log.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 });\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, 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, 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.dialogsStorage.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 this.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': { // only 0 and 1 folders\r\n this.log('updateFolderPeers', update);\r\n const peers = update.folder_peers;\r\n this.scheduleHandleNewDialogs();\r\n peers.forEach((folderPeer) => {\r\n var _a;\r\n const { folder_id, peer } = folderPeer;\r\n const peerID = appPeersManager_1.default.getPeerID(peer);\r\n const dropped = this.dialogsStorage.dropDialog(peerID);\r\n if (!dropped.length) {\r\n this.newDialogsToHandle[peerID] = { reload: true };\r\n }\r\n else {\r\n const dialog = dropped[0];\r\n this.newDialogsToHandle[peerID] = dialog;\r\n if ((_a = dialog.pFlags) === null || _a === void 0 ? void 0 : _a.pinned) {\r\n delete dialog.pFlags.pinned;\r\n this.dialogsStorage.pinnedOrders[folder_id].findAndSplice(p => p == dialog.peerID);\r\n }\r\n dialog.folder_id = folder_id;\r\n this.dialogsStorage.generateIndexForDialog(dialog);\r\n this.dialogsStorage.pushDialog(dialog); // need for simultaneously updatePinnedDialogs\r\n }\r\n });\r\n break;\r\n }\r\n case 'updateDialogPinned': {\r\n const folderID = (_a = update.folder_id) !== null && _a !== void 0 ? _a : 0;\r\n this.log('updateDialogPinned', update);\r\n const peerID = appPeersManager_1.default.getPeerID(update.peer.peer);\r\n const foundDialog = this.getDialogByPeerID(peerID);\r\n // этот код внизу никогда не сработает, в папках за пиннед отвечает updateDialogFilter\r\n /* if(update.folder_id > 1) {\r\n const filter = this.filtersStorage.filters[update.folder_id];\r\n if(update.pFlags.pinned) {\r\n filter.pinned_peers.unshift(peerID);\r\n } else {\r\n filter.pinned_peers.findAndSplice(p => p == peerID);\r\n }\r\n } */\r\n this.scheduleHandleNewDialogs();\r\n if (!foundDialog.length) {\r\n this.newDialogsToHandle[peerID] = { reload: true };\r\n }\r\n else {\r\n const dialog = foundDialog[0];\r\n this.newDialogsToHandle[peerID] = dialog;\r\n if (!update.pFlags.pinned) {\r\n delete dialog.pFlags.pinned;\r\n this.dialogsStorage.pinnedOrders[folderID].findAndSplice(p => p == dialog.peerID);\r\n }\r\n else { // means set\r\n dialog.pFlags.pinned = true;\r\n }\r\n this.dialogsStorage.generateIndexForDialog(dialog);\r\n }\r\n break;\r\n }\r\n case 'updatePinnedDialogs': {\r\n const folderID = (_b = update.folder_id) !== null && _b !== void 0 ? _b : 0;\r\n this.log('updatePinnedDialogs', update);\r\n const newPinned = {};\r\n if (!update.order) {\r\n mtprotoworker_1.default.invokeApi('messages.getPinnedDialogs', {\r\n folder_id: folderID\r\n }).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.getFolder(folderID).forEach((dialog) => {\r\n const 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 //this.log('before order:', this.dialogsStorage[0].map(d => d.peerID));\r\n this.dialogsStorage.pinnedOrders[folderID].length = 0;\r\n let willHandle = false;\r\n update.order.reverse(); // index must be higher\r\n update.order.forEach((peer) => {\r\n const peerID = appPeersManager_1.default.getPeerID(peer.peer);\r\n newPinned[peerID] = true;\r\n const 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 const dialog = foundDialog[0];\r\n dialog.pFlags.pinned = true;\r\n this.dialogsStorage.generateIndexForDialog(dialog);\r\n this.newDialogsToHandle[peerID] = dialog;\r\n willHandle = true;\r\n });\r\n this.dialogsStorage.getFolder(folderID).forEach(dialog => {\r\n const 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 //this.log.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 // this.log.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 //////////this.log.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 const peerID = +_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, 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,\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 const channelID = update.channel_id;\r\n const peerID = -channelID;\r\n const channel = appChatsManager_1.default.getChat(channelID);\r\n const needDialog = channel._ == 'channel' && (!channel.pFlags.left && !channel.pFlags.kicked);\r\n const foundDialog = this.getDialogByPeerID(peerID);\r\n const hasDialog = foundDialog.length > 0;\r\n const canViewHistory = channel._ == 'channel' && (channel.username || !channel.pFlags.left && !channel.pFlags.kicked) && true || false;\r\n const 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.dropDialog(peerID);\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 const channelID = update.channel_id;\r\n const peerID = -channelID;\r\n this.dialogsStorage.dropDialog(peerID);\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', { mid, views });\r\n }\r\n break;\r\n }\r\n case 'updateServiceNotification': {\r\n this.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 case 'updateChatPinnedMessage':\r\n case 'updateUserPinnedMessage': {\r\n let { id } = update;\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 this.savePinnedMessage(peerID, id);\r\n break;\r\n }\r\n }\r\n }\r\n finalizePendingMessage(randomID, finalMessage) {\r\n var pendingData = this.pendingByRandomID[randomID];\r\n // this.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 // this.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 this.log.warn(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 this.maxSeenID = maxID;\r\n storage_1.default.set({ max_seen_msg: maxID });\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 let history = historyStorage.history.slice(backLimit ? Math.max(offset - backLimit, 0) : 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 // this.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 });\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 = 0, offset = 0, offsetDate = 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: offsetDate,\r\n add_offset: offset,\r\n limit: limit,\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 this.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 const mids = this.needSingleMessages.slice();\r\n this.needSingleMessages.length = 0;\r\n const splitted = appMessagesIDsManager_1.default.splitMessageIDsByChannels(mids);\r\n let promises = [];\r\n Object.keys(splitted.msgIDs).forEach((channelID) => {\r\n channelID = +channelID;\r\n const msgIDs = splitted.msgIDs[channelID].map((msgID) => {\r\n return {\r\n _: 'inputMessageID',\r\n id: msgID\r\n };\r\n });\r\n let 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 if (getMessagesResult._ != 'messages.messagesNotModified') {\r\n appUsersManager_1.default.saveApiUsers(getMessagesResult.users);\r\n appChatsManager_1.default.saveApiChats(getMessagesResult.chats);\r\n this.saveMessages(getMessagesResult.messages);\r\n }\r\n utils_1.$rootScope.$broadcast('messages_downloaded', splitted.mids[+channelID]);\r\n }));\r\n });\r\n this.fetchSingleMessagesPromise = Promise.all(promises).finally(() => {\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, overwrite = false) {\r\n if (this.messagesStorage[msgID] && !overwrite) {\r\n utils_1.$rootScope.$broadcast('messages_downloaded', [msgID]);\r\n }\r\n else 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 }\r\n }\r\n setTyping(action) {\r\n if (!utils_1.$rootScope.myID)\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(utils_1.$rootScope.myID);\r\n return mtprotoworker_1.default.invokeApi('messages.setTyping', {\r\n peer: input,\r\n action: action\r\n });\r\n }\r\n}\r\nexports.AppMessagesManager = AppMessagesManager;\r\nconst appMessagesManager = new AppMessagesManager();\r\nexports.default = appMessagesManager;\r\n" - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appPeersManager.ts", - "name": "./src/lib/appManagers/appPeersManager.ts", - "index": 42, - "index2": 33, - "size": 7100, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 5, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appUsersManager.ts", - "module": "./src/lib/appManagers/appUsersManager.ts", - "moduleName": "./src/lib/appManagers/appUsersManager.ts", - "type": "cjs require", - "userRequest": "./appPeersManager", - "loc": "24:42-70" - }, - { - "moduleId": 7, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "module": "./src/lib/appManagers/appMessagesManager.ts", - "moduleName": "./src/lib/appManagers/appMessagesManager.ts", - "type": "cjs require", - "userRequest": "./appPeersManager", - "loc": "26:42-70" - }, - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 24, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", - "type": "cjs require", - "userRequest": "./appPeersManager", - "loc": "41:42-70" - }, - { - "moduleId": 27, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 32, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\apiUpdatesManager.ts", - "module": "./src/lib/appManagers/apiUpdatesManager.ts", - "moduleName": "./src/lib/appManagers/apiUpdatesManager.ts", - "type": "cjs require", - "userRequest": "./appPeersManager", - "loc": "11:42-70" - }, - { - "moduleId": 39, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 40, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appStateManager.ts", - "module": "./src/lib/appManagers/appStateManager.ts", - "moduleName": "./src/lib/appManagers/appStateManager.ts", - "type": "cjs require", - "userRequest": "./appPeersManager", - "loc": "10:42-70" - }, - { - "moduleId": 43, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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" - }, - { - "moduleId": 51, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\appSelectPeers.ts", - "module": "./src/components/appSelectPeers.ts", - "moduleName": "./src/components/appSelectPeers.ts", - "type": "cjs require", - "userRequest": "../lib/appManagers/appPeersManager", - "loc": "22:42-87" - }, - { - "moduleId": 56, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 62, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\AppInlineBotsManager.ts", - "module": "./src/lib/appManagers/AppInlineBotsManager.ts", - "moduleName": "./src/lib/appManagers/AppInlineBotsManager.ts", - "type": "cjs require", - "userRequest": "../appManagers/appPeersManager", - "loc": "9:42-83" - }, - { - "moduleId": 95, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\chatFolders.ts", - "module": "./src/components/sidebarLeft/chatFolders.ts", - "moduleName": "./src/components/sidebarLeft/chatFolders.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appPeersManager", - "loc": "10:42-90" - }, - { - "moduleId": 97, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\includedChats.ts", - "module": "./src/components/sidebarLeft/includedChats.ts", - "moduleName": "./src/components/sidebarLeft/includedChats.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appPeersManager", - "loc": "28:42-90" - }, - { - "moduleId": 105, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\audio.ts", - "module": "./src/components/chat/audio.ts", - "moduleName": "./src/components/chat/audio.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appPeersManager", - "loc": "9:42-90" - }, - { - "moduleId": 106, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\contextMenu.ts", - "module": "./src/components/chat/contextMenu.ts", - "moduleName": "./src/components/chat/contextMenu.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appPeersManager", - "loc": "10:42-90" - } - ], - "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.AppPeersManager = void 0;\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\nclass 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 this.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 = this.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 /* Peer | number | string */) {\r\n if (typeof (peerString) === 'number')\r\n return peerString;\r\n else if (utils_1.isObject(peerString))\r\n return peerString.user_id ? peerString.user_id : -(peerString.channel_id || peerString.chat_id);\r\n else if (!peerString)\r\n return 0;\r\n const isUser = peerString.charAt(0) == 'u';\r\n const 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 this.isChannel(id) && !this.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 const 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\r\n };\r\n }\r\n getInputDialogPeerByID(peerID) {\r\n return {\r\n _: 'inputDialogPeer',\r\n peer: this.getInputPeerByID(peerID)\r\n };\r\n }\r\n getPeerColorByID(peerID, pic = true) {\r\n const idx = DialogColorsMap[(peerID < 0 ? -peerID : peerID) % 7];\r\n const 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 const chat = appChatsManager_1.default.getChat(-peerID);\r\n text = '%pg ' + (chat.title || '');\r\n }\r\n return text;\r\n }\r\n}\r\nexports.AppPeersManager = AppPeersManager;\r\nconst appPeersManager = new AppPeersManager();\r\nexports.default = appPeersManager;\r\n" - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appChatsManager.ts", - "name": "./src/lib/appManagers/appChatsManager.ts", - "index": 40, - "index2": 48, - "size": 16290, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 5, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appUsersManager.ts", - "module": "./src/lib/appManagers/appUsersManager.ts", - "moduleName": "./src/lib/appManagers/appUsersManager.ts", - "type": "cjs require", - "userRequest": "./appChatsManager", - "loc": "18:42-70" - }, - { - "moduleId": 7, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "module": "./src/lib/appManagers/appMessagesManager.ts", - "moduleName": "./src/lib/appManagers/appMessagesManager.ts", - "type": "cjs require", - "userRequest": "./appChatsManager", - "loc": "18:42-70" - }, - { - "moduleId": 8, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appPeersManager.ts", - "module": "./src/lib/appManagers/appPeersManager.ts", - "moduleName": "./src/lib/appManagers/appPeersManager.ts", - "type": "cjs require", - "userRequest": "./appChatsManager", - "loc": "8:42-70" - }, - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "./appChatsManager", - "loc": "21:42-70" - }, - { - "moduleId": 14, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "module": "./src/lib/appManagers/appSidebarLeft.ts", - "moduleName": "./src/lib/appManagers/appSidebarLeft.ts", - "type": "cjs require", - "userRequest": "./appChatsManager", - "loc": "47:42-70" - }, - { - "moduleId": 16, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts", - "module": "./src/lib/appManagers/appDialogsManager.ts", - "moduleName": "./src/lib/appManagers/appDialogsManager.ts", - "type": "cjs require", - "userRequest": "./appChatsManager", - "loc": "26:42-70" - }, - { - "moduleId": 27, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 32, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\apiUpdatesManager.ts", - "module": "./src/lib/appManagers/apiUpdatesManager.ts", - "moduleName": "./src/lib/appManagers/apiUpdatesManager.ts", - "type": "cjs require", - "userRequest": "./appChatsManager", - "loc": "13:42-70" - }, - { - "moduleId": 40, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appStateManager.ts", - "module": "./src/lib/appManagers/appStateManager.ts", - "moduleName": "./src/lib/appManagers/appStateManager.ts", - "type": "cjs require", - "userRequest": "./appChatsManager", - "loc": "11:42-70" - }, - { - "moduleId": 43, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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" - }, - { - "moduleId": 51, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 88, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\newChannel.ts", - "module": "./src/components/sidebarLeft/newChannel.ts", - "moduleName": "./src/components/sidebarLeft/newChannel.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appChatsManager", - "loc": "26:42-90" - }, - { - "moduleId": 90, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\addMembers.ts", - "module": "./src/components/sidebarLeft/addMembers.ts", - "moduleName": "./src/components/sidebarLeft/addMembers.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appChatsManager", - "loc": "27:42-90" - }, - { - "moduleId": 92, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\newGroup.ts", - "module": "./src/components/sidebarLeft/newGroup.ts", - "moduleName": "./src/components/sidebarLeft/newGroup.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appChatsManager", - "loc": "27:42-90" - }, - { - "moduleId": 106, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\contextMenu.ts", - "module": "./src/components/chat/contextMenu.ts", - "moduleName": "./src/components/chat/contextMenu.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appChatsManager", - "loc": "7:42-90" - } - ], - "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 this.onChatUpdated = (chatID, updates) => {\r\n apiUpdatesManager_1.default.processUpdateMessage(updates);\r\n if (updates &&\r\n updates.updates &&\r\n updates.updates.length &&\r\n this.isChannel(chatID)) {\r\n appProfileManager_1.default.invalidateChannelParticipants(chatID);\r\n }\r\n };\r\n utils_1.$rootScope.$on('apiUpdate', (e) => {\r\n // console.log('on apiUpdate', update)\r\n const update = e.detail;\r\n switch (update._) {\r\n case 'updateChannel':\r\n const channelID = update.channel_id;\r\n //console.log('updateChannel:', update);\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] || { _: 'chatEmpty', 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._ == 'chatEmpty')\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 if (id < 0)\r\n id = -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 < 0)\r\n id = -id;\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 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 ? 'followers' : '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 const isChannel = this.isChannel(id);\r\n const 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.getChannelInput(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 leaveChannel(id) {\r\n return mtprotoworker_1.default.invokeApi('channels.leaveChannel', {\r\n channel: this.getChannelInput(id)\r\n }).then(this.onChatUpdated.bind(this, id));\r\n }\r\n joinChannel(id) {\r\n return mtprotoworker_1.default.invokeApi('channels.joinChannel', {\r\n channel: this.getChannelInput(id)\r\n }).then(this.onChatUpdated.bind(this, id));\r\n }\r\n}\r\nexports.AppChatsManager = AppChatsManager;\r\nexports.default = new AppChatsManager();\r\n" - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "index": 38, - "index2": 104, - "size": 114943, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "issuerId": 31, - "issuerName": "./src/pages/pageIm.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - } - ], - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 14, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "module": "./src/lib/appManagers/appSidebarLeft.ts", - "moduleName": "./src/lib/appManagers/appSidebarLeft.ts", - "type": "cjs require", - "userRequest": "./appImManager", - "loc": "29:39-64" - }, - { - "moduleId": 16, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 24, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", - "type": "cjs require", - "userRequest": "./appImManager", - "loc": "46:39-64" - }, - { - "moduleId": 31, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "module": "./src/pages/pageIm.ts", - "moduleName": "./src/pages/pageIm.ts", - "type": "cjs require", - "userRequest": "../lib/appManagers/appImManager", - "loc": "30:62-104" - }, - { - "moduleId": 47, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\index.ts", - "module": "./src/components/emoticonsDropdown/index.ts", - "moduleName": "./src/components/emoticonsDropdown/index.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appImManager", - "loc": "23:39-84" - }, - { - "moduleId": 58, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\poll.ts", - "module": "./src/components/poll.ts", - "moduleName": "./src/components/poll.ts", - "type": "cjs require", - "userRequest": "../lib/appManagers/appImManager", - "loc": "12:39-81" - }, - { - "moduleId": 61, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popupStickers.ts", - "module": "./src/components/popupStickers.ts", - "moduleName": "./src/components/popupStickers.ts", - "type": "cjs require", - "userRequest": "../lib/appManagers/appImManager", - "loc": "15:39-81" - }, - { - "moduleId": 85, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\stickers.ts", - "module": "./src/components/sidebarRight/stickers.ts", - "moduleName": "./src/components/sidebarRight/stickers.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appImManager", - "loc": "29:39-84" - }, - { - "moduleId": 87, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\gifs.ts", - "module": "./src/components/sidebarRight/gifs.ts", - "moduleName": "./src/components/sidebarRight/gifs.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appImManager", - "loc": "42:39-84" - }, - { - "moduleId": 98, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\input.ts", - "module": "./src/components/chat/input.ts", - "moduleName": "./src/components/chat/input.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appImManager", - "loc": "11:39-84" - }, - { - "moduleId": 101, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\emoji.ts", - "module": "./src/components/emoticonsDropdown/tabs/emoji.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/emoji.ts", - "type": "cjs require", - "userRequest": "../../../lib/appManagers/appImManager", - "loc": "12:39-87" - }, - { - "moduleId": 105, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\audio.ts", - "module": "./src/components/chat/audio.ts", - "moduleName": "./src/components/chat/audio.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appImManager", - "loc": "7:39-84" - }, - { - "moduleId": 106, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\contextMenu.ts", - "module": "./src/components/chat/contextMenu.ts", - "moduleName": "./src/components/chat/contextMenu.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appImManager", - "loc": "8:39-84" - }, - { - "moduleId": 107, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\search.ts", - "module": "./src/components/chat/search.ts", - "moduleName": "./src/components/chat/search.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appImManager", - "loc": "26:39-84" - } - ], - "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 logger_1 = require(\"../logger\");\r\nconst appMediaViewer_1 = __importDefault(require(\"./appMediaViewer\"));\r\nconst appSidebarLeft_1 = __importDefault(require(\"./appSidebarLeft\"));\r\nconst appChatsManager_1 = __importDefault(require(\"./appChatsManager\"));\r\nconst wrappers_1 = require(\"../../components/wrappers\");\r\nconst preloader_1 = __importDefault(require(\"../../components/preloader\"));\r\nconst misc_1 = require(\"../../components/misc\");\r\nconst input_1 = require(\"../../components/chat/input\");\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 config_1 = require(\"../config\");\r\nconst animationIntersector_1 = __importDefault(require(\"../../components/animationIntersector\"));\r\nconst popupStickers_1 = __importDefault(require(\"../../components/popupStickers\"));\r\nconst popupDatepicker_1 = __importDefault(require(\"../../components/popupDatepicker\"));\r\nconst appPollsManager_1 = __importDefault(require(\"./appPollsManager\"));\r\nconst ripple_1 = require(\"../../components/ripple\");\r\nconst horizontalMenu_1 = require(\"../../components/horizontalMenu\");\r\nconst audio_1 = require(\"../../components/chat/audio\");\r\nconst contextMenu_1 = require(\"../../components/chat/contextMenu\");\r\nconst search_1 = require(\"../../components/chat/search\");\r\n//console.log('appImManager included33!');\r\nappSidebarLeft_1.default; // just to include\r\nconst testScroll = false;\r\nconst ANIMATIONGROUP = 'chat';\r\nclass AppImManager {\r\n constructor() {\r\n this.columnEl = document.getElementById('column-center');\r\n this.btnJoin = this.columnEl.querySelector('.chat-join');\r\n this.btnMute = this.columnEl.querySelector('.chat-mute-button');\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.columnEl.querySelector('.chat-search-button');\r\n this.goDownBtn = this.columnEl.querySelector('#bubbles-go-down');\r\n this.menuButtons = {};\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 = null;\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.chatInfo = this.columnEl.querySelector('.chat-info');\r\n this.contextMenu = new contextMenu_1.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 = horizontalMenu_1.horizontalMenu(null, document.getElementById('main-columns'));\r\n this.closeBtn = this.topbar.querySelector('.sidebar-close-button');\r\n this.onDatePick = (timestamp) => {\r\n const peerID = this.peerID;\r\n appMessagesManager_1.default.requestHistory(peerID, 0, 2, -1, timestamp).then(history => {\r\n var _a;\r\n if (!((_a = history === null || history === void 0 ? void 0 : history.messages) === null || _a === void 0 ? void 0 : _a.length)) {\r\n this.log.error('no history!');\r\n return;\r\n }\r\n else if (this.peerID != peerID) {\r\n return;\r\n }\r\n appImManager.setPeer(this.peerID, history.messages[0].mid);\r\n //console.log('got history date:', history);\r\n });\r\n };\r\n this.log = logger_1.logger('IM', logger_1.LogLevels.log | logger_1.LogLevels.warn | logger_1.LogLevels.debug | logger_1.LogLevels.error);\r\n this.chatInputC = new input_1.ChatInput();\r\n this.preloader = new preloader_1.default(null, false);\r\n this.selectTab(0);\r\n misc_1.parseMenuButtonsTo(this.menuButtons, this.columnEl.querySelector('.chat-more-button').firstElementChild.children);\r\n this.chatAudio = new audio_1.ChatAudio();\r\n this.chatInfo.nextElementSibling.prepend(this.chatAudio.container);\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 utils_1.$rootScope.$on('chat_update', (e) => {\r\n var _a;\r\n const peerID = e.detail;\r\n if (this.peerID == -peerID) {\r\n const chat = appChatsManager_1.default.getChat(peerID);\r\n this.btnJoin.classList.toggle('hide', !((_a = chat === null || chat === void 0 ? void 0 : chat.pFlags) === null || _a === void 0 ? void 0 : _a.left));\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 var _a, _b, _c;\r\n const { tempID, mid } = e.detail;\r\n this.log('message_sent', e.detail);\r\n // set cached url to media\r\n const message = appMessagesManager_1.default.getMessage(mid);\r\n if (message.media) {\r\n if (message.media.photo) {\r\n const photo = appPhotosManager_1.default.getPhoto('' + tempID);\r\n if ( /* photo._ != 'photoEmpty' */photo) {\r\n const 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 const doc = appDocsManager_1.default.getDoc('' + tempID);\r\n if ( /* doc._ != 'documentEmpty' && */(doc === null || doc === void 0 ? void 0 : doc.type) && doc.type != 'sticker') {\r\n const 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 = utils_1.getObjectKeysAndSort(appMessagesManager_1.default.groupedMessagesStorage[message.grouped_id]);\r\n Array.from(items).forEach((item, idx) => {\r\n item.dataset.mid = '' + groupIDs[idx];\r\n });\r\n }\r\n if ((_a = message.media) === null || _a === void 0 ? void 0 : _a.poll) {\r\n const newPoll = message.media.poll;\r\n const pollElement = bubble.querySelector('poll-element');\r\n if (pollElement) {\r\n pollElement.setAttribute('poll-id', newPoll.id);\r\n pollElement.setAttribute('message-id', '' + mid);\r\n delete appPollsManager_1.default.polls[tempID];\r\n delete appPollsManager_1.default.results[tempID];\r\n }\r\n }\r\n if (['audio', 'voice'].includes((_c = (_b = message.media) === null || _b === void 0 ? void 0 : _b.document) === null || _c === void 0 ? void 0 : _c.type)) {\r\n const audio = bubble.querySelector('audio-element');\r\n audio.setAttribute('doc-id', message.media.document.id);\r\n audio.setAttribute('message-id', '' + mid);\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 const mids = e.detail;\r\n const pinnedMessage = appMessagesManager_1.default.getPinnedMessage(this.peerID);\r\n mids.forEach(mid => {\r\n if (pinnedMessage.mid == mid) {\r\n (this.messagesQueuePromise || Promise.resolve()).then(() => {\r\n this.setPinnedMessage(pinnedMessage);\r\n });\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 animationIntersector_1.default.checkAnimations(true);\r\n this.offline = utils_1.$rootScope.idle.isIDLE = true;\r\n this.updateStatus();\r\n clearInterval(this.updateStatusInterval);\r\n window.addEventListener('focus', () => {\r\n this.offline = utils_1.$rootScope.idle.isIDLE = false;\r\n this.updateStatus();\r\n this.updateStatusInterval = window.setInterval(() => this.updateStatus(), 50e3);\r\n // в обратном порядке\r\n animationIntersector_1.default.checkAnimations(false);\r\n }, { once: true });\r\n });\r\n this.topbar.addEventListener('click', (e) => {\r\n const pinned = utils_1.findUpClassName(e.target, 'pinned-container');\r\n if (pinned) {\r\n utils_1.cancelEvent(e);\r\n const mid = +pinned.dataset.mid;\r\n const message = appMessagesManager_1.default.getMessage(mid);\r\n this.setPeer(message.peerID, mid);\r\n }\r\n else {\r\n appSidebarRight_1.default.toggleSidebar(true);\r\n }\r\n });\r\n this.bubblesContainer.addEventListener('click', (e) => {\r\n var _a, _b;\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 if (bubble.classList.contains('is-date') && utils_1.findUpClassName(target, 'bubble__container')) {\r\n if (bubble.classList.contains('is-sticky') && !this.chatInner.classList.contains('is-scrolling')) {\r\n return;\r\n }\r\n for (let timestamp in this.dateMessages) {\r\n let d = this.dateMessages[timestamp];\r\n if (d.div == bubble) {\r\n new popupDatepicker_1.default(new Date(+timestamp), this.onDatePick).show();\r\n break;\r\n }\r\n }\r\n return;\r\n }\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 const isVideoComponentElement = target.tagName == 'SPAN';\r\n /* if(isVideoComponentElement) {\r\n const video = target.parentElement.querySelector('video') as HTMLElement;\r\n if(video) {\r\n video.click(); // hot-fix for time and play button\r\n return;\r\n }\r\n } */\r\n if (bubble.classList.contains('sticker') && target.parentElement.classList.contains('attachment')) {\r\n const messageID = +bubble.dataset.mid;\r\n const message = appMessagesManager_1.default.getMessage(messageID);\r\n const doc = (_a = message.media) === null || _a === void 0 ? void 0 : _a.document;\r\n if (doc === null || doc === void 0 ? void 0 : doc.stickerSetInput) {\r\n new popupStickers_1.default(doc.stickerSetInput).show();\r\n }\r\n return;\r\n }\r\n if ((target.tagName == 'IMG' && !target.classList.contains('emoji') && target.parentElement.tagName != \"AVATAR-ELEMENT\" && !target.classList.contains('document-thumb'))\r\n || target.classList.contains('album-item')\r\n || isVideoComponentElement\r\n || (target.tagName == 'VIDEO' && !bubble.classList.contains('round'))) {\r\n let messageID = +((_b = utils_1.findUpClassName(target, 'album-item')) === null || _b === void 0 ? void 0 : _b.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 withTail = this.bubbles[id].classList.contains('with-media-tail');\r\n let str = '.album-item img, .album-item video, .preview img, .preview video, ';\r\n if (withTail) {\r\n str += '.bubble__media-container';\r\n }\r\n else {\r\n str += '.attachment img, .attachment video';\r\n }\r\n let elements = this.bubbles[id].querySelectorAll(str);\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 targets.sort((a, b) => a.mid - b.mid);\r\n let idx = targets.findIndex(t => t.mid == messageID);\r\n this.log('open mediaViewer single with ids:', ids, idx, targets);\r\n if (!targets[idx]) {\r\n this.log('no target for media viewer!', target);\r\n return;\r\n }\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 return;\r\n }\r\n if (['IMG', 'DIV', \"AVATAR-ELEMENT\"].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.classList.contains('forward')) {\r\n const mid = +bubble.dataset.mid;\r\n appForward_1.default.init([mid]);\r\n return;\r\n }\r\n else if (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 else if (target.tagName == \"AVATAR-ELEMENT\") {\r\n let peerID = +target.getAttribute('peer');\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.getAttribute('peer');\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', (e) => {\r\n utils_1.cancelEvent(e);\r\n this.setPeer(0);\r\n });\r\n this.searchBtn.addEventListener('click', (e) => {\r\n utils_1.cancelEvent(e);\r\n if (this.peerID) {\r\n appSidebarRight_1.default.beginSearch();\r\n }\r\n });\r\n this.btnMute.addEventListener('click', (e) => {\r\n utils_1.cancelEvent(e);\r\n this.mutePeer(this.peerID);\r\n });\r\n this.btnJoin.addEventListener('click', (e) => {\r\n utils_1.cancelEvent(e);\r\n this.btnJoin.setAttribute('disabled', 'true');\r\n appChatsManager_1.default.joinChannel(-this.peerID).finally(() => {\r\n this.btnJoin.removeAttribute('disabled');\r\n });\r\n });\r\n this.menuButtons.mute.addEventListener('click', (e) => {\r\n this.mutePeer(this.peerID);\r\n });\r\n this.menuButtons.search.addEventListener('click', (e) => {\r\n new search_1.ChatSearch();\r\n });\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' && !config_1.touchSupport) {\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.code == \"KeyC\" && (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 if (this.offline) {\r\n return;\r\n }\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 setPinnedMessage(message) {\r\n /////this.log('setting pinned message', message);\r\n //return;\r\n const height = 52;\r\n const scrollTop = this.scrollable.container.scrollTop;\r\n const newPinned = wrappers_1.wrapReply('Pinned Message', message.message, message, true);\r\n newPinned.dataset.mid = '' + message.mid;\r\n newPinned.classList.add('pinned-container');\r\n const close = document.createElement('button');\r\n close.classList.add('pinned-message-close', 'btn-icon', 'tgico-close');\r\n close.addEventListener('click', (e) => {\r\n utils_1.cancelEvent(e);\r\n const scrollTop = this.scrollable.scrollTop;\r\n newPinned.remove();\r\n this.topbar.classList.remove('is-pinned-shown');\r\n this.pinnedMessageContainer = null;\r\n this.scrollable.scrollTop = scrollTop - height;\r\n }, { once: true });\r\n newPinned.append(close);\r\n this.btnJoin.parentElement.insertBefore(newPinned, this.btnJoin);\r\n this.topbar.classList.add('is-pinned-shown');\r\n if (this.pinnedMessageContainer) {\r\n this.pinnedMessageContainer.remove();\r\n }\r\n this.pinnedMessageContainer = newPinned;\r\n //this.pinnedMessageContent.innerHTML = message.rReply;\r\n this.scrollable.scrollTop = scrollTop + height;\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, justLoad = false) {\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, undefined, undefined, justLoad);\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, undefined, justLoad);\r\n }\r\n }\r\n onScroll(e) {\r\n if (this.onScrollRAF)\r\n window.cancelAnimationFrame(this.onScrollRAF);\r\n // * В таком случае, кнопка не будет моргать если чат в самом низу, и правильно отработает случай написания нового сообщения и проскролла вниз\r\n if (this.scrollable.scrollLocked && this.scrolledDown)\r\n return;\r\n this.onScrollRAF = window.requestAnimationFrame(() => {\r\n //lottieLoader.checkAnimations(false, 'chat');\r\n if (!config_1.touchSupport) {\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 = window.setTimeout(() => {\r\n this.chatInner.classList.remove('is-scrolling');\r\n this.isScrollingTimeout = 0;\r\n }, 1350);\r\n }\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 /* const getScrollOffset = () => {\r\n //return Math.round(Math.max(300, appPhotosManager.windowH / 1.5));\r\n return 300;\r\n };\r\n \r\n window.addEventListener('resize', () => {\r\n this.scrollable.onScrollOffset = getScrollOffset();\r\n });\r\n \r\n this.scrollable = new Scrollable(this.bubblesContainer, 'y', 'IM', this.chatInner, getScrollOffset()); */\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 if (config_1.touchSupport) {\r\n this.scroll.addEventListener('touchmove', () => {\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 }, { passive: true });\r\n this.scroll.addEventListener('touchend', () => {\r\n if (!this.chatInner.classList.contains('is-scrolling')) {\r\n return;\r\n }\r\n if (this.isScrollingTimeout) {\r\n clearTimeout(this.isScrollingTimeout);\r\n }\r\n this.isScrollingTimeout = window.setTimeout(() => {\r\n this.chatInner.classList.remove('is-scrolling');\r\n this.isScrollingTimeout = 0;\r\n }, 1350);\r\n }, { passive: true });\r\n }\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 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 ? 'followers' : '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 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 findMountedBubbleByMsgID(mid) {\r\n return this.bubbles[utils_1.getObjectKeysAndSort(this.bubbles).find(id => {\r\n var _a;\r\n if (id < mid)\r\n return false;\r\n return !!((_a = this.bubbles[id]) === null || _a === void 0 ? void 0 : _a.parentElement);\r\n })];\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 (config_1.mediaSizes.isMobile) {\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 let topMessage = lastMsgID <= 0 ? lastMsgID : (_a = dialog === null || dialog === void 0 ? void 0 : dialog.top_message) !== null && _a !== void 0 ? _a : 0; // убрать + 1 после создания базы референсов\r\n const isTarget = lastMsgID !== undefined;\r\n // @ts-ignore\r\n /* if(topMessage && dialog && dialog.top_message == topMessage && dialog.refetchTopMessage) {\r\n // @ts-ignore\r\n dialog.refetchTopMessage = false;\r\n topMessage += 1;\r\n } */\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 //lastMsgID = topMessage;\r\n }\r\n }\r\n if (samePeer) {\r\n if (this.bubbles[lastMsgID]) {\r\n if (isTarget) {\r\n const bubble = this.findMountedBubbleByMsgID(lastMsgID);\r\n this.scrollable.scrollIntoView(bubble);\r\n this.highlightBubble(bubble);\r\n }\r\n else 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 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 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 if (!samePeer) {\r\n this.lazyLoadQueue.clear();\r\n }\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 if (!samePeer) {\r\n this.finishPeerChange();\r\n }\r\n this.preloader.attach(this.bubblesContainer);\r\n if (config_1.mediaSizes.isMobile) {\r\n this.selectTab(1);\r\n }\r\n }\r\n //console.timeEnd('appImManager setPeer pre promise');\r\n animationIntersector_1.default.lockGroup(ANIMATIONGROUP);\r\n this.setPeerPromise = Promise.all([\r\n promise.then(() => {\r\n ////this.log('setPeer removing preloader');\r\n var _a;\r\n if (cached) {\r\n this.scrollable.container.innerHTML = '';\r\n //oldChatInner.remove();\r\n if (!samePeer) {\r\n this.finishPeerChange();\r\n }\r\n if (config_1.mediaSizes.isMobile) {\r\n this.selectTab(1);\r\n }\r\n }\r\n else {\r\n this.preloader.detach();\r\n }\r\n this.scrollable.container.append(this.chatInner);\r\n animationIntersector_1.default.unlockGroup(ANIMATIONGROUP);\r\n animationIntersector_1.default.checkAnimations(false, ANIMATIONGROUP /* , true */);\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 (dialog && (isTarget || (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 && !isTarget;\r\n if (!fromUp && (samePeer || forwardingUnread)) {\r\n this.scrollable.scrollTop = this.scrollable.scrollHeight;\r\n }\r\n let bubble = forwardingUnread ? (this.firstUnreadBubble || this.bubbles[lastMsgID]) : this.bubbles[lastMsgID];\r\n if (!(bubble === null || bubble === void 0 ? void 0 : bubble.parentElement)) {\r\n bubble = this.findMountedBubbleByMsgID(lastMsgID);\r\n }\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 if ((_a = dialog === null || dialog === void 0 ? void 0 : dialog.pFlags) === null || _a === void 0 ? void 0 : _a.unread_mark) {\r\n appMessagesManager_1.default.markDialogUnread(peerID, true);\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 var _a, _b;\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 this.avatarEl.update();\r\n const isAnyGroup = appPeersManager_1.default.isAnyGroup(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', isAnyGroup || peerID == this.myID);\r\n this.chatInner.classList.toggle('is-channel', isChannel);\r\n this.btnMute.classList.toggle('hide', !appPeersManager_1.default.isBroadcast(peerID));\r\n this.btnJoin.classList.toggle('hide', !((_b = (_a = appChatsManager_1.default.getChat(-this.peerID)) === null || _a === void 0 ? void 0 : _a.pFlags) === null || _b === void 0 ? void 0 : _b.left));\r\n this.menuButtons.mute.style.display = this.myID == this.peerID ? 'none' : '';\r\n const pinned = appMessagesManager_1.default.getPinnedMessage(peerID);\r\n if (pinned && !pinned.deleted) {\r\n this.setPinnedMessage(pinned);\r\n }\r\n else if (this.pinnedMessageContainer) {\r\n this.pinnedMessageContainer.remove();\r\n this.pinnedMessageContainer = null;\r\n }\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 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 animationIntersector_1.default.checkAnimations(false, ANIMATIONGROUP);\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 const date = new Date(message.date * 1000);\r\n date.setHours(0, 0, 0);\r\n const dateTimestamp = date.getTime();\r\n if (!(dateTimestamp in this.dateMessages)) {\r\n let str = '';\r\n const today = new Date();\r\n today.setHours(0, 0, 0, 0);\r\n if (today.getTime() == date.getTime()) {\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 = months[date.getMonth()] + ' ' + date.getDate();\r\n if (date.getFullYear() != today.getFullYear()) {\r\n str += ', ' + date.getFullYear();\r\n }\r\n }\r\n const div = document.createElement('div');\r\n div.className = 'bubble service is-date';\r\n div.innerHTML = `
${str}
`;\r\n ////////this.log('need to render date message', dateTimestamp, str);\r\n const container = document.createElement('div');\r\n container.className = 'bubbles-date-group';\r\n this.dateMessages[dateTimestamp] = {\r\n div,\r\n container,\r\n firstTimestamp: date.getTime()\r\n };\r\n container.append(div);\r\n if (reverse) {\r\n this.scrollable.prepend(container, false);\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 dateMessage = this.getDateContainerByMessage(message, reverse);\r\n if(reverse) dateMessage.container.insertBefore(bubble, dateMessage.div.nextSibling);\r\n else dateMessage.container.append(bubble);\r\n return; */\r\n let promises = [];\r\n Array.from(bubble.querySelectorAll('img, video')).forEach(el => {\r\n if (el instanceof HTMLVideoElement) {\r\n if (!el.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 promise = new Promise((resolve, reject) => {\r\n let r;\r\n let onLoad = () => {\r\n clearTimeout(timeout);\r\n resolve();\r\n // lol\r\n el.removeEventListener(el instanceof HTMLVideoElement ? 'canplay' : 'load', onLoad);\r\n };\r\n if (el instanceof HTMLVideoElement) {\r\n el.addEventListener('canplay', onLoad);\r\n r = () => el.readyState >= 1;\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 // @ts-ignore\r\n //this.log.error('did not called', el, el.parentElement, el.complete, el.readyState, src);\r\n resolve();\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.debug('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 bubbleContainer.style.marginBottom = '';\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 (utils_1.langPack.hasOwnProperty(_) && !utils_1.langPack[_]) {\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 = `
${str}
`;\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) + ' ' + time;\r\n if (!message.savedFrom) {\r\n let forward = document.createElement('div');\r\n forward.classList.add('bubble-beside-button', 'forward');\r\n forward.innerHTML = `\r\n \r\n \r\n \r\n \r\n \r\n `;\r\n bubbleContainer.append(forward);\r\n bubble.classList.add('with-beside-button');\r\n }\r\n }\r\n if (message.edit_date) {\r\n bubble.classList.add('is-edited');\r\n time = 'edited ' + time;\r\n }\r\n let timeSpan = document.createElement('span');\r\n timeSpan.classList.add('time');\r\n let timeInner = document.createElement('div');\r\n timeInner.classList.add('inner', 'tgico');\r\n timeInner.innerHTML = time;\r\n let 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 && !messageMedia) {\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 const rows = message.reply_markup.rows;\r\n const containerDiv = document.createElement('div');\r\n containerDiv.classList.add('reply-markup');\r\n rows.forEach((row) => {\r\n const buttons = row.buttons;\r\n if (!buttons || !buttons.length)\r\n return;\r\n const rowDiv = document.createElement('div');\r\n rowDiv.classList.add('reply-markup-row');\r\n buttons.forEach((button) => {\r\n const 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 const from = appUsersManager_1.default.getUser(message.fromID);\r\n const unsafe = !(from && from.pFlags && from.pFlags.verified);\r\n const 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 ripple_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 const column = utils_1.whichChild(target);\r\n const 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 const button = row.buttons[column];\r\n AppInlineBotsManager_1.default.callbackButtonClick(message.mid, button);\r\n });\r\n const 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 const photo = appPhotosManager_1.default.getPhoto(message.id);\r\n //if(photo._ == 'photoEmpty') break;\r\n this.log('will wrap pending photo:', pending, message, photo);\r\n const tailSupported = !config_1.isAndroid;\r\n if (tailSupported)\r\n bubble.classList.add('with-media-tail');\r\n wrappers_1.wrapPhoto(photo, message, attachmentDiv, undefined, undefined, tailSupported, 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 //if(doc._ == 'documentEmpty') break;\r\n this.log('will wrap pending video:', pending, message, doc);\r\n const tailSupported = !config_1.isAndroid && !config_1.isApple && doc.type != 'round';\r\n if (tailSupported)\r\n bubble.classList.add('with-media-tail');\r\n wrappers_1.wrapVideo({\r\n doc,\r\n container: attachmentDiv,\r\n message,\r\n boxWidth: config_1.mediaSizes.active.regular.width,\r\n boxHeight: config_1.mediaSizes.active.regular.height,\r\n withTail: tailSupported,\r\n isOut: isOut,\r\n lazyLoadQueue: this.lazyLoadQueue,\r\n middleware: null,\r\n group: ANIMATIONGROUP\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 const doc = appDocsManager_1.default.getDoc(message.id);\r\n //if(doc._ == 'documentEmpty') break;\r\n this.log('will wrap pending doc:', doc);\r\n const docDiv = wrappers_1.wrapDocument(doc, false, true, message.id);\r\n if (doc.type == 'audio' || doc.type == 'voice') {\r\n docDiv.preloader = preloader;\r\n }\r\n else {\r\n const icoDiv = docDiv.querySelector('.audio-download, .document-ico');\r\n preloader.attach(icoDiv, false);\r\n }\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 const tailSupported = !config_1.isAndroid;\r\n if (tailSupported)\r\n bubble.classList.add('with-media-tail');\r\n if (message.grouped_id) {\r\n bubble.classList.add('is-album');\r\n let storage = appMessagesManager_1.default.groupedMessagesStorage[message.grouped_id];\r\n if (Object.keys(storage).length != 1) {\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 break;\r\n }\r\n }\r\n wrappers_1.wrapPhoto(photo, message, attachmentDiv, undefined, undefined, tailSupported, isOut, this.lazyLoadQueue, this.getMiddleware());\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: config_1.mediaSizes.active.webpage.width,\r\n boxHeight: config_1.mediaSizes.active.webpage.height,\r\n lazyLoadQueue: this.lazyLoadQueue,\r\n middleware: this.getMiddleware(),\r\n isOut,\r\n group: ANIMATIONGROUP\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, message, preview, config_1.mediaSizes.active.webpage.width, config_1.mediaSizes.active.webpage.height, false, isOut, 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: ANIMATIONGROUP,\r\n //play: !!message.pending || !multipleRender,\r\n play: true,\r\n loop: true,\r\n emoji: bubble.classList.contains('emoji-big') ? messageMessage : undefined,\r\n withThumb: true\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 bubble.classList.add('hide-name', doc.type == 'round' ? 'round' : '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 const tailSupported = !config_1.isAndroid && !config_1.isApple && doc.type != 'round';\r\n if (tailSupported)\r\n bubble.classList.add('with-media-tail');\r\n wrappers_1.wrapVideo({\r\n doc,\r\n container: attachmentDiv,\r\n message,\r\n boxWidth: config_1.mediaSizes.active.regular.width,\r\n boxHeight: config_1.mediaSizes.active.regular.height,\r\n withTail: tailSupported,\r\n isOut: isOut,\r\n lazyLoadQueue: this.lazyLoadQueue,\r\n middleware: this.getMiddleware(),\r\n group: ANIMATIONGROUP\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, false, false, message.mid);\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, false, false, message.mid);\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
\r\n
${texts.join(' ')}
\r\n
${message.media.phone_number ? '+' + misc_1.formatPhoneNumber(message.media.phone_number).formatted : 'Unknown phone number'}
\r\n
`;\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 /* if(bubble.classList.contains('is-message-empty') && (bubble.classList.contains('photo') || bubble.classList.contains('video'))) {\r\n bubble.classList.add('no-tail');\r\n \r\n if(!bubble.classList.contains('with-media-tail')) {\r\n bubble.classList.add('use-border-radius');\r\n }\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 const isForwardFromChannel = !message.fromID && message.fwd_from;\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('bubble-beside-button', 'goto-original', 'tgico-next');\r\n bubbleContainer.append(goto);\r\n bubble.dataset.savedFrom = message.savedFrom;\r\n bubble.classList.add('with-beside-button');\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 || isForwardFromChannel) {\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 || originalMessage.fwdFromID, 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) || isForwardFromChannel ? message.fwdFromID : message.fromID) || 0));\r\n avatarElem.update();\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 //this.chatInner.style.height = '100%';\r\n //previousScrollHeightMinusTop = 0;\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 // touchSupport for safari iOS\r\n config_1.touchSupport && config_1.isApple && (this.scrollable.container.style.overflow = 'hidden');\r\n this.scrollable.scrollTop = newScrollTop;\r\n config_1.touchSupport && config_1.isApple && (this.scrollable.container.style.overflow = '');\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 /**\r\n * Load and render history\r\n * @param maxID max message id\r\n * @param reverse 'true' means up\r\n * @param isBackLimit is search\r\n * @param additionMsgID for the last message\r\n * @param justLoad do not render\r\n */\r\n getHistory(maxID = 0, reverse = false, isBackLimit = false, additionMsgID = 0, justLoad = false) {\r\n const peerID = this.peerID;\r\n //console.time('appImManager call getHistory');\r\n const pageCount = appPhotosManager_1.default.windowH / 38 /* * 1.25 */ | 0;\r\n //const loadCount = Object.keys(this.bubbles).length > 0 ? 50 : pageCount;\r\n const realLoadCount = Object.keys(this.bubbles).length > 0 ? Math.max(40, pageCount) : pageCount; //const 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 const 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, justLoad);\r\n if (justLoad) {\r\n this.scrollable.onScroll(); // нужно делать из-за ранней прогрузки\r\n return true;\r\n }\r\n //console.timeEnd('appImManager call getHistory');\r\n if (this.peerID != peerID || (this.getHistoryTopPromise != promise && this.getHistoryBottomPromise != promise)) {\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 return false;\r\n });\r\n }\r\n else if (justLoad) {\r\n return null;\r\n }\r\n else {\r\n cached = true;\r\n this.log('getHistory cached result by maxID:', maxID, reverse, isBackLimit, result, peerID, justLoad);\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 promise.finally(() => {\r\n (reverse ? this.getHistoryTopPromise = undefined : this.getHistoryBottomPromise = undefined);\r\n });\r\n if (justLoad) {\r\n return null;\r\n }\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 = utils_1.getObjectKeysAndSort(this.bubbles);\r\n }\r\n //let removeCount = loadCount / 2;\r\n const 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 this.log('getHistory: slice bottom messages:', ids.length, loadCount);\r\n this.getHistoryBottomPromise = undefined; // !WARNING, это нужно для обратной загрузки истории, если запрос словил флуд\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 up messages:', ids.length, loadCount);\r\n this.getHistoryTopPromise = undefined; // !WARNING, это нужно для обратной загрузки истории, если запрос словил флуд\r\n }\r\n this.log('getHistory: will slice ids:', ids, reverse);\r\n this.deleteMessagesByIDs(ids);\r\n }\r\n this.setUnreadDelimiter(); // не нашёл места лучше\r\n // preload more\r\n setTimeout(() => {\r\n this.loadMoreHistory(true, true);\r\n this.loadMoreHistory(false, true);\r\n }, 0);\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 const menuButton = this.menuButtons.mute;\r\n menuButton.classList.remove('tgico-mute', 'tgico-unmute');\r\n menuButton.classList.add(muted ? 'tgico-unmute' : 'tgico-mute');\r\n let rp = menuButton.firstElementChild;\r\n menuButton.innerText = muted ? 'Unmute' : 'Mute';\r\n rp && menuButton.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] = window.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 utils_1.$rootScope.$broadcast('dialog_notify_settings', peerID);\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 }\r\n }\r\n}\r\nexports.AppImManager = AppImManager;\r\nconst appImManager = new AppImManager();\r\n// @ts-ignore\r\nif (process.env.NODE_ENV != 'production') {\r\n window.appImManager = appImManager;\r\n}\r\nexports.default = appImManager;\r\n" - }, - { - "id": 11, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\logger.ts", - "name": "./src/lib/logger.ts", - "index": 17, - "index2": 15, - "size": 1851, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts", - "issuerId": 2, - "issuerName": "./src/lib/mtproto/mtprotoworker.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts", - "name": "./src/lib/mtproto/mtprotoworker.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - } - ], - "profile": { - "factory": 2342, - "building": 10824, - "dependencies": 20 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 2, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts", - "module": "./src/lib/mtproto/mtprotoworker.ts", - "moduleName": "./src/lib/mtproto/mtprotoworker.ts", - "type": "cjs require", - "userRequest": "../logger", - "loc": "9:17-37" - }, - { - "moduleId": 6, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\scrollable_new.ts", - "module": "./src/components/scrollable_new.ts", - "moduleName": "./src/components/scrollable_new.ts", - "type": "cjs require", - "userRequest": "../lib/logger", - "loc": "6:17-41" - }, - { - "moduleId": 7, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "module": "./src/lib/appManagers/appMessagesManager.ts", - "moduleName": "./src/lib/appManagers/appMessagesManager.ts", - "type": "cjs require", - "userRequest": "../logger", - "loc": "37:17-37" - }, - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "../logger", - "loc": "18:17-37" - }, - { - "moduleId": 16, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts", - "module": "./src/lib/appManagers/appDialogsManager.ts", - "moduleName": "./src/lib/appManagers/appDialogsManager.ts", - "type": "cjs require", - "userRequest": "../logger", - "loc": "25:17-37" - }, - { - "moduleId": 20, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\lottieLoader.ts", - "module": "./src/lib/lottieLoader.ts", - "moduleName": "./src/lib/lottieLoader.ts", - "type": "cjs require", - "userRequest": "./logger", - "loc": "17:17-36" - }, - { - "moduleId": 21, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\lazyLoadQueue.ts", - "module": "./src/components/lazyLoadQueue.ts", - "moduleName": "./src/components/lazyLoadQueue.ts", - "type": "cjs require", - "userRequest": "../lib/logger", - "loc": "16:17-41" - }, - { - "moduleId": 24, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", - "type": "cjs require", - "userRequest": "../logger", - "loc": "45:17-37" - }, - { - "moduleId": 32, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\apiUpdatesManager.ts", - "module": "./src/lib/appManagers/apiUpdatesManager.ts", - "moduleName": "./src/lib/appManagers/apiUpdatesManager.ts", - "type": "cjs require", - "userRequest": "../logger", - "loc": "14:17-37" - }, - { - "moduleId": 39, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appPollsManager.ts", - "module": "./src/lib/appManagers/appPollsManager.ts", - "moduleName": "./src/lib/appManagers/appPollsManager.ts", - "type": "cjs require", - "userRequest": "../logger", - "loc": "12:17-37" - }, - { - "moduleId": 40, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appStateManager.ts", - "module": "./src/lib/appManagers/appStateManager.ts", - "moduleName": "./src/lib/appManagers/appStateManager.ts", - "type": "cjs require", - "userRequest": "../logger", - "loc": "15:17-37" - }, - { - "moduleId": 54, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\opusDecodeController.ts", - "module": "./src/lib/opusDecodeController.ts", - "moduleName": "./src/lib/opusDecodeController.ts", - "type": "cjs require", - "userRequest": "./logger", - "loc": "14:17-36" - }, - { - "moduleId": 56, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts", - "module": "./src/lib/appManagers/appMediaViewer.ts", - "moduleName": "./src/lib/appManagers/appMediaViewer.ts", - "type": "cjs require", - "userRequest": "../logger", - "loc": "20:17-37" - } - ], - "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.logger = exports.LogLevels = void 0;\r\nvar LogLevels;\r\n(function (LogLevels) {\r\n LogLevels[LogLevels[\"log\"] = 1] = \"log\";\r\n LogLevels[LogLevels[\"warn\"] = 2] = \"warn\";\r\n LogLevels[LogLevels[\"error\"] = 4] = \"error\";\r\n LogLevels[LogLevels[\"debug\"] = 8] = \"debug\";\r\n})(LogLevels = exports.LogLevels || (exports.LogLevels = {}));\r\n;\r\nvar _logTimer = Date.now();\r\nfunction dT() {\r\n return '[' + ((Date.now() - _logTimer) / 1000).toFixed(3) + ']';\r\n}\r\nfunction logger(prefix, level = LogLevels.log | LogLevels.warn | LogLevels.error) {\r\n // @ts-ignore\r\n if (process.env.NODE_ENV == 'production' /* || true */) {\r\n level = LogLevels.error;\r\n }\r\n //level = LogLevels.log | LogLevels.warn | LogLevels.error | LogLevels.debug\r\n function Log(...args) {\r\n return level & LogLevels.log && console.log(dT(), '[' + prefix + ']:', ...args);\r\n }\r\n Log.warn = function (...args) {\r\n return level & LogLevels.warn && console.warn(dT(), '[' + prefix + ']:', ...args);\r\n };\r\n Log.info = function (...args) {\r\n return level & LogLevels.log && console.info(dT(), '[' + prefix + ']:', ...args);\r\n };\r\n Log.error = function (...args) {\r\n return level & LogLevels.error && console.error(dT(), '[' + prefix + ']:', ...args);\r\n };\r\n Log.trace = function (...args) {\r\n return level & LogLevels.log && console.trace(dT(), '[' + prefix + ']:', ...args);\r\n };\r\n /* Log.debug = function(...args: any[]) {\r\n return level & LogLevels.debug && console.log(dT(), '[' + prefix + ']:', ...args);\r\n }; */\r\n Log.debug = function (...args) {\r\n return level & LogLevels.debug && console.debug(dT(), '[' + prefix + ']:', ...args);\r\n };\r\n return Log;\r\n}\r\nexports.logger = logger;\r\n;\r\n" - }, - { - "id": 12, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDocsManager.ts", - "name": "./src/lib/appManagers/appDocsManager.ts", - "index": 51, - "index2": 42, - "size": 12121, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 7, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "module": "./src/lib/appManagers/appMessagesManager.ts", - "moduleName": "./src/lib/appManagers/appMessagesManager.ts", - "type": "cjs require", - "userRequest": "./appDocsManager", - "loc": "28:41-68" - }, - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "./appDocsManager", - "loc": "30:41-68" - }, - { - "moduleId": 18, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "module": "./src/components/wrappers.ts", - "moduleName": "./src/components/wrappers.ts", - "type": "cjs require", - "userRequest": "../lib/appManagers/appDocsManager", - "loc": "18:41-85" - }, - { - "moduleId": 37, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\appMediaPlaybackController.ts", - "module": "./src/components/appMediaPlaybackController.ts", - "moduleName": "./src/components/appMediaPlaybackController.ts", - "type": "cjs require", - "userRequest": "../lib/appManagers/appDocsManager", - "loc": "8:41-85" - }, - { - "moduleId": 44, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appStickersManager.ts", - "module": "./src/lib/appManagers/appStickersManager.ts", - "moduleName": "./src/lib/appManagers/appStickersManager.ts", - "type": "cjs require", - "userRequest": "./appDocsManager", - "loc": "18:41-68" - }, - { - "moduleId": 55, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 56, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 62, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\AppInlineBotsManager.ts", - "module": "./src/lib/appManagers/AppInlineBotsManager.ts", - "moduleName": "./src/lib/appManagers/AppInlineBotsManager.ts", - "type": "cjs require", - "userRequest": "./appDocsManager", - "loc": "15:41-68" - }, - { - "moduleId": 63, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\gifsMasonry.ts", - "module": "./src/components/gifsMasonry.ts", - "moduleName": "./src/components/gifsMasonry.ts", - "type": "cjs require", - "userRequest": "../lib/appManagers/appDocsManager", - "loc": "16:41-85" - }, - { - "moduleId": 84, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\audio.ts", - "module": "./src/components/audio.ts", - "moduleName": "./src/components/audio.ts", - "type": "cjs require", - "userRequest": "../lib/appManagers/appDocsManager", - "loc": "7:41-85" - }, - { - "moduleId": 98, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\input.ts", - "module": "./src/components/chat/input.ts", - "moduleName": "./src/components/chat/input.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appDocsManager", - "loc": "20:41-88" - }, - { - "moduleId": 100, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\gifs.ts", - "module": "./src/components/emoticonsDropdown/tabs/gifs.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/gifs.ts", - "type": "cjs require", - "userRequest": "../../../lib/appManagers/appDocsManager", - "loc": "11:41-91" - }, - { - "moduleId": 102, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\stickers.ts", - "module": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "type": "cjs require", - "userRequest": "../../../lib/appManagers/appDocsManager", - "loc": "45:41-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\nconst richtextprocessor_1 = require(\"../richtextprocessor\");\r\nconst utils_1 = require(\"../utils\");\r\nconst opusDecodeController_1 = __importDefault(require(\"../opusDecodeController\"));\r\nconst bin_utils_1 = require(\"../bin_utils\");\r\nconst appDownloadManager_1 = __importDefault(require(\"./appDownloadManager\"));\r\nconst appPhotosManager_1 = __importDefault(require(\"./appPhotosManager\"));\r\nconst config_1 = require(\"../config\");\r\n// TODO: если залить картинку файлом, а потом перезайти в диалог - превьюшка заново скачается\r\nclass AppDocsManager {\r\n constructor() {\r\n this.docs = {};\r\n }\r\n saveDoc(doc, context) {\r\n if (doc._ == 'documentEmpty') {\r\n return undefined;\r\n }\r\n //console.log('saveDoc', apiDoc, this.docs[apiDoc.id]);\r\n if (this.docs[doc.id]) {\r\n const d = this.docs[doc.id];\r\n //if(doc._ != 'documentEmpty' && doc._ == d._) {\r\n if (doc.thumbs) {\r\n if (!d.thumbs)\r\n d.thumbs = doc.thumbs;\r\n /* else if(apiDoc.thumbs[0].bytes && !d.thumbs[0].bytes) {\r\n d.thumbs.unshift(apiDoc.thumbs[0]);\r\n } else if(d.thumbs[0].url) { // fix for converted thumb in safari\r\n apiDoc.thumbs[0] = d.thumbs[0];\r\n } */\r\n }\r\n d.file_reference = doc.file_reference;\r\n //}\r\n return d;\r\n //return Object.assign(d, apiDoc, context);\r\n //return context ? Object.assign(d, context) : d;\r\n }\r\n if (context) {\r\n Object.assign(doc, context);\r\n }\r\n this.docs[doc.id] = doc;\r\n doc.attributes.forEach(attribute => {\r\n switch (attribute._) {\r\n case 'documentAttributeFilename':\r\n doc.file_name = richtextprocessor_1.RichTextProcessor.wrapPlainText(attribute.file_name);\r\n break;\r\n case 'documentAttributeAudio':\r\n doc.duration = attribute.duration;\r\n doc.audioTitle = attribute.title;\r\n doc.audioPerformer = attribute.performer;\r\n doc.type = attribute.pFlags.voice && doc.mime_type == \"audio/ogg\" ? 'voice' : 'audio';\r\n /* if(apiDoc.type == 'audio') {\r\n apiDoc.supportsStreaming = true;\r\n } */\r\n break;\r\n case 'documentAttributeVideo':\r\n doc.duration = attribute.duration;\r\n doc.w = attribute.w;\r\n doc.h = attribute.h;\r\n //apiDoc.supportsStreaming = attribute.pFlags?.supports_streaming/* && apiDoc.size > 524288 */;\r\n if ( /* apiDoc.thumbs && */attribute.pFlags.round_message) {\r\n doc.type = 'round';\r\n }\r\n else /* if(apiDoc.thumbs) */ {\r\n doc.type = 'video';\r\n }\r\n break;\r\n case 'documentAttributeSticker':\r\n if (attribute.alt !== undefined) {\r\n doc.stickerEmojiRaw = attribute.alt;\r\n doc.stickerEmoji = richtextprocessor_1.RichTextProcessor.wrapRichText(doc.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 doc.stickerSetInput = attribute.stickerset;\r\n }\r\n }\r\n if ( /* apiDoc.thumbs && */doc.mime_type == 'image/webp') {\r\n doc.type = 'sticker';\r\n doc.sticker = 1;\r\n }\r\n break;\r\n case 'documentAttributeImageSize':\r\n doc.type = 'photo';\r\n doc.w = attribute.w;\r\n doc.h = attribute.h;\r\n break;\r\n case 'documentAttributeAnimated':\r\n if ((doc.mime_type == 'image/gif' || doc.mime_type == 'video/mp4') /* && apiDoc.thumbs */) {\r\n doc.type = 'gif';\r\n }\r\n doc.animated = true;\r\n break;\r\n }\r\n });\r\n if (!doc.mime_type) {\r\n switch (doc.type) {\r\n case 'gif':\r\n case 'video':\r\n case 'round':\r\n doc.mime_type = 'video/mp4';\r\n break;\r\n case 'sticker':\r\n doc.mime_type = 'image/webp';\r\n break;\r\n case 'audio':\r\n doc.mime_type = 'audio/mpeg';\r\n break;\r\n case 'voice':\r\n doc.mime_type = 'audio/ogg';\r\n break;\r\n default:\r\n doc.mime_type = 'application/octet-stream';\r\n break;\r\n }\r\n }\r\n if (config_1.isServiceWorkerSupported) {\r\n if ((doc.type == 'gif' && doc.size > 8e6) || doc.type == 'audio' || doc.type == 'video') {\r\n doc.supportsStreaming = true;\r\n if (!doc.url) {\r\n doc.url = this.getFileURL(doc);\r\n }\r\n }\r\n }\r\n // for testing purposes\r\n //doc.supportsStreaming = false;\r\n if (!doc.file_name) {\r\n doc.file_name = '';\r\n }\r\n if (doc.mime_type == 'application/x-tgsticker' && doc.file_name == \"AnimatedSticker.tgs\") {\r\n doc.type = 'sticker';\r\n doc.animated = true;\r\n doc.sticker = 2;\r\n }\r\n /* if(!doc.url) {\r\n doc.url = this.getFileURL(doc);\r\n } */\r\n return doc;\r\n }\r\n getDoc(docID) {\r\n return utils_1.isObject(docID) && typeof (docID) !== 'string' ? docID : this.docs[docID];\r\n }\r\n getMediaInput(doc) {\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 getInput(doc, thumbSize) {\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 getFileDownloadOptions(doc, thumb) {\r\n const inputFileLocation = this.getInput(doc, thumb === null || thumb === void 0 ? void 0 : thumb.type);\r\n let mimeType;\r\n if (thumb) {\r\n mimeType = doc.sticker ? 'image/webp' : 'image/jpeg' /* doc.mime_type */;\r\n }\r\n else {\r\n mimeType = doc.mime_type || 'application/octet-stream';\r\n }\r\n return {\r\n dcID: doc.dc_id,\r\n location: inputFileLocation,\r\n size: thumb ? thumb.size : doc.size,\r\n mimeType: mimeType,\r\n fileName: doc.file_name\r\n };\r\n }\r\n getFileURL(doc, download = false, thumb) {\r\n let type;\r\n if (download) {\r\n type = 'download';\r\n }\r\n else if (thumb) {\r\n type = 'thumb';\r\n }\r\n else if (doc.supportsStreaming) {\r\n type = 'stream';\r\n }\r\n else {\r\n type = 'document';\r\n }\r\n return utils_1.getFileURL(type, this.getFileDownloadOptions(doc, thumb));\r\n }\r\n getThumbURL(doc, thumb) {\r\n let promise = Promise.resolve();\r\n if (!thumb.url) {\r\n if ('bytes' in thumb) {\r\n thumb.url = appPhotosManager_1.default.getPreviewURLFromBytes(thumb.bytes, !!doc.sticker);\r\n }\r\n else {\r\n //return this.getFileURL(doc, false, thumb);\r\n promise = this.downloadDocNew(doc, thumb);\r\n }\r\n }\r\n return { thumb, promise };\r\n }\r\n getThumb(doc, useBytes = true) {\r\n var _a;\r\n if ((_a = doc.thumbs) === null || _a === void 0 ? void 0 : _a.length) {\r\n let thumb;\r\n if (!useBytes) {\r\n thumb = doc.thumbs.find(t => !('bytes' in t));\r\n }\r\n if (!thumb) {\r\n thumb = doc.thumbs[0];\r\n }\r\n return this.getThumbURL(doc, thumb);\r\n }\r\n return null;\r\n }\r\n getInputFileName(doc, thumbSize) {\r\n return bin_utils_1.getFileNameByLocation(this.getInput(doc, thumbSize), { fileName: doc.file_name });\r\n }\r\n downloadDocNew(doc, thumb) {\r\n const fileName = this.getInputFileName(doc, thumb === null || thumb === void 0 ? void 0 : thumb.type);\r\n let download = appDownloadManager_1.default.getDownload(fileName);\r\n if (download) {\r\n return download;\r\n }\r\n const downloadOptions = this.getFileDownloadOptions(doc, thumb);\r\n download = appDownloadManager_1.default.download(downloadOptions);\r\n const originalPromise = download;\r\n originalPromise.then((blob) => {\r\n if (thumb) {\r\n thumb.url = URL.createObjectURL(blob);\r\n return;\r\n }\r\n else if (!doc.supportsStreaming) {\r\n doc.url = URL.createObjectURL(blob);\r\n }\r\n doc.downloaded = true;\r\n });\r\n if (doc.type == 'voice' && !opusDecodeController_1.default.isPlaySupported()) {\r\n download = originalPromise.then((blob) => __awaiter(this, void 0, void 0, function* () {\r\n let reader = new FileReader();\r\n yield new Promise((resolve, reject) => {\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 resolve();\r\n }, (err) => {\r\n delete doc.downloaded;\r\n reject(err);\r\n });\r\n };\r\n reader.readAsArrayBuffer(blob);\r\n });\r\n return blob;\r\n }));\r\n }\r\n return download;\r\n }\r\n saveDocFile(doc) {\r\n const options = this.getFileDownloadOptions(doc);\r\n return appDownloadManager_1.default.downloadToDisc(options, doc.file_name);\r\n }\r\n}\r\nconst appDocsManager = new AppDocsManager();\r\n// @ts-ignore\r\nif (process.env.NODE_ENV != 'production') {\r\n window.appDocsManager = appDocsManager;\r\n}\r\nexports.default = appDocsManager;\r\n" - }, - { - "id": 13, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appPhotosManager.ts", - "name": "./src/lib/appManagers/appPhotosManager.ts", - "index": 45, - "index2": 37, - "size": 13161, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 7, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "./appPhotosManager", - "loc": "16:43-72" - }, - { - "moduleId": 12, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDocsManager.ts", - "module": "./src/lib/appManagers/appDocsManager.ts", - "moduleName": "./src/lib/appManagers/appDocsManager.ts", - "type": "cjs require", - "userRequest": "./appPhotosManager", - "loc": "20:43-72" - }, - { - "moduleId": 18, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "module": "./src/components/wrappers.ts", - "moduleName": "./src/components/wrappers.ts", - "type": "cjs require", - "userRequest": "../lib/appManagers/appPhotosManager", - "loc": "16:43-89" - }, - { - "moduleId": 24, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", - "type": "cjs require", - "userRequest": "./appPhotosManager", - "loc": "40:43-72" - }, - { - "moduleId": 27, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 51, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 55, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 56, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 62, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\AppInlineBotsManager.ts", - "module": "./src/lib/appManagers/AppInlineBotsManager.ts", - "moduleName": "./src/lib/appManagers/AppInlineBotsManager.ts", - "type": "cjs require", - "userRequest": "./appPhotosManager", - "loc": "14:43-72" - }, - { - "moduleId": 91, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\contacts.ts", - "module": "./src/components/sidebarLeft/contacts.ts", - "moduleName": "./src/components/sidebarLeft/contacts.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appPhotosManager", - "loc": "28:43-92" - } - ], - "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 utils_1 = require(\"../utils\");\r\nconst bin_utils_1 = require(\"../bin_utils\");\r\nconst appDownloadManager_1 = __importDefault(require(\"./appDownloadManager\"));\r\nconst userAgent_1 = require(\"../../helpers/userAgent\");\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 (photo._ == 'photoEmpty')\r\n return undefined;\r\n if (this.photos[photo.id])\r\n return Object.assign(this.photos[photo.id], photo);\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 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', type: '' };\r\n const sizes = (photo.sizes || photo.thumbs);\r\n if (sizes) {\r\n for (const photoSize of sizes) {\r\n if (!('w' in photoSize) && !('h' in photoSize))\r\n continue;\r\n bestPhotoSize = photoSize;\r\n const { 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 return bestPhotoSize;\r\n }\r\n /* public getUserPhotos(userID: number, maxID: number, limit: number) {\r\n var inputUser = appUsersManager.getUserInput(userID);\r\n return apiManager.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: any) => {\r\n appUsersManager.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 \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 let mimeType;\r\n if (isSticker) {\r\n mimeType = userAgent_1.isSafari ? 'image/png' : 'image/webp';\r\n }\r\n else {\r\n mimeType = 'image/jpeg';\r\n }\r\n const blob = new Blob([arr], { type: mimeType });\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.src = url;\r\n element.append(img);\r\n return img;\r\n }\r\n }\r\n }\r\n setAttachmentSize(photo, element, boxWidth, boxHeight, isSticker = false, dontRenderPreview = false) {\r\n const photoSize = this.choosePhotoSize(photo, boxWidth, boxHeight);\r\n //console.log('setAttachmentSize', photo, photo.sizes[0].bytes, div);\r\n const sizes = photo.sizes || photo.thumbs;\r\n const thumb = (sizes === null || sizes === void 0 ? void 0 : sizes.length) ? sizes[0] : null;\r\n if (thumb && ('bytes' in thumb)) {\r\n if ((!photo.downloaded || photo.type == 'video' || photo.type == 'gif') && !isSticker && !dontRenderPreview) {\r\n this.setAttachmentPreview(thumb.bytes, element, isSticker);\r\n }\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 = 'w' in photoSize ? photoSize.w : 100;\r\n height = 'h' in photoSize ? photoSize.h : 100;\r\n }\r\n const { 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 getPhotoDownloadOptions(photo, photoSize) {\r\n const isMyDocument = photo._ == 'document';\r\n if (!photoSize || photoSize._ == 'photoSizeEmpty') {\r\n //console.error('no photoSize by photo:', photo);\r\n throw new Error('photoSizeEmpty!');\r\n }\r\n // maybe it's a thumb\r\n const isPhoto = photoSize._ == 'photoSize' && photo.access_hash && photo.file_reference;\r\n const location = isPhoto ? {\r\n _: isMyDocument ? '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 return { dcID: photo.dc_id, location, size: isPhoto ? photoSize.size : undefined };\r\n }\r\n /* public getPhotoURL(photo: MTPhoto | MTMyDocument, photoSize: MTPhotoSize) {\r\n const downloadOptions = this.getPhotoDownloadOptions(photo, photoSize);\r\n \r\n return {url: getFileURL('photo', downloadOptions), location: downloadOptions.location};\r\n } */\r\n preloadPhoto(photoID, photoSize) {\r\n const photo = this.getPhoto(photoID);\r\n // @ts-ignore\r\n if (!photo || photo._ == 'photoEmpty') {\r\n throw new Error('preloadPhoto photoEmpty!');\r\n }\r\n if (!photoSize) {\r\n const fullWidth = this.windowW;\r\n const fullHeight = this.windowH;\r\n photoSize = this.choosePhotoSize(photo, fullWidth, fullHeight);\r\n }\r\n const cacheContext = this.getCacheContext(photo);\r\n if (cacheContext.downloaded >= ('size' in photoSize ? photoSize.size : 0) && cacheContext.url) {\r\n return Promise.resolve();\r\n }\r\n const downloadOptions = this.getPhotoDownloadOptions(photo, photoSize);\r\n const fileName = bin_utils_1.getFileNameByLocation(downloadOptions.location);\r\n let download = appDownloadManager_1.default.getDownload(fileName);\r\n if (download) {\r\n return download;\r\n }\r\n download = appDownloadManager_1.default.download(downloadOptions);\r\n download.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 return blob;\r\n });\r\n return download;\r\n }\r\n getCacheContext(photo) {\r\n return photo._ == 'document' ? this.getDocumentCachedThumb(photo.id) : photo;\r\n }\r\n getDocumentCachedThumb(docID) {\r\n var _a;\r\n return (_a = this.documentThumbsCache[docID]) !== null && _a !== void 0 ? _a : (this.documentThumbsCache[docID] = { downloaded: 0, url: '' });\r\n }\r\n getPhoto(photoID) {\r\n return utils_1.isObject(photoID) ? photoID : this.photos[photoID];\r\n }\r\n getInput(photo) {\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 savePhotoFile(photo) {\r\n const fullPhotoSize = this.choosePhotoSize(photo, 0xFFFF, 0xFFFF);\r\n if (fullPhotoSize._ != 'photoSize') {\r\n return;\r\n }\r\n const location = {\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 appDownloadManager_1.default.downloadToDisc({\r\n dcID: photo.dc_id,\r\n location,\r\n size: fullPhotoSize.size,\r\n fileName: 'photo' + photo.id + '.jpg'\r\n }, 'photo' + photo.id + '.jpg');\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": 14, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "name": "./src/lib/appManagers/appSidebarLeft.ts", - "index": 85, - "index2": 90, - "size": 14086, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "./appSidebarLeft", - "loc": "20:41-68" - }, - { - "moduleId": 88, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\newChannel.ts", - "module": "./src/components/sidebarLeft/newChannel.ts", - "moduleName": "./src/components/sidebarLeft/newChannel.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appSidebarLeft", - "loc": "27:38-85" - }, - { - "moduleId": 90, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\addMembers.ts", - "module": "./src/components/sidebarLeft/addMembers.ts", - "moduleName": "./src/components/sidebarLeft/addMembers.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appSidebarLeft", - "loc": "28:38-85" - }, - { - "moduleId": 91, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\contacts.ts", - "module": "./src/components/sidebarLeft/contacts.ts", - "moduleName": "./src/components/sidebarLeft/contacts.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appSidebarLeft", - "loc": "29:38-85" - }, - { - "moduleId": 92, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\newGroup.ts", - "module": "./src/components/sidebarLeft/newGroup.ts", - "moduleName": "./src/components/sidebarLeft/newGroup.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appSidebarLeft", - "loc": "28:38-85" - }, - { - "moduleId": 93, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\settings.ts", - "module": "./src/components/sidebarLeft/settings.ts", - "moduleName": "./src/components/sidebarLeft/settings.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appSidebarLeft", - "loc": "28:38-85" - }, - { - "moduleId": 94, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\editProfile.ts", - "module": "./src/components/sidebarLeft/editProfile.ts", - "moduleName": "./src/components/sidebarLeft/editProfile.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appSidebarLeft", - "loc": "9:41-88" - }, - { - "moduleId": 95, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\chatFolders.ts", - "module": "./src/components/sidebarLeft/chatFolders.ts", - "moduleName": "./src/components/sidebarLeft/chatFolders.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appSidebarLeft", - "loc": "12:41-88" - }, - { - "moduleId": 96, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\editFolder.ts", - "module": "./src/components/sidebarLeft/editFolder.ts", - "moduleName": "./src/components/sidebarLeft/editFolder.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appSidebarLeft", - "loc": "25:38-85" - }, - { - "moduleId": 97, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\includedChats.ts", - "module": "./src/components/sidebarLeft/includedChats.ts", - "moduleName": "./src/components/sidebarLeft/includedChats.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appSidebarLeft", - "loc": "26:38-85" - } - ], - "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.AppSidebarLeft = void 0;\r\n//import { logger } from \"../polyfill\";\r\nconst appDialogsManager_1 = __importStar(require(\"./appDialogsManager\"));\r\nconst utils_1 = require(\"../utils\");\r\nconst appImManager_1 = __importDefault(require(\"./appImManager\"));\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 avatar_1 = __importDefault(require(\"../../components/avatar\"));\r\nconst newChannel_1 = __importDefault(require(\"../../components/sidebarLeft/newChannel\"));\r\nconst addMembers_1 = __importDefault(require(\"../../components/sidebarLeft/addMembers\"));\r\nconst contacts_1 = __importDefault(require(\"../../components/sidebarLeft/contacts\"));\r\nconst newGroup_1 = __importDefault(require(\"../../components/sidebarLeft/newGroup\"));\r\nconst settings_1 = __importDefault(require(\"../../components/sidebarLeft/settings\"));\r\nconst editProfile_1 = __importDefault(require(\"../../components/sidebarLeft/editProfile\"));\r\nconst chatFolders_1 = __importDefault(require(\"../../components/sidebarLeft/chatFolders\"));\r\nconst editFolder_1 = __importDefault(require(\"../../components/sidebarLeft/editFolder\"));\r\nconst includedChats_1 = __importDefault(require(\"../../components/sidebarLeft/includedChats\"));\r\nconst slider_1 = __importDefault(require(\"../../components/slider\"));\r\nconst searchInput_1 = __importDefault(require(\"../../components/searchInput\"));\r\nconst appStateManager_1 = __importDefault(require(\"./appStateManager\"));\r\nconst appChatsManager_1 = __importDefault(require(\"./appChatsManager\"));\r\navatar_1.default;\r\nconst newChannelTab = new newChannel_1.default();\r\nconst addMembersTab = new addMembers_1.default();\r\nconst contactsTab = new contacts_1.default();\r\nconst newGroupTab = new newGroup_1.default();\r\nconst settingsTab = new settings_1.default();\r\nconst editProfileTab = new editProfile_1.default();\r\nconst chatFoldersTab = new chatFolders_1.default();\r\nconst editFolderTab = new editFolder_1.default();\r\nconst includedChatsTab = new includedChats_1.default();\r\nlet AppSidebarLeft = /** @class */ (() => {\r\n class AppSidebarLeft extends slider_1.default {\r\n constructor() {\r\n super(document.getElementById('column-left'), {\r\n [AppSidebarLeft.SLIDERITEMSIDS.archived]: appDialogsManager_1.archivedTab,\r\n [AppSidebarLeft.SLIDERITEMSIDS.newChannel]: newChannelTab,\r\n [AppSidebarLeft.SLIDERITEMSIDS.contacts]: contactsTab,\r\n [AppSidebarLeft.SLIDERITEMSIDS.addMembers]: addMembersTab,\r\n [AppSidebarLeft.SLIDERITEMSIDS.newGroup]: newGroupTab,\r\n [AppSidebarLeft.SLIDERITEMSIDS.settings]: settingsTab,\r\n [AppSidebarLeft.SLIDERITEMSIDS.editProfile]: editProfileTab,\r\n [AppSidebarLeft.SLIDERITEMSIDS.chatFolders]: chatFoldersTab,\r\n [AppSidebarLeft.SLIDERITEMSIDS.editFolder]: editFolderTab,\r\n [AppSidebarLeft.SLIDERITEMSIDS.includedChats]: includedChatsTab,\r\n });\r\n this.buttons = {};\r\n this.newButtons = {};\r\n //private log = logger('SL');\r\n this.searchGroups = {\r\n //saved: new SearchGroup('', 'contacts'),\r\n contacts: new appSearch_1.SearchGroup('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 // peerIDs\r\n this.recentSearch = [];\r\n this.recentSearchLoaded = false;\r\n this.searchInput = new searchInput_1.default('Telegram Search');\r\n this.sidebarEl.querySelector('.item-main .sidebar-header').append(this.searchInput.container);\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.archivedTab = appDialogsManager_1.archivedTab;\r\n this.newChannelTab = newChannelTab;\r\n this.addMembersTab = addMembersTab;\r\n this.contactsTab = contactsTab;\r\n this.newGroupTab = newGroupTab;\r\n this.settingsTab = settingsTab;\r\n this.editProfileTab = editProfileTab;\r\n this.chatFoldersTab = chatFoldersTab;\r\n this.editFolderTab = editFolderTab;\r\n this.includedChatsTab = includedChatsTab;\r\n this.menuEl = this.toolsBtn.querySelector('.btn-menu');\r\n this.newBtnMenu = this.sidebarEl.querySelector('#new-menu');\r\n this.globalSearch = new appSearch_1.default(this.searchContainer, this.searchInput, this.searchGroups, (count) => {\r\n if (!count && !this.searchInput.value.trim()) {\r\n this.globalSearch.reset();\r\n this.searchGroups.people.setActive();\r\n this.renderRecentSearch();\r\n }\r\n });\r\n this.searchContainer.addEventListener('click', (e) => {\r\n const target = utils_1.findUpTag(e.target, 'LI');\r\n if (!target) {\r\n return;\r\n }\r\n const searchGroup = utils_1.findUpClassName(target, 'search-group');\r\n if (!searchGroup || searchGroup.classList.contains('search-group-recent') || searchGroup.classList.contains('search-group-people')) {\r\n return;\r\n }\r\n const peerID = +target.getAttribute('data-peerID');\r\n if (this.recentSearch[0] != peerID) {\r\n this.recentSearch.findAndSplice(p => p == peerID);\r\n this.recentSearch.unshift(peerID);\r\n if (this.recentSearch.length > 20) {\r\n this.recentSearch.length = 20;\r\n }\r\n this.renderRecentSearch();\r\n appStateManager_1.default.pushToState('recentSearch', this.recentSearch);\r\n for (const peerID of this.recentSearch) {\r\n appStateManager_1.default.pushPeer(peerID);\r\n }\r\n clearRecentSearchBtn.style.display = '';\r\n }\r\n }, { capture: true });\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 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(AppSidebarLeft.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', (e) => {\r\n this.settingsTab.fillElements();\r\n this.selectTab(AppSidebarLeft.SLIDERITEMSIDS.settings);\r\n });\r\n let firstTime = true;\r\n this.searchInput.input.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 if (firstTime) {\r\n this.searchGroups.people.setActive();\r\n this.renderRecentSearch();\r\n firstTime = false;\r\n }\r\n /* this.searchInput.addEventListener('blur', (e) => {\r\n if(!this.searchInput.value) {\r\n this.toolsBtn.classList.add('active');\r\n this.backBtn.classList.remove('active');\r\n this.backBtn.click();\r\n }\r\n }, {once: true}); */\r\n });\r\n this.backBtn.addEventListener('click', (e) => {\r\n //appDialogsManager.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 firstTime = true;\r\n setTimeout(() => {\r\n this.searchContainer.classList.add('hide');\r\n this.globalSearch.reset();\r\n }, 150);\r\n });\r\n this.newButtons.channel.addEventListener('click', (e) => {\r\n this.selectTab(AppSidebarLeft.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 appUsersManager_1.default.getTopPeers().then(peers => {\r\n //console.log('got top categories:', categories);\r\n peers.forEach((peerID) => {\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 this.renderRecentSearch();\r\n const clearRecentSearchBtn = this.recentSearchClearBtn = document.createElement('button');\r\n clearRecentSearchBtn.classList.add('btn-icon', 'tgico-close');\r\n this.searchGroups.recent.nameEl.append(clearRecentSearchBtn);\r\n clearRecentSearchBtn.addEventListener('click', () => {\r\n this.recentSearch = [];\r\n appStateManager_1.default.pushToState('recentSearch', this.recentSearch);\r\n this.renderRecentSearch(false);\r\n clearRecentSearchBtn.style.display = 'none';\r\n });\r\n }\r\n renderRecentSearch(setActive = true) {\r\n appStateManager_1.default.getState().then(state => {\r\n if (state && !this.recentSearchLoaded && Array.isArray(state.recentSearch)) {\r\n this.recentSearch = state.recentSearch;\r\n this.recentSearchLoaded = true;\r\n }\r\n this.searchGroups.recent.list.innerHTML = '';\r\n this.recentSearchClearBtn.style.display = this.recentSearch.length ? '' : 'none';\r\n this.recentSearch.slice(0, 20).forEach(peerID => {\r\n let { dialog, dom } = appDialogsManager_1.default.addDialog(peerID, this.searchGroups.recent.list, false, true, false, true);\r\n dom.lastMessageSpan.innerText = peerID > 0 ? appUsersManager_1.default.getUserStatusString(peerID) : appChatsManager_1.default.getChatMembersString(peerID);\r\n });\r\n if (setActive) {\r\n this.searchGroups.recent.setActive();\r\n }\r\n });\r\n }\r\n }\r\n AppSidebarLeft.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 chatFolders: 8,\r\n editFolder: 9,\r\n includedChats: 10,\r\n };\r\n return AppSidebarLeft;\r\n})();\r\nexports.AppSidebarLeft = AppSidebarLeft;\r\nconst appSidebarLeft = new AppSidebarLeft();\r\n// @ts-ignore\r\nif (process.env.NODE_ENV != 'production') {\r\n window.appSidebarLeft = appSidebarLeft;\r\n}\r\nexports.default = appSidebarLeft;\r\n" - }, - { - "id": 15, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\animationIntersector.ts", - "name": "./src/components/animationIntersector.ts", - "index": 36, - "index2": 28, - "size": 5352, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "../../components/animationIntersector", - "loc": "37:47-95" - }, - { - "moduleId": 18, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "module": "./src/components/wrappers.ts", - "moduleName": "./src/components/wrappers.ts", - "type": "cjs require", - "userRequest": "./animationIntersector", - "loc": "28:47-80" - }, - { - "moduleId": 20, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\lottieLoader.ts", - "module": "./src/lib/lottieLoader.ts", - "moduleName": "./src/lib/lottieLoader.ts", - "type": "cjs require", - "userRequest": "../components/animationIntersector", - "loc": "18:47-92" - }, - { - "moduleId": 47, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\index.ts", - "module": "./src/components/emoticonsDropdown/index.ts", - "moduleName": "./src/components/emoticonsDropdown/index.ts", - "type": "cjs require", - "userRequest": "../animationIntersector", - "loc": "21:47-81" - }, - { - "moduleId": 61, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popupStickers.ts", - "module": "./src/components/popupStickers.ts", - "moduleName": "./src/components/popupStickers.ts", - "type": "cjs require", - "userRequest": "./animationIntersector", - "loc": "13:47-80" - }, - { - "moduleId": 63, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\gifsMasonry.ts", - "module": "./src/components/gifsMasonry.ts", - "moduleName": "./src/components/gifsMasonry.ts", - "type": "cjs require", - "userRequest": "./animationIntersector", - "loc": "20:47-80" - }, - { - "moduleId": 85, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\stickers.ts", - "module": "./src/components/sidebarRight/stickers.ts", - "moduleName": "./src/components/sidebarRight/stickers.ts", - "type": "cjs require", - "userRequest": "../animationIntersector", - "loc": "32:47-81" - }, - { - "moduleId": 87, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\gifs.ts", - "module": "./src/components/sidebarRight/gifs.ts", - "moduleName": "./src/components/sidebarRight/gifs.ts", - "type": "cjs require", - "userRequest": "../animationIntersector", - "loc": "36:47-81" - }, - { - "moduleId": 102, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\stickers.ts", - "module": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "type": "cjs require", - "userRequest": "../../animationIntersector", - "loc": "46:47-84" - } - ], - "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.AnimationIntersector = void 0;\r\nconst utils_1 = require(\"../lib/utils\");\r\nconst lottieLoader_1 = require(\"../lib/lottieLoader\");\r\n;\r\nclass AnimationIntersector {\r\n constructor() {\r\n this.visible = new Set();\r\n this.byGroups = {};\r\n this.lockedGroups = {};\r\n this.intersectionLockedGroups = {};\r\n this.observer = new IntersectionObserver((entries) => {\r\n if (utils_1.$rootScope.idle.isIDLE)\r\n return;\r\n for (const entry of entries) {\r\n const target = entry.target;\r\n for (const group in this.byGroups) {\r\n if (this.intersectionLockedGroups[group]) {\r\n continue;\r\n }\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 if (player.animation instanceof lottieLoader_1.RLottiePlayer /* && player.animation.cachingDelta == 2 */) {\r\n //console.warn('will clear cache', player);\r\n player.animation.clearCache();\r\n }\r\n }\r\n break;\r\n }\r\n }\r\n }\r\n });\r\n }\r\n getAnimations(element) {\r\n const found = [];\r\n for (const group in this.byGroups) {\r\n for (const player of this.byGroups[group]) {\r\n if (player.el == element) {\r\n found.push(player);\r\n }\r\n }\r\n }\r\n return found;\r\n }\r\n addAnimation(animation, group = '') {\r\n var _a;\r\n const player = {\r\n el: animation instanceof lottieLoader_1.RLottiePlayer ? animation.el : animation,\r\n animation: animation,\r\n group\r\n };\r\n ((_a = this.byGroups[group]) !== null && _a !== void 0 ? _a : (this.byGroups[group] = [])).push(player);\r\n this.observer.observe(player.el);\r\n }\r\n checkAnimations(blurred, group, destroy = false) {\r\n if (utils_1.$rootScope.idle.isIDLE)\r\n return;\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 });\r\n }\r\n }\r\n checkAnimation(player, blurred = false, destroy = false) {\r\n const { el, animation, group } = player;\r\n //return;\r\n if ((destroy || (!utils_1.isInDOM(el) && !this.lockedGroups[group])) /* && false */) {\r\n //console.log('destroy animation');\r\n animation.remove();\r\n if (animation instanceof HTMLVideoElement) {\r\n animation.src = '';\r\n animation.load();\r\n }\r\n for (const group in this.byGroups) {\r\n this.byGroups[group].findAndSplice(p => p == player);\r\n }\r\n this.observer.unobserve(el);\r\n this.visible.delete(player);\r\n return;\r\n }\r\n if (blurred) {\r\n if (!animation.paused) {\r\n //console.warn('pause animation:', animation);\r\n animation.pause();\r\n }\r\n }\r\n else if (animation.paused && this.visible.has(player) && animation.autoplay) {\r\n //console.warn('play animation:', animation);\r\n animation.play();\r\n }\r\n }\r\n lockGroup(group) {\r\n this.lockedGroups[group] = true;\r\n }\r\n unlockGroup(group) {\r\n delete this.lockedGroups[group];\r\n this.checkAnimations(undefined, group);\r\n }\r\n refreshGroup(group) {\r\n const animations = this.byGroups[group];\r\n if (animations && animations.length) {\r\n animations.forEach(animation => {\r\n this.observer.unobserve(animation.el);\r\n });\r\n window.requestAnimationFrame(() => {\r\n animations.forEach(animation => {\r\n this.observer.observe(animation.el);\r\n });\r\n });\r\n }\r\n }\r\n lockIntersectionGroup(group) {\r\n this.intersectionLockedGroups[group] = true;\r\n }\r\n unlockIntersectionGroup(group) {\r\n delete this.intersectionLockedGroups[group];\r\n this.refreshGroup(group);\r\n }\r\n}\r\nexports.AnimationIntersector = AnimationIntersector;\r\nconst animationIntersector = new AnimationIntersector();\r\n// @ts-ignore\r\nif (process.env.NODE_ENV == 'development') {\r\n window.animationIntersector = animationIntersector;\r\n}\r\nexports.default = animationIntersector;\r\n" - }, - { - "id": 16, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts", - "name": "./src/lib/appManagers/appDialogsManager.ts", - "index": 57, - "index2": 54, - "size": 49292, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "./appDialogsManager", - "loc": "14:44-74" - }, - { - "moduleId": 14, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "module": "./src/lib/appManagers/appSidebarLeft.ts", - "moduleName": "./src/lib/appManagers/appSidebarLeft.ts", - "type": "cjs require", - "userRequest": "./appDialogsManager", - "loc": "27:41-71" - }, - { - "moduleId": 43, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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" - }, - { - "moduleId": 51, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 86, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\pollResults.ts", - "module": "./src/components/sidebarRight/pollResults.ts", - "moduleName": "./src/components/sidebarRight/pollResults.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appDialogsManager", - "loc": "30:44-94" - }, - { - "moduleId": 91, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\contacts.ts", - "module": "./src/components/sidebarLeft/contacts.ts", - "moduleName": "./src/components/sidebarLeft/contacts.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appDialogsManager", - "loc": "26:44-94" - }, - { - "moduleId": 92, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\newGroup.ts", - "module": "./src/components/sidebarLeft/newGroup.ts", - "moduleName": "./src/components/sidebarLeft/newGroup.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appDialogsManager", - "loc": "30:44-94" - }, - { - "moduleId": 96, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\editFolder.ts", - "module": "./src/components/sidebarLeft/editFolder.ts", - "moduleName": "./src/components/sidebarLeft/editFolder.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appDialogsManager", - "loc": "29:44-94" - }, - { - "moduleId": 97, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\includedChats.ts", - "module": "./src/components/sidebarLeft/includedChats.ts", - "moduleName": "./src/components/sidebarLeft/includedChats.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appDialogsManager", - "loc": "27:44-94" - } - ], - "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 = exports.archivedTab = exports.AppArchivedTab = 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 logger_1 = require(\"../logger\");\r\nconst appChatsManager_1 = __importDefault(require(\"./appChatsManager\"));\r\nconst avatar_1 = __importDefault(require(\"../../components/avatar\"));\r\nconst popup_1 = require(\"../../components/popup\");\r\nconst appStateManager_1 = __importDefault(require(\"./appStateManager\"));\r\nconst config_1 = require(\"../config\");\r\nconst horizontalMenu_1 = require(\"../../components/horizontalMenu\");\r\nconst ripple_1 = require(\"../../components/ripple\");\r\nconst testScroll = false;\r\n//const USEPINNEDDELIMITER = false;\r\nclass DialogsContextMenu {\r\n constructor() {\r\n this.element = document.getElementById('dialogs-contextmenu');\r\n this.buttons = {};\r\n this.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 if (e instanceof MouseEvent)\r\n e.preventDefault();\r\n if (this.element.classList.contains('active')) {\r\n return false;\r\n }\r\n if (e instanceof MouseEvent)\r\n e.cancelBubble = true;\r\n this.filterID = appDialogsManager.filterID;\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 = !!dialog.pFlags?.pinned;\r\n const condition = this.filterID > 1 ? appMessagesManager_1.default.filtersStorage.filters[this.filterID].pinned_peers.includes(dialog.peerID) : !!((_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 misc_1.parseMenuButtonsTo(this.buttons, this.element.children);\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, this.filterID);\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 const dialog = appMessagesManager_1.default.getDialogByPeerID(this.selectedID)[0];\r\n if (!dialog)\r\n return;\r\n if (dialog.unread_count) {\r\n appMessagesManager_1.default.readHistory(this.selectedID, dialog.top_message);\r\n appMessagesManager_1.default.markDialogUnread(this.selectedID, true);\r\n }\r\n else {\r\n appMessagesManager_1.default.markDialogUnread(this.selectedID);\r\n }\r\n });\r\n this.buttons.delete.addEventListener('click', () => {\r\n let firstName = appPeersManager_1.default.getPeerTitle(this.selectedID, false, true);\r\n let callbackFlush = (justClear) => {\r\n appMessagesManager_1.default.flushHistory(this.selectedID, justClear);\r\n };\r\n let callbackLeave = () => {\r\n appChatsManager_1.default.leaveChannel(-this.selectedID);\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: callbackLeave\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: callbackLeave\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 ${firstName}?`;\r\n buttons = [{\r\n text: 'DELETE FOR ME AND ' + firstName,\r\n isDanger: true,\r\n callback: () => callbackFlush(false)\r\n }, {\r\n text: 'DELETE JUST FOR ME',\r\n isDanger: true,\r\n callback: () => callbackFlush(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: () => callbackFlush(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 ${firstName}?`;\r\n buttons = [{\r\n text: 'DELETE AND LEAVE ' + firstName,\r\n isDanger: true,\r\n callback: () => callbackFlush(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 AppArchivedTab {\r\n constructor() {\r\n this.container = document.getElementById('chats-archived-container');\r\n this.chatList = document.getElementById('dialogs-archived');\r\n this.scroll = null;\r\n }\r\n init() {\r\n this.scroll = new scrollable_new_1.default(this.container, 'y', 'CLA', this.chatList, 500);\r\n this.scroll.setVirtualContainer(this.chatList);\r\n this.scroll.onScrolledBottom = appDialogsManager.onChatsScroll;\r\n ///this.scroll.attachSentinels();\r\n appDialogsManager.setListClickListener(this.chatList, null, true);\r\n window.addEventListener('resize', () => {\r\n setTimeout(appDialogsManager.onChatsScroll, 0);\r\n });\r\n }\r\n onOpen() {\r\n if (this.init) {\r\n this.init();\r\n this.init = null;\r\n }\r\n this.wasFilterID = appDialogsManager.filterID;\r\n appDialogsManager.scroll = this.scroll;\r\n appDialogsManager.filterID = 1;\r\n appDialogsManager.onTabChange();\r\n }\r\n // вообще, так делать нельзя, но нет времени чтобы переделать главный чатлист на слайд...\r\n onOpenAfterTimeout() {\r\n appDialogsManager.chatLists[this.wasFilterID].innerHTML = '';\r\n }\r\n onClose() {\r\n appDialogsManager.scroll = appDialogsManager._scroll;\r\n appDialogsManager.filterID = this.wasFilterID;\r\n appDialogsManager.onTabChange();\r\n }\r\n onCloseAfterTimeout() {\r\n this.chatList.innerHTML = '';\r\n }\r\n}\r\nexports.AppArchivedTab = AppArchivedTab;\r\nexports.archivedTab = new AppArchivedTab();\r\nclass AppDialogsManager {\r\n constructor() {\r\n this._chatList = document.getElementById('dialogs');\r\n this.chatList = this._chatList;\r\n //public pinnedDelimiter: HTMLDivElement;\r\n this.doms = {};\r\n this.lastActiveListElement = null;\r\n /* private rippleCallback: (value?: boolean | PromiseLike) => void = null;\r\n private lastClickID = 0;\r\n private lastGoodClickID = 0; */\r\n this.chatsContainer = document.getElementById('chats-container');\r\n this.loadedAll = false;\r\n this.scroll = null;\r\n this._scroll = null;\r\n this.log = logger_1.logger('DIALOGS', logger_1.LogLevels.log | logger_1.LogLevels.error | logger_1.LogLevels.warn | logger_1.LogLevels.debug);\r\n this.contextMenu = new DialogsContextMenu();\r\n this.chatLists = {\r\n 0: this.chatList,\r\n 1: exports.archivedTab.chatList\r\n };\r\n this.filterID = 0;\r\n this.folders = {\r\n menu: document.getElementById('folders-tabs'),\r\n menuScrollContainer: null,\r\n container: document.getElementById('folders-container')\r\n };\r\n this.filtersRendered = {};\r\n this.onTabChange = () => {\r\n this.doms = {};\r\n this.loadedAll = false;\r\n this.lastActiveListElement = null;\r\n this.chatList = this.chatLists[this.filterID];\r\n this.loadDialogs(this.filterID);\r\n };\r\n this.onChatsScroll = () => {\r\n if (this.loadedAll || this.loadDialogsPromise)\r\n return;\r\n this.log('onChatsScroll');\r\n this.loadDialogs(this.filterID);\r\n };\r\n this.chatsPreloader = misc_1.putPreloader(null, true);\r\n this.allUnreadCount = this.folders.menu.querySelector('.unread-count');\r\n /* if(USEPINNEDDELIMITER) {\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 } */\r\n this.folders.menuScrollContainer = this.folders.menu.parentElement;\r\n this.scroll = this._scroll = new scrollable_new_1.default(this.chatsContainer, 'y', 'CL', this.chatList, 500);\r\n this.scroll.onScrolledBottom = this.onChatsScroll;\r\n this.scroll.setVirtualContainer(this.chatList);\r\n //this.scroll.attachSentinels();\r\n if (config_1.touchSupport && config_1.isSafari) {\r\n let allowUp, allowDown, slideBeginY;\r\n const container = this.scroll.container;\r\n container.addEventListener('touchstart', (event) => {\r\n allowUp = container.scrollTop > 0;\r\n allowDown = (container.scrollTop < container.scrollHeight - container.clientHeight);\r\n // @ts-ignore\r\n slideBeginY = event.pageY;\r\n });\r\n container.addEventListener('touchmove', (event) => {\r\n var up = (event.pageY > slideBeginY);\r\n var down = (event.pageY < slideBeginY);\r\n slideBeginY = event.pageY;\r\n if ((up && allowUp) || (down && allowDown)) {\r\n event.stopPropagation();\r\n }\r\n else if (up || down) {\r\n event.preventDefault();\r\n }\r\n });\r\n }\r\n this.setListClickListener(this.chatList, null, true);\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 = `

${i}18:33

-_-_-_-: qweasd

`;\r\n i++;\r\n this.scroll.append(li);\r\n };\r\n for(let i = 0; i < 100; ++i) {\r\n add();\r\n }\r\n (window as any).addElement = add;\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 (utils_1.$rootScope.selectedPeerID == 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 this.setFiltersUnreadCount();\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 this.validateForFilter();\r\n this.setFiltersUnreadCount();\r\n }\r\n });\r\n utils_1.$rootScope.$on('dialogs_multiupdate', (e) => {\r\n const dialogs = e.detail;\r\n for (const id in dialogs) {\r\n const dialog = dialogs[id];\r\n this.updateDialog(dialog);\r\n }\r\n //this.setPinnedDelimiter();\r\n this.validateForFilter();\r\n this.setFiltersUnreadCount();\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 this.scroll.reorder();\r\n }\r\n this.setFiltersUnreadCount();\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 == utils_1.$rootScope.selectedPeerID) {\r\n appImManager_1.default.updateUnreadByDialog(dialog);\r\n }\r\n this.validateForFilter();\r\n this.setFiltersUnreadCount();\r\n }\r\n });\r\n utils_1.$rootScope.$on('dialog_notify_settings', e => {\r\n const dialog = appMessagesManager_1.default.getDialogByPeerID(e.detail)[0];\r\n if (dialog) {\r\n this.setUnreadMessages(dialog); // возможно это не нужно, но нужно менять is-muted\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 utils_1.$rootScope.$on('filter_update', (e) => {\r\n const filter = e.detail;\r\n if (!this.filtersRendered[filter.id]) {\r\n this.addFilter(filter);\r\n return;\r\n }\r\n else if (filter.id == this.filterID) { // это нет тут смысла вызывать, так как будет dialogs_multiupdate\r\n //this.validateForFilter();\r\n const folder = appMessagesManager_1.default.dialogsStorage.getFolder(filter.id);\r\n this.validateForFilter();\r\n for (let i = 0, length = folder.length; i < length; ++i) {\r\n const dialog = folder[i];\r\n this.updateDialog(dialog);\r\n }\r\n this.setFiltersUnreadCount();\r\n }\r\n const elements = this.filtersRendered[filter.id];\r\n elements.title.innerHTML = richtextprocessor_1.RichTextProcessor.wrapEmojiText(filter.title);\r\n });\r\n utils_1.$rootScope.$on('filter_delete', (e) => {\r\n const filter = e.detail;\r\n const elements = this.filtersRendered[filter.id];\r\n if (!elements)\r\n return;\r\n // set tab\r\n //(this.folders.menu.firstElementChild.children[Math.max(0, filter.id - 2)] as HTMLElement).click();\r\n this.folders.menu.firstElementChild.children[0].click();\r\n elements.container.remove();\r\n elements.menu.remove();\r\n delete this.chatLists[filter.id];\r\n delete this.filtersRendered[filter.id];\r\n if (!Object.keys(this.filtersRendered).length) {\r\n this.folders.menuScrollContainer.classList.add('hide');\r\n }\r\n });\r\n /* $rootScope.$on('filter_pinned_order', (e) => {\r\n const {order, id} = e.detail as {order: number[], id: number};\r\n if(this.prevTabID != id) {\r\n return;\r\n }\r\n \r\n for(const peerID of order) {\r\n this.updateDialog(appMessagesManager.getDialogByPeerID(peerID)[0]);\r\n }\r\n }); */\r\n new scrollable_new_1.default(this.folders.menuScrollContainer, 'x');\r\n this.chatsContainer.prepend(this.folders.menuScrollContainer);\r\n const selectTab = horizontalMenu_1.horizontalMenu(this.folders.menu, this.folders.container, (id, tabContent) => {\r\n /* if(id != 0) {\r\n id += 1;\r\n } */\r\n id = +tabContent.dataset.filterID || 0;\r\n if (this.filterID == id)\r\n return;\r\n this.chatLists[id].innerHTML = '';\r\n this.scroll.setVirtualContainer(this.chatLists[id]);\r\n this.filterID = id;\r\n this.onTabChange();\r\n }, () => {\r\n for (const folderID in this.chatLists) {\r\n if (+folderID != this.filterID) {\r\n this.chatLists[folderID].innerHTML = '';\r\n }\r\n }\r\n });\r\n //selectTab(0);\r\n this.folders.menu.firstElementChild.firstElementChild.click();\r\n /* false && */ appStateManager_1.default.loadSavedState().then(() => {\r\n return appMessagesManager_1.default.filtersStorage.getDialogFilters();\r\n }).then(filters => {\r\n for (const filterID in filters) {\r\n this.addFilter(filters[filterID]);\r\n }\r\n return this.loadDialogs(this.filterID);\r\n }).then(result => {\r\n //this.setPinnedDelimiter();\r\n //appSidebarLeft.onChatsScroll();\r\n this.loadDialogs(1);\r\n });\r\n }\r\n updateDialog(dialog) {\r\n if (!dialog) {\r\n return;\r\n }\r\n if (!this.doms.hasOwnProperty(dialog.peerID)) {\r\n this.addDialog(dialog);\r\n }\r\n if (this.getDialogDom(dialog.peerID)) {\r\n this.setLastMessage(dialog);\r\n this.setDialogPosition(dialog);\r\n }\r\n }\r\n setFilterUnreadCount(filterID, folder) {\r\n var _a;\r\n const unreadSpan = filterID == 0 ? this.allUnreadCount : (_a = this.filtersRendered[filterID]) === null || _a === void 0 ? void 0 : _a.unread;\r\n if (!unreadSpan) {\r\n return;\r\n }\r\n folder = folder || appMessagesManager_1.default.dialogsStorage.getFolder(filterID);\r\n const sum = folder.reduce((acc, dialog) => acc + +!!dialog.unread_count, 0);\r\n unreadSpan.innerText = sum ? '' + sum : '';\r\n }\r\n setFiltersUnreadCount() {\r\n for (const filterID in this.filtersRendered) {\r\n this.setFilterUnreadCount(+filterID);\r\n }\r\n this.setFilterUnreadCount(0);\r\n }\r\n /**\r\n * Удалит неподходящие чаты из списка, но не добавит их(!)\r\n */\r\n validateForFilter() {\r\n // !WARNING, возможно это было зачем-то, но комментарий исправил архивирование\r\n //if(this.filterID == 0) return;\r\n const folder = appMessagesManager_1.default.dialogsStorage.getFolder(this.filterID);\r\n let affected = false;\r\n for (const _peerID in this.doms) {\r\n const peerID = +_peerID;\r\n // если больше не подходит по фильтру, удаляем\r\n if (folder.findIndex((dialog) => dialog.peerID == peerID) === -1) {\r\n const listEl = this.doms[peerID].listEl;\r\n listEl.remove();\r\n affected = true;\r\n if (this.lastActiveListElement == listEl) {\r\n this.lastActiveListElement = null;\r\n }\r\n }\r\n }\r\n if (affected) {\r\n this.scroll.reorder();\r\n }\r\n }\r\n addFilter(filter) {\r\n if (this.filtersRendered[filter.id])\r\n return;\r\n const li = document.createElement('li');\r\n const span = document.createElement('span');\r\n const titleSpan = document.createElement('span');\r\n titleSpan.innerHTML = richtextprocessor_1.RichTextProcessor.wrapEmojiText(filter.title);\r\n const unreadSpan = document.createElement('span');\r\n unreadSpan.classList.add('unread-count');\r\n const i = document.createElement('i');\r\n span.append(titleSpan, unreadSpan, i);\r\n li.append(span);\r\n ripple_1.ripple(li);\r\n const containerToAppend = this.folders.menu.firstElementChild;\r\n utils_1.positionElementByIndex(li, containerToAppend, filter.orderIndex + 1); // because 0 is All\r\n //containerToAppend.append(li);\r\n const ul = document.createElement('ul');\r\n const div = document.createElement('div');\r\n div.append(ul);\r\n div.dataset.filterID = '' + filter.id;\r\n //this.folders.container.append(div);\r\n utils_1.positionElementByIndex(div, this.folders.container, filter.orderIndex + 1); // because 0 is All\r\n this.chatLists[filter.id] = ul;\r\n this.setListClickListener(ul, null, true);\r\n if (!this.showFiltersTimeout) {\r\n this.showFiltersTimeout = window.setTimeout(() => {\r\n this.showFiltersTimeout = 0;\r\n this.folders.menuScrollContainer.classList.remove('hide');\r\n this.setFiltersUnreadCount();\r\n }, 0);\r\n }\r\n this.filtersRendered[filter.id] = {\r\n menu: li,\r\n container: div,\r\n unread: unreadSpan,\r\n title: titleSpan\r\n };\r\n }\r\n loadDialogs(folderID) {\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 if (!this.chatList.childElementCount) {\r\n const container = this.chatList.parentElement;\r\n container.append(this.chatsPreloader);\r\n }\r\n //return;\r\n const storage = appMessagesManager_1.default.dialogsStorage.getFolder(folderID);\r\n let offsetIndex = 0;\r\n for (let i = storage.length - 1; i >= 0; --i) {\r\n const 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 const loadCount = 50 /*this.chatsLoadCount */;\r\n const getConversationPromise = (this.filterID > 1 ? appUsersManager_1.default.getContacts() : Promise.resolve()).then(() => {\r\n return appMessagesManager_1.default.getConversations('', offsetIndex, loadCount, folderID);\r\n });\r\n this.loadDialogsPromise = getConversationPromise;\r\n const result = yield getConversationPromise;\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 || this.chatList.childElementCount == result.count) { // loaded all\r\n this.loadedAll = true;\r\n }\r\n this.log.debug('getDialogs ' + loadCount + ' dialogs by offset:', offsetIndex, result, this.chatList.childElementCount);\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 setListClickListener(list, onFound, withContext = false) {\r\n list.addEventListener('click', (e) => {\r\n utils_1.cancelEvent(e);\r\n this.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 if (withContext) {\r\n misc_1.attachContextMenuListener(list, this.contextMenu.onContextMenu);\r\n }\r\n }\r\n setDialogPosition(dialog, pos) {\r\n const dom = this.getDialogDom(dialog.peerID);\r\n if (!dom) {\r\n return;\r\n }\r\n if (pos === undefined) {\r\n pos = appMessagesManager_1.default.dialogsStorage.getDialog(dialog.peerID, this.filterID)[1];\r\n }\r\n if (utils_1.positionElementByIndex(dom.listEl, this.chatList, pos)) {\r\n this.scroll.reorder();\r\n this.log.debug('setDialogPosition:', dialog, dom, pos);\r\n }\r\n }\r\n /* public setPinnedDelimiter() {\r\n if(!USEPINNEDDELIMITER) return;\r\n \r\n let index = -1;\r\n let dialogs = appMessagesManager.dialogsStorage.getFolder(0);\r\n for(let dialog of dialogs) {\r\n if(dialog.pFlags?.pinned) {\r\n index++;\r\n }\r\n }\r\n \r\n let currentIndex = (this.pinnedDelimiter.parentElement && whichChild(this.pinnedDelimiter.parentElement)) ?? -1;\r\n \r\n if(index == currentIndex) return;\r\n \r\n let children = this.chatList.children;\r\n \r\n let modifying: HTMLElement[] = [];\r\n if(currentIndex != -1 && children.length > currentIndex) {\r\n let li = children[currentIndex] as HTMLElement;\r\n modifying.push(li);\r\n }\r\n \r\n if(index != -1 && children.length > index) {\r\n let li = children[index] as HTMLElement;\r\n modifying.push(li);\r\n li.append(this.pinnedDelimiter);\r\n } else {\r\n this.pinnedDelimiter.remove();\r\n }\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 if (!dom) {\r\n //this.log.error('no dom for dialog:', dialog, lastMessage, dom, highlightWord);\r\n return;\r\n }\r\n }\r\n if (lastMessage._ == 'messageEmpty' || (lastMessage._ == 'messageService' && !lastMessage.rReply)) {\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] == 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 var _a;\r\n const dom = this.getDialogDom(dialog.peerID);\r\n if (dialog.folder_id == 1) {\r\n this.accumulateArchivedUnread();\r\n }\r\n if (!dom) {\r\n //this.log.error('setUnreadMessages no dom!', dialog);\r\n return;\r\n }\r\n const isMuted = (((_a = dialog.notify_settings) === null || _a === void 0 ? void 0 : _a.mute_until) * 1000) > Date.now();\r\n dom.listEl.classList.toggle('is-muted', isMuted);\r\n const 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 const 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 const filter = appMessagesManager_1.default.filtersStorage.filters[this.filterID];\r\n let isPinned;\r\n if (filter) {\r\n isPinned = filter.pinned_peers.findIndex(peerID => peerID == dialog.peerID) !== -1;\r\n }\r\n else {\r\n isPinned = !!dialog.pFlags.pinned;\r\n }\r\n if (dialog.unread_count || dialog.pFlags.unread_mark) {\r\n //dom.unreadMessagesSpan.innerText = '' + (dialog.unread_count ? formatNumber(dialog.unread_count, 1) : ' ');\r\n dom.unreadMessagesSpan.innerText = '' + (dialog.unread_count || ' ');\r\n dom.unreadMessagesSpan.classList.add(isMuted ? 'unread-muted' : 'unread');\r\n }\r\n else if (isPinned) {\r\n dom.unreadMessagesSpan.classList.remove('unread', 'unread-muted');\r\n dom.unreadMessagesSpan.classList.add('tgico-pinnedchat');\r\n }\r\n }\r\n accumulateArchivedUnread() {\r\n if (this.accumulateArchivedTimeout)\r\n return;\r\n this.accumulateArchivedTimeout = window.setTimeout(() => {\r\n this.accumulateArchivedTimeout = 0;\r\n const dialogs = appMessagesManager_1.default.dialogsStorage.getFolder(1);\r\n const sum = dialogs.reduce((acc, dialog) => acc + dialog.unread_count, 0);\r\n utils_1.$rootScope.$broadcast('dialogs_archived_unread', { count: sum });\r\n }, 0);\r\n }\r\n getDialogDom(peerID) {\r\n return this.doms[peerID];\r\n }\r\n addDialog(_dialog, container, drawStatus = true, rippleEnabled = true, onlyFirstName = false, meAsSaved = true) {\r\n var _a;\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 (!container) {\r\n if (this.doms[peerID])\r\n return;\r\n const filter = appMessagesManager_1.default.filtersStorage.filters[this.filterID];\r\n if ((filter && !appMessagesManager_1.default.filtersStorage.testDialogForFilter(dialog, filter)) || (!filter && this.filterID != dialog.folder_id)) {\r\n return;\r\n }\r\n }\r\n let title = appPeersManager_1.default.getPeerTitle(peerID, false, onlyFirstName);\r\n let avatarEl = new avatar_1.default();\r\n avatarEl.setAttribute('dialog', meAsSaved ? '1' : '0');\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 == utils_1.$rootScope.myID && meAsSaved) {\r\n title = onlyFirstName ? 'Saved' : 'Saved Messages';\r\n }\r\n titleSpan.innerHTML = title;\r\n //p.classList.add('')\r\n // в других случаях иконка верификации не нужна (а первый - это главные чатлисты)\r\n if (!container) {\r\n let peer;\r\n // for muted icon\r\n titleSpan.classList.add('tgico');\r\n if (peerID < 0) {\r\n peer = appChatsManager_1.default.getChat(-peerID);\r\n }\r\n else {\r\n peer = appUsersManager_1.default.getUser(peerID);\r\n }\r\n if ((_a = peer === null || peer === void 0 ? void 0 : peer.pFlags) === null || _a === void 0 ? void 0 : _a.verified) {\r\n titleSpan.classList.add('is-verified');\r\n const i = document.createElement('i');\r\n i.classList.add('verified-icon');\r\n titleSpan.append(i);\r\n }\r\n }\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 ripple_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 /* let good = false;\r\n for(const folderID in this.chatLists) {\r\n if(this.chatLists[folderID] == container) {\r\n good = true;\r\n }\r\n } */\r\n if (!container /* || good */) {\r\n this.scroll.append(li);\r\n this.doms[dialog.peerID] = dom;\r\n if (utils_1.$rootScope.selectedPeerID == peerID) {\r\n li.classList.add('active');\r\n this.lastActiveListElement = li;\r\n }\r\n /* if(container) {\r\n container.append(li);\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 const dom = this.getDialogDom(dialog.peerID);\r\n if (!dom) {\r\n return;\r\n }\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 const 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 const dom = this.getDialogDom(dialog.peerID);\r\n if (!dom) {\r\n return;\r\n }\r\n dom.lastMessageSpan.classList.remove('user-typing');\r\n this.setLastMessage(dialog, null, dom);\r\n }\r\n}\r\nexports.AppDialogsManager = AppDialogsManager;\r\nconst appDialogsManager = new AppDialogsManager();\r\nexports.default = appDialogsManager;\r\n" - }, - { - "id": 17, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\ripple.ts", - "name": "./src/components/ripple.ts", - "index": 60, - "index2": 52, - "size": 4833, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "issuerId": 67, - "issuerName": "./src/index.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - } - ], - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "../../components/ripple", - "loc": "41:17-51" - }, - { - "moduleId": 16, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts", - "module": "./src/lib/appManagers/appDialogsManager.ts", - "moduleName": "./src/lib/appManagers/appDialogsManager.ts", - "type": "cjs require", - "userRequest": "../../components/ripple", - "loc": "32:17-51" - }, - { - "moduleId": 36, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popup.ts", - "module": "./src/components/popup.ts", - "moduleName": "./src/components/popup.ts", - "type": "cjs require", - "userRequest": "./ripple", - "loc": "8:17-36" - }, - { - "moduleId": 58, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\poll.ts", - "module": "./src/components/poll.ts", - "moduleName": "./src/components/poll.ts", - "type": "cjs require", - "userRequest": "./ripple", - "loc": "14:17-36" - }, - { - "moduleId": 67, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "module": "./src/index.ts", - "moduleName": "./src/index.ts", - "type": "cjs require", - "userRequest": "./components/ripple", - "loc": "148:68-98" - }, - { - "moduleId": 86, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\pollResults.ts", - "module": "./src/components/sidebarRight/pollResults.ts", - "moduleName": "./src/components/sidebarRight/pollResults.ts", - "type": "cjs require", - "userRequest": "../ripple", - "loc": "31:17-37" - }, - { - "moduleId": 95, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\chatFolders.ts", - "module": "./src/components/sidebarLeft/chatFolders.ts", - "moduleName": "./src/components/sidebarLeft/chatFolders.ts", - "type": "cjs require", - "userRequest": "../ripple", - "loc": "13:17-37" - }, - { - "moduleId": 96, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\editFolder.ts", - "module": "./src/components/sidebarLeft/editFolder.ts", - "moduleName": "./src/components/sidebarLeft/editFolder.ts", - "type": "cjs require", - "userRequest": "../ripple", - "loc": "32:17-37" - }, - { - "moduleId": 107, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\search.ts", - "module": "./src/components/chat/search.ts", - "moduleName": "./src/components/chat/search.ts", - "type": "cjs require", - "userRequest": "../ripple", - "loc": "30:17-37" - } - ], - "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.ripple = void 0;\r\nconst config_1 = 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 elem.classList.add('rp');\r\n let r = document.createElement('div');\r\n r.classList.add('c-ripple');\r\n const isSquare = elem.classList.contains('rp-square');\r\n if (isSquare) {\r\n r.classList.add('is-square');\r\n }\r\n const duration = isSquare ? 200 : 700;\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 drawRipple');\r\n handler = () => {\r\n let elapsedTime = Date.now() - startTime;\r\n if (elapsedTime < duration) {\r\n let delay = Math.max(duration - elapsedTime, duration / 2);\r\n setTimeout(() => span.classList.add('hiding'), Math.max(delay - duration / 2, 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 }, duration / 2);\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 touchStartFired = false;\r\n if (config_1.touchSupport) {\r\n let touchEnd = () => {\r\n handler && handler();\r\n };\r\n elem.addEventListener('touchstart', (e) => {\r\n //console.log('ripple touchstart', e);\r\n if (e.touches.length > 1 || (e.target.tagName == 'BUTTON' && e.target != elem)) {\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 }, { passive: true });\r\n }\r\n else {\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\n}\r\nexports.ripple = ripple;\r\n" - }, - { - "id": 18, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "name": "./src/components/wrappers.ts", - "index": 69, - "index2": 66, - "size": 31712, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "../../components/wrappers", - "loc": "22:19-55" - }, - { - "moduleId": 24, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", - "type": "cjs require", - "userRequest": "../../components/wrappers", - "loc": "49:19-55" - }, - { - "moduleId": 61, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popupStickers.ts", - "module": "./src/components/popupStickers.ts", - "moduleName": "./src/components/popupStickers.ts", - "type": "cjs require", - "userRequest": "./wrappers", - "loc": "10:19-40" - }, - { - "moduleId": 63, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\gifsMasonry.ts", - "module": "./src/components/gifsMasonry.ts", - "moduleName": "./src/components/gifsMasonry.ts", - "type": "cjs require", - "userRequest": "./wrappers", - "loc": "17:19-40" - }, - { - "moduleId": 84, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\audio.ts", - "module": "./src/components/audio.ts", - "moduleName": "./src/components/audio.ts", - "type": "cjs require", - "userRequest": "./wrappers", - "loc": "9:19-40" - }, - { - "moduleId": 85, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\stickers.ts", - "module": "./src/components/sidebarRight/stickers.ts", - "moduleName": "./src/components/sidebarRight/stickers.ts", - "type": "cjs require", - "userRequest": "../wrappers", - "loc": "34:19-41" - }, - { - "moduleId": 98, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\input.ts", - "module": "./src/components/chat/input.ts", - "moduleName": "./src/components/chat/input.ts", - "type": "cjs require", - "userRequest": "../wrappers", - "loc": "13:19-41" - }, - { - "moduleId": 102, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\stickers.ts", - "module": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "type": "cjs require", - "userRequest": "../../wrappers", - "loc": "36:19-44" - }, - { - "moduleId": 105, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\audio.ts", - "module": "./src/components/chat/audio.ts", - "moduleName": "./src/components/chat/audio.ts", - "type": "cjs require", - "userRequest": "../wrappers", - "loc": "13:19-41" - } - ], - "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.wrapPoll = exports.wrapAlbum = exports.wrapReply = exports.wrapSticker = exports.wrapPhoto = exports.wrapAudio = exports.wrapDocument = exports.formatDate = exports.wrapVideo = void 0;\r\nconst appPhotosManager_1 = __importDefault(require(\"../lib/appManagers/appPhotosManager\"));\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 = __importDefault(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 config_1 = require(\"../lib/config\");\r\nconst animationIntersector_1 = __importDefault(require(\"./animationIntersector\"));\r\nconst audio_1 = __importDefault(require(\"./audio\"));\r\nconst webpWorkerController_1 = __importDefault(require(\"../lib/webp/webpWorkerController\"));\r\nconst blob_1 = require(\"../helpers/blob\");\r\nconst appMediaPlaybackController_1 = __importDefault(require(\"./appMediaPlaybackController\"));\r\nconst cancellablePromise_1 = require(\"../helpers/cancellablePromise\");\r\nfunction wrapVideo({ doc, container, message, boxWidth, boxHeight, withTail, isOut, middleware, lazyLoadQueue, noInfo, group }) {\r\n var _a, _b;\r\n if (!noInfo) {\r\n if (doc.type != 'round') {\r\n let span, spanPlay;\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 }\r\n if (doc.mime_type == 'image/gif') {\r\n return wrapPhoto(doc, message, container, boxWidth, boxHeight, withTail, isOut, lazyLoadQueue, middleware);\r\n }\r\n /* const video = doc.type == 'round' ? appMediaPlaybackController.addMedia(doc, message.mid) as HTMLVideoElement : document.createElement('video');\r\n if(video.parentElement) {\r\n video.remove();\r\n } */\r\n const video = document.createElement('video');\r\n video.muted = true;\r\n video.setAttribute('playsinline', '');\r\n if (doc.type == 'round') {\r\n //video.muted = true;\r\n const globalVideo = appMediaPlaybackController_1.default.addMedia(doc, message.mid);\r\n video.addEventListener('canplay', () => {\r\n if (globalVideo.currentTime > 0) {\r\n video.currentTime = globalVideo.currentTime;\r\n }\r\n if (!globalVideo.paused) {\r\n // с закоментированными настройками - хром выключал видео при скролле, для этого нужно было включить видео - выйти из диалога, зайти заново и проскроллить вверх\r\n /* video.autoplay = true;\r\n video.loop = false; */\r\n video.play();\r\n }\r\n }, { once: true });\r\n const clear = () => {\r\n //console.log('clearing video');\r\n globalVideo.removeEventListener('timeupdate', onTimeUpdate);\r\n globalVideo.removeEventListener('play', onGlobalPlay);\r\n globalVideo.removeEventListener('pause', onGlobalPause);\r\n video.removeEventListener('play', onVideoPlay);\r\n video.removeEventListener('pause', onVideoPause);\r\n };\r\n const onTimeUpdate = () => {\r\n if (!utils_1.isInDOM(video)) {\r\n clear();\r\n }\r\n };\r\n const onGlobalPlay = () => {\r\n video.play();\r\n };\r\n const onGlobalPause = () => {\r\n video.pause();\r\n };\r\n const onVideoPlay = () => {\r\n globalVideo.play();\r\n };\r\n const onVideoPause = () => {\r\n //console.log('video pause event');\r\n if (utils_1.isInDOM(video)) {\r\n globalVideo.pause();\r\n }\r\n else {\r\n clear();\r\n }\r\n };\r\n globalVideo.addEventListener('timeupdate', onTimeUpdate);\r\n globalVideo.addEventListener('play', onGlobalPlay);\r\n globalVideo.addEventListener('pause', onGlobalPause);\r\n video.addEventListener('play', onVideoPlay);\r\n video.addEventListener('pause', onVideoPause);\r\n }\r\n else {\r\n video.autoplay = true; // для safari\r\n }\r\n let img;\r\n if (message) {\r\n if (doc.type == 'video' && ((_a = doc.thumbs) === null || _a === void 0 ? void 0 : _a.length)) {\r\n return wrapPhoto(doc, message, container, boxWidth, boxHeight, withTail, isOut, lazyLoadQueue, middleware);\r\n }\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 appPhotosManager_1.default.setAttachmentSize(doc, container, boxWidth, boxHeight, false, true);\r\n }\r\n if (((_b = doc.thumbs) === null || _b === void 0 ? void 0 : _b.length) && 'bytes' in doc.thumbs[0]) {\r\n appPhotosManager_1.default.setAttachmentPreview(doc.thumbs[0].bytes, container, false);\r\n }\r\n img = container.lastElementChild;\r\n if ((img === null || img === void 0 ? void 0 : img.tagName) != 'IMG') {\r\n container.append(img = new Image());\r\n }\r\n }\r\n if (img) {\r\n img.classList.add('thumbnail');\r\n }\r\n if (withTail) {\r\n const 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 }\r\n if (!(img === null || img === void 0 ? void 0 : img.parentElement)) {\r\n const gotThumb = appDocsManager_1.default.getThumb(doc, false);\r\n if (gotThumb) {\r\n gotThumb.promise.then(() => {\r\n video.poster = gotThumb.thumb.url;\r\n });\r\n }\r\n }\r\n if (!video.parentElement && container) {\r\n container.append(video);\r\n }\r\n const loadVideo = () => __awaiter(this, void 0, void 0, function* () {\r\n var _c;\r\n if (middleware && !middleware()) {\r\n return;\r\n }\r\n let preloader;\r\n if ((_c = message === null || message === void 0 ? void 0 : message.media) === null || _c === void 0 ? void 0 : _c.preloader) { // means upload\r\n preloader = message.media.preloader;\r\n preloader.attach(container, undefined, undefined, true);\r\n }\r\n else if (!doc.downloaded && !doc.supportsStreaming) {\r\n const promise = appDocsManager_1.default.downloadDocNew(doc);\r\n preloader = new preloader_1.default(container, true);\r\n preloader.attach(container, true, promise, true);\r\n /* video.addEventListener('canplay', () => {\r\n if(preloader) {\r\n preloader.detach();\r\n }\r\n }, {once: true}); */\r\n yield promise;\r\n }\r\n else if (doc.supportsStreaming) {\r\n preloader = new preloader_1.default(container, false);\r\n video.addEventListener('canplay', () => {\r\n preloader.detach();\r\n }, { once: true });\r\n }\r\n if (middleware && !middleware()) {\r\n return;\r\n }\r\n //console.log('loaded doc:', doc, doc.url, container);\r\n const deferred = cancellablePromise_1.deferredPromise();\r\n //if(doc.type == 'gif'/* || true */) {\r\n video.addEventListener('canplay', () => {\r\n if (img === null || img === void 0 ? void 0 : img.parentElement) {\r\n img.remove();\r\n }\r\n /* if(!video.paused) {\r\n video.pause();\r\n } */\r\n if (doc.type == 'gif' && group) {\r\n animationIntersector_1.default.addAnimation(video, group);\r\n }\r\n // test lazyLoadQueue\r\n //setTimeout(() => {\r\n deferred.resolve();\r\n //}, 5000);\r\n }, { once: true });\r\n //}\r\n video.addEventListener('error', deferred.reject);\r\n //if(doc.type != 'round') {\r\n misc_1.renderImageFromUrl(video, doc.url);\r\n //}\r\n /* if(!container.parentElement) {\r\n container.append(video);\r\n } */\r\n if (doc.type == 'gif' /* || true */) {\r\n video.muted = true;\r\n video.loop = true;\r\n //video.play();\r\n video.autoplay = true;\r\n }\r\n else if (doc.type == 'round') {\r\n video.dataset.ckin = 'circle';\r\n video.dataset.overlay = '1';\r\n new mediaPlayer_1.default(video);\r\n }\r\n return deferred;\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 \r\n let span = document.createElement('span');\r\n span.classList.add('btn-circle', 'tgico-download');\r\n downloadDiv.append(span);\r\n \r\n downloadDiv.addEventListener('click', () => {\r\n downloadDiv.remove();\r\n loadVideo();\r\n });\r\n \r\n container.prepend(downloadDiv);\r\n \r\n return;\r\n } */\r\n return /* doc.downloaded || */ !lazyLoadQueue /* && false */ ? loadVideo() : (lazyLoadQueue.push({ div: container, load: loadVideo /* , wasSeen: true */ }), Promise.resolve());\r\n}\r\nexports.wrapVideo = wrapVideo;\r\nexports.formatDate = (timestamp, monthShort = false, withYear = true) => {\r\n const months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'Octomber', 'November', 'December'];\r\n const date = new Date(timestamp * 1000);\r\n let month = months[date.getMonth()];\r\n if (monthShort)\r\n month = month.slice(0, 3);\r\n let str = month + ' ' + date.getDate();\r\n if (withYear) {\r\n str += ', ' + date.getFullYear();\r\n }\r\n return str + ' at ' + date.getHours() + ':' + ('0' + date.getMinutes()).slice(-2);\r\n};\r\nfunction wrapDocument(doc, withTime = false, uploading = false, mid) {\r\n if (doc.type == 'audio' || doc.type == 'voice') {\r\n return wrapAudio(doc, withTime, mid);\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 const icoDiv = document.createElement('div');\r\n icoDiv.classList.add('document-ico');\r\n if (doc.type == 'photo') {\r\n docDiv.classList.add('photo');\r\n if (uploading) {\r\n icoDiv.innerHTML = ``;\r\n }\r\n else {\r\n wrapPhoto(doc, null, icoDiv, 54, 54, false, null, null, null);\r\n icoDiv.style.width = icoDiv.style.height = '';\r\n }\r\n const img = icoDiv.querySelector('img');\r\n if (img)\r\n img.classList.add('document-thumb');\r\n }\r\n else {\r\n icoDiv.innerText = ext;\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 += ' · ' + exports.formatDate(doc.date);\r\n }\r\n docDiv.innerHTML = `\r\n ${!uploading ? `
` : ''}\r\n
${fileName}
\r\n
${size}
\r\n `;\r\n docDiv.prepend(icoDiv);\r\n if (!uploading) {\r\n let downloadDiv = docDiv.querySelector('.document-download');\r\n let preloader;\r\n let download;\r\n docDiv.addEventListener('click', () => {\r\n if (!download) {\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 download = appDocsManager_1.default.saveDocFile(doc);\r\n preloader.attach(downloadDiv, true, download);\r\n download.then(() => {\r\n downloadDiv.remove();\r\n }).catch(err => {\r\n if (err.name === 'AbortError') {\r\n download = null;\r\n }\r\n }).finally(() => {\r\n downloadDiv.classList.remove('downloading');\r\n });\r\n downloadDiv.classList.add('downloading');\r\n }\r\n else {\r\n download.cancel();\r\n }\r\n });\r\n }\r\n return docDiv;\r\n}\r\nexports.wrapDocument = wrapDocument;\r\nfunction wrapAudio(doc, withTime = false, mid) {\r\n let elem = new audio_1.default();\r\n elem.setAttribute('doc-id', doc.id);\r\n elem.setAttribute('with-time', '' + +withTime);\r\n elem.setAttribute('message-id', '' + mid);\r\n return elem;\r\n}\r\nexports.wrapAudio = wrapAudio;\r\nfunction wrapMediaWithTail(photo, message, container, boxWidth, boxHeight, isOut) {\r\n const 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 const foreignObject = document.createElementNS(\"http://www.w3.org/2000/svg\", 'foreignObject');\r\n appPhotosManager_1.default.setAttachmentSize(photo, foreignObject, boxWidth, boxHeight /* , false, true */);\r\n const width = +foreignObject.getAttributeNS(null, 'width');\r\n const 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 const clipID = 'clip' + message.mid;\r\n svg.dataset.clipID = clipID;\r\n const defs = document.createElementNS(\"http://www.w3.org/2000/svg\", 'defs');\r\n let clipPathHTML = '';\r\n if (message.message) {\r\n //clipPathHTML += ``;\r\n }\r\n else {\r\n if (isOut) {\r\n clipPathHTML += `\r\n \r\n \r\n `;\r\n }\r\n else {\r\n clipPathHTML += `\r\n \r\n \r\n `;\r\n }\r\n }\r\n defs.innerHTML = `${clipPathHTML}`;\r\n container.style.width = parseInt(container.style.width) - 9 + 'px';\r\n container.classList.add('with-tail');\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(photo, message, container, boxWidth = config_1.mediaSizes.active.regular.width, boxHeight = config_1.mediaSizes.active.regular.height, withTail, isOut, lazyLoadQueue, middleware, size = null) {\r\n var _a;\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 (boxWidth && boxHeight) { // !album\r\n size = appPhotosManager_1.default.setAttachmentSize(photo, container, boxWidth, boxHeight, false, true);\r\n }\r\n if (photo._ == 'document' || !photo.downloaded) {\r\n const thumbs = photo.sizes || photo.thumbs;\r\n if ((thumbs === null || thumbs === void 0 ? void 0 : thumbs.length) && 'bytes' in thumbs[0]) {\r\n appPhotosManager_1.default.setAttachmentPreview(thumbs[0].bytes, container, false);\r\n }\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 const cacheContext = appPhotosManager_1.default.getCacheContext(photo);\r\n let preloader;\r\n if ((_a = message === null || message === void 0 ? void 0 : message.media) === null || _a === void 0 ? void 0 : _a.preloader) { // means upload\r\n message.media.preloader.attach(container);\r\n }\r\n else if (!cacheContext.downloaded) {\r\n preloader = new preloader_1.default(container, false);\r\n }\r\n const load = () => {\r\n const promise = photo._ == 'document' && photo.animated ? appDocsManager_1.default.downloadDocNew(photo) : appPhotosManager_1.default.preloadPhoto(photo, 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, cacheContext.url || photo.url);\r\n });\r\n };\r\n return cacheContext.downloaded || !lazyLoadQueue ? load() : (lazyLoadQueue.push({ div: container, load: load, wasSeen: true }), Promise.resolve());\r\n}\r\nexports.wrapPhoto = wrapPhoto;\r\nfunction wrapSticker({ doc, div, middleware, lazyLoadQueue, group, play, onlyThumb, emoji, width, height, withThumb, loop }) {\r\n var _a;\r\n const stickerType = doc.sticker;\r\n if (!width) {\r\n width = !emoji ? 200 : undefined;\r\n }\r\n if (!height) {\r\n height = !emoji ? 200 : undefined;\r\n }\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 (((_a = doc.thumbs) === null || _a === void 0 ? void 0 : _a.length) && !div.firstElementChild && (!doc.downloaded || stickerType == 2 || onlyThumb) && toneIndex <= 0 /* && doc.thumbs[0]._ != 'photoSizeEmpty' */) {\r\n const thumb = doc.thumbs[0];\r\n //console.log('wrap sticker', thumb, div);\r\n let img;\r\n const afterRender = () => {\r\n if (!div.childElementCount) {\r\n div.append(img);\r\n }\r\n };\r\n if ('url' in thumb) {\r\n img = new Image();\r\n misc_1.renderImageFromUrl(img, thumb.url, afterRender);\r\n }\r\n else if ('bytes' in thumb) {\r\n img = new Image();\r\n if ((!config_1.isSafari || doc.pFlags.stickerThumbConverted || thumb.url) /* && false */) {\r\n misc_1.renderImageFromUrl(img, appPhotosManager_1.default.getPreviewURLFromThumb(thumb, true), afterRender);\r\n }\r\n else {\r\n webpWorkerController_1.default.convert(doc.id, thumb.bytes).then(bytes => {\r\n thumb.bytes = bytes;\r\n doc.pFlags.stickerThumbConverted = true;\r\n if (middleware && !middleware())\r\n return;\r\n if (!div.childElementCount) {\r\n misc_1.renderImageFromUrl(img, appPhotosManager_1.default.getPreviewURLFromThumb(thumb, true), afterRender);\r\n }\r\n }).catch(() => { });\r\n }\r\n }\r\n else if (stickerType == 2 && (withThumb || onlyThumb)) {\r\n img = new Image();\r\n const load = () => {\r\n if (div.childElementCount || (middleware && !middleware()))\r\n return;\r\n const r = () => {\r\n if (div.childElementCount || (middleware && !middleware()))\r\n return;\r\n misc_1.renderImageFromUrl(img, thumb.url, afterRender);\r\n };\r\n if (thumb.url) {\r\n r();\r\n return Promise.resolve();\r\n }\r\n else {\r\n return appDocsManager_1.default.getThumbURL(doc, thumb).promise.then(r);\r\n }\r\n };\r\n if (lazyLoadQueue && onlyThumb) {\r\n lazyLoadQueue.push({ div, load });\r\n return Promise.resolve();\r\n }\r\n else {\r\n load();\r\n }\r\n }\r\n }\r\n if (onlyThumb) { // for sticker panel\r\n return Promise.resolve();\r\n }\r\n let downloaded = doc.downloaded;\r\n let load = () => __awaiter(this, void 0, void 0, function* () {\r\n if (middleware && !middleware())\r\n return;\r\n if (stickerType == 2) {\r\n /* if(doc.id == '1860749763008266301') {\r\n console.log('loaded sticker:', doc, div);\r\n } */\r\n //console.time('download sticker' + doc.id);\r\n //appDocsManager.downloadDocNew(doc.id).promise.then(res => res.json()).then(async(json) => {\r\n //fetch(doc.url).then(res => res.json()).then(async(json) => {\r\n /* return */ yield appDocsManager_1.default.downloadDocNew(doc)\r\n .then(blob_1.readBlobAsText)\r\n .then(JSON.parse)\r\n .then((json) => __awaiter(this, void 0, void 0, function* () {\r\n //console.timeEnd('download sticker' + doc.id);\r\n //console.log('loaded sticker:', doc, div/* , blob */);\r\n if (middleware && !middleware())\r\n return;\r\n let animation = yield lottieLoader_1.default.loadAnimationWorker /* loadAnimation */({\r\n container: div,\r\n loop: loop && !emoji,\r\n autoplay: play,\r\n animationData: json,\r\n width,\r\n height\r\n }, group, toneIndex);\r\n //const deferred = deferredPromise();\r\n animation.addListener('firstFrame', () => {\r\n if (div.firstElementChild && div.firstElementChild.tagName == 'IMG') {\r\n div.firstElementChild.remove();\r\n }\r\n else {\r\n animation.canvas.classList.add('fade-in');\r\n }\r\n //deferred.resolve();\r\n }, true);\r\n if (emoji) {\r\n div.addEventListener('click', () => {\r\n let animation = lottieLoader_1.default.getAnimation(div);\r\n if (animation.paused) {\r\n animation.restart();\r\n }\r\n });\r\n }\r\n //return deferred;\r\n //await new Promise((resolve) => setTimeout(resolve, 5e3));\r\n }));\r\n //console.timeEnd('render sticker' + doc.id);\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.classList.add('fade-in-transition');\r\n img.style.opacity = '0';\r\n img.addEventListener('load', () => {\r\n doc.downloaded = true;\r\n window.requestAnimationFrame(() => {\r\n img.style.opacity = '';\r\n });\r\n });\r\n }\r\n const r = () => {\r\n if (middleware && !middleware())\r\n return;\r\n misc_1.renderImageFromUrl(img, doc.url, () => {\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 if (doc.url)\r\n r();\r\n else {\r\n appDocsManager_1.default.downloadDocNew(doc).then(r);\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, isPinned) {\r\n const prefix = isPinned ? 'pinned-message' : 'reply';\r\n const div = document.createElement('div');\r\n div.classList.add(prefix);\r\n const replyBorder = document.createElement('div');\r\n replyBorder.classList.add(prefix + '-border');\r\n const replyContent = document.createElement('div');\r\n replyContent.classList.add(prefix + '-content');\r\n const replyTitle = document.createElement('div');\r\n replyTitle.classList.add(prefix + '-title');\r\n const replySubtitle = document.createElement('div');\r\n replySubtitle.classList.add(prefix + '-subtitle');\r\n replyTitle.innerHTML = title ? richtextprocessor_1.RichTextProcessor.wrapEmojiText(title) : '';\r\n const media = message && message.media;\r\n if (media) {\r\n replySubtitle.innerHTML = message.rReply;\r\n //console.log('wrap reply', media);\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(prefix + '-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-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 const items = [];\r\n // !higher msgID will be the FIRST in album\r\n const storage = Object.keys(appMessagesManager_1.default.groupedMessagesStorage[groupID]).map(id => +id).sort((a, b) => a - b);\r\n for (const mid of storage) {\r\n const m = appMessagesManager_1.default.getMessage(mid);\r\n const media = m.media.photo || m.media.document;\r\n const 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 const spacing = 2;\r\n const layouter = new groupedLayout_1.Layouter(items.map(i => ({ w: i.size.w, h: i.size.h })), config_1.mediaSizes.active.album.width, 100, spacing);\r\n const 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 (const { geometry, sides } of layout) {\r\n const item = items.shift();\r\n if (!item) {\r\n console.error('no item for layout!');\r\n continue;\r\n }\r\n const { size, media, message } = item;\r\n const 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, 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 const 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": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\storage.ts", - "name": "./src/lib/storage.ts", - "index": 11, - "index2": 11, - "size": 6067, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "issuerId": 67, - "issuerName": "./src/index.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - } - ], - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 2, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts", - "module": "./src/lib/mtproto/mtprotoworker.ts", - "moduleName": "./src/lib/mtproto/mtprotoworker.ts", - "type": "cjs require", - "userRequest": "../storage", - "loc": "7:34-55" - }, - { - "moduleId": 7, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "module": "./src/lib/appManagers/appMessagesManager.ts", - "moduleName": "./src/lib/appManagers/appMessagesManager.ts", - "type": "cjs require", - "userRequest": "../storage", - "loc": "25:34-55" - }, - { - "moduleId": 27, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appProfileManager.ts", - "module": "./src/lib/appManagers/appProfileManager.ts", - "moduleName": "./src/lib/appManagers/appProfileManager.ts", - "type": "cjs require", - "userRequest": "../storage", - "loc": "24:34-55" - }, - { - "moduleId": 34, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 40, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appStateManager.ts", - "module": "./src/lib/appManagers/appStateManager.ts", - "moduleName": "./src/lib/appManagers/appStateManager.ts", - "type": "cjs require", - "userRequest": "../storage", - "loc": "7:34-55" - }, - { - "moduleId": 44, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 67, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "module": "./src/index.ts", - "moduleName": "./src/index.ts", - "type": "cjs require", - "userRequest": "./lib/storage", - "loc": "65:50-74" - }, - { - "moduleId": 82, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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\nconst context_1 = require(\"../helpers/context\");\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\nclass AppStorage {\r\n constructor() {\r\n this.taskID = 0;\r\n this.tasks = {};\r\n //private log = (...args: any[]) => console.log('[SW LS]', ...args);\r\n this.log = (...args) => { };\r\n if (mtproto_config_1.Modes.test) {\r\n this.setPrefix('t_');\r\n }\r\n if (!context_1.isWorker) {\r\n this.configStorage = new ConfigStorage();\r\n }\r\n }\r\n setPrefix(newPrefix) {\r\n if (this.configStorage) {\r\n this.configStorage.keyPrefix = newPrefix;\r\n }\r\n }\r\n noPrefix() {\r\n if (this.configStorage) {\r\n this.configStorage.noPrefix = true;\r\n }\r\n }\r\n finishTask(taskID, result) {\r\n this.log('finishTask:', taskID, result, Object.keys(this.tasks));\r\n if (!this.tasks.hasOwnProperty(taskID)) {\r\n this.log('no such task:', taskID, result);\r\n return;\r\n }\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 (context_1.isWorker) {\r\n const taskID = this.taskID++;\r\n this.tasks[taskID] = resolve;\r\n const task = { useLs: true, task: methodName, taskID, args: _args };\r\n context_1.notifySomeone(task);\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 this.configStorage[methodName].apply(this.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": 20, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\lottieLoader.ts", - "name": "./src/lib/lottieLoader.ts", - "index": 35, - "index2": 29, - "size": 25080, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageAuthCode.ts", - "issuerId": 79, - "issuerName": "./src/pages/pageAuthCode.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 49, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "name": "./src/pages/pageSignIn.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 79, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageAuthCode.ts", - "name": "./src/pages/pageAuthCode.ts", - "profile": { - "factory": 104, - "building": 1053, - "dependencies": 527 - } - } - ], - "profile": { - "factory": 575, - "building": 2297, - "dependencies": 2 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 15, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\animationIntersector.ts", - "module": "./src/components/animationIntersector.ts", - "moduleName": "./src/components/animationIntersector.ts", - "type": "cjs require", - "userRequest": "../lib/lottieLoader", - "loc": "5:23-53" - }, - { - "moduleId": 18, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "module": "./src/components/wrappers.ts", - "moduleName": "./src/components/wrappers.ts", - "type": "cjs require", - "userRequest": "../lib/lottieLoader", - "loc": "17:39-69" - }, - { - "moduleId": 66, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 79, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 81, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pagesManager.ts", - "module": "./src/pages/pagesManager.ts", - "moduleName": "./src/pages/pagesManager.ts", - "type": "cjs require", - "userRequest": "../lib/lottieLoader", - "loc": "7:39-69" - }, - { - "moduleId": 95, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\chatFolders.ts", - "module": "./src/components/sidebarLeft/chatFolders.ts", - "moduleName": "./src/components/sidebarLeft/chatFolders.ts", - "type": "cjs require", - "userRequest": "../../lib/lottieLoader", - "loc": "6:39-72" - }, - { - "moduleId": 96, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\editFolder.ts", - "module": "./src/components/sidebarLeft/editFolder.ts", - "moduleName": "./src/components/sidebarLeft/editFolder.ts", - "type": "cjs require", - "userRequest": "../../lib/lottieLoader", - "loc": "26:39-72" - }, - { - "moduleId": 102, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\stickers.ts", - "module": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "type": "cjs require", - "userRequest": "../../../lib/lottieLoader", - "loc": "40:39-75" - } - ], - "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.RLottiePlayer = void 0;\r\nconst config_1 = require(\"./config\");\r\nconst logger_1 = require(\"./logger\");\r\nconst animationIntersector_1 = __importDefault(require(\"../components/animationIntersector\"));\r\nconst mtprotoworker_1 = __importDefault(require(\"./mtproto/mtprotoworker\"));\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, worker, options }) {\r\n this.reqId = 0;\r\n this.width = 0;\r\n this.height = 0;\r\n this.listeners = {};\r\n this.listenerResults = {};\r\n this.paused = true;\r\n //public paused = false;\r\n this.direction = 1;\r\n this.speed = 1;\r\n this.autoplay = true;\r\n this.loop = true;\r\n this.group = '';\r\n //private caching = false;\r\n //private removed = false;\r\n this.frames = {};\r\n this.cachingDelta = 0;\r\n this.reqId = ++RLottiePlayer['reqId'];\r\n this.el = el;\r\n this.worker = worker;\r\n for (let i in options) {\r\n if (this.hasOwnProperty(i)) {\r\n // @ts-ignore\r\n this[i] = options[i];\r\n }\r\n }\r\n const pixelRatio = window.devicePixelRatio;\r\n if (pixelRatio > 1) {\r\n //this.cachingEnabled = true;//this.width < 100 && this.height < 100;\r\n if (options.needUpscale) {\r\n this.width = Math.round(this.width * pixelRatio);\r\n this.height = Math.round(this.height * pixelRatio);\r\n }\r\n else if (pixelRatio > 1 && this.width > 100 && this.height > 100) {\r\n if (config_1.isApple || !config_1.mediaSizes.isMobile) {\r\n /* this.width = Math.round(this.width * (pixelRatio - 1));\r\n this.height = Math.round(this.height * (pixelRatio - 1)); */\r\n this.width = Math.round(this.width * pixelRatio);\r\n this.height = Math.round(this.height * pixelRatio);\r\n }\r\n else if (pixelRatio > 2.5) {\r\n this.width = Math.round(this.width * (pixelRatio - 1.5));\r\n this.height = Math.round(this.height * (pixelRatio - 1.5));\r\n }\r\n }\r\n }\r\n if (!options.noCache) {\r\n // проверка на размер уже после скейлинга, сделано для попапа и сайдбарfа, где стикеры 80х80 и 68х68, туда нужно 75%\r\n if (config_1.isApple && this.width > 100 && this.height > 100) {\r\n this.cachingDelta = 2; //2 // 50%\r\n }\r\n else if (this.width < 100 && this.height < 100) {\r\n this.cachingDelta = Infinity; // 100%\r\n }\r\n else {\r\n this.cachingDelta = 4; // 75%\r\n }\r\n }\r\n // if(isApple) {\r\n // this.cachingDelta = 0; //2 // 50%\r\n // }\r\n /* this.width *= 0.8;\r\n this.height *= 0.8; */\r\n //console.log(\"RLottiePlayer width:\", this.width, this.height, options);\r\n this.canvas = document.createElement('canvas');\r\n this.canvas.classList.add('rlottie');\r\n this.canvas.width = this.width;\r\n this.canvas.height = this.height;\r\n this.context = this.canvas.getContext('2d');\r\n this.clamped = new Uint8ClampedArray(this.width * this.height * 4);\r\n this.imageData = new ImageData(this.width, this.height);\r\n }\r\n clearCache() {\r\n this.frames = {};\r\n }\r\n addListener(name, callback, once) {\r\n var _a;\r\n ((_a = this.listeners[name]) !== null && _a !== void 0 ? _a : (this.listeners[name] = [])).push({ callback, once });\r\n if (this.listenerResults.hasOwnProperty(name)) {\r\n callback(this.listenerResults[name]);\r\n if (once) {\r\n this.removeListener(name, callback);\r\n }\r\n }\r\n }\r\n removeListener(name, callback) {\r\n if (this.listeners[name]) {\r\n this.listeners[name].findAndSplice(l => l.callback == callback);\r\n }\r\n }\r\n setListenerResult(name, value) {\r\n this.listenerResults[name] = value;\r\n if (this.listeners[name]) {\r\n this.listeners[name].forEach(listener => {\r\n listener.callback(value);\r\n if (listener.once) {\r\n this.removeListener(name, listener.callback);\r\n }\r\n });\r\n }\r\n }\r\n sendQuery(methodName, ...args) {\r\n //console.trace('RLottie sendQuery:', methodName);\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 //console.log('RLOTTIE PLAY' + this.reqId);\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 clearTimeout(this.rafId);\r\n //window.cancelAnimationFrame(this.rafId);\r\n }\r\n stop(renderFirstFrame = true) {\r\n this.pause();\r\n this.curFrame = this.direction == 1 ? 0 : this.frameCount;\r\n if (renderFirstFrame) {\r\n this.requestFrame(this.curFrame);\r\n //this.sendQuery('renderFrame', this.curFrame);\r\n }\r\n }\r\n restart() {\r\n this.stop(false);\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 remove() {\r\n //alert('remove');\r\n lottieLoader.onDestroy(this.reqId);\r\n this.pause();\r\n this.sendQuery('destroy');\r\n //this.removed = true;\r\n }\r\n renderFrame2(frame, frameNo) {\r\n /* this.setListenerResult('enterFrame', frameNo);\r\n return; */\r\n try {\r\n this.imageData.data.set(frame);\r\n //this.context.putImageData(new ImageData(frame, this.width, this.height), 0, 0);\r\n this.context.putImageData(this.imageData, 0, 0);\r\n }\r\n catch (err) {\r\n console.error('RLottiePlayer renderFrame error:', err /* , frame */, this.width, this.height);\r\n this.autoplay = false;\r\n this.pause();\r\n return;\r\n }\r\n //console.log('set result enterFrame', frameNo);\r\n this.setListenerResult('enterFrame', frameNo);\r\n }\r\n renderFrame(frame, frameNo) {\r\n //console.log('renderFrame', frameNo, this);\r\n if (this.cachingDelta && (frameNo % this.cachingDelta || !frameNo) && !this.frames[frameNo]) {\r\n this.frames[frameNo] = new Uint8ClampedArray(frame); //frame;\r\n }\r\n /* if(!this.listenerResults.hasOwnProperty('cached')) {\r\n this.setListenerResult('enterFrame', frameNo);\r\n if(frameNo == (this.frameCount - 1)) {\r\n this.setListenerResult('cached');\r\n }\r\n \r\n return;\r\n } */\r\n if (this.frInterval) {\r\n const now = Date.now(), delta = now - this.frThen;\r\n //console.log(`renderFrame delta${this.reqId}:`, this, delta, this.frInterval);\r\n if (delta < 0) {\r\n if (this.rafId)\r\n clearTimeout(this.rafId);\r\n return this.rafId = window.setTimeout(() => {\r\n this.renderFrame2(frame, frameNo);\r\n }, this.frInterval > -delta ? -delta % this.frInterval : this.frInterval);\r\n //await new Promise((resolve) => setTimeout(resolve, -delta % this.frInterval));\r\n }\r\n }\r\n this.renderFrame2(frame, frameNo);\r\n }\r\n requestFrame(frameNo) {\r\n if (this.frames[frameNo]) {\r\n this.renderFrame(this.frames[frameNo], frameNo);\r\n }\r\n else if (config_1.isSafari) {\r\n this.sendQuery('renderFrame', frameNo);\r\n }\r\n else {\r\n if (!this.clamped.length) { // fix detached\r\n this.clamped = new Uint8ClampedArray(this.width * this.height * 4);\r\n }\r\n this.sendQuery('renderFrame', frameNo, this.clamped);\r\n }\r\n }\r\n mainLoopForwards() {\r\n this.requestFrame(this.curFrame++);\r\n if (this.curFrame >= this.frameCount) {\r\n //this.playedTimes++;\r\n if (!this.loop) {\r\n this.pause();\r\n return false;\r\n }\r\n this.curFrame = 0;\r\n }\r\n return true;\r\n }\r\n mainLoopBackwards() {\r\n this.requestFrame(this.curFrame--);\r\n if (this.curFrame < 0) {\r\n //this.playedTimes++;\r\n if (!this.loop) {\r\n this.pause();\r\n return false;\r\n }\r\n this.curFrame = this.frameCount - 1;\r\n }\r\n return true;\r\n }\r\n setMainLoop() {\r\n //window.cancelAnimationFrame(this.rafId);\r\n clearTimeout(this.rafId);\r\n this.frInterval = 1000 / this.fps / this.speed;\r\n this.frThen = Date.now() - this.frInterval;\r\n //console.trace('setMainLoop', this.frInterval, this.direction, this, JSON.stringify(this.listenerResults), this.listenerResults);\r\n const method = (this.direction == 1 ? this.mainLoopForwards : this.mainLoopBackwards).bind(this);\r\n this.currentMethod = method;\r\n //this.frameListener && this.removeListener('enterFrame', this.frameListener);\r\n //setTimeout(() => {\r\n //this.addListener('enterFrame', this.frameListener);\r\n //}, 0);\r\n if (this.frameListener && this.listenerResults.hasOwnProperty('enterFrame')) {\r\n this.frameListener();\r\n }\r\n //this.mainLoop(method);\r\n //this.r(method);\r\n //method();\r\n }\r\n onLoad(frameCount, fps) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n this.curFrame = this.direction == 1 ? 0 : frameCount - 1;\r\n this.frameCount = frameCount;\r\n this.fps = fps;\r\n this.frInterval = 1000 / this.fps / this.speed;\r\n this.frThen = Date.now() - this.frInterval;\r\n //this.sendQuery('renderFrame', 0);\r\n // Кешировать сразу не получится, рендер стикера (тайгер) занимает 519мс, \r\n // если рендерить 75% с получением каждого кадра из воркера, будет 475мс, т.е. при 100% было бы 593мс, потеря на передаче 84мс. \r\n /* console.time('cache' + this.reqId);\r\n for(let i = 0; i < frameCount; ++i) {\r\n //if(this.removed) return;\r\n \r\n if(i % 4) {\r\n await new Promise((resolve) => {\r\n delete this.listenerResults.enterFrame;\r\n this.addListener('enterFrame', resolve, true);\r\n this.requestFrame(i);\r\n });\r\n }\r\n }\r\n \r\n console.timeEnd('cache' + this.reqId); */\r\n //console.log('cached');\r\n //return;\r\n this.requestFrame(0);\r\n this.setListenerResult('ready');\r\n this.addListener('enterFrame', () => {\r\n this.setListenerResult('firstFrame');\r\n this.el.appendChild(this.canvas);\r\n //console.log('enterFrame firstFrame');\r\n //let lastTime = this.frThen;\r\n this.frameListener = () => {\r\n if (this.paused) {\r\n return;\r\n }\r\n const time = Date.now();\r\n //console.log(`enterFrame handle${this.reqId}`, time, (time - lastTime), this.frInterval);\r\n /* if(Math.round(time - lastTime + this.frInterval * 0.25) < Math.round(this.frInterval)) {\r\n return;\r\n } */\r\n //lastTime = time;\r\n this.frThen = time + this.frInterval;\r\n const canContinue = this.currentMethod();\r\n if (!canContinue && !this.loop && this.autoplay) {\r\n this.autoplay = false;\r\n }\r\n };\r\n this.addListener('enterFrame', this.frameListener);\r\n }, true);\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 //return;\r\n //console.log('worker onmessage', event.data);\r\n if (event.data instanceof Object &&\r\n event.data.hasOwnProperty('queryMethodListener') &&\r\n event.data.hasOwnProperty('queryMethodArguments')) {\r\n /* if(event.data.queryMethodListener == 'frame') {\r\n return;\r\n } */\r\n this.listeners[event.data.queryMethodListener](...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 var args = Array.prototype.slice.call(arguments, 1);\r\n if (config_1.isSafari) {\r\n this.worker.postMessage({\r\n 'queryMethod': queryMethod,\r\n 'queryMethodArguments': args\r\n });\r\n }\r\n else {\r\n var transfer = [];\r\n for (var i = 0; i < args.length; i++) {\r\n if (args[i] instanceof ArrayBuffer) {\r\n transfer.push(args[i]);\r\n }\r\n if (args[i].buffer && args[i].buffer instanceof ArrayBuffer) {\r\n transfer.push(args[i].buffer);\r\n }\r\n }\r\n //console.log('transfer', transfer);\r\n this.worker.postMessage({\r\n 'queryMethod': queryMethod,\r\n 'queryMethodArguments': args\r\n }, transfer);\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.workers = [];\r\n this.curWorkerNum = 0;\r\n this.log = logger_1.logger('LOTTIE', logger_1.LogLevels.error);\r\n }\r\n getAnimation(element) {\r\n for (let i in this.players) {\r\n if (this.players[i].el == element) {\r\n return this.players[i];\r\n }\r\n }\r\n return null;\r\n }\r\n loadLottieWorkers() {\r\n if (typeof (WebAssembly) === 'undefined')\r\n return Promise.reject();\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 this.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 this.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[Math.max(toneIndex - 1, 0)];\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 loadAnimationFromURL(params, url) {\r\n if (!this.loaded) {\r\n this.loadLottieWorkers();\r\n }\r\n return fetch(url)\r\n .then(res => res.arrayBuffer())\r\n .then(data => mtprotoworker_1.default.gzipUncompress(data, true))\r\n .then(str => {\r\n return this.loadAnimationWorker(Object.assign(params, { animationData: JSON.parse(str), needUpscale: true }));\r\n });\r\n }\r\n loadAnimationWorker(params, group = '', toneIndex = -1) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n //params.autoplay = true;\r\n if (toneIndex >= 1 && toneIndex <= 5) {\r\n params.animationData = utils_1.copy(params.animationData);\r\n this.applyReplacements(params.animationData, toneIndex);\r\n }\r\n if (!this.loaded) {\r\n yield this.loadLottieWorkers();\r\n }\r\n if (!params.width || !params.height) {\r\n params.width = parseInt(params.container.style.width);\r\n params.height = parseInt(params.container.style.height);\r\n }\r\n if (!params.width || !params.height) {\r\n throw new Error('No size for sticker!');\r\n }\r\n params.group = group;\r\n const player = this.initPlayer(params.container, params);\r\n animationIntersector_1.default.addAnimation(player, group);\r\n return player;\r\n });\r\n }\r\n onPlayerLoaded(reqId, frameCount, fps) {\r\n const rlPlayer = this.players[reqId];\r\n if (!rlPlayer) {\r\n this.log.warn('onPlayerLoaded on destroyed player:', reqId, frameCount);\r\n return;\r\n }\r\n this.log.debug('onPlayerLoaded');\r\n rlPlayer.onLoad(frameCount, fps);\r\n //rlPlayer.addListener('firstFrame', () => {\r\n //animationIntersector.addAnimation(player, group);\r\n //}, true);\r\n }\r\n onFrame(reqId, frameNo, frame) {\r\n const rlPlayer = this.players[reqId];\r\n if (!rlPlayer) {\r\n this.log.warn('onFrame on destroyed player:', reqId, frameNo);\r\n return;\r\n }\r\n rlPlayer.clamped = frame;\r\n rlPlayer.renderFrame(frame, frameNo);\r\n }\r\n onDestroy(reqId) {\r\n delete this.players[reqId];\r\n }\r\n destroyWorkers() {\r\n this.workers.forEach((worker, idx) => {\r\n worker.terminate();\r\n this.log('worker #' + idx + ' terminated');\r\n });\r\n this.log('workers destroyed');\r\n this.workers.length = 0;\r\n }\r\n initPlayer(el, options) {\r\n const rlPlayer = new RLottiePlayer({\r\n el,\r\n worker: this.workers[this.curWorkerNum++],\r\n options\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(options.animationData);\r\n return rlPlayer;\r\n }\r\n }\r\n // https://github.com/telegramdesktop/tdesktop/blob/35e575c2d7b56446be95561e4565628859fb53d3/Telegram/SourceFiles/chat_helpers/stickers_emoji_pack.cpp#L65\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 [0xf77e41, 0x291c12],\r\n [0xffb139, 0x472a22],\r\n [0xffd140, 0x573b30],\r\n [0xffdf79, 0x68493c],\r\n ]\r\n ];\r\n return LottieLoader;\r\n})();\r\nconst lottieLoader = new LottieLoader();\r\n// @ts-ignore\r\nif (process.env.NODE_ENV != 'production') {\r\n window.lottieLoader = lottieLoader;\r\n}\r\nexports.default = lottieLoader;\r\n" - }, - { - "id": 21, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\lazyLoadQueue.ts", - "name": "./src/components/lazyLoadQueue.ts", - "index": 65, - "index2": 58, - "size": 9700, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "../../components/lazyLoadQueue", - "loc": "29:40-81" - }, - { - "moduleId": 24, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", - "type": "cjs require", - "userRequest": "../../components/lazyLoadQueue", - "loc": "48:40-81" - }, - { - "moduleId": 47, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\index.ts", - "module": "./src/components/emoticonsDropdown/index.ts", - "moduleName": "./src/components/emoticonsDropdown/index.ts", - "type": "cjs require", - "userRequest": "../lazyLoadQueue", - "loc": "16:40-67" - }, - { - "moduleId": 56, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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:24-65" - }, - { - "moduleId": 61, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popupStickers.ts", - "module": "./src/components/popupStickers.ts", - "moduleName": "./src/components/popupStickers.ts", - "type": "cjs require", - "userRequest": "./lazyLoadQueue", - "loc": "11:40-66" - }, - { - "moduleId": 63, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\gifsMasonry.ts", - "module": "./src/components/gifsMasonry.ts", - "moduleName": "./src/components/gifsMasonry.ts", - "type": "cjs require", - "userRequest": "./lazyLoadQueue", - "loc": "19:24-50" - }, - { - "moduleId": 85, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\stickers.ts", - "module": "./src/components/sidebarRight/stickers.ts", - "moduleName": "./src/components/sidebarRight/stickers.ts", - "type": "cjs require", - "userRequest": "../lazyLoadQueue", - "loc": "27:40-67" - }, - { - "moduleId": 102, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\stickers.ts", - "module": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "type": "cjs require", - "userRequest": "../../lazyLoadQueue", - "loc": "47:24-54" - } - ], - "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.LazyLoadQueueRepeat2 = exports.LazyLoadQueueRepeat = exports.LazyLoadQueueIntersector = exports.LazyLoadQueueBase = void 0;\r\nconst logger_1 = require(\"../lib/logger\");\r\nconst visibilityIntersector_1 = __importDefault(require(\"./visibilityIntersector\"));\r\nconst PARALLEL_LIMIT = 5;\r\nclass LazyLoadQueueBase {\r\n constructor(parallelLimit = PARALLEL_LIMIT) {\r\n this.parallelLimit = parallelLimit;\r\n this.queue = [];\r\n this.inProcess = new Set();\r\n this.lockPromise = null;\r\n this.unlockResolve = null;\r\n this.log = logger_1.logger('LL', logger_1.LogLevels.error);\r\n }\r\n clear() {\r\n this.inProcess.clear(); // ацтеки забьются, будет плохо\r\n this.queue.length = 0;\r\n // unreachable code\r\n /* for(let item of this.inProcess) {\r\n this.lazyLoadMedia.push(item);\r\n } */\r\n }\r\n lock() {\r\n if (this.lockPromise)\r\n return;\r\n const perf = performance.now();\r\n this.lockPromise = new Promise((resolve, reject) => {\r\n this.unlockResolve = resolve;\r\n });\r\n this.lockPromise.then(() => {\r\n this.log('was locked for:', performance.now() - perf);\r\n });\r\n }\r\n unlock() {\r\n if (!this.unlockResolve)\r\n return;\r\n this.unlockResolve();\r\n this.unlockResolve = this.lockPromise = null;\r\n this.processQueue();\r\n }\r\n processItem(item) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (this.lockPromise) {\r\n return;\r\n }\r\n this.inProcess.add(item);\r\n this.log('will load media', this.lockPromise, item);\r\n try {\r\n //await new Promise((resolve) => setTimeout(resolve, 2e3));\r\n //await new Promise((resolve, reject) => window.requestAnimationFrame(() => window.requestAnimationFrame(resolve)));\r\n //await item.load(item.div);\r\n yield this.loadItem(item);\r\n }\r\n catch (err) {\r\n this.log.error('loadMediaQueue error:', err /* , item */);\r\n }\r\n this.inProcess.delete(item);\r\n this.log('loaded media', item);\r\n this.processQueue();\r\n });\r\n }\r\n loadItem(item) {\r\n return item.load();\r\n }\r\n getItem() {\r\n return this.queue.shift();\r\n }\r\n addElement(method, el) {\r\n this.queue[method](el);\r\n this.processQueue();\r\n }\r\n processQueue(item) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (!this.queue.length || this.lockPromise || (this.parallelLimit > 0 && this.inProcess.size >= this.parallelLimit))\r\n return;\r\n do {\r\n if (item) {\r\n this.queue.findAndSplice(i => i == item);\r\n }\r\n else {\r\n item = this.getItem();\r\n }\r\n if (item) {\r\n this.processItem(item);\r\n }\r\n else {\r\n break;\r\n }\r\n item = null;\r\n } while (this.inProcess.size < this.parallelLimit && this.queue.length);\r\n });\r\n }\r\n push(el) {\r\n this.addElement('push', el);\r\n }\r\n unshift(el) {\r\n this.addElement('unshift', el);\r\n }\r\n}\r\nexports.LazyLoadQueueBase = LazyLoadQueueBase;\r\nclass LazyLoadQueueIntersector extends LazyLoadQueueBase {\r\n constructor(parallelLimit = PARALLEL_LIMIT) {\r\n super(parallelLimit);\r\n this.parallelLimit = parallelLimit;\r\n this.queue = [];\r\n this.inProcess = new Set();\r\n }\r\n lock() {\r\n super.lock();\r\n this.intersector.lock();\r\n }\r\n unlock() {\r\n super.unlock();\r\n this.intersector.unlock();\r\n }\r\n unlockAndRefresh() {\r\n super.unlock();\r\n this.intersector.unlockAndRefresh();\r\n }\r\n clear() {\r\n super.clear();\r\n this.intersector.disconnect();\r\n }\r\n refresh() {\r\n this.intersector.refresh();\r\n }\r\n loadItem(item) {\r\n return item.load(item.div);\r\n }\r\n addElement(method, el) {\r\n const item = this.queue.find(i => i.div == el.div);\r\n if (item) {\r\n return false;\r\n }\r\n else {\r\n for (const item of this.inProcess) {\r\n if (item.div == el.div) {\r\n return false;\r\n }\r\n }\r\n }\r\n this.queue[method](el);\r\n return true;\r\n }\r\n setProcessQueueTimeout() {\r\n if (!this.intersectorTimeout) {\r\n this.intersectorTimeout = window.setTimeout(() => {\r\n this.intersectorTimeout = 0;\r\n this.processQueue();\r\n }, 0);\r\n }\r\n }\r\n push(el) {\r\n super.push(el);\r\n }\r\n unshift(el) {\r\n super.unshift(el);\r\n }\r\n}\r\nexports.LazyLoadQueueIntersector = LazyLoadQueueIntersector;\r\nclass LazyLoadQueue extends LazyLoadQueueIntersector {\r\n constructor(parallelLimit = PARALLEL_LIMIT) {\r\n super(parallelLimit);\r\n this.parallelLimit = parallelLimit;\r\n this.onVisibilityChange = (target, visible) => {\r\n if (visible) {\r\n this.log('isIntersecting', target);\r\n // need for set element first if scrolled\r\n const item = this.queue.findAndSplice(i => i.div == target);\r\n if (item) {\r\n item.wasSeen = true;\r\n this.queue.unshift(item);\r\n //this.processQueue(item);\r\n }\r\n this.setProcessQueueTimeout();\r\n }\r\n };\r\n this.intersector = new visibilityIntersector_1.default(this.onVisibilityChange);\r\n }\r\n getItem() {\r\n return this.queue.findAndSplice(item => item.wasSeen);\r\n }\r\n processItem(item) {\r\n const _super = Object.create(null, {\r\n processItem: { get: () => super.processItem }\r\n });\r\n return __awaiter(this, void 0, void 0, function* () {\r\n yield _super.processItem.call(this, item);\r\n this.intersector.unobserve(item.div);\r\n });\r\n }\r\n addElement(method, el) {\r\n const inserted = super.addElement(method, el);\r\n if (!inserted)\r\n return false;\r\n this.intersector.observe(el.div);\r\n if (el.wasSeen) {\r\n this.processQueue(el);\r\n }\r\n else if (!el.hasOwnProperty('wasSeen')) {\r\n el.wasSeen = false;\r\n }\r\n return true;\r\n }\r\n}\r\nexports.default = LazyLoadQueue;\r\nclass LazyLoadQueueRepeat extends LazyLoadQueueIntersector {\r\n constructor(parallelLimit = PARALLEL_LIMIT, onVisibilityChange) {\r\n super(parallelLimit);\r\n this.parallelLimit = parallelLimit;\r\n this.onVisibilityChange = onVisibilityChange;\r\n this._queue = new Map();\r\n this.intersector = new visibilityIntersector_1.default((target, visible) => {\r\n if (visible) {\r\n const item = this.queue.findAndSplice(i => i.div == target);\r\n this.queue.unshift(item || this._queue.get(target));\r\n }\r\n else {\r\n this.queue.findAndSplice(i => i.div == target);\r\n }\r\n this.onVisibilityChange && this.onVisibilityChange(target, visible);\r\n this.setProcessQueueTimeout();\r\n });\r\n }\r\n clear() {\r\n super.clear();\r\n this._queue.clear();\r\n }\r\n /* public async processItem(item: LazyLoadElement) {\r\n //await super.processItem(item);\r\n await LazyLoadQueueBase.prototype.processItem.call(this, item);\r\n \r\n if(this.lazyLoadMedia.length) {\r\n this.processQueue();\r\n }\r\n } */\r\n observe(el) {\r\n this._queue.set(el.div, el);\r\n this.intersector.observe(el.div);\r\n }\r\n}\r\nexports.LazyLoadQueueRepeat = LazyLoadQueueRepeat;\r\nclass LazyLoadQueueRepeat2 extends LazyLoadQueueIntersector {\r\n constructor(parallelLimit = PARALLEL_LIMIT, onVisibilityChange) {\r\n super(parallelLimit);\r\n this.parallelLimit = parallelLimit;\r\n this.onVisibilityChange = onVisibilityChange;\r\n this.intersector = new visibilityIntersector_1.default((target, visible) => {\r\n const item = this.queue.findAndSplice(i => i.div == target);\r\n if (visible && item) {\r\n this.queue.unshift(item);\r\n }\r\n this.onVisibilityChange && this.onVisibilityChange(target, visible);\r\n this.setProcessQueueTimeout();\r\n });\r\n }\r\n observe(el) {\r\n this.intersector.observe(el);\r\n }\r\n}\r\nexports.LazyLoadQueueRepeat2 = LazyLoadQueueRepeat2;\r\n" - }, - { - "id": 22, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\bin_utils.ts", - "name": "./src/lib/bin_utils.ts", - "index": 15, - "index2": 13, - "size": 13166, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\polyfill.ts", - "issuerId": 75, - "issuerName": "./src/lib/polyfill.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 75, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\polyfill.ts", - "name": "./src/lib/polyfill.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - } - ], - "profile": { - "factory": 1813, - "building": 59, - "dependencies": 1052 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 7, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "module": "./src/lib/appManagers/appMessagesManager.ts", - "moduleName": "./src/lib/appManagers/appMessagesManager.ts", - "type": "cjs require", - "userRequest": "../bin_utils", - "loc": "21:20-43" - }, - { - "moduleId": 12, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDocsManager.ts", - "module": "./src/lib/appManagers/appDocsManager.ts", - "moduleName": "./src/lib/appManagers/appDocsManager.ts", - "type": "cjs require", - "userRequest": "../bin_utils", - "loc": "18:20-43" - }, - { - "moduleId": 13, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": "8:20-43" - }, - { - "moduleId": 28, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDownloadManager.ts", - "module": "./src/lib/appManagers/appDownloadManager.ts", - "moduleName": "./src/lib/appManagers/appDownloadManager.ts", - "type": "cjs require", - "userRequest": "../bin_utils", - "loc": "10:20-43" - }, - { - "moduleId": 72, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\crypto_methods.ts", - "module": "./src/lib/crypto/crypto_methods.ts", - "moduleName": "./src/lib/crypto/crypto_methods.ts", - "type": "cjs require", - "userRequest": "../bin_utils", - "loc": "3:20-43" - }, - { - "moduleId": 75, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 109, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 2, - "source": "\"use strict\";\r\n/*!\r\n * Webogram v0.7.0 - messaging web application for MTProto\r\n * https://github.com/zhukov/webogram\r\n * Copyright (C) 2014 Igor Zhukov \r\n * https://github.com/zhukov/webogram/blob/master/LICENSE\r\n */\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.getFileNameByLocation = exports.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 let blob;\r\n const 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 let bb = new BlobBuilder;\r\n blobParts.forEach((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 'application/json'\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\nfunction getFileNameByLocation(location, options) {\r\n const fileName = ''; //(options?.fileName || '').split('.');\r\n const ext = fileName[fileName.length - 1] || '';\r\n switch (location._) {\r\n case 'inputPhotoFileLocation':\r\n case 'inputDocumentFileLocation': {\r\n const thumbPart = location.thumb_size ? '_' + location.thumb_size : '';\r\n return (fileName[0] ? fileName[0] + '_' : '') + location.id + thumbPart + (ext ? '.' + ext : ext);\r\n }\r\n case 'fileLocationToBeDeprecated':\r\n case 'inputPeerPhotoFileLocation':\r\n case 'inputStickerSetThumb':\r\n case 'inputFileLocation': {\r\n return location.volume_id + '_' + location.local_id + (ext ? '.' + ext : ext);\r\n }\r\n default: {\r\n console.error('Unrecognized location:', location);\r\n return '';\r\n }\r\n }\r\n}\r\nexports.getFileNameByLocation = getFileNameByLocation;\r\n" - }, - { - "id": 23, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\helpers\\cancellablePromise.ts", - "name": "./src/helpers/cancellablePromise.ts", - "index": 20, - "index2": 17, - "size": 1438, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webpWorkerController.ts", - "issuerId": 53, - "issuerName": "./src/lib/webp/webpWorkerController.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts", - "name": "./src/lib/mtproto/mtprotoworker.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 53, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webpWorkerController.ts", - "name": "./src/lib/webp/webpWorkerController.ts", - "profile": { - "factory": 2342, - "building": 10824, - "dependencies": 20 - } - } - ], - "profile": { - "factory": 1033, - "building": 10993 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 7, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "module": "./src/lib/appManagers/appMessagesManager.ts", - "moduleName": "./src/lib/appManagers/appMessagesManager.ts", - "type": "cjs require", - "userRequest": "../../helpers/cancellablePromise", - "loc": "34:29-72" - }, - { - "moduleId": 18, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "module": "./src/components/wrappers.ts", - "moduleName": "./src/components/wrappers.ts", - "type": "cjs require", - "userRequest": "../helpers/cancellablePromise", - "loc": "33:29-69" - }, - { - "moduleId": 28, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDownloadManager.ts", - "module": "./src/lib/appManagers/appDownloadManager.ts", - "moduleName": "./src/lib/appManagers/appDownloadManager.ts", - "type": "cjs require", - "userRequest": "../../helpers/cancellablePromise", - "loc": "9:29-72" - }, - { - "moduleId": 37, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\appMediaPlaybackController.ts", - "module": "./src/components/appMediaPlaybackController.ts", - "moduleName": "./src/components/appMediaPlaybackController.ts", - "type": "cjs require", - "userRequest": "../helpers/cancellablePromise", - "loc": "10:29-69" - }, - { - "moduleId": 53, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webpWorkerController.ts", - "module": "./src/lib/webp/webpWorkerController.ts", - "moduleName": "./src/lib/webp/webpWorkerController.ts", - "type": "cjs require", - "userRequest": "../../helpers/cancellablePromise", - "loc": "8:29-72" - }, - { - "moduleId": 56, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts", - "module": "./src/lib/appManagers/appMediaViewer.ts", - "moduleName": "./src/lib/appManagers/appMediaViewer.ts", - "type": "cjs require", - "userRequest": "../../helpers/cancellablePromise", - "loc": "30:29-72" - }, - { - "moduleId": 63, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\gifsMasonry.ts", - "module": "./src/components/gifsMasonry.ts", - "moduleName": "./src/components/gifsMasonry.ts", - "type": "cjs require", - "userRequest": "../helpers/cancellablePromise", - "loc": "21:29-69" - } - ], - "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 = void 0;\r\nfunction deferredPromise() {\r\n let deferredHelper = {\r\n isFulfilled: false,\r\n isRejected: false,\r\n notify: () => { },\r\n notifyAll: (...args) => {\r\n deferredHelper.lastNotify = args;\r\n deferredHelper.listeners.forEach((callback) => callback(...args));\r\n },\r\n lastNotify: undefined,\r\n listeners: [],\r\n addNotifyListener: (callback) => {\r\n if (deferredHelper.lastNotify) {\r\n callback(...deferredHelper.lastNotify);\r\n }\r\n deferredHelper.listeners.push(callback);\r\n }\r\n };\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 deferred.finally(() => {\r\n deferred.notify = null;\r\n deferred.listeners.length = 0;\r\n deferred.lastNotify = null;\r\n });\r\n Object.assign(deferred, deferredHelper);\r\n return deferred;\r\n}\r\nexports.deferredPromise = deferredPromise;\r\n" - }, - { - "id": 24, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "name": "./src/lib/appManagers/appSidebarRight.ts", - "index": 61, - "index2": 78, - "size": 40896, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 42, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 47, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\index.ts", - "module": "./src/components/emoticonsDropdown/index.ts", - "moduleName": "./src/components/emoticonsDropdown/index.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appSidebarRight", - "loc": "22:42-90" - }, - { - "moduleId": 58, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\poll.ts", - "module": "./src/components/poll.ts", - "moduleName": "./src/components/poll.ts", - "type": "cjs require", - "userRequest": "../lib/appManagers/appSidebarRight", - "loc": "11:42-87" - }, - { - "moduleId": 85, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\stickers.ts", - "module": "./src/components/sidebarRight/stickers.ts", - "moduleName": "./src/components/sidebarRight/stickers.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appSidebarRight", - "loc": "35:39-87" - }, - { - "moduleId": 86, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\pollResults.ts", - "module": "./src/components/sidebarRight/pollResults.ts", - "moduleName": "./src/components/sidebarRight/pollResults.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appSidebarRight", - "loc": "26:39-87" - }, - { - "moduleId": 87, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\gifs.ts", - "module": "./src/components/sidebarRight/gifs.ts", - "moduleName": "./src/components/sidebarRight/gifs.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appSidebarRight", - "loc": "37:39-87" - } - ], - "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.AppSidebarRight = void 0;\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 logger_1 = require(\"../logger\");\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 config_1 = require(\"../config\");\r\nconst slider_1 = __importDefault(require(\"../../components/slider\"));\r\nconst searchInput_1 = __importDefault(require(\"../../components/searchInput\"));\r\nconst horizontalMenu_1 = require(\"../../components/horizontalMenu\");\r\nconst stickers_1 = __importDefault(require(\"../../components/sidebarRight/stickers\"));\r\nconst pollResults_1 = __importDefault(require(\"../../components/sidebarRight/pollResults\"));\r\nconst gifs_1 = __importDefault(require(\"../../components/sidebarRight/gifs\"));\r\nconst testScroll = false;\r\nconst COLUMN_ACTIVE_CLASSNAME = 'is-right-column-shown';\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\nconst stickersTab = new stickers_1.default();\r\nconst pollResultsTab = new pollResults_1.default();\r\nconst gifsTab = new gifs_1.default();\r\nconst contentToSharedMap = {\r\n contentMembers: 'inputMessagesFilterContacts',\r\n contentMedia: 'inputMessagesFilterPhotoVideo',\r\n contentDocuments: 'inputMessagesFilterDocument',\r\n contentLinks: 'inputMessagesFilterUrl',\r\n contentAudio: 'inputMessagesFilterMusic'\r\n};\r\n// TODO: отправленное сообщение с картинкой, или же новое полученное апдейтом сообщение не отобразится в медии\r\n// TODO: по-хорошему, нужно просто сделать апдейты для всего сайдбара\r\nlet AppSidebarRight = /** @class */ (() => {\r\n class AppSidebarRight extends slider_1.default {\r\n constructor() {\r\n super(document.getElementById('column-right'), {\r\n [AppSidebarRight.SLIDERITEMSIDS.stickers]: stickersTab,\r\n [AppSidebarRight.SLIDERITEMSIDS.pollResults]: pollResultsTab,\r\n [AppSidebarRight.SLIDERITEMSIDS.gifs]: gifsTab\r\n });\r\n this.profileElements = {};\r\n this.sharedMedia = {};\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 = 'inputMessagesFilterPhotoVideo';\r\n this.sharedMediaSelected = null;\r\n this.lazyLoadQueue = new lazyLoadQueue_1.default();\r\n this.historiesStorage = {};\r\n this.usedFromHistory = {};\r\n this.log = logger_1.logger('SR', logger_1.LogLevels.error);\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.loadMutex = Promise.resolve();\r\n this.onTransitionStart = () => {\r\n // Jolly Cobra's // Workaround for scrollable content flickering during animation.\r\n const container = this.scroll.container;\r\n if (container.style.overflowY !== 'hidden') {\r\n const scrollBarWidth = container.offsetWidth - container.clientWidth;\r\n container.style.overflowY = 'hidden';\r\n container.style.paddingRight = `${scrollBarWidth}px`;\r\n }\r\n };\r\n this.onTransitionEnd = () => {\r\n // Jolly Cobra's // Workaround for scrollable content flickering during animation.\r\n const container = this.scroll.container;\r\n container.style.overflowY = 'scroll';\r\n container.style.paddingRight = '0';\r\n };\r\n //this._selectTab(3);\r\n this.stickersTab = stickersTab;\r\n this.pollResultsTab = pollResultsTab;\r\n this.gifsTab = gifsTab;\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.searchContainer = this.sidebarEl.querySelector('#search-private-container');\r\n this.searchCloseBtn = this.searchContainer.querySelector('.sidebar-close-button');\r\n this.searchInput = new searchInput_1.default('Search');\r\n this.searchCloseBtn.parentElement.append(this.searchInput.container);\r\n this.privateSearch = new appSearch_1.default(this.searchContainer.querySelector('.chats-container'), this.searchInput, {\r\n messages: new appSearch_1.SearchGroup('Private Search', 'messages')\r\n });\r\n let container = this.profileContentEl.querySelector('.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 horizontalMenu_1.horizontalMenu(this.profileTabs, container, (id, tabContent) => {\r\n if (this.prevTabID == id)\r\n return;\r\n if (this.prevTabID != -1) {\r\n this.onTransitionStart();\r\n }\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 this.scroll.onScroll();\r\n this.onTransitionEnd();\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 const target = e.target;\r\n const 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 const message = appMessagesManager_1.default.getMessage(messageID);\r\n const ids = Object.keys(this.mediaDivsByIDs).map(k => +k).sort((a, b) => a - b);\r\n const idx = ids.findIndex(i => i == messageID);\r\n const targets = ids.map(id => {\r\n const element = this.mediaDivsByIDs[id];\r\n //element = element.querySelector('img') || element;\r\n return { element, mid: id };\r\n });\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 window.addEventListener('resize', () => {\r\n });\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 const active = document.body.classList.contains(COLUMN_ACTIVE_CLASSNAME);\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 //console.log('sidebar selectTab', enable, willChange);\r\n if (config_1.mediaSizes.isMobile) {\r\n appImManager_1.default.selectTab(active ? 1 : 2);\r\n return Promise.resolve();\r\n }\r\n const set = () => {\r\n document.body.classList.toggle(COLUMN_ACTIVE_CLASSNAME, enable);\r\n };\r\n set();\r\n return new Promise(resolve => {\r\n setTimeout(resolve, 200);\r\n });\r\n //return Promise.resolve();\r\n return new Promise((resolve, reject) => {\r\n const hidden = [];\r\n const observer = new IntersectionObserver((entries) => {\r\n for (const entry of entries) {\r\n const bubble = entry.target;\r\n if (!entry.isIntersecting) {\r\n hidden.push({ element: bubble, height: bubble.scrollHeight });\r\n }\r\n }\r\n for (const 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 (const 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 (active) {\r\n appForward_1.default.close();\r\n this.searchCloseBtn.click();\r\n }\r\n resolve();\r\n }, 200);\r\n });\r\n const length = Object.keys(appImManager_1.default.bubbles).length;\r\n if (length) {\r\n for (const 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 const peerID = this.peerID;\r\n const elemsToAppend = [];\r\n const promises = [];\r\n let sharedMediaDiv;\r\n /* for(let contentType in contentToSharedMap) {\r\n if(contentToSharedMap[contentType as ContentType] == type) {\r\n sharedMediaDiv = this.sharedMedia[contentType as ContentType];\r\n }\r\n } */\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 (const message of messages) {\r\n const media = message.media.photo || message.media.document || (message.media.webpage && message.media.webpage.document);\r\n const div = document.createElement('div');\r\n div.classList.add('media-item');\r\n //console.log(message, photo);\r\n const isPhoto = media._ == 'photo';\r\n const 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 const cachedThumb = appPhotosManager_1.default.getDocumentCachedThumb(media.id);\r\n isDownloaded = (cachedThumb === null || cachedThumb === void 0 ? void 0 : cachedThumb.downloaded) > 0;\r\n }\r\n //this.log('inputMessagesFilterPhotoVideo', message, media);\r\n if (!isPhoto) {\r\n const 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 /* const 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 const 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 const url = (photo && photo.url) || appPhotosManager_1.default.getDocumentCachedThumb(media.id).url;\r\n if (url) {\r\n //if(needBlur) return;\r\n const needBlurCallback = needBlur ? () => {\r\n //void img.offsetLeft; // reflow\r\n img.style.opacity = '';\r\n if (thumb) {\r\n window.setTimeout(() => {\r\n thumb.remove();\r\n }, 200);\r\n }\r\n } : undefined;\r\n misc_1.renderImageFromUrl(img, url, needBlurCallback);\r\n }\r\n });\r\n let thumb;\r\n const sizes = media.sizes || media.thumbs;\r\n const willHaveThumb = !isDownloaded && sizes && sizes[0].bytes;\r\n if (willHaveThumb) {\r\n thumb = new Image();\r\n thumb.classList.add('media-image', 'thumbnail');\r\n thumb.dataset.mid = '' + message.mid;\r\n appPhotosManager_1.default.setAttachmentPreview(sizes[0].bytes, thumb, false, false);\r\n div.append(thumb);\r\n }\r\n const needBlur = !isDownloaded || !willHaveThumb;\r\n const img = new Image();\r\n img.dataset.mid = '' + message.mid;\r\n img.classList.add('media-image');\r\n if (needBlur)\r\n img.style.opacity = '0';\r\n div.append(img);\r\n if (isDownloaded || willHaveThumb) {\r\n const promise = new Promise((resolve, reject) => {\r\n (thumb || img).addEventListener('load', () => {\r\n clearTimeout(timeout);\r\n resolve();\r\n });\r\n const timeout = setTimeout(() => {\r\n this.log('didn\\'t load', thumb, media, isDownloaded, sizes);\r\n reject();\r\n }, 1e3);\r\n });\r\n promises.push(promise);\r\n }\r\n if (sizes === null || sizes === void 0 ? void 0 : sizes.length) {\r\n if (isDownloaded)\r\n load();\r\n else\r\n this.lazyLoadQueue.push({ div, load });\r\n }\r\n elemsToAppend.push(div);\r\n this.mediaDivsByIDs[message.mid] = 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, false, message.mid);\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
${title}\r\n
${subtitle}
\r\n
${url}
\r\n `);\r\n if (div.innerText.trim().length) {\r\n elemsToAppend.push(div);\r\n }\r\n }\r\n break;\r\n }\r\n case 'inputMessagesFilterMusic': {\r\n sharedMediaDiv = this.sharedMedia.contentAudio;\r\n for (let message of messages) {\r\n let div = wrappers_1.wrapAudio(message.media.document, true, message.mid);\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 (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 if (elemsToAppend.length) {\r\n sharedMediaDiv.append(...elemsToAppend);\r\n }\r\n if (sharedMediaDiv) {\r\n const parent = sharedMediaDiv.parentElement;\r\n Array.from(parent.children).slice(1).forEach(child => {\r\n child.remove();\r\n });\r\n //this.contentContainer.classList.add('loaded');\r\n if (!messages.length && !sharedMediaDiv.childElementCount) {\r\n const div = document.createElement('div');\r\n div.innerText = 'Nothing interesting here yet...';\r\n div.classList.add('position-center', 'text-center', 'content-empty', 'no-select');\r\n parent.append(div);\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 const 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 const loadCount = (appPhotosManager_1.default.windowH / 130 | 0) * 3; // that's good for all types\r\n const historyStorage = (_a = this.historiesStorage[peerID]) !== null && _a !== void 0 ? _a : (this.historiesStorage[peerID] = {});\r\n const promises = typesToLoad.map(type => {\r\n var _a;\r\n if (this.loadSidebarMediaPromises[type])\r\n return this.loadSidebarMediaPromises[type];\r\n const 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 const inputFilter = contentToSharedMap[key];\r\n if (!this.historiesStorage[this.peerID] || !this.historiesStorage[this.peerID][inputFilter]) {\r\n const parent = this.sharedMedia[key].parentElement;\r\n if (!testScroll) {\r\n if (!parent.querySelector('.preloader')) {\r\n misc_1.putPreloader(parent, true);\r\n }\r\n }\r\n const empty = parent.querySelector('.content-empty');\r\n if (empty) {\r\n empty.remove();\r\n }\r\n }\r\n });\r\n if (testScroll) {\r\n for (let i = 0; i < 1500; ++i) {\r\n let div = document.createElement('div');\r\n div.insertAdjacentHTML('beforeend', ``);\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 }\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] as HTMLLIElement;\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 });\r\n }\r\n else {\r\n //membersLi.style.display = appPeersManager.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\n AppSidebarRight.SLIDERITEMSIDS = {\r\n search: 1,\r\n forward: 2,\r\n stickers: 3,\r\n pollResults: 4,\r\n gifs: 5,\r\n };\r\n return AppSidebarRight;\r\n})();\r\nexports.AppSidebarRight = AppSidebarRight;\r\nconst appSidebarRight = new AppSidebarRight();\r\n// @ts-ignore\r\nif (process.env.NODE_ENV != 'production') {\r\n window.appSidebarRight = appSidebarRight;\r\n}\r\nexports.default = appSidebarRight;\r\n" - }, - { - "id": 25, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\page.ts", - "name": "./src/pages/page.ts", - "index": 33, - "index2": 32, - "size": 2120, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "issuerId": 49, - "issuerName": "./src/pages/pageSignIn.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 49, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "name": "./src/pages/pageSignIn.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - } - ], - "profile": { - "factory": 104, - "building": 1053, - "dependencies": 527 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 31, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 49, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "module": "./src/pages/pageSignIn.ts", - "moduleName": "./src/pages/pageSignIn.ts", - "type": "cjs require", - "userRequest": "./page", - "loc": "14:31-48" - }, - { - "moduleId": 66, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 79, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 80, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignUp.ts", - "module": "./src/pages/pageSignUp.ts", - "moduleName": "./src/pages/pageSignUp.ts", - "type": "cjs require", - "userRequest": "./page", - "loc": "29:31-48" - }, - { - "moduleId": 109, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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 try {\r\n const res = this.onFirstMount(...args);\r\n if (res instanceof Promise) {\r\n yield res;\r\n }\r\n }\r\n catch (err) {\r\n console.error('PAGE MOUNT ERROR:', err);\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": 26, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\horizontalMenu.ts", - "name": "./src/components/horizontalMenu.ts", - "index": 37, - "index2": 30, - "size": 6164, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "../../components/horizontalMenu", - "loc": "42:25-67" - }, - { - "moduleId": 16, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts", - "module": "./src/lib/appManagers/appDialogsManager.ts", - "moduleName": "./src/lib/appManagers/appDialogsManager.ts", - "type": "cjs require", - "userRequest": "../../components/horizontalMenu", - "loc": "31:25-67" - }, - { - "moduleId": 24, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", - "type": "cjs require", - "userRequest": "../../components/horizontalMenu", - "loc": "55:25-67" - }, - { - "moduleId": 47, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\index.ts", - "module": "./src/components/emoticonsDropdown/index.ts", - "moduleName": "./src/components/emoticonsDropdown/index.ts", - "type": "cjs require", - "userRequest": "../horizontalMenu", - "loc": "20:25-53" - }, - { - "moduleId": 60, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\slider.ts", - "module": "./src/components/slider.ts", - "moduleName": "./src/components/slider.ts", - "type": "cjs require", - "userRequest": "./horizontalMenu", - "loc": "3:25-52" - }, - { - "moduleId": 81, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pagesManager.ts", - "module": "./src/pages/pagesManager.ts", - "moduleName": "./src/pages/pagesManager.ts", - "type": "cjs require", - "userRequest": "../components/horizontalMenu", - "loc": "8:25-64" - } - ], - "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.horizontalMenu = void 0;\r\nconst utils_1 = require(\"../lib/utils\");\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(20%)`;\r\n } else {\r\n //tabContent.style.filter = `brightness(80%)`;\r\n tabContent.style.transform = `translateX(-25%)`;\r\n prevTabContent.style.transform = `translateX(20%)`;\r\n } */\r\n const width = prevTabContent.getBoundingClientRect().width;\r\n if (toRight) {\r\n prevTabContent.style.filter = `brightness(80%)`;\r\n prevTabContent.style.transform = `translate3d(${-width * .25}px, 0, 0)`;\r\n tabContent.style.transform = `translate3d(${width}px, 0, 0)`;\r\n }\r\n else {\r\n tabContent.style.filter = `brightness(80%)`;\r\n tabContent.style.transform = `translate3d(${-width * .25}px, 0, 0)`;\r\n prevTabContent.style.transform = `translate3d(${width}px, 0, 0)`;\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 const width = prevTabContent.getBoundingClientRect().width;\r\n if (toRight) {\r\n tabContent.style.transform = `translate3d(${width}px, 0, 0)`;\r\n prevTabContent.style.transform = `translate3d(${-width}px, 0, 0)`;\r\n }\r\n else {\r\n tabContent.style.transform = `translate3d(${-width}px, 0, 0)`;\r\n prevTabContent.style.transform = `translate3d(${width}px, 0, 0)`;\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 = 250) {\r\n const hideTimeouts = {};\r\n let prevTabContent = null;\r\n let prevId = -1;\r\n const selectTab = (id) => {\r\n if (id == prevId)\r\n return false;\r\n //console.log('selectTab id:', id);\r\n const p = prevTabContent;\r\n const tabContent = content.children[id];\r\n if (content.dataset.slider == 'none') {\r\n if (p) {\r\n p.classList.remove('active');\r\n }\r\n tabContent.classList.add('active');\r\n prevId = id;\r\n prevTabContent = tabContent;\r\n if (onTransitionEnd)\r\n onTransitionEnd();\r\n return;\r\n }\r\n const toRight = prevId < id;\r\n if (prevId != -1) {\r\n if (tabs || content.dataset.slider == '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] = window.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 }, /* 420 */ transitionTime);\r\n }\r\n prevId = id;\r\n prevTabContent = tabContent;\r\n };\r\n if (tabs) {\r\n const useStripe = !tabs.classList.contains('no-stripe');\r\n const tagName = 'LI'; //tabs.firstElementChild.tagName;\r\n tabs.addEventListener('click', function (e) {\r\n let target = e.target;\r\n if (target.tagName != tagName) {\r\n target = utils_1.findUpTag(target, tagName);\r\n }\r\n //console.log('tabs click:', target);\r\n if (!target)\r\n return false;\r\n let id;\r\n if (target.dataset.tab) {\r\n id = +target.dataset.tab;\r\n if (id == -1) {\r\n return false;\r\n }\r\n }\r\n else {\r\n id = utils_1.whichChild(target);\r\n }\r\n const 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 const prev = tabs.querySelector(tagName.toLowerCase() + '.active');\r\n prev && prev.classList.remove('active');\r\n // stripe from ZINCHUK\r\n if (useStripe && prevId != -1) {\r\n const indicator = target.querySelector('i');\r\n const currentIndicator = target.parentElement.children[prevId].querySelector('i');\r\n currentIndicator.classList.remove('animate');\r\n indicator.classList.remove('animate');\r\n // We move and resize our indicator so it repeats the position and size of the previous one.\r\n const shiftLeft = currentIndicator.parentElement.parentElement.offsetLeft - indicator.parentElement.parentElement.offsetLeft;\r\n const scaleFactor = currentIndicator.clientWidth / indicator.clientWidth;\r\n indicator.style.transform = `translate3d(${shiftLeft}px, 0, 0) scale3d(${scaleFactor}, 1, 1)`;\r\n //console.log(`translate3d(${shiftLeft}px, 0, 0) scale3d(${scaleFactor}, 1, 1)`);\r\n requestAnimationFrame(() => {\r\n // Now we remove the transform to let it animate to its own position and size.\r\n indicator.classList.add('animate');\r\n indicator.style.transform = 'none';\r\n });\r\n }\r\n // stripe END\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\n" - }, - { - "id": 27, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appProfileManager.ts", - "name": "./src/lib/appManagers/appProfileManager.ts", - "index": 43, - "index2": 47, - "size": 24680, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 9, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 24, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", - "type": "cjs require", - "userRequest": "./appProfileManager", - "loc": "43:44-74" - }, - { - "moduleId": 41, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 80, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignUp.ts", - "module": "./src/pages/pageSignUp.ts", - "moduleName": "./src/pages/pageSignUp.ts", - "type": "cjs require", - "userRequest": "../lib/appManagers/appProfileManager", - "loc": "32:67-114" - }, - { - "moduleId": 94, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\editProfile.ts", - "module": "./src/components/sidebarLeft/editProfile.ts", - "moduleName": "./src/components/sidebarLeft/editProfile.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appProfileManager", - "loc": "8:44-94" - } - ], - "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 misc_1 = require(\"../../components/misc\");\r\nconst searchIndexManager_1 = __importDefault(require(\"../searchIndexManager\"));\r\nconst appMessagesManager_1 = __importDefault(require(\"./appMessagesManager\"));\r\nconst appDownloadManager_1 = __importDefault(require(\"./appDownloadManager\"));\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 appMessagesManager_1.default.savePinnedMessage(id, userFull.pinned_msg_id);\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 const 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 appMessagesManager_1.default.savePinnedMessage(-id, fullChat.pinned_msg_id);\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 /* public getChatInviteLink(id: number, force?: boolean) {\r\n return this.getChatFull(id).then((chatFull: any) => {\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 \r\n let promise;\r\n if(appChatsManager.isChannel(id)) {\r\n promise = apiManager.invokeApi('channels.exportInvite', {\r\n channel: appChatsManager.getChannelInput(id)\r\n });\r\n } else {\r\n promise = apiManager.invokeApi('messages.exportChatInvite', {\r\n chat_id: id\r\n });\r\n }\r\n \r\n return promise.then((exportedInvite: any) => {\r\n if(this.chatsFull[id] !== undefined) {\r\n this.chatsFull[id].exported_invite = exportedInvite;\r\n }\r\n \r\n return exportedInvite.link;\r\n });\r\n });\r\n } */\r\n /* public getChannelParticipants(id: number, filter: any, limit: number, offset: number) {\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 \r\n if(filter._ == 'channelParticipantsRecent') {\r\n let chat = appChatsManager.getChat(id);\r\n if(chat &&\r\n chat.pFlags && (\r\n chat.pFlags.kicked ||\r\n chat.pFlags.broadcast && !chat.pFlags.creator && !chat.admin_rights\r\n )) {\r\n return Promise.reject();\r\n }\r\n }\r\n \r\n let fetchParticipants = (cachedParticipants?: any[]) => {\r\n let hash = 0;\r\n if(cachedParticipants) {\r\n let userIDs: number[] = [];\r\n cachedParticipants.forEach((participant: any) => {\r\n userIDs.push(participant.user_id);\r\n });\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 \r\n return apiManager.invokeApi('channels.getParticipants', {\r\n channel: appChatsManager.getChannelInput(id),\r\n filter: filter,\r\n offset: offset,\r\n limit: limit,\r\n hash: hash\r\n }).then((result: any) => {\r\n if(result._ == 'channels.channelParticipantsNotModified') {\r\n return cachedParticipants;\r\n }\r\n \r\n appUsersManager.saveApiUsers(result.users);\r\n return result.participants;\r\n });\r\n }\r\n \r\n let maybeAddSelf = (participants: any[]) => {\r\n let chat = appChatsManager.getChat(id);\r\n let selfMustBeFirst = filter._ == 'channelParticipantsRecent' &&\r\n !offset &&\r\n !chat.pFlags.kicked &&\r\n !chat.pFlags.left;\r\n \r\n if(selfMustBeFirst) {\r\n participants = copy(participants);\r\n let myID = appUsersManager.getSelf().id;\r\n let myIndex = participants.findIndex(p => p.user_id == myID);\r\n let myParticipant;\r\n \r\n if(myIndex !== -1) {\r\n myParticipant = participants[myIndex];\r\n participants.splice(myIndex, 1);\r\n } else {\r\n myParticipant = {_: 'channelParticipantSelf', user_id: myID};\r\n }\r\n \r\n participants.unshift(myParticipant);\r\n }\r\n \r\n return participants;\r\n }\r\n \r\n let timeNow = 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: any) => {\r\n return fetchParticipants(cachedParticipants).then(maybeAddSelf)\r\n });\r\n this.chatParticipantsPromises[promiseKey] = [timeNow, newPromise];\r\n return newPromise;\r\n }\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 appMessagesManager_1.default.savePinnedMessage(-id, fullChannel.pinned_msg_id);\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 putAvatar(div, peerID, location) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const inputPeer = appPeersManager_1.default.getInputPeerByID(peerID);\r\n if (!this.savedAvatarURLs[peerID]) {\r\n //console.warn('will invoke downloadSmallFile:', peerID);\r\n const peerPhotoFileLocation = {\r\n _: 'inputPeerPhotoFileLocation',\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 const downloadOptions = { dcID: location.dc_id, location: peerPhotoFileLocation };\r\n yield appDownloadManager_1.default.download(downloadOptions).then(blob => {\r\n this.savedAvatarURLs[peerID] = URL.createObjectURL(blob);\r\n });\r\n }\r\n const img = new Image();\r\n const cached = misc_1.renderImageFromUrl(img, this.savedAvatarURLs[peerID]);\r\n if (cached) {\r\n // смотри в misc.ts: renderImageFromUrl\r\n //img.addEventListener('load', () => {\r\n div.innerHTML = '';\r\n div.append(img);\r\n //});\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 });\r\n }\r\n // peerID == peerID || title\r\n putPhoto(div, peerID, isDialog = false, title = '') {\r\n var _a;\r\n const location = appPeersManager_1.default.getPeerPhoto(peerID);\r\n const avatarAvailable = location && !location.empty && location.photo_small;\r\n const avatarRendered = !!div.firstElementChild;\r\n const myID = utils_1.$rootScope.myID;\r\n //console.log('loadDialogPhoto location:', location, inputPeer);\r\n if (peerID == myID && isDialog) {\r\n div.innerHTML = '';\r\n div.style.backgroundColor = '';\r\n div.classList.add('tgico-savedmessages');\r\n div.classList.remove('tgico-avatar_deletedaccount');\r\n return;\r\n }\r\n if (peerID > 0) {\r\n const user = appUsersManager_1.default.getUser(peerID);\r\n if (user && user.pFlags && user.pFlags.deleted) {\r\n div.innerHTML = '';\r\n div.style.backgroundColor = '';\r\n div.classList.add('tgico-avatar_deletedaccount');\r\n return;\r\n }\r\n }\r\n if (!avatarAvailable || !avatarRendered || !this.savedAvatarURLs[peerID]) {\r\n let color = '';\r\n if (peerID && peerID != myID) {\r\n color = appPeersManager_1.default.getPeerColorByID(peerID);\r\n }\r\n div.innerHTML = '';\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 (avatarAvailable) {\r\n this.putAvatar(div, peerID, location);\r\n }\r\n }\r\n}\r\nexports.AppProfileManager = AppProfileManager;\r\nexports.default = new AppProfileManager();\r\n" - }, - { - "id": 28, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDownloadManager.ts", - "name": "./src/lib/appManagers/appDownloadManager.ts", - "index": 46, - "index2": 36, - "size": 5623, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "issuerId": 7, - "issuerName": "./src/lib/appManagers/appMessagesManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "name": "./src/lib/appManagers/appMessagesManager.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 2083, - "building": 945, - "dependencies": 16 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 7, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "module": "./src/lib/appManagers/appMessagesManager.ts", - "moduleName": "./src/lib/appManagers/appMessagesManager.ts", - "type": "cjs require", - "userRequest": "./appDownloadManager", - "loc": "38:45-76" - }, - { - "moduleId": 12, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDocsManager.ts", - "module": "./src/lib/appManagers/appDocsManager.ts", - "moduleName": "./src/lib/appManagers/appDocsManager.ts", - "type": "cjs require", - "userRequest": "./appDownloadManager", - "loc": "19:45-76" - }, - { - "moduleId": 13, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appPhotosManager.ts", - "module": "./src/lib/appManagers/appPhotosManager.ts", - "moduleName": "./src/lib/appManagers/appPhotosManager.ts", - "type": "cjs require", - "userRequest": "./appDownloadManager", - "loc": "9:45-76" - }, - { - "moduleId": 27, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appProfileManager.ts", - "module": "./src/lib/appManagers/appProfileManager.ts", - "moduleName": "./src/lib/appManagers/appProfileManager.ts", - "type": "cjs require", - "userRequest": "./appDownloadManager", - "loc": "30:45-76" - }, - { - "moduleId": 46, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popupAvatar.ts", - "module": "./src/components/popupAvatar.ts", - "moduleName": "./src/components/popupAvatar.ts", - "type": "cjs require", - "userRequest": "../lib/appManagers/appDownloadManager", - "loc": "8:45-93" - }, - { - "moduleId": 102, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\stickers.ts", - "module": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "type": "cjs require", - "userRequest": "../../../lib/appManagers/appDownloadManager", - "loc": "38:45-99" - } - ], - "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.AppDownloadManager = void 0;\r\nconst utils_1 = require(\"../utils\");\r\nconst mtprotoworker_1 = __importDefault(require(\"../mtproto/mtprotoworker\"));\r\nconst cancellablePromise_1 = require(\"../../helpers/cancellablePromise\");\r\nconst bin_utils_1 = require(\"../bin_utils\");\r\nclass AppDownloadManager {\r\n constructor() {\r\n this.downloads = {};\r\n this.progress = {};\r\n this.progressCallbacks = {};\r\n this.uploadID = 0;\r\n utils_1.$rootScope.$on('download_progress', (e) => {\r\n const details = e.detail;\r\n this.progress[details.fileName] = details;\r\n const callbacks = this.progressCallbacks[details.fileName];\r\n if (callbacks) {\r\n callbacks.forEach(callback => callback(details));\r\n }\r\n const download = this.downloads[details.fileName];\r\n if (download) {\r\n download.notifyAll(details);\r\n }\r\n });\r\n }\r\n getNewDeferred(fileName) {\r\n const deferred = cancellablePromise_1.deferredPromise();\r\n deferred.cancel = () => {\r\n const error = new Error('Download canceled');\r\n error.name = 'AbortError';\r\n mtprotoworker_1.default.cancelDownload(fileName);\r\n this.clearDownload(fileName);\r\n deferred.reject(error);\r\n deferred.cancel = () => { };\r\n };\r\n deferred.finally(() => {\r\n delete this.progress[fileName];\r\n delete this.progressCallbacks[fileName];\r\n });\r\n return this.downloads[fileName] = deferred;\r\n }\r\n clearDownload(fileName) {\r\n delete this.downloads[fileName];\r\n }\r\n download(options) {\r\n const fileName = bin_utils_1.getFileNameByLocation(options.location, { fileName: options.fileName });\r\n if (this.downloads.hasOwnProperty(fileName))\r\n return this.downloads[fileName];\r\n const deferred = this.getNewDeferred(fileName);\r\n mtprotoworker_1.default.downloadFile(options).then(deferred.resolve, deferred.reject);\r\n //console.log('Will download file:', fileName, url);\r\n return deferred;\r\n }\r\n upload(file, fileName) {\r\n if (!fileName) {\r\n const mimeType = file === null || file === void 0 ? void 0 : file.type;\r\n if (mimeType) { // the same like apiFileName in appMessagesManager for upload!\r\n const ext = this.uploadID++ + '.' + mimeType.split('/')[1];\r\n if (['image/jpeg', 'image/png', 'image/bmp'].indexOf(mimeType) >= 0) {\r\n fileName = 'photo' + ext;\r\n }\r\n else if (mimeType.indexOf('audio/') === 0 || ['video/ogg'].indexOf(mimeType) >= 0) {\r\n fileName = 'audio' + ext;\r\n }\r\n else if (mimeType.indexOf('video/') === 0) {\r\n fileName = 'video' + ext;\r\n }\r\n else {\r\n fileName = 'document' + ext;\r\n }\r\n }\r\n else {\r\n fileName = 'upload-' + this.uploadID++;\r\n }\r\n }\r\n const deferred = this.getNewDeferred(fileName);\r\n mtprotoworker_1.default.uploadFile({ file, fileName }).then(deferred.resolve, deferred.reject);\r\n deferred.finally(() => {\r\n this.clearDownload(fileName);\r\n });\r\n return deferred;\r\n }\r\n getDownload(fileName) {\r\n return this.downloads[fileName];\r\n }\r\n addProgressCallback(fileName, callback) {\r\n var _a;\r\n const progress = this.progress[fileName];\r\n ((_a = this.progressCallbacks[fileName]) !== null && _a !== void 0 ? _a : (this.progressCallbacks[fileName] = [])).push(callback);\r\n if (progress) {\r\n callback(progress);\r\n }\r\n }\r\n createDownloadAnchor(url, fileName, onRemove) {\r\n const a = document.createElement('a');\r\n a.href = url;\r\n a.download = fileName;\r\n a.target = '_blank';\r\n a.style.position = 'absolute';\r\n a.style.top = '1px';\r\n a.style.left = '1px';\r\n document.body.append(a);\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 a.dispatchEvent(clickEvent);\r\n }\r\n catch (e) {\r\n console.error('Download click error', e);\r\n try {\r\n a.click();\r\n }\r\n catch (e) {\r\n window.open(url, '_blank');\r\n }\r\n }\r\n setTimeout(() => {\r\n a.remove();\r\n onRemove && onRemove();\r\n }, 100);\r\n }\r\n /* public downloadToDisc(fileName: string, url: string) {\r\n this.createDownloadAnchor(url);\r\n \r\n return this.download(fileName, url);\r\n } */\r\n downloadToDisc(options, discFileName) {\r\n const download = this.download(options);\r\n download /* .promise */.then(blob => {\r\n const objectURL = URL.createObjectURL(blob);\r\n this.createDownloadAnchor(objectURL, discFileName, () => {\r\n URL.revokeObjectURL(objectURL);\r\n });\r\n });\r\n return download;\r\n }\r\n}\r\nexports.AppDownloadManager = AppDownloadManager;\r\nexports.default = new AppDownloadManager();\r\n" - }, - { - "id": 29, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\searchInput.ts", - "name": "./src/components/searchInput.ts", - "index": 76, - "index2": 69, - "size": 2054, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "issuerId": 24, - "issuerName": "./src/lib/appManagers/appSidebarRight.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 24, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "name": "./src/lib/appManagers/appSidebarRight.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 1584, - "building": 1606, - "dependencies": 2 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 14, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "module": "./src/lib/appManagers/appSidebarLeft.ts", - "moduleName": "./src/lib/appManagers/appSidebarLeft.ts", - "type": "cjs require", - "userRequest": "../../components/searchInput", - "loc": "45:38-77" - }, - { - "moduleId": 24, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", - "type": "cjs require", - "userRequest": "../../components/searchInput", - "loc": "54:38-77" - }, - { - "moduleId": 85, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\stickers.ts", - "module": "./src/components/sidebarRight/stickers.ts", - "moduleName": "./src/components/sidebarRight/stickers.ts", - "type": "cjs require", - "userRequest": "../searchInput", - "loc": "25:38-63" - }, - { - "moduleId": 87, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\gifs.ts", - "module": "./src/components/sidebarRight/gifs.ts", - "moduleName": "./src/components/sidebarRight/gifs.ts", - "type": "cjs require", - "userRequest": "../searchInput", - "loc": "34:38-63" - }, - { - "moduleId": 91, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\contacts.ts", - "module": "./src/components/sidebarLeft/contacts.ts", - "moduleName": "./src/components/sidebarLeft/contacts.ts", - "type": "cjs require", - "userRequest": "../searchInput", - "loc": "31:38-63" - }, - { - "moduleId": 107, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\search.ts", - "module": "./src/components/chat/search.ts", - "moduleName": "./src/components/chat/search.ts", - "type": "cjs require", - "userRequest": "../searchInput", - "loc": "31: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\nclass SearchInput {\r\n constructor(placeholder, onChange) {\r\n this.prevValue = '';\r\n this.timeout = 0;\r\n this.onInput = () => {\r\n if (!this.onChange)\r\n return;\r\n let value = this.input.value;\r\n //this.input.classList.toggle('is-empty', !value.trim());\r\n if (value != this.prevValue) {\r\n this.prevValue = value;\r\n clearTimeout(this.timeout);\r\n this.timeout = setTimeout(() => {\r\n this.onChange(value);\r\n }, 200);\r\n }\r\n };\r\n this.onClearClick = () => {\r\n this.value = '';\r\n this.onChange && this.onChange('');\r\n };\r\n this.container = document.createElement('div');\r\n this.container.classList.add('input-search');\r\n this.onChange = onChange;\r\n this.input = document.createElement('input');\r\n this.input.type = 'text';\r\n this.input.placeholder = placeholder;\r\n this.input.autocomplete = Math.random().toString(36).substring(7);\r\n const searchIcon = document.createElement('span');\r\n searchIcon.classList.add('tgico', 'tgico-search');\r\n this.clearBtn = document.createElement('span');\r\n this.clearBtn.classList.add('tgico', 'btn-icon', 'tgico-close');\r\n this.input.addEventListener('input', this.onInput);\r\n this.clearBtn.addEventListener('click', this.onClearClick);\r\n this.container.append(this.input, searchIcon, this.clearBtn);\r\n }\r\n get value() {\r\n return this.input.value;\r\n }\r\n set value(value) {\r\n this.input.value = value;\r\n this.prevValue = value;\r\n clearTimeout(this.timeout);\r\n }\r\n remove() {\r\n clearTimeout(this.timeout);\r\n this.input.removeEventListener('input', this.onInput);\r\n this.clearBtn.removeEventListener('click', this.onClearClick);\r\n }\r\n}\r\nexports.default = SearchInput;\r\n" - }, - { - "id": 30, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto_config.ts", - "name": "./src/lib/mtproto/mtproto_config.ts", - "index": 12, - "index2": 9, - "size": 467, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\storage.ts", - "issuerId": 19, - "issuerName": "./src/lib/storage.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\storage.ts", - "name": "./src/lib/storage.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - } - ], - "profile": { - "factory": 729, - "building": 176 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 19, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 49, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "module": "./src/pages/pageSignIn.ts", - "moduleName": "./src/pages/pageSignIn.ts", - "type": "cjs require", - "userRequest": "../lib/mtproto/mtproto_config", - "loc": "15:25-65" - }, - { - "moduleId": 79, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 82, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 109, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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: false,\r\n ssl: true,\r\n multipleConnections: true\r\n};\r\n" - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "index": 32, - "index2": 105, - "size": 4653, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "issuerId": 67, - "issuerName": "./src/index.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - } - ], - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 66, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pagePassword.ts", - "module": "./src/pages/pagePassword.ts", - "moduleName": "./src/pages/pagePassword.ts", - "type": "cjs require", - "userRequest": "./pageIm", - "loc": "6:33-52" - }, - { - "moduleId": 67, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "module": "./src/index.ts", - "moduleName": "./src/index.ts", - "type": "cjs require", - "userRequest": "./pages/pageIm", - "loc": "136:57-82" - }, - { - "moduleId": 79, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageAuthCode.ts", - "module": "./src/pages/pageAuthCode.ts", - "moduleName": "./src/pages/pageAuthCode.ts", - "type": "cjs require", - "userRequest": "./pageIm", - "loc": "8:33-52" - }, - { - "moduleId": 80, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignUp.ts", - "module": "./src/pages/pageSignUp.ts", - "moduleName": "./src/pages/pageSignUp.ts", - "type": "cjs require", - "userRequest": "./pageIm", - "loc": "26:33-52" - }, - { - "moduleId": 109, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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 const promise = Promise.resolve().then(() => __importStar(require('../lib/appManagers/appImManager')));\r\n promise.finally(() => {\r\n //alert('pageIm!');\r\n //AudioContext && global.navigator && global.navigator.mediaDevices && global.navigator.mediaDevices.getUserMedia && global.WebAssembly;\r\n /* // @ts-ignore\r\n var AudioContext = globalThis.AudioContext || globalThis.webkitAudioContext;\r\n alert('AudioContext:' + typeof(AudioContext));\r\n // @ts-ignore\r\n alert('global.navigator:' + typeof(navigator));\r\n alert('navigator.mediaDevices:' + typeof(navigator.mediaDevices));\r\n alert('navigator.mediaDevices.getUserMedia:' + typeof(navigator.mediaDevices?.getUserMedia));\r\n alert('global.WebAssembly:' + typeof(WebAssembly)); */\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 //cancelEvent(e);\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 //let promise = /* Promise.resolve() */.then(() => {//import('../lib/services').then(services => {\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 //});\r\n return promise;\r\n};\r\nconst page = new page_1.default('page-chats', false, onFirstMount);\r\nexports.default = page;\r\n" - }, - { - "id": 32, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\apiUpdatesManager.ts", - "name": "./src/lib/appManagers/apiUpdatesManager.ts", - "index": 41, - "index2": 34, - "size": 21143, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "issuerId": 7, - "issuerName": "./src/lib/appManagers/appMessagesManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "name": "./src/lib/appManagers/appMessagesManager.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 2083, - "building": 945, - "dependencies": 16 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 7, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "module": "./src/lib/appManagers/appMessagesManager.ts", - "moduleName": "./src/lib/appManagers/appMessagesManager.ts", - "type": "cjs require", - "userRequest": "./apiUpdatesManager", - "loc": "23:44-74" - }, - { - "moduleId": 9, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 27, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 39, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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" - }, - { - "moduleId": 40, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appStateManager.ts", - "module": "./src/lib/appManagers/appStateManager.ts", - "moduleName": "./src/lib/appManagers/appStateManager.ts", - "type": "cjs require", - "userRequest": "./apiUpdatesManager", - "loc": "13:44-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.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\nconst logger_1 = require(\"../logger\");\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 this.log = logger_1.logger('UPDATES', logger_1.LogLevels.error);\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 // this.log('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 this.log('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 this.log.warn('Unknown update message', updateMessage);\r\n }\r\n }\r\n getDifference() {\r\n // this.trace('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 flags: 0,\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 this.log('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 if (differenceResult._ != 'updates.differenceTooLong') {\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 // this.log('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 // this.log('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._ == 'updates.difference' ? differenceResult.state : differenceResult.intermediate_state;\r\n updatesState.seq = nextState.seq;\r\n updatesState.pts = nextState.pts;\r\n updatesState.date = nextState.date;\r\n }\r\n else {\r\n updatesState.pts = differenceResult.pts;\r\n delete updatesState.seq;\r\n delete updatesState.date;\r\n }\r\n // this.log('apply diff', updatesState.seq, updatesState.pts)\r\n if (differenceResult._ == 'updates.differenceSlice') {\r\n this.getDifference();\r\n }\r\n else {\r\n // this.log('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 const 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 // this.log('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 // this.log('channel diff result', differenceResult)\r\n channelState.pts = 'pts' in differenceResult ? differenceResult.pts : undefined;\r\n if (differenceResult._ == 'updates.channelDifferenceEmpty') {\r\n this.log('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 this.log('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 this.log('applying', differenceResult.other_updates.length, 'channel other updates');\r\n differenceResult.other_updates.forEach((update) => {\r\n this.saveUpdate(update);\r\n });\r\n this.log('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 this.log('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 this.log('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 // this.log.log('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 // this.log.trace('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 this.log.warn('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 // this.log.log('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 this.log.warn('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 // this.log.warn('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 this.log.warn('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 //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": 33, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesIDsManager.ts", - "name": "./src/lib/appManagers/appMessagesIDsManager.ts", - "index": 44, - "index2": 35, - "size": 2147, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "issuerId": 7, - "issuerName": "./src/lib/appManagers/appMessagesManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "name": "./src/lib/appManagers/appMessagesManager.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 2083, - "building": 945, - "dependencies": 16 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 7, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 27, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 40, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appStateManager.ts", - "module": "./src/lib/appManagers/appStateManager.ts", - "moduleName": "./src/lib/appManagers/appStateManager.ts", - "type": "cjs require", - "userRequest": "./appMessagesIDsManager", - "loc": "9:48-82" - }, - { - "moduleId": 43, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 62, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 34, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\serverTimeManager.ts", - "name": "./src/lib/mtproto/serverTimeManager.ts", - "index": 50, - "index2": 40, - "size": 1249, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignQR.ts", - "issuerId": 109, - "issuerName": "./src/pages/pageSignQR.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 49, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "name": "./src/pages/pageSignIn.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 109, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignQR.ts", - "name": "./src/pages/pageSignQR.ts", - "profile": { - "factory": 104, - "building": 1053, - "dependencies": 527 - } - } - ], - "profile": { - "factory": 7122, - "building": 761, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 5, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appUsersManager.ts", - "module": "./src/lib/appManagers/appUsersManager.ts", - "moduleName": "./src/lib/appManagers/appUsersManager.ts", - "type": "cjs require", - "userRequest": "../mtproto/serverTimeManager", - "loc": "21:44-83" - }, - { - "moduleId": 7, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "module": "./src/lib/appManagers/appMessagesManager.ts", - "moduleName": "./src/lib/appManagers/appMessagesManager.ts", - "type": "cjs require", - "userRequest": "../mtproto/serverTimeManager", - "loc": "27:44-83" - }, - { - "moduleId": 7, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "module": "./src/lib/appManagers/appMessagesManager.ts", - "moduleName": "./src/lib/appManagers/appMessagesManager.ts", - "type": "cjs require", - "userRequest": "../mtproto/serverTimeManager", - "loc": "30:44-83" - }, - { - "moduleId": 58, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\poll.ts", - "module": "./src/components/poll.ts", - "moduleName": "./src/components/poll.ts", - "type": "cjs require", - "userRequest": "../lib/mtproto/serverTimeManager", - "loc": "13:44-87" - }, - { - "moduleId": 109, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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, 0, 0, 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": 35, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\preloader.ts", - "name": "./src/components/preloader.ts", - "index": 53, - "index2": 43, - "size": 4241, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 7, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "module": "./src/lib/appManagers/appMessagesManager.ts", - "moduleName": "./src/lib/appManagers/appMessagesManager.ts", - "type": "cjs require", - "userRequest": "../../components/preloader", - "loc": "29:36-73" - }, - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "../../components/preloader", - "loc": "23:36-73" - }, - { - "moduleId": 18, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "module": "./src/components/wrappers.ts", - "moduleName": "./src/components/wrappers.ts", - "type": "cjs require", - "userRequest": "./preloader", - "loc": "20:36-58" - }, - { - "moduleId": 56, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 84, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\audio.ts", - "module": "./src/components/audio.ts", - "moduleName": "./src/components/audio.ts", - "type": "cjs require", - "userRequest": "./preloader", - "loc": "10: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, streamable = false) {\r\n this.cancelable = cancelable;\r\n this.tempID = 0;\r\n this.detached = true;\r\n this.promise = null;\r\n this.preloader = document.createElement('div');\r\n this.preloader.classList.add('preloader-container');\r\n if (streamable) {\r\n this.preloader.classList.add('preloader-streamable');\r\n }\r\n this.preloader.innerHTML = `\r\n
\r\n \r\n \r\n \r\n
`;\r\n if (cancelable) {\r\n this.preloader.innerHTML += `\r\n \r\n \r\n \r\n `;\r\n }\r\n else {\r\n this.preloader.classList.add('preloader-swing');\r\n }\r\n this.circle = this.preloader.firstElementChild.firstElementChild.firstElementChild;\r\n if (elem) {\r\n this.attach(elem);\r\n }\r\n if (this.cancelable) {\r\n this.preloader.addEventListener('click', (e) => {\r\n utils_1.cancelEvent(e);\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 attachPromise(promise) {\r\n this.promise = promise;\r\n const tempID = --this.tempID;\r\n const onEnd = () => {\r\n promise.notify = null;\r\n if (tempID == this.tempID) {\r\n this.detach();\r\n this.promise = promise = null;\r\n }\r\n };\r\n //promise.catch(onEnd);\r\n promise.finally(onEnd);\r\n if (promise.addNotifyListener) {\r\n promise.addNotifyListener((details) => {\r\n /* if(details.done >= details.total) {\r\n onEnd();\r\n } */\r\n if (tempID != this.tempID)\r\n return;\r\n //console.log('preloader download', promise, details);\r\n const percents = details.done / details.total * 100;\r\n this.setProgress(percents);\r\n });\r\n }\r\n }\r\n attach(elem, reset = true, promise, append = true) {\r\n if (promise /* && false */) {\r\n this.attachPromise(promise);\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 if (this.cancelable && reset) {\r\n this.setProgress(0);\r\n }\r\n });\r\n }\r\n detach() {\r\n this.detached = true;\r\n //return;\r\n if (this.preloader.parentElement) {\r\n /* setTimeout(() => */ 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.remove();\r\n }\r\n }) /* , 5e3) */;\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 try {\r\n const 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 catch (err) { }\r\n }\r\n}\r\nexports.default = ProgressivePreloader;\r\n" - }, - { - "id": 36, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popup.ts", - "name": "./src/components/popup.ts", - "index": 59, - "index2": 53, - "size": 4304, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts", - "issuerId": 16, - "issuerName": "./src/lib/appManagers/appDialogsManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 16, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts", - "name": "./src/lib/appManagers/appDialogsManager.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 1799, - "building": 966, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 16, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts", - "module": "./src/lib/appManagers/appDialogsManager.ts", - "moduleName": "./src/lib/appManagers/appDialogsManager.ts", - "type": "cjs require", - "userRequest": "../../components/popup", - "loc": "28:16-49" - }, - { - "moduleId": 61, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popupStickers.ts", - "module": "./src/components/popupStickers.ts", - "moduleName": "./src/components/popupStickers.ts", - "type": "cjs require", - "userRequest": "./popup", - "loc": "6:16-34" - }, - { - "moduleId": 65, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popupDatepicker.ts", - "module": "./src/components/popupDatepicker.ts", - "moduleName": "./src/components/popupDatepicker.ts", - "type": "cjs require", - "userRequest": "./popup", - "loc": "3:16-34" - }, - { - "moduleId": 103, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popupCreatePoll.ts", - "module": "./src/components/popupCreatePoll.ts", - "moduleName": "./src/components/popupCreatePoll.ts", - "type": "cjs require", - "userRequest": "./popup", - "loc": "6:16-34" - }, - { - "moduleId": 106, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\contextMenu.ts", - "module": "./src/components/chat/contextMenu.ts", - "moduleName": "./src/components/chat/contextMenu.ts", - "type": "cjs require", - "userRequest": "../popup", - "loc": "14:16-35" - } - ], - "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.PopupPeer = exports.PopupElement = void 0;\r\nconst avatar_1 = __importDefault(require(\"./avatar\"));\r\nconst ripple_1 = require(\"./ripple\");\r\nclass PopupElement {\r\n constructor(className, buttons, options = {}) {\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 if (options.closable) {\r\n this.closeBtn = document.createElement('span');\r\n this.closeBtn.classList.add('btn-icon', 'popup-close', 'tgico-close');\r\n ripple_1.ripple(this.closeBtn);\r\n this.header.prepend(this.closeBtn);\r\n this.closeBtn.addEventListener('click', () => {\r\n this.destroy();\r\n }, { once: true });\r\n }\r\n if (options.withConfirm) {\r\n this.confirmBtn = document.createElement('button');\r\n this.confirmBtn.classList.add('btn-primary');\r\n this.confirmBtn.innerText = options.withConfirm;\r\n this.header.append(this.confirmBtn);\r\n ripple_1.ripple(this.confirmBtn);\r\n }\r\n this.container.append(this.header);\r\n if (options.body) {\r\n this.body = document.createElement('div');\r\n this.body.classList.add('popup-body');\r\n this.container.append(this.body);\r\n }\r\n if (buttons && buttons.length) {\r\n const buttonsDiv = document.createElement('div');\r\n buttonsDiv.classList.add('popup-buttons');\r\n const buttonsElements = buttons.map(b => {\r\n const button = document.createElement('button');\r\n button.className = 'btn' + (b.isDanger ? ' danger' : '');\r\n button.innerHTML = b.text;\r\n ripple_1.ripple(button);\r\n if (b.callback) {\r\n button.addEventListener('click', () => {\r\n b.callback();\r\n this.destroy();\r\n }, { once: true });\r\n }\r\n else if (b.isCancel) {\r\n button.addEventListener('click', () => {\r\n this.destroy();\r\n }, { once: true });\r\n }\r\n return button;\r\n });\r\n buttonsDiv.append(...buttonsElements);\r\n this.container.append(buttonsDiv);\r\n }\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.onClose && this.onClose();\r\n this.element.classList.remove('active');\r\n setTimeout(() => {\r\n this.element.remove();\r\n this.onCloseAfterTimeout && this.onCloseAfterTimeout();\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 : ''), options.buttons);\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 this.container.insertBefore(p, this.header.nextElementSibling);\r\n }\r\n}\r\nexports.PopupPeer = PopupPeer;\r\n" - }, - { - "id": 37, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\appMediaPlaybackController.ts", - "name": "./src/components/appMediaPlaybackController.ts", - "index": 64, - "index2": 55, - "size": 7871, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts", - "issuerId": 56, - "issuerName": "./src/lib/appManagers/appMediaViewer.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 56, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts", - "name": "./src/lib/appManagers/appMediaViewer.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 1374, - "building": 1210, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 18, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "module": "./src/components/wrappers.ts", - "moduleName": "./src/components/wrappers.ts", - "type": "cjs require", - "userRequest": "./appMediaPlaybackController", - "loc": "32:53-92" - }, - { - "moduleId": 50, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mediaPlayer.ts", - "module": "./src/lib/mediaPlayer.ts", - "moduleName": "./src/lib/mediaPlayer.ts", - "type": "cjs require", - "userRequest": "../components/appMediaPlaybackController", - "loc": "9:53-104" - }, - { - "moduleId": 56, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts", - "module": "./src/lib/appManagers/appMediaViewer.ts", - "moduleName": "./src/lib/appManagers/appMediaViewer.ts", - "type": "cjs require", - "userRequest": "../../components/appMediaPlaybackController", - "loc": "29:53-107" - }, - { - "moduleId": 84, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\audio.ts", - "module": "./src/components/audio.ts", - "moduleName": "./src/components/audio.ts", - "type": "cjs require", - "userRequest": "./appMediaPlaybackController", - "loc": "12:53-92" - }, - { - "moduleId": 105, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\audio.ts", - "module": "./src/components/chat/audio.ts", - "moduleName": "./src/components/chat/audio.ts", - "type": "cjs require", - "userRequest": "../appMediaPlaybackController", - "loc": "12:53-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(\"../lib/utils\");\r\nconst appMessagesManager_1 = __importDefault(require(\"../lib/appManagers/appMessagesManager\"));\r\nconst appDocsManager_1 = __importDefault(require(\"../lib/appManagers/appDocsManager\"));\r\nconst config_1 = require(\"../lib/config\");\r\nconst cancellablePromise_1 = require(\"../helpers/cancellablePromise\");\r\nclass AppMediaPlaybackController {\r\n constructor() {\r\n this.media = {};\r\n this.waitingMediaForLoad = {};\r\n this.onPause = (e) => {\r\n utils_1.$rootScope.$broadcast('audio_pause');\r\n };\r\n this.onEnded = (e) => {\r\n this.onPause(e);\r\n //console.log('on media end');\r\n if (this.nextMid) {\r\n const media = this.media[this.nextMid];\r\n /* if(isSafari) {\r\n media.autoplay = true;\r\n } */\r\n this.resolveWaitingForLoadMedia(this.nextMid);\r\n setTimeout(() => {\r\n media.play(); //.catch(() => {});\r\n }, 0);\r\n }\r\n };\r\n this.container = document.createElement('div');\r\n //this.container.style.cssText = 'position: absolute; top: -10000px; left: -10000px;';\r\n this.container.style.cssText = 'display: none;';\r\n document.body.append(this.container);\r\n }\r\n addMedia(doc, mid, autoload = true) {\r\n if (this.media[mid])\r\n return this.media[mid];\r\n const media = document.createElement(doc.type == 'round' ? 'video' : 'audio');\r\n //const source = document.createElement('source');\r\n //source.type = doc.type == 'voice' && !opusDecodeController.isPlaySupported() ? 'audio/wav' : doc.mime_type;\r\n if (doc.type == 'round') {\r\n media.setAttribute('playsinline', '');\r\n }\r\n media.dataset.mid = '' + mid;\r\n media.dataset.type = doc.type;\r\n //media.autoplay = true;\r\n media.volume = 1;\r\n //media.append(source);\r\n this.container.append(media);\r\n media.addEventListener('playing', () => {\r\n if (this.playingMedia != media) {\r\n if (this.playingMedia && !this.playingMedia.paused) {\r\n this.playingMedia.pause();\r\n }\r\n this.playingMedia = media;\r\n this.loadSiblingsMedia(doc.type, mid);\r\n }\r\n // audio_pause не успеет сработать без таймаута\r\n setTimeout(() => {\r\n utils_1.$rootScope.$broadcast('audio_play', { doc, mid });\r\n }, 0);\r\n });\r\n media.addEventListener('pause', this.onPause);\r\n media.addEventListener('ended', this.onEnded);\r\n const onError = (e) => {\r\n if (this.nextMid == mid) {\r\n this.loadSiblingsMedia(doc.type, mid).then(() => {\r\n if (this.nextMid && this.media[this.nextMid]) {\r\n this.media[this.nextMid].play();\r\n }\r\n });\r\n }\r\n };\r\n media.addEventListener('error', onError);\r\n const deferred = cancellablePromise_1.deferredPromise();\r\n if (autoload) {\r\n deferred.resolve();\r\n }\r\n else {\r\n this.waitingMediaForLoad[mid] = deferred;\r\n }\r\n // если что - загрузит voice или round заранее, так правильнее\r\n const downloadPromise = !doc.supportsStreaming ? appDocsManager_1.default.downloadDocNew(doc) : Promise.resolve();\r\n Promise.all([deferred, downloadPromise]).then(() => {\r\n //media.autoplay = true;\r\n //console.log('will set media url:', media, doc, doc.type, doc.url);\r\n if (doc.type == 'audio' && doc.supportsStreaming && config_1.isSafari) {\r\n this.handleSafariStreamable(media);\r\n }\r\n media.src = doc.url;\r\n }, onError);\r\n return this.media[mid] = media;\r\n }\r\n // safari подгрузит последний чанк и песня включится,\r\n // при этом этот чанк нельзя руками отдать из SW, потому что браузер тогда теряется\r\n handleSafariStreamable(media) {\r\n media.addEventListener('play', () => {\r\n /* if(media.readyState == 4) { // https://developer.mozilla.org/ru/docs/Web/API/XMLHttpRequest/readyState\r\n return;\r\n } */\r\n //media.volume = 0;\r\n const currentTime = media.currentTime;\r\n //this.setSafariBuffering(media, true);\r\n media.addEventListener('progress', () => {\r\n media.currentTime = media.duration - 1;\r\n media.addEventListener('progress', () => {\r\n media.currentTime = currentTime;\r\n //media.volume = 1;\r\n //this.setSafariBuffering(media, false);\r\n if (!media.paused) {\r\n media.play() /* .catch(() => {}) */;\r\n }\r\n }, { once: true });\r\n }, { once: true });\r\n } /* , {once: true} */);\r\n }\r\n resolveWaitingForLoadMedia(mid) {\r\n const promise = this.waitingMediaForLoad[mid];\r\n if (promise) {\r\n promise.resolve();\r\n delete this.waitingMediaForLoad[mid];\r\n }\r\n }\r\n /**\r\n * Only for audio\r\n */\r\n isSafariBuffering(media) {\r\n /// @ts-ignore\r\n return !!media.safariBuffering;\r\n }\r\n setSafariBuffering(media, value) {\r\n // @ts-ignore\r\n media.safariBuffering = value;\r\n }\r\n loadSiblingsMedia(type, mid) {\r\n const media = this.playingMedia;\r\n const message = appMessagesManager_1.default.getMessage(mid);\r\n this.prevMid = this.nextMid = 0;\r\n return appMessagesManager_1.default.getSearch(message.peerID, '', {\r\n //_: type == 'audio' ? 'inputMessagesFilterMusic' : (type == 'round' ? 'inputMessagesFilterRoundVideo' : 'inputMessagesFilterVoice')\r\n _: type == 'audio' ? 'inputMessagesFilterMusic' : 'inputMessagesFilterRoundVoice'\r\n }, mid, 3, 0, 2).then(value => {\r\n if (this.playingMedia != media) {\r\n return;\r\n }\r\n for (let m of value.history) {\r\n if (m > mid) {\r\n this.nextMid = m;\r\n }\r\n else if (m < mid) {\r\n this.prevMid = m;\r\n break;\r\n }\r\n }\r\n [this.prevMid, this.nextMid].filter(Boolean).forEach(mid => {\r\n const message = appMessagesManager_1.default.getMessage(mid);\r\n this.addMedia(message.media.document, mid, false);\r\n });\r\n //console.log('loadSiblingsAudio', audio, type, mid, value, this.prevMid, this.nextMid);\r\n });\r\n }\r\n toggle() {\r\n if (!this.playingMedia)\r\n return;\r\n if (this.playingMedia.paused) {\r\n this.playingMedia.play();\r\n }\r\n else {\r\n this.playingMedia.pause();\r\n }\r\n }\r\n pause() {\r\n if (!this.playingMedia || this.playingMedia.paused)\r\n return;\r\n this.playingMedia.pause();\r\n }\r\n willBePlayed(media) {\r\n this.willBePlayedMedia = media;\r\n }\r\n}\r\nconst appMediaPlaybackController = new AppMediaPlaybackController();\r\n// @ts-ignore\r\nif (process.env.NODE_ENV != 'production') {\r\n window.appMediaPlaybackController = appMediaPlaybackController;\r\n}\r\nexports.default = appMediaPlaybackController;\r\n" - }, - { - "id": 38, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\searchIndexManager.ts", - "name": "./src/lib/searchIndexManager.ts", - "index": 47, - "index2": 38, - "size": 3779, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appUsersManager.ts", - "issuerId": 5, - "issuerName": "./src/lib/appManagers/appUsersManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 5, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appUsersManager.ts", - "name": "./src/lib/appManagers/appUsersManager.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 2787, - "building": 762, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 5, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appUsersManager.ts", - "module": "./src/lib/appManagers/appUsersManager.ts", - "moduleName": "./src/lib/appManagers/appUsersManager.ts", - "type": "cjs require", - "userRequest": "../searchIndexManager", - "loc": "23:45-77" - }, - { - "moduleId": 7, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "module": "./src/lib/appManagers/appMessagesManager.ts", - "moduleName": "./src/lib/appManagers/appMessagesManager.ts", - "type": "cjs require", - "userRequest": "../searchIndexManager", - "loc": "36:45-77" - }, - { - "moduleId": 9, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 27, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appProfileManager.ts", - "module": "./src/lib/appManagers/appProfileManager.ts", - "moduleName": "./src/lib/appManagers/appProfileManager.ts", - "type": "cjs require", - "userRequest": "../searchIndexManager", - "loc": "28: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": 39, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appPollsManager.ts", - "name": "./src/lib/appManagers/appPollsManager.ts", - "index": 55, - "index2": 45, - "size": 5179, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 7, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "module": "./src/lib/appManagers/appMessagesManager.ts", - "moduleName": "./src/lib/appManagers/appMessagesManager.ts", - "type": "cjs require", - "userRequest": "./appPollsManager", - "loc": "35:42-70" - }, - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "./appPollsManager", - "loc": "40:42-70" - }, - { - "moduleId": 58, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\poll.ts", - "module": "./src/components/poll.ts", - "moduleName": "./src/components/poll.ts", - "type": "cjs require", - "userRequest": "../lib/appManagers/appPollsManager", - "loc": "7:42-87" - }, - { - "moduleId": 86, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\pollResults.ts", - "module": "./src/components/sidebarRight/pollResults.ts", - "moduleName": "./src/components/sidebarRight/pollResults.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appPollsManager", - "loc": "27:42-90" - } - ], - "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 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\nconst logger_1 = require(\"../logger\");\r\nconst appUsersManager_1 = __importDefault(require(\"./appUsersManager\"));\r\nclass AppPollsManager {\r\n constructor() {\r\n this.polls = {};\r\n this.results = {};\r\n this.log = logger_1.logger('POLLS', logger_1.LogLevels.error);\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 this.log('updateMessagePoll:', update);\r\n let poll = 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 const id = poll.id;\r\n if (this.polls[id]) {\r\n poll = Object.assign(this.polls[id], poll);\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 poll.chosenIndexes = [];\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.chosenIndexes.length = 0;\r\n if ((_a = results === null || results === void 0 ? void 0 : results.results) === null || _a === void 0 ? void 0 : _a.length) {\r\n results.results.forEach((answer, idx) => {\r\n var _a;\r\n if ((_a = answer.pFlags) === null || _a === void 0 ? void 0 : _a.chosen) {\r\n poll.chosenIndexes.push(idx);\r\n }\r\n });\r\n }\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 const message = appMessagesManager_1.default.getMessage(mid);\r\n const poll = message.media.poll;\r\n const options = optionIDs.map(index => {\r\n return poll.answers[index].option;\r\n });\r\n const inputPeer = appPeersManager_1.default.getInputPeerByID(message.peerID);\r\n const 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 this.log('sendVote updates:', updates);\r\n apiUpdatesManager_1.default.processUpdateMessage(updates);\r\n });\r\n }\r\n getResults(mid) {\r\n const message = appMessagesManager_1.default.getMessage(mid);\r\n const inputPeer = appPeersManager_1.default.getInputPeerByID(message.peerID);\r\n const messageID = message.id;\r\n return mtprotoworker_1.default.invokeApi('messages.getPollResults', {\r\n peer: inputPeer,\r\n msg_id: messageID\r\n }).then(updates => {\r\n apiUpdatesManager_1.default.processUpdateMessage(updates);\r\n this.log('getResults updates:', updates);\r\n });\r\n }\r\n getVotes(mid, option, offset, limit = 20) {\r\n const message = appMessagesManager_1.default.getMessage(mid);\r\n const inputPeer = appPeersManager_1.default.getInputPeerByID(message.peerID);\r\n const messageID = message.id;\r\n let flags = 0;\r\n if (option) {\r\n flags |= 1 << 0;\r\n }\r\n if (offset) {\r\n flags |= 1 << 1;\r\n }\r\n return mtprotoworker_1.default.invokeApi('messages.getPollVotes', {\r\n flags,\r\n peer: inputPeer,\r\n id: messageID,\r\n option,\r\n offset,\r\n limit\r\n }).then((votesList) => {\r\n this.log('getPollVotes messages:', votesList);\r\n appUsersManager_1.default.saveApiUsers(votesList.users);\r\n return votesList;\r\n });\r\n }\r\n}\r\nconst appPollsManager = new AppPollsManager();\r\n// @ts-ignore\r\nif (process.env.NODE_ENV != 'production') {\r\n window.appPollsManager = appPollsManager;\r\n}\r\nexports.default = appPollsManager;\r\n" - }, - { - "id": 40, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appStateManager.ts", - "name": "./src/lib/appManagers/appStateManager.ts", - "index": 56, - "index2": 49, - "size": 8581, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appUsersManager.ts", - "issuerId": 5, - "issuerName": "./src/lib/appManagers/appUsersManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 5, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appUsersManager.ts", - "name": "./src/lib/appManagers/appUsersManager.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 2787, - "building": 762, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 5, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appUsersManager.ts", - "module": "./src/lib/appManagers/appUsersManager.ts", - "moduleName": "./src/lib/appManagers/appUsersManager.ts", - "type": "cjs require", - "userRequest": "./appStateManager", - "loc": "25:42-70" - }, - { - "moduleId": 14, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "module": "./src/lib/appManagers/appSidebarLeft.ts", - "moduleName": "./src/lib/appManagers/appSidebarLeft.ts", - "type": "cjs require", - "userRequest": "./appStateManager", - "loc": "46:42-70" - }, - { - "moduleId": 16, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts", - "module": "./src/lib/appManagers/appDialogsManager.ts", - "moduleName": "./src/lib/appManagers/appDialogsManager.ts", - "type": "cjs require", - "userRequest": "./appStateManager", - "loc": "29:42-70" - }, - { - "moduleId": 101, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\emoji.ts", - "module": "./src/components/emoticonsDropdown/tabs/emoji.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/emoji.ts", - "type": "cjs require", - "userRequest": "../../../lib/appManagers/appStateManager", - "loc": "10:42-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\nexports.AppStateManager = void 0;\r\nconst storage_1 = __importDefault(require(\"../storage\"));\r\nconst appMessagesManager_1 = __importDefault(require(\"./appMessagesManager\"));\r\nconst appMessagesIDsManager_1 = __importDefault(require(\"./appMessagesIDsManager\"));\r\nconst appPeersManager_1 = __importDefault(require(\"./appPeersManager\"));\r\nconst appChatsManager_1 = __importDefault(require(\"./appChatsManager\"));\r\nconst appUsersManager_1 = __importDefault(require(\"./appUsersManager\"));\r\nconst apiUpdatesManager_1 = __importDefault(require(\"./apiUpdatesManager\"));\r\nconst utils_1 = require(\"../utils\");\r\nconst logger_1 = require(\"../logger\");\r\nconst REFRESH_EVERY = 24 * 60 * 60 * 1000; // 1 day\r\nclass AppStateManager {\r\n constructor() {\r\n this.log = logger_1.logger('STATE' /* , LogLevels.error */);\r\n this.state = {};\r\n this.loadSavedState();\r\n }\r\n loadSavedState() {\r\n if (this.loaded)\r\n return this.loaded;\r\n return this.loaded = new Promise((resolve, reject) => {\r\n storage_1.default.get('state').then((state) => {\r\n var _a;\r\n const time = Date.now();\r\n if (((_a = state === null || state === void 0 ? void 0 : state.stateCreatedTime) !== null && _a !== void 0 ? _a : 0) + REFRESH_EVERY < time) {\r\n this.log('will refresh state', state.stateCreatedTime, time);\r\n ['dialogs', 'allDialogsLoaded', 'messages', 'contactsList', 'stateCreatedTime',\r\n 'updates', 'maxSeenMsgID', 'filters', 'topPeers'].forEach(key => {\r\n delete state[key];\r\n });\r\n //state = {};\r\n }\r\n const { dialogs, allDialogsLoaded, peers, messages, contactsList, maxSeenMsgID, updates, filters } = state;\r\n this.state = state || {};\r\n this.state.peers = peers || {};\r\n if (!this.state.hasOwnProperty('stateCreatedTime')) {\r\n this.state.stateCreatedTime = Date.now();\r\n }\r\n this.log('state res', dialogs, messages);\r\n if (maxSeenMsgID && !appMessagesIDsManager_1.default.getMessageIDInfo(maxSeenMsgID)[1]) {\r\n appMessagesManager_1.default.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 (contactsList && Array.isArray(contactsList) && contactsList.length) {\r\n contactsList.forEach(userID => {\r\n appUsersManager_1.default.pushContact(userID);\r\n });\r\n appUsersManager_1.default.contactsFillPromise = Promise.resolve(appUsersManager_1.default.contactsList);\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 this.log('Set tempID to:', tempID);\r\n this.tempID = tempID;\r\n } */\r\n appMessagesManager_1.default.saveMessages(messages);\r\n // FIX FILE_REFERENCE_EXPIRED KOSTIL'1999\r\n for (let message of messages) {\r\n if (message.media) {\r\n appMessagesManager_1.default.wrapSingleMessage(message.mid, true);\r\n }\r\n }\r\n }\r\n if (allDialogsLoaded) {\r\n appMessagesManager_1.default.dialogsStorage.allDialogsLoaded = allDialogsLoaded;\r\n }\r\n if (filters) {\r\n for (const filterID in filters) {\r\n appMessagesManager_1.default.filtersStorage.saveDialogFilter(filters[filterID], false);\r\n }\r\n }\r\n if (dialogs) {\r\n dialogs.forEachReverse(dialog => {\r\n appMessagesManager_1.default.saveConversation(dialog);\r\n });\r\n }\r\n apiUpdatesManager_1.default.attach(updates !== null && updates !== void 0 ? updates : null);\r\n resolve(state);\r\n }).catch(resolve).finally(() => {\r\n setInterval(() => this.saveState(), 10000);\r\n });\r\n });\r\n }\r\n getState() {\r\n return this.loadSavedState();\r\n }\r\n saveState() {\r\n var _a, _b;\r\n const messages = [];\r\n const dialogs = [];\r\n const peers = this.state.peers;\r\n for (const folderID in appMessagesManager_1.default.dialogsStorage.byFolders) {\r\n const folder = appMessagesManager_1.default.dialogsStorage.getFolder(+folderID);\r\n for (let dialog of folder) {\r\n const historyStorage = appMessagesManager_1.default.historiesStorage[dialog.peerID];\r\n const 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 (const mid of history) {\r\n const message = appMessagesManager_1.default.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 const us = apiUpdatesManager_1.default.updatesState;\r\n const updates = {\r\n seq: us.seq,\r\n pts: us.pts,\r\n date: us.date\r\n };\r\n const contactsList = [...appUsersManager_1.default.contactsList];\r\n for (const userID of contactsList) {\r\n if (!peers[userID]) {\r\n peers[userID] = appUsersManager_1.default.getUser(userID);\r\n }\r\n }\r\n const filters = appMessagesManager_1.default.filtersStorage.filters;\r\n //const pinnedOrders = appMessagesManager.dialogsStorage.pinnedOrders;\r\n storage_1.default.set({\r\n state: Object.assign({}, this.state, {\r\n dialogs,\r\n messages,\r\n allDialogsLoaded: appMessagesManager_1.default.dialogsStorage.allDialogsLoaded,\r\n peers,\r\n contactsList,\r\n filters,\r\n //pinnedOrders,\r\n updates,\r\n maxSeenMsgID: appMessagesManager_1.default.maxSeenID\r\n })\r\n });\r\n }\r\n pushToState(key, value) {\r\n this.state[key] = value;\r\n }\r\n pushPeer(peerID) {\r\n this.state.peers[peerID] = appPeersManager_1.default.getPeer(peerID);\r\n }\r\n}\r\nexports.AppStateManager = AppStateManager;\r\nconst appStateManager = new AppStateManager();\r\n// @ts-ignore\r\nif (process.env.NODE_ENV != 'production') {\r\n window.appStateManager = appStateManager;\r\n}\r\nexports.default = appStateManager;\r\n" - }, - { - "id": 41, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\avatar.ts", - "name": "./src/components/avatar.ts", - "index": 58, - "index2": 51, - "size": 2864, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "../../components/avatar", - "loc": "33:33-67" - }, - { - "moduleId": 14, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": "34:33-67" - }, - { - "moduleId": 16, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts", - "module": "./src/lib/appManagers/appDialogsManager.ts", - "moduleName": "./src/lib/appManagers/appDialogsManager.ts", - "type": "cjs require", - "userRequest": "../../components/avatar", - "loc": "27:33-67" - }, - { - "moduleId": 36, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popup.ts", - "module": "./src/components/popup.ts", - "moduleName": "./src/components/popup.ts", - "type": "cjs require", - "userRequest": "./avatar", - "loc": "7:33-52" - } - ], - "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 //console.log('avatar changed attribute:', name, oldValue, newValue);\r\n // вызывается при изменении одного из перечисленных выше атрибутов\r\n if (name == 'peer') {\r\n if (this.peerID == +newValue) {\r\n return;\r\n }\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": 42, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\appForward.ts", - "name": "./src/components/appForward.ts", - "index": 67, - "index2": 60, - "size": 3152, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "../../components/appForward", - "loc": "31:37-75" - }, - { - "moduleId": 24, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", - "type": "cjs require", - "userRequest": "../../components/appForward", - "loc": "51:37-75" - }, - { - "moduleId": 56, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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" - }, - { - "moduleId": 106, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\contextMenu.ts", - "module": "./src/components/chat/contextMenu.ts", - "moduleName": "./src/components/chat/contextMenu.ts", - "type": "cjs require", - "userRequest": "../appForward", - "loc": "12:37-61" - } - ], - "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.sidebarWasActive ? Promise.resolve() : appSidebarRight_1.default.toggleSidebar(false)).then(() => {\r\n this.cleanup();\r\n this.container.classList.remove('active');\r\n });\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', 'contacts'], () => {\r\n //console.log('forward rendered:', this.container.querySelector('.selector ul').childElementCount);\r\n this.sidebarWasActive = appSidebarRight_1.default.sidebarEl.classList.contains('active');\r\n appSidebarRight_1.default.toggleSidebar(true);\r\n });\r\n }\r\n}\r\nexports.default = new AppForward();\r\n" - }, - { - "id": 43, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\appSearch.ts", - "name": "./src/components/appSearch.ts", - "index": 74, - "index2": 67, - "size": 11163, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "issuerId": 24, - "issuerName": "./src/lib/appManagers/appSidebarRight.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 24, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "name": "./src/lib/appManagers/appSidebarRight.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 1584, - "building": 1606, - "dependencies": 2 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 14, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": "30:33-70" - }, - { - "moduleId": 24, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", - "type": "cjs require", - "userRequest": "../../components/appSearch", - "loc": "50:33-70" - }, - { - "moduleId": 92, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\newGroup.ts", - "module": "./src/components/sidebarLeft/newGroup.ts", - "moduleName": "./src/components/sidebarLeft/newGroup.ts", - "type": "cjs require", - "userRequest": "../appSearch", - "loc": "25:20-43" - }, - { - "moduleId": 107, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\search.ts", - "module": "./src/components/chat/search.ts", - "moduleName": "./src/components/chat/search.ts", - "type": "cjs require", - "userRequest": "../appSearch", - "loc": "28:33-56" - } - ], - "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 if (name) {\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.append(this.nameEl);\r\n }\r\n this.container.classList.add('search-group', 'search-group-' + type);\r\n this.container.append(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, onSearch) {\r\n this.container = container;\r\n this.searchInput = searchInput;\r\n this.searchGroups = searchGroups;\r\n this.onSearch = onSearch;\r\n this.minMsgID = 0;\r\n this.loadedCount = -1;\r\n this.foundCount = -1;\r\n this.offsetRate = 0;\r\n this.loadedContacts = false;\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 if (this.searchGroups.messages) {\r\n this.scrollable.setVirtualContainer(this.searchGroups.messages.list);\r\n }\r\n this.searchInput.onChange = (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 = window.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 = -1;\r\n this.foundCount = -1;\r\n this.offsetRate = 0;\r\n this.loadedContacts = false;\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.input.focus();\r\n }\r\n renderSaved() {\r\n const group = this.searchGroups.contacts;\r\n let { dialog, dom } = appDialogsManager_1.default.addDialog(utils_1.$rootScope.myID, group.list, false);\r\n dom.lastMessageSpan.innerHTML = 'chat with yourself';\r\n group.setActive();\r\n }\r\n searchMore() {\r\n if (this.searchPromise)\r\n return this.searchPromise;\r\n const query = this.query;\r\n if (!query.trim()) {\r\n this.onSearch && this.onSearch(0);\r\n return;\r\n }\r\n if (this.foundCount != -1 && this.loadedCount >= this.foundCount) {\r\n return Promise.resolve();\r\n }\r\n const maxID = appMessagesIDsManager_1.default.getMessageIDInfo(this.minMsgID)[0] || 0;\r\n if (!this.peerID && !maxID && !this.loadedContacts) {\r\n let renderedSaved = false;\r\n if ('saved messages'.includes(query.toLowerCase())\r\n || appUsersManager_1.default.getUser(utils_1.$rootScope.myID).sortName.includes(query.toLowerCase()) /* && this.searchGroups.hasOwnProperty('saved') */) {\r\n this.renderSaved();\r\n renderedSaved = true;\r\n }\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.loadedContacts = true;\r\n // set saved message as first peer to render\r\n const peer = contacts.my_results.findAndSplice(p => p.user_id == utils_1.$rootScope.myID);\r\n if (peer) {\r\n contacts.my_results.unshift(peer);\r\n }\r\n //console.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 if (peerID == utils_1.$rootScope.myID) {\r\n if (!renderedSaved) {\r\n this.renderSaved();\r\n }\r\n return;\r\n }\r\n let peer = appPeersManager_1.default.getPeer(peerID);\r\n let originalDialog = appMessagesManager_1.default.getDialogByPeerID(peerID)[0];\r\n //////////this.log('contacts peer', peer);\r\n if (!originalDialog) {\r\n /////////this.log('no original dialog by peerID:', peerID);\r\n originalDialog = {\r\n peerID: peerID,\r\n pFlags: {},\r\n peer: peer\r\n };\r\n }\r\n let { dialog, dom } = appDialogsManager_1.default.addDialog(originalDialog, group.list, false);\r\n if (showMembersCount && (peer.participants_count || peer.participants)) {\r\n let regExp = new RegExp(`(${utils_1.escapeRegExp(query)})`, 'gi');\r\n dom.titleSpan.innerHTML = dom.titleSpan.innerHTML.replace(regExp, '$1');\r\n 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 = '' + username + '';\r\n }\r\n });\r\n if (results.length)\r\n group.setActive();\r\n else if (renderedSaved) { // удалить все пункты снизу\r\n Array.from(group.list.children).slice(1).forEach(c => c.remove());\r\n }\r\n else {\r\n group.clear();\r\n }\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 //console.log('input search result:', this.peerID, query, null, maxID, 20, res);\r\n const { count, history, next_rate } = res;\r\n if (history[0] == this.minMsgID) {\r\n history.shift();\r\n }\r\n const searchGroup = this.searchGroups.messages;\r\n searchGroup.setActive();\r\n history.forEach((msgID) => {\r\n const 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 const { dialog, dom } = appDialogsManager_1.default.addDialog(originalDialog, this.scrollable /* 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.loadedCount == -1) {\r\n this.loadedCount = 0;\r\n }\r\n if (this.foundCount == -1) {\r\n this.foundCount = count;\r\n this.onSearch && this.onSearch(this.foundCount);\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": 44, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appStickersManager.ts", - "name": "./src/lib/appManagers/appStickersManager.ts", - "index": 78, - "index2": 70, - "size": 10171, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "./appStickersManager", - "loc": "32:45-76" - }, - { - "moduleId": 61, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popupStickers.ts", - "module": "./src/components/popupStickers.ts", - "moduleName": "./src/components/popupStickers.ts", - "type": "cjs require", - "userRequest": "../lib/appManagers/appStickersManager", - "loc": "7:45-93" - }, - { - "moduleId": 85, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\stickers.ts", - "module": "./src/components/sidebarRight/stickers.ts", - "moduleName": "./src/components/sidebarRight/stickers.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appStickersManager", - "loc": "30:45-96" - }, - { - "moduleId": 102, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\stickers.ts", - "module": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "type": "cjs require", - "userRequest": "../../../lib/appManagers/appStickersManager", - "loc": "37:45-99" - } - ], - "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 appDocsManager_1 = __importDefault(require(\"./appDocsManager\"));\r\nconst utils_1 = require(\"../utils\");\r\nclass AppStickersManager {\r\n constructor() {\r\n this.stickerSets = {};\r\n this.hashes = {\r\n featured: {},\r\n search: {}\r\n };\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 utils_1.$rootScope.$on('apiUpdate', (e) => {\r\n const update = e.detail;\r\n switch (update._) {\r\n case 'updateNewStickerSet': {\r\n this.saveStickerSet(update.stickerset, update.stickerset.set.id);\r\n utils_1.$rootScope.$broadcast('stickers_installed', update.stickerset.set);\r\n break;\r\n }\r\n }\r\n });\r\n }\r\n saveStickers(docs) {\r\n docs.forEachReverse((doc, idx) => {\r\n doc = appDocsManager_1.default.saveDoc(doc);\r\n if (!doc)\r\n docs.splice(idx, 1);\r\n else\r\n docs[idx] = doc;\r\n });\r\n }\r\n getStickerSet(set, params = {}) {\r\n var _a;\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (this.stickerSets[set.id] && !params.overwrite && ((_a = this.stickerSets[set.id].documents) === null || _a === void 0 ? void 0 : _a.length))\r\n return this.stickerSets[set.id];\r\n const stickerSet = yield mtprotoworker_1.default.invokeApi('messages.getStickerSet', {\r\n stickerset: this.getStickerSetInput(set)\r\n });\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 const res = yield mtprotoworker_1.default.invokeApi('messages.getRecentStickers', { flags: 0, hash: 0 });\r\n if (res._ == 'messages.recentStickers') {\r\n this.saveStickers(res.stickers);\r\n }\r\n return res;\r\n });\r\n }\r\n getAnimatedEmojiSticker(emoji) {\r\n let stickerSet = this.stickerSets.emoji;\r\n if (!stickerSet || !stickerSet.documents)\r\n return undefined;\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);w\r\n const newSet = {\r\n _: 'messages.stickerSet',\r\n set: res.set,\r\n packs: res.packs,\r\n documents: res.documents\r\n };\r\n if (this.stickerSets[id]) {\r\n Object.assign(this.stickerSets[id], newSet);\r\n }\r\n else {\r\n this.stickerSets[id] = newSet;\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 = window.setTimeout(() => {\r\n const savedSets = {};\r\n for (const id in this.stickerSets) {\r\n const set = this.stickerSets[id];\r\n if (set.set.installed_date || id == 'emoji') {\r\n savedSets[id] = set;\r\n }\r\n }\r\n storage_1.default.set({\r\n stickerSets: savedSets\r\n });\r\n this.saveSetsTimeout = 0;\r\n }, 100);\r\n }\r\n getStickerSetThumbDownloadOptions(stickerSet) {\r\n var _a;\r\n const thumb = stickerSet.thumb;\r\n const dcID = stickerSet.thumb_dc_id;\r\n const isAnimated = (_a = stickerSet.pFlags) === null || _a === void 0 ? void 0 : _a.animated;\r\n const input = {\r\n _: 'inputStickerSetThumb',\r\n stickerset: this.getStickerSetInput(stickerSet),\r\n volume_id: thumb.location.volume_id,\r\n local_id: thumb.location.local_id\r\n };\r\n return { dcID, location: input, size: thumb.size, mimeType: isAnimated ? \"application/x-tgsticker\" : 'image/webp' };\r\n }\r\n /* public getStickerSetThumbURL(stickerSet: MTStickerSet) {\r\n const thumb = stickerSet.thumb;\r\n const dcID = stickerSet.thumb_dc_id;\r\n \r\n const isAnimated = stickerSet.pFlags?.animated;\r\n \r\n const input: inputStickerSetThumb = {\r\n _: 'inputStickerSetThumb',\r\n stickerset: this.getStickerSetInput(stickerSet),\r\n volume_id: thumb.location.volume_id,\r\n local_id: thumb.location.local_id\r\n };\r\n \r\n const url = getFileURL('document', this.getStickerSetThumbDownloadOptions(stickerSet));\r\n return url;\r\n \r\n //return promise;\r\n } */\r\n getStickerSetInput(set) {\r\n return 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 getFeaturedStickers() {\r\n var _a, _b;\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const res = yield mtprotoworker_1.default.invokeApi('messages.getFeaturedStickers', {\r\n hash: ((_a = this.hashes.featured) === null || _a === void 0 ? void 0 : _a.hash) || 0\r\n });\r\n const hashed = (_b = this.hashes.featured) !== null && _b !== void 0 ? _b : (this.hashes.featured = {});\r\n if (res._ != 'messages.featuredStickersNotModified') {\r\n hashed.hash = res.hash;\r\n hashed.result = res.sets;\r\n }\r\n hashed.result.forEach(covered => {\r\n this.saveStickerSet({ set: covered.set, documents: [], packs: [] }, covered.set.id);\r\n });\r\n return hashed.result;\r\n });\r\n }\r\n toggleStickerSet(set) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (set.installed_date) {\r\n const res = yield mtprotoworker_1.default.invokeApi('messages.uninstallStickerSet', {\r\n stickerset: this.getStickerSetInput(set)\r\n });\r\n if (res) {\r\n delete set.installed_date;\r\n utils_1.$rootScope.$broadcast('stickers_deleted', set);\r\n return true;\r\n }\r\n }\r\n else {\r\n const res = yield mtprotoworker_1.default.invokeApi('messages.installStickerSet', {\r\n stickerset: this.getStickerSetInput(set),\r\n archived: false\r\n });\r\n if (res) {\r\n set.installed_date = Date.now() / 1000 | 0;\r\n utils_1.$rootScope.$broadcast('stickers_installed', set);\r\n return true;\r\n }\r\n }\r\n return false;\r\n });\r\n }\r\n searchStickerSets(query, excludeFeatured = true) {\r\n var _a, _b;\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const flags = excludeFeatured ? 1 : 0;\r\n const res = yield mtprotoworker_1.default.invokeApi('messages.searchStickerSets', {\r\n flags,\r\n exclude_featured: excludeFeatured || undefined,\r\n q: query,\r\n hash: ((_a = this.hashes.search[query]) === null || _a === void 0 ? void 0 : _a.hash) || 0\r\n });\r\n const hashed = (_b = this.hashes.search[query]) !== null && _b !== void 0 ? _b : (this.hashes.search[query] = {});\r\n if (res._ != 'messages.foundStickerSetsNotModified') {\r\n hashed.hash = res.hash;\r\n hashed.result = res.sets;\r\n }\r\n hashed.result.forEach(covered => {\r\n this.saveStickerSet({ set: covered.set, documents: [], packs: [] }, covered.set.id);\r\n });\r\n const foundSaved = [];\r\n for (let id in this.stickerSets) {\r\n const { set } = this.stickerSets[id];\r\n if (set.title.toLowerCase().includes(query.toLowerCase()) && !hashed.result.find(c => c.set.id == set.id)) {\r\n foundSaved.push({ _: 'stickerSetCovered', set, cover: null });\r\n }\r\n }\r\n return hashed.result.concat(foundSaved);\r\n });\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\n// @ts-ignore\r\nif (process.env.NODE_ENV != 'production') {\r\n window.appStickersManager = appStickersManager;\r\n}\r\nexports.default = appStickersManager;\r\n" - }, - { - "id": 45, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\toast.ts", - "name": "./src/components/toast.ts", - "index": 83, - "index2": 74, - "size": 524, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\AppInlineBotsManager.ts", - "issuerId": 62, - "issuerName": "./src/lib/appManagers/AppInlineBotsManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 62, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\AppInlineBotsManager.ts", - "name": "./src/lib/appManagers/AppInlineBotsManager.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 870, - "building": 1451 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 62, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\AppInlineBotsManager.ts", - "module": "./src/lib/appManagers/AppInlineBotsManager.ts", - "moduleName": "./src/lib/appManagers/AppInlineBotsManager.ts", - "type": "cjs require", - "userRequest": "../../components/toast", - "loc": "12:16-49" - }, - { - "moduleId": 95, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\chatFolders.ts", - "module": "./src/components/sidebarLeft/chatFolders.ts", - "moduleName": "./src/components/sidebarLeft/chatFolders.ts", - "type": "cjs require", - "userRequest": "../toast", - "loc": "14:16-35" - }, - { - "moduleId": 96, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\editFolder.ts", - "module": "./src/components/sidebarLeft/editFolder.ts", - "moduleName": "./src/components/sidebarLeft/editFolder.ts", - "type": "cjs require", - "userRequest": "../toast", - "loc": "31:16-35" - }, - { - "moduleId": 103, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popupCreatePoll.ts", - "module": "./src/components/popupCreatePoll.ts", - "moduleName": "./src/components/popupCreatePoll.ts", - "type": "cjs require", - "userRequest": "./toast", - "loc": "10:16-34" - } - ], - "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.toast = void 0;\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\n" - }, - { - "id": 46, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popupAvatar.ts", - "name": "./src/components/popupAvatar.ts", - "index": 87, - "index2": 80, - "size": 3372, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignUp.ts", - "issuerId": 80, - "issuerName": "./src/pages/pageSignUp.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 49, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "name": "./src/pages/pageSignIn.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 79, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageAuthCode.ts", - "name": "./src/pages/pageAuthCode.ts", - "profile": { - "factory": 104, - "building": 1053, - "dependencies": 527 - } - }, - { - "id": 80, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignUp.ts", - "name": "./src/pages/pageSignUp.ts", - "profile": { - "factory": 575, - "building": 2297, - "dependencies": 2 - } - } - ], - "profile": { - "factory": 4426, - "building": 735, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 80, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignUp.ts", - "module": "./src/pages/pageSignUp.ts", - "moduleName": "./src/pages/pageSignUp.ts", - "type": "cjs require", - "userRequest": "../components/popupAvatar", - "loc": "30:38-74" - }, - { - "moduleId": 88, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\newChannel.ts", - "module": "./src/components/sidebarLeft/newChannel.ts", - "moduleName": "./src/components/sidebarLeft/newChannel.ts", - "type": "cjs require", - "userRequest": "../popupAvatar", - "loc": "25:38-63" - }, - { - "moduleId": 92, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\newGroup.ts", - "module": "./src/components/sidebarLeft/newGroup.ts", - "moduleName": "./src/components/sidebarLeft/newGroup.ts", - "type": "cjs require", - "userRequest": "../popupAvatar", - "loc": "26:38-63" - }, - { - "moduleId": 94, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\editProfile.ts", - "module": "./src/components/sidebarLeft/editProfile.ts", - "moduleName": "./src/components/sidebarLeft/editProfile.ts", - "type": "cjs require", - "userRequest": "../popupAvatar", - "loc": "6:38-63" - } - ], - "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 appDownloadManager_1 = __importDefault(require(\"../lib/appManagers/appDownloadManager\"));\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 appDownloadManager_1.default.upload(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": 47, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\index.ts", - "name": "./src/components/emoticonsDropdown/index.ts", - "index": 99, - "index2": 96, - "size": 13705, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\input.ts", - "issuerId": 98, - "issuerName": "./src/components/chat/input.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 98, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\input.ts", - "name": "./src/components/chat/input.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 2199, - "building": 778, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 98, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\input.ts", - "module": "./src/components/chat/input.ts", - "moduleName": "./src/components/chat/input.ts", - "type": "cjs require", - "userRequest": "../emoticonsDropdown", - "loc": "21:44-75" - }, - { - "moduleId": 100, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\gifs.ts", - "module": "./src/components/emoticonsDropdown/tabs/gifs.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/gifs.ts", - "type": "cjs require", - "userRequest": "..", - "loc": "6:12-25" - }, - { - "moduleId": 101, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\emoji.ts", - "module": "./src/components/emoticonsDropdown/tabs/emoji.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/emoji.ts", - "type": "cjs require", - "userRequest": "..", - "loc": "6:12-25" - }, - { - "moduleId": 102, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\stickers.ts", - "module": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "type": "cjs require", - "userRequest": "..", - "loc": "34:25-38" - } - ], - "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.EmoticonsDropdown = exports.EMOTICONSSTICKERGROUP = void 0;\r\nconst lazyLoadQueue_1 = __importDefault(require(\"../lazyLoadQueue\"));\r\nconst gifs_1 = __importDefault(require(\"./tabs/gifs\"));\r\nconst config_1 = require(\"../../lib/config\");\r\nconst utils_1 = require(\"../../lib/utils\");\r\nconst horizontalMenu_1 = require(\"../horizontalMenu\");\r\nconst animationIntersector_1 = __importDefault(require(\"../animationIntersector\"));\r\nconst appSidebarRight_1 = __importDefault(require(\"../../lib/appManagers/appSidebarRight\"));\r\nconst appImManager_1 = __importDefault(require(\"../../lib/appManagers/appImManager\"));\r\nconst emoji_1 = __importDefault(require(\"./tabs/emoji\"));\r\nconst stickers_1 = __importDefault(require(\"./tabs/stickers\"));\r\nconst stickyIntersector_1 = __importDefault(require(\"../stickyIntersector\"));\r\nexports.EMOTICONSSTICKERGROUP = 'emoticons-dropdown';\r\nconst test = false;\r\nlet EmoticonsDropdown = /** @class */ (() => {\r\n class EmoticonsDropdown {\r\n constructor() {\r\n this.tabID = -1;\r\n this.events = {\r\n onClose: [],\r\n onCloseAfter: [],\r\n onOpen: [],\r\n onOpenAfter: []\r\n };\r\n this.toggle = (enable) => __awaiter(this, void 0, void 0, function* () {\r\n //if(!this.element) return;\r\n const willBeActive = (!!this.element.style.display && enable === undefined) || enable;\r\n if (this.init) {\r\n if (willBeActive) {\r\n this.init();\r\n this.init = null;\r\n }\r\n else {\r\n return;\r\n }\r\n }\r\n if (config_1.touchSupport) {\r\n this.toggleEl.classList.toggle('flip-icon', willBeActive);\r\n if (willBeActive) {\r\n appImManager_1.default.chatInputC.saveScroll();\r\n // @ts-ignore\r\n document.activeElement.blur();\r\n yield new Promise((resolve) => {\r\n setTimeout(resolve, 100);\r\n });\r\n }\r\n }\r\n else {\r\n this.toggleEl.classList.toggle('active', enable);\r\n }\r\n if ((this.element.style.display && enable === undefined) || enable) {\r\n this.events.onOpen.forEach(cb => cb());\r\n EmoticonsDropdown.lazyLoadQueue.lock();\r\n //EmoticonsDropdown.lazyLoadQueue.unlock();\r\n animationIntersector_1.default.lockIntersectionGroup(exports.EMOTICONSSTICKERGROUP);\r\n this.element.style.display = '';\r\n void this.element.offsetLeft; // reflow\r\n this.element.classList.add('active');\r\n clearTimeout(this.displayTimeout);\r\n this.displayTimeout = window.setTimeout(() => {\r\n animationIntersector_1.default.unlockIntersectionGroup(exports.EMOTICONSSTICKERGROUP);\r\n EmoticonsDropdown.lazyLoadQueue.unlock();\r\n EmoticonsDropdown.lazyLoadQueue.refresh();\r\n this.events.onOpenAfter.forEach(cb => cb());\r\n }, config_1.touchSupport ? 0 : 200);\r\n /* if(touchSupport) {\r\n this.restoreScroll();\r\n } */\r\n }\r\n else {\r\n this.events.onClose.forEach(cb => cb());\r\n EmoticonsDropdown.lazyLoadQueue.lock();\r\n //EmoticonsDropdown.lazyLoadQueue.lock();\r\n // нужно залочить группу и выключить стикеры\r\n animationIntersector_1.default.lockIntersectionGroup(exports.EMOTICONSSTICKERGROUP);\r\n animationIntersector_1.default.checkAnimations(true, exports.EMOTICONSSTICKERGROUP);\r\n this.element.classList.remove('active');\r\n clearTimeout(this.displayTimeout);\r\n this.displayTimeout = window.setTimeout(() => {\r\n this.element.style.display = 'none';\r\n // теперь можно убрать visible, чтобы они не включились после фокуса\r\n animationIntersector_1.default.unlockIntersectionGroup(exports.EMOTICONSSTICKERGROUP);\r\n EmoticonsDropdown.lazyLoadQueue.unlock();\r\n EmoticonsDropdown.lazyLoadQueue.refresh();\r\n this.events.onCloseAfter.forEach(cb => cb());\r\n }, config_1.touchSupport ? 0 : 200);\r\n /* if(touchSupport) {\r\n this.restoreScroll();\r\n } */\r\n }\r\n //animationIntersector.checkAnimations(false, EMOTICONSSTICKERGROUP);\r\n });\r\n this.element = document.getElementById('emoji-dropdown');\r\n let firstTime = true;\r\n this.toggleEl = document.getElementById('toggle-emoticons');\r\n if (config_1.touchSupport) {\r\n this.toggleEl.addEventListener('click', () => {\r\n if (firstTime) {\r\n firstTime = false;\r\n this.toggle(true);\r\n }\r\n else {\r\n this.toggle();\r\n }\r\n });\r\n }\r\n else {\r\n this.toggleEl.onmouseover = (e) => {\r\n clearTimeout(this.displayTimeout);\r\n //this.displayTimeout = setTimeout(() => {\r\n if (firstTime) {\r\n this.toggleEl.onmouseout = this.element.onmouseout = (e) => {\r\n if (test)\r\n return;\r\n if (!this.element.classList.contains('active'))\r\n return;\r\n const toElement = e.toElement;\r\n if (toElement && utils_1.findUpClassName(toElement, 'emoji-dropdown')) {\r\n return;\r\n }\r\n clearTimeout(this.displayTimeout);\r\n this.displayTimeout = window.setTimeout(() => {\r\n this.toggle(false);\r\n }, 200);\r\n };\r\n this.element.onmouseover = (e) => {\r\n clearTimeout(this.displayTimeout);\r\n };\r\n firstTime = false;\r\n }\r\n this.toggle(true);\r\n //}, 0/* 200 */);\r\n };\r\n }\r\n }\r\n init() {\r\n this.emojiTab = new emoji_1.default();\r\n this.stickersTab = new stickers_1.default();\r\n this.gifsTab = new gifs_1.default();\r\n this.tabs = {\r\n 0: this.emojiTab,\r\n 1: this.stickersTab,\r\n 2: this.gifsTab\r\n };\r\n this.container = this.element.querySelector('.emoji-container .tabs-container');\r\n this.tabsEl = this.element.querySelector('.emoji-tabs');\r\n horizontalMenu_1.horizontalMenu(this.tabsEl, this.container, (id) => {\r\n animationIntersector_1.default.checkAnimations(true, exports.EMOTICONSSTICKERGROUP);\r\n this.tabID = id;\r\n this.searchButton.classList.toggle('hide', this.tabID == 0);\r\n this.deleteBtn.classList.toggle('hide', this.tabID != 0);\r\n }, () => {\r\n const tab = this.tabs[this.tabID];\r\n if (tab.init) {\r\n tab.init();\r\n }\r\n tab.onCloseAfterTimeout && tab.onCloseAfterTimeout();\r\n animationIntersector_1.default.checkAnimations(false, exports.EMOTICONSSTICKERGROUP);\r\n });\r\n this.searchButton = this.element.querySelector('.emoji-tabs-search');\r\n this.searchButton.addEventListener('click', () => {\r\n if (this.tabID == 1) {\r\n appSidebarRight_1.default.stickersTab.init();\r\n }\r\n else {\r\n appSidebarRight_1.default.gifsTab.init();\r\n }\r\n });\r\n this.deleteBtn = this.element.querySelector('.emoji-tabs-delete');\r\n this.deleteBtn.addEventListener('click', () => {\r\n var _a;\r\n const input = appImManager_1.default.chatInputC.messageInput;\r\n if ((_a = input.lastChild) === null || _a === void 0 ? void 0 : _a.tagName) {\r\n input.lastElementChild.remove();\r\n }\r\n else if (input.lastChild) {\r\n if (!input.lastChild.textContent.length) {\r\n input.lastChild.remove();\r\n }\r\n else {\r\n input.lastChild.textContent = input.lastChild.textContent.slice(0, -1);\r\n }\r\n }\r\n const event = new Event('input', { bubbles: true, cancelable: true });\r\n appImManager_1.default.chatInputC.messageInput.dispatchEvent(event);\r\n //appSidebarRight.stickersTab.init();\r\n });\r\n this.tabsEl.firstElementChild.children[1].click(); // set emoji tab\r\n this.tabs[0].init(); // onTransitionEnd не вызовется, т.к. это первая открытая вкладка\r\n }\r\n }\r\n EmoticonsDropdown.lazyLoadQueue = new lazyLoadQueue_1.default();\r\n EmoticonsDropdown.menuOnClick = (menu, scroll, menuScroll) => {\r\n let prevId = 0;\r\n let jumpedTo = -1;\r\n const setActive = (id) => {\r\n if (id == prevId) {\r\n return false;\r\n }\r\n menu.children[prevId].classList.remove('active');\r\n menu.children[id].classList.add('active');\r\n prevId = id;\r\n return true;\r\n };\r\n const stickyIntersector = new stickyIntersector_1.default(scroll.container, (stuck, target) => {\r\n //console.log('sticky scrollTOp', stuck, target, scroll.container.scrollTop);\r\n if (Math.abs(jumpedTo - scroll.container.scrollTop) <= 1) {\r\n return;\r\n }\r\n else {\r\n jumpedTo = -1;\r\n }\r\n const which = utils_1.whichChild(target);\r\n if (!stuck && which) { // * due to stickyIntersector\r\n return;\r\n }\r\n setActive(which);\r\n if (menuScroll) {\r\n if (which < menu.childElementCount - 4) {\r\n menuScroll.container.scrollLeft = (which - 3) * 47;\r\n }\r\n else {\r\n menuScroll.container.scrollLeft = which * 47;\r\n }\r\n }\r\n });\r\n menu.addEventListener('click', (e) => {\r\n let target = e.target;\r\n target = utils_1.findUpTag(target, 'LI');\r\n if (!target) {\r\n return;\r\n }\r\n const which = utils_1.whichChild(target);\r\n if (!setActive(which)) {\r\n return;\r\n }\r\n const element = (scroll.splitUp || scroll.container).children[which];\r\n const offsetTop = element.offsetTop + 1; // * due to stickyIntersector\r\n scroll.container.scrollTop = jumpedTo = offsetTop;\r\n //console.log('set scrollTop:', offsetTop);\r\n });\r\n return stickyIntersector;\r\n };\r\n EmoticonsDropdown.onMediaClick = (e) => {\r\n let target = e.target;\r\n target = utils_1.findUpTag(target, 'DIV');\r\n if (!target)\r\n return;\r\n const fileID = target.dataset.docID;\r\n if (!fileID)\r\n return;\r\n if (appImManager_1.default.chatInputC.sendMessageWithDocument(fileID)) {\r\n /* dropdown.classList.remove('active');\r\n toggleEl.classList.remove('active'); */\r\n emoticonsDropdown.toggle(false);\r\n }\r\n else {\r\n console.warn('got no doc by id:', fileID);\r\n }\r\n };\r\n return EmoticonsDropdown;\r\n})();\r\nexports.EmoticonsDropdown = EmoticonsDropdown;\r\nconst emoticonsDropdown = new EmoticonsDropdown();\r\n// @ts-ignore\r\nif (process.env.NODE_ENV != 'production') {\r\n window.emoticonsDropdown = emoticonsDropdown;\r\n}\r\nexports.default = emoticonsDropdown;\r\n" - }, - { - "id": 48, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\helpers\\userAgent.ts", - "name": "./src/helpers/userAgent.ts", - "index": 8, - "index2": 6, - "size": 1248, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\config.ts", - "issuerId": 1, - "issuerName": "./src/lib/config.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 1, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\config.ts", - "name": "./src/lib/config.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - } - ], - "profile": { - "factory": 1, - "building": 374 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 1, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\config.ts", - "module": "./src/lib/config.ts", - "moduleName": "./src/lib/config.ts", - "type": "cjs require", - "userRequest": "../helpers/userAgent", - "loc": "19:20-51" - }, - { - "moduleId": 13, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appPhotosManager.ts", - "module": "./src/lib/appManagers/appPhotosManager.ts", - "moduleName": "./src/lib/appManagers/appPhotosManager.ts", - "type": "cjs require", - "userRequest": "../../helpers/userAgent", - "loc": "10:20-54" - }, - { - "moduleId": 50, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mediaPlayer.ts", - "module": "./src/lib/mediaPlayer.ts", - "moduleName": "./src/lib/mediaPlayer.ts", - "type": "cjs require", - "userRequest": "../helpers/userAgent", - "loc": "10:20-51" - } - ], - "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.isSafari = exports.isAppleMobile = exports.isAndroid = exports.isApple = exports.userAgent = void 0;\r\nexports.userAgent = navigator ? navigator.userAgent : null;\r\nexports.isApple = navigator.userAgent.search(/OS X|iPhone|iPad|iOS/i) != -1;\r\nexports.isAndroid = navigator.userAgent.toLowerCase().indexOf('android') != -1;\r\n/**\r\n * Returns true when run in WebKit derived browsers.\r\n * This is used as a workaround for a memory leak in Safari caused by using Transferable objects to\r\n * transfer data between WebWorkers and the main thread.\r\n * https://github.com/mapbox/mapbox-gl-js/issues/8771\r\n *\r\n * This should be removed once the underlying Safari issue is fixed.\r\n */\r\nconst ctx = typeof (window) !== 'undefined' ? window : self;\r\n// https://stackoverflow.com/a/58065241\r\nexports.isAppleMobile = (/iPad|iPhone|iPod/.test(navigator.platform) ||\r\n (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1)) &&\r\n !ctx.MSStream;\r\nexports.isSafari = !!('safari' in ctx) || !!(exports.userAgent && (/\\b(iPad|iPhone|iPod)\\b/.test(exports.userAgent) || (!!exports.userAgent.match('Safari') && !exports.userAgent.match('Chrome')))) /* || true */;\r\n" - }, - { - "id": 49, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "name": "./src/pages/pageSignIn.ts", - "index": 23, - "index2": 112, - "size": 11141, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "issuerId": 67, - "issuerName": "./src/index.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - } - ], - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 67, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "module": "./src/index.ts", - "moduleName": "./src/index.ts", - "type": "cjs require", - "userRequest": "./pages/pageSignIn", - "loc": "91:57-86" - }, - { - "moduleId": 79, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 109, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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\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 = null;\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', 'hide');\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 let initSelect = () => {\r\n initSelect = null;\r\n countries.forEach((c) => {\r\n initedSelect = true;\r\n /* let unified = unifiedCountryCodeEmoji(c.code);\r\n let emoji = unified.split('-').reduce((prev, curr) => prev + String.fromCodePoint(parseInt(curr, 16)), ''); */\r\n //let emoji = countryCodeEmoji(c.code);\r\n let emoji = c.emoji;\r\n let liArr = [];\r\n c.phoneCode.split(' and ').forEach((phoneCode) => {\r\n let li = document.createElement('li');\r\n var spanEmoji = document.createElement('span');\r\n /* spanEmoji.innerHTML = countryCodeEmoji(c.code); */\r\n //spanEmoji.classList.add('emoji-outer', 'emoji-sizer');\r\n //spanEmoji.innerHTML = ``;\r\n let kek = richtextprocessor_1.RichTextProcessor.wrapRichText(emoji);\r\n //console.log(c.name, emoji, kek, spanEmoji.innerHTML);\r\n li.appendChild(spanEmoji);\r\n spanEmoji.outerHTML = kek;\r\n li.append(c.name);\r\n var span = document.createElement('span');\r\n span.classList.add('phone-code');\r\n span.innerText = '+' + phoneCode;\r\n li.appendChild(span);\r\n liArr.push(li);\r\n list.append(li);\r\n });\r\n c.li = liArr;\r\n });\r\n list.addEventListener('mousedown', function (e) {\r\n let target = e.target;\r\n if (target.tagName != 'LI')\r\n target = utils_1.findUpTag(target, 'LI');\r\n let countryName = target.childNodes[1].textContent; //target.innerText.split('\\n').shift();\r\n let phoneCode = target.querySelector('.phone-code').innerText;\r\n selectCountryCode.value = countryName;\r\n lastCountrySelected = countries.find(c => c.name == countryName);\r\n telEl.value = phoneCode;\r\n setTimeout(() => telEl.focus(), 0);\r\n //console.log('clicked', e, countryName, phoneCode);\r\n });\r\n parent.appendChild(wrapper);\r\n };\r\n initSelect();\r\n let hideTimeout;\r\n selectCountryCode.addEventListener('focus', function (e) {\r\n if (initSelect) {\r\n initSelect();\r\n }\r\n else {\r\n countries.forEach((c) => {\r\n c.li.forEach(li => li.style.display = '');\r\n });\r\n }\r\n clearTimeout(hideTimeout);\r\n wrapper.classList.remove('hide');\r\n void wrapper.offsetWidth; // reflow\r\n wrapper.classList.add('active');\r\n });\r\n selectCountryCode.addEventListener('blur', function (e) {\r\n wrapper.classList.remove('active');\r\n hideTimeout = setTimeout(() => {\r\n wrapper.classList.add('hide');\r\n }, 200);\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 // Код ниже автоматически выберет страну если она осталась одна при поиске\r\n /* if(matches.length == 1 && matches[0].li.length == 1) {\r\n if(matches[0].name == lastCountrySelected) return false;\r\n //console.log('clicking', matches[0]);\r\n \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 } 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 const telLabel = telEl.nextElementSibling;\r\n telEl.addEventListener('input', function (e) {\r\n this.classList.remove('error');\r\n telLabel.innerText = 'Phone Number';\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 && (!lastCountrySelected || !country || lastCountrySelected.phoneCode != country.phoneCode)) {\r\n selectCountryCode.value = countryName;\r\n lastCountrySelected = country;\r\n }\r\n //if(country && (this.value.length - 1) >= (country.pattern ? country.pattern.length : 9)) {\r\n if (country || (this.value.length - 1) > 1) {\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 (!btnNext.style.visibility && /* 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 telLabel.innerText = '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;\r\n telEl.value = '+' + country.phoneCode.split(' and ').shift();\r\n }\r\n }\r\n //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": 50, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mediaPlayer.ts", - "name": "./src/lib/mediaPlayer.ts", - "index": 63, - "index2": 56, - "size": 25659, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts", - "issuerId": 56, - "issuerName": "./src/lib/appManagers/appMediaViewer.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 56, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts", - "name": "./src/lib/appManagers/appMediaViewer.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 1374, - "building": 1210, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 18, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "module": "./src/components/wrappers.ts", - "moduleName": "./src/components/wrappers.ts", - "type": "cjs require", - "userRequest": "../lib/mediaPlayer", - "loc": "21:38-67" - }, - { - "moduleId": 56, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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" - }, - { - "moduleId": 84, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\audio.ts", - "module": "./src/components/audio.ts", - "moduleName": "./src/components/audio.ts", - "type": "cjs require", - "userRequest": "../lib/mediaPlayer", - "loc": "11:22-51" - } - ], - "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.MediaProgressLine = exports.ProgressLine = void 0;\r\nconst utils_1 = require(\"./utils\");\r\nconst config_1 = require(\"./config\");\r\nconst appMediaPlaybackController_1 = __importDefault(require(\"../components/appMediaPlaybackController\"));\r\nconst userAgent_1 = require(\"../helpers/userAgent\");\r\nclass ProgressLine {\r\n constructor(initialValue = 0) {\r\n this.duration = 1;\r\n this.mousedown = false;\r\n this.events = {};\r\n this.onMouseMove = (e) => {\r\n this.mousedown && this.scrub(e);\r\n };\r\n this.onMouseDown = (e) => {\r\n var _a;\r\n this.scrub(e);\r\n this.mousedown = true;\r\n ((_a = this.events) === null || _a === void 0 ? void 0 : _a.onMouseDown) && this.events.onMouseDown(e);\r\n };\r\n this.onMouseUp = (e) => {\r\n var _a;\r\n this.mousedown = false;\r\n ((_a = this.events) === null || _a === void 0 ? void 0 : _a.onMouseUp) && this.events.onMouseUp(e);\r\n };\r\n this.container = document.createElement('div');\r\n this.container.classList.add('progress-line');\r\n this.filled = document.createElement('div');\r\n this.filled.classList.add('progress-line__filled');\r\n const seek = this.seek = document.createElement('input');\r\n seek.classList.add('progress-line__seek');\r\n seek.value = '' + initialValue;\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 seek.max = '' + (this.duration * 1000);\r\n if (initialValue > 0) {\r\n this.setProgress(initialValue);\r\n }\r\n //this.setListeners();\r\n this.container.append(this.filled, seek);\r\n }\r\n setHandlers(events) {\r\n this.events = events;\r\n }\r\n setListeners() {\r\n this.container.addEventListener('mousemove', this.onMouseMove);\r\n this.container.addEventListener('mousedown', this.onMouseDown);\r\n this.container.addEventListener('mouseup', this.onMouseUp);\r\n if (config_1.touchSupport) {\r\n this.container.addEventListener('touchmove', this.onMouseMove);\r\n this.container.addEventListener('touchstart', this.onMouseDown);\r\n this.container.addEventListener('touchend', this.onMouseUp);\r\n }\r\n }\r\n setProgress(scrubTime) {\r\n this.setFilled(scrubTime);\r\n this.seek.value = '' + (scrubTime * 1000);\r\n }\r\n setFilled(scrubTime) {\r\n let scaleX = scrubTime / this.duration;\r\n scaleX = Math.max(0, Math.min(1, scaleX));\r\n this.filled.style.transform = 'scaleX(' + scaleX + ')';\r\n }\r\n scrub(e) {\r\n var _a;\r\n let offsetX;\r\n if (e instanceof MouseEvent) {\r\n offsetX = e.offsetX;\r\n }\r\n else { // touch\r\n const rect = e.target.getBoundingClientRect();\r\n offsetX = e.targetTouches[0].pageX - rect.left;\r\n }\r\n const scrubTime = offsetX / this.container.offsetWidth * this.duration;\r\n this.setFilled(scrubTime);\r\n ((_a = this.events) === null || _a === void 0 ? void 0 : _a.onScrub) && this.events.onScrub(scrubTime);\r\n return scrubTime;\r\n }\r\n removeListeners() {\r\n this.container.removeEventListener('mousemove', this.onMouseMove);\r\n this.container.removeEventListener('mousedown', this.onMouseDown);\r\n this.container.removeEventListener('mouseup', this.onMouseUp);\r\n if (config_1.touchSupport) {\r\n this.container.removeEventListener('touchmove', this.onMouseMove);\r\n this.container.removeEventListener('touchstart', this.onMouseDown);\r\n this.container.removeEventListener('touchend', this.onMouseUp);\r\n }\r\n this.events = {};\r\n }\r\n}\r\nexports.ProgressLine = ProgressLine;\r\nclass MediaProgressLine extends ProgressLine {\r\n constructor(media, streamable = false) {\r\n super();\r\n this.media = media;\r\n this.streamable = streamable;\r\n this.stopAndScrubTimeout = 0;\r\n this.progressRAF = 0;\r\n this.onLoadedData = () => {\r\n this.duration = this.media.duration;\r\n this.seek.setAttribute('max', '' + this.duration * 1000);\r\n };\r\n this.onEnded = () => {\r\n this.setProgress();\r\n };\r\n this.onPlay = () => {\r\n let r = () => {\r\n this.setProgress();\r\n this.progressRAF = this.media.paused ? 0 : window.requestAnimationFrame(r);\r\n };\r\n if (this.progressRAF) {\r\n window.cancelAnimationFrame(this.progressRAF);\r\n }\r\n if (this.streamable) {\r\n this.setLoadProgress();\r\n }\r\n this.progressRAF = window.requestAnimationFrame(r);\r\n };\r\n this.onProgress = (e) => {\r\n this.setLoadProgress();\r\n };\r\n if (streamable) {\r\n this.filledLoad = document.createElement('div');\r\n this.filledLoad.classList.add('progress-line__filled', 'progress-line__loaded');\r\n this.container.prepend(this.filledLoad);\r\n //this.setLoadProgress();\r\n }\r\n if (!media.paused || media.currentTime > 0) {\r\n this.onPlay();\r\n }\r\n this.setSeekMax();\r\n this.setListeners();\r\n this.setHandlers({\r\n onMouseDown: (e) => {\r\n //super.onMouseDown(e);\r\n //Таймер для того, чтобы стопать видео, если зажал мышку и не отпустил клик\r\n if (this.stopAndScrubTimeout) { // возможно лишнее\r\n clearTimeout(this.stopAndScrubTimeout);\r\n }\r\n this.stopAndScrubTimeout = setTimeout(() => {\r\n !this.media.paused && this.media.pause();\r\n this.stopAndScrubTimeout = 0;\r\n }, 150);\r\n },\r\n onMouseUp: (e) => {\r\n //super.onMouseUp(e);\r\n if (this.stopAndScrubTimeout) {\r\n clearTimeout(this.stopAndScrubTimeout);\r\n this.stopAndScrubTimeout = 0;\r\n }\r\n this.media.paused && this.media.play();\r\n }\r\n });\r\n }\r\n scrub(e) {\r\n const scrubTime = super.scrub(e);\r\n this.media.currentTime = scrubTime;\r\n return scrubTime;\r\n }\r\n setLoadProgress() {\r\n if (appMediaPlaybackController_1.default.isSafariBuffering(this.media))\r\n return;\r\n const buf = this.media.buffered;\r\n const numRanges = buf.length;\r\n const currentTime = this.media.currentTime;\r\n let nearestStart = 0, end = 0;\r\n for (let i = 0; i < numRanges; ++i) {\r\n const start = buf.start(i);\r\n if (currentTime >= start && start >= nearestStart) {\r\n nearestStart = start;\r\n end = buf.end(i);\r\n }\r\n //console.log('onProgress range:', i, buf.start(i), buf.end(i), this.media);\r\n }\r\n //console.log('onProgress correct range:', nearestStart, end, this.media);\r\n const percents = this.media.duration ? end / this.media.duration : 0;\r\n this.filledLoad.style.transform = 'scaleX(' + percents + ')';\r\n }\r\n setSeekMax() {\r\n this.duration = this.media.duration;\r\n if (this.duration > 0) {\r\n this.onLoadedData();\r\n }\r\n else {\r\n this.media.addEventListener('loadeddata', this.onLoadedData);\r\n }\r\n }\r\n setProgress() {\r\n if (appMediaPlaybackController_1.default.isSafariBuffering(this.media))\r\n return;\r\n const currentTime = this.media.currentTime;\r\n super.setProgress(currentTime);\r\n }\r\n setListeners() {\r\n super.setListeners();\r\n this.media.addEventListener('ended', this.onEnded);\r\n this.media.addEventListener('play', this.onPlay);\r\n this.streamable && this.media.addEventListener('progress', this.onProgress);\r\n }\r\n removeListeners() {\r\n super.removeListeners();\r\n this.media.removeEventListener('loadeddata', this.onLoadedData);\r\n this.media.removeEventListener('ended', this.onEnded);\r\n this.media.removeEventListener('play', this.onPlay);\r\n this.streamable && this.media.removeEventListener('progress', this.onProgress);\r\n if (this.stopAndScrubTimeout) {\r\n clearTimeout(this.stopAndScrubTimeout);\r\n }\r\n if (this.progressRAF) {\r\n window.cancelAnimationFrame(this.progressRAF);\r\n }\r\n }\r\n}\r\nexports.MediaProgressLine = MediaProgressLine;\r\nlet lastVolume = 1, muted = !lastVolume;\r\nclass VideoPlayer {\r\n /* private videoParent: HTMLElement;\r\n private videoWhichChild: number; */\r\n constructor(video, play = false, streamable = false) {\r\n var _a;\r\n this.video = video;\r\n this.onFullScreen = () => {\r\n // @ts-ignore\r\n const 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 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, streamable);\r\n controls.prepend(this.progress.container);\r\n }\r\n if (play /* && video.paused */) {\r\n const promise = video.play();\r\n promise.catch((err) => {\r\n if (err.name == 'NotAllowedError') {\r\n video.muted = true;\r\n video.autoplay = true;\r\n video.play();\r\n }\r\n }).finally(() => {\r\n this.wrapper.classList.toggle('is-playing', !this.video.paused);\r\n });\r\n //(this.wrapper.querySelector('.toggle') as HTMLButtonElement).click();\r\n }\r\n }\r\n stylePlayer() {\r\n const { wrapper: player, video, skin } = this;\r\n player.classList.add(skin);\r\n const 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 const toggle = player.querySelectorAll('.toggle');\r\n const 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 const volumeDiv = document.createElement('div');\r\n volumeDiv.classList.add('player-volume');\r\n volumeDiv.innerHTML = `\r\n \r\n `;\r\n const volumeSvg = volumeDiv.firstElementChild;\r\n volumeSvg.addEventListener('click', (e) => {\r\n utils_1.cancelEvent(e);\r\n video.muted = !video.muted;\r\n });\r\n const volumeProgress = new ProgressLine();\r\n volumeProgress.setListeners();\r\n volumeProgress.setHandlers({\r\n onScrub: currentTime => {\r\n const value = Math.max(Math.min(currentTime, 1), 0);\r\n //console.log('volume scrub:', currentTime, value);\r\n video.muted = false;\r\n video.volume = value;\r\n }\r\n });\r\n volumeDiv.append(volumeProgress.container);\r\n const setVolume = () => {\r\n const volume = video.volume;\r\n let d;\r\n if (!volume || video.muted) {\r\n d = `M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z`;\r\n }\r\n else if (volume > .5) {\r\n d = `M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77z`;\r\n }\r\n else if (volume > 0 && volume < .25) {\r\n d = `M7 9v6h4l5 5V4l-5 5H7z`;\r\n }\r\n else {\r\n d = `M18.5 12c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM5 9v6h4l5 5V4L9 9H5z`;\r\n }\r\n try {\r\n volumeSvg.innerHTML = ``;\r\n }\r\n catch (err) { }\r\n if (!volumeProgress.mousedown) {\r\n volumeProgress.setProgress(video.muted ? 0 : volume);\r\n }\r\n };\r\n // не вызовется повторно если на 1 установить 1\r\n video.addEventListener('volumechange', () => {\r\n muted = video.muted;\r\n lastVolume = video.volume;\r\n setVolume();\r\n });\r\n video.volume = lastVolume;\r\n video.muted = muted;\r\n setVolume();\r\n // volume end\r\n const leftControls = player.querySelector('.left-controls');\r\n leftControls.insertBefore(volumeDiv, timeElapsed.parentElement);\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 if (!config_1.touchSupport) {\r\n this.togglePlay();\r\n return;\r\n }\r\n });\r\n if (config_1.touchSupport) {\r\n let showControlsTimeout = 0;\r\n const t = () => {\r\n showControlsTimeout = setTimeout(() => {\r\n showControlsTimeout = 0;\r\n player.classList.remove('show-controls');\r\n }, 3e3);\r\n };\r\n player.addEventListener('click', () => {\r\n if (showControlsTimeout) {\r\n clearTimeout(showControlsTimeout);\r\n }\r\n else {\r\n player.classList.add('show-controls');\r\n }\r\n t();\r\n });\r\n player.addEventListener('touchstart', () => {\r\n player.classList.add('show-controls');\r\n clearTimeout(showControlsTimeout);\r\n });\r\n player.addEventListener('touchend', () => {\r\n if (player.classList.contains('is-playing')) {\r\n t();\r\n }\r\n });\r\n }\r\n /* player.addEventListener('click', (e) => {\r\n if(e.target != player) {\r\n return;\r\n }\r\n \r\n this.togglePlay();\r\n }); */\r\n /* video.addEventListener('play', () => {\r\n }); */\r\n video.addEventListener('pause', () => {\r\n clearInterval(updateInterval);\r\n });\r\n video.addEventListener('dblclick', () => {\r\n if (config_1.touchSupport) {\r\n return;\r\n }\r\n return this.toggleFullScreen(fullScreenButton);\r\n });\r\n fullScreenButton.addEventListener('click', (e) => {\r\n return this.toggleFullScreen(fullScreenButton);\r\n });\r\n 'webkitfullscreenchange mozfullscreenchange fullscreenchange MSFullscreenChange'.split(' ').forEach(eventName => {\r\n player.addEventListener(eventName, this.onFullScreen, false);\r\n });\r\n }\r\n else if (skin === 'circle') {\r\n const wrapper = document.createElement('div');\r\n wrapper.classList.add('circle-time-left');\r\n video.parentNode.insertBefore(wrapper, video);\r\n wrapper.innerHTML = '
';\r\n var circle = player.querySelector('.progress-ring__circle');\r\n const radius = circle.r.baseVal.value;\r\n var circumference = 2 * Math.PI * radius;\r\n var timeDuration = player.querySelector('.circle-time');\r\n const 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 const 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 video.addEventListener('play', () => {\r\n this.wrapper.classList.add('is-playing');\r\n });\r\n video.addEventListener('pause', () => {\r\n this.wrapper.classList.remove('is-playing');\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.wrapper.classList.toggle('is-playing', !this.video.paused);\r\n }\r\n handleProgress(timeDuration, circumference, circle, updateInterval) {\r\n const { video, skin } = this;\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 const 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 const 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 const skin = this.skin;\r\n if (skin === 'default') {\r\n return `\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 else if (skin === 'circle') {\r\n return `\r\n \r\n \r\n \r\n `;\r\n }\r\n }\r\n static isFullScreen() {\r\n // @ts-ignore\r\n return !!(document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement || document.msFullscreenElement);\r\n }\r\n toggleFullScreen(fullScreenButton) {\r\n // alternative standard method\r\n const player = this.wrapper;\r\n // * https://caniuse.com/#feat=fullscreen\r\n if (userAgent_1.isAppleMobile) {\r\n const video = this.video;\r\n video.webkitEnterFullscreen();\r\n video.enterFullscreen();\r\n return;\r\n }\r\n if (!VideoPlayer.isFullScreen()) {\r\n player.classList.add('ckin__fullscreen');\r\n /* const videoParent = this.video.parentElement;\r\n const videoWhichChild = whichChild(this.video);\r\n const needVideoRemount = videoParent != player;\r\n \r\n if(needVideoRemount) {\r\n this.videoParent = videoParent;\r\n this.videoWhichChild = videoWhichChild;\r\n player.prepend(this.video);\r\n } */\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 /* if(this.videoParent) {\r\n const {videoWhichChild, videoParent} = this;\r\n if(!videoWhichChild) {\r\n videoParent.prepend(this.video);\r\n } else {\r\n videoParent.insertBefore(this.video, videoParent.children[videoWhichChild]);\r\n }\r\n \r\n this.videoParent = null;\r\n this.videoWhichChild = -1;\r\n } */\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}\r\nexports.default = VideoPlayer;\r\n" - }, - { - "id": 51, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\appSelectPeers.ts", - "name": "./src/components/appSelectPeers.ts", - "index": 68, - "index2": 59, - "size": 13957, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\appForward.ts", - "issuerId": 42, - "issuerName": "./src/components/appForward.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 42, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\appForward.ts", - "name": "./src/components/appForward.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 949, - "building": 1498, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 42, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 90, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\addMembers.ts", - "module": "./src/components/sidebarLeft/addMembers.ts", - "moduleName": "./src/components/sidebarLeft/addMembers.ts", - "type": "cjs require", - "userRequest": "../appSelectPeers", - "loc": "25:25-53" - }, - { - "moduleId": 97, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\includedChats.ts", - "module": "./src/components/sidebarLeft/includedChats.ts", - "moduleName": "./src/components/sidebarLeft/includedChats.ts", - "type": "cjs require", - "userRequest": "../appSelectPeers", - "loc": "25:25-53" - } - ], - "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 appPeersManager_1 = __importDefault(require(\"../lib/appManagers/appPeersManager\"));\r\nconst appPhotosManager_1 = __importDefault(require(\"../lib/appManagers/appPhotosManager\"));\r\n// TODO: правильная сортировка для addMembers, т.е. для peerType: 'contacts', потому что там идут сначала контакты - потом неконтакты, а должно всё сортироваться по имени\r\nlet loadedAllDialogs = false;\r\nclass AppSelectPeers {\r\n constructor(appendTo, onChange, peerType = ['dialogs'], onFirstRender, renderResultsFunc) {\r\n this.appendTo = appendTo;\r\n this.onChange = onChange;\r\n this.peerType = peerType;\r\n this.renderResultsFunc = renderResultsFunc;\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 //public selected: {[peerID: number]: HTMLElement} = {};\r\n this.selected = new Set();\r\n this.freezed = false;\r\n this.folderID = 0;\r\n this.offsetIndex = 0;\r\n this.query = '';\r\n this.loadedWhat = {};\r\n this.container.classList.add('selector');\r\n if (!this.renderResultsFunc) {\r\n this.renderResultsFunc = this.renderResults;\r\n }\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.includes('dialogs') ? '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.chatsContainer.addEventListener('click', (e) => {\r\n const target = utils_1.findUpAttribute(e.target, 'data-peerID');\r\n utils_1.cancelEvent(e);\r\n if (!target)\r\n return;\r\n if (this.freezed)\r\n return;\r\n let key = target.getAttribute('data-peerID');\r\n key = +key || key;\r\n target.classList.toggle('active');\r\n if (this.selected.has(key)) {\r\n this.remove(key);\r\n }\r\n else {\r\n this.add(key);\r\n }\r\n const 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 const peerID = target.dataset.key;\r\n const li = this.chatsContainer.querySelector('[data-peerid=\"' + peerID + '\"]');\r\n if (!li) {\r\n this.remove(+peerID || peerID);\r\n }\r\n else {\r\n li.click();\r\n }\r\n });\r\n this.input.addEventListener('input', () => {\r\n const value = this.input.value;\r\n if (this.query != value) {\r\n if (this.peerType.includes('contacts')) {\r\n delete this.loadedWhat.contacts;\r\n this.cachedContacts = null;\r\n }\r\n //if(this.peerType.includes('dialogs')) {\r\n delete this.loadedWhat.dialogs;\r\n delete this.loadedWhat.archived;\r\n this.folderID = 0;\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 // WARNING TIMEOUT\r\n setTimeout(() => {\r\n let getResultsPromise = this.getMoreResults();\r\n if (onFirstRender) {\r\n getResultsPromise.then(() => {\r\n onFirstRender();\r\n });\r\n }\r\n }, 0);\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 if (this.loadedWhat.dialogs && this.loadedWhat.archived) {\r\n return;\r\n }\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, this.folderID);\r\n const value = yield this.promise;\r\n this.promise = null;\r\n let dialogs = value.dialogs;\r\n if (dialogs.length) {\r\n const newOffsetIndex = dialogs[dialogs.length - 1].index || 0;\r\n dialogs = dialogs.slice();\r\n dialogs.findAndSplice(d => d.peerID == utils_1.$rootScope.myID); // no my account\r\n if (!this.offsetIndex && this.folderID == 0 &&\r\n (!this.query || 'saved messages'.includes(this.query.toLowerCase())) &&\r\n this.peerType.includes('dialogs')) {\r\n dialogs.unshift({\r\n peerID: utils_1.$rootScope.myID,\r\n pFlags: {}\r\n });\r\n }\r\n this.offsetIndex = newOffsetIndex;\r\n this.renderResultsFunc(dialogs.map(dialog => dialog.peerID));\r\n }\r\n else {\r\n if (!this.loadedWhat.dialogs) {\r\n this.loadedWhat.dialogs = true;\r\n this.offsetIndex = 0;\r\n this.folderID = 1;\r\n return this.getMoreDialogs();\r\n }\r\n else {\r\n this.loadedWhat.archived = true;\r\n if (!this.loadedWhat.contacts && this.peerType.includes('contacts')) {\r\n return this.getMoreContacts();\r\n }\r\n }\r\n }\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.loadedWhat.contacts) {\r\n return;\r\n }\r\n if (!this.cachedContacts) {\r\n /* const promises: Promise[] = [appUsersManager.getContacts(this.query)];\r\n if(!this.peerType.includes('dialogs')) {\r\n promises.push(appMessagesManager.getConversationsAll());\r\n }\r\n \r\n this.promise = Promise.all(promises);\r\n this.cachedContacts = (await this.promise)[0].slice(); */\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 == utils_1.$rootScope.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.renderResultsFunc(arr);\r\n }\r\n if (!this.cachedContacts.length) {\r\n this.loadedWhat.contacts = true;\r\n // need to load non-contacts\r\n if (!this.peerType.includes('dialogs')) {\r\n return this.getMoreDialogs();\r\n }\r\n }\r\n });\r\n }\r\n getMoreResults() {\r\n const promises = [];\r\n if (!loadedAllDialogs) {\r\n promises.push(appMessagesManager_1.default.getConversationsAll());\r\n }\r\n if ((this.peerType.includes('dialogs') || this.loadedWhat.contacts) && !this.loadedWhat.archived) { // to load non-contacts\r\n promises.push(this.getMoreDialogs());\r\n if (!this.loadedWhat.archived) {\r\n return Promise.all(promises);\r\n }\r\n }\r\n if (this.peerType.includes('contacts') && !this.loadedWhat.contacts) {\r\n promises.push(this.getMoreContacts());\r\n }\r\n return Promise.all(promises);\r\n }\r\n renderResults(peerIDs) {\r\n //console.log('will renderResults:', peerIDs);\r\n // оставим только неконтакты с диалогов\r\n if (!this.peerType.includes('dialogs') && this.loadedWhat.contacts) {\r\n peerIDs = peerIDs.filter(peerID => {\r\n return appUsersManager_1.default.isNonContactUser(peerID);\r\n });\r\n }\r\n peerIDs.forEach(peerID => {\r\n const { dom } = appDialogsManager_1.default.addDialog(peerID, this.scrollable, false, false);\r\n const selected = this.selected.has(peerID);\r\n dom.containerEl.insertAdjacentHTML('afterbegin', `
`);\r\n if (selected)\r\n dom.listEl.classList.add('active');\r\n let subtitle = '';\r\n if (peerID < 0) {\r\n subtitle = appChatsManager_1.default.getChatMembersString(-peerID);\r\n }\r\n else if (peerID == utils_1.$rootScope.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 = `${subtitle}`;\r\n }\r\n }\r\n dom.lastMessageSpan.innerHTML = subtitle;\r\n });\r\n }\r\n add(peerID, title) {\r\n //console.trace('add');\r\n const div = document.createElement('div');\r\n div.classList.add('selector-user', 'scale-in');\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 div.dataset.key = '' + peerID;\r\n this.selected.add(peerID);\r\n if (typeof (peerID) === 'number') {\r\n if (title === undefined) {\r\n title = peerID == utils_1.$rootScope.myID ? 'Saved' : appPeersManager_1.default.getPeerTitle(peerID, false, true);\r\n }\r\n avatarEl.setAttribute('peer', '' + peerID);\r\n }\r\n if (title) {\r\n div.innerHTML = title;\r\n }\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.selectedScrollable.scrollTo(this.selectedScrollable.scrollHeight, true, true);\r\n this.onChange && this.onChange(this.selected.size);\r\n return div;\r\n }\r\n remove(key) {\r\n //const div = this.selected[peerID];\r\n const div = this.selectedContainer.querySelector(`[data-key=\"${key}\"]`);\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 this.selected.delete(key);\r\n div.remove();\r\n this.onChange && this.onChange(this.selected.size);\r\n }, { once: true });\r\n }\r\n getSelected() {\r\n return [...this.selected];\r\n }\r\n}\r\nexports.AppSelectPeers = AppSelectPeers;\r\n" - }, - { - "id": 52, - "identifier": "F:\\tweb\\node_modules\\jsbn\\index.js", - "name": "./node_modules/jsbn/index.js", - "index": 16, - "index2": 12, - "size": 42308, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 1 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\polyfill.ts", - "issuerId": 75, - "issuerName": "./src/lib/polyfill.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 75, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\polyfill.ts", - "name": "./src/lib/polyfill.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - } - ], - "profile": { - "factory": 1813, - "building": 59, - "dependencies": 1052 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 22, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\bin_utils.ts", - "module": "./src/lib/bin_utils.ts", - "moduleName": "./src/lib/bin_utils.ts", - "type": "cjs require", - "userRequest": "jsbn", - "loc": "11:15-30" - }, - { - "moduleId": 75, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\polyfill.ts", - "module": "./src/lib/polyfill.ts", - "moduleName": "./src/lib/polyfill.ts", - "type": "cjs require", - "userRequest": "jsbn", - "loc": "6:15-30" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 2, - "source": "(function(){\n\n // Copyright (c) 2005 Tom Wu\n // All Rights Reserved.\n // See \"LICENSE\" for details.\n\n // Basic JavaScript BN library - subset useful for RSA encryption.\n\n // Bits per digit\n var dbits;\n\n // JavaScript engine analysis\n var canary = 0xdeadbeefcafe;\n var j_lm = ((canary&0xffffff)==0xefcafe);\n\n // (public) Constructor\n function BigInteger(a,b,c) {\n if(a != null)\n if(\"number\" == typeof a) this.fromNumber(a,b,c);\n else if(b == null && \"string\" != typeof a) this.fromString(a,256);\n else this.fromString(a,b);\n }\n\n // return new, unset BigInteger\n function nbi() { return new BigInteger(null); }\n\n // am: Compute w_j += (x*this_i), propagate carries,\n // c is initial carry, returns final carry.\n // c < 3*dvalue, x < 2*dvalue, this_i < dvalue\n // We need to select the fastest one that works in this environment.\n\n // am1: use a single mult and divide to get the high bits,\n // max digit bits should be 26 because\n // max internal value = 2*dvalue^2-2*dvalue (< 2^53)\n function am1(i,x,w,j,c,n) {\n while(--n >= 0) {\n var v = x*this[i++]+w[j]+c;\n c = Math.floor(v/0x4000000);\n w[j++] = v&0x3ffffff;\n }\n return c;\n }\n // am2 avoids a big mult-and-extract completely.\n // Max digit bits should be <= 30 because we do bitwise ops\n // on values up to 2*hdvalue^2-hdvalue-1 (< 2^31)\n function am2(i,x,w,j,c,n) {\n var xl = x&0x7fff, xh = x>>15;\n while(--n >= 0) {\n var l = this[i]&0x7fff;\n var h = this[i++]>>15;\n var m = xh*l+h*xl;\n l = xl*l+((m&0x7fff)<<15)+w[j]+(c&0x3fffffff);\n c = (l>>>30)+(m>>>15)+xh*h+(c>>>30);\n w[j++] = l&0x3fffffff;\n }\n return c;\n }\n // Alternately, set max digit bits to 28 since some\n // browsers slow down when dealing with 32-bit numbers.\n function am3(i,x,w,j,c,n) {\n var xl = x&0x3fff, xh = x>>14;\n while(--n >= 0) {\n var l = this[i]&0x3fff;\n var h = this[i++]>>14;\n var m = xh*l+h*xl;\n l = xl*l+((m&0x3fff)<<14)+w[j]+c;\n c = (l>>28)+(m>>14)+xh*h;\n w[j++] = l&0xfffffff;\n }\n return c;\n }\n var inBrowser = typeof navigator !== \"undefined\";\n if(inBrowser && j_lm && (navigator.appName == \"Microsoft Internet Explorer\")) {\n BigInteger.prototype.am = am2;\n dbits = 30;\n }\n else if(inBrowser && j_lm && (navigator.appName != \"Netscape\")) {\n BigInteger.prototype.am = am1;\n dbits = 26;\n }\n else { // Mozilla/Netscape seems to prefer am3\n BigInteger.prototype.am = am3;\n dbits = 28;\n }\n\n BigInteger.prototype.DB = dbits;\n BigInteger.prototype.DM = ((1<= 0; --i) r[i] = this[i];\n r.t = this.t;\n r.s = this.s;\n }\n\n // (protected) set from integer value x, -DV <= x < DV\n function bnpFromInt(x) {\n this.t = 1;\n this.s = (x<0)?-1:0;\n if(x > 0) this[0] = x;\n else if(x < -1) this[0] = x+this.DV;\n else this.t = 0;\n }\n\n // return bigint initialized to value\n function nbv(i) { var r = nbi(); r.fromInt(i); return r; }\n\n // (protected) set from string and radix\n function bnpFromString(s,b) {\n var k;\n if(b == 16) k = 4;\n else if(b == 8) k = 3;\n else if(b == 256) k = 8; // byte array\n else if(b == 2) k = 1;\n else if(b == 32) k = 5;\n else if(b == 4) k = 2;\n else { this.fromRadix(s,b); return; }\n this.t = 0;\n this.s = 0;\n var i = s.length, mi = false, sh = 0;\n while(--i >= 0) {\n var x = (k==8)?s[i]&0xff:intAt(s,i);\n if(x < 0) {\n if(s.charAt(i) == \"-\") mi = true;\n continue;\n }\n mi = false;\n if(sh == 0)\n this[this.t++] = x;\n else if(sh+k > this.DB) {\n this[this.t-1] |= (x&((1<<(this.DB-sh))-1))<>(this.DB-sh));\n }\n else\n this[this.t-1] |= x<= this.DB) sh -= this.DB;\n }\n if(k == 8 && (s[0]&0x80) != 0) {\n this.s = -1;\n if(sh > 0) this[this.t-1] |= ((1<<(this.DB-sh))-1)< 0 && this[this.t-1] == c) --this.t;\n }\n\n // (public) return string representation in given radix\n function bnToString(b) {\n if(this.s < 0) return \"-\"+this.negate().toString(b);\n var k;\n if(b == 16) k = 4;\n else if(b == 8) k = 3;\n else if(b == 2) k = 1;\n else if(b == 32) k = 5;\n else if(b == 4) k = 2;\n else return this.toRadix(b);\n var km = (1< 0) {\n if(p < this.DB && (d = this[i]>>p) > 0) { m = true; r = int2char(d); }\n while(i >= 0) {\n if(p < k) {\n d = (this[i]&((1<>(p+=this.DB-k);\n }\n else {\n d = (this[i]>>(p-=k))&km;\n if(p <= 0) { p += this.DB; --i; }\n }\n if(d > 0) m = true;\n if(m) r += int2char(d);\n }\n }\n return m?r:\"0\";\n }\n\n // (public) -this\n function bnNegate() { var r = nbi(); BigInteger.ZERO.subTo(this,r); return r; }\n\n // (public) |this|\n function bnAbs() { return (this.s<0)?this.negate():this; }\n\n // (public) return + if this > a, - if this < a, 0 if equal\n function bnCompareTo(a) {\n var r = this.s-a.s;\n if(r != 0) return r;\n var i = this.t;\n r = i-a.t;\n if(r != 0) return (this.s<0)?-r:r;\n while(--i >= 0) if((r=this[i]-a[i]) != 0) return r;\n return 0;\n }\n\n // returns bit length of the integer x\n function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }\n\n // (public) return the number of bits in \"this\"\n function bnBitLength() {\n if(this.t <= 0) return 0;\n return this.DB*(this.t-1)+nbits(this[this.t-1]^(this.s&this.DM));\n }\n\n // (protected) r = this << n*DB\n function bnpDLShiftTo(n,r) {\n var i;\n for(i = this.t-1; i >= 0; --i) r[i+n] = this[i];\n for(i = n-1; i >= 0; --i) r[i] = 0;\n r.t = this.t+n;\n r.s = this.s;\n }\n\n // (protected) r = this >> n*DB\n function bnpDRShiftTo(n,r) {\n for(var i = n; i < this.t; ++i) r[i-n] = this[i];\n r.t = Math.max(this.t-n,0);\n r.s = this.s;\n }\n\n // (protected) r = this << n\n function bnpLShiftTo(n,r) {\n var bs = n%this.DB;\n var cbs = this.DB-bs;\n var bm = (1<= 0; --i) {\n r[i+ds+1] = (this[i]>>cbs)|c;\n c = (this[i]&bm)<= 0; --i) r[i] = 0;\n r[ds] = c;\n r.t = this.t+ds+1;\n r.s = this.s;\n r.clamp();\n }\n\n // (protected) r = this >> n\n function bnpRShiftTo(n,r) {\n r.s = this.s;\n var ds = Math.floor(n/this.DB);\n if(ds >= this.t) { r.t = 0; return; }\n var bs = n%this.DB;\n var cbs = this.DB-bs;\n var bm = (1<>bs;\n for(var i = ds+1; i < this.t; ++i) {\n r[i-ds-1] |= (this[i]&bm)<>bs;\n }\n if(bs > 0) r[this.t-ds-1] |= (this.s&bm)<>= this.DB;\n }\n if(a.t < this.t) {\n c -= a.s;\n while(i < this.t) {\n c += this[i];\n r[i++] = c&this.DM;\n c >>= this.DB;\n }\n c += this.s;\n }\n else {\n c += this.s;\n while(i < a.t) {\n c -= a[i];\n r[i++] = c&this.DM;\n c >>= this.DB;\n }\n c -= a.s;\n }\n r.s = (c<0)?-1:0;\n if(c < -1) r[i++] = this.DV+c;\n else if(c > 0) r[i++] = c;\n r.t = i;\n r.clamp();\n }\n\n // (protected) r = this * a, r != this,a (HAC 14.12)\n // \"this\" should be the larger one if appropriate.\n function bnpMultiplyTo(a,r) {\n var x = this.abs(), y = a.abs();\n var i = x.t;\n r.t = i+y.t;\n while(--i >= 0) r[i] = 0;\n for(i = 0; i < y.t; ++i) r[i+x.t] = x.am(0,y[i],r,i,0,x.t);\n r.s = 0;\n r.clamp();\n if(this.s != a.s) BigInteger.ZERO.subTo(r,r);\n }\n\n // (protected) r = this^2, r != this (HAC 14.16)\n function bnpSquareTo(r) {\n var x = this.abs();\n var i = r.t = 2*x.t;\n while(--i >= 0) r[i] = 0;\n for(i = 0; i < x.t-1; ++i) {\n var c = x.am(i,x[i],r,2*i,0,1);\n if((r[i+x.t]+=x.am(i+1,2*x[i],r,2*i+1,c,x.t-i-1)) >= x.DV) {\n r[i+x.t] -= x.DV;\n r[i+x.t+1] = 1;\n }\n }\n if(r.t > 0) r[r.t-1] += x.am(i,x[i],r,2*i,0,1);\n r.s = 0;\n r.clamp();\n }\n\n // (protected) divide this by m, quotient and remainder to q, r (HAC 14.20)\n // r != q, this != m. q or r may be null.\n function bnpDivRemTo(m,q,r) {\n var pm = m.abs();\n if(pm.t <= 0) return;\n var pt = this.abs();\n if(pt.t < pm.t) {\n if(q != null) q.fromInt(0);\n if(r != null) this.copyTo(r);\n return;\n }\n if(r == null) r = nbi();\n var y = nbi(), ts = this.s, ms = m.s;\n var nsh = this.DB-nbits(pm[pm.t-1]); // normalize modulus\n if(nsh > 0) { pm.lShiftTo(nsh,y); pt.lShiftTo(nsh,r); }\n else { pm.copyTo(y); pt.copyTo(r); }\n var ys = y.t;\n var y0 = y[ys-1];\n if(y0 == 0) return;\n var yt = y0*(1<1)?y[ys-2]>>this.F2:0);\n var d1 = this.FV/yt, d2 = (1<= 0) {\n r[r.t++] = 1;\n r.subTo(t,r);\n }\n BigInteger.ONE.dlShiftTo(ys,t);\n t.subTo(y,y); // \"negative\" y so we can replace sub with am later\n while(y.t < ys) y[y.t++] = 0;\n while(--j >= 0) {\n // Estimate quotient digit\n var qd = (r[--i]==y0)?this.DM:Math.floor(r[i]*d1+(r[i-1]+e)*d2);\n if((r[i]+=y.am(0,qd,r,j,0,ys)) < qd) { // Try it out\n y.dlShiftTo(j,t);\n r.subTo(t,r);\n while(r[i] < --qd) r.subTo(t,r);\n }\n }\n if(q != null) {\n r.drShiftTo(ys,q);\n if(ts != ms) BigInteger.ZERO.subTo(q,q);\n }\n r.t = ys;\n r.clamp();\n if(nsh > 0) r.rShiftTo(nsh,r); // Denormalize remainder\n if(ts < 0) BigInteger.ZERO.subTo(r,r);\n }\n\n // (public) this mod a\n function bnMod(a) {\n var r = nbi();\n this.abs().divRemTo(a,null,r);\n if(this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) a.subTo(r,r);\n return r;\n }\n\n // Modular reduction using \"classic\" algorithm\n function Classic(m) { this.m = m; }\n function cConvert(x) {\n if(x.s < 0 || x.compareTo(this.m) >= 0) return x.mod(this.m);\n else return x;\n }\n function cRevert(x) { return x; }\n function cReduce(x) { x.divRemTo(this.m,null,x); }\n function cMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }\n function cSqrTo(x,r) { x.squareTo(r); this.reduce(r); }\n\n Classic.prototype.convert = cConvert;\n Classic.prototype.revert = cRevert;\n Classic.prototype.reduce = cReduce;\n Classic.prototype.mulTo = cMulTo;\n Classic.prototype.sqrTo = cSqrTo;\n\n // (protected) return \"-1/this % 2^DB\"; useful for Mont. reduction\n // justification:\n // xy == 1 (mod m)\n // xy = 1+km\n // xy(2-xy) = (1+km)(1-km)\n // x[y(2-xy)] = 1-k^2m^2\n // x[y(2-xy)] == 1 (mod m^2)\n // if y is 1/x mod m, then y(2-xy) is 1/x mod m^2\n // should reduce x and y(2-xy) by m^2 at each step to keep size bounded.\n // JS multiply \"overflows\" differently from C/C++, so care is needed here.\n function bnpInvDigit() {\n if(this.t < 1) return 0;\n var x = this[0];\n if((x&1) == 0) return 0;\n var y = x&3; // y == 1/x mod 2^2\n y = (y*(2-(x&0xf)*y))&0xf; // y == 1/x mod 2^4\n y = (y*(2-(x&0xff)*y))&0xff; // y == 1/x mod 2^8\n y = (y*(2-(((x&0xffff)*y)&0xffff)))&0xffff; // y == 1/x mod 2^16\n // last step - calculate inverse mod DV directly;\n // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints\n y = (y*(2-x*y%this.DV))%this.DV; // y == 1/x mod 2^dbits\n // we really want the negative inverse, and -DV < y < DV\n return (y>0)?this.DV-y:-y;\n }\n\n // Montgomery reduction\n function Montgomery(m) {\n this.m = m;\n this.mp = m.invDigit();\n this.mpl = this.mp&0x7fff;\n this.mph = this.mp>>15;\n this.um = (1<<(m.DB-15))-1;\n this.mt2 = 2*m.t;\n }\n\n // xR mod m\n function montConvert(x) {\n var r = nbi();\n x.abs().dlShiftTo(this.m.t,r);\n r.divRemTo(this.m,null,r);\n if(x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) this.m.subTo(r,r);\n return r;\n }\n\n // x/R mod m\n function montRevert(x) {\n var r = nbi();\n x.copyTo(r);\n this.reduce(r);\n return r;\n }\n\n // x = x/R mod m (HAC 14.32)\n function montReduce(x) {\n while(x.t <= this.mt2) // pad x so am has enough room later\n x[x.t++] = 0;\n for(var i = 0; i < this.m.t; ++i) {\n // faster way of calculating u0 = x[i]*mp mod DV\n var j = x[i]&0x7fff;\n var u0 = (j*this.mpl+(((j*this.mph+(x[i]>>15)*this.mpl)&this.um)<<15))&x.DM;\n // use am to combine the multiply-shift-add into one call\n j = i+this.m.t;\n x[j] += this.m.am(0,u0,x,i,0,this.m.t);\n // propagate carry\n while(x[j] >= x.DV) { x[j] -= x.DV; x[++j]++; }\n }\n x.clamp();\n x.drShiftTo(this.m.t,x);\n if(x.compareTo(this.m) >= 0) x.subTo(this.m,x);\n }\n\n // r = \"x^2/R mod m\"; x != r\n function montSqrTo(x,r) { x.squareTo(r); this.reduce(r); }\n\n // r = \"xy/R mod m\"; x,y != r\n function montMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }\n\n Montgomery.prototype.convert = montConvert;\n Montgomery.prototype.revert = montRevert;\n Montgomery.prototype.reduce = montReduce;\n Montgomery.prototype.mulTo = montMulTo;\n Montgomery.prototype.sqrTo = montSqrTo;\n\n // (protected) true iff this is even\n function bnpIsEven() { return ((this.t>0)?(this[0]&1):this.s) == 0; }\n\n // (protected) this^e, e < 2^32, doing sqr and mul with \"r\" (HAC 14.79)\n function bnpExp(e,z) {\n if(e > 0xffffffff || e < 1) return BigInteger.ONE;\n var r = nbi(), r2 = nbi(), g = z.convert(this), i = nbits(e)-1;\n g.copyTo(r);\n while(--i >= 0) {\n z.sqrTo(r,r2);\n if((e&(1< 0) z.mulTo(r2,g,r);\n else { var t = r; r = r2; r2 = t; }\n }\n return z.revert(r);\n }\n\n // (public) this^e % m, 0 <= e < 2^32\n function bnModPowInt(e,m) {\n var z;\n if(e < 256 || m.isEven()) z = new Classic(m); else z = new Montgomery(m);\n return this.exp(e,z);\n }\n\n // protected\n BigInteger.prototype.copyTo = bnpCopyTo;\n BigInteger.prototype.fromInt = bnpFromInt;\n BigInteger.prototype.fromString = bnpFromString;\n BigInteger.prototype.clamp = bnpClamp;\n BigInteger.prototype.dlShiftTo = bnpDLShiftTo;\n BigInteger.prototype.drShiftTo = bnpDRShiftTo;\n BigInteger.prototype.lShiftTo = bnpLShiftTo;\n BigInteger.prototype.rShiftTo = bnpRShiftTo;\n BigInteger.prototype.subTo = bnpSubTo;\n BigInteger.prototype.multiplyTo = bnpMultiplyTo;\n BigInteger.prototype.squareTo = bnpSquareTo;\n BigInteger.prototype.divRemTo = bnpDivRemTo;\n BigInteger.prototype.invDigit = bnpInvDigit;\n BigInteger.prototype.isEven = bnpIsEven;\n BigInteger.prototype.exp = bnpExp;\n\n // public\n BigInteger.prototype.toString = bnToString;\n BigInteger.prototype.negate = bnNegate;\n BigInteger.prototype.abs = bnAbs;\n BigInteger.prototype.compareTo = bnCompareTo;\n BigInteger.prototype.bitLength = bnBitLength;\n BigInteger.prototype.mod = bnMod;\n BigInteger.prototype.modPowInt = bnModPowInt;\n\n // \"constants\"\n BigInteger.ZERO = nbv(0);\n BigInteger.ONE = nbv(1);\n\n // Copyright (c) 2005-2009 Tom Wu\n // All Rights Reserved.\n // See \"LICENSE\" for details.\n\n // Extended JavaScript BN functions, required for RSA private ops.\n\n // Version 1.1: new BigInteger(\"0\", 10) returns \"proper\" zero\n // Version 1.2: square() API, isProbablePrime fix\n\n // (public)\n function bnClone() { var r = nbi(); this.copyTo(r); return r; }\n\n // (public) return value as integer\n function bnIntValue() {\n if(this.s < 0) {\n if(this.t == 1) return this[0]-this.DV;\n else if(this.t == 0) return -1;\n }\n else if(this.t == 1) return this[0];\n else if(this.t == 0) return 0;\n // assumes 16 < DB < 32\n return ((this[1]&((1<<(32-this.DB))-1))<>24; }\n\n // (public) return value as short (assumes DB>=16)\n function bnShortValue() { return (this.t==0)?this.s:(this[0]<<16)>>16; }\n\n // (protected) return x s.t. r^x < DV\n function bnpChunkSize(r) { return Math.floor(Math.LN2*this.DB/Math.log(r)); }\n\n // (public) 0 if this == 0, 1 if this > 0\n function bnSigNum() {\n if(this.s < 0) return -1;\n else if(this.t <= 0 || (this.t == 1 && this[0] <= 0)) return 0;\n else return 1;\n }\n\n // (protected) convert to radix string\n function bnpToRadix(b) {\n if(b == null) b = 10;\n if(this.signum() == 0 || b < 2 || b > 36) return \"0\";\n var cs = this.chunkSize(b);\n var a = Math.pow(b,cs);\n var d = nbv(a), y = nbi(), z = nbi(), r = \"\";\n this.divRemTo(d,y,z);\n while(y.signum() > 0) {\n r = (a+z.intValue()).toString(b).substr(1) + r;\n y.divRemTo(d,y,z);\n }\n return z.intValue().toString(b) + r;\n }\n\n // (protected) convert from radix string\n function bnpFromRadix(s,b) {\n this.fromInt(0);\n if(b == null) b = 10;\n var cs = this.chunkSize(b);\n var d = Math.pow(b,cs), mi = false, j = 0, w = 0;\n for(var i = 0; i < s.length; ++i) {\n var x = intAt(s,i);\n if(x < 0) {\n if(s.charAt(i) == \"-\" && this.signum() == 0) mi = true;\n continue;\n }\n w = b*w+x;\n if(++j >= cs) {\n this.dMultiply(d);\n this.dAddOffset(w,0);\n j = 0;\n w = 0;\n }\n }\n if(j > 0) {\n this.dMultiply(Math.pow(b,j));\n this.dAddOffset(w,0);\n }\n if(mi) BigInteger.ZERO.subTo(this,this);\n }\n\n // (protected) alternate constructor\n function bnpFromNumber(a,b,c) {\n if(\"number\" == typeof b) {\n // new BigInteger(int,int,RNG)\n if(a < 2) this.fromInt(1);\n else {\n this.fromNumber(a,c);\n if(!this.testBit(a-1)) // force MSB set\n this.bitwiseTo(BigInteger.ONE.shiftLeft(a-1),op_or,this);\n if(this.isEven()) this.dAddOffset(1,0); // force odd\n while(!this.isProbablePrime(b)) {\n this.dAddOffset(2,0);\n if(this.bitLength() > a) this.subTo(BigInteger.ONE.shiftLeft(a-1),this);\n }\n }\n }\n else {\n // new BigInteger(int,RNG)\n var x = new Array(), t = a&7;\n x.length = (a>>3)+1;\n b.nextBytes(x);\n if(t > 0) x[0] &= ((1< 0) {\n if(p < this.DB && (d = this[i]>>p) != (this.s&this.DM)>>p)\n r[k++] = d|(this.s<<(this.DB-p));\n while(i >= 0) {\n if(p < 8) {\n d = (this[i]&((1<>(p+=this.DB-8);\n }\n else {\n d = (this[i]>>(p-=8))&0xff;\n if(p <= 0) { p += this.DB; --i; }\n }\n if((d&0x80) != 0) d |= -256;\n if(k == 0 && (this.s&0x80) != (d&0x80)) ++k;\n if(k > 0 || d != this.s) r[k++] = d;\n }\n }\n return r;\n }\n\n function bnEquals(a) { return(this.compareTo(a)==0); }\n function bnMin(a) { return(this.compareTo(a)<0)?this:a; }\n function bnMax(a) { return(this.compareTo(a)>0)?this:a; }\n\n // (protected) r = this op a (bitwise)\n function bnpBitwiseTo(a,op,r) {\n var i, f, m = Math.min(a.t,this.t);\n for(i = 0; i < m; ++i) r[i] = op(this[i],a[i]);\n if(a.t < this.t) {\n f = a.s&this.DM;\n for(i = m; i < this.t; ++i) r[i] = op(this[i],f);\n r.t = this.t;\n }\n else {\n f = this.s&this.DM;\n for(i = m; i < a.t; ++i) r[i] = op(f,a[i]);\n r.t = a.t;\n }\n r.s = op(this.s,a.s);\n r.clamp();\n }\n\n // (public) this & a\n function op_and(x,y) { return x&y; }\n function bnAnd(a) { var r = nbi(); this.bitwiseTo(a,op_and,r); return r; }\n\n // (public) this | a\n function op_or(x,y) { return x|y; }\n function bnOr(a) { var r = nbi(); this.bitwiseTo(a,op_or,r); return r; }\n\n // (public) this ^ a\n function op_xor(x,y) { return x^y; }\n function bnXor(a) { var r = nbi(); this.bitwiseTo(a,op_xor,r); return r; }\n\n // (public) this & ~a\n function op_andnot(x,y) { return x&~y; }\n function bnAndNot(a) { var r = nbi(); this.bitwiseTo(a,op_andnot,r); return r; }\n\n // (public) ~this\n function bnNot() {\n var r = nbi();\n for(var i = 0; i < this.t; ++i) r[i] = this.DM&~this[i];\n r.t = this.t;\n r.s = ~this.s;\n return r;\n }\n\n // (public) this << n\n function bnShiftLeft(n) {\n var r = nbi();\n if(n < 0) this.rShiftTo(-n,r); else this.lShiftTo(n,r);\n return r;\n }\n\n // (public) this >> n\n function bnShiftRight(n) {\n var r = nbi();\n if(n < 0) this.lShiftTo(-n,r); else this.rShiftTo(n,r);\n return r;\n }\n\n // return index of lowest 1-bit in x, x < 2^31\n function lbit(x) {\n if(x == 0) return -1;\n var r = 0;\n if((x&0xffff) == 0) { x >>= 16; r += 16; }\n if((x&0xff) == 0) { x >>= 8; r += 8; }\n if((x&0xf) == 0) { x >>= 4; r += 4; }\n if((x&3) == 0) { x >>= 2; r += 2; }\n if((x&1) == 0) ++r;\n return r;\n }\n\n // (public) returns index of lowest 1-bit (or -1 if none)\n function bnGetLowestSetBit() {\n for(var i = 0; i < this.t; ++i)\n if(this[i] != 0) return i*this.DB+lbit(this[i]);\n if(this.s < 0) return this.t*this.DB;\n return -1;\n }\n\n // return number of 1 bits in x\n function cbit(x) {\n var r = 0;\n while(x != 0) { x &= x-1; ++r; }\n return r;\n }\n\n // (public) return number of set bits\n function bnBitCount() {\n var r = 0, x = this.s&this.DM;\n for(var i = 0; i < this.t; ++i) r += cbit(this[i]^x);\n return r;\n }\n\n // (public) true iff nth bit is set\n function bnTestBit(n) {\n var j = Math.floor(n/this.DB);\n if(j >= this.t) return(this.s!=0);\n return((this[j]&(1<<(n%this.DB)))!=0);\n }\n\n // (protected) this op (1<>= this.DB;\n }\n if(a.t < this.t) {\n c += a.s;\n while(i < this.t) {\n c += this[i];\n r[i++] = c&this.DM;\n c >>= this.DB;\n }\n c += this.s;\n }\n else {\n c += this.s;\n while(i < a.t) {\n c += a[i];\n r[i++] = c&this.DM;\n c >>= this.DB;\n }\n c += a.s;\n }\n r.s = (c<0)?-1:0;\n if(c > 0) r[i++] = c;\n else if(c < -1) r[i++] = this.DV+c;\n r.t = i;\n r.clamp();\n }\n\n // (public) this + a\n function bnAdd(a) { var r = nbi(); this.addTo(a,r); return r; }\n\n // (public) this - a\n function bnSubtract(a) { var r = nbi(); this.subTo(a,r); return r; }\n\n // (public) this * a\n function bnMultiply(a) { var r = nbi(); this.multiplyTo(a,r); return r; }\n\n // (public) this^2\n function bnSquare() { var r = nbi(); this.squareTo(r); return r; }\n\n // (public) this / a\n function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }\n\n // (public) this % a\n function bnRemainder(a) { var r = nbi(); this.divRemTo(a,null,r); return r; }\n\n // (public) [this/a,this%a]\n function bnDivideAndRemainder(a) {\n var q = nbi(), r = nbi();\n this.divRemTo(a,q,r);\n return new Array(q,r);\n }\n\n // (protected) this *= n, this >= 0, 1 < n < DV\n function bnpDMultiply(n) {\n this[this.t] = this.am(0,n-1,this,0,0,this.t);\n ++this.t;\n this.clamp();\n }\n\n // (protected) this += n << w words, this >= 0\n function bnpDAddOffset(n,w) {\n if(n == 0) return;\n while(this.t <= w) this[this.t++] = 0;\n this[w] += n;\n while(this[w] >= this.DV) {\n this[w] -= this.DV;\n if(++w >= this.t) this[this.t++] = 0;\n ++this[w];\n }\n }\n\n // A \"null\" reducer\n function NullExp() {}\n function nNop(x) { return x; }\n function nMulTo(x,y,r) { x.multiplyTo(y,r); }\n function nSqrTo(x,r) { x.squareTo(r); }\n\n NullExp.prototype.convert = nNop;\n NullExp.prototype.revert = nNop;\n NullExp.prototype.mulTo = nMulTo;\n NullExp.prototype.sqrTo = nSqrTo;\n\n // (public) this^e\n function bnPow(e) { return this.exp(e,new NullExp()); }\n\n // (protected) r = lower n words of \"this * a\", a.t <= n\n // \"this\" should be the larger one if appropriate.\n function bnpMultiplyLowerTo(a,n,r) {\n var i = Math.min(this.t+a.t,n);\n r.s = 0; // assumes a,this >= 0\n r.t = i;\n while(i > 0) r[--i] = 0;\n var j;\n for(j = r.t-this.t; i < j; ++i) r[i+this.t] = this.am(0,a[i],r,i,0,this.t);\n for(j = Math.min(a.t,n); i < j; ++i) this.am(0,a[i],r,i,0,n-i);\n r.clamp();\n }\n\n // (protected) r = \"this * a\" without lower n words, n > 0\n // \"this\" should be the larger one if appropriate.\n function bnpMultiplyUpperTo(a,n,r) {\n --n;\n var i = r.t = this.t+a.t-n;\n r.s = 0; // assumes a,this >= 0\n while(--i >= 0) r[i] = 0;\n for(i = Math.max(n-this.t,0); i < a.t; ++i)\n r[this.t+i-n] = this.am(n-i,a[i],r,0,0,this.t+i-n);\n r.clamp();\n r.drShiftTo(1,r);\n }\n\n // Barrett modular reduction\n function Barrett(m) {\n // setup Barrett\n this.r2 = nbi();\n this.q3 = nbi();\n BigInteger.ONE.dlShiftTo(2*m.t,this.r2);\n this.mu = this.r2.divide(m);\n this.m = m;\n }\n\n function barrettConvert(x) {\n if(x.s < 0 || x.t > 2*this.m.t) return x.mod(this.m);\n else if(x.compareTo(this.m) < 0) return x;\n else { var r = nbi(); x.copyTo(r); this.reduce(r); return r; }\n }\n\n function barrettRevert(x) { return x; }\n\n // x = x mod m (HAC 14.42)\n function barrettReduce(x) {\n x.drShiftTo(this.m.t-1,this.r2);\n if(x.t > this.m.t+1) { x.t = this.m.t+1; x.clamp(); }\n this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);\n this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);\n while(x.compareTo(this.r2) < 0) x.dAddOffset(1,this.m.t+1);\n x.subTo(this.r2,x);\n while(x.compareTo(this.m) >= 0) x.subTo(this.m,x);\n }\n\n // r = x^2 mod m; x != r\n function barrettSqrTo(x,r) { x.squareTo(r); this.reduce(r); }\n\n // r = x*y mod m; x,y != r\n function barrettMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }\n\n Barrett.prototype.convert = barrettConvert;\n Barrett.prototype.revert = barrettRevert;\n Barrett.prototype.reduce = barrettReduce;\n Barrett.prototype.mulTo = barrettMulTo;\n Barrett.prototype.sqrTo = barrettSqrTo;\n\n // (public) this^e % m (HAC 14.85)\n function bnModPow(e,m) {\n var i = e.bitLength(), k, r = nbv(1), z;\n if(i <= 0) return r;\n else if(i < 18) k = 1;\n else if(i < 48) k = 3;\n else if(i < 144) k = 4;\n else if(i < 768) k = 5;\n else k = 6;\n if(i < 8)\n z = new Classic(m);\n else if(m.isEven())\n z = new Barrett(m);\n else\n z = new Montgomery(m);\n\n // precomputation\n var g = new Array(), n = 3, k1 = k-1, km = (1< 1) {\n var g2 = nbi();\n z.sqrTo(g[1],g2);\n while(n <= km) {\n g[n] = nbi();\n z.mulTo(g2,g[n-2],g[n]);\n n += 2;\n }\n }\n\n var j = e.t-1, w, is1 = true, r2 = nbi(), t;\n i = nbits(e[j])-1;\n while(j >= 0) {\n if(i >= k1) w = (e[j]>>(i-k1))&km;\n else {\n w = (e[j]&((1<<(i+1))-1))<<(k1-i);\n if(j > 0) w |= e[j-1]>>(this.DB+i-k1);\n }\n\n n = k;\n while((w&1) == 0) { w >>= 1; --n; }\n if((i -= n) < 0) { i += this.DB; --j; }\n if(is1) { // ret == 1, don't bother squaring or multiplying it\n g[w].copyTo(r);\n is1 = false;\n }\n else {\n while(n > 1) { z.sqrTo(r,r2); z.sqrTo(r2,r); n -= 2; }\n if(n > 0) z.sqrTo(r,r2); else { t = r; r = r2; r2 = t; }\n z.mulTo(r2,g[w],r);\n }\n\n while(j >= 0 && (e[j]&(1< 0) {\n x.rShiftTo(g,x);\n y.rShiftTo(g,y);\n }\n while(x.signum() > 0) {\n if((i = x.getLowestSetBit()) > 0) x.rShiftTo(i,x);\n if((i = y.getLowestSetBit()) > 0) y.rShiftTo(i,y);\n if(x.compareTo(y) >= 0) {\n x.subTo(y,x);\n x.rShiftTo(1,x);\n }\n else {\n y.subTo(x,y);\n y.rShiftTo(1,y);\n }\n }\n if(g > 0) y.lShiftTo(g,y);\n return y;\n }\n\n // (protected) this % n, n < 2^26\n function bnpModInt(n) {\n if(n <= 0) return 0;\n var d = this.DV%n, r = (this.s<0)?n-1:0;\n if(this.t > 0)\n if(d == 0) r = this[0]%n;\n else for(var i = this.t-1; i >= 0; --i) r = (d*r+this[i])%n;\n return r;\n }\n\n // (public) 1/this % m (HAC 14.61)\n function bnModInverse(m) {\n var ac = m.isEven();\n if((this.isEven() && ac) || m.signum() == 0) return BigInteger.ZERO;\n var u = m.clone(), v = this.clone();\n var a = nbv(1), b = nbv(0), c = nbv(0), d = nbv(1);\n while(u.signum() != 0) {\n while(u.isEven()) {\n u.rShiftTo(1,u);\n if(ac) {\n if(!a.isEven() || !b.isEven()) { a.addTo(this,a); b.subTo(m,b); }\n a.rShiftTo(1,a);\n }\n else if(!b.isEven()) b.subTo(m,b);\n b.rShiftTo(1,b);\n }\n while(v.isEven()) {\n v.rShiftTo(1,v);\n if(ac) {\n if(!c.isEven() || !d.isEven()) { c.addTo(this,c); d.subTo(m,d); }\n c.rShiftTo(1,c);\n }\n else if(!d.isEven()) d.subTo(m,d);\n d.rShiftTo(1,d);\n }\n if(u.compareTo(v) >= 0) {\n u.subTo(v,u);\n if(ac) a.subTo(c,a);\n b.subTo(d,b);\n }\n else {\n v.subTo(u,v);\n if(ac) c.subTo(a,c);\n d.subTo(b,d);\n }\n }\n if(v.compareTo(BigInteger.ONE) != 0) return BigInteger.ZERO;\n if(d.compareTo(m) >= 0) return d.subtract(m);\n if(d.signum() < 0) d.addTo(m,d); else return d;\n if(d.signum() < 0) return d.add(m); else return d;\n }\n\n var lowprimes = [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997];\n var lplim = (1<<26)/lowprimes[lowprimes.length-1];\n\n // (public) test primality with certainty >= 1-.5^t\n function bnIsProbablePrime(t) {\n var i, x = this.abs();\n if(x.t == 1 && x[0] <= lowprimes[lowprimes.length-1]) {\n for(i = 0; i < lowprimes.length; ++i)\n if(x[0] == lowprimes[i]) return true;\n return false;\n }\n if(x.isEven()) return false;\n i = 1;\n while(i < lowprimes.length) {\n var m = lowprimes[i], j = i+1;\n while(j < lowprimes.length && m < lplim) m *= lowprimes[j++];\n m = x.modInt(m);\n while(i < j) if(m%lowprimes[i++] == 0) return false;\n }\n return x.millerRabin(t);\n }\n\n // (protected) true if probably prime (HAC 4.24, Miller-Rabin)\n function bnpMillerRabin(t) {\n var n1 = this.subtract(BigInteger.ONE);\n var k = n1.getLowestSetBit();\n if(k <= 0) return false;\n var r = n1.shiftRight(k);\n t = (t+1)>>1;\n if(t > lowprimes.length) t = lowprimes.length;\n var a = nbi();\n for(var i = 0; i < t; ++i) {\n //Pick bases at random, instead of starting at 2\n a.fromInt(lowprimes[Math.floor(Math.random()*lowprimes.length)]);\n var y = a.modPow(r,this);\n if(y.compareTo(BigInteger.ONE) != 0 && y.compareTo(n1) != 0) {\n var j = 1;\n while(j++ < k && y.compareTo(n1) != 0) {\n y = y.modPowInt(2,this);\n if(y.compareTo(BigInteger.ONE) == 0) return false;\n }\n if(y.compareTo(n1) != 0) return false;\n }\n }\n return true;\n }\n\n // protected\n BigInteger.prototype.chunkSize = bnpChunkSize;\n BigInteger.prototype.toRadix = bnpToRadix;\n BigInteger.prototype.fromRadix = bnpFromRadix;\n BigInteger.prototype.fromNumber = bnpFromNumber;\n BigInteger.prototype.bitwiseTo = bnpBitwiseTo;\n BigInteger.prototype.changeBit = bnpChangeBit;\n BigInteger.prototype.addTo = bnpAddTo;\n BigInteger.prototype.dMultiply = bnpDMultiply;\n BigInteger.prototype.dAddOffset = bnpDAddOffset;\n BigInteger.prototype.multiplyLowerTo = bnpMultiplyLowerTo;\n BigInteger.prototype.multiplyUpperTo = bnpMultiplyUpperTo;\n BigInteger.prototype.modInt = bnpModInt;\n BigInteger.prototype.millerRabin = bnpMillerRabin;\n\n // public\n BigInteger.prototype.clone = bnClone;\n BigInteger.prototype.intValue = bnIntValue;\n BigInteger.prototype.byteValue = bnByteValue;\n BigInteger.prototype.shortValue = bnShortValue;\n BigInteger.prototype.signum = bnSigNum;\n BigInteger.prototype.toByteArray = bnToByteArray;\n BigInteger.prototype.equals = bnEquals;\n BigInteger.prototype.min = bnMin;\n BigInteger.prototype.max = bnMax;\n BigInteger.prototype.and = bnAnd;\n BigInteger.prototype.or = bnOr;\n BigInteger.prototype.xor = bnXor;\n BigInteger.prototype.andNot = bnAndNot;\n BigInteger.prototype.not = bnNot;\n BigInteger.prototype.shiftLeft = bnShiftLeft;\n BigInteger.prototype.shiftRight = bnShiftRight;\n BigInteger.prototype.getLowestSetBit = bnGetLowestSetBit;\n BigInteger.prototype.bitCount = bnBitCount;\n BigInteger.prototype.testBit = bnTestBit;\n BigInteger.prototype.setBit = bnSetBit;\n BigInteger.prototype.clearBit = bnClearBit;\n BigInteger.prototype.flipBit = bnFlipBit;\n BigInteger.prototype.add = bnAdd;\n BigInteger.prototype.subtract = bnSubtract;\n BigInteger.prototype.multiply = bnMultiply;\n BigInteger.prototype.divide = bnDivide;\n BigInteger.prototype.remainder = bnRemainder;\n BigInteger.prototype.divideAndRemainder = bnDivideAndRemainder;\n BigInteger.prototype.modPow = bnModPow;\n BigInteger.prototype.modInverse = bnModInverse;\n BigInteger.prototype.pow = bnPow;\n BigInteger.prototype.gcd = bnGCD;\n BigInteger.prototype.isProbablePrime = bnIsProbablePrime;\n\n // JSBN-specific extension\n BigInteger.prototype.square = bnSquare;\n\n // Expose the Barrett function\n BigInteger.prototype.Barrett = Barrett\n\n // BigInteger interfaces not implemented in jsbn:\n\n // BigInteger(int signum, byte[] magnitude)\n // double doubleValue()\n // float floatValue()\n // int hashCode()\n // long longValue()\n // static BigInteger valueOf(long val)\n\n // Random number generator - requires a PRNG backend, e.g. prng4.js\n\n // For best results, put code like\n // \n // in your main HTML document.\n\n var rng_state;\n var rng_pool;\n var rng_pptr;\n\n // Mix in a 32-bit integer into the pool\n function rng_seed_int(x) {\n rng_pool[rng_pptr++] ^= x & 255;\n rng_pool[rng_pptr++] ^= (x >> 8) & 255;\n rng_pool[rng_pptr++] ^= (x >> 16) & 255;\n rng_pool[rng_pptr++] ^= (x >> 24) & 255;\n if(rng_pptr >= rng_psize) rng_pptr -= rng_psize;\n }\n\n // Mix in the current time (w/milliseconds) into the pool\n function rng_seed_time() {\n rng_seed_int(new Date().getTime());\n }\n\n // Initialize the pool with junk if needed.\n if(rng_pool == null) {\n rng_pool = new Array();\n rng_pptr = 0;\n var t;\n if(typeof window !== \"undefined\" && window.crypto) {\n if (window.crypto.getRandomValues) {\n // Use webcrypto if available\n var ua = new Uint8Array(32);\n window.crypto.getRandomValues(ua);\n for(t = 0; t < 32; ++t)\n rng_pool[rng_pptr++] = ua[t];\n }\n else if(navigator.appName == \"Netscape\" && navigator.appVersion < \"5\") {\n // Extract entropy (256 bits) from NS4 RNG if available\n var z = window.crypto.random(32);\n for(t = 0; t < z.length; ++t)\n rng_pool[rng_pptr++] = z.charCodeAt(t) & 255;\n }\n }\n while(rng_pptr < rng_psize) { // extract some randomness from Math.random()\n t = Math.floor(65536 * Math.random());\n rng_pool[rng_pptr++] = t >>> 8;\n rng_pool[rng_pptr++] = t & 255;\n }\n rng_pptr = 0;\n rng_seed_time();\n //rng_seed_int(window.screenX);\n //rng_seed_int(window.screenY);\n }\n\n function rng_get_byte() {\n if(rng_state == null) {\n rng_seed_time();\n rng_state = prng_newstate();\n rng_state.init(rng_pool);\n for(rng_pptr = 0; rng_pptr < rng_pool.length; ++rng_pptr)\n rng_pool[rng_pptr] = 0;\n rng_pptr = 0;\n //rng_pool = null;\n }\n // TODO: allow reseeding after first request\n return rng_state.next();\n }\n\n function rng_get_bytes(ba) {\n var i;\n for(i = 0; i < ba.length; ++i) ba[i] = rng_get_byte();\n }\n\n function SecureRandom() {}\n\n SecureRandom.prototype.nextBytes = rng_get_bytes;\n\n // prng4.js - uses Arcfour as a PRNG\n\n function Arcfour() {\n this.i = 0;\n this.j = 0;\n this.S = new Array();\n }\n\n // Initialize arcfour context from key, an array of ints, each from [0..255]\n function ARC4init(key) {\n var i, j, t;\n for(i = 0; i < 256; ++i)\n this.S[i] = i;\n j = 0;\n for(i = 0; i < 256; ++i) {\n j = (j + this.S[i] + key[i % key.length]) & 255;\n t = this.S[i];\n this.S[i] = this.S[j];\n this.S[j] = t;\n }\n this.i = 0;\n this.j = 0;\n }\n\n function ARC4next() {\n var t;\n this.i = (this.i + 1) & 255;\n this.j = (this.j + this.S[this.i]) & 255;\n t = this.S[this.i];\n this.S[this.i] = this.S[this.j];\n this.S[this.j] = t;\n return this.S[(t + this.S[this.i]) & 255];\n }\n\n Arcfour.prototype.init = ARC4init;\n Arcfour.prototype.next = ARC4next;\n\n // Plug in your RNG constructor here\n function prng_newstate() {\n return new Arcfour();\n }\n\n // Pool size must be a multiple of 4 and greater than 32.\n // An array of bytes the size of the pool will be passed to init()\n var rng_psize = 256;\n\n if (typeof exports !== 'undefined') {\n exports = module.exports = {\n default: BigInteger,\n BigInteger: BigInteger,\n SecureRandom: SecureRandom,\n };\n } else {\n this.jsbn = {\n BigInteger: BigInteger,\n SecureRandom: SecureRandom\n };\n }\n\n}).call(this);\n" - }, - { - "id": 53, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webpWorkerController.ts", - "name": "./src/lib/webp/webpWorkerController.ts", - "index": 18, - "index2": 18, - "size": 2095, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts", - "issuerId": 2, - "issuerName": "./src/lib/mtproto/mtprotoworker.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts", - "name": "./src/lib/mtproto/mtprotoworker.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - } - ], - "profile": { - "factory": 2342, - "building": 10824, - "dependencies": 20 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 2, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts", - "module": "./src/lib/mtproto/mtprotoworker.ts", - "moduleName": "./src/lib/mtproto/mtprotoworker.ts", - "type": "cjs require", - "userRequest": "../webp/webpWorkerController", - "loc": "10:47-86" - }, - { - "moduleId": 18, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "module": "./src/components/wrappers.ts", - "moduleName": "./src/components/wrappers.ts", - "type": "cjs require", - "userRequest": "../lib/webp/webpWorkerController", - "loc": "30:47-90" - } - ], - "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.WebpWorkerController = void 0;\r\nconst webp_worker_1 = __importDefault(require(\"worker-loader!./webp.worker\"));\r\nconst cancellablePromise_1 = require(\"../../helpers/cancellablePromise\");\r\nconst mtprotoworker_1 = __importDefault(require(\"../mtproto/mtprotoworker\"));\r\nclass WebpWorkerController {\r\n constructor() {\r\n this.convertPromises = {};\r\n }\r\n init() {\r\n this.worker = new webp_worker_1.default();\r\n this.worker.addEventListener('message', (e) => {\r\n const payload = e.data.payload;\r\n if (payload.fileName.indexOf('main-') === 0) {\r\n const promise = this.convertPromises[payload.fileName];\r\n if (promise) {\r\n payload.bytes ? promise.resolve(payload.bytes) : promise.reject();\r\n delete this.convertPromises[payload.fileName];\r\n }\r\n }\r\n else {\r\n mtprotoworker_1.default.postMessage(e.data);\r\n }\r\n });\r\n }\r\n postMessage(data) {\r\n if (this.init) {\r\n this.init();\r\n this.init = null;\r\n }\r\n this.worker.postMessage(data);\r\n }\r\n convert(fileName, bytes) {\r\n fileName = 'main-' + fileName;\r\n if (this.convertPromises.hasOwnProperty(fileName)) {\r\n return this.convertPromises[fileName];\r\n }\r\n const convertPromise = cancellablePromise_1.deferredPromise();\r\n this.postMessage({ type: 'convertWebp', payload: { fileName, bytes } });\r\n return this.convertPromises[fileName] = convertPromise;\r\n }\r\n}\r\nexports.WebpWorkerController = WebpWorkerController;\r\nconst webpWorkerController = new WebpWorkerController();\r\n// @ts-ignore\r\nif (process.env.NODE_ENV != 'production') {\r\n window.webpWorkerController = webpWorkerController;\r\n}\r\nexports.default = webpWorkerController;\r\n" - }, - { - "id": 54, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\opusDecodeController.ts", - "name": "./src/lib/opusDecodeController.ts", - "index": 52, - "index2": 41, - "size": 6088, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDocsManager.ts", - "issuerId": 12, - "issuerName": "./src/lib/appManagers/appDocsManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 12, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDocsManager.ts", - "name": "./src/lib/appManagers/appDocsManager.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 972, - "building": 1447, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 12, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appDocsManager.ts", - "module": "./src/lib/appManagers/appDocsManager.ts", - "moduleName": "./src/lib/appManagers/appDocsManager.ts", - "type": "cjs require", - "userRequest": "../opusDecodeController", - "loc": "17:47-81" - }, - { - "moduleId": 98, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\input.ts", - "module": "./src/components/chat/input.ts", - "moduleName": "./src/components/chat/input.ts", - "type": "cjs require", - "userRequest": "../../lib/opusDecodeController", - "loc": "18:47-88" - } - ], - "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\nconst config_1 = require(\"./config\");\r\nconst logger_1 = require(\"./logger\");\r\nclass OpusDecodeController {\r\n constructor() {\r\n this.sampleRate = 48000;\r\n this.tasks = [];\r\n this.keepAlive = false;\r\n this.log = logger_1.logger('OPUS', logger_1.LogLevels.error);\r\n }\r\n isPlaySupported() {\r\n if (this.isPlaySupportedResult !== undefined)\r\n return this.isPlaySupportedResult;\r\n const audio = document.createElement('audio');\r\n return this.isPlaySupportedResult = !!(audio.canPlayType && audio.canPlayType('audio/ogg;').replace(/no/, '')) /* && 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 this.log('[WAV] got message:', 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 this.log('[DECODER] got message', data);\r\n if (data.type == 'done') {\r\n //this.log('[DECODER] send done to wav');\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.log('[DECODER] send encode to wav');\r\n this.wavWorker.postMessage({\r\n command: 'encode',\r\n buffers: e.data\r\n }, config_1.isSafari ? undefined : 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 if (!result) {\r\n task.callback.reject('timeout');\r\n }\r\n else {\r\n clearTimeout(task.timeout);\r\n task.callback.resolve({ bytes: result, waveform: task.waveform });\r\n }\r\n if (this.tasks.length) {\r\n this.executeNewTask(this.tasks[0]);\r\n }\r\n this.terminateWorkers();\r\n }\r\n terminateWorkers(kill = false) {\r\n if ((this.keepAlive || this.tasks.length) && !kill)\r\n return;\r\n if (this.worker) {\r\n this.worker.terminate();\r\n this.worker = null;\r\n }\r\n if (this.wavWorker) {\r\n this.wavWorker.terminate();\r\n this.wavWorker = null;\r\n }\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.log('[DECODER] send decode');\r\n this.worker.postMessage({\r\n command: 'decode',\r\n pages: task.pages,\r\n waveform: task.withWaveform\r\n }, config_1.isSafari ? undefined : [task.pages.buffer]);\r\n //}, 1e3);\r\n task.timeout = setTimeout(() => {\r\n this.log.error('decode timeout' /* , task */);\r\n this.terminateWorkers(true);\r\n if (this.tasks.length) {\r\n this.loadWorker();\r\n this.loadWavWorker();\r\n }\r\n this.onTaskEnd(this.tasks.shift());\r\n }, 10e3);\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 timeout: 0\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\nconst opusDecodeController = new OpusDecodeController();\r\n// @ts-ignore\r\nif (process.env.NODE_ENV != 'production') {\r\n window.opusDecodeController = opusDecodeController;\r\n}\r\nexports.default = opusDecodeController;\r\n" - }, - { - "id": 55, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appWebPagesManager.ts", - "name": "./src/lib/appManagers/appWebPagesManager.ts", - "index": 54, - "index2": 44, - "size": 4219, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "issuerId": 7, - "issuerName": "./src/lib/appManagers/appMessagesManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "name": "./src/lib/appManagers/appMessagesManager.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 2083, - "building": 945, - "dependencies": 16 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 7, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "module": "./src/lib/appManagers/appMessagesManager.ts", - "moduleName": "./src/lib/appManagers/appMessagesManager.ts", - "type": "cjs require", - "userRequest": "./appWebPagesManager", - "loc": "33:45-76" - }, - { - "moduleId": 98, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\input.ts", - "module": "./src/components/chat/input.ts", - "moduleName": "./src/components/chat/input.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/appWebPagesManager", - "loc": "10:45-96" - } - ], - "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 const 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": 56, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts", - "name": "./src/lib/appManagers/appMediaViewer.ts", - "index": 62, - "index2": 61, - "size": 49644, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "./appMediaViewer", - "loc": "19:41-68" - }, - { - "moduleId": 24, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", - "type": "cjs require", - "userRequest": "./appMediaViewer", - "loc": "47: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.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 logger_1 = require(\"../logger\");\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 = require(\"../../components/lazyLoadQueue\");\r\nconst appForward_1 = __importDefault(require(\"../../components/appForward\"));\r\nconst config_1 = require(\"../config\");\r\nconst appMediaPlaybackController_1 = __importDefault(require(\"../../components/appMediaPlaybackController\"));\r\nconst cancellablePromise_1 = require(\"../../helpers/cancellablePromise\");\r\n// TODO: масштабирование картинок (не SVG) при ресайзе, и правильный возврат на исходную позицию\r\n// TODO: картинки \"обрезаются\" если возвращаются или появляются с места, где есть их перекрытие (топбар, поле ввода)\r\n// TODO: видео в мобильной вёрстке, если показываются элементы управления: если свайпнуть в сторону, то элементы вернутся на место, т.е. прыгнут - это не ок, надо бы замаскировать\r\nclass SwipeHandler {\r\n constructor(element, onSwipe) {\r\n this.onSwipe = onSwipe;\r\n this.handleTouchStart = (evt) => {\r\n // * Fix for seek input\r\n if (evt.target.tagName == 'INPUT') {\r\n this.xDown = this.yDown = null;\r\n return;\r\n }\r\n const firstTouch = evt.touches[0];\r\n this.xDown = firstTouch.clientX;\r\n this.yDown = firstTouch.clientY;\r\n };\r\n this.handleTouchMove = (evt) => {\r\n if (this.xDown == null || this.yDown == null) {\r\n return;\r\n }\r\n const xUp = evt.touches[0].clientX;\r\n const yUp = evt.touches[0].clientY;\r\n const xDiff = this.xDown - xUp;\r\n const yDiff = this.yDown - yUp;\r\n // if(Math.abs(xDiff) > Math.abs(yDiff)) { /*most significant*/\r\n // if(xDiff > 0) { /* left swipe */ \r\n // } else { /* right swipe */\r\n // } \r\n // } else {\r\n // if(yDiff > 0) { /* up swipe */ \r\n // } else { /* down swipe */\r\n // }\r\n // }\r\n /* reset values */\r\n if (this.onSwipe(xDiff, yDiff)) {\r\n this.xDown = null;\r\n this.yDown = null;\r\n }\r\n };\r\n element.addEventListener('touchstart', this.handleTouchStart, false);\r\n element.addEventListener('touchmove', this.handleTouchMove, false);\r\n }\r\n}\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.preloaderStreamable = null;\r\n this.lastTarget = null;\r\n this.prevTargets = [];\r\n this.nextTargets = [];\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.onClickDownload = (e) => {\r\n const message = appMessagesManager_1.default.getMessage(this.currentMessageID);\r\n if (message.media.photo) {\r\n appPhotosManager_1.default.savePhotoFile(message.media.photo);\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);\r\n }\r\n }\r\n };\r\n this.onClick = (e) => {\r\n if (this.setMoverAnimationPromise)\r\n return;\r\n const target = e.target;\r\n if (target.tagName == 'A')\r\n return;\r\n utils_1.cancelEvent(e);\r\n if (config_1.touchSupport) {\r\n if (this.highlightSwitchersTimeout) {\r\n clearTimeout(this.highlightSwitchersTimeout);\r\n }\r\n else {\r\n this.wholeDiv.classList.add('highlight-switchers');\r\n }\r\n this.highlightSwitchersTimeout = window.setTimeout(() => {\r\n this.wholeDiv.classList.remove('highlight-switchers');\r\n this.highlightSwitchersTimeout = 0;\r\n }, 3e3);\r\n return;\r\n }\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.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 this.log = logger_1.logger('AMV');\r\n this.preloader = new preloader_1.default();\r\n this.preloaderStreamable = new preloader_1.default(undefined, false, true);\r\n this.lazyLoadQueue = new lazyLoadQueue_1.LazyLoadQueueBase();\r\n misc_1.parseMenuButtonsTo(this.buttons, this.wholeDiv.querySelectorAll(`[class*='menu']`));\r\n const close = (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 as HTMLImageElement).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 this.setMoverPromise = null;\r\n if (appForward_1.default.container.classList.contains('active')) {\r\n setTimeout(() => {\r\n appForward_1.default.close();\r\n }, 200);\r\n }\r\n window.removeEventListener('keydown', this.onKeyDown);\r\n };\r\n [this.buttons.close, this.buttons[\"mobile-close\"], this.preloaderStreamable.preloader].forEach(el => {\r\n el.addEventListener('click', close);\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, this.buttons[\"menu-download\"]].forEach(el => {\r\n el.addEventListener('click', this.onClickDownload);\r\n });\r\n const forward = (e) => {\r\n appForward_1.default.init([this.currentMessageID]);\r\n };\r\n [this.buttons.forward, this.buttons[\"menu-forward\"]].forEach(el => {\r\n el.addEventListener('click', forward);\r\n });\r\n this.wholeDiv.addEventListener('click', this.onClick);\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 if (config_1.touchSupport) {\r\n const swipeHandler = new SwipeHandler(this.wholeDiv, (xDiff, yDiff) => {\r\n if (mediaPlayer_1.default.isFullScreen()) {\r\n return;\r\n }\r\n //console.log(xDiff, yDiff);\r\n const percents = Math.abs(xDiff) / appPhotosManager_1.default.windowW;\r\n if (percents > .2 || xDiff > 125) {\r\n //console.log('will swipe', xDiff);\r\n if (xDiff < 0) {\r\n this.buttons.prev.click();\r\n }\r\n else {\r\n this.buttons.next.click();\r\n }\r\n return true;\r\n }\r\n const percentsY = Math.abs(yDiff) / appPhotosManager_1.default.windowH;\r\n if (percentsY > .2 || yDiff > 125) {\r\n this.buttons.close.click();\r\n return true;\r\n }\r\n return false;\r\n });\r\n }\r\n }\r\n setMoverToTarget(target, closing = false, fromRight = 0) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const mover = this.content.mover;\r\n if (!target) {\r\n target = this.content.container;\r\n }\r\n if (!closing) {\r\n mover.innerHTML = '';\r\n //mover.append(this.buttons.prev, this.buttons.next);\r\n }\r\n this.removeCenterFromMover(mover);\r\n const wasActive = fromRight !== 0;\r\n const 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 const containerRect = this.content.container.getBoundingClientRect();\r\n let transform = '';\r\n let left;\r\n let top;\r\n if (wasActive) {\r\n left = fromRight === 1 ? appPhotosManager_1.default.windowW : -containerRect.width;\r\n top = containerRect.top;\r\n }\r\n else {\r\n left = rect.left;\r\n top = rect.top;\r\n }\r\n transform += `translate3d(${left}px,${top}px,0) `;\r\n /* if(wasActive) {\r\n left = fromRight === 1 ? appPhotosManager.windowW / 2 : -(containerRect.width + appPhotosManager.windowW / 2);\r\n transform += `translate(${left}px,-50%) `;\r\n } else {\r\n left = rect.left - (appPhotosManager.windowW / 2);\r\n top = rect.top - (appPhotosManager.windowH / 2);\r\n transform += `translate(${left}px,${top}px) `;\r\n } */\r\n let aspecter;\r\n if (target instanceof HTMLImageElement || target instanceof HTMLVideoElement || target.tagName == 'DIV') {\r\n if (mover.firstElementChild && mover.firstElementChild.classList.contains('media-viewer-aspecter')) {\r\n aspecter = mover.firstElementChild;\r\n const player = aspecter.querySelector('.ckin__player');\r\n if (player) {\r\n const 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 mover.style.width = containerRect.width + 'px';\r\n mover.style.height = containerRect.height + 'px';\r\n const scaleX = rect.width / containerRect.width;\r\n const 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 const 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 const isOut = target.classList.contains('is-out');\r\n const deferred = this.setMoverAnimationPromise = cancellablePromise_1.deferredPromise();\r\n const ret = { onAnimationEnd: deferred };\r\n this.setMoverAnimationPromise.then(() => {\r\n this.setMoverAnimationPromise = null;\r\n });\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 const video = mediaElement = document.createElement('video');\r\n video.src = target === null || target === void 0 ? void 0 : target.src;\r\n }\r\n else if (target instanceof SVGSVGElement) {\r\n const clipID = target.dataset.clipID;\r\n const newClipID = clipID + '-mv';\r\n const { width, height } = containerRect;\r\n const 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 // нижние два свойства для масштабирования\r\n newSvg.setAttributeNS(null, 'viewBox', `0 0 ${width} ${height}`);\r\n newSvg.setAttributeNS(null, 'preserveAspectRatio', 'xMidYMid meet');\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 const defs = newSvg.firstElementChild;\r\n const 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 const 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 const 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 if (mediaElement) {\r\n aspecter.append(mediaElement);\r\n }\r\n }\r\n mediaElement = mover.querySelector('video, img');\r\n if (mediaElement instanceof HTMLImageElement) {\r\n mediaElement.classList.add('thumbnail');\r\n if (!aspecter) {\r\n mediaElement.style.width = containerRect.width + 'px';\r\n mediaElement.style.height = containerRect.height + 'px';\r\n }\r\n if (src) {\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 as HTMLSourceElement).src || src)) {\r\n await new Promise((resolve, reject) => {\r\n mediaElement.addEventListener('loadeddata', resolve);\r\n \r\n if(src) {\r\n (mediaElement.firstElementChild as HTMLSourceElement).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(mover.classList.contains('center')) {\r\n mover.classList.remove('center');\r\n void mover.offsetLeft; // reflow\r\n } */\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.cssText = 'display: none;';\r\n deferred.resolve();\r\n }, delay);\r\n return ret;\r\n }\r\n //await new Promise((resolve) => setTimeout(resolve, 0));\r\n yield new Promise((resolve) => window.requestAnimationFrame(resolve));\r\n // чтобы проверить установленную позицию - раскомментировать\r\n //throw '';\r\n mover.style.transform = `translate3d(${containerRect.left}px,${containerRect.top}px,0) scale(1,1)`;\r\n //mover.style.transform = `translate(-50%,-50%) 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') || true) {\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 // эти строки нужны для установки центральной позиции, в случае ресайза это будет нужно\r\n mover.classList.add('center', 'no-transition');\r\n /* mover.style.left = mover.style.top = '50%';\r\n mover.style.transform = 'translate(-50%, -50%)';\r\n void mover.offsetLeft; // reflow */\r\n // это уже нужно для будущих анимаций\r\n mover.classList.add('active');\r\n delete mover.dataset.timeout;\r\n deferred.resolve();\r\n }, delay);\r\n if (path) {\r\n this.sizeTailPath(path, containerRect, scaleX, delay, true, isOut, borderRadius);\r\n }\r\n return ret;\r\n });\r\n }\r\n setFullAspect(aspecter, containerRect, rect) {\r\n /* let media = aspecter.firstElementChild;\r\n let proportion: number;\r\n if(media instanceof HTMLImageElement) {\r\n proportion = media.naturalWidth / media.naturalHeight;\r\n } else if(media instanceof HTMLVideoElement) {\r\n proportion = media.videoWidth / media.videoHeight;\r\n } */\r\n const proportion = containerRect.width / containerRect.height;\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 const start = Date.now();\r\n const { width, height } = rect;\r\n delay = delay / 2;\r\n const br = borderRadius.split(' ').map(v => parseInt(v));\r\n const step = () => {\r\n const 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 const _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 removeCenterFromMover(mover) {\r\n if (mover.classList.contains('center')) {\r\n //const rect = mover.getBoundingClientRect();\r\n const rect = this.content.container.getBoundingClientRect();\r\n mover.style.transform = `translate3d(${rect.left}px,${rect.top}px,0)`;\r\n mover.classList.remove('center');\r\n void mover.offsetLeft; // reflow\r\n mover.classList.remove('no-transition');\r\n }\r\n }\r\n moveTheMover(mover, toLeft = true) {\r\n const windowW = appPhotosManager_1.default.windowW;\r\n this.removeCenterFromMover(mover);\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 const rect = mover.getBoundingClientRect();\r\n const newTransform = mover.style.transform.replace(/translate\\((.+?),/, (match, p1) => {\r\n const x = toLeft ? -rect.width : windowW;\r\n //const x = toLeft ? -(rect.right + (rect.width / 2)) : windowW / 2;\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 const newMover = document.createElement('div');\r\n newMover.classList.add('media-viewer-mover');\r\n if (this.content.mover) {\r\n const 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 return this.content.mover = newMover;\r\n }\r\n /* public isElementVisible(container: HTMLElement, target: HTMLElement) {\r\n const rect = container.getBoundingClientRect();\r\n const targetRect = target.getBoundingClientRect();\r\n \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 const loadCount = 50;\r\n const 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 const peerID = this.peerID;\r\n const 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 const method = older ? value.history.forEach : value.history.forEachReverse;\r\n method.call(value.history, mid => {\r\n const message = appMessagesManager_1.default.getMessage(mid);\r\n const 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 const 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 const 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 return __awaiter(this, void 0, void 0, function* () {\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.type == 'video' || media.type == 'gif';\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 if (appForward_1.default.container.classList.contains('active')) {\r\n appForward_1.default.close();\r\n yield new Promise((resolve) => setTimeout(resolve, 200));\r\n }\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 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.onKeyDown);\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 = config_1.mediaSizes.isMobile ? this.pageEl.scrollWidth : this.pageEl.scrollWidth - 16;\r\n const maxHeight = appPhotosManager_1.default.windowH - 100;\r\n const size = appPhotosManager_1.default.setAttachmentSize(media, container, maxWidth, maxHeight);\r\n // need after setAttachmentSize\r\n /* if(useContainerAsTarget) {\r\n target = target.querySelector('img, video') || target;\r\n } */\r\n const preloader = media.supportsStreaming ? this.preloaderStreamable : this.preloader;\r\n let setMoverPromise;\r\n if (isVideo) {\r\n ////////this.log('will wrap video', media, size);\r\n // потому что для safari нужно создать элемент из event'а\r\n const video = document.createElement('video');\r\n setMoverPromise = this.setMoverToTarget(target, false, fromRight).then(({ onAnimationEnd }) => {\r\n //return; // set and don't move\r\n //if(wasActive) return;\r\n //return;\r\n const div = mover.firstElementChild && mover.firstElementChild.classList.contains('media-viewer-aspecter') ? mover.firstElementChild : mover;\r\n //const video = mover.querySelector('video') || document.createElement('video');\r\n const moverVideo = mover.querySelector('video');\r\n if (moverVideo) {\r\n moverVideo.remove();\r\n }\r\n //video.src = '';\r\n video.setAttribute('playsinline', '');\r\n if (config_1.isSafari) {\r\n video.autoplay = true;\r\n }\r\n if (media.type == 'gif') {\r\n video.muted = true;\r\n video.autoplay = true;\r\n video.loop = true;\r\n }\r\n if (!video.parentElement) {\r\n div.append(video);\r\n }\r\n const canPlayThrough = new Promise((resolve) => {\r\n video.addEventListener('canplay', resolve, { once: true });\r\n });\r\n const createPlayer = () => {\r\n if (media.type != 'gif') {\r\n video.dataset.ckin = 'default';\r\n video.dataset.overlay = '1';\r\n // fix for simultaneous play\r\n appMediaPlaybackController_1.default.pause();\r\n appMediaPlaybackController_1.default.willBePlayedMedia = null;\r\n Promise.all([canPlayThrough, onAnimationEnd]).then(() => {\r\n const player = new mediaPlayer_1.default(video, true, media.supportsStreaming);\r\n /* div.append(video);\r\n mover.append(player.wrapper); */\r\n });\r\n }\r\n };\r\n if (media.supportsStreaming) {\r\n onAnimationEnd.then(() => {\r\n if (video.readyState < video.HAVE_FUTURE_DATA) {\r\n preloader.attach(mover, true);\r\n }\r\n /* canPlayThrough.then(() => {\r\n preloader.detach();\r\n }); */\r\n });\r\n const attachCanPlay = () => {\r\n video.addEventListener('canplay', () => {\r\n //this.log('video waited and progress loaded');\r\n preloader.detach();\r\n video.parentElement.classList.remove('is-buffering');\r\n }, { once: true });\r\n };\r\n video.addEventListener('waiting', (e) => {\r\n const loading = video.networkState === video.NETWORK_LOADING;\r\n const isntEnoughData = video.readyState < video.HAVE_FUTURE_DATA;\r\n //this.log('video waiting for progress', loading, isntEnoughData);\r\n if (loading && isntEnoughData) {\r\n attachCanPlay();\r\n preloader.attach(mover, true);\r\n // поставлю класс для плеера, чтобы убрать большую иконку пока прелоадер на месте\r\n video.parentElement.classList.add('is-buffering');\r\n }\r\n });\r\n attachCanPlay();\r\n }\r\n //if(!video.src || media.url != video.src) {\r\n const load = () => {\r\n const promise = media.supportsStreaming ? Promise.resolve() : appDocsManager_1.default.downloadDocNew(media);\r\n if (!media.supportsStreaming) {\r\n onAnimationEnd.then(() => {\r\n preloader.attach(mover, true, promise);\r\n });\r\n }\r\n promise.then(() => __awaiter(this, void 0, void 0, function* () {\r\n if (this.currentMessageID != message.mid) {\r\n this.log.warn('media viewer changed video');\r\n return;\r\n }\r\n const url = media.url;\r\n if (target instanceof SVGSVGElement /* && (video.parentElement || !isSafari) */) { // if video exists\r\n //if(!video.parentElement) {\r\n div.firstElementChild.lastElementChild.append(video);\r\n //}\r\n this.updateMediaSource(mover, url, 'video');\r\n }\r\n else {\r\n misc_1.renderImageFromUrl(video, url);\r\n }\r\n createPlayer();\r\n }));\r\n return promise;\r\n };\r\n this.lazyLoadQueue.unshift({ load });\r\n //} else createPlayer();\r\n });\r\n }\r\n else {\r\n setMoverPromise = this.setMoverToTarget(target, false, fromRight).then(({ onAnimationEnd }) => {\r\n //return; // set and don't move\r\n //if(wasActive) return;\r\n //return;\r\n const load = () => {\r\n const cancellablePromise = appPhotosManager_1.default.preloadPhoto(media.id, size);\r\n onAnimationEnd.then(() => {\r\n this.preloader.attach(mover, true, cancellablePromise);\r\n });\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 const 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 if (config_1.mediaSizes.isMobile) {\r\n const imgs = mover.querySelectorAll('img');\r\n if (imgs && imgs.length) {\r\n imgs.forEach(img => {\r\n img.classList.remove('thumbnail'); // может здесь это вообще не нужно\r\n });\r\n }\r\n }\r\n }\r\n else {\r\n const 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, () => {\r\n if (config_1.mediaSizes.isMobile) {\r\n image.classList.remove('thumbnail'); // может здесь это вообще не нужно\r\n }\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({ load });\r\n });\r\n }\r\n return this.setMoverPromise = setMoverPromise.catch(() => {\r\n this.setMoverAnimationPromise = null;\r\n }).finally(() => {\r\n this.setMoverPromise = null;\r\n });\r\n });\r\n }\r\n}\r\nexports.AppMediaViewer = AppMediaViewer;\r\nexports.default = new AppMediaViewer();\r\n" - }, - { - "id": 57, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\groupedLayout.ts", - "name": "./src/components/groupedLayout.ts", - "index": 70, - "index2": 62, - "size": 15940, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "issuerId": 18, - "issuerName": "./src/components/wrappers.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 18, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "name": "./src/components/wrappers.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 1092, - "building": 1418, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 18, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "module": "./src/components/wrappers.ts", - "moduleName": "./src/components/wrappers.ts", - "type": "cjs require", - "userRequest": "./groupedLayout", - "loc": "25:24-50" - }, - { - "moduleId": 98, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\input.ts", - "module": "./src/components/chat/input.ts", - "moduleName": "./src/components/chat/input.ts", - "type": "cjs require", - "userRequest": "../groupedLayout", - "loc": "15:24-51" - } - ], - "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": 58, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\poll.ts", - "name": "./src/components/poll.ts", - "index": 71, - "index2": 63, - "size": 24245, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "issuerId": 18, - "issuerName": "./src/components/wrappers.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 18, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "name": "./src/components/wrappers.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 1092, - "building": 1418, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 18, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "module": "./src/components/wrappers.ts", - "moduleName": "./src/components/wrappers.ts", - "type": "cjs require", - "userRequest": "./poll", - "loc": "26:31-48" - }, - { - "moduleId": 86, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\pollResults.ts", - "module": "./src/components/sidebarRight/pollResults.ts", - "moduleName": "./src/components/sidebarRight/pollResults.ts", - "type": "cjs require", - "userRequest": "../poll", - "loc": "28:15-33" - } - ], - "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.roundPercents = void 0;\r\nconst appPollsManager_1 = __importDefault(require(\"../lib/appManagers/appPollsManager\"));\r\nconst richtextprocessor_1 = require(\"../lib/richtextprocessor\");\r\nconst utils_1 = require(\"../lib/utils\");\r\nconst config_1 = require(\"../lib/config\");\r\nconst appSidebarRight_1 = __importDefault(require(\"../lib/appManagers/appSidebarRight\"));\r\nconst appImManager_1 = __importDefault(require(\"../lib/appManagers/appImManager\"));\r\nconst serverTimeManager_1 = __importDefault(require(\"../lib/mtproto/serverTimeManager\"));\r\nconst ripple_1 = require(\"./ripple\");\r\nlet lineTotalLength = 0;\r\nconst tailLength = 9;\r\nconst times = 10;\r\nconst fullTime = 340;\r\nconst oneTime = fullTime / times;\r\nexports.roundPercents = (percents) => {\r\n //console.log('roundPercents before percents:', percents);\r\n const sum = percents.reduce((acc, p) => acc + Math.round(p), 0);\r\n if (sum > 100) {\r\n const diff = sum - 100;\r\n const 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 return;\r\n }\r\n percents[minIndex] -= minRemainder;\r\n }\r\n }\r\n else if (sum < 100) {\r\n const diff = 100 - sum;\r\n const 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 return;\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 const { poll, results } = e.detail;\r\n //console.log('poll_update', poll, results);\r\n for (const connected of connectedPolls) {\r\n if (connected.id == poll.id) {\r\n const pollElement = connected.element;\r\n pollElement.isClosed = !!poll.pFlags.closed;\r\n pollElement.performResults(results, poll.chosenIndexes);\r\n }\r\n }\r\n});\r\nutils_1.$rootScope.$on('peer_changed', () => {\r\n if (prevQuizHint) {\r\n hideQuizHint(prevQuizHint, prevQuizHintOnHide, prevQuizHintTimeout);\r\n }\r\n});\r\nconst hideQuizHint = (element, onHide, timeout) => {\r\n element.classList.remove('active');\r\n clearTimeout(timeout);\r\n setTimeout(() => {\r\n onHide();\r\n element.remove();\r\n if (prevQuizHint == element && prevQuizHintOnHide == onHide && prevQuizHintTimeout == timeout) {\r\n prevQuizHint = prevQuizHintOnHide = null;\r\n prevQuizHintTimeout = 0;\r\n }\r\n }, 200);\r\n};\r\nlet prevQuizHint, prevQuizHintOnHide, prevQuizHintTimeout;\r\nconst setQuizHint = (solution, solution_entities, onHide) => {\r\n if (prevQuizHint) {\r\n hideQuizHint(prevQuizHint, prevQuizHintOnHide, prevQuizHintTimeout);\r\n }\r\n const element = document.createElement('div');\r\n element.classList.add('quiz-hint');\r\n const container = document.createElement('div');\r\n container.classList.add('container', 'tgico');\r\n const textEl = document.createElement('div');\r\n textEl.classList.add('text');\r\n container.append(textEl);\r\n element.append(container);\r\n textEl.innerHTML = richtextprocessor_1.RichTextProcessor.wrapRichText(solution, { entities: solution_entities });\r\n appImManager_1.default.bubblesContainer.append(element);\r\n void element.offsetLeft; // reflow\r\n element.classList.add('active');\r\n prevQuizHint = element;\r\n prevQuizHintOnHide = onHide;\r\n prevQuizHintTimeout = window.setTimeout(() => {\r\n hideQuizHint(element, onHide, prevQuizHintTimeout);\r\n }, config_1.touchSupport ? 5000 : 7000);\r\n};\r\nclass PollElement extends HTMLElement {\r\n constructor() {\r\n super();\r\n this.maxOffset = -46.5;\r\n this.isClosed = false;\r\n this.isQuiz = false;\r\n this.isRetracted = false;\r\n this.isPublic = false;\r\n this.isMultiple = false;\r\n this.chosenIndexes = [];\r\n this.chosingIndexes = [];\r\n this.sentVote = false;\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 this.pollID = this.getAttribute('poll-id');\r\n this.mid = +this.getAttribute('message-id');\r\n const { poll, results } = appPollsManager_1.default.getPoll(this.pollID);\r\n connectedPolls.push({ id: this.pollID, element: this });\r\n //console.log('pollElement poll:', poll, results);\r\n let desc = '';\r\n if (poll.pFlags) {\r\n this.isPublic = !!poll.pFlags.public_voters;\r\n this.isQuiz = !!poll.pFlags.quiz;\r\n this.isClosed = !!poll.pFlags.closed;\r\n this.isMultiple = !!poll.pFlags.multiple_choice;\r\n if (this.isClosed) {\r\n desc = 'Final results';\r\n this.classList.add('is-closed');\r\n }\r\n else {\r\n let type = this.isQuiz ? 'Quiz' : 'Poll';\r\n desc = (this.isPublic ? '' : 'Anonymous ') + type;\r\n }\r\n }\r\n const multipleSelect = this.isMultiple ? '' : '';\r\n const votes = poll.answers.map((answer, idx) => {\r\n return `\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n ${multipleSelect}\r\n
\r\n
\r\n
${richtextprocessor_1.RichTextProcessor.wrapEmojiText(answer.text)}
\r\n \r\n \r\n \r\n \r\n
\r\n `;\r\n }).join('');\r\n this.innerHTML = `\r\n
${poll.rQuestion}
\r\n
\r\n
${desc}
\r\n
\r\n
\r\n ${votes}\r\n
\r\n \r\n
\r\n
\r\n `;\r\n this.descDiv = this.firstElementChild.nextElementSibling;\r\n this.typeDiv = this.descDiv.firstElementChild;\r\n this.avatarsDiv = this.descDiv.lastElementChild;\r\n if (this.isQuiz) {\r\n this.classList.add('is-quiz');\r\n if (poll.close_period && poll.close_date) {\r\n const timeLeftDiv = document.createElement('div');\r\n timeLeftDiv.classList.add('poll-time');\r\n this.descDiv.append(timeLeftDiv);\r\n const svg = document.createElementNS(\"http://www.w3.org/2000/svg\", \"svg\");\r\n //svg.setAttributeNS(null, 'viewBox', '0 0 15 15');\r\n svg.classList.add('poll-quiz-timer');\r\n this.quizTimer = svg;\r\n const strokeWidth = 2;\r\n const radius = 7;\r\n const circumference = 2 * Math.PI * radius;\r\n const circle = document.createElementNS(\"http://www.w3.org/2000/svg\", \"circle\");\r\n circle.classList.add('poll-quiz-timer-circle');\r\n circle.setAttributeNS(null, 'cx', '16');\r\n circle.setAttributeNS(null, 'cy', '16');\r\n circle.setAttributeNS(null, 'r', '' + radius);\r\n circle.setAttributeNS(null, 'stroke-width', '' + strokeWidth);\r\n svg.append(circle);\r\n this.descDiv.append(svg);\r\n const period = poll.close_period * 1000;\r\n const closeTime = (poll.close_date - serverTimeManager_1.default.serverTimeOffset) * 1000;\r\n //console.log('closeTime:', poll.close_date, serverTimeManager.serverTimeOffset, Date.now() / 1000 | 0);\r\n // let time = Date.now();\r\n // let percents = (closeTime - time) / period;\r\n // timeLeftDiv.innerHTML = String((closeTime - time) / 1000 + 1 | 0).toHHMMSS();\r\n // // @ts-ignore\r\n // circle.style.strokeDashoffset = circumference + percents * circumference;\r\n // circle.style.strokeDasharray = ${circumference} ${circumference};\r\n this.quizInterval = window.setInterval(() => {\r\n const time = Date.now();\r\n const percents = (closeTime - time) / period;\r\n const timeLeft = (closeTime - time) / 1000 + 1 | 0;\r\n timeLeftDiv.innerHTML = String(timeLeft).toHHMMSS();\r\n if (timeLeft <= 5) {\r\n timeLeftDiv.style.color = '#ee545c';\r\n circle.style.stroke = '#ee545c';\r\n }\r\n //timeLeftDiv.style.visibility = 'visible';\r\n // @ts-ignore\r\n circle.style.strokeDashoffset = circumference + percents * circumference;\r\n circle.style.strokeDasharray = `${circumference} ${circumference}`;\r\n if (time >= closeTime) {\r\n clearInterval(this.quizInterval);\r\n timeLeftDiv.innerHTML = '';\r\n // @ts-ignore\r\n circle.style.strokeDashoffset = circumference;\r\n this.quizInterval = 0;\r\n setTimeout(() => {\r\n // нужно запросить апдейт чтобы опрос обновился\r\n appPollsManager_1.default.getResults(this.mid);\r\n }, 3e3);\r\n }\r\n }, 1e3);\r\n }\r\n }\r\n this.answerDivs = Array.from(this.querySelectorAll('.poll-answer'));\r\n this.svgLines = Array.from(this.querySelectorAll('.poll-line'));\r\n this.numberDivs = Array.from(this.querySelectorAll('.poll-answer-percents'));\r\n const footerDiv = this.lastElementChild;\r\n this.viewResults = footerDiv.firstElementChild;\r\n this.votersCountDiv = footerDiv.lastElementChild;\r\n this.viewResults.addEventListener('click', (e) => {\r\n utils_1.cancelEvent(e);\r\n appSidebarRight_1.default.pollResultsTab.init(this.pollID, this.mid);\r\n });\r\n ripple_1.ripple(this.viewResults);\r\n if (this.isMultiple) {\r\n this.sendVoteBtn = document.createElement('div');\r\n this.sendVoteBtn.classList.add('poll-footer-button', 'poll-send-vote');\r\n this.sendVoteBtn.innerText = 'Vote';\r\n ripple_1.ripple(this.sendVoteBtn);\r\n if (!poll.chosenIndexes.length) {\r\n this.votersCountDiv.classList.add('hide');\r\n }\r\n this.sendVoteBtn.addEventListener('click', () => {\r\n /* const indexes = this.answerDivs.filter(el => el.classList.contains('is-chosing')).map(el => +el.dataset.index);\r\n if(indexes.length) {\r\n \r\n } */\r\n if (this.chosingIndexes.length) {\r\n this.sendVotes(this.chosingIndexes).then(() => {\r\n this.chosingIndexes.length = 0;\r\n this.answerDivs.forEach(el => {\r\n el.classList.remove('is-chosing');\r\n });\r\n });\r\n }\r\n });\r\n footerDiv.append(this.sendVoteBtn);\r\n }\r\n const width = this.getBoundingClientRect().width;\r\n this.maxLength = width + tailLength + this.maxOffset + -13.7; // 13 - position left\r\n if (poll.chosenIndexes.length || this.isClosed) {\r\n this.performResults(results, poll.chosenIndexes);\r\n }\r\n else if (!this.isClosed) {\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 ['poll-id', 'message-id' /* массив имён атрибутов для отслеживания их изменений */];\r\n }\r\n attributeChangedCallback(name, oldValue, newValue) {\r\n // вызывается при изменении одного из перечисленных выше атрибутов\r\n if (name == 'poll-id') {\r\n this.pollID = newValue;\r\n }\r\n else if (name == 'message-id') {\r\n this.mid = +newValue;\r\n }\r\n }\r\n adoptedCallback() {\r\n // вызывается, когда элемент перемещается в новый документ\r\n // (происходит в document.adoptNode, используется очень редко)\r\n }\r\n initQuizHint(results) {\r\n if (results.solution && results.solution_entities) {\r\n const toggleHint = document.createElement('div');\r\n toggleHint.classList.add('tgico-tip', 'poll-hint');\r\n this.descDiv.append(toggleHint);\r\n //let active = false;\r\n toggleHint.addEventListener('click', (e) => {\r\n utils_1.cancelEvent(e);\r\n //active = true;\r\n toggleHint.classList.add('active');\r\n setQuizHint(results.solution, results.solution_entities, () => {\r\n //active = false;\r\n toggleHint.classList.remove('active');\r\n });\r\n });\r\n if (this.sentVote) {\r\n const correctResult = results.results.find(r => r.pFlags.correct);\r\n if (correctResult && !correctResult.pFlags.chosen) {\r\n toggleHint.click();\r\n }\r\n }\r\n }\r\n }\r\n clickHandler(e) {\r\n const target = utils_1.findUpClassName(e.target, 'poll-answer');\r\n if (!target) {\r\n return;\r\n }\r\n const answerIndex = +target.dataset.index;\r\n if (this.isMultiple) {\r\n target.classList.toggle('is-chosing');\r\n const foundIndex = this.chosingIndexes.indexOf(answerIndex);\r\n if (foundIndex !== -1) {\r\n this.chosingIndexes.splice(foundIndex, 1);\r\n }\r\n else {\r\n this.chosingIndexes.push(answerIndex);\r\n }\r\n }\r\n else {\r\n this.sendVotes([answerIndex]);\r\n }\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 sendVotes(indexes) {\r\n if (this.sendVotePromise)\r\n return this.sendVotePromise;\r\n const targets = this.answerDivs.filter((_, idx) => indexes.includes(idx));\r\n targets.forEach(target => {\r\n target.classList.add('is-voting');\r\n });\r\n this.classList.add('disable-hover');\r\n this.sentVote = true;\r\n return this.sendVotePromise = appPollsManager_1.default.sendVote(this.mid, indexes).then(() => {\r\n targets.forEach(target => {\r\n target.classList.remove('is-voting');\r\n });\r\n this.classList.remove('disable-hover');\r\n }).catch(() => {\r\n this.sentVote = false;\r\n }).finally(() => {\r\n this.sendVotePromise = null;\r\n });\r\n }\r\n performResults(results, chosenIndexes) {\r\n var _a, _b;\r\n if (this.isQuiz && (((_a = results.results) === null || _a === void 0 ? void 0 : _a.length) || this.isClosed)) {\r\n this.answerDivs.forEach((el, idx) => {\r\n el.classList.toggle('is-correct', !!results.results[idx].pFlags.correct);\r\n });\r\n if (this.initQuizHint) {\r\n this.initQuizHint(results);\r\n this.initQuizHint = null;\r\n }\r\n if (this.quizInterval) {\r\n clearInterval(this.quizInterval);\r\n this.quizInterval = 0;\r\n }\r\n if ((_b = this.quizTimer) === null || _b === void 0 ? void 0 : _b.parentElement) {\r\n this.quizTimer.remove();\r\n }\r\n const timeEl = this.descDiv.querySelector('.poll-time');\r\n if (timeEl) {\r\n timeEl.remove();\r\n }\r\n }\r\n if (this.isClosed) {\r\n this.classList.add('is-closed');\r\n this.typeDiv.innerText = 'Final results';\r\n }\r\n // set chosen\r\n if (this.chosenIndexes.length != chosenIndexes.length || this.isClosed) { // if we voted\r\n this.isRetracted = this.chosenIndexes.length && !chosenIndexes.length;\r\n this.chosenIndexes = chosenIndexes.slice();\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.chosenIndexes.length || this.isRetracted || this.isClosed) {\r\n const percents = results.results.map(v => results.total_voters ? v.voters / results.total_voters * 100 : 0);\r\n this.setResults(this.isRetracted ? this.percents : percents, this.chosenIndexes);\r\n this.percents = percents;\r\n this.isRetracted = false;\r\n }\r\n this.setVotersCount(results);\r\n if (this.isPublic) {\r\n if (!this.isMultiple) {\r\n this.viewResults.classList.toggle('hide', !results.total_voters || !this.chosenIndexes.length);\r\n this.votersCountDiv.classList.toggle('hide', !!this.chosenIndexes.length);\r\n }\r\n let html = '';\r\n /**\r\n * MACOS, ANDROID - без реверса\r\n * WINDOWS DESKTOP - реверс\r\n * все приложения накладывают аватарку первую на вторую, а в макете зато вторая на первую, ЛОЛ!\r\n */\r\n results.recent_voters /* .slice().reverse() */.forEach((userID, idx) => {\r\n const style = idx == 0 ? '' : `style=\"transform: translateX(-${idx * 3}px);\"`;\r\n html += ``;\r\n });\r\n this.avatarsDiv.innerHTML = html;\r\n }\r\n if (this.isMultiple) {\r\n this.sendVoteBtn.classList.toggle('hide', !!this.chosenIndexes.length);\r\n if (!this.chosenIndexes.length) {\r\n this.votersCountDiv.classList.add('hide');\r\n this.viewResults.classList.add('hide');\r\n }\r\n else if (this.isPublic) {\r\n this.viewResults.classList.toggle('hide', !results.total_voters || !this.chosenIndexes.length);\r\n this.votersCountDiv.classList.toggle('hide', !!this.chosenIndexes.length);\r\n }\r\n else {\r\n this.votersCountDiv.classList.toggle('hide', !this.chosenIndexes.length);\r\n }\r\n }\r\n }\r\n setResults(percents, chosenIndexes) {\r\n this.svgLines.forEach(svg => svg.style.display = '');\r\n this.answerDivs.forEach((el, idx) => {\r\n el.classList.toggle('is-chosen', chosenIndexes.includes(idx));\r\n });\r\n const 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 exports.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 const 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 const 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 const votersCount = results.total_voters || 0;\r\n const 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 const 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": 59, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\helpers\\blob.ts", - "name": "./src/helpers/blob.ts", - "index": 73, - "index2": 65, - "size": 413, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "issuerId": 18, - "issuerName": "./src/components/wrappers.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 18, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "name": "./src/components/wrappers.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 1092, - "building": 1418, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 18, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "module": "./src/components/wrappers.ts", - "moduleName": "./src/components/wrappers.ts", - "type": "cjs require", - "userRequest": "../helpers/blob", - "loc": "31:15-41" - }, - { - "moduleId": 102, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\stickers.ts", - "module": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "type": "cjs require", - "userRequest": "../../../helpers/blob", - "loc": "39:15-47" - } - ], - "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.readBlobAsText = void 0;\r\nexports.readBlobAsText = (blob) => {\r\n return new Promise(resolve => {\r\n const reader = new FileReader();\r\n reader.addEventListener('loadend', (e) => {\r\n // @ts-ignore\r\n resolve(e.srcElement.result);\r\n });\r\n reader.readAsText(blob);\r\n });\r\n};\r\n" - }, - { - "id": 60, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\slider.ts", - "name": "./src/components/slider.ts", - "index": 75, - "index2": 68, - "size": 2031, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "issuerId": 24, - "issuerName": "./src/lib/appManagers/appSidebarRight.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 24, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "name": "./src/lib/appManagers/appSidebarRight.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 1584, - "building": 1606, - "dependencies": 2 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 14, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "module": "./src/lib/appManagers/appSidebarLeft.ts", - "moduleName": "./src/lib/appManagers/appSidebarLeft.ts", - "type": "cjs require", - "userRequest": "../../components/slider", - "loc": "44:33-67" - }, - { - "moduleId": 24, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", - "type": "cjs require", - "userRequest": "../../components/slider", - "loc": "53:33-67" - } - ], - "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 horizontalMenu_1 = require(\"./horizontalMenu\");\r\nconst TRANSITIONTIME = 250;\r\nclass SidebarSlider {\r\n constructor(sidebarEl, tabs) {\r\n this.sidebarEl = sidebarEl;\r\n this.tabs = tabs;\r\n this.historyTabIDs = [];\r\n this._selectTab = horizontalMenu_1.horizontalMenu(null, this.sidebarEl.querySelector('.sidebar-slider'), null, null, TRANSITIONTIME);\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 }\r\n selectTab(id) {\r\n if (this.historyTabIDs[this.historyTabIDs.length - 1] == id) {\r\n return;\r\n }\r\n const tab = this.tabs[id];\r\n if (tab) {\r\n if (tab.onOpen) {\r\n tab.onOpen();\r\n }\r\n if (tab.onOpenAfterTimeout) {\r\n setTimeout(() => {\r\n tab.onOpenAfterTimeout();\r\n }, TRANSITIONTIME);\r\n }\r\n }\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 (tab.onClose) {\r\n tab.onClose();\r\n }\r\n if (tab.onCloseAfterTimeout) {\r\n setTimeout(() => {\r\n tab.onCloseAfterTimeout();\r\n }, TRANSITIONTIME);\r\n }\r\n }\r\n }\r\n}\r\nexports.default = SidebarSlider;\r\n" - }, - { - "id": 61, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popupStickers.ts", - "name": "./src/components/popupStickers.ts", - "index": 79, - "index2": 71, - "size": 5430, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "../../components/popupStickers", - "loc": "38:40-81" - }, - { - "moduleId": 85, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\stickers.ts", - "module": "./src/components/sidebarRight/stickers.ts", - "moduleName": "./src/components/sidebarRight/stickers.ts", - "type": "cjs require", - "userRequest": "../popupStickers", - "loc": "31:40-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 popup_1 = require(\"./popup\");\r\nconst appStickersManager_1 = __importDefault(require(\"../lib/appManagers/appStickersManager\"));\r\nconst richtextprocessor_1 = require(\"../lib/richtextprocessor\");\r\nconst scrollable_new_1 = __importDefault(require(\"./scrollable_new\"));\r\nconst wrappers_1 = require(\"./wrappers\");\r\nconst lazyLoadQueue_1 = __importDefault(require(\"./lazyLoadQueue\"));\r\nconst misc_1 = require(\"./misc\");\r\nconst animationIntersector_1 = __importDefault(require(\"./animationIntersector\"));\r\nconst utils_1 = require(\"../lib/utils\");\r\nconst appImManager_1 = __importDefault(require(\"../lib/appManagers/appImManager\"));\r\nclass PopupStickers extends popup_1.PopupElement {\r\n constructor(stickerSetInput) {\r\n super('popup-stickers', null, { closable: true, body: true });\r\n this.stickerSetInput = stickerSetInput;\r\n this.onFooterClick = () => {\r\n this.stickersFooter.setAttribute('disabled', 'true');\r\n appStickersManager_1.default.toggleStickerSet(this.set).then(() => {\r\n this.closeBtn.click();\r\n }).catch(() => {\r\n this.stickersFooter.removeAttribute('disabled');\r\n });\r\n };\r\n this.onStickersClick = (e) => {\r\n const target = utils_1.findUpClassName(e.target, 'sticker-set-sticker');\r\n if (!target)\r\n return;\r\n const fileID = target.dataset.docID;\r\n if (appImManager_1.default.chatInputC.sendMessageWithDocument(fileID)) {\r\n this.closeBtn.click();\r\n }\r\n else {\r\n console.warn('got no doc by id:', fileID);\r\n }\r\n };\r\n this.h6 = document.createElement('h6');\r\n this.h6.innerText = 'Loading...';\r\n this.header.append(this.h6);\r\n this.onClose = () => {\r\n animationIntersector_1.default.checkAnimations(false);\r\n this.stickersFooter.removeEventListener('click', this.onFooterClick);\r\n this.stickersDiv.removeEventListener('click', this.onStickersClick);\r\n this.element.removeEventListener('click', onOverlayClick);\r\n };\r\n this.onCloseAfterTimeout = () => {\r\n animationIntersector_1.default.checkAnimations(undefined, 'STICKERS-POPUP');\r\n };\r\n const onOverlayClick = (e) => {\r\n if (!utils_1.findUpClassName(e.target, 'popup-container')) {\r\n this.closeBtn.click();\r\n }\r\n };\r\n this.element.addEventListener('click', onOverlayClick);\r\n const div = document.createElement('div');\r\n div.classList.add('sticker-set');\r\n this.stickersDiv = document.createElement('div');\r\n this.stickersDiv.classList.add('sticker-set-stickers');\r\n misc_1.putPreloader(this.stickersDiv);\r\n this.stickersFooter = document.createElement('div');\r\n this.stickersFooter.classList.add('sticker-set-footer');\r\n div.append(this.stickersDiv);\r\n this.stickersFooter.innerText = 'Loading...';\r\n this.body.append(div);\r\n const scrollable = new scrollable_new_1.default(this.body, 'y', undefined);\r\n this.body.append(this.stickersFooter);\r\n // const editButton = document.createElement('button');\r\n // editButton.classList.add('btn-primary');\r\n // this.stickersFooter.append(editButton);\r\n this.loadStickerSet();\r\n }\r\n loadStickerSet() {\r\n return appStickersManager_1.default.getStickerSet(this.stickerSetInput).then(set => {\r\n //console.log('PopupStickers loadStickerSet got set:', set);\r\n this.set = set.set;\r\n animationIntersector_1.default.checkAnimations(true);\r\n this.h6.innerHTML = richtextprocessor_1.RichTextProcessor.wrapEmojiText(set.set.title);\r\n !set.set.installed_date ? this.stickersFooter.classList.add('add') : this.stickersFooter.classList.remove('add');\r\n this.stickersFooter.innerHTML = set.set.hasOwnProperty('installed_date') ? '
Remove stickers
' : ``;\r\n this.stickersFooter.addEventListener('click', this.onFooterClick);\r\n if (set.documents.length) {\r\n this.stickersDiv.addEventListener('click', this.onStickersClick);\r\n }\r\n const lazyLoadQueue = new lazyLoadQueue_1.default();\r\n this.stickersDiv.innerHTML = '';\r\n for (let doc of set.documents) {\r\n if (doc._ == 'documentEmpty') {\r\n continue;\r\n }\r\n const div = document.createElement('div');\r\n div.classList.add('sticker-set-sticker');\r\n wrappers_1.wrapSticker({\r\n doc,\r\n div,\r\n lazyLoadQueue,\r\n group: 'STICKERS-POPUP',\r\n play: true,\r\n loop: true,\r\n width: 80,\r\n height: 80\r\n });\r\n this.stickersDiv.append(div);\r\n }\r\n });\r\n }\r\n}\r\nexports.default = PopupStickers;\r\n" - }, - { - "id": 62, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\AppInlineBotsManager.ts", - "name": "./src/lib/appManagers/AppInlineBotsManager.ts", - "index": 82, - "index2": 75, - "size": 17098, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "./AppInlineBotsManager", - "loc": "34:47-80" - }, - { - "moduleId": 87, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\gifs.ts", - "module": "./src/components/sidebarRight/gifs.ts", - "moduleName": "./src/components/sidebarRight/gifs.ts", - "type": "cjs require", - "userRequest": "../../lib/appManagers/AppInlineBotsManager", - "loc": "39:47-100" - } - ], - "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 appPeersManager_1 = __importDefault(require(\"../appManagers/appPeersManager\"));\r\nconst appMessagesIDsManager_1 = __importDefault(require(\"./appMessagesIDsManager\"));\r\nconst richtextprocessor_1 = require(\"../richtextprocessor\");\r\nconst toast_1 = require(\"../../components/toast\");\r\nconst appUsersManager_1 = __importDefault(require(\"./appUsersManager\"));\r\nconst appPhotosManager_1 = __importDefault(require(\"./appPhotosManager\"));\r\nconst appDocsManager_1 = __importDefault(require(\"./appDocsManager\"));\r\nclass AppInlineBotsManager {\r\n constructor() {\r\n this.inlineResults = {};\r\n /* function gameButtonClick (id) {\r\n var message = AppMessagesManager.getMessage(id)\r\n var peerID = AppMessagesManager.getMessagePeer(message)\r\n \r\n return MtpApiManager.invokeApi('messages.getBotCallbackAnswer', {\r\n flags: 2,\r\n peer: AppPeersManager.getInputPeerByID(peerID),\r\n msg_id: AppMessagesIDsManager.getMessageLocalID(id)\r\n }, {timeout: 1, stopTime: -1, noErrorBox: true}).then(function (callbackAnswer) {\r\n if (typeof callbackAnswer.message === 'string' &&\r\n callbackAnswer.message.length) {\r\n showCallbackMessage(callbackAnswer.message, callbackAnswer.pFlags.alert)\r\n }\r\n else if (typeof callbackAnswer.url === 'string') {\r\n AppGamesManager.openGame(message.media.game.id, id, callbackAnswer.url)\r\n }\r\n })\r\n }\r\n \r\n function sendInlineResult (peerID, qID, options) {\r\n var inlineResult = inlineResults[qID]\r\n if (inlineResult === undefined) {\r\n return false\r\n }\r\n pushPopularBot(inlineResult.botID)\r\n var splitted = qID.split('_')\r\n var queryID = splitted.shift()\r\n var resultID = splitted.join('_')\r\n options = options || {}\r\n options.viaBotID = inlineResult.botID\r\n options.queryID = queryID\r\n options.resultID = resultID\r\n if (inlineResult.send_message.reply_markup) {\r\n options.reply_markup = inlineResult.send_message.reply_markup\r\n }\r\n \r\n if (inlineResult.send_message._ == 'botInlineMessageText') {\r\n options.entities = inlineResult.send_message.entities\r\n AppMessagesManager.sendText(peerID, inlineResult.send_message.message, options)\r\n } else {\r\n var caption = ''\r\n var inputMedia = false\r\n switch (inlineResult.send_message._) {\r\n case 'botInlineMessageMediaAuto':\r\n caption = inlineResult.send_message.caption\r\n if (inlineResult._ == 'botInlineMediaResult') {\r\n var doc = inlineResult.document\r\n var photo = inlineResult.photo\r\n if (doc) {\r\n inputMedia = {\r\n _: 'inputMediaDocument',\r\n id: {_: 'inputDocument', id: doc.id, access_hash: doc.access_hash},\r\n caption: caption\r\n }\r\n } else {\r\n inputMedia = {\r\n _: 'inputMediaPhoto',\r\n id: {_: 'inputPhoto', id: photo.id, access_hash: photo.access_hash},\r\n caption: caption\r\n }\r\n }\r\n }\r\n break\r\n \r\n case 'botInlineMessageMediaGeo':\r\n inputMedia = {\r\n _: 'inputMediaGeoPoint',\r\n geo_point: {\r\n _: 'inputGeoPoint',\r\n 'lat': inlineResult.send_message.geo['lat'],\r\n 'long': inlineResult.send_message.geo['long']\r\n }\r\n }\r\n break\r\n \r\n case 'botInlineMessageMediaVenue':\r\n inputMedia = {\r\n _: 'inputMediaVenue',\r\n geo_point: {\r\n _: 'inputGeoPoint',\r\n 'lat': inlineResult.send_message.geo['lat'],\r\n 'long': inlineResult.send_message.geo['long']\r\n },\r\n title: inlineResult.send_message.title,\r\n address: inlineResult.send_message.address,\r\n provider: inlineResult.send_message.provider,\r\n venue_id: inlineResult.send_message.venue_id\r\n }\r\n break\r\n \r\n case 'botInlineMessageMediaContact':\r\n inputMedia = {\r\n _: 'inputMediaContact',\r\n phone_number: inlineResult.send_message.phone_number,\r\n first_name: inlineResult.send_message.first_name,\r\n last_name: inlineResult.send_message.last_name\r\n }\r\n break\r\n }\r\n if (!inputMedia) {\r\n inputMedia = {\r\n _: 'messageMediaPending',\r\n type: inlineResult.type,\r\n file_name: inlineResult.title || inlineResult.content_url || inlineResult.url,\r\n size: 0,\r\n progress: {percent: 30, total: 0}\r\n }\r\n }\r\n AppMessagesManager.sendOther(peerID, inputMedia, options)\r\n }\r\n }\r\n \r\n function checkGeoLocationAccess (botID) {\r\n var key = 'bot_access_geo' + botID\r\n return Storage.get(key).then(function (geoAccess) {\r\n if (geoAccess && geoAccess.granted) {\r\n return true\r\n }\r\n return ErrorService.confirm({\r\n type: 'BOT_ACCESS_GEO_INLINE'\r\n }).then(function () {\r\n var setHash = {}\r\n setHash[key] = {granted: true, time: tsNow()}\r\n Storage.set(setHash)\r\n return true\r\n }, function () {\r\n var setHash = {}\r\n setHash[key] = {denied: true, time: tsNow()}\r\n Storage.set(setHash)\r\n return $q.reject()\r\n })\r\n })\r\n } */\r\n }\r\n getInlineResults(peerID, botID, query = '', offset = '', geo) {\r\n return mtprotoworker_1.default.invokeApi('messages.getInlineBotResults', {\r\n flags: 0 | (geo ? 1 : 0),\r\n bot: appUsersManager_1.default.getUserInput(botID),\r\n peer: appPeersManager_1.default.getInputPeerByID(peerID),\r\n query: query,\r\n geo_point: geo && { _: 'inputGeoPoint', lat: geo['lat'], long: geo['long'] },\r\n offset\r\n }, { /* timeout: 1, */ stopTime: -1, noErrorBox: true }).then(botResults => {\r\n const queryID = botResults.query_id;\r\n /* delete botResults._;\r\n delete botResults.flags;\r\n delete botResults.query_id; */\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 botResults.results.forEach(result => {\r\n const 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 as botInlineResult).url || result.title || result.type || '').substr(0, 1); */\r\n if (result._ == 'botInlineMediaResult') {\r\n if (result.document) {\r\n result.document = appDocsManager_1.default.saveDoc(result.document);\r\n }\r\n if (result.photo) {\r\n result.photo = appPhotosManager_1.default.savePhoto(result.photo);\r\n }\r\n }\r\n this.inlineResults[qID] = result;\r\n });\r\n return botResults;\r\n });\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 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: appPeersManager_1.default.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 toast_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": 63, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\gifsMasonry.ts", - "name": "./src/components/gifsMasonry.ts", - "index": 84, - "index2": 76, - "size": 8378, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\gifs.ts", - "issuerId": 87, - "issuerName": "./src/components/sidebarRight/gifs.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 24, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "name": "./src/lib/appManagers/appSidebarRight.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - }, - { - "id": 87, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\gifs.ts", - "name": "./src/components/sidebarRight/gifs.ts", - "profile": { - "factory": 1584, - "building": 1606, - "dependencies": 2 - } - } - ], - "profile": { - "factory": 384, - "building": 821, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 87, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\gifs.ts", - "module": "./src/components/sidebarRight/gifs.ts", - "moduleName": "./src/components/sidebarRight/gifs.ts", - "type": "cjs require", - "userRequest": "../gifsMasonry", - "loc": "40:38-63" - }, - { - "moduleId": 100, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\gifs.ts", - "module": "./src/components/emoticonsDropdown/tabs/gifs.ts", - "moduleName": "./src/components/emoticonsDropdown/tabs/gifs.ts", - "type": "cjs require", - "userRequest": "../../gifsMasonry", - "loc": "7:38-66" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 5, - "source": "\"use strict\";\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst utils_1 = require(\"../lib/utils\");\r\nconst appDocsManager_1 = __importDefault(require(\"../lib/appManagers/appDocsManager\"));\r\nconst wrappers_1 = require(\"./wrappers\");\r\nconst misc_1 = require(\"./misc\");\r\nconst lazyLoadQueue_1 = require(\"./lazyLoadQueue\");\r\nconst animationIntersector_1 = __importDefault(require(\"./animationIntersector\"));\r\nconst cancellablePromise_1 = require(\"../helpers/cancellablePromise\");\r\nconst width = 400;\r\nconst maxSingleWidth = width - 100;\r\nconst height = 100;\r\nclass GifsMasonry {\r\n constructor(element, group, scrollable) {\r\n this.element = element;\r\n this.group = group;\r\n this.scrollable = scrollable;\r\n this.scrollPromise = Promise.resolve();\r\n this.processVisibleDiv = (div) => {\r\n const video = div.querySelector('video');\r\n if (video) {\r\n return;\r\n }\r\n const load = () => {\r\n const docID = div.dataset.docID;\r\n const doc = appDocsManager_1.default.getDoc(docID);\r\n const promise = this.scrollPromise.then(() => {\r\n const promise = wrappers_1.wrapVideo({\r\n doc,\r\n container: div,\r\n lazyLoadQueue: null,\r\n //lazyLoadQueue: EmoticonsDropdown.lazyLoadQueue,\r\n group: this.group,\r\n noInfo: true,\r\n });\r\n promise.finally(() => {\r\n const video = div.querySelector('video');\r\n div.style.opacity = '';\r\n const img = div.querySelector('img');\r\n img && img.classList.add('hide');\r\n if (video && !video.parentElement) {\r\n setTimeout(() => {\r\n video.src = '';\r\n video.load();\r\n const animations = animationIntersector_1.default.getAnimations(video);\r\n animations.forEach(item => {\r\n animationIntersector_1.default.checkAnimation(item, true, true);\r\n });\r\n }, 0);\r\n }\r\n //clearTimeout(timeout);\r\n if (!this.lazyLoadQueue.intersector.isVisible(div)) {\r\n this.processInvisibleDiv(div);\r\n }\r\n });\r\n return promise;\r\n });\r\n /* let timeout = window.setTimeout(() => {\r\n console.error('processVisibleDiv timeout', div, doc);\r\n }, 1e3); */\r\n return promise;\r\n };\r\n //return load();\r\n this.lazyLoadQueue.push({ div, load });\r\n };\r\n this.processInvisibleDiv = (div) => __awaiter(this, void 0, void 0, function* () {\r\n return this.scrollPromise.then(() => __awaiter(this, void 0, void 0, function* () {\r\n //return;\r\n if (this.lazyLoadQueue.intersector.isVisible(div)) {\r\n return;\r\n }\r\n const video = div.querySelector('video');\r\n const img = div.querySelector('img');\r\n if (img) {\r\n img && img.classList.remove('hide');\r\n yield new Promise((resolve) => {\r\n window.requestAnimationFrame(() => window.requestAnimationFrame(resolve));\r\n });\r\n }\r\n if (this.lazyLoadQueue.intersector.isVisible(div)) {\r\n return;\r\n }\r\n if (video) {\r\n video.remove();\r\n video.src = '';\r\n video.load();\r\n const animations = animationIntersector_1.default.getAnimations(video);\r\n animations.forEach(item => {\r\n animationIntersector_1.default.checkAnimation(item, true, true);\r\n });\r\n }\r\n }));\r\n });\r\n this.lazyLoadQueue = new lazyLoadQueue_1.LazyLoadQueueRepeat2(undefined, (target, visible) => {\r\n if (visible) {\r\n this.processVisibleDiv(target);\r\n }\r\n else {\r\n this.processInvisibleDiv(target);\r\n }\r\n });\r\n setInterval(() => {\r\n // @ts-ignore\r\n const players = animationIntersector_1.default.byGroups[group];\r\n if (players) {\r\n console.log(`GIFS RENDERED IN ${group}:`, players.length, players.filter(p => !p.animation.paused).length, this.lazyLoadQueue.intersector.getVisible().length);\r\n }\r\n }, .25e3);\r\n let timeout = 0;\r\n // memory leak\r\n scrollable.container.addEventListener('scroll', () => {\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n }\r\n else {\r\n this.scrollPromise = cancellablePromise_1.deferredPromise();\r\n //animationIntersector.checkAnimations(true, group);\r\n }\r\n timeout = window.setTimeout(() => {\r\n timeout = 0;\r\n this.scrollPromise.resolve();\r\n //animationIntersector.checkAnimations(false, group);\r\n }, 150);\r\n });\r\n }\r\n add(doc) {\r\n var _a;\r\n let gifWidth = doc.w;\r\n let gifHeight = doc.h;\r\n if (gifHeight < height) {\r\n gifWidth = height / gifHeight * gifWidth;\r\n gifHeight = height;\r\n }\r\n const willUseWidth = Math.min(maxSingleWidth, width, gifWidth);\r\n const { 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 //console.log('gif:', gif, w, h);\r\n const div = document.createElement('div');\r\n div.classList.add('gif', 'fade-in-transition');\r\n div.style.width = w + 'px';\r\n div.style.opacity = '0';\r\n //div.style.height = h + 'px';\r\n div.dataset.docID = doc.id;\r\n this.element.append(div);\r\n //this.lazyLoadQueue.observe({div, load: this.processVisibleDiv});\r\n this.lazyLoadQueue.observe(div);\r\n //let preloader = new ProgressivePreloader(div);\r\n const gotThumb = appDocsManager_1.default.getThumb(doc, false);\r\n const willBeAPoster = !!gotThumb;\r\n let img;\r\n if (willBeAPoster) {\r\n img = new Image();\r\n if (!gotThumb.thumb.url) {\r\n gotThumb.promise.then(() => {\r\n img.src = gotThumb.thumb.url;\r\n });\r\n }\r\n }\r\n const afterRender = () => {\r\n if (img) {\r\n div.append(img);\r\n div.style.opacity = '';\r\n }\r\n };\r\n (((_a = gotThumb === null || gotThumb === void 0 ? void 0 : gotThumb.thumb) === null || _a === void 0 ? void 0 : _a.url) ? misc_1.renderImageFromUrl(img, gotThumb.thumb.url, afterRender) : afterRender());\r\n }\r\n}\r\nexports.default = GifsMasonry;\r\n" - }, - { - "id": 64, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\stickyIntersector.ts", - "name": "./src/components/stickyIntersector.ts", - "index": 103, - "index2": 95, - "size": 2877, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "../../components/stickyIntersector", - "loc": "35:44-89" - }, - { - "moduleId": 47, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\index.ts", - "module": "./src/components/emoticonsDropdown/index.ts", - "moduleName": "./src/components/emoticonsDropdown/index.ts", - "type": "cjs require", - "userRequest": "../stickyIntersector", - "loc": "26:44-75" - } - ], - "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": 65, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popupDatepicker.ts", - "name": "./src/components/popupDatepicker.ts", - "index": 106, - "index2": 100, - "size": 6481, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "../../components/popupDatepicker", - "loc": "39:42-85" - }, - { - "moduleId": 107, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\search.ts", - "module": "./src/components/chat/search.ts", - "moduleName": "./src/components/chat/search.ts", - "type": "cjs require", - "userRequest": "../popupDatepicker", - "loc": "29:42-71" - } - ], - "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 popup_1 = require(\"./popup\");\r\nclass PopupDatePicker extends popup_1.PopupElement {\r\n constructor(initDate, onPick) {\r\n super('popup-date-picker', [{\r\n text: 'CANCEL',\r\n isCancel: true\r\n }, {\r\n text: 'JUMP TO DATE',\r\n callback: () => {\r\n if (this.onPick) {\r\n this.onPick(this.selectedDate.getTime() / 1000 | 0);\r\n }\r\n }\r\n }]);\r\n this.onPick = onPick;\r\n this.minDate = new Date('2013-08-01T00:00:00');\r\n this.onPrevClick = (e) => {\r\n this.selectedMonth.setMonth(this.selectedMonth.getMonth() - 1);\r\n this.setMonth();\r\n if (this.selectedMonth.getTime() == this.minMonth.getTime()) {\r\n this.prevBtn.setAttribute('disabled', 'true');\r\n }\r\n this.nextBtn.removeAttribute('disabled');\r\n };\r\n this.onNextClick = (e) => {\r\n this.selectedMonth.setMonth(this.selectedMonth.getMonth() + 1);\r\n this.setMonth();\r\n if (this.selectedMonth.getTime() == this.maxMonth.getTime()) {\r\n this.nextBtn.setAttribute('disabled', 'true');\r\n }\r\n this.prevBtn.removeAttribute('disabled');\r\n };\r\n this.onDateClick = (e) => {\r\n //cancelEvent(e);\r\n const target = e.target;\r\n if (!target.dataset.timestamp)\r\n return;\r\n if (this.selectedEl) {\r\n if (this.selectedEl == target)\r\n return;\r\n this.selectedEl.classList.remove('active');\r\n }\r\n target.classList.add('active');\r\n const timestamp = +target.dataset.timestamp;\r\n this.selectedDate = new Date(timestamp);\r\n this.setTitle();\r\n this.setMonth();\r\n };\r\n const popupBody = document.createElement('div');\r\n popupBody.classList.add('popup-body');\r\n // Controls\r\n this.controlsDiv = document.createElement('div');\r\n this.controlsDiv.classList.add('date-picker-controls');\r\n this.prevBtn = document.createElement('button');\r\n this.prevBtn.classList.add('btn-icon', 'tgico-down', 'date-picker-prev');\r\n this.prevBtn.addEventListener('click', this.onPrevClick);\r\n this.nextBtn = document.createElement('button');\r\n this.nextBtn.classList.add('btn-icon', 'tgico-down', 'date-picker-next');\r\n this.nextBtn.addEventListener('click', this.onNextClick);\r\n this.monthTitle = document.createElement('div');\r\n this.monthTitle.classList.add('date-picker-month-title');\r\n this.controlsDiv.append(this.prevBtn, this.monthTitle, this.nextBtn);\r\n // Month\r\n this.monthsContainer = document.createElement('div');\r\n this.monthsContainer.classList.add('date-picker-months');\r\n this.monthsContainer.addEventListener('click', this.onDateClick);\r\n popupBody.append(this.controlsDiv, this.monthsContainer);\r\n this.container.append(popupBody);\r\n const popupCenterer = document.createElement('div');\r\n popupCenterer.classList.add('popup-centerer');\r\n popupCenterer.append(this.container);\r\n this.element.append(popupCenterer);\r\n //const passed = (initDate.getTime() - (initDate.getTimezoneOffset() * 60000)) % 86400000;\r\n //this.selectedDate = this.maxDate = new Date(initDate.getTime() - passed);\r\n initDate.setHours(0, 0, 0, 0);\r\n this.selectedDate = initDate;\r\n this.maxDate = new Date();\r\n this.maxDate.setHours(0, 0, 0, 0);\r\n this.selectedMonth = new Date(this.selectedDate);\r\n this.selectedMonth.setDate(1);\r\n this.maxMonth = new Date(this.maxDate);\r\n this.maxMonth.setDate(1);\r\n this.minMonth = new Date(this.minDate);\r\n this.minMonth.setDate(1);\r\n if (this.selectedMonth.getTime() == this.minMonth.getTime()) {\r\n this.prevBtn.setAttribute('disabled', 'true');\r\n }\r\n if (this.selectedMonth.getTime() == this.maxMonth.getTime()) {\r\n this.nextBtn.setAttribute('disabled', 'true');\r\n }\r\n this.setTitle();\r\n this.setMonth();\r\n }\r\n setTitle() {\r\n const splitted = this.selectedDate.toString().split(' ', 3);\r\n this.title.innerText = splitted[0] + ', ' + splitted[1] + ' ' + splitted[2];\r\n }\r\n setMonth() {\r\n const months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];\r\n this.monthTitle.innerText = months[this.selectedMonth.getMonth()] + ' ' + this.selectedMonth.getFullYear();\r\n if (this.month) {\r\n this.month.remove();\r\n }\r\n this.month = document.createElement('div');\r\n this.month.classList.add('date-picker-month');\r\n const days = ['M', 'T', 'W', 'T', 'F', 'S', 'S'];\r\n this.month.append(...days.map(s => {\r\n const el = document.createElement('span');\r\n el.innerText = s;\r\n return el;\r\n }));\r\n const firstDate = new Date(this.selectedMonth);\r\n // 0 - sunday\r\n let dayIndex = firstDate.getDay() - 1;\r\n if (dayIndex == -1)\r\n dayIndex = days.length - 1;\r\n // Padding first week\r\n for (let i = 0; i < dayIndex; ++i) {\r\n const el = document.createElement('span');\r\n this.month.append(el);\r\n }\r\n do {\r\n const date = firstDate.getDate();\r\n const el = document.createElement('button');\r\n el.classList.add('btn-icon');\r\n el.innerText = '' + date;\r\n el.dataset.timestamp = '' + firstDate.getTime();\r\n if (firstDate > this.maxDate) {\r\n el.setAttribute('disabled', 'true');\r\n }\r\n if (firstDate.getTime() == this.selectedDate.getTime()) {\r\n this.selectedEl = el;\r\n el.classList.add('active');\r\n }\r\n this.month.append(el);\r\n firstDate.setDate(date + 1);\r\n } while (firstDate.getDate() != 1);\r\n this.container.classList.toggle('is-max-lines', (this.month.childElementCount / 7) > 6);\r\n this.monthsContainer.append(this.month);\r\n }\r\n}\r\nexports.default = PopupDatePicker;\r\n" - }, - { - "id": 66, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pagePassword.ts", - "name": "./src/pages/pagePassword.ts", - "index": 110, - "index2": 108, - "size": 5113, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageAuthCode.ts", - "issuerId": 79, - "issuerName": "./src/pages/pageAuthCode.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 49, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "name": "./src/pages/pageSignIn.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 79, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageAuthCode.ts", - "name": "./src/pages/pageAuthCode.ts", - "profile": { - "factory": 104, - "building": 1053, - "dependencies": 527 - } - } - ], - "profile": { - "factory": 575, - "building": 2297, - "dependencies": 2 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 79, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 109, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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\nconst config_1 = require(\"../lib/config\");\r\nconst passwordManager_1 = __importDefault(require(\"../lib/mtproto/passwordManager\"));\r\nconst utils_1 = require(\"../lib/utils\");\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;\r\n const toggleVisible = page.pageEl.querySelector('.toggle-visible');\r\n let getState = () => {\r\n return passwordManager_1.default.getState().then(_state => {\r\n var _a;\r\n state = _state;\r\n passwordInputLabel.innerText = (_a = state.hint) !== null && _a !== void 0 ? _a : 'Password';\r\n });\r\n };\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 getState();\r\n };\r\n const onVisibilityClick = function (e) {\r\n utils_1.cancelEvent(e);\r\n passwordVisible = !passwordVisible;\r\n this.classList.toggle('tgico-eye2', passwordVisible);\r\n if (passwordVisible) {\r\n passwordInput.setAttribute('type', 'text');\r\n animation.setDirection(1);\r\n animation.curFrame = 0;\r\n needFrame = 16;\r\n animation.play();\r\n }\r\n else {\r\n passwordInput.setAttribute('type', 'password');\r\n animation.setDirection(-1);\r\n animation.curFrame = 16;\r\n needFrame = 0;\r\n animation.play();\r\n }\r\n };\r\n toggleVisible.addEventListener('click', onVisibilityClick);\r\n toggleVisible.addEventListener('touchend', onVisibilityClick);\r\n let state;\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 passwordManager_1.default.check(value, state).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.remove();\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 const size = config_1.mediaSizes.isMobile ? 100 : 166;\r\n return Promise.all([\r\n lottieLoader_1.default.loadAnimationFromURL({\r\n container: page.pageEl.querySelector('.auth-image'),\r\n loop: false,\r\n autoplay: false,\r\n width: size,\r\n height: size,\r\n noCache: true\r\n //}, 'assets/img/TwoFactorSetupMonkeyClose.tgs').then(_animation => {\r\n }, 'assets/img/TwoFactorSetupMonkeyPeek.tgs').then(_animation => {\r\n //return;\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 getState()\r\n ]);\r\n};\r\nconst page = new page_1.default('page-password', true, onFirstMount);\r\nexports.default = page;\r\n" - }, - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "index": 0, - "index2": 113, - "size": 6409, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": null, - "issuerId": null, - "issuerName": null, - "issuerPath": null, - "profile": { - "factory": 24, - "building": 3521 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": null, - "moduleIdentifier": null, - "module": null, - "moduleName": null, - "type": "single entry", - "userRequest": "./src/index.ts", - "loc": "main" - } - ], - "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/* import { computeCheck } from './lib/crypto/srp';\r\nimport { salt1, salt2, g, p, srp_id, secure_random, srp_B, password } from './mock/srp'; */\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 const setVH = () => {\r\n const 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 const [config, _, __, AppStorage] = yield Promise.all([\r\n Promise.resolve().then(() => __importStar(require('./lib/config'))),\r\n Promise.resolve().then(() => __importStar(require('./lib/mtproto/mtprotoworker'))),\r\n Promise.resolve().then(() => __importStar(require('./lib/polyfill'))),\r\n Promise.resolve().then(() => __importStar(require('./lib/storage')))\r\n ]);\r\n /* if(config.isServiceWorkerSupported) {\r\n await navigator.serviceWorker.ready;\r\n navigator.serviceWorker.controller ? true : await new Promise((resolve, reject) => {\r\n navigator.serviceWorker.addEventListener('controllerchange', resolve);\r\n });\r\n } */\r\n //console.time('get storage');\r\n const auth = yield AppStorage.default.get('user_auth');\r\n //console.log('got auth:', auth);\r\n //console.timeEnd('get storage');\r\n if (config.isApple) {\r\n document.documentElement.classList.add('is-mac', 'emoji-supported');\r\n if (config.isAppleMobile) {\r\n document.documentElement.classList.add('is-ios');\r\n }\r\n }\r\n else if (config.isAndroid) {\r\n document.documentElement.classList.add('is-android');\r\n }\r\n if (!config.touchSupport) {\r\n document.documentElement.classList.add('no-touch');\r\n }\r\n const userID = auth.id || 0;\r\n if (!userID /* || 1 == 1 */) {\r\n (yield Promise.resolve().then(() => __importStar(require('./pages/pageSignIn')))).default.mount();\r\n /* computeCheck(password, {\r\n current_algo: {\r\n salt1,\r\n salt2,\r\n p,\r\n g\r\n },\r\n srp_id,\r\n srp_B,\r\n secure_random,\r\n }).then(res => {\r\n console.log(res);\r\n }); */\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 const utils = yield Promise.resolve().then(() => __importStar(require('./lib/utils')));\r\n utils.$rootScope.myID = userID;\r\n const findUpClassName = utils.findUpClassName;\r\n Array.from(document.body.getElementsByClassName('popup-close')).forEach(el => {\r\n const popup = findUpClassName(el, 'popup');\r\n el.addEventListener('click', () => {\r\n popup.classList.remove('active');\r\n });\r\n });\r\n const ripple = (yield Promise.resolve().then(() => __importStar(require('./components/ripple')))).ripple;\r\n Array.from(document.getElementsByClassName('rp')).forEach(el => ripple(el));\r\n}));\r\n//});\r\n" - }, - { - "id": 68, - "identifier": "F:\\tweb\\node_modules\\mini-css-extract-plugin\\dist\\loader.js!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\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": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "issuerId": 67, - "issuerName": "./src/index.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - } - ], - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 67, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 69, - "identifier": "F:\\tweb\\node_modules\\mini-css-extract-plugin\\dist\\loader.js!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\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": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "issuerId": 67, - "issuerName": "./src/index.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - } - ], - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 67, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 70, - "identifier": "F:\\tweb\\node_modules\\mini-css-extract-plugin\\dist\\loader.js!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\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": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "issuerId": 67, - "issuerName": "./src/index.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - } - ], - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 67, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 71, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\helpers\\context.ts", - "name": "./src/helpers/context.ts", - "index": 13, - "index2": 10, - "size": 1471, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\storage.ts", - "issuerId": 19, - "issuerName": "./src/lib/storage.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\storage.ts", - "name": "./src/lib/storage.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - } - ], - "profile": { - "factory": 729, - "building": 176 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 19, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\storage.ts", - "module": "./src/lib/storage.ts", - "moduleName": "./src/lib/storage.ts", - "type": "cjs require", - "userRequest": "../helpers/context", - "loc": "4:18-47" - } - ], - "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.notifyAll = exports.notifySomeone = exports.isWorker = exports.isServiceWorker = exports.isWebWorker = void 0;\r\nexports.isWebWorker = typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope;\r\nexports.isServiceWorker = typeof ServiceWorkerGlobalScope !== 'undefined' && self instanceof ServiceWorkerGlobalScope;\r\nexports.isWorker = exports.isWebWorker || exports.isServiceWorker;\r\n// в SW может быть сразу две переменных TRUE, поэтому проверяю по последней\r\nconst notifyServiceWorker = (all, ...args) => {\r\n self\r\n .clients\r\n .matchAll({ includeUncontrolled: false, type: 'window' })\r\n .then((listeners) => {\r\n if (!listeners.length) {\r\n //console.trace('no listeners?', self, listeners);\r\n return;\r\n }\r\n listeners.slice(all ? 0 : -1).forEach(listener => {\r\n // @ts-ignore\r\n listener.postMessage(...args);\r\n });\r\n });\r\n};\r\nconst notifyWorker = (...args) => {\r\n // @ts-ignore\r\n self.postMessage(...args);\r\n};\r\nconst empty = () => { };\r\nexports.notifySomeone = exports.isServiceWorker ? notifyServiceWorker.bind(null, false) : (exports.isWebWorker ? notifyWorker : empty);\r\nexports.notifyAll = exports.isServiceWorker ? notifyServiceWorker.bind(null, true) : (exports.isWebWorker ? notifyWorker : empty);\r\n" - }, - { - "id": 72, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\crypto_methods.ts", - "name": "./src/lib/crypto/crypto_methods.ts", - "index": 14, - "index2": 14, - "size": 1544, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts", - "issuerId": 2, - "issuerName": "./src/lib/mtproto/mtprotoworker.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts", - "name": "./src/lib/mtproto/mtprotoworker.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - } - ], - "profile": { - "factory": 2342, - "building": 10824, - "dependencies": 20 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 2, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts", - "module": "./src/lib/mtproto/mtprotoworker.ts", - "moduleName": "./src/lib/mtproto/mtprotoworker.ts", - "type": "cjs require", - "userRequest": "../crypto/crypto_methods", - "loc": "8:41-76" - } - ], - "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('gzipUncompress', bytes, toString);\r\n }\r\n computeSRP(password, state) {\r\n return this.performTaskWorker('computeSRP', password, state);\r\n }\r\n}\r\nexports.default = CryptoWorkerMethods;\r\n" - }, - { - "id": 73, - "identifier": "F:\\tweb\\node_modules\\worker-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/worker-loader/dist/cjs.js!./src/lib/webp/webp.worker.ts", - "index": 19, - "index2": 16, - "size": 113, - "cacheable": false, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webpWorkerController.ts", - "issuerId": 53, - "issuerName": "./src/lib/webp/webpWorkerController.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts", - "name": "./src/lib/mtproto/mtprotoworker.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 53, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webpWorkerController.ts", - "name": "./src/lib/webp/webpWorkerController.ts", - "profile": { - "factory": 2342, - "building": 10824, - "dependencies": 20 - } - } - ], - "profile": { - "factory": 1033, - "building": 10993 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 53, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webpWorkerController.ts", - "module": "./src/lib/webp/webpWorkerController.ts", - "moduleName": "./src/lib/webp/webpWorkerController.ts", - "type": "cjs require", - "userRequest": "worker-loader!./webp.worker", - "loc": "7:38-76" - } - ], - "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__ + \"608dbdcf64455bd4cc24.worker.js\");\n};" - }, - { - "id": 74, - "identifier": "F:\\tweb\\node_modules\\worker-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/worker-loader/dist/cjs.js!./src/lib/mtproto/mtproto.worker.ts", - "index": 21, - "index2": 19, - "size": 113, - "cacheable": false, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts", - "issuerId": 2, - "issuerName": "./src/lib/mtproto/mtprotoworker.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts", - "name": "./src/lib/mtproto/mtprotoworker.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - } - ], - "profile": { - "factory": 2342, - "building": 10824, - "dependencies": 20 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 2, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts", - "module": "./src/lib/mtproto/mtprotoworker.ts", - "moduleName": "./src/lib/mtproto/mtprotoworker.ts", - "type": "cjs require", - "userRequest": "worker-loader!./mtproto.worker", - "loc": "11:41-82" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 2, - "source": "module.exports = function() {\n return new Worker(__webpack_public_path__ + \"b601bf8645daa9db7023.worker.js\");\n};" - }, - { - "id": 75, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\polyfill.ts", - "name": "./src/lib/polyfill.ts", - "index": 22, - "index2": 21, - "size": 1829, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "issuerId": 67, - "issuerName": "./src/index.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - } - ], - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 67, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "module": "./src/index.ts", - "moduleName": "./src/index.ts", - "type": "cjs require", - "userRequest": "./lib/polyfill", - "loc": "64:50-75" - } - ], - "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.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\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 const sec_num = parseInt(this + '', 10);\r\n const 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)\r\n leadZero = true;\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 (hours ? /* ('0' + hours).slice(-2) */ hours + ':' : '') + minutes + ':' + seconds;\r\n};\r\n" - }, - { - "id": 76, - "identifier": "F:\\tweb\\src\\vendor\\smoothscroll.js", - "name": "./src/vendor/smoothscroll.js", - "index": 26, - "index2": 23, - "size": 4025, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\scrollable_new.ts", - "issuerId": 6, - "issuerName": "./src/components/scrollable_new.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 49, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "name": "./src/pages/pageSignIn.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 6, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\scrollable_new.ts", - "name": "./src/components/scrollable_new.ts", - "profile": { - "factory": 104, - "building": 1053, - "dependencies": 527 - } - } - ], - "profile": { - "factory": 909, - "building": 6558 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 6, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\scrollable_new.ts", - "module": "./src/components/scrollable_new.ts", - "moduleName": "./src/components/scrollable_new.ts", - "type": "cjs require", - "userRequest": "../vendor/smoothscroll", - "loc": "7:39-72" - } - ], - "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+c1?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": 77, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\emoji\\regex.ts", - "name": "./src/emoji/regex.ts", - "index": 28, - "index2": 25, - "size": 8797, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\richtextprocessor.ts", - "issuerId": 3, - "issuerName": "./src/lib/richtextprocessor.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 49, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "name": "./src/pages/pageSignIn.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 3, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\richtextprocessor.ts", - "name": "./src/lib/richtextprocessor.ts", - "profile": { - "factory": 104, - "building": 1053, - "dependencies": 527 - } - } - ], - "profile": { - "factory": 7333, - "building": 114 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 3, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\richtextprocessor.ts", - "module": "./src/lib/richtextprocessor.ts", - "moduleName": "./src/lib/richtextprocessor.ts", - "type": "cjs require", - "userRequest": "../emoji/regex", - "loc": "9:32-57" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 3, - "source": "\"use strict\";\r\n// Copyright Twitter Inc. Licensed under MIT\r\n// https://github.com/twitter/twemoji-parser/blob/master/LICENSE.md\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.default = \"(?:\\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])|\\ufe0f\";\r\n" - }, - { - "id": 78, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\emoji\\index.ts", - "name": "./src/emoji/index.ts", - "index": 29, - "index2": 26, - "size": 1385, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\richtextprocessor.ts", - "issuerId": 3, - "issuerName": "./src/lib/richtextprocessor.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 49, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "name": "./src/pages/pageSignIn.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 3, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\richtextprocessor.ts", - "name": "./src/lib/richtextprocessor.ts", - "profile": { - "factory": 104, - "building": 1053, - "dependencies": 527 - } - } - ], - "profile": { - "factory": 7333, - "building": 114 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 3, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\richtextprocessor.ts", - "module": "./src/lib/richtextprocessor.ts", - "moduleName": "./src/lib/richtextprocessor.ts", - "type": "cjs require", - "userRequest": "../emoji", - "loc": "10:16-35" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 3, - "source": "\"use strict\";\r\n// https://github.com/twitter/twemoji-parser/blob/master/src/lib/regex.js\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.toCodePoints = exports.encodeEmoji = void 0;\r\nfunction encodeEmoji(emojiText) {\r\n const codepoints = toCodePoints(removeVS16s(emojiText)).join('-');\r\n return codepoints;\r\n}\r\nexports.encodeEmoji = encodeEmoji;\r\nconst vs16RegExp = /\\uFE0F/g;\r\n// avoid using a string literal like '\\u200D' here because minifiers expand it inline\r\nconst zeroWidthJoiner = String.fromCharCode(0x200d);\r\nconst removeVS16s = (rawEmoji) => (rawEmoji.indexOf(zeroWidthJoiner) < 0 ? rawEmoji.replace(vs16RegExp, '') : rawEmoji);\r\nfunction toCodePoints(unicodeSurrogates) {\r\n const points = [];\r\n let char = 0;\r\n let previous = 0;\r\n let i = 0;\r\n while (i < unicodeSurrogates.length) {\r\n char = unicodeSurrogates.charCodeAt(i++);\r\n if (previous) {\r\n points.push((0x10000 + ((previous - 0xd800) << 10) + (char - 0xdc00)).toString(16));\r\n previous = 0;\r\n }\r\n else if (char > 0xd800 && char <= 0xdbff) {\r\n previous = char;\r\n }\r\n else {\r\n points.push(char.toString(16));\r\n }\r\n }\r\n if (points.length && points[0].length == 2) {\r\n points[0] = '00' + points[0];\r\n }\r\n return points;\r\n}\r\nexports.toCodePoints = toCodePoints;\r\n" - }, - { - "id": 79, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageAuthCode.ts", - "name": "./src/pages/pageAuthCode.ts", - "index": 30, - "index2": 109, - "size": 10897, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "issuerId": 49, - "issuerName": "./src/pages/pageSignIn.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 49, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "name": "./src/pages/pageSignIn.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - } - ], - "profile": { - "factory": 104, - "building": 1053, - "dependencies": 527 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 49, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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\nconst config_1 = require(\"../lib/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.remove();\r\n if (idleAnimation)\r\n idleAnimation.remove();\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 const size = config_1.mediaSizes.isMobile ? 100 : 166;\r\n return Promise.all([\r\n lottieLoader_1.default.loadAnimationFromURL({\r\n container: imageDiv,\r\n loop: true,\r\n autoplay: true,\r\n width: size,\r\n height: size\r\n }, 'assets/img/TwoFactorSetupMonkeyIdle.tgs').then(animation => {\r\n idleAnimation = animation;\r\n }),\r\n lottieLoader_1.default.loadAnimationFromURL({\r\n container: imageDiv,\r\n loop: false,\r\n autoplay: false,\r\n width: size,\r\n height: size\r\n }, 'assets/img/TwoFactorSetupMonkeyTracking.tgs').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
with the code.';\r\n break;\r\n case 'auth.sentCodeTypeApp':\r\n sentTypeElement.innerHTML = 'We have sent you a message in Telegram
with the code.';\r\n break;\r\n case 'auth.sentCodeTypeCall':\r\n sentTypeElement.innerHTML = 'We will call you and voice
the code.';\r\n break;\r\n default:\r\n sentTypeElement.innerHTML = `Please check everything
for a code (type: ${authCode.type._})`;\r\n break;\r\n }\r\n});\r\nexports.default = page;\r\n" - }, - { - "id": 80, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignUp.ts", - "name": "./src/pages/pageSignUp.ts", - "index": 31, - "index2": 106, - "size": 5208, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageAuthCode.ts", - "issuerId": 79, - "issuerName": "./src/pages/pageAuthCode.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 49, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "name": "./src/pages/pageSignIn.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 79, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageAuthCode.ts", - "name": "./src/pages/pageAuthCode.ts", - "profile": { - "factory": 104, - "building": 1053, - "dependencies": 527 - } - } - ], - "profile": { - "factory": 575, - "building": 2297, - "dependencies": 2 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 79, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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 __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\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\nlet authCode = null;\r\nlet onFirstMount = () => Promise.resolve().then(() => __importStar(require('../lib/appManagers/appProfileManager'))).then(imported => {\r\n const pageElement = page.pageEl;\r\n const avatarPreview = pageElement.querySelector('#canvas-avatar');\r\n const appProfileManager = imported.default;\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.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": 81, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pagesManager.ts", - "name": "./src/pages/pagesManager.ts", - "index": 34, - "index2": 31, - "size": 1412, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\page.ts", - "issuerId": 25, - "issuerName": "./src/pages/page.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 49, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "name": "./src/pages/pageSignIn.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 25, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\page.ts", - "name": "./src/pages/page.ts", - "profile": { - "factory": 104, - "building": 1053, - "dependencies": 527 - } - } - ], - "profile": { - "factory": 565, - "building": 2305, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 25, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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 lottieLoader_1 = __importDefault(require(\"../lib/lottieLoader\"));\r\nconst horizontalMenu_1 = require(\"../components/horizontalMenu\");\r\nclass PagesManager {\r\n constructor() {\r\n this.pageID = -1;\r\n this.pagesDiv = document.getElementById('auth-pages');\r\n this.selectTab = horizontalMenu_1.horizontalMenu(null, this.pagesDiv.firstElementChild, null, null);\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\n// @ts-ignore\r\nif (process.env.NODE_ENV != 'production') {\r\n window.pagesManager = pagesManager;\r\n}\r\nexports.default = pagesManager;\r\n" - }, - { - "id": 82, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.ts", - "name": "./src/lib/mtproto/mtproto.ts", - "index": 49, - "index2": 39, - "size": 2926, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "issuerId": 7, - "issuerName": "./src/lib/appManagers/appMessagesManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "name": "./src/lib/appManagers/appMessagesManager.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 2083, - "building": 945, - "dependencies": 16 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 7, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", - "module": "./src/lib/appManagers/appMessagesManager.ts", - "moduleName": "./src/lib/appManagers/appMessagesManager.ts", - "type": "cjs require", - "userRequest": "../mtproto/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": 83, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\visibilityIntersector.ts", - "name": "./src/components/visibilityIntersector.ts", - "index": 66, - "index2": 57, - "size": 2816, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\lazyLoadQueue.ts", - "issuerId": 21, - "issuerName": "./src/components/lazyLoadQueue.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 21, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\lazyLoadQueue.ts", - "name": "./src/components/lazyLoadQueue.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 1009, - "building": 1430 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 21, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\lazyLoadQueue.ts", - "module": "./src/components/lazyLoadQueue.ts", - "moduleName": "./src/components/lazyLoadQueue.ts", - "type": "cjs require", - "userRequest": "./visibilityIntersector", - "loc": "17: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\nclass VisibilityIntersector {\r\n constructor(onVisibilityChange) {\r\n this.items = new Map();\r\n this.locked = false;\r\n this.observer = new IntersectionObserver((entries) => {\r\n if (this.locked) {\r\n return;\r\n }\r\n const changed = [];\r\n entries.forEach(entry => {\r\n const target = entry.target;\r\n if (this.items.get(target) == entry.isIntersecting) {\r\n return;\r\n }\r\n else {\r\n this.items.set(target, entry.isIntersecting);\r\n }\r\n /* if(entry.isIntersecting) {\r\n console.log('ooo', entry);\r\n } */\r\n /* if(this.locked) {\r\n return;\r\n } */\r\n changed[entry.isIntersecting ? 'unshift' : 'push']({ target, visible: entry.isIntersecting });\r\n //onVisibilityChange(target, entry.isIntersecting);\r\n });\r\n changed.forEach(smth => {\r\n onVisibilityChange(smth.target, smth.visible);\r\n });\r\n });\r\n }\r\n getVisible() {\r\n const items = [];\r\n this.items.forEach((value, key) => {\r\n if (value) {\r\n items.push(key);\r\n }\r\n });\r\n return items;\r\n }\r\n clearVisible() {\r\n const visible = this.getVisible();\r\n for (const target of visible) {\r\n this.items.set(target, false);\r\n }\r\n }\r\n isVisible(target) {\r\n return this.items.get(target);\r\n }\r\n disconnect() {\r\n this.observer.disconnect();\r\n this.items.clear();\r\n }\r\n refresh() {\r\n this.observer.disconnect();\r\n //window.requestAnimationFrame(() => {\r\n const targets = [...this.items.keys()];\r\n for (const target of targets) {\r\n //this.items.set(target, false);\r\n this.observer.observe(target);\r\n }\r\n //});\r\n }\r\n refreshVisible() {\r\n const visible = this.getVisible();\r\n for (const target of visible) {\r\n this.observer.unobserve(target);\r\n }\r\n for (const target of visible) {\r\n this.observer.observe(target);\r\n }\r\n }\r\n observe(target) {\r\n this.items.set(target, false);\r\n this.observer.observe(target);\r\n }\r\n unobserve(target) {\r\n this.observer.unobserve(target);\r\n this.items.delete(target);\r\n }\r\n unlock() {\r\n this.locked = false;\r\n }\r\n unlockAndRefresh() {\r\n this.unlock();\r\n this.refresh();\r\n }\r\n lock() {\r\n this.locked = true;\r\n }\r\n}\r\nexports.default = VisibilityIntersector;\r\n" - }, - { - "id": 84, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\audio.ts", - "name": "./src/components/audio.ts", - "index": 72, - "index2": 64, - "size": 18005, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "issuerId": 18, - "issuerName": "./src/components/wrappers.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 18, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "name": "./src/components/wrappers.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 1092, - "building": 1418, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 18, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\wrappers.ts", - "module": "./src/components/wrappers.ts", - "moduleName": "./src/components/wrappers.ts", - "type": "cjs require", - "userRequest": "./audio", - "loc": "29:32-50" - } - ], - "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.decodeWaveform = void 0;\r\nconst appDocsManager_1 = __importDefault(require(\"../lib/appManagers/appDocsManager\"));\r\nconst richtextprocessor_1 = require(\"../lib/richtextprocessor\");\r\nconst wrappers_1 = require(\"./wrappers\");\r\nconst preloader_1 = __importDefault(require(\"./preloader\"));\r\nconst mediaPlayer_1 = require(\"../lib/mediaPlayer\");\r\nconst appMediaPlaybackController_1 = __importDefault(require(\"./appMediaPlaybackController\"));\r\nconst config_1 = require(\"../lib/config\");\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\nexports.decodeWaveform = decodeWaveform;\r\nfunction wrapVoiceMessage(doc, audioEl) {\r\n audioEl.classList.add('is-voice');\r\n const barWidth = 2;\r\n const barMargin = config_1.mediaSizes.isMobile ? 2 : 1;\r\n const barHeightMin = config_1.mediaSizes.isMobile ? 3 : 2;\r\n const barHeightMax = config_1.mediaSizes.isMobile ? 16 : 23;\r\n const availW = config_1.mediaSizes.isMobile ? 152 : 190;\r\n const svg = document.createElementNS(\"http://www.w3.org/2000/svg\", \"svg\");\r\n svg.classList.add('audio-waveform');\r\n svg.setAttributeNS(null, 'width', '' + availW);\r\n svg.setAttributeNS(null, 'height', '' + barHeightMax);\r\n svg.setAttributeNS(null, 'viewBox', `0 0 ${availW} ${barHeightMax}`);\r\n const timeDiv = document.createElement('div');\r\n timeDiv.classList.add('audio-time');\r\n audioEl.append(svg, timeDiv);\r\n let waveform = doc.attributes.find(attribute => attribute._ == 'documentAttributeAudio').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 barCount = Math.min((availW / (barWidth + barMargin)) | 0, wfSize);\r\n let maxValue = 0;\r\n const 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 const h = `\r\n \r\n `;\r\n html += h;\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 const rects = Array.from(svg.children);\r\n let progress = audioEl.querySelector('.audio-waveform');\r\n const onLoad = () => {\r\n let interval = 0;\r\n let lastIndex = 0;\r\n let audio = audioEl.audio;\r\n if (!audio.paused || (audio.currentTime > 0 && audio.currentTime != audio.duration)) {\r\n lastIndex = Math.round(audio.currentTime / audio.duration * barCount);\r\n rects.slice(0, lastIndex + 1).forEach(node => node.classList.add('active'));\r\n }\r\n let start = () => {\r\n clearInterval(interval);\r\n interval = setInterval(() => {\r\n if (lastIndex > svg.childElementCount || isNaN(audio.duration) || audio.paused) {\r\n clearInterval(interval);\r\n return;\r\n }\r\n lastIndex = Math.round(audio.currentTime / audio.duration * barCount);\r\n //svg.children[lastIndex].setAttributeNS(null, 'fill', '#000');\r\n //svg.children[lastIndex].classList.add('active'); #Иногда пропускает полоски..\r\n rects.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 if (!audio.paused) {\r\n start();\r\n }\r\n audioEl.addAudioListener('playing', () => {\r\n //rects.forEach(node => node.classList.remove('active'));\r\n start();\r\n });\r\n audioEl.addAudioListener('pause', () => {\r\n clearInterval(interval);\r\n });\r\n audioEl.addAudioListener('ended', () => {\r\n clearInterval(interval);\r\n rects.forEach(node => node.classList.remove('active'));\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);\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);\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);\r\n });\r\n function scrub(e) {\r\n const scrubTime = e.offsetX / availW /* width */ * audio.duration;\r\n lastIndex = Math.round(scrubTime / audio.duration * barCount);\r\n rects.slice(0, lastIndex + 1).forEach(node => node.classList.add('active'));\r\n for (let i = lastIndex + 1; i < rects.length; ++i) {\r\n rects[i].classList.remove('active');\r\n }\r\n audio.currentTime = scrubTime;\r\n }\r\n return () => {\r\n clearInterval(interval);\r\n progress.remove();\r\n progress = null;\r\n audio = null;\r\n };\r\n };\r\n return onLoad;\r\n}\r\nfunction wrapAudio(doc, audioEl) {\r\n const withTime = !!+audioEl.getAttribute('with-time');\r\n const title = doc.audioTitle || doc.file_name;\r\n let subtitle = doc.audioPerformer ? richtextprocessor_1.RichTextProcessor.wrapPlainText(doc.audioPerformer) : '';\r\n if (withTime) {\r\n subtitle += (subtitle ? ' · ' : '') + wrappers_1.formatDate(doc.date);\r\n }\r\n else if (!subtitle) {\r\n subtitle = 'Unknown Artist';\r\n }\r\n const html = `\r\n
\r\n
${title}
\r\n
${subtitle}
\r\n
\r\n
`;\r\n audioEl.insertAdjacentHTML('beforeend', html);\r\n const onLoad = () => {\r\n const subtitleDiv = audioEl.querySelector('.audio-subtitle');\r\n let launched = false;\r\n let progressLine = new mediaPlayer_1.MediaProgressLine(audioEl.audio, doc.supportsStreaming);\r\n audioEl.addAudioListener('ended', () => {\r\n audioEl.classList.remove('audio-show-progress');\r\n // Reset subtitle\r\n subtitleDiv.innerHTML = subtitle;\r\n launched = false;\r\n });\r\n const onPlaying = () => {\r\n if (!launched) {\r\n audioEl.classList.add('audio-show-progress');\r\n launched = true;\r\n subtitleDiv.innerHTML = '';\r\n if (progressLine) {\r\n subtitleDiv.append(progressLine.container);\r\n }\r\n }\r\n };\r\n audioEl.addAudioListener('playing', onPlaying);\r\n if (!audioEl.audio.paused || audioEl.audio.currentTime > 0) {\r\n onPlaying();\r\n }\r\n return () => {\r\n progressLine.removeListeners();\r\n progressLine.container.remove();\r\n progressLine = null;\r\n };\r\n };\r\n return onLoad;\r\n}\r\nclass AudioElement extends HTMLElement {\r\n constructor() {\r\n super();\r\n this.attachedHandlers = {};\r\n // элемент создан\r\n }\r\n connectedCallback() {\r\n // браузер вызывает этот метод при добавлении элемента в документ\r\n // (может вызываться много раз, если элемент многократно добавляется/удаляется)\r\n this.classList.add('audio');\r\n const mid = +this.getAttribute('message-id');\r\n const docID = this.getAttribute('doc-id');\r\n const doc = appDocsManager_1.default.getDoc(docID);\r\n const uploading = +doc.id < 0;\r\n const durationStr = String(doc.duration | 0).toHHMMSS(true);\r\n this.innerHTML = `
`;\r\n const downloadDiv = document.createElement('div');\r\n downloadDiv.classList.add('audio-download');\r\n if (!uploading && doc.type != 'audio') {\r\n downloadDiv.innerHTML = '
';\r\n }\r\n if (doc.type != 'audio' || uploading) {\r\n this.append(downloadDiv);\r\n }\r\n const onTypeLoad = doc.type == 'voice' ? wrapVoiceMessage(doc, this) : wrapAudio(doc, this);\r\n const audioTimeDiv = this.querySelector('.audio-time');\r\n audioTimeDiv.innerHTML = durationStr;\r\n const onLoad = (autoload = true) => {\r\n const audio = this.audio = appMediaPlaybackController_1.default.addMedia(doc, mid, autoload);\r\n this.onTypeDisconnect = onTypeLoad();\r\n const toggle = this.querySelector('.audio-toggle');\r\n const onPlaying = () => {\r\n audioTimeDiv.innerText = String(audio.currentTime | 0).toHHMMSS(true) + ' / ' + durationStr;\r\n if (!audio.paused) {\r\n toggle.classList.remove('tgico-largeplay');\r\n toggle.classList.add('tgico-largepause');\r\n }\r\n };\r\n if (!audio.paused || (audio.currentTime > 0 && audio.currentTime != audio.duration)) {\r\n onPlaying();\r\n audioTimeDiv.innerText = String(audio.currentTime | 0).toHHMMSS(true) + ' / ' + durationStr;\r\n }\r\n toggle.addEventListener('click', () => {\r\n if (audio.paused)\r\n audio.play().catch(() => { });\r\n else\r\n audio.pause();\r\n });\r\n this.addAudioListener('ended', () => {\r\n toggle.classList.add('tgico-largeplay');\r\n toggle.classList.remove('tgico-largepause');\r\n });\r\n this.addAudioListener('timeupdate', () => {\r\n if (appMediaPlaybackController_1.default.isSafariBuffering(audio))\r\n return;\r\n audioTimeDiv.innerText = String(audio.currentTime | 0).toHHMMSS(true) + ' / ' + durationStr;\r\n });\r\n this.addAudioListener('pause', () => {\r\n toggle.classList.add('tgico-largeplay');\r\n toggle.classList.remove('tgico-largepause');\r\n });\r\n this.addAudioListener('playing', onPlaying);\r\n };\r\n if (!uploading) {\r\n let preloader = this.preloader;\r\n if (doc.type == 'voice') {\r\n let download;\r\n const onClick = () => {\r\n if (!download) {\r\n if (!preloader) {\r\n preloader = new preloader_1.default(null, true);\r\n }\r\n download = appDocsManager_1.default.downloadDocNew(doc);\r\n preloader.attach(downloadDiv, true, download);\r\n download.then(() => {\r\n downloadDiv.remove();\r\n this.removeEventListener('click', onClick);\r\n onLoad();\r\n }).catch(err => {\r\n if (err.name === 'AbortError') {\r\n download = null;\r\n }\r\n }).finally(() => {\r\n downloadDiv.classList.remove('downloading');\r\n });\r\n downloadDiv.classList.add('downloading');\r\n }\r\n else {\r\n download.cancel();\r\n }\r\n };\r\n this.addEventListener('click', onClick);\r\n this.click();\r\n }\r\n else {\r\n onLoad(false);\r\n //if(appMediaPlaybackController.mediaExists(mid)) { // чтобы показать прогресс, если аудио уже было скачано\r\n //onLoad();\r\n //} else {\r\n const r = () => {\r\n //onLoad();\r\n appMediaPlaybackController_1.default.resolveWaitingForLoadMedia(mid);\r\n appMediaPlaybackController_1.default.willBePlayed(this.audio); // prepare for loading audio\r\n if (!preloader) {\r\n preloader = new preloader_1.default(null, false);\r\n }\r\n if (config_1.isSafari) {\r\n this.audio.autoplay = true;\r\n this.audio.play().catch(() => { });\r\n }\r\n preloader.attach(downloadDiv);\r\n this.append(downloadDiv);\r\n new Promise((resolve) => {\r\n if (this.audio.readyState >= 2)\r\n resolve();\r\n else\r\n this.addAudioListener('canplay', resolve);\r\n }).then(() => {\r\n downloadDiv.remove();\r\n //setTimeout(() => {\r\n // release loaded audio\r\n if (appMediaPlaybackController_1.default.willBePlayedMedia == this.audio) {\r\n this.audio.play();\r\n appMediaPlaybackController_1.default.willBePlayedMedia = null;\r\n }\r\n //}, 10e3);\r\n });\r\n };\r\n this.addEventListener('click', r, { once: true });\r\n //}\r\n }\r\n }\r\n else {\r\n this.preloader.attach(downloadDiv, false);\r\n //onLoad();\r\n }\r\n }\r\n addAudioListener(name, callback) {\r\n if (!this.attachedHandlers[name])\r\n this.attachedHandlers[name] = [];\r\n this.attachedHandlers[name].push(callback);\r\n this.audio.addEventListener(name, callback);\r\n }\r\n disconnectedCallback() {\r\n // браузер вызывает этот метод при удалении элемента из документа\r\n // (может вызываться много раз, если элемент многократно добавляется/удаляется)\r\n if (this.onTypeDisconnect) {\r\n this.onTypeDisconnect();\r\n this.onTypeDisconnect = null;\r\n }\r\n for (let name in this.attachedHandlers) {\r\n for (let callback of this.attachedHandlers[name]) {\r\n this.audio.removeEventListener(name, callback);\r\n }\r\n delete this.attachedHandlers[name];\r\n }\r\n this.preloader = null;\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}\r\nexports.default = AudioElement;\r\ncustomElements.define(\"audio-element\", AudioElement);\r\n" - }, - { - "id": 85, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\stickers.ts", - "name": "./src/components/sidebarRight/stickers.ts", - "index": 77, - "index2": 72, - "size": 9850, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "issuerId": 24, - "issuerName": "./src/lib/appManagers/appSidebarRight.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 24, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "name": "./src/lib/appManagers/appSidebarRight.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 1584, - "building": 1606, - "dependencies": 2 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 24, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", - "type": "cjs require", - "userRequest": "../../components/sidebarRight/stickers", - "loc": "56:35-84" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 4, - "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 searchInput_1 = __importDefault(require(\"../searchInput\"));\r\nconst scrollable_new_1 = __importDefault(require(\"../scrollable_new\"));\r\nconst lazyLoadQueue_1 = __importDefault(require(\"../lazyLoadQueue\"));\r\nconst utils_1 = require(\"../../lib/utils\");\r\nconst appImManager_1 = __importDefault(require(\"../../lib/appManagers/appImManager\"));\r\nconst appStickersManager_1 = __importDefault(require(\"../../lib/appManagers/appStickersManager\"));\r\nconst popupStickers_1 = __importDefault(require(\"../popupStickers\"));\r\nconst animationIntersector_1 = __importDefault(require(\"../animationIntersector\"));\r\nconst richtextprocessor_1 = require(\"../../lib/richtextprocessor\");\r\nconst wrappers_1 = require(\"../wrappers\");\r\nconst appSidebarRight_1 = __importStar(require(\"../../lib/appManagers/appSidebarRight\"));\r\nclass AppStickersTab {\r\n constructor() {\r\n this.container = document.getElementById('stickers-container');\r\n this.contentDiv = this.container.querySelector('.sidebar-content');\r\n this.backBtn = this.container.querySelector('.sidebar-close-button');\r\n this.setsDiv = this.contentDiv.firstElementChild;\r\n this.scrollable = new scrollable_new_1.default(this.contentDiv, 'y', 'STICKERS-SEARCH', undefined, undefined, 2);\r\n this.scrollable.setVirtualContainer(this.setsDiv);\r\n this.lazyLoadQueue = new lazyLoadQueue_1.default();\r\n this.searchInput = new searchInput_1.default('Search Stickers', (value) => {\r\n this.search(value);\r\n });\r\n this.backBtn.parentElement.append(this.searchInput.container);\r\n this.setsDiv.addEventListener('click', (e) => {\r\n const sticker = utils_1.findUpClassName(e.target, 'sticker-set-sticker');\r\n if (sticker) {\r\n const docID = sticker.dataset.docID;\r\n appImManager_1.default.chatInputC.sendMessageWithDocument(docID);\r\n return;\r\n }\r\n const target = utils_1.findUpClassName(e.target, 'sticker-set');\r\n if (!target)\r\n return;\r\n const id = target.dataset.stickerSet;\r\n const access_hash = target.dataset.stickerSet;\r\n const button = utils_1.findUpClassName(e.target, 'sticker-set-button');\r\n if (button) {\r\n e.preventDefault();\r\n e.cancelBubble = true;\r\n button.setAttribute('disabled', 'true');\r\n appStickersManager_1.default.getStickerSet({ id, access_hash }).then(full => {\r\n appStickersManager_1.default.toggleStickerSet(full.set).then(changed => {\r\n if (changed) {\r\n button.innerText = full.set.installed_date ? 'Added' : 'Add';\r\n button.classList.toggle('gray', !!full.set.installed_date);\r\n }\r\n }).finally(() => {\r\n //button.style.width = set.installed_date ? '68px' : '52px';\r\n button.removeAttribute('disabled');\r\n });\r\n });\r\n }\r\n else {\r\n appStickersManager_1.default.getStickerSet({ id, access_hash }).then(full => {\r\n new popupStickers_1.default(full.set).show();\r\n });\r\n }\r\n });\r\n }\r\n onCloseAfterTimeout() {\r\n this.setsDiv.innerHTML = '';\r\n this.searchInput.value = '';\r\n animationIntersector_1.default.checkAnimations(undefined, 'STICKERS-SEARCH');\r\n }\r\n renderSet(set) {\r\n //console.log('renderSet:', set);\r\n const div = document.createElement('div');\r\n div.classList.add('sticker-set');\r\n const header = document.createElement('div');\r\n header.classList.add('sticker-set-header');\r\n const details = document.createElement('div');\r\n details.classList.add('sticker-set-details');\r\n details.innerHTML = `\r\n
${richtextprocessor_1.RichTextProcessor.wrapEmojiText(set.title)}
\r\n
${set.count} stickers
\r\n `;\r\n const button = document.createElement('button');\r\n button.classList.add('btn-primary', 'sticker-set-button');\r\n button.innerText = set.installed_date ? 'Added' : 'Add';\r\n // button.style.width = set.installed_date ? '68px' : '52px';\r\n if (set.installed_date) {\r\n button.classList.add('gray');\r\n }\r\n //ripple(button);\r\n header.append(details, button);\r\n const stickersDiv = document.createElement('div');\r\n stickersDiv.classList.add('sticker-set-stickers');\r\n const count = Math.min(5, set.count);\r\n for (let i = 0; i < count; ++i) {\r\n const stickerDiv = document.createElement('div');\r\n stickerDiv.classList.add('sticker-set-sticker');\r\n stickersDiv.append(stickerDiv);\r\n }\r\n appStickersManager_1.default.getStickerSet(set).then(set => {\r\n //console.log('renderSet got set:', set);\r\n for (let i = 0; i < count; ++i) {\r\n const div = stickersDiv.children[i];\r\n const doc = set.documents[i];\r\n if (doc._ == 'documentEmpty') {\r\n continue;\r\n }\r\n wrappers_1.wrapSticker({\r\n doc,\r\n div,\r\n lazyLoadQueue: this.lazyLoadQueue,\r\n group: 'STICKERS-SEARCH',\r\n /* play: false,\r\n loop: false, */\r\n play: true,\r\n loop: true,\r\n width: 68,\r\n height: 68\r\n });\r\n }\r\n });\r\n /* const onMouseOver = () => {\r\n const animations: AnimationItem['animation'][] = [];\r\n for(let i = 0; i < count; ++i) {\r\n const stickerDiv = stickersDiv.children[i] as HTMLElement;\r\n const animationItem = animationIntersector.getAnimation(stickerDiv);\r\n if(!animationItem) continue;\r\n \r\n const animation = animationItem.animation;\r\n \r\n animations.push(animation);\r\n animation.loop = true;\r\n animation.play();\r\n }\r\n \r\n div.addEventListener('mouseout', () => {\r\n animations.forEach(animation => {\r\n animation.loop = false;\r\n });\r\n \r\n div.addEventListener('mouseover', onMouseOver, {once: true});\r\n }, {once: true});\r\n };\r\n \r\n div.addEventListener('mouseover', onMouseOver, {once: true}); */\r\n div.dataset.stickerSet = set.id;\r\n div.dataset.access_hash = set.access_hash;\r\n div.dataset.title = set.title;\r\n div.append(header, stickersDiv);\r\n this.scrollable.append(div);\r\n }\r\n init() {\r\n appSidebarRight_1.default.selectTab(appSidebarRight_1.AppSidebarRight.SLIDERITEMSIDS.stickers);\r\n appSidebarRight_1.default.toggleSidebar(true).then(() => {\r\n this.renderFeatured();\r\n });\r\n }\r\n renderFeatured() {\r\n return appStickersManager_1.default.getFeaturedStickers().then(coveredSets => {\r\n if (this.searchInput.value) {\r\n return;\r\n }\r\n coveredSets = this.filterRendered('', coveredSets);\r\n coveredSets.forEach(set => {\r\n this.renderSet(set.set);\r\n });\r\n });\r\n }\r\n filterRendered(query, coveredSets) {\r\n coveredSets = coveredSets.slice();\r\n const children = Array.from(this.setsDiv.children);\r\n children.forEachReverse(el => {\r\n const id = el.dataset.stickerSet;\r\n const index = coveredSets.findIndex(covered => covered.set.id == id);\r\n if (index !== -1) {\r\n coveredSets.splice(index, 1);\r\n }\r\n else if (!query || !el.dataset.title.toLowerCase().includes(query.toLowerCase())) {\r\n el.remove();\r\n }\r\n });\r\n animationIntersector_1.default.checkAnimations(undefined, 'STICKERS-SEARCH');\r\n return coveredSets;\r\n }\r\n search(query) {\r\n if (!query) {\r\n return this.renderFeatured();\r\n }\r\n return appStickersManager_1.default.searchStickerSets(query, false).then(coveredSets => {\r\n if (this.searchInput.value != query) {\r\n return;\r\n }\r\n //console.log('search result:', coveredSets);\r\n coveredSets = this.filterRendered(query, coveredSets);\r\n coveredSets.forEach(set => {\r\n this.renderSet(set.set);\r\n });\r\n });\r\n }\r\n}\r\nexports.default = AppStickersTab;\r\n" - }, - { - "id": 86, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\pollResults.ts", - "name": "./src/components/sidebarRight/pollResults.ts", - "index": 80, - "index2": 73, - "size": 5816, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "issuerId": 24, - "issuerName": "./src/lib/appManagers/appSidebarRight.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 24, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "name": "./src/lib/appManagers/appSidebarRight.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 1584, - "building": 1606, - "dependencies": 2 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 24, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", - "type": "cjs require", - "userRequest": "../../components/sidebarRight/pollResults", - "loc": "57:38-90" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 4, - "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 scrollable_new_1 = __importDefault(require(\"../scrollable_new\"));\r\nconst appSidebarRight_1 = __importStar(require(\"../../lib/appManagers/appSidebarRight\"));\r\nconst appPollsManager_1 = __importDefault(require(\"../../lib/appManagers/appPollsManager\"));\r\nconst poll_1 = require(\"../poll\");\r\nconst richtextprocessor_1 = require(\"../../lib/richtextprocessor\");\r\nconst appDialogsManager_1 = __importDefault(require(\"../../lib/appManagers/appDialogsManager\"));\r\nconst ripple_1 = require(\"../ripple\");\r\nclass AppPollResultsTab {\r\n constructor() {\r\n this.container = document.getElementById('poll-results-container');\r\n this.contentDiv = this.container.querySelector('.sidebar-content');\r\n this.resultsDiv = this.contentDiv.firstElementChild;\r\n this.scrollable = new scrollable_new_1.default(this.contentDiv, 'y', 'POLL-RESULTS', undefined, undefined, 2);\r\n }\r\n cleanup() {\r\n this.resultsDiv.innerHTML = '';\r\n this.pollID = '';\r\n this.mid = 0;\r\n }\r\n onCloseAfterTimeout() {\r\n this.cleanup();\r\n }\r\n init(pollID, mid) {\r\n if (this.pollID == pollID && this.mid == mid)\r\n return;\r\n this.cleanup();\r\n this.pollID = pollID;\r\n this.mid = mid;\r\n appSidebarRight_1.default.selectTab(appSidebarRight_1.AppSidebarRight.SLIDERITEMSIDS.pollResults);\r\n const poll = appPollsManager_1.default.getPoll(pollID);\r\n const title = document.createElement('h3');\r\n title.innerHTML = poll.poll.rQuestion;\r\n const percents = poll.results.results.map(v => v.voters / poll.results.total_voters * 100);\r\n poll_1.roundPercents(percents);\r\n const fragment = document.createDocumentFragment();\r\n poll.results.results.forEach((result, idx) => {\r\n if (!result.voters)\r\n return;\r\n const hr = document.createElement('hr');\r\n const answer = poll.poll.answers[idx];\r\n // Head\r\n const answerEl = document.createElement('div');\r\n answerEl.classList.add('poll-results-answer');\r\n const answerTitle = document.createElement('div');\r\n answerTitle.innerHTML = richtextprocessor_1.RichTextProcessor.wrapEmojiText(answer.text);\r\n const answerPercents = document.createElement('div');\r\n answerPercents.innerText = Math.round(percents[idx]) + '%';\r\n answerEl.append(answerTitle, answerPercents);\r\n // Humans\r\n const list = document.createElement('ul');\r\n list.classList.add('poll-results-voters');\r\n appDialogsManager_1.default.setListClickListener(list);\r\n list.style.minHeight = Math.min(result.voters, 4) * 50 + 'px';\r\n fragment.append(hr, answerEl, list);\r\n let offset, limit = 4, loading = false, left = result.voters - 4;\r\n const load = () => {\r\n if (loading)\r\n return;\r\n loading = true;\r\n appPollsManager_1.default.getVotes(mid, answer.option, offset, limit).then(votesList => {\r\n votesList.votes.forEach(vote => {\r\n const { dom } = appDialogsManager_1.default.addDialog(vote.user_id, list, false, false, undefined, false);\r\n dom.lastMessageSpan.parentElement.remove();\r\n });\r\n if (offset) {\r\n left -= votesList.votes.length;\r\n showMore.lastElementChild.innerText = `Show ${Math.min(20, left)} more voter${left > 1 ? 's' : ''}`;\r\n }\r\n offset = votesList.next_offset;\r\n limit = 20;\r\n if (!left || !votesList.votes.length) {\r\n showMore.remove();\r\n }\r\n }).finally(() => {\r\n loading = false;\r\n });\r\n };\r\n load();\r\n if (left <= 0)\r\n return;\r\n const showMore = document.createElement('div');\r\n showMore.classList.add('poll-results-more', 'show-more');\r\n showMore.addEventListener('click', load);\r\n showMore.innerHTML = `
Show ${Math.min(20, left)} more voter${left > 1 ? 's' : ''}
`;\r\n ripple_1.ripple(showMore);\r\n fragment.append(showMore);\r\n });\r\n this.resultsDiv.append(title, fragment);\r\n appSidebarRight_1.default.toggleSidebar(true).then(() => {\r\n /* appPollsManager.getVotes(mid).then(votes => {\r\n console.log('gOt VotEs', votes);\r\n }); */\r\n });\r\n }\r\n}\r\nexports.default = AppPollResultsTab;\r\n" - }, - { - "id": 87, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarRight\\gifs.ts", - "name": "./src/components/sidebarRight/gifs.ts", - "index": 81, - "index2": 77, - "size": 6363, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "issuerId": 24, - "issuerName": "./src/lib/appManagers/appSidebarRight.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 24, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "name": "./src/lib/appManagers/appSidebarRight.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 1584, - "building": 1606, - "dependencies": 2 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 24, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", - "type": "cjs require", - "userRequest": "../../components/sidebarRight/gifs", - "loc": "58:31-76" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 4, - "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 searchInput_1 = __importDefault(require(\"../searchInput\"));\r\nconst scrollable_new_1 = __importDefault(require(\"../scrollable_new\"));\r\nconst animationIntersector_1 = __importDefault(require(\"../animationIntersector\"));\r\nconst appSidebarRight_1 = __importStar(require(\"../../lib/appManagers/appSidebarRight\"));\r\nconst appUsersManager_1 = __importDefault(require(\"../../lib/appManagers/appUsersManager\"));\r\nconst AppInlineBotsManager_1 = __importDefault(require(\"../../lib/appManagers/AppInlineBotsManager\"));\r\nconst gifsMasonry_1 = __importDefault(require(\"../gifsMasonry\"));\r\nconst utils_1 = require(\"../../lib/utils\");\r\nconst appImManager_1 = __importDefault(require(\"../../lib/appManagers/appImManager\"));\r\nconst ANIMATIONGROUP = 'GIFS-SEARCH';\r\nclass AppGifsTab {\r\n constructor() {\r\n this.container = document.getElementById('search-gifs-container');\r\n this.contentDiv = this.container.querySelector('.sidebar-content');\r\n this.backBtn = this.container.querySelector('.sidebar-close-button');\r\n this.gifsDiv = this.contentDiv.firstElementChild;\r\n this.nextOffset = '';\r\n this.loadedAll = false;\r\n this.onGifsClick = (e) => {\r\n const target = utils_1.findUpClassName(e.target, 'gif');\r\n if (!target)\r\n return;\r\n const fileID = target.dataset.docID;\r\n if (appImManager_1.default.chatInputC.sendMessageWithDocument(fileID)) {\r\n //this.closeBtn.click();\r\n }\r\n else {\r\n console.warn('got no doc by id:', fileID);\r\n }\r\n };\r\n this.scrollable = new scrollable_new_1.default(this.contentDiv, 'y', ANIMATIONGROUP, undefined, undefined, 2);\r\n this.scrollable.setVirtualContainer(this.gifsDiv);\r\n this.masonry = new gifsMasonry_1.default(this.gifsDiv, ANIMATIONGROUP, this.scrollable);\r\n this.searchInput = new searchInput_1.default('Search GIFs', (value) => {\r\n this.reset();\r\n this.search(value);\r\n });\r\n this.gifsDiv.addEventListener('click', this.onGifsClick);\r\n this.backBtn.parentElement.append(this.searchInput.container);\r\n }\r\n onClose() {\r\n this.scrollable.onScrolledBottom = () => { };\r\n }\r\n onCloseAfterTimeout() {\r\n this.reset();\r\n this.gifsDiv.innerHTML = '';\r\n this.searchInput.value = '';\r\n animationIntersector_1.default.checkAnimations(undefined, ANIMATIONGROUP);\r\n }\r\n reset() {\r\n this.searchPromise = null;\r\n this.nextOffset = '';\r\n this.loadedAll = false;\r\n this.masonry.lazyLoadQueue.clear();\r\n }\r\n init() {\r\n appSidebarRight_1.default.selectTab(appSidebarRight_1.AppSidebarRight.SLIDERITEMSIDS.gifs);\r\n appSidebarRight_1.default.toggleSidebar(true).then(() => {\r\n //this.renderFeatured();\r\n this.search('', true);\r\n this.reset();\r\n this.scrollable.onScrolledBottom = () => {\r\n this.search(this.searchInput.value, false);\r\n };\r\n });\r\n }\r\n search(query, newSearch = true) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (this.searchPromise || this.loadedAll)\r\n return;\r\n if (!this.gifBotPeerID) {\r\n this.gifBotPeerID = (yield appUsersManager_1.default.resolveUsername('gif')).id;\r\n }\r\n try {\r\n this.searchPromise = AppInlineBotsManager_1.default.getInlineResults(0, this.gifBotPeerID, query, this.nextOffset);\r\n const { results, next_offset } = yield this.searchPromise;\r\n if (this.searchInput.value != query) {\r\n return;\r\n }\r\n this.searchPromise = null;\r\n this.nextOffset = next_offset;\r\n if (newSearch) {\r\n this.gifsDiv.innerHTML = '';\r\n }\r\n if (results.length) {\r\n results.forEach((result) => {\r\n if (result._ === 'botInlineMediaResult' && result.document) {\r\n this.masonry.add(result.document);\r\n }\r\n });\r\n }\r\n else {\r\n this.loadedAll = true;\r\n }\r\n this.scrollable.onScroll();\r\n }\r\n catch (err) {\r\n this.searchPromise = null;\r\n throw new Error(JSON.stringify(err));\r\n }\r\n });\r\n }\r\n}\r\nexports.default = AppGifsTab;\r\n" - }, - { - "id": 88, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\newChannel.ts", - "name": "./src/components/sidebarLeft/newChannel.ts", - "index": 86, - "index2": 81, - "size": 3600, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "issuerId": 14, - "issuerName": "./src/lib/appManagers/appSidebarLeft.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 14, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "name": "./src/lib/appManagers/appSidebarLeft.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 1308, - "building": 1919, - "dependencies": 4 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 14, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "module": "./src/lib/appManagers/appSidebarLeft.ts", - "moduleName": "./src/lib/appManagers/appSidebarLeft.ts", - "type": "cjs require", - "userRequest": "../../components/sidebarLeft/newChannel", - "loc": "35:37-87" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 4, - "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 popupAvatar_1 = __importDefault(require(\"../popupAvatar\"));\r\nconst appChatsManager_1 = __importDefault(require(\"../../lib/appManagers/appChatsManager\"));\r\nconst appSidebarLeft_1 = __importStar(require(\"../../lib/appManagers/appSidebarLeft\"));\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_1.default.removeTabFromHistory(appSidebarLeft_1.AppSidebarLeft.SLIDERITEMSIDS.newChannel);\r\n appSidebarLeft_1.default.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\nexports.default = AppNewChannelTab;\r\n" - }, - { - "id": 89, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\cropper.ts", - "name": "./src/lib/cropper.ts", - "index": 88, - "index2": 79, - "size": 7890, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popupAvatar.ts", - "issuerId": 46, - "issuerName": "./src/components/popupAvatar.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 49, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "name": "./src/pages/pageSignIn.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 79, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageAuthCode.ts", - "name": "./src/pages/pageAuthCode.ts", - "profile": { - "factory": 104, - "building": 1053, - "dependencies": 527 - } - }, - { - "id": 80, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignUp.ts", - "name": "./src/pages/pageSignUp.ts", - "profile": { - "factory": 575, - "building": 2297, - "dependencies": 2 - } - }, - { - "id": 46, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popupAvatar.ts", - "name": "./src/components/popupAvatar.ts", - "profile": { - "factory": 4426, - "building": 735, - "dependencies": 0 - } - } - ], - "profile": { - "factory": 1359, - "building": 741 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 46, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 90, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\addMembers.ts", - "name": "./src/components/sidebarLeft/addMembers.ts", - "index": 89, - "index2": 82, - "size": 3413, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "issuerId": 14, - "issuerName": "./src/lib/appManagers/appSidebarLeft.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 14, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "name": "./src/lib/appManagers/appSidebarLeft.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 1308, - "building": 1919, - "dependencies": 4 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 14, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "module": "./src/lib/appManagers/appSidebarLeft.ts", - "moduleName": "./src/lib/appManagers/appSidebarLeft.ts", - "type": "cjs require", - "userRequest": "../../components/sidebarLeft/addMembers", - "loc": "36:37-87" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 4, - "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 appSelectPeers_1 = require(\"../appSelectPeers\");\r\nconst misc_1 = require(\"../misc\");\r\nconst appChatsManager_1 = __importDefault(require(\"../../lib/appManagers/appChatsManager\"));\r\nconst appSidebarLeft_1 = __importStar(require(\"../../lib/appManagers/appSidebarLeft\"));\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 if (this.skippable) {\r\n this.backBtn.click();\r\n return;\r\n }\r\n const 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, skippable, takeOut) {\r\n this.peerID = Math.abs(id);\r\n this.peerType = type;\r\n this.takeOut = takeOut;\r\n this.skippable = skippable;\r\n this.onCloseAfterTimeout();\r\n this.selector = new appSelectPeers_1.AppSelectPeers(this.contentDiv, skippable ? null : (length) => {\r\n this.nextBtn.classList.toggle('is-visible', !!length);\r\n }, ['contacts']);\r\n this.nextBtn.innerHTML = '';\r\n this.nextBtn.disabled = false;\r\n this.nextBtn.classList.add('tgico-next');\r\n this.nextBtn.classList.toggle('is-visible', skippable);\r\n appSidebarLeft_1.default.selectTab(appSidebarLeft_1.AppSidebarLeft.SLIDERITEMSIDS.addMembers);\r\n }\r\n}\r\nexports.default = AppAddMembersTab;\r\n" - }, - { - "id": 91, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\contacts.ts", - "name": "./src/components/sidebarLeft/contacts.ts", - "index": 90, - "index2": 83, - "size": 5220, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "issuerId": 14, - "issuerName": "./src/lib/appManagers/appSidebarLeft.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 14, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "name": "./src/lib/appManagers/appSidebarLeft.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 1308, - "building": 1919, - "dependencies": 4 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 14, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "module": "./src/lib/appManagers/appSidebarLeft.ts", - "moduleName": "./src/lib/appManagers/appSidebarLeft.ts", - "type": "cjs require", - "userRequest": "../../components/sidebarLeft/contacts", - "loc": "37:35-83" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 4, - "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 scrollable_new_1 = __importDefault(require(\"../scrollable_new\"));\r\nconst appDialogsManager_1 = __importDefault(require(\"../../lib/appManagers/appDialogsManager\"));\r\nconst appUsersManager_1 = __importDefault(require(\"../../lib/appManagers/appUsersManager\"));\r\nconst appPhotosManager_1 = __importDefault(require(\"../../lib/appManagers/appPhotosManager\"));\r\nconst appSidebarLeft_1 = __importStar(require(\"../../lib/appManagers/appSidebarLeft\"));\r\nconst utils_1 = require(\"../../lib/utils\");\r\nconst searchInput_1 = __importDefault(require(\"../searchInput\"));\r\n// TODO: поиск по людям глобальный, если не нашло в контактах никого\r\nclass AppContactsTab {\r\n constructor() {\r\n this.container = document.getElementById('contacts-container');\r\n this.list = this.container.querySelector('#contacts');\r\n appDialogsManager_1.default.setListClickListener(this.list);\r\n this.scrollable = new scrollable_new_1.default(this.list.parentElement);\r\n this.searchInput = new searchInput_1.default('Search', (value) => {\r\n this.list.innerHTML = '';\r\n this.openContacts(value);\r\n });\r\n this.container.firstElementChild.append(this.searchInput.container);\r\n // preload contacts\r\n // appUsersManager.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.searchInput.value = '';\r\n }\r\n openContacts(query) {\r\n if (appSidebarLeft_1.default.historyTabIDs.indexOf(appSidebarLeft_1.AppSidebarLeft.SLIDERITEMSIDS.contacts) === -1) {\r\n appSidebarLeft_1.default.selectTab(appSidebarLeft_1.AppSidebarLeft.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_1.default.historyTabIDs[appSidebarLeft_1.default.historyTabIDs.length - 1] != appSidebarLeft_1.AppSidebarLeft.SLIDERITEMSIDS.contacts) {\r\n console.warn('user closed contacts before it\\'s loaded');\r\n return;\r\n }\r\n const contacts = [..._contacts];\r\n if (!query) {\r\n contacts.findAndSplice(u => u == utils_1.$rootScope.myID);\r\n }\r\n /* if(query && 'saved messages'.includes(query.toLowerCase())) {\r\n contacts.unshift($rootScope.myID);\r\n } */\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' ? `${status}` : 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\nexports.default = AppContactsTab;\r\n" - }, - { - "id": 92, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\newGroup.ts", - "name": "./src/components/sidebarLeft/newGroup.ts", - "index": 91, - "index2": 84, - "size": 4686, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "issuerId": 14, - "issuerName": "./src/lib/appManagers/appSidebarLeft.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 14, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "name": "./src/lib/appManagers/appSidebarLeft.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 1308, - "building": 1919, - "dependencies": 4 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 14, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "module": "./src/lib/appManagers/appSidebarLeft.ts", - "moduleName": "./src/lib/appManagers/appSidebarLeft.ts", - "type": "cjs require", - "userRequest": "../../components/sidebarLeft/newGroup", - "loc": "38:35-83" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 4, - "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 appSearch_1 = require(\"../appSearch\");\r\nconst popupAvatar_1 = __importDefault(require(\"../popupAvatar\"));\r\nconst appChatsManager_1 = __importDefault(require(\"../../lib/appManagers/appChatsManager\"));\r\nconst appSidebarLeft_1 = __importStar(require(\"../../lib/appManagers/appSidebarLeft\"));\r\nconst scrollable_new_1 = __importDefault(require(\"../scrollable_new\"));\r\nconst appDialogsManager_1 = __importDefault(require(\"../../lib/appManagers/appDialogsManager\"));\r\nconst appUsersManager_1 = __importDefault(require(\"../../lib/appManagers/appUsersManager\"));\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 const value = this.groupNameInput.value;\r\n this.nextBtn.classList.toggle('is-visible', !!value.length);\r\n });\r\n this.nextBtn.addEventListener('click', () => {\r\n const 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_1.default.selectTab(0);\r\n });\r\n });\r\n const chatsContainer = document.createElement('div');\r\n chatsContainer.classList.add('chats-container');\r\n chatsContainer.append(this.searchGroup.container);\r\n const 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 const 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 this.searchGroup.clear();\r\n }\r\n init(userIDs) {\r\n this.userIDs = userIDs;\r\n appSidebarLeft_1.default.selectTab(appSidebarLeft_1.AppSidebarLeft.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 = `${subtitle}`;\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\nexports.default = AppNewGroupTab;\r\n" - }, - { - "id": 93, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\settings.ts", - "name": "./src/components/sidebarLeft/settings.ts", - "index": 92, - "index2": 85, - "size": 3061, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "issuerId": 14, - "issuerName": "./src/lib/appManagers/appSidebarLeft.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 14, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "name": "./src/lib/appManagers/appSidebarLeft.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 1308, - "building": 1919, - "dependencies": 4 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 14, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "module": "./src/lib/appManagers/appSidebarLeft.ts", - "moduleName": "./src/lib/appManagers/appSidebarLeft.ts", - "type": "cjs require", - "userRequest": "../../components/sidebarLeft/settings", - "loc": "39:35-83" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 4, - "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(\"../misc\");\r\nconst utils_1 = require(\"../../lib/utils\");\r\nconst mtprotoworker_1 = __importDefault(require(\"../../lib/mtproto/mtprotoworker\"));\r\nconst appSidebarLeft_1 = __importStar(require(\"../../lib/appManagers/appSidebarLeft\"));\r\nconst appUsersManager_1 = __importDefault(require(\"../../lib/appManagers/appUsersManager\"));\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().finally(() => {\r\n localStorage.clear();\r\n location.reload();\r\n });\r\n });\r\n this.buttons.edit.addEventListener('click', () => {\r\n appSidebarLeft_1.default.editProfileTab.fillElements();\r\n appSidebarLeft_1.default.selectTab(appSidebarLeft_1.AppSidebarLeft.SLIDERITEMSIDS.editProfile);\r\n });\r\n this.buttons.folders.addEventListener('click', () => {\r\n appSidebarLeft_1.default.selectTab(appSidebarLeft_1.AppSidebarLeft.SLIDERITEMSIDS.chatFolders);\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\nexports.default = AppSettingsTab;\r\n" - }, - { - "id": 94, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\editProfile.ts", - "name": "./src/components/sidebarLeft/editProfile.ts", - "index": 93, - "index2": 86, - "size": 8926, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "issuerId": 14, - "issuerName": "./src/lib/appManagers/appSidebarLeft.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 14, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "name": "./src/lib/appManagers/appSidebarLeft.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 1308, - "building": 1919, - "dependencies": 4 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 14, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "module": "./src/lib/appManagers/appSidebarLeft.ts", - "moduleName": "./src/lib/appManagers/appSidebarLeft.ts", - "type": "cjs require", - "userRequest": "../../components/sidebarLeft/editProfile", - "loc": "40:38-89" - } - ], - "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 popupAvatar_1 = __importDefault(require(\"../popupAvatar\"));\r\nconst mtprotoworker_1 = __importDefault(require(\"../../lib/mtproto/mtprotoworker\"));\r\nconst appProfileManager_1 = __importDefault(require(\"../../lib/appManagers/appProfileManager\"));\r\nconst appSidebarLeft_1 = __importDefault(require(\"../../lib/appManagers/appSidebarLeft\"));\r\nconst scrollable_new_1 = __importDefault(require(\"../scrollable_new\"));\r\nconst appUsersManager_1 = __importDefault(require(\"../../lib/appManagers/appUsersManager\"));\r\nconst utils_1 = require(\"../../lib/utils\");\r\n// TODO: аватарка не поменяется в этой вкладке после изменения почему-то (если поставить в другом клиенте, и потом тут проверить, для этого ещё вышел в чатлист)\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_1.default.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\nexports.default = AppEditProfileTab;\r\n" - }, - { - "id": 95, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\chatFolders.ts", - "name": "./src/components/sidebarLeft/chatFolders.ts", - "index": 94, - "index2": 87, - "size": 8187, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "issuerId": 14, - "issuerName": "./src/lib/appManagers/appSidebarLeft.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 14, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "name": "./src/lib/appManagers/appSidebarLeft.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 1308, - "building": 1919, - "dependencies": 4 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 14, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "module": "./src/lib/appManagers/appSidebarLeft.ts", - "moduleName": "./src/lib/appManagers/appSidebarLeft.ts", - "type": "cjs require", - "userRequest": "../../components/sidebarLeft/chatFolders", - "loc": "41:38-89" - } - ], - "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 lottieLoader_1 = __importDefault(require(\"../../lib/lottieLoader\"));\r\nconst mtprotoworker_1 = __importDefault(require(\"../../lib/mtproto/mtprotoworker\"));\r\nconst appMessagesManager_1 = __importDefault(require(\"../../lib/appManagers/appMessagesManager\"));\r\nconst richtextprocessor_1 = require(\"../../lib/richtextprocessor\");\r\nconst appPeersManager_1 = __importDefault(require(\"../../lib/appManagers/appPeersManager\"));\r\nconst utils_1 = require(\"../../lib/utils\");\r\nconst appSidebarLeft_1 = __importDefault(require(\"../../lib/appManagers/appSidebarLeft\"));\r\nconst ripple_1 = require(\"../ripple\");\r\nconst toast_1 = require(\"../toast\");\r\nclass AppChatFoldersTab {\r\n constructor() {\r\n this.filtersRendered = {};\r\n }\r\n renderFolder(dialogFilter, container, div = document.createElement('div')) {\r\n let filter;\r\n let description = '';\r\n let d = [];\r\n if (dialogFilter._ == 'dialogFilterSuggested') {\r\n filter = dialogFilter.filter;\r\n description = dialogFilter.description;\r\n }\r\n else {\r\n filter = dialogFilter;\r\n description = '';\r\n const filterID = filter.id;\r\n if (!this.filtersRendered.hasOwnProperty(filter.id)) {\r\n div.addEventListener('click', () => {\r\n appSidebarLeft_1.default.editFolderTab.open(appMessagesManager_1.default.filtersStorage.filters[filterID]);\r\n });\r\n }\r\n this.filtersRendered[filter.id] = div;\r\n let enabledFilters = Object.keys(filter.pFlags).length;\r\n /* (['include_peers', 'exclude_peers'] as ['include_peers', 'exclude_peers']).forEach(key => {\r\n enabledFilters += +!!filter[key].length;\r\n }); */\r\n if (enabledFilters == 1) {\r\n description = 'All ';\r\n const pFlags = filter.pFlags;\r\n if (pFlags.contacts)\r\n description += 'Contacts';\r\n else if (pFlags.non_contacts)\r\n description += 'Non-Contacts';\r\n else if (pFlags.groups)\r\n description += 'Groups';\r\n else if (pFlags.broadcasts)\r\n description += 'Channels';\r\n else if (pFlags.bots)\r\n description += 'Bots';\r\n else if (pFlags.exclude_muted)\r\n description += 'Unmuted';\r\n else if (pFlags.exclude_read)\r\n description += 'Unread';\r\n else if (pFlags.exclude_archived)\r\n description += 'Unarchived';\r\n d.push(description);\r\n }\r\n else {\r\n const folder = appMessagesManager_1.default.dialogsStorage.getFolder(filter.id);\r\n let chats = 0, channels = 0, groups = 0;\r\n for (const dialog of folder) {\r\n if (appPeersManager_1.default.isAnyGroup(dialog.peerID))\r\n groups++;\r\n else if (appPeersManager_1.default.isBroadcast(dialog.peerID))\r\n channels++;\r\n else\r\n chats++;\r\n }\r\n if (chats)\r\n d.push(chats + ' chats');\r\n if (channels)\r\n d.push(channels + ' channels');\r\n if (groups)\r\n d.push(groups + ' groups');\r\n }\r\n }\r\n div.classList.add('category', 'rp-square');\r\n div.innerHTML = `\r\n
\r\n

${richtextprocessor_1.RichTextProcessor.wrapEmojiText(filter.title)}

\r\n

${d.length ? d.join(', ') : description}

\r\n
\r\n `;\r\n ripple_1.ripple(div);\r\n if (container)\r\n container.append(div);\r\n return div;\r\n }\r\n init() {\r\n this.container = document.querySelector('.chat-folders-container');\r\n this.stickerContainer = this.container.querySelector('.sticker-container');\r\n this.foldersContainer = this.container.querySelector('.folders-my');\r\n this.suggestedContainer = this.container.querySelector('.folders-suggested');\r\n this.createFolderBtn = this.container.querySelector('.btn-create-folder');\r\n this.createFolderBtn.addEventListener('click', () => {\r\n if (Object.keys(this.filtersRendered).length >= 10) {\r\n toast_1.toast('Sorry, you can\\'t create more folders.');\r\n }\r\n else {\r\n appSidebarLeft_1.default.editFolderTab.open();\r\n }\r\n });\r\n lottieLoader_1.default.loadAnimationFromURL({\r\n container: this.stickerContainer,\r\n loop: false,\r\n autoplay: true,\r\n width: 86,\r\n height: 86\r\n }, 'assets/img/Folders_1.tgs').then(player => {\r\n this.animation = player;\r\n });\r\n appMessagesManager_1.default.filtersStorage.getDialogFilters().then(filters => {\r\n for (const filterID in filters) {\r\n const filter = filters[filterID];\r\n this.renderFolder(filter, this.foldersContainer);\r\n }\r\n });\r\n utils_1.$rootScope.$on('filter_update', (e) => {\r\n const filter = e.detail;\r\n if (this.filtersRendered.hasOwnProperty(filter.id)) {\r\n this.renderFolder(filter, null, this.filtersRendered[filter.id]);\r\n }\r\n else {\r\n this.renderFolder(filter, this.foldersContainer);\r\n }\r\n this.getSuggestedFilters();\r\n });\r\n utils_1.$rootScope.$on('filter_delete', (e) => {\r\n const filter = e.detail;\r\n if (this.filtersRendered.hasOwnProperty(filter.id)) {\r\n /* for(const suggested of this.suggestedFilters) {\r\n if(deepEqual(suggested.filter, filter)) {\r\n \r\n }\r\n } */\r\n this.getSuggestedFilters();\r\n this.filtersRendered[filter.id].remove();\r\n delete this.filtersRendered[filter.id];\r\n }\r\n });\r\n this.getSuggestedFilters();\r\n }\r\n getSuggestedFilters() {\r\n mtprotoworker_1.default.invokeApi('messages.getSuggestedDialogFilters').then(suggestedFilters => {\r\n this.suggestedContainer.style.display = suggestedFilters.length ? '' : 'none';\r\n Array.from(this.suggestedContainer.children).slice(1).forEach(el => el.remove());\r\n suggestedFilters.forEach(filter => {\r\n const div = this.renderFolder(filter);\r\n const button = document.createElement('button');\r\n button.classList.add('btn-primary');\r\n button.innerText = 'Add';\r\n div.append(button);\r\n this.suggestedContainer.append(div);\r\n button.addEventListener('click', (e) => {\r\n utils_1.cancelEvent(e);\r\n if (Object.keys(this.filtersRendered).length >= 10) {\r\n toast_1.toast('Sorry, you can\\'t create more folders.');\r\n return;\r\n }\r\n button.setAttribute('disabled', 'true');\r\n appMessagesManager_1.default.filtersStorage.createDialogFilter(filter.filter).then(bool => {\r\n if (bool) {\r\n div.remove();\r\n }\r\n }).finally(() => {\r\n button.removeAttribute('disabled');\r\n });\r\n });\r\n });\r\n });\r\n }\r\n onOpen() {\r\n if (this.init) {\r\n this.init();\r\n this.init = null;\r\n }\r\n else {\r\n if (this.animation) {\r\n this.animation.restart();\r\n }\r\n }\r\n }\r\n}\r\nexports.default = AppChatFoldersTab;\r\n" - }, - { - "id": 96, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\editFolder.ts", - "name": "./src/components/sidebarLeft/editFolder.ts", - "index": 95, - "index2": 88, - "size": 10311, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "issuerId": 14, - "issuerName": "./src/lib/appManagers/appSidebarLeft.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 14, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "name": "./src/lib/appManagers/appSidebarLeft.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 1308, - "building": 1919, - "dependencies": 4 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 14, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "module": "./src/lib/appManagers/appSidebarLeft.ts", - "moduleName": "./src/lib/appManagers/appSidebarLeft.ts", - "type": "cjs require", - "userRequest": "../../components/sidebarLeft/editFolder", - "loc": "42:37-87" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 4, - "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 appSidebarLeft_1 = __importStar(require(\"../../lib/appManagers/appSidebarLeft\"));\r\nconst lottieLoader_1 = __importDefault(require(\"../../lib/lottieLoader\"));\r\nconst appMessagesManager_1 = __importDefault(require(\"../../lib/appManagers/appMessagesManager\"));\r\nconst misc_1 = require(\"../misc\");\r\nconst appDialogsManager_1 = __importDefault(require(\"../../lib/appManagers/appDialogsManager\"));\r\nconst utils_1 = require(\"../../lib/utils\");\r\nconst toast_1 = require(\"../toast\");\r\nconst ripple_1 = require(\"../ripple\");\r\nconst MAX_FOLDER_NAME_LENGTH = 12;\r\nclass AppEditFolderTab {\r\n constructor() {\r\n this.flags = {};\r\n }\r\n init() {\r\n this.container = document.querySelector('.edit-folder-container');\r\n this.closeBtn = this.container.querySelector('.sidebar-close-button');\r\n this.title = this.container.querySelector('.sidebar-header__title');\r\n this.caption = this.container.querySelector('.caption');\r\n this.stickerContainer = this.container.querySelector('.sticker-container');\r\n this.confirmBtn = this.container.querySelector('.btn-confirm');\r\n this.menuBtn = this.container.querySelector('.btn-menu-toggle');\r\n this.deleteFolderBtn = this.menuBtn.querySelector('.menu-delete');\r\n this.nameInput = this.container.querySelector('#folder-name');\r\n this.include_peers = this.container.querySelector('.folder-list-included');\r\n this.exclude_peers = this.container.querySelector('.folder-list-excluded');\r\n const includedFlagsContainer = this.include_peers.querySelector('.folder-categories');\r\n const excludedFlagsContainer = this.exclude_peers.querySelector('.folder-categories');\r\n misc_1.parseMenuButtonsTo(this.flags, includedFlagsContainer.children);\r\n misc_1.parseMenuButtonsTo(this.flags, excludedFlagsContainer.children);\r\n includedFlagsContainer.firstElementChild.addEventListener('click', () => {\r\n appSidebarLeft_1.default.includedChatsTab.open(this.filter, 'included');\r\n });\r\n excludedFlagsContainer.firstElementChild.addEventListener('click', () => {\r\n appSidebarLeft_1.default.includedChatsTab.open(this.filter, 'excluded');\r\n });\r\n lottieLoader_1.default.loadAnimationFromURL({\r\n container: this.stickerContainer,\r\n loop: true,\r\n autoplay: true,\r\n width: 86,\r\n height: 86\r\n }, 'assets/img/Folders_2.tgs').then(player => {\r\n this.animation = player;\r\n });\r\n this.deleteFolderBtn.addEventListener('click', () => {\r\n this.deleteFolderBtn.setAttribute('disabled', 'true');\r\n appMessagesManager_1.default.filtersStorage.updateDialogFilter(this.filter, true).then(bool => {\r\n if (bool) {\r\n this.closeBtn.click();\r\n }\r\n }).finally(() => {\r\n this.deleteFolderBtn.removeAttribute('disabled');\r\n });\r\n });\r\n this.confirmBtn.addEventListener('click', () => {\r\n if (!this.nameInput.value.trim()) {\r\n this.nameInput.classList.add('error');\r\n return;\r\n }\r\n let include = Array.from(includedFlagsContainer.children).slice(1).reduce((acc, el) => acc + +!el.style.display, 0);\r\n if (this.include_peers.lastElementChild.tagName == 'UL') {\r\n include += this.include_peers.lastElementChild.childElementCount;\r\n }\r\n if (!include) {\r\n toast_1.toast('Please choose at least one chat for this folder.');\r\n return;\r\n }\r\n this.confirmBtn.setAttribute('disabled', 'true');\r\n let promise;\r\n if (!this.filter.id) {\r\n promise = appMessagesManager_1.default.filtersStorage.createDialogFilter(this.filter);\r\n }\r\n else {\r\n promise = appMessagesManager_1.default.filtersStorage.updateDialogFilter(this.filter);\r\n }\r\n promise.then(bool => {\r\n if (bool) {\r\n this.closeBtn.click();\r\n }\r\n }).catch(err => {\r\n if (err.type == 'DIALOG_FILTERS_TOO_MUCH') {\r\n toast_1.toast('Sorry, you can\\'t create more folders.');\r\n }\r\n else {\r\n console.error('updateDialogFilter error:', err);\r\n }\r\n }).finally(() => {\r\n this.confirmBtn.removeAttribute('disabled');\r\n });\r\n });\r\n this.nameInput.addEventListener('input', () => {\r\n if (this.nameInput.value.length > MAX_FOLDER_NAME_LENGTH) {\r\n this.nameInput.value = this.nameInput.value.slice(0, MAX_FOLDER_NAME_LENGTH);\r\n return;\r\n }\r\n this.filter.title = this.nameInput.value;\r\n this.nameInput.classList.remove('error');\r\n this.editCheckForChange();\r\n });\r\n }\r\n onOpen() {\r\n if (this.init) {\r\n this.init();\r\n this.init = null;\r\n }\r\n else {\r\n if (this.animation) {\r\n this.animation.restart();\r\n }\r\n }\r\n }\r\n onCloseAfterTimeout() {\r\n Array.from(this.container.querySelectorAll('ul, .show-more')).forEach(el => el.remove());\r\n }\r\n onCreateOpen() {\r\n this.caption.style.display = '';\r\n this.title.innerText = 'New Folder';\r\n this.menuBtn.classList.add('hide');\r\n this.confirmBtn.classList.remove('hide');\r\n this.nameInput.value = '';\r\n for (const flag in this.flags) {\r\n // @ts-ignore\r\n this.flags[flag].style.display = 'none';\r\n }\r\n }\r\n onEditOpen() {\r\n this.caption.style.display = 'none';\r\n this.title.innerText = this.type == 'create' ? 'New Folder' : 'Edit Folder';\r\n if (this.type == 'edit') {\r\n this.menuBtn.classList.remove('hide');\r\n this.confirmBtn.classList.add('hide');\r\n }\r\n const filter = this.filter;\r\n this.nameInput.value = filter.title;\r\n for (const flag in this.flags) {\r\n // @ts-ignore\r\n this.flags[flag].style.display = !!filter.pFlags[flag] ? '' : 'none';\r\n }\r\n ['include_peers', 'exclude_peers'].forEach(key => {\r\n const container = this[key];\r\n const ul = document.createElement('ul');\r\n const peers = filter[key].slice();\r\n const renderMore = (_length) => {\r\n for (let i = 0, length = Math.min(peers.length, _length); i < length; ++i) {\r\n const peerID = peers.shift();\r\n const { dom } = appDialogsManager_1.default.addDialog(peerID, ul, false, false, undefined, true);\r\n dom.lastMessageSpan.parentElement.remove();\r\n }\r\n if (peers.length) {\r\n showMore.innerHTML = `
Show ${Math.min(20, peers.length)} more chat${peers.length > 1 ? 's' : ''}
`;\r\n }\r\n else if (showMore) {\r\n showMore.remove();\r\n }\r\n };\r\n container.append(ul);\r\n let showMore;\r\n if (peers.length) {\r\n showMore = document.createElement('div');\r\n showMore.classList.add('show-more');\r\n showMore.addEventListener('click', () => renderMore(20));\r\n showMore.innerHTML = `
Show ${Math.min(20, peers.length)} more chat${peers.length > 1 ? 's' : ''}
`;\r\n ripple_1.ripple(showMore);\r\n container.append(showMore);\r\n }\r\n renderMore(4);\r\n });\r\n }\r\n editCheckForChange() {\r\n if (this.type == 'edit') {\r\n const changed = !utils_1.deepEqual(this.originalFilter, this.filter);\r\n this.confirmBtn.classList.toggle('hide', !changed);\r\n this.menuBtn.classList.toggle('hide', changed);\r\n }\r\n }\r\n ;\r\n setFilter(filter, firstTime) {\r\n // cleanup\r\n this.onCloseAfterTimeout();\r\n if (firstTime) {\r\n this.originalFilter = filter;\r\n this.filter = utils_1.copy(filter);\r\n }\r\n else {\r\n this.filter = filter;\r\n this.onEditOpen();\r\n this.editCheckForChange();\r\n }\r\n }\r\n open(filter) {\r\n appSidebarLeft_1.default.selectTab(appSidebarLeft_1.AppSidebarLeft.SLIDERITEMSIDS.editFolder);\r\n if (filter === undefined) {\r\n this.setFilter({\r\n _: 'dialogFilter',\r\n flags: 0,\r\n id: 0,\r\n title: '',\r\n pFlags: {},\r\n pinned_peers: [],\r\n include_peers: [],\r\n exclude_peers: []\r\n }, true);\r\n this.type = 'create';\r\n this.onCreateOpen();\r\n }\r\n else {\r\n this.setFilter(filter, true);\r\n this.type = 'edit';\r\n this.onEditOpen();\r\n }\r\n }\r\n}\r\nexports.default = AppEditFolderTab;\r\n" - }, - { - "id": 97, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\sidebarLeft\\includedChats.ts", - "name": "./src/components/sidebarLeft/includedChats.ts", - "index": 96, - "index2": 89, - "size": 8766, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "issuerId": 14, - "issuerName": "./src/lib/appManagers/appSidebarLeft.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 14, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "name": "./src/lib/appManagers/appSidebarLeft.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 1308, - "building": 1919, - "dependencies": 4 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 14, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", - "module": "./src/lib/appManagers/appSidebarLeft.ts", - "moduleName": "./src/lib/appManagers/appSidebarLeft.ts", - "type": "cjs require", - "userRequest": "../../components/sidebarLeft/includedChats", - "loc": "43:40-93" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 4, - "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 appSelectPeers_1 = require(\"../appSelectPeers\");\r\nconst appSidebarLeft_1 = __importStar(require(\"../../lib/appManagers/appSidebarLeft\"));\r\nconst appDialogsManager_1 = __importDefault(require(\"../../lib/appManagers/appDialogsManager\"));\r\nconst appPeersManager_1 = __importDefault(require(\"../../lib/appManagers/appPeersManager\"));\r\nconst appUsersManager_1 = __importDefault(require(\"../../lib/appManagers/appUsersManager\"));\r\nconst utils_1 = require(\"../../lib/utils\");\r\nclass AppIncludedChatsTab {\r\n constructor() {\r\n this.renderResults = (peerIDs) => {\r\n const other = this.type == 'included' ? this.filter.exclude_peers : this.filter.include_peers;\r\n peerIDs.forEach(peerID => {\r\n if (other.includes(peerID))\r\n return;\r\n const { dom } = appDialogsManager_1.default.addDialog(peerID, this.selector.scrollable, false, false);\r\n const selected = this.selector.selected.has(peerID);\r\n dom.containerEl.insertAdjacentHTML('beforeend', this.checkbox(selected));\r\n if (selected)\r\n dom.listEl.classList.add('active');\r\n let subtitle = '';\r\n if (peerID > 0) {\r\n if (peerID == utils_1.$rootScope.myID) {\r\n subtitle = 'Chat with yourself';\r\n }\r\n else if (appUsersManager_1.default.isBot(peerID)) {\r\n subtitle = 'Bot';\r\n }\r\n else {\r\n subtitle = appUsersManager_1.default.contactsList.has(peerID) ? 'Contact' : 'Non-Contact';\r\n }\r\n }\r\n else {\r\n subtitle = appPeersManager_1.default.isBroadcast(peerID) ? 'Channel' : 'Group';\r\n }\r\n dom.lastMessageSpan.innerHTML = subtitle;\r\n });\r\n };\r\n this.onSelectChange = (length) => {\r\n //const changed = !deepEqual(this.filter, this.originalFilter);\r\n if (this.type == 'included') {\r\n this.confirmBtn.style.display = length ? '' : 'none';\r\n }\r\n };\r\n }\r\n init() {\r\n this.container = document.querySelector('.included-chats-container');\r\n this.closeBtn = this.container.querySelector('.sidebar-close-button');\r\n this.confirmBtn = this.container.querySelector('.btn-confirm');\r\n this.title = this.container.querySelector('.sidebar-header__title');\r\n this.confirmBtn.addEventListener('click', () => {\r\n const selected = this.selector.getSelected();\r\n //this.filter.pFlags = {};\r\n if (this.type == 'included') {\r\n for (const key in this.filter.pFlags) {\r\n if (key.indexOf('exclude_') === 0) {\r\n continue;\r\n }\r\n // @ts-ignore\r\n delete this.filter.pFlags[key];\r\n }\r\n }\r\n else {\r\n for (const key in this.filter.pFlags) {\r\n if (key.indexOf('exclude_') !== 0) {\r\n continue;\r\n }\r\n // @ts-ignore\r\n delete this.filter.pFlags[key];\r\n }\r\n }\r\n const peers = [];\r\n for (const key of selected) {\r\n if (typeof (key) === 'number') {\r\n peers.push(key);\r\n }\r\n else {\r\n // @ts-ignore\r\n this.filter.pFlags[key] = true;\r\n }\r\n }\r\n this.filter[this.type == 'included' ? 'include_peers' : 'exclude_peers'] = peers;\r\n appSidebarLeft_1.default.editFolderTab.setFilter(this.filter, false);\r\n this.closeBtn.click();\r\n });\r\n }\r\n checkbox(selected) {\r\n return `
`;\r\n }\r\n onOpen() {\r\n if (this.init) {\r\n this.init();\r\n this.init = null;\r\n }\r\n this.confirmBtn.style.display = this.type == 'excluded' ? '' : 'none';\r\n this.title.innerText = this.type == 'included' ? 'Included Chats' : 'Excluded Chats';\r\n const filter = this.filter;\r\n const fragment = document.createDocumentFragment();\r\n const dd = document.createElement('div');\r\n dd.classList.add('sidebar-left-h2');\r\n dd.innerText = 'Chat types';\r\n const categories = document.createElement('div');\r\n categories.classList.add('folder-categories');\r\n let details;\r\n if (this.type == 'excluded') {\r\n details = {\r\n exclude_muted: { ico: 'tgico-mute', text: 'Muted' },\r\n exclude_archived: { ico: 'tgico-archive', text: 'Archived' },\r\n exclude_read: { ico: 'tgico-readchats', text: 'Read' }\r\n };\r\n }\r\n else {\r\n details = {\r\n contacts: { ico: 'tgico-newprivate', text: 'Contacts' },\r\n non_contacts: { ico: 'tgico-noncontacts', text: 'Non-Contacts' },\r\n groups: { ico: 'tgico-group', text: 'Groups' },\r\n broadcasts: { ico: 'tgico-newchannel', text: 'Channels' },\r\n bots: { ico: 'tgico-bots', text: 'Bots' }\r\n };\r\n }\r\n let html = '';\r\n for (const key in details) {\r\n html += `

${details[key].text}

${this.checkbox()}
`;\r\n }\r\n categories.innerHTML = html;\r\n const hr = document.createElement('hr');\r\n hr.style.margin = '7px 0 9px';\r\n const d = document.createElement('div');\r\n d.classList.add('sidebar-left-h2');\r\n d.innerText = 'Chats';\r\n fragment.append(dd, categories, hr, d);\r\n /////////////////\r\n const selectedPeers = (this.type == 'included' ? filter.include_peers : filter.exclude_peers).slice();\r\n this.selector = new appSelectPeers_1.AppSelectPeers(this.container, this.onSelectChange, ['dialogs'], null, this.renderResults);\r\n this.selector.selected = new Set(selectedPeers);\r\n this.selector.input.placeholder = 'Search';\r\n const _add = this.selector.add.bind(this.selector);\r\n this.selector.add = (peerID, title) => {\r\n var _a;\r\n const div = _add(peerID, (_a = details[peerID]) === null || _a === void 0 ? void 0 : _a.text);\r\n if (details[peerID]) {\r\n div.querySelector('avatar-element').classList.add(details[peerID].ico);\r\n }\r\n return div;\r\n };\r\n this.selector.list.parentElement.insertBefore(fragment, this.selector.list);\r\n selectedPeers.forEach(peerID => {\r\n this.selector.add(peerID);\r\n });\r\n for (const flag in filter.pFlags) {\r\n // @ts-ignore\r\n if (details.hasOwnProperty(flag) && !!filter.pFlags[flag]) {\r\n categories.querySelector(`[data-peerID=\"${flag}\"]`).click();\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 open(filter, type) {\r\n this.originalFilter = filter;\r\n this.filter = utils_1.copy(this.originalFilter);\r\n this.type = type;\r\n appSidebarLeft_1.default.selectTab(appSidebarLeft_1.AppSidebarLeft.SLIDERITEMSIDS.includedChats);\r\n }\r\n}\r\nexports.default = AppIncludedChatsTab;\r\n" - }, - { - "id": 98, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\input.ts", - "name": "./src/components/chat/input.ts", - "index": 97, - "index2": 98, - "size": 33710, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "../../components/chat/input", - "loc": "25:16-54" - } - ], - "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.ChatInput = void 0;\r\nconst scrollable_new_1 = __importDefault(require(\"../scrollable_new\"));\r\nconst richtextprocessor_1 = require(\"../../lib/richtextprocessor\");\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 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\nconst config_1 = require(\"../../lib/config\");\r\nconst appDocsManager_1 = __importDefault(require(\"../../lib/appManagers/appDocsManager\"));\r\nconst emoticonsDropdown_1 = __importDefault(require(\"../emoticonsDropdown\"));\r\nconst popupCreatePoll_1 = __importDefault(require(\"../popupCreatePoll\"));\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.lastUrl = '';\r\n this.lastTimeType = 0;\r\n this.inputContainer = this.btnSend.parentElement.parentElement;\r\n this.chatInput = this.inputContainer.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.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.scrollTop = 0;\r\n this.scrollOffsetTop = 0;\r\n this.scrollDiff = 0;\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 try {\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 reuseWorker: true\r\n });\r\n }\r\n catch (err) {\r\n this.btnSend.classList.remove('tgico-microphone2');\r\n this.btnSend.classList.add('tgico-send');\r\n console.error('Recorder constructor error:', err);\r\n }\r\n this.messageInput.addEventListener('keydown', (e) => {\r\n if (e.key == 'Enter' && !config_1.touchSupport) {\r\n /* if(e.ctrlKey || e.metaKey) {\r\n this.messageInput.innerHTML += '
';\r\n placeCaretAtEnd(this.message)\r\n return;\r\n } */\r\n if (e.shiftKey || e.ctrlKey || e.metaKey) {\r\n return;\r\n }\r\n this.sendMessage();\r\n }\r\n });\r\n if (config_1.touchSupport) {\r\n this.messageInput.addEventListener('touchend', (e) => {\r\n this.saveScroll();\r\n emoticonsDropdown_1.default.toggle(false);\r\n });\r\n window.addEventListener('resize', () => {\r\n this.restoreScroll();\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 if (this.recorder) {\r\n this.btnSend.classList.remove('tgico-send');\r\n this.btnSend.classList.add('tgico-microphone2');\r\n }\r\n appMessagesManager_1.default.setTyping('sendMessageCancelAction');\r\n }\r\n else if (!this.btnSend.classList.contains('tgico-send') || !this.recorder) {\r\n if (this.recorder) {\r\n this.btnSend.classList.add('tgico-send');\r\n this.btnSend.classList.remove('tgico-microphone2');\r\n }\r\n let time = Date.now();\r\n if (time - this.lastTimeType >= 6000) {\r\n this.lastTimeType = time;\r\n appMessagesManager_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.muted = true;\r\n video.setAttribute('playsinline', '');\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 const isPhoto = file.type.indexOf('image/') !== -1;\r\n params.objectURL = URL.createObjectURL(file);\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: isPhoto ? 'photo' : 'doc',\r\n url: params.objectURL\r\n }, false, true);\r\n const finish = () => {\r\n itemDiv.append(docDiv);\r\n resolve(itemDiv);\r\n };\r\n if (isPhoto) {\r\n let img = new Image();\r\n img.src = params.objectURL;\r\n img.onload = () => {\r\n params.width = img.naturalWidth;\r\n params.height = img.naturalHeight;\r\n finish();\r\n };\r\n img.onerror = finish;\r\n }\r\n else {\r\n finish();\r\n }\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 this.fileInput.setAttribute('accept', 'image/*, video/*');\r\n willAttach.type = 'media';\r\n this.fileInput.click();\r\n });\r\n this.attachMenu.document.addEventListener('click', () => {\r\n this.fileInput.removeAttribute('accept');\r\n willAttach.type = 'document';\r\n this.fileInput.click();\r\n });\r\n this.attachMenu.poll.addEventListener('click', () => {\r\n new popupCreatePoll_1.default().show();\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 isMedia: params.file.type.includes('audio/') || 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 const onBtnSendClick = (e) => {\r\n utils_1.cancelEvent(e);\r\n if (this.btnSend.classList.contains('tgico-send') || !this.recorder) {\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.chatInput.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.btnSend.addEventListener('touchend', onBtnSendClick);\r\n this.btnSend.addEventListener('click', onBtnSendClick);\r\n if (this.recorder) {\r\n const onCancelRecordClick = (e) => {\r\n utils_1.cancelEvent(e);\r\n this.recordCanceled = true;\r\n this.recorder.stop();\r\n opusDecodeController_1.default.setKeepAlive(false);\r\n };\r\n this.btnCancelRecord.addEventListener('touchend', onCancelRecordClick);\r\n this.btnCancelRecord.addEventListener('click', onCancelRecordClick);\r\n this.recorder.onstop = () => {\r\n this.recording = false;\r\n this.chatInput.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 replyToMsgID: this.replyToMsgID\r\n });\r\n this.onMessageSent(false, true);\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 }\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 if (this.recorder) {\r\n this.btnSend.classList.remove('tgico-send');\r\n this.btnSend.classList.add('tgico-microphone2');\r\n }\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, clearReply) {\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.noWebPage = false;\r\n this.willSendWebPage = null;\r\n this.messageInput.innerText = '';\r\n if (this.recorder) {\r\n this.btnSend.classList.remove('tgico-send');\r\n this.btnSend.classList.add('tgico-microphone2');\r\n }\r\n }\r\n if (clearReply || clearInput) {\r\n this.replyToMsgID = 0;\r\n this.replyElements.container.classList.remove('active');\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 sendMessageWithDocument(document) {\r\n document = appDocsManager_1.default.getDoc(document);\r\n if (document && document._ != 'documentEmpty') {\r\n appMessagesManager_1.default.sendFile(appImManager_1.default.peerID, document, { isMedia: true, replyToMsgID: this.replyToMsgID });\r\n this.onMessageSent(false, true);\r\n if (document.type == 'sticker') {\r\n emoticonsDropdown_1.default.stickersTab.pushRecentSticker(document);\r\n }\r\n return true;\r\n }\r\n return false;\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 saveScroll() {\r\n this.scrollTop = appImManager_1.default.scrollable.container.scrollTop;\r\n this.scrollOffsetTop = this.chatInput.offsetTop;\r\n }\r\n restoreScroll() {\r\n if (this.chatInput.style.display)\r\n return;\r\n //console.log('input resize', offsetTop, this.chatInput.offsetTop);\r\n let newOffsetTop = this.chatInput.offsetTop;\r\n let container = appImManager_1.default.scrollable.container;\r\n let scrollTop = container.scrollTop;\r\n let clientHeight = container.clientHeight;\r\n let maxScrollTop = container.scrollHeight;\r\n if (newOffsetTop < this.scrollOffsetTop) {\r\n this.scrollDiff = this.scrollOffsetTop - newOffsetTop;\r\n container.scrollTop += this.scrollDiff;\r\n }\r\n else if (scrollTop != this.scrollTop) {\r\n let endDiff = maxScrollTop - (scrollTop + clientHeight);\r\n if (endDiff < this.scrollDiff /* && false */) {\r\n //container.scrollTop -= endDiff;\r\n }\r\n else {\r\n container.scrollTop -= this.scrollDiff;\r\n }\r\n }\r\n }\r\n}\r\nexports.ChatInput = ChatInput;\r\n" - }, - { - "id": 99, - "identifier": "F:\\tweb\\public\\recorder.min.js", - "name": "./public/recorder.min.js", - "index": 98, - "index2": 91, - "size": 6805, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\input.ts", - "issuerId": 98, - "issuerName": "./src/components/chat/input.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 98, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\input.ts", - "name": "./src/components/chat/input.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 2199, - "building": 778, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 98, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\input.ts", - "module": "./src/components/chat/input.ts", - "moduleName": "./src/components/chat/input.ts", - "type": "cjs require", - "userRequest": "../../../public/recorder.min", - "loc": "16:39-78" - } - ], - "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{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,this.initWorker().then(()=>this.initSourceNode(e)).then(e=>{this.sourceNode=e,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": 100, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\gifs.ts", - "name": "./src/components/emoticonsDropdown/tabs/gifs.ts", - "index": 100, - "index2": 92, - "size": 1783, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\index.ts", - "issuerId": 47, - "issuerName": "./src/components/emoticonsDropdown/index.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 98, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\input.ts", - "name": "./src/components/chat/input.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - }, - { - "id": 47, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\index.ts", - "name": "./src/components/emoticonsDropdown/index.ts", - "profile": { - "factory": 2199, - "building": 778, - "dependencies": 1 - } - } - ], - "profile": { - "factory": 120, - "building": 1077, - "dependencies": 2 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 47, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\index.ts", - "module": "./src/components/emoticonsDropdown/index.ts", - "moduleName": "./src/components/emoticonsDropdown/index.ts", - "type": "cjs require", - "userRequest": "./tabs/gifs", - "loc": "17:31-53" - } - ], - "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 __1 = require(\"..\");\r\nconst gifsMasonry_1 = __importDefault(require(\"../../gifsMasonry\"));\r\nconst scrollable_new_1 = __importDefault(require(\"../../scrollable_new\"));\r\nconst misc_1 = require(\"../../misc\");\r\nconst mtprotoworker_1 = __importDefault(require(\"../../../lib/mtproto/mtprotoworker\"));\r\nconst appDocsManager_1 = __importDefault(require(\"../../../lib/appManagers/appDocsManager\"));\r\nclass GifsTab {\r\n init() {\r\n this.content = document.getElementById('content-gifs');\r\n const gifsContainer = this.content.firstElementChild;\r\n gifsContainer.addEventListener('click', __1.EmoticonsDropdown.onMediaClick);\r\n const scroll = new scrollable_new_1.default(this.content, 'y', 'GIFS', null);\r\n const masonry = new gifsMasonry_1.default(gifsContainer, __1.EMOTICONSSTICKERGROUP, scroll);\r\n const preloader = misc_1.putPreloader(this.content, true);\r\n mtprotoworker_1.default.invokeApi('messages.getSavedGifs', { hash: 0 }).then((res) => {\r\n //console.log('getSavedGifs res:', res);\r\n if (res._ == 'messages.savedGifs') {\r\n res.gifs.forEach((doc, idx) => {\r\n res.gifs[idx] = doc = appDocsManager_1.default.saveDoc(doc);\r\n //if(doc._ == 'documentEmpty') return;\r\n //masonry.add(doc as MyDocument);\r\n });\r\n }\r\n //let line: MTDocument[] = [];\r\n preloader.remove();\r\n });\r\n this.init = null;\r\n }\r\n onClose() {\r\n }\r\n}\r\nexports.default = GifsTab;\r\n" - }, - { - "id": 101, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\emoji.ts", - "name": "./src/components/emoticonsDropdown/tabs/emoji.ts", - "index": 101, - "index2": 93, - "size": 7695, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\index.ts", - "issuerId": 47, - "issuerName": "./src/components/emoticonsDropdown/index.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 98, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\input.ts", - "name": "./src/components/chat/input.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - }, - { - "id": 47, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\index.ts", - "name": "./src/components/emoticonsDropdown/index.ts", - "profile": { - "factory": 2199, - "building": 778, - "dependencies": 1 - } - } - ], - "profile": { - "factory": 120, - "building": 1077, - "dependencies": 2 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 47, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\index.ts", - "module": "./src/components/emoticonsDropdown/index.ts", - "moduleName": "./src/components/emoticonsDropdown/index.ts", - "type": "cjs require", - "userRequest": "./tabs/emoji", - "loc": "24:32-55" - } - ], - "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 __1 = require(\"..\");\r\nconst scrollable_new_1 = __importDefault(require(\"../../scrollable_new\"));\r\nconst config_1 = __importDefault(require(\"../../../lib/config\"));\r\nconst misc_1 = require(\"../../misc\");\r\nconst appStateManager_1 = __importDefault(require(\"../../../lib/appManagers/appStateManager\"));\r\nconst richtextprocessor_1 = require(\"../../../lib/richtextprocessor\");\r\nconst appImManager_1 = __importDefault(require(\"../../../lib/appManagers/appImManager\"));\r\nclass EmojiTab {\r\n constructor() {\r\n this.recent = [];\r\n this.onContentClick = (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 appImManager_1.default.chatInputC.messageInput.innerHTML += target.outerHTML;\r\n // Recent\r\n const emoji = this.getEmojiFromElement(target);\r\n Array.from(this.recentItemsDiv.children).forEach((el, idx) => {\r\n const _emoji = this.getEmojiFromElement(el);\r\n if (emoji == _emoji) {\r\n el.remove();\r\n }\r\n });\r\n const scrollHeight = this.recentItemsDiv.scrollHeight;\r\n this.appendEmoji(emoji, this.recentItemsDiv, true);\r\n this.recent.findAndSplice(e => e == emoji);\r\n this.recent.unshift(emoji);\r\n if (this.recent.length > 36) {\r\n this.recent.length = 36;\r\n }\r\n appStateManager_1.default.pushToState('recentEmoji', this.recent);\r\n // Append to input\r\n const event = new Event('input', { bubbles: true, cancelable: true });\r\n appImManager_1.default.chatInputC.messageInput.dispatchEvent(event);\r\n };\r\n }\r\n init() {\r\n this.content = document.getElementById('content-emoji');\r\n const categories = [\"Smileys & Emotion\", \"Animals & Nature\", \"Food & Drink\", \"Travel & Places\", \"Activities\", \"Objects\", /* \"Symbols\", */ \"Flags\", \"Skin Tones\"];\r\n const divs = {};\r\n const sorted = {\r\n 'Recent': []\r\n };\r\n for (const emoji in config_1.default.Emoji) {\r\n const details = config_1.default.Emoji[emoji];\r\n const i = '' + details;\r\n const 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 (const category in sorted) {\r\n const div = document.createElement('div');\r\n div.classList.add('emoji-category');\r\n const titleDiv = document.createElement('div');\r\n titleDiv.classList.add('category-title');\r\n titleDiv.innerText = category;\r\n const itemsDiv = document.createElement('div');\r\n itemsDiv.classList.add('category-items');\r\n div.append(titleDiv, itemsDiv);\r\n const emojis = sorted[category];\r\n emojis.forEach(emoji => {\r\n /* if(emojiUnicode(emoji) == '1f481-200d-2642') {\r\n console.log('append emoji', emoji, emojiUnicode(emoji));\r\n } */\r\n emoji = emoji.split('-').reduce((prev, curr) => prev + String.fromCodePoint(parseInt(curr, 16)), '');\r\n this.appendEmoji(emoji /* .replace(/[\\ufe0f\\u2640\\u2642\\u2695]/g, '') */, itemsDiv, false /* , false */);\r\n /* if(category == 'Smileys & Emotion') {\r\n console.log('appended emoji', emoji, itemsDiv.children[itemsDiv.childElementCount - 1].innerHTML, emojiUnicode(emoji));\r\n } */\r\n });\r\n divs[category] = div;\r\n }\r\n //console.timeEnd('emojiParse');\r\n const menu = this.content.previousElementSibling.firstElementChild;\r\n const emojiScroll = this.scroll = new scrollable_new_1.default(this.content, 'y', 'EMOJI', null);\r\n //emojiScroll.setVirtualContainer(emojiScroll.container);\r\n const preloader = misc_1.putPreloader(this.content, true);\r\n Promise.all([\r\n new Promise((resolve) => setTimeout(resolve, 200)),\r\n appStateManager_1.default.getState().then(state => {\r\n if (Array.isArray(state.recentEmoji)) {\r\n this.recent = state.recentEmoji;\r\n }\r\n })\r\n ]).then(() => {\r\n preloader.remove();\r\n this.recentItemsDiv = divs['Recent'].querySelector('.category-items');\r\n for (const emoji of this.recent) {\r\n this.appendEmoji(emoji, this.recentItemsDiv);\r\n }\r\n categories.unshift('Recent');\r\n categories.map(category => {\r\n const 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 this.stickyIntersector.observeStickyHeaderChanges(div);\r\n return div;\r\n });\r\n });\r\n this.content.addEventListener('click', this.onContentClick);\r\n this.stickyIntersector = __1.EmoticonsDropdown.menuOnClick(menu, emojiScroll);\r\n this.init = null;\r\n }\r\n appendEmoji(emoji, container, prepend = false /* , unified = false */) {\r\n //const emoji = details.unified;\r\n //const emoji = (details.unified as string).split('-')\r\n //.reduce((prev, curr) => prev + String.fromCodePoint(parseInt(curr, 16)), '');\r\n const spanEmoji = document.createElement('span');\r\n let kek;\r\n /* if(unified) {\r\n kek = RichTextProcessor.wrapRichText('_', {\r\n entities: [{\r\n _: 'messageEntityEmoji',\r\n offset: 0,\r\n length: emoji.split('-').length,\r\n unicode: emoji\r\n }]\r\n });\r\n } else { */\r\n kek = richtextprocessor_1.RichTextProcessor.wrapEmojiText(emoji);\r\n //}\r\n /* if(!kek.includes('emoji')) {\r\n console.log(emoji, kek, spanEmoji, emoji.length, new TextEncoder().encode(emoji), emojiUnicode(emoji));\r\n return;\r\n } */\r\n //console.log(kek);\r\n spanEmoji.innerHTML = kek;\r\n if (spanEmoji.firstElementChild) {\r\n spanEmoji.firstElementChild.setAttribute('loading', 'lazy');\r\n }\r\n //spanEmoji = spanEmoji.firstElementChild as HTMLSpanElement;\r\n //spanEmoji.setAttribute('emoji', emoji);\r\n if (prepend)\r\n container.prepend(spanEmoji);\r\n else\r\n container.appendChild(spanEmoji);\r\n }\r\n getEmojiFromElement(element) {\r\n if (element.tagName == 'SPAN' && !element.classList.contains('emoji')) {\r\n element = element.firstElementChild;\r\n }\r\n return element.getAttribute('alt') || element.innerText;\r\n }\r\n onClose() {\r\n }\r\n}\r\nexports.default = EmojiTab;\r\n" - }, - { - "id": 102, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\tabs\\stickers.ts", - "name": "./src/components/emoticonsDropdown/tabs/stickers.ts", - "index": 102, - "index2": 94, - "size": 14642, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\index.ts", - "issuerId": 47, - "issuerName": "./src/components/emoticonsDropdown/index.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 98, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\input.ts", - "name": "./src/components/chat/input.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - }, - { - "id": 47, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\index.ts", - "name": "./src/components/emoticonsDropdown/index.ts", - "profile": { - "factory": 2199, - "building": 778, - "dependencies": 1 - } - } - ], - "profile": { - "factory": 120, - "building": 1077, - "dependencies": 2 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 47, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\emoticonsDropdown\\index.ts", - "module": "./src/components/emoticonsDropdown/index.ts", - "moduleName": "./src/components/emoticonsDropdown/index.ts", - "type": "cjs require", - "userRequest": "./tabs/stickers", - "loc": "25:35-61" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 5, - "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 __1 = __importStar(require(\"..\"));\r\nconst scrollable_new_1 = __importDefault(require(\"../../scrollable_new\"));\r\nconst wrappers_1 = require(\"../../wrappers\");\r\nconst appStickersManager_1 = __importDefault(require(\"../../../lib/appManagers/appStickersManager\"));\r\nconst appDownloadManager_1 = __importDefault(require(\"../../../lib/appManagers/appDownloadManager\"));\r\nconst blob_1 = require(\"../../../helpers/blob\");\r\nconst lottieLoader_1 = __importDefault(require(\"../../../lib/lottieLoader\"));\r\nconst misc_1 = require(\"../../misc\");\r\nconst richtextprocessor_1 = require(\"../../../lib/richtextprocessor\");\r\nconst utils_1 = require(\"../../../lib/utils\");\r\nconst mtprotoworker_1 = __importDefault(require(\"../../../lib/mtproto/mtprotoworker\"));\r\nconst appDocsManager_1 = __importDefault(require(\"../../../lib/appManagers/appDocsManager\"));\r\nconst animationIntersector_1 = __importDefault(require(\"../../animationIntersector\"));\r\nconst lazyLoadQueue_1 = require(\"../../lazyLoadQueue\");\r\nclass StickersTab {\r\n constructor() {\r\n this.stickerSets = {};\r\n this.recentStickers = [];\r\n this.mounted = false;\r\n this.queueCategoryPush = [];\r\n this.animatedDivs = new Set();\r\n this.checkAnimationContainer = (div, visible) => {\r\n //console.error('checkAnimationContainer', div, visible);\r\n const players = animationIntersector_1.default.getAnimations(div);\r\n players.forEach(player => {\r\n if (!visible) {\r\n animationIntersector_1.default.checkAnimation(player, true, true);\r\n }\r\n else {\r\n animationIntersector_1.default.checkAnimation(player, false);\r\n }\r\n });\r\n };\r\n this.processVisibleDiv = (div) => {\r\n const docID = div.dataset.docID;\r\n const doc = appDocsManager_1.default.getDoc(docID);\r\n const promise = wrappers_1.wrapSticker({\r\n doc,\r\n div: div,\r\n width: 80,\r\n height: 80,\r\n lazyLoadQueue: null,\r\n group: __1.EMOTICONSSTICKERGROUP,\r\n onlyThumb: false,\r\n play: true,\r\n loop: true\r\n });\r\n promise.then(() => {\r\n //clearTimeout(timeout);\r\n this.checkAnimationContainer(div, this.lazyLoadQueue.intersector.isVisible(div));\r\n });\r\n /* let timeout = window.setTimeout(() => {\r\n console.error('processVisibleDiv timeout', div, doc);\r\n }, 1e3); */\r\n return promise;\r\n };\r\n this.processInvisibleDiv = (div) => {\r\n const docID = div.dataset.docID;\r\n const doc = appDocsManager_1.default.getDoc(docID);\r\n //console.log('STICKER INvisible:', /* div, */docID);\r\n this.checkAnimationContainer(div, false);\r\n div.innerHTML = '';\r\n this.renderSticker(doc, div);\r\n };\r\n }\r\n categoryPush(categoryDiv, categoryTitle, promise, prepend) {\r\n //if((docs.length % 5) != 0) categoryDiv.classList.add('not-full');\r\n const itemsDiv = document.createElement('div');\r\n itemsDiv.classList.add('category-items');\r\n const titleDiv = document.createElement('div');\r\n titleDiv.classList.add('category-title');\r\n titleDiv.innerHTML = categoryTitle;\r\n categoryDiv.append(titleDiv, itemsDiv);\r\n this.stickyIntersector.observeStickyHeaderChanges(categoryDiv);\r\n this.queueCategoryPush.push({ element: categoryDiv, prepend });\r\n promise.then(documents => {\r\n documents.forEach(doc => {\r\n //if(doc._ == 'documentEmpty') return;\r\n itemsDiv.append(this.renderSticker(doc));\r\n });\r\n if (this.queueCategoryPush.length) {\r\n this.queueCategoryPush.forEach(({ element, prepend }) => {\r\n if (prepend) {\r\n if (this.recentDiv.parentElement) {\r\n this.scroll.prepend(element);\r\n this.scroll.prepend(this.recentDiv);\r\n }\r\n else {\r\n this.scroll.prepend(element);\r\n }\r\n }\r\n else\r\n this.scroll.append(element);\r\n });\r\n this.queueCategoryPush.length = 0;\r\n }\r\n });\r\n }\r\n renderSticker(doc, div) {\r\n if (!div) {\r\n div = document.createElement('div');\r\n if (doc.sticker == 2) {\r\n this.animatedDivs.add(div);\r\n this.lazyLoadQueue.observe({\r\n div,\r\n load: this.processVisibleDiv\r\n });\r\n }\r\n }\r\n wrappers_1.wrapSticker({\r\n doc,\r\n div,\r\n /* width: 80,\r\n height: 80,\r\n play: false,\r\n loop: false, */\r\n lazyLoadQueue: __1.EmoticonsDropdown.lazyLoadQueue,\r\n group: __1.EMOTICONSSTICKERGROUP,\r\n onlyThumb: doc.sticker == 2\r\n });\r\n return div;\r\n }\r\n renderStickerSet(set, prepend = false) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const categoryDiv = document.createElement('div');\r\n categoryDiv.classList.add('sticker-category');\r\n const li = document.createElement('li');\r\n li.classList.add('btn-icon');\r\n this.stickerSets[set.id] = {\r\n stickers: categoryDiv,\r\n tab: li\r\n };\r\n if (prepend) {\r\n this.menu.insertBefore(li, this.menu.firstElementChild.nextSibling);\r\n }\r\n else {\r\n this.menu.append(li);\r\n }\r\n //stickersScroll.append(categoryDiv);\r\n const promise = appStickersManager_1.default.getStickerSet(set);\r\n this.categoryPush(categoryDiv, richtextprocessor_1.RichTextProcessor.wrapEmojiText(set.title), promise.then(stickerSet => stickerSet.documents), prepend);\r\n const stickerSet = yield promise;\r\n //console.log('got stickerSet', stickerSet, li);\r\n if (stickerSet.set.thumb) {\r\n const downloadOptions = appStickersManager_1.default.getStickerSetThumbDownloadOptions(stickerSet.set);\r\n const promise = appDownloadManager_1.default.download(downloadOptions);\r\n if (stickerSet.set.pFlags.animated) {\r\n promise\r\n .then(blob_1.readBlobAsText)\r\n .then(JSON.parse)\r\n .then(json => {\r\n lottieLoader_1.default.loadAnimationWorker({\r\n container: li,\r\n loop: true,\r\n autoplay: false,\r\n animationData: json,\r\n width: 32,\r\n height: 32\r\n }, __1.EMOTICONSSTICKERGROUP);\r\n });\r\n }\r\n else {\r\n const image = new Image();\r\n promise.then(blob => {\r\n misc_1.renderImageFromUrl(image, URL.createObjectURL(blob), () => {\r\n li.append(image);\r\n });\r\n });\r\n }\r\n }\r\n else if (stickerSet.documents[0]._ != 'documentEmpty') { // 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: __1.EMOTICONSSTICKERGROUP\r\n }); // kostil\r\n }\r\n });\r\n }\r\n init() {\r\n this.content = document.getElementById('content-stickers');\r\n //let stickersDiv = contentStickersDiv.querySelector('.os-content') as HTMLDivElement;\r\n this.recentDiv = document.createElement('div');\r\n this.recentDiv.classList.add('sticker-category');\r\n let menuWrapper = this.content.previousElementSibling;\r\n this.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 this.content.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 utils_1.$rootScope.$on('stickers_installed', (e) => {\r\n const set = e.detail;\r\n if (!this.stickerSets[set.id] && this.mounted) {\r\n this.renderStickerSet(set, true);\r\n }\r\n });\r\n utils_1.$rootScope.$on('stickers_deleted', (e) => {\r\n const set = e.detail;\r\n if (this.stickerSets[set.id] && this.mounted) {\r\n const elements = this.stickerSets[set.id];\r\n elements.stickers.remove();\r\n elements.tab.remove();\r\n delete this.stickerSets[set.id];\r\n }\r\n });\r\n stickersDiv.addEventListener('click', __1.EmoticonsDropdown.onMediaClick);\r\n this.scroll = new scrollable_new_1.default(this.content, 'y', 'STICKERS', undefined, undefined, 2);\r\n this.scroll.setVirtualContainer(stickersDiv);\r\n this.stickyIntersector = __1.EmoticonsDropdown.menuOnClick(this.menu, this.scroll, menuScroll);\r\n const preloader = misc_1.putPreloader(this.content, true);\r\n Promise.all([\r\n appStickersManager_1.default.getRecentStickers().then(stickers => {\r\n this.recentStickers = stickers.stickers.slice(0, 20);\r\n //stickersScroll.prepend(categoryDiv);\r\n this.stickerSets['recent'] = {\r\n stickers: this.recentDiv,\r\n tab: this.menu.firstElementChild\r\n };\r\n preloader.remove();\r\n this.categoryPush(this.recentDiv, 'Recent', Promise.resolve(this.recentStickers), true);\r\n }),\r\n mtprotoworker_1.default.invokeApi('messages.getAllStickers', { hash: 0 }).then((res) => __awaiter(this, void 0, void 0, function* () {\r\n let stickers = res;\r\n preloader.remove();\r\n for (let set of stickers.sets) {\r\n this.renderStickerSet(set);\r\n }\r\n }))\r\n ]).finally(() => {\r\n this.mounted = true;\r\n });\r\n this.lazyLoadQueue = new lazyLoadQueue_1.LazyLoadQueueRepeat(undefined, (target, visible) => {\r\n if (!visible) {\r\n this.processInvisibleDiv(target);\r\n }\r\n });\r\n __1.default.events.onClose.push(() => {\r\n this.lazyLoadQueue.lock();\r\n });\r\n __1.default.events.onCloseAfter.push(() => {\r\n const divs = this.lazyLoadQueue.intersector.getVisible();\r\n for (const div of divs) {\r\n this.processInvisibleDiv(div);\r\n }\r\n this.lazyLoadQueue.intersector.clearVisible();\r\n });\r\n __1.default.events.onOpenAfter.push(() => {\r\n this.lazyLoadQueue.unlockAndRefresh();\r\n });\r\n /* setInterval(() => {\r\n // @ts-ignore\r\n const players = Object.values(lottieLoader.players).filter(p => p.width == 80);\r\n \r\n console.log('STICKERS RENDERED IN PANEL:', players.length, players.filter(p => !p.paused).length, this.lazyLoadQueue.intersector.getVisible().length);\r\n }, .25e3); */\r\n this.init = null;\r\n }\r\n pushRecentSticker(doc) {\r\n if (!this.recentDiv.parentElement) {\r\n return;\r\n }\r\n let div = this.recentDiv.querySelector(`[data-doc-i-d=\"${doc.id}\"]`);\r\n if (!div) {\r\n div = this.renderSticker(doc);\r\n }\r\n const items = this.recentDiv.querySelector('.category-items');\r\n items.prepend(div);\r\n if (items.childElementCount > 20) {\r\n Array.from(items.children).slice(20).forEach(el => el.remove());\r\n }\r\n }\r\n onClose() {\r\n }\r\n}\r\nexports.default = StickersTab;\r\n" - }, - { - "id": 103, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\popupCreatePoll.ts", - "name": "./src/components/popupCreatePoll.ts", - "index": 104, - "index2": 97, - "size": 4885, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\input.ts", - "issuerId": 98, - "issuerName": "./src/components/chat/input.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - }, - { - "id": 98, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\input.ts", - "name": "./src/components/chat/input.ts", - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - } - } - ], - "profile": { - "factory": 2199, - "building": 778, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 98, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\input.ts", - "module": "./src/components/chat/input.ts", - "moduleName": "./src/components/chat/input.ts", - "type": "cjs require", - "userRequest": "../popupCreatePoll", - "loc": "22:42-71" - } - ], - "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 popup_1 = require(\"./popup\");\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 toast_1 = require(\"./toast\");\r\nconst InputField = (placeholder, label, name) => {\r\n const div = document.createElement('div');\r\n div.classList.add('input-field');\r\n div.innerHTML = `\r\n \r\n \r\n `;\r\n return div;\r\n};\r\nclass PopupCreatePoll extends popup_1.PopupElement {\r\n constructor() {\r\n super('popup-create-poll popup-new-media', null, { closable: true, withConfirm: 'CREATE', body: true });\r\n this.tempID = 0;\r\n this.onSubmitClick = (e) => {\r\n const question = this.questionInput.value;\r\n if (!question.trim()) {\r\n toast_1.toast('Please enter a question');\r\n return;\r\n }\r\n const answers = Array.from(this.questions.children).map((el, idx) => {\r\n const input = el.firstElementChild;\r\n return input.value;\r\n }).filter(v => !!v.trim());\r\n if (answers.length < 2) {\r\n toast_1.toast('Please enter at least two options');\r\n return;\r\n }\r\n this.closeBtn.click();\r\n this.confirmBtn.removeEventListener('click', this.onSubmitClick);\r\n //const randomID = [nextRandomInt(0xFFFFFFFF), nextRandomInt(0xFFFFFFFF)];\r\n //const randomIDS = bigint(randomID[0]).shiftLeft(32).add(bigint(randomID[1])).toString();\r\n const poll = {};\r\n poll._ = 'poll';\r\n //poll.id = randomIDS;\r\n poll.flags = 0;\r\n poll.question = question;\r\n poll.answers = answers.map((value, idx) => {\r\n return {\r\n _: 'pollAnswer',\r\n text: value,\r\n option: new Uint8Array([idx])\r\n };\r\n });\r\n appMessagesManager_1.default.sendOther(utils_1.$rootScope.selectedPeerID, {\r\n _: 'inputMediaPoll',\r\n flags: 0,\r\n poll\r\n });\r\n };\r\n this.onInput = (e) => {\r\n const target = e.target;\r\n if (target.value.length) {\r\n target.parentElement.classList.add('is-filled');\r\n }\r\n const isLast = !target.parentElement.nextElementSibling;\r\n if (isLast && target.value.length && this.questions.childElementCount < 10) {\r\n this.appendMoreField();\r\n }\r\n };\r\n this.onDeleteClick = (e) => {\r\n const target = e.target;\r\n target.parentElement.remove();\r\n Array.from(this.questions.children).forEach((el, idx) => {\r\n const label = el.firstElementChild.nextElementSibling;\r\n label.innerText = 'Option ' + (idx + 1);\r\n });\r\n };\r\n this.title.innerText = 'New Poll';\r\n const questionField = InputField('Ask a Question', 'Ask a Question', 'question');\r\n this.questionInput = questionField.firstElementChild;\r\n this.header.append(questionField);\r\n const hr = document.createElement('hr');\r\n const d = document.createElement('div');\r\n d.classList.add('caption');\r\n d.innerText = 'Options';\r\n this.questions = document.createElement('div');\r\n this.questions.classList.add('poll-create-questions');\r\n this.body.parentElement.insertBefore(hr, this.body);\r\n this.body.append(d, this.questions);\r\n this.confirmBtn.addEventListener('click', this.onSubmitClick);\r\n this.scrollable = new scrollable_new_1.default(this.body, 'y', undefined);\r\n this.appendMoreField();\r\n }\r\n appendMoreField() {\r\n const idx = this.questions.childElementCount + 1;\r\n const questionField = InputField('Add an Option', 'Option ' + idx, 'question-' + this.tempID++);\r\n questionField.firstElementChild.addEventListener('input', this.onInput);\r\n const deleteBtn = document.createElement('span');\r\n deleteBtn.classList.add('btn-icon', 'tgico-close');\r\n questionField.append(deleteBtn);\r\n deleteBtn.addEventListener('click', this.onDeleteClick, { once: true });\r\n this.questions.append(questionField);\r\n this.scrollable.scrollTo(this.scrollable.scrollHeight, true, true);\r\n }\r\n}\r\nexports.default = PopupCreatePoll;\r\n" - }, - { - "id": 104, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\bubbleGroups.ts", - "name": "./src/components/bubbleGroups.ts", - "index": 105, - "index2": 99, - "size": 6546, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "../../components/bubbleGroups", - "loc": "28: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 = 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": 105, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\audio.ts", - "name": "./src/components/chat/audio.ts", - "index": 107, - "index2": 101, - "size": 4010, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "../../components/chat/audio", - "loc": "43:16-54" - } - ], - "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.ChatAudio = void 0;\r\nconst appImManager_1 = __importDefault(require(\"../../lib/appManagers/appImManager\"));\r\nconst appMessagesManager_1 = __importDefault(require(\"../../lib/appManagers/appMessagesManager\"));\r\nconst appPeersManager_1 = __importDefault(require(\"../../lib/appManagers/appPeersManager\"));\r\nconst richtextprocessor_1 = require(\"../../lib/richtextprocessor\");\r\nconst utils_1 = require(\"../../lib/utils\");\r\nconst appMediaPlaybackController_1 = __importDefault(require(\"../appMediaPlaybackController\"));\r\nconst wrappers_1 = require(\"../wrappers\");\r\nclass ChatAudio {\r\n constructor() {\r\n this.container = document.createElement('div');\r\n this.container.classList.add('pinned-audio', 'pinned-container');\r\n this.container.style.display = 'none';\r\n this.toggle = document.createElement('div');\r\n this.toggle.classList.add('pinned-audio-ico', 'tgico');\r\n this.title = document.createElement('div');\r\n this.title.classList.add('pinned-audio-title');\r\n this.subtitle = document.createElement('div');\r\n this.subtitle.classList.add('pinned-audio-subtitle');\r\n this.close = document.createElement('button');\r\n this.close.classList.add('pinned-audio-close', 'btn-icon', 'tgico-close');\r\n this.container.append(this.toggle, this.title, this.subtitle, this.close);\r\n this.close.addEventListener('click', (e) => {\r\n utils_1.cancelEvent(e);\r\n const scrollTop = appImManager_1.default.scrollable.scrollTop;\r\n this.container.style.display = 'none';\r\n appImManager_1.default.topbar.classList.remove('is-audio-shown');\r\n if (this.toggle.classList.contains('flip-icon')) {\r\n appMediaPlaybackController_1.default.toggle();\r\n }\r\n if (!appImManager_1.default.topbar.classList.contains('is-pinned-shown')) {\r\n appImManager_1.default.scrollable.scrollTop = scrollTop - height;\r\n }\r\n });\r\n this.toggle.addEventListener('click', (e) => {\r\n utils_1.cancelEvent(e);\r\n appMediaPlaybackController_1.default.toggle();\r\n });\r\n const height = 52;\r\n utils_1.$rootScope.$on('audio_play', (e) => {\r\n const { doc, mid } = e.detail;\r\n let title, subtitle;\r\n if (doc.type == 'voice' || doc.type == 'round') {\r\n const message = appMessagesManager_1.default.getMessage(mid);\r\n title = appPeersManager_1.default.getPeerTitle(message.fromID, false, true);\r\n //subtitle = 'Voice message';\r\n subtitle = wrappers_1.formatDate(message.date, false, false);\r\n }\r\n else {\r\n title = doc.audioTitle || doc.file_name;\r\n subtitle = doc.audioPerformer ? richtextprocessor_1.RichTextProcessor.wrapPlainText(doc.audioPerformer) : 'Unknown Artist';\r\n }\r\n this.title.innerHTML = title;\r\n this.subtitle.innerHTML = subtitle;\r\n this.toggle.classList.add('flip-icon');\r\n this.container.dataset.mid = '' + mid;\r\n if (this.container.style.display) {\r\n const scrollTop = appImManager_1.default.scrollable.scrollTop;\r\n this.container.style.display = '';\r\n appImManager_1.default.topbar.classList.add('is-audio-shown');\r\n if (!appImManager_1.default.topbar.classList.contains('is-pinned-shown')) {\r\n appImManager_1.default.scrollable.scrollTop = scrollTop + height;\r\n }\r\n }\r\n });\r\n utils_1.$rootScope.$on('audio_pause', () => {\r\n this.toggle.classList.remove('flip-icon');\r\n });\r\n }\r\n}\r\nexports.ChatAudio = ChatAudio;\r\n" - }, - { - "id": 106, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\contextMenu.ts", - "name": "./src/components/chat/contextMenu.ts", - "index": 108, - "index2": 102, - "size": 6645, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "../../components/chat/contextMenu", - "loc": "44:22-66" - } - ], - "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.ChatContextMenu = void 0;\r\nconst appChatsManager_1 = __importDefault(require(\"../../lib/appManagers/appChatsManager\"));\r\nconst appImManager_1 = __importDefault(require(\"../../lib/appManagers/appImManager\"));\r\nconst appMessagesManager_1 = __importDefault(require(\"../../lib/appManagers/appMessagesManager\"));\r\nconst appPeersManager_1 = __importDefault(require(\"../../lib/appManagers/appPeersManager\"));\r\nconst utils_1 = require(\"../../lib/utils\");\r\nconst appForward_1 = __importDefault(require(\"../appForward\"));\r\nconst misc_1 = require(\"../misc\");\r\nconst popup_1 = require(\"../popup\");\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 misc_1.attachContextMenuListener(attachTo, (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 if (e instanceof MouseEvent)\r\n e.preventDefault();\r\n if (this.element.classList.contains('active')) {\r\n return false;\r\n }\r\n if (e instanceof MouseEvent)\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_1.default.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_1.default.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 appMessagesManager_1.default.updatePinnedMessage(utils_1.$rootScope.selectedPeerID, this.msgID);\r\n });\r\n }\r\n}\r\nexports.ChatContextMenu = ChatContextMenu;\r\n" - }, - { - "id": 107, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\components\\chat\\search.ts", - "name": "./src/components/chat/search.ts", - "index": 109, - "index2": 103, - "size": 8283, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/appManagers/appImManager.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageIm.ts", - "name": "./src/pages/pageIm.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 92, - "building": 1518, - "dependencies": 5 - } - } - ], - "profile": { - "factory": 67, - "building": 6575, - "dependencies": 2082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "../../components/chat/search", - "loc": "45:17-56" - } - ], - "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.ChatSearch = void 0;\r\nconst appImManager_1 = __importDefault(require(\"../../lib/appManagers/appImManager\"));\r\nconst utils_1 = require(\"../../lib/utils\");\r\nconst appSearch_1 = __importStar(require(\"../appSearch\"));\r\nconst popupDatepicker_1 = __importDefault(require(\"../popupDatepicker\"));\r\nconst ripple_1 = require(\"../ripple\");\r\nconst searchInput_1 = __importDefault(require(\"../searchInput\"));\r\nclass ChatSearch {\r\n constructor() {\r\n this.foundCount = 0;\r\n this.selectedIndex = 0;\r\n this.onDateClick = (e) => {\r\n utils_1.cancelEvent(e);\r\n new popupDatepicker_1.default(new Date(), appImManager_1.default.onDatePick).show();\r\n };\r\n this.selectResult = (elem) => {\r\n if (this.setPeerPromise)\r\n return this.setPeerPromise;\r\n const peerID = +elem.getAttribute('data-peerID');\r\n const lastMsgID = +elem.dataset.mid || undefined;\r\n const index = utils_1.whichChild(elem);\r\n if (index == (this.foundCount - 1)) {\r\n this.upBtn.setAttribute('disabled', 'true');\r\n }\r\n else {\r\n this.upBtn.removeAttribute('disabled');\r\n }\r\n if (!index) {\r\n this.downBtn.setAttribute('disabled', 'true');\r\n }\r\n else {\r\n this.downBtn.removeAttribute('disabled');\r\n }\r\n this.results.classList.remove('active');\r\n appImManager_1.default.bubblesContainer.classList.remove('search-results-active');\r\n const res = appImManager_1.default.setPeer(peerID, lastMsgID);\r\n this.setPeerPromise = (res instanceof Promise ? res : Promise.resolve(res)).then(() => {\r\n this.selectedIndex = index;\r\n this.foundCountEl.innerText = `${index + 1} of ${this.foundCount}`;\r\n const renderedCount = this.searchGroup.list.childElementCount;\r\n if (this.selectedIndex >= (renderedCount - 6)) {\r\n this.appSearch.searchMore();\r\n }\r\n }).finally(() => {\r\n this.setPeerPromise = null;\r\n });\r\n };\r\n this.onResultsClick = (e) => {\r\n const target = utils_1.findUpTag(e.target, 'LI');\r\n if (target) {\r\n this.selectResult(target);\r\n }\r\n };\r\n this.onFooterClick = (e) => {\r\n if (this.foundCount) {\r\n appImManager_1.default.bubblesContainer.classList.toggle('search-results-active');\r\n this.results.classList.toggle('active');\r\n }\r\n };\r\n this.onUpClick = (e) => {\r\n utils_1.cancelEvent(e);\r\n this.selectResult(this.searchGroup.list.children[this.selectedIndex + 1]);\r\n };\r\n this.onDownClick = (e) => {\r\n utils_1.cancelEvent(e);\r\n this.selectResult(this.searchGroup.list.children[this.selectedIndex - 1]);\r\n };\r\n this.element = document.createElement('div');\r\n this.element.classList.add('sidebar-header', 'chat-search', 'chats-container');\r\n this.backBtn = document.createElement('button');\r\n this.backBtn.classList.add('btn-icon', 'tgico-back', 'sidebar-close-button');\r\n ripple_1.ripple(this.backBtn);\r\n this.backBtn.addEventListener('click', () => {\r\n appImManager_1.default.topbar.classList.remove('hide-pinned');\r\n this.element.remove();\r\n this.searchInput.remove();\r\n this.results.remove();\r\n this.footer.remove();\r\n this.footer.removeEventListener('click', this.onFooterClick);\r\n this.dateBtn.removeEventListener('click', this.onDateClick);\r\n this.upBtn.removeEventListener('click', this.onUpClick);\r\n this.downBtn.removeEventListener('click', this.onDownClick);\r\n this.searchGroup.list.removeEventListener('click', this.onResultsClick);\r\n appImManager_1.default.bubblesContainer.classList.remove('search-results-active');\r\n }, { once: true });\r\n this.searchInput = new searchInput_1.default('Search');\r\n // Results\r\n this.results = document.createElement('div');\r\n this.results.classList.add('chat-search-results', 'chats-container');\r\n this.searchGroup = new appSearch_1.SearchGroup('', 'messages', undefined, '', false);\r\n this.searchGroup.list.addEventListener('click', this.onResultsClick);\r\n this.appSearch = new appSearch_1.default(this.results, this.searchInput, {\r\n messages: this.searchGroup\r\n }, (count) => {\r\n this.foundCount = count;\r\n if (!this.foundCount) {\r\n this.foundCountEl.innerText = this.searchInput.value ? 'No results' : '';\r\n this.results.classList.remove('active');\r\n appImManager_1.default.bubblesContainer.classList.remove('search-results-active');\r\n this.upBtn.setAttribute('disabled', 'true');\r\n this.downBtn.setAttribute('disabled', 'true');\r\n }\r\n else {\r\n this.selectResult(this.searchGroup.list.children[0]);\r\n }\r\n });\r\n this.appSearch.beginSearch(utils_1.$rootScope.selectedPeerID);\r\n //appImManager.topbar.parentElement.insertBefore(this.results, appImManager.bubblesContainer);\r\n appImManager_1.default.bubblesContainer.append(this.results);\r\n // Footer\r\n this.footer = document.createElement('div');\r\n this.footer.classList.add('chat-search-footer');\r\n this.footer.addEventListener('click', this.onFooterClick);\r\n ripple_1.ripple(this.footer);\r\n this.foundCountEl = document.createElement('span');\r\n this.foundCountEl.classList.add('chat-search-count');\r\n this.dateBtn = document.createElement('button');\r\n this.dateBtn.classList.add('btn-icon', 'tgico-calendar');\r\n this.controls = document.createElement('div');\r\n this.controls.classList.add('chat-search-controls');\r\n this.upBtn = document.createElement('button');\r\n this.upBtn.classList.add('btn-icon', 'tgico-up');\r\n this.downBtn = document.createElement('button');\r\n this.downBtn.classList.add('btn-icon', 'tgico-down');\r\n this.upBtn.setAttribute('disabled', 'true');\r\n this.downBtn.setAttribute('disabled', 'true');\r\n this.dateBtn.addEventListener('click', this.onDateClick);\r\n this.upBtn.addEventListener('click', this.onUpClick);\r\n this.downBtn.addEventListener('click', this.onDownClick);\r\n this.controls.append(this.upBtn, this.downBtn);\r\n this.footer.append(this.foundCountEl, this.dateBtn, this.controls);\r\n appImManager_1.default.topbar.parentElement.insertBefore(this.footer, appImManager_1.default.chatInput);\r\n // Append container\r\n this.element.append(this.backBtn, this.searchInput.container);\r\n appImManager_1.default.topbar.classList.add('hide-pinned');\r\n appImManager_1.default.topbar.parentElement.append(this.element);\r\n this.searchInput.input.focus();\r\n }\r\n}\r\nexports.ChatSearch = ChatSearch;\r\n" - }, - { - "id": 108, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\passwordManager.ts", - "name": "./src/lib/mtproto/passwordManager.ts", - "index": 111, - "index2": 107, - "size": 3129, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pagePassword.ts", - "issuerId": 66, - "issuerName": "./src/pages/pagePassword.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 49, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "name": "./src/pages/pageSignIn.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 79, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageAuthCode.ts", - "name": "./src/pages/pageAuthCode.ts", - "profile": { - "factory": 104, - "building": 1053, - "dependencies": 527 - } - }, - { - "id": 66, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pagePassword.ts", - "name": "./src/pages/pagePassword.ts", - "profile": { - "factory": 575, - "building": 2297, - "dependencies": 2 - } - } - ], - "profile": { - "factory": 4390, - "building": 785, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 66, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pagePassword.ts", - "module": "./src/pages/pagePassword.ts", - "moduleName": "./src/pages/pagePassword.ts", - "type": "cjs require", - "userRequest": "../lib/mtproto/passwordManager", - "loc": "15:42-83" - } - ], - "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.PasswordManager = void 0;\r\nconst mtprotoworker_1 = __importDefault(require(\"./mtprotoworker\"));\r\n//import { computeCheck } from \"../crypto/srp\";\r\nclass PasswordManager {\r\n getState(options = {}) {\r\n return mtprotoworker_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(password, state, options = {}) {\r\n return mtprotoworker_1.default.computeSRP(password, state).then((inputCheckPassword) => {\r\n return mtprotoworker_1.default.invokeApi('auth.checkPassword', {\r\n password: inputCheckPassword\r\n }, options);\r\n });\r\n }\r\n requestRecovery(options = {}) {\r\n return mtprotoworker_1.default.invokeApi('auth.requestPasswordRecovery', {}, options);\r\n }\r\n recover(code, options = {}) {\r\n return mtprotoworker_1.default.invokeApi('auth.recoverPassword', {\r\n code: code\r\n }, options);\r\n }\r\n}\r\nexports.PasswordManager = PasswordManager;\r\nconst passwordManager = new PasswordManager();\r\n// @ts-ignore\r\nif (process.env.NODE_ENV != 'production') {\r\n self.passwordManager = passwordManager;\r\n}\r\nexports.default = passwordManager;\r\n" - }, - { - "id": 109, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignQR.ts", - "name": "./src/pages/pageSignQR.ts", - "index": 112, - "index2": 111, - "size": 7042, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "issuerId": 49, - "issuerName": "./src/pages/pageSignIn.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 49, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "name": "./src/pages/pageSignIn.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - } - ], - "profile": { - "factory": 104, - "building": 1053, - "dependencies": 527 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 49, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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\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 const 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": 110, - "identifier": "F:\\tweb\\node_modules\\qr-code-styling\\lib\\qr-code-styling.js", - "name": "./node_modules/qr-code-styling/lib/qr-code-styling.js", - "index": 113, - "index2": 110, - "size": 28504, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignQR.ts", - "issuerId": 109, - "issuerName": "./src/pages/pageSignQR.ts", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 49, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignIn.ts", - "name": "./src/pages/pageSignIn.ts", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - }, - { - "id": 109, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignQR.ts", - "name": "./src/pages/pageSignQR.ts", - "profile": { - "factory": 104, - "building": 1053, - "dependencies": 527 - } - } - ], - "profile": { - "factory": 7122, - "building": 761, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 109, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\pages\\pageSignQR.ts", - "module": "./src/pages/pageSignQR.ts", - "moduleName": "./src/pages/pageSignQR.ts", - "type": "cjs require", - "userRequest": "qr-code-styling", - "loc": "51: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=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>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>>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;i8*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=0?l.getAt(g):0}}var d=0;for(s=0;sn)&&(t=n,r=e)}return r}())},c.createTableTag=function(t,r){t=t||2;var e=\"\";e+='',e+=\"\";for(var n=0;n\";for(var o=0;o';e+=\"\"}return e+=\"\",e+=\"
\"},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+='\",h+=n.text?''+A(n.text)+\"\":\"\",h+=e.text?''+A(e.text)+\"\":\"\",h+='',h+='\"},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\"};var A=function(t){for(var r=\"\",e=0;e\":r+=\">\";break;case\"&\":r+=\"&\";break;case'\"':r+=\""\";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=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>>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<=0;)r^=7973<5&&(e+=3+i-5)}for(n=0;n=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>>7-r%8&1)},put:function(t,r){for(var n=0;n>>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>>8&255)+(255&n),t.put(n,13),e+=2}if(e>>8)},writeBytes:function(t,e,n){e=e||0,n=n||t.length;for(var o=0;o0&&(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<>>o!=0)throw\"length over\";for(;e+o>=8;)r.writeByte(255&(t<>>=8-e,n=0,e=0;n|=t<0&&r.writeByte(n)}};return o}(f);c.write(r,n);var s=0,h=String.fromCharCode(o[s]);for(s+=1;s=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>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;en.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;hn||o&&o=(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 F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\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": 3952, - "built": false, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\mini-css-extract-plugin\\dist\\loader.js!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\tweb\\src\\materialize.scss", - "issuerId": 68, - "issuerName": "./src/materialize.scss", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 68, - "identifier": "F:\\tweb\\node_modules\\mini-css-extract-plugin\\dist\\loader.js!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\tweb\\src\\materialize.scss", - "name": "./src/materialize.scss", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - } - ], - "profile": { - "factory": 0, - "building": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 68, - "moduleIdentifier": "F:\\tweb\\node_modules\\mini-css-extract-plugin\\dist\\loader.js!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\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 F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\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": 136301, - "built": false, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\mini-css-extract-plugin\\dist\\loader.js!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\tweb\\src\\scss\\style.scss", - "issuerId": 69, - "issuerName": "./src/scss/style.scss", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 69, - "identifier": "F:\\tweb\\node_modules\\mini-css-extract-plugin\\dist\\loader.js!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\tweb\\src\\scss\\style.scss", - "name": "./src/scss/style.scss", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - } - ], - "profile": { - "factory": 0, - "building": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 69, - "moduleIdentifier": "F:\\tweb\\node_modules\\mini-css-extract-plugin\\dist\\loader.js!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\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 F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\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": 4913, - "built": false, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\mini-css-extract-plugin\\dist\\loader.js!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\tweb\\src\\scss\\tgico.scss", - "issuerId": 70, - "issuerName": "./src/scss/tgico.scss", - "issuerPath": [ - { - "id": 67, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 24, - "building": 3521 - } - }, - { - "id": 70, - "identifier": "F:\\tweb\\node_modules\\mini-css-extract-plugin\\dist\\loader.js!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\tweb\\src\\scss\\tgico.scss", - "name": "./src/scss/tgico.scss", - "profile": { - "factory": 2887, - "building": 13097, - "dependencies": 100 - } - } - ], - "profile": { - "factory": 0, - "building": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 70, - "moduleIdentifier": "F:\\tweb\\node_modules\\mini-css-extract-plugin\\dist\\loader.js!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\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": "F:\\tweb\\public", - "assetsByChunkName": {}, - "assets": [ - { - "name": "index.html", - "size": 180712, - "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": 175144, - "names": [], - "files": [ - "index.html" - ], - "hash": "95cf16ebff15dff0aeab", - "siblings": [], - "parents": [], - "children": [], - "childrenByOrder": {}, - "modules": [ - { - "id": 0, - "identifier": "F:\\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": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "issuerId": 9, - "issuerName": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "issuerPath": [ - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\tweb\\src\\index.hbs", - "name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs", - "profile": { - "factory": 3548, - "building": 3389 - } - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\handlebars\\runtime.js", - "name": "./node_modules/handlebars/runtime.js", - "profile": { - "factory": 1060, - "building": 6324 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "profile": { - "factory": 1871, - "building": 495 - } - } - ], - "profile": { - "factory": 895, - "building": 15, - "dependencies": 1092 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 2, - "moduleIdentifier": "F:\\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": "F:\\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": "F:\\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": "F:\\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": "F:\\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": "F:\\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": "F:\\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": "F:\\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": "F:\\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": "F:\\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 '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": ''',\n '`': '`',\n '=': '='\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": "F:\\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": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "issuerId": 9, - "issuerName": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "issuerPath": [ - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\tweb\\src\\index.hbs", - "name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs", - "profile": { - "factory": 3548, - "building": 3389 - } - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\handlebars\\runtime.js", - "name": "./node_modules/handlebars/runtime.js", - "profile": { - "factory": 1060, - "building": 6324 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "profile": { - "factory": 1871, - "building": 495 - } - } - ], - "profile": { - "factory": 895, - "building": 15, - "dependencies": 1092 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 2, - "moduleIdentifier": "F:\\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": "F:\\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": "F:\\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": "F:\\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": "F:\\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": "F:\\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": "F:\\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": "F:\\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": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "issuerId": 9, - "issuerName": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "issuerPath": [ - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\tweb\\src\\index.hbs", - "name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs", - "profile": { - "factory": 3548, - "building": 3389 - } - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\handlebars\\runtime.js", - "name": "./node_modules/handlebars/runtime.js", - "profile": { - "factory": 1060, - "building": 6324 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "profile": { - "factory": 1871, - "building": 495 - } - } - ], - "profile": { - "factory": 895, - "building": 15, - "dependencies": 1092 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 9, - "moduleIdentifier": "F:\\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": "F:\\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": "F:\\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": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js", - "issuerId": 2, - "issuerName": "./node_modules/handlebars/dist/cjs/handlebars/base.js", - "issuerPath": [ - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\tweb\\src\\index.hbs", - "name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs", - "profile": { - "factory": 3548, - "building": 3389 - } - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\handlebars\\runtime.js", - "name": "./node_modules/handlebars/runtime.js", - "profile": { - "factory": 1060, - "building": 6324 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "profile": { - "factory": 1871, - "building": 495 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars/base.js", - "profile": { - "factory": 895, - "building": 15, - "dependencies": 1092 - } - } - ], - "profile": { - "factory": 1099, - "building": 75, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 2, - "moduleIdentifier": "F:\\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": "F:\\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": "F:\\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": "F:\\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": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\tweb\\src\\index.hbs", - "name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs", - "profile": { - "factory": 3548, - "building": 3389 - } - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\handlebars\\runtime.js", - "name": "./node_modules/handlebars/runtime.js", - "profile": { - "factory": 1060, - "building": 6324 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "profile": { - "factory": 1871, - "building": 495 - } - }, - { - "id": 23, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\no-conflict.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars/no-conflict.js", - "profile": { - "factory": 895, - "building": 15, - "dependencies": 1092 - } - } - ], - "profile": { - "factory": 1090, - "building": 76 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 11, - "moduleIdentifier": "F:\\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": "F:\\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": "F:\\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": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js", - "issuerId": 2, - "issuerName": "./node_modules/handlebars/dist/cjs/handlebars/base.js", - "issuerPath": [ - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\tweb\\src\\index.hbs", - "name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs", - "profile": { - "factory": 3548, - "building": 3389 - } - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\handlebars\\runtime.js", - "name": "./node_modules/handlebars/runtime.js", - "profile": { - "factory": 1060, - "building": 6324 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "profile": { - "factory": 1871, - "building": 495 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars/base.js", - "profile": { - "factory": 895, - "building": 15, - "dependencies": 1092 - } - } - ], - "profile": { - "factory": 1099, - "building": 75, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 2, - "moduleIdentifier": "F:\\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": "F:\\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": "F:\\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": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js", - "issuerId": 2, - "issuerName": "./node_modules/handlebars/dist/cjs/handlebars/base.js", - "issuerPath": [ - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\tweb\\src\\index.hbs", - "name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs", - "profile": { - "factory": 3548, - "building": 3389 - } - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\handlebars\\runtime.js", - "name": "./node_modules/handlebars/runtime.js", - "profile": { - "factory": 1060, - "building": 6324 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "profile": { - "factory": 1871, - "building": 495 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars/base.js", - "profile": { - "factory": 895, - "building": 15, - "dependencies": 1092 - } - } - ], - "profile": { - "factory": 1099, - "building": 75, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 2, - "moduleIdentifier": "F:\\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": "F:\\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": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\tweb\\src\\index.hbs", - "name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs", - "index": 0, - "index2": 23, - "size": 44779, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": null, - "issuerId": null, - "issuerName": null, - "issuerPath": null, - "profile": { - "factory": 3548, - "building": 3389 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": null, - "moduleIdentifier": null, - "module": null, - "moduleName": null, - "type": "single entry", - "userRequest": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\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 \" \\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 \" \\r\\n\";\n},\"5\":function(container,depth0,helpers,partials,data) {\n return \" \\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 \" \\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 \"\\r\\n\\r\\n\\r\\n\\r\\n \\r\\n Telegram Web\\r\\n \\r\\n \\r\\n\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\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 + \"\\r\\n\\r\\n\\r\\n \\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n
\\r\\n

Sign in to Telegram

\\r\\n

Please confirm your country and
enter your phone number.

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

Scan from mobile Telegram

\\r\\n

1. Open Telegram on your phone
2. Go to settings > Devices > Scan QR
3. Scan this image to Log in

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

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

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

Enter a password

\\r\\n

Your account is protected with
an additional password

\\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n
Drag to Reposition
\\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
Forward
\\r\\n
Download
\\r\\n
Delete
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n
Send Photo
\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
New Group
\\r\\n
Contacts
\\r\\n
Archived
\\r\\n
Saved
\\r\\n
Settings
\\r\\n
Help
\\r\\n
\\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
    Archived Chats
    \\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
        New Channel
        \\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
        You can provide an optional description for your channel.
        \\r\\n \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n \\r\\n
        Add Members
        \\r\\n
        \\r\\n
        \\r\\n \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n \\r\\n
        New Group
        \\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
        Settings
        \\r\\n
        \\r\\n
        \\r\\n
        Log Out
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n

        Edit Profile

        \\r\\n

        Chat Folders

        \\r\\n

        General Settings

        \\r\\n

        Notifications

        \\r\\n

        Privacy and Security

        \\r\\n

        Language

        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n \\r\\n
        Edit Profile
        \\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
        Any details such as age, occupation or city. Example:
        23 y.o. designer from San Francisco.
        \\r\\n
        \\r\\n
        Username
        \\r\\n
        \\r\\n
        \\r\\n \\r\\n \\r\\n
        \\r\\n
        \\r\\n
        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.

        You can use a-z, 0-9 and underscores. Minimum length is 5 characters.

        This link opens a chat with you:\\r\\n
        \\r\\n
        \\r\\n
        \\r\\n \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n \\r\\n
        Chat Folders
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        Create folders for different groups of chats
        and quickly switch between them.
        \\r\\n \\r\\n
        \\r\\n
        \\r\\n
        Folders
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        Recommended folders
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        Delete Folder
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        Choose chats and types of chats that will
        appear and never appear in this folder.
        \\r\\n
        \\r\\n
        \\r\\n \\r\\n \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        Included chats
        \\r\\n
        \\r\\n

        Add Chats

        \\r\\n

        Contacts

        \\r\\n

        Non-Contacts

        \\r\\n

        Groups

        \\r\\n

        Channels

        \\r\\n

        Bots

        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        Excluded chats
        \\r\\n
        \\r\\n

        Remove Chats

        \\r\\n

        Muted

        \\r\\n

        Archived

        \\r\\n

        Read

        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n \\r\\n
        \\r\\n
        \\r\\n \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        Search
        \\r\\n
        Mute
        \\r\\n
        Delete and Leave
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        Reply
        \\r\\n
        Edit
        \\r\\n
        Copy
        \\r\\n
        Pin
        \\r\\n
        Forward
        \\r\\n
        Delete
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n \\r\\n \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n \\r\\n
        \\r\\n \\r\\n
        \\r\\n
        \\r\\n \\r\\n
        \\r\\n
        \\r\\n \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n \\r\\n
        Info
        \\r\\n \\r\\n \\r\\n \\r\\n
        \\r\\n \\r\\n \\r\\n \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n \\r\\n
        \\r\\n
        \\r\\n \\r\\n
        \\r\\n

        \\r\\n

        Bio

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

        \\r\\n

        Username

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

        \\r\\n

        Phone

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

        Enabled

        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n \\r\\n
        Forward
        \\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
        Results
        \\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\"\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\":688,\"column\":2},\"end\":{\"line\":690,\"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\":691,\"column\":2},\"end\":{\"line\":693,\"column\":12}}})) != null ? stack1 : \"\")\n + \"\\r\\n\";\n},\"useData\":true});" - }, - { - "id": 8, - "identifier": "F:\\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": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\tweb\\src\\index.hbs", - "issuerId": 7, - "issuerName": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs", - "issuerPath": [ - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\tweb\\src\\index.hbs", - "name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs", - "profile": { - "factory": 3548, - "building": 3389 - } - } - ], - "profile": { - "factory": 1060, - "building": 6324 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 7, - "moduleIdentifier": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\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": "F:\\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": "F:\\tweb\\node_modules\\handlebars\\runtime.js", - "issuerId": 8, - "issuerName": "./node_modules/handlebars/runtime.js", - "issuerPath": [ - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\tweb\\src\\index.hbs", - "name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs", - "profile": { - "factory": 3548, - "building": 3389 - } - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\handlebars\\runtime.js", - "name": "./node_modules/handlebars/runtime.js", - "profile": { - "factory": 1060, - "building": 6324 - } - } - ], - "profile": { - "factory": 1871, - "building": 495 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 8, - "moduleIdentifier": "F:\\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": "F:\\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": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js", - "issuerId": 3, - "issuerName": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js", - "issuerPath": [ - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\tweb\\src\\index.hbs", - "name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs", - "profile": { - "factory": 3548, - "building": 3389 - } - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\handlebars\\runtime.js", - "name": "./node_modules/handlebars/runtime.js", - "profile": { - "factory": 1060, - "building": 6324 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "profile": { - "factory": 1871, - "building": 495 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars/base.js", - "profile": { - "factory": 895, - "building": 15, - "dependencies": 1092 - } - }, - { - "id": 3, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js", - "profile": { - "factory": 1099, - "building": 75, - "dependencies": 0 - } - } - ], - "profile": { - "factory": 27, - "building": 17, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 3, - "moduleIdentifier": "F:\\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": "F:\\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": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js", - "issuerId": 3, - "issuerName": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js", - "issuerPath": [ - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\tweb\\src\\index.hbs", - "name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs", - "profile": { - "factory": 3548, - "building": 3389 - } - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\handlebars\\runtime.js", - "name": "./node_modules/handlebars/runtime.js", - "profile": { - "factory": 1060, - "building": 6324 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "profile": { - "factory": 1871, - "building": 495 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars/base.js", - "profile": { - "factory": 895, - "building": 15, - "dependencies": 1092 - } - }, - { - "id": 3, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js", - "profile": { - "factory": 1099, - "building": 75, - "dependencies": 0 - } - } - ], - "profile": { - "factory": 27, - "building": 17, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 3, - "moduleIdentifier": "F:\\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": "F:\\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": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js", - "issuerId": 3, - "issuerName": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js", - "issuerPath": [ - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\tweb\\src\\index.hbs", - "name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs", - "profile": { - "factory": 3548, - "building": 3389 - } - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\handlebars\\runtime.js", - "name": "./node_modules/handlebars/runtime.js", - "profile": { - "factory": 1060, - "building": 6324 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "profile": { - "factory": 1871, - "building": 495 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars/base.js", - "profile": { - "factory": 895, - "building": 15, - "dependencies": 1092 - } - }, - { - "id": 3, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js", - "profile": { - "factory": 1099, - "building": 75, - "dependencies": 0 - } - } - ], - "profile": { - "factory": 27, - "building": 17, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 3, - "moduleIdentifier": "F:\\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": "F:\\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": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js", - "issuerId": 3, - "issuerName": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js", - "issuerPath": [ - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\tweb\\src\\index.hbs", - "name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs", - "profile": { - "factory": 3548, - "building": 3389 - } - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\handlebars\\runtime.js", - "name": "./node_modules/handlebars/runtime.js", - "profile": { - "factory": 1060, - "building": 6324 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "profile": { - "factory": 1871, - "building": 495 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars/base.js", - "profile": { - "factory": 895, - "building": 15, - "dependencies": 1092 - } - }, - { - "id": 3, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js", - "profile": { - "factory": 1099, - "building": 75, - "dependencies": 0 - } - } - ], - "profile": { - "factory": 27, - "building": 17, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 3, - "moduleIdentifier": "F:\\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": "F:\\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": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js", - "issuerId": 3, - "issuerName": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js", - "issuerPath": [ - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\tweb\\src\\index.hbs", - "name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs", - "profile": { - "factory": 3548, - "building": 3389 - } - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\handlebars\\runtime.js", - "name": "./node_modules/handlebars/runtime.js", - "profile": { - "factory": 1060, - "building": 6324 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "profile": { - "factory": 1871, - "building": 495 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars/base.js", - "profile": { - "factory": 895, - "building": 15, - "dependencies": 1092 - } - }, - { - "id": 3, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js", - "profile": { - "factory": 1099, - "building": 75, - "dependencies": 0 - } - } - ], - "profile": { - "factory": 27, - "building": 17, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 3, - "moduleIdentifier": "F:\\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": "F:\\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": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js", - "issuerId": 3, - "issuerName": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js", - "issuerPath": [ - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\tweb\\src\\index.hbs", - "name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs", - "profile": { - "factory": 3548, - "building": 3389 - } - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\handlebars\\runtime.js", - "name": "./node_modules/handlebars/runtime.js", - "profile": { - "factory": 1060, - "building": 6324 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "profile": { - "factory": 1871, - "building": 495 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars/base.js", - "profile": { - "factory": 895, - "building": 15, - "dependencies": 1092 - } - }, - { - "id": 3, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js", - "profile": { - "factory": 1099, - "building": 75, - "dependencies": 0 - } - } - ], - "profile": { - "factory": 27, - "building": 17, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 3, - "moduleIdentifier": "F:\\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": "F:\\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": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js", - "issuerId": 3, - "issuerName": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js", - "issuerPath": [ - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\tweb\\src\\index.hbs", - "name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs", - "profile": { - "factory": 3548, - "building": 3389 - } - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\handlebars\\runtime.js", - "name": "./node_modules/handlebars/runtime.js", - "profile": { - "factory": 1060, - "building": 6324 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "profile": { - "factory": 1871, - "building": 495 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars/base.js", - "profile": { - "factory": 895, - "building": 15, - "dependencies": 1092 - } - }, - { - "id": 3, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js", - "profile": { - "factory": 1099, - "building": 75, - "dependencies": 0 - } - } - ], - "profile": { - "factory": 27, - "building": 17, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 3, - "moduleIdentifier": "F:\\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": "F:\\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": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js", - "issuerId": 2, - "issuerName": "./node_modules/handlebars/dist/cjs/handlebars/base.js", - "issuerPath": [ - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\tweb\\src\\index.hbs", - "name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs", - "profile": { - "factory": 3548, - "building": 3389 - } - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\handlebars\\runtime.js", - "name": "./node_modules/handlebars/runtime.js", - "profile": { - "factory": 1060, - "building": 6324 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "profile": { - "factory": 1871, - "building": 495 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars/base.js", - "profile": { - "factory": 895, - "building": 15, - "dependencies": 1092 - } - } - ], - "profile": { - "factory": 1099, - "building": 75, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 2, - "moduleIdentifier": "F:\\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": "F:\\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": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\decorators.js", - "issuerId": 17, - "issuerName": "./node_modules/handlebars/dist/cjs/handlebars/decorators.js", - "issuerPath": [ - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\tweb\\src\\index.hbs", - "name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs", - "profile": { - "factory": 3548, - "building": 3389 - } - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\handlebars\\runtime.js", - "name": "./node_modules/handlebars/runtime.js", - "profile": { - "factory": 1060, - "building": 6324 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "profile": { - "factory": 1871, - "building": 495 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars/base.js", - "profile": { - "factory": 895, - "building": 15, - "dependencies": 1092 - } - }, - { - "id": 17, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\decorators.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars/decorators.js", - "profile": { - "factory": 1099, - "building": 75, - "dependencies": 0 - } - } - ], - "profile": { - "factory": 26, - "building": 18, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 17, - "moduleIdentifier": "F:\\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": "F:\\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": "F:\\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": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\tweb\\src\\index.hbs", - "name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs", - "profile": { - "factory": 3548, - "building": 3389 - } - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\handlebars\\runtime.js", - "name": "./node_modules/handlebars/runtime.js", - "profile": { - "factory": 1060, - "building": 6324 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "profile": { - "factory": 1871, - "building": 495 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars/base.js", - "profile": { - "factory": 895, - "building": 15, - "dependencies": 1092 - } - }, - { - "id": 6, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\internal\\proto-access.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars/internal/proto-access.js", - "profile": { - "factory": 1099, - "building": 75, - "dependencies": 0 - } - } - ], - "profile": { - "factory": 29, - "building": 16, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 6, - "moduleIdentifier": "F:\\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": "F:\\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": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "issuerId": 9, - "issuerName": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "issuerPath": [ - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\tweb\\src\\index.hbs", - "name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs", - "profile": { - "factory": 3548, - "building": 3389 - } - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\handlebars\\runtime.js", - "name": "./node_modules/handlebars/runtime.js", - "profile": { - "factory": 1060, - "building": 6324 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "profile": { - "factory": 1871, - "building": 495 - } - } - ], - "profile": { - "factory": 895, - "building": 15, - "dependencies": 1092 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 9, - "moduleIdentifier": "F:\\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": "F:\\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": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "issuerId": 9, - "issuerName": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "issuerPath": [ - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\tweb\\src\\index.hbs", - "name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs", - "profile": { - "factory": 3548, - "building": 3389 - } - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\handlebars\\runtime.js", - "name": "./node_modules/handlebars/runtime.js", - "profile": { - "factory": 1060, - "building": 6324 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "profile": { - "factory": 1871, - "building": 495 - } - } - ], - "profile": { - "factory": 895, - "building": 15, - "dependencies": 1092 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 9, - "moduleIdentifier": "F:\\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": "F:\\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": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\runtime.js", - "issuerId": 21, - "issuerName": "./node_modules/handlebars/dist/cjs/handlebars/runtime.js", - "issuerPath": [ - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\tweb\\src\\index.hbs", - "name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs", - "profile": { - "factory": 3548, - "building": 3389 - } - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\handlebars\\runtime.js", - "name": "./node_modules/handlebars/runtime.js", - "profile": { - "factory": 1060, - "building": 6324 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "profile": { - "factory": 1871, - "building": 495 - } - }, - { - "id": 21, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\runtime.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars/runtime.js", - "profile": { - "factory": 895, - "building": 15, - "dependencies": 1092 - } - } - ], - "profile": { - "factory": 1092, - "building": 74 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 21, - "moduleIdentifier": "F:\\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": "F:\\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": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "issuerId": 9, - "issuerName": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "issuerPath": [ - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\tweb\\src\\index.hbs", - "name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs", - "profile": { - "factory": 3548, - "building": 3389 - } - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\handlebars\\runtime.js", - "name": "./node_modules/handlebars/runtime.js", - "profile": { - "factory": 1060, - "building": 6324 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "profile": { - "factory": 1871, - "building": 495 - } - } - ], - "profile": { - "factory": 895, - "building": 15, - "dependencies": 1092 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 9, - "moduleIdentifier": "F:\\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": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\src\\index.hbs", - "reasons": [] - } - ] - } - ], - "modules": [ - { - "id": 0, - "identifier": "F:\\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": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "issuerId": 9, - "issuerName": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "issuerPath": [ - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\tweb\\src\\index.hbs", - "name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs", - "profile": { - "factory": 3548, - "building": 3389 - } - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\handlebars\\runtime.js", - "name": "./node_modules/handlebars/runtime.js", - "profile": { - "factory": 1060, - "building": 6324 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "profile": { - "factory": 1871, - "building": 495 - } - } - ], - "profile": { - "factory": 895, - "building": 15, - "dependencies": 1092 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 2, - "moduleIdentifier": "F:\\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": "F:\\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": "F:\\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": "F:\\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": "F:\\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": "F:\\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": "F:\\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": "F:\\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": "F:\\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": "F:\\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 '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": ''',\n '`': '`',\n '=': '='\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": "F:\\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": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "issuerId": 9, - "issuerName": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "issuerPath": [ - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\tweb\\src\\index.hbs", - "name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs", - "profile": { - "factory": 3548, - "building": 3389 - } - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\handlebars\\runtime.js", - "name": "./node_modules/handlebars/runtime.js", - "profile": { - "factory": 1060, - "building": 6324 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "profile": { - "factory": 1871, - "building": 495 - } - } - ], - "profile": { - "factory": 895, - "building": 15, - "dependencies": 1092 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 2, - "moduleIdentifier": "F:\\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": "F:\\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": "F:\\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": "F:\\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": "F:\\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": "F:\\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": "F:\\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": "F:\\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": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "issuerId": 9, - "issuerName": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "issuerPath": [ - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\tweb\\src\\index.hbs", - "name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs", - "profile": { - "factory": 3548, - "building": 3389 - } - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\handlebars\\runtime.js", - "name": "./node_modules/handlebars/runtime.js", - "profile": { - "factory": 1060, - "building": 6324 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "profile": { - "factory": 1871, - "building": 495 - } - } - ], - "profile": { - "factory": 895, - "building": 15, - "dependencies": 1092 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 9, - "moduleIdentifier": "F:\\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": "F:\\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": "F:\\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": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js", - "issuerId": 2, - "issuerName": "./node_modules/handlebars/dist/cjs/handlebars/base.js", - "issuerPath": [ - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\tweb\\src\\index.hbs", - "name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs", - "profile": { - "factory": 3548, - "building": 3389 - } - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\handlebars\\runtime.js", - "name": "./node_modules/handlebars/runtime.js", - "profile": { - "factory": 1060, - "building": 6324 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "profile": { - "factory": 1871, - "building": 495 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars/base.js", - "profile": { - "factory": 895, - "building": 15, - "dependencies": 1092 - } - } - ], - "profile": { - "factory": 1099, - "building": 75, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 2, - "moduleIdentifier": "F:\\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": "F:\\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": "F:\\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": "F:\\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": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\tweb\\src\\index.hbs", - "name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs", - "profile": { - "factory": 3548, - "building": 3389 - } - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\handlebars\\runtime.js", - "name": "./node_modules/handlebars/runtime.js", - "profile": { - "factory": 1060, - "building": 6324 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "profile": { - "factory": 1871, - "building": 495 - } - }, - { - "id": 23, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\no-conflict.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars/no-conflict.js", - "profile": { - "factory": 895, - "building": 15, - "dependencies": 1092 - } - } - ], - "profile": { - "factory": 1090, - "building": 76 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 11, - "moduleIdentifier": "F:\\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": "F:\\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": "F:\\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": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js", - "issuerId": 2, - "issuerName": "./node_modules/handlebars/dist/cjs/handlebars/base.js", - "issuerPath": [ - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\tweb\\src\\index.hbs", - "name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs", - "profile": { - "factory": 3548, - "building": 3389 - } - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\handlebars\\runtime.js", - "name": "./node_modules/handlebars/runtime.js", - "profile": { - "factory": 1060, - "building": 6324 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "profile": { - "factory": 1871, - "building": 495 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars/base.js", - "profile": { - "factory": 895, - "building": 15, - "dependencies": 1092 - } - } - ], - "profile": { - "factory": 1099, - "building": 75, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 2, - "moduleIdentifier": "F:\\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": "F:\\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": "F:\\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": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js", - "issuerId": 2, - "issuerName": "./node_modules/handlebars/dist/cjs/handlebars/base.js", - "issuerPath": [ - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\tweb\\src\\index.hbs", - "name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs", - "profile": { - "factory": 3548, - "building": 3389 - } - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\handlebars\\runtime.js", - "name": "./node_modules/handlebars/runtime.js", - "profile": { - "factory": 1060, - "building": 6324 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "profile": { - "factory": 1871, - "building": 495 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars/base.js", - "profile": { - "factory": 895, - "building": 15, - "dependencies": 1092 - } - } - ], - "profile": { - "factory": 1099, - "building": 75, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 2, - "moduleIdentifier": "F:\\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": "F:\\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": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\tweb\\src\\index.hbs", - "name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs", - "index": 0, - "index2": 23, - "size": 44779, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": null, - "issuerId": null, - "issuerName": null, - "issuerPath": null, - "profile": { - "factory": 3548, - "building": 3389 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": null, - "moduleIdentifier": null, - "module": null, - "moduleName": null, - "type": "single entry", - "userRequest": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\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 \" \\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 \" \\r\\n\";\n},\"5\":function(container,depth0,helpers,partials,data) {\n return \" \\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 \" \\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 \"\\r\\n\\r\\n\\r\\n\\r\\n \\r\\n Telegram Web\\r\\n \\r\\n \\r\\n\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\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 + \"\\r\\n\\r\\n\\r\\n \\r\\n \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n \\r\\n \\r\\n \\r\\n
        \\r\\n

        Sign in to Telegram

        \\r\\n

        Please confirm your country and
        enter your phone number.

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

        Scan from mobile Telegram

        \\r\\n

        1. Open Telegram on your phone
        2. Go to settings > Devices > Scan QR
        3. Scan this image to Log in

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

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

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

        Enter a password

        \\r\\n

        Your account is protected with
        an additional password

        \\r\\n
        \\r\\n
        \\r\\n \\r\\n \\r\\n \\r\\n
        \\r\\n \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n \\r\\n
        Drag to Reposition
        \\r\\n
        \\r\\n
        \\r\\n \\r\\n \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        Forward
        \\r\\n
        Download
        \\r\\n
        Delete
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n \\r\\n
        Send Photo
        \\r\\n \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n \\r\\n \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        \\r\\n
        New Group
        \\r\\n
        Contacts
        \\r\\n
        Archived
        \\r\\n
        Saved
        \\r\\n
        Settings
        \\r\\n
        Help
        \\r\\n
        \\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
          Archived Chats
          \\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
              New Channel
              \\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
              You can provide an optional description for your channel.
              \\r\\n \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n \\r\\n
              Add Members
              \\r\\n
              \\r\\n
              \\r\\n \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n \\r\\n
              New Group
              \\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
              Settings
              \\r\\n
              \\r\\n
              \\r\\n
              Log Out
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n

              Edit Profile

              \\r\\n

              Chat Folders

              \\r\\n

              General Settings

              \\r\\n

              Notifications

              \\r\\n

              Privacy and Security

              \\r\\n

              Language

              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n \\r\\n
              Edit Profile
              \\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
              Any details such as age, occupation or city. Example:
              23 y.o. designer from San Francisco.
              \\r\\n
              \\r\\n
              Username
              \\r\\n
              \\r\\n
              \\r\\n \\r\\n \\r\\n
              \\r\\n
              \\r\\n
              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.

              You can use a-z, 0-9 and underscores. Minimum length is 5 characters.

              This link opens a chat with you:\\r\\n
              \\r\\n
              \\r\\n
              \\r\\n \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n \\r\\n
              Chat Folders
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              Create folders for different groups of chats
              and quickly switch between them.
              \\r\\n \\r\\n
              \\r\\n
              \\r\\n
              Folders
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              Recommended folders
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              Delete Folder
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              Choose chats and types of chats that will
              appear and never appear in this folder.
              \\r\\n
              \\r\\n
              \\r\\n \\r\\n \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              Included chats
              \\r\\n
              \\r\\n

              Add Chats

              \\r\\n

              Contacts

              \\r\\n

              Non-Contacts

              \\r\\n

              Groups

              \\r\\n

              Channels

              \\r\\n

              Bots

              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              Excluded chats
              \\r\\n
              \\r\\n

              Remove Chats

              \\r\\n

              Muted

              \\r\\n

              Archived

              \\r\\n

              Read

              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n \\r\\n
              \\r\\n
              \\r\\n \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              Search
              \\r\\n
              Mute
              \\r\\n
              Delete and Leave
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              Reply
              \\r\\n
              Edit
              \\r\\n
              Copy
              \\r\\n
              Pin
              \\r\\n
              Forward
              \\r\\n
              Delete
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n \\r\\n \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n \\r\\n
              \\r\\n \\r\\n
              \\r\\n
              \\r\\n \\r\\n
              \\r\\n
              \\r\\n \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n \\r\\n
              Info
              \\r\\n \\r\\n \\r\\n \\r\\n
              \\r\\n \\r\\n \\r\\n \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n \\r\\n
              \\r\\n
              \\r\\n \\r\\n
              \\r\\n

              \\r\\n

              Bio

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

              \\r\\n

              Username

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

              \\r\\n

              Phone

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

              Enabled

              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n
              \\r\\n \\r\\n
              Forward
              \\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
              Results
              \\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\"\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\":688,\"column\":2},\"end\":{\"line\":690,\"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\":691,\"column\":2},\"end\":{\"line\":693,\"column\":12}}})) != null ? stack1 : \"\")\n + \"\\r\\n\";\n},\"useData\":true});" - }, - { - "id": 8, - "identifier": "F:\\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": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\tweb\\src\\index.hbs", - "issuerId": 7, - "issuerName": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs", - "issuerPath": [ - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\tweb\\src\\index.hbs", - "name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs", - "profile": { - "factory": 3548, - "building": 3389 - } - } - ], - "profile": { - "factory": 1060, - "building": 6324 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 7, - "moduleIdentifier": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\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": "F:\\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": "F:\\tweb\\node_modules\\handlebars\\runtime.js", - "issuerId": 8, - "issuerName": "./node_modules/handlebars/runtime.js", - "issuerPath": [ - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\tweb\\src\\index.hbs", - "name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs", - "profile": { - "factory": 3548, - "building": 3389 - } - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\handlebars\\runtime.js", - "name": "./node_modules/handlebars/runtime.js", - "profile": { - "factory": 1060, - "building": 6324 - } - } - ], - "profile": { - "factory": 1871, - "building": 495 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 8, - "moduleIdentifier": "F:\\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": "F:\\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": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js", - "issuerId": 3, - "issuerName": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js", - "issuerPath": [ - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\tweb\\src\\index.hbs", - "name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs", - "profile": { - "factory": 3548, - "building": 3389 - } - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\handlebars\\runtime.js", - "name": "./node_modules/handlebars/runtime.js", - "profile": { - "factory": 1060, - "building": 6324 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "profile": { - "factory": 1871, - "building": 495 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars/base.js", - "profile": { - "factory": 895, - "building": 15, - "dependencies": 1092 - } - }, - { - "id": 3, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js", - "profile": { - "factory": 1099, - "building": 75, - "dependencies": 0 - } - } - ], - "profile": { - "factory": 27, - "building": 17, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 3, - "moduleIdentifier": "F:\\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": "F:\\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": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js", - "issuerId": 3, - "issuerName": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js", - "issuerPath": [ - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\tweb\\src\\index.hbs", - "name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs", - "profile": { - "factory": 3548, - "building": 3389 - } - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\handlebars\\runtime.js", - "name": "./node_modules/handlebars/runtime.js", - "profile": { - "factory": 1060, - "building": 6324 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "profile": { - "factory": 1871, - "building": 495 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars/base.js", - "profile": { - "factory": 895, - "building": 15, - "dependencies": 1092 - } - }, - { - "id": 3, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js", - "profile": { - "factory": 1099, - "building": 75, - "dependencies": 0 - } - } - ], - "profile": { - "factory": 27, - "building": 17, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 3, - "moduleIdentifier": "F:\\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": "F:\\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": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js", - "issuerId": 3, - "issuerName": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js", - "issuerPath": [ - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\tweb\\src\\index.hbs", - "name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs", - "profile": { - "factory": 3548, - "building": 3389 - } - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\handlebars\\runtime.js", - "name": "./node_modules/handlebars/runtime.js", - "profile": { - "factory": 1060, - "building": 6324 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "profile": { - "factory": 1871, - "building": 495 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars/base.js", - "profile": { - "factory": 895, - "building": 15, - "dependencies": 1092 - } - }, - { - "id": 3, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js", - "profile": { - "factory": 1099, - "building": 75, - "dependencies": 0 - } - } - ], - "profile": { - "factory": 27, - "building": 17, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 3, - "moduleIdentifier": "F:\\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": "F:\\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": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js", - "issuerId": 3, - "issuerName": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js", - "issuerPath": [ - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\tweb\\src\\index.hbs", - "name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs", - "profile": { - "factory": 3548, - "building": 3389 - } - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\handlebars\\runtime.js", - "name": "./node_modules/handlebars/runtime.js", - "profile": { - "factory": 1060, - "building": 6324 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "profile": { - "factory": 1871, - "building": 495 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars/base.js", - "profile": { - "factory": 895, - "building": 15, - "dependencies": 1092 - } - }, - { - "id": 3, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js", - "profile": { - "factory": 1099, - "building": 75, - "dependencies": 0 - } - } - ], - "profile": { - "factory": 27, - "building": 17, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 3, - "moduleIdentifier": "F:\\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": "F:\\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": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js", - "issuerId": 3, - "issuerName": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js", - "issuerPath": [ - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\tweb\\src\\index.hbs", - "name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs", - "profile": { - "factory": 3548, - "building": 3389 - } - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\handlebars\\runtime.js", - "name": "./node_modules/handlebars/runtime.js", - "profile": { - "factory": 1060, - "building": 6324 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "profile": { - "factory": 1871, - "building": 495 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars/base.js", - "profile": { - "factory": 895, - "building": 15, - "dependencies": 1092 - } - }, - { - "id": 3, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js", - "profile": { - "factory": 1099, - "building": 75, - "dependencies": 0 - } - } - ], - "profile": { - "factory": 27, - "building": 17, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 3, - "moduleIdentifier": "F:\\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": "F:\\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": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js", - "issuerId": 3, - "issuerName": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js", - "issuerPath": [ - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\tweb\\src\\index.hbs", - "name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs", - "profile": { - "factory": 3548, - "building": 3389 - } - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\handlebars\\runtime.js", - "name": "./node_modules/handlebars/runtime.js", - "profile": { - "factory": 1060, - "building": 6324 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "profile": { - "factory": 1871, - "building": 495 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars/base.js", - "profile": { - "factory": 895, - "building": 15, - "dependencies": 1092 - } - }, - { - "id": 3, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js", - "profile": { - "factory": 1099, - "building": 75, - "dependencies": 0 - } - } - ], - "profile": { - "factory": 27, - "building": 17, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 3, - "moduleIdentifier": "F:\\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": "F:\\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": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js", - "issuerId": 3, - "issuerName": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js", - "issuerPath": [ - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\tweb\\src\\index.hbs", - "name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs", - "profile": { - "factory": 3548, - "building": 3389 - } - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\handlebars\\runtime.js", - "name": "./node_modules/handlebars/runtime.js", - "profile": { - "factory": 1060, - "building": 6324 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "profile": { - "factory": 1871, - "building": 495 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars/base.js", - "profile": { - "factory": 895, - "building": 15, - "dependencies": 1092 - } - }, - { - "id": 3, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js", - "profile": { - "factory": 1099, - "building": 75, - "dependencies": 0 - } - } - ], - "profile": { - "factory": 27, - "building": 17, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 3, - "moduleIdentifier": "F:\\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": "F:\\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": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js", - "issuerId": 2, - "issuerName": "./node_modules/handlebars/dist/cjs/handlebars/base.js", - "issuerPath": [ - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\tweb\\src\\index.hbs", - "name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs", - "profile": { - "factory": 3548, - "building": 3389 - } - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\handlebars\\runtime.js", - "name": "./node_modules/handlebars/runtime.js", - "profile": { - "factory": 1060, - "building": 6324 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "profile": { - "factory": 1871, - "building": 495 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars/base.js", - "profile": { - "factory": 895, - "building": 15, - "dependencies": 1092 - } - } - ], - "profile": { - "factory": 1099, - "building": 75, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 2, - "moduleIdentifier": "F:\\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": "F:\\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": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\decorators.js", - "issuerId": 17, - "issuerName": "./node_modules/handlebars/dist/cjs/handlebars/decorators.js", - "issuerPath": [ - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\tweb\\src\\index.hbs", - "name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs", - "profile": { - "factory": 3548, - "building": 3389 - } - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\handlebars\\runtime.js", - "name": "./node_modules/handlebars/runtime.js", - "profile": { - "factory": 1060, - "building": 6324 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "profile": { - "factory": 1871, - "building": 495 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars/base.js", - "profile": { - "factory": 895, - "building": 15, - "dependencies": 1092 - } - }, - { - "id": 17, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\decorators.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars/decorators.js", - "profile": { - "factory": 1099, - "building": 75, - "dependencies": 0 - } - } - ], - "profile": { - "factory": 26, - "building": 18, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 17, - "moduleIdentifier": "F:\\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": "F:\\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": "F:\\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": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\tweb\\src\\index.hbs", - "name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs", - "profile": { - "factory": 3548, - "building": 3389 - } - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\handlebars\\runtime.js", - "name": "./node_modules/handlebars/runtime.js", - "profile": { - "factory": 1060, - "building": 6324 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "profile": { - "factory": 1871, - "building": 495 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars/base.js", - "profile": { - "factory": 895, - "building": 15, - "dependencies": 1092 - } - }, - { - "id": 6, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\internal\\proto-access.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars/internal/proto-access.js", - "profile": { - "factory": 1099, - "building": 75, - "dependencies": 0 - } - } - ], - "profile": { - "factory": 29, - "building": 16, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 6, - "moduleIdentifier": "F:\\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": "F:\\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": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "issuerId": 9, - "issuerName": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "issuerPath": [ - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\tweb\\src\\index.hbs", - "name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs", - "profile": { - "factory": 3548, - "building": 3389 - } - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\handlebars\\runtime.js", - "name": "./node_modules/handlebars/runtime.js", - "profile": { - "factory": 1060, - "building": 6324 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "profile": { - "factory": 1871, - "building": 495 - } - } - ], - "profile": { - "factory": 895, - "building": 15, - "dependencies": 1092 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 9, - "moduleIdentifier": "F:\\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": "F:\\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": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "issuerId": 9, - "issuerName": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "issuerPath": [ - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\tweb\\src\\index.hbs", - "name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs", - "profile": { - "factory": 3548, - "building": 3389 - } - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\handlebars\\runtime.js", - "name": "./node_modules/handlebars/runtime.js", - "profile": { - "factory": 1060, - "building": 6324 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "profile": { - "factory": 1871, - "building": 495 - } - } - ], - "profile": { - "factory": 895, - "building": 15, - "dependencies": 1092 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 9, - "moduleIdentifier": "F:\\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": "F:\\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": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\runtime.js", - "issuerId": 21, - "issuerName": "./node_modules/handlebars/dist/cjs/handlebars/runtime.js", - "issuerPath": [ - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\tweb\\src\\index.hbs", - "name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs", - "profile": { - "factory": 3548, - "building": 3389 - } - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\handlebars\\runtime.js", - "name": "./node_modules/handlebars/runtime.js", - "profile": { - "factory": 1060, - "building": 6324 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "profile": { - "factory": 1871, - "building": 495 - } - }, - { - "id": 21, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\runtime.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars/runtime.js", - "profile": { - "factory": 895, - "building": 15, - "dependencies": 1092 - } - } - ], - "profile": { - "factory": 1092, - "building": 74 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 21, - "moduleIdentifier": "F:\\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": "F:\\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": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "issuerId": 9, - "issuerName": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "issuerPath": [ - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\node_modules\\handlebars-loader\\index.js!F:\\tweb\\src\\index.hbs", - "name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs", - "profile": { - "factory": 3548, - "building": 3389 - } - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\handlebars\\runtime.js", - "name": "./node_modules/handlebars/runtime.js", - "profile": { - "factory": 1060, - "building": 6324 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js", - "name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js", - "profile": { - "factory": 1871, - "building": 495 - } - } - ], - "profile": { - "factory": 895, - "building": 15, - "dependencies": 1092 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 9, - "moduleIdentifier": "F:\\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": "F:\\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": 6734, - "names": [ - "mini-css-extract-plugin" - ], - "files": [ - "*" - ], - "hash": "428b4224518a320e3112", - "siblings": [], - "parents": [], - "children": [], - "childrenByOrder": {}, - "modules": [ - { - "id": 0, - "identifier": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\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": 4217, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": null, - "issuerId": null, - "issuerName": null, - "issuerPath": null, - "profile": { - "factory": 3, - "building": 8957 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": null, - "moduleIdentifier": null, - "module": null, - "moduleName": null, - "type": "single entry", - "userRequest": "!!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\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-center{text-align:center}.justify-start{justify-content:flex-start !important}.justify-self-start{justify-self:flex-start !important}.justify-self-end{justify-self:flex-end !important}.position-center{position:absolute;left:50%;top:50%;transform:translate(-50%, -50%)}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": "F:\\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": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\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": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\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": 3, - "building": 8957 - } - } - ], - "profile": { - "factory": 0, - "building": 1267 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 0, - "moduleIdentifier": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\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": "!!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\tweb\\src\\materialize.scss", - "reasons": [] - } - ] - } - ], - "modules": [ - { - "id": 0, - "identifier": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\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": 4217, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": null, - "issuerId": null, - "issuerName": null, - "issuerPath": null, - "profile": { - "factory": 3, - "building": 8957 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": null, - "moduleIdentifier": null, - "module": null, - "moduleName": null, - "type": "single entry", - "userRequest": "!!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\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-center{text-align:center}.justify-start{justify-content:flex-start !important}.justify-self-start{justify-self:flex-start !important}.justify-self-end{justify-self:flex-end !important}.position-center{position:absolute;left:50%;top:50%;transform:translate(-50%, -50%)}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": "F:\\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": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\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": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\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": 3, - "building": 8957 - } - } - ], - "profile": { - "factory": 0, - "building": 1267 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 0, - "moduleIdentifier": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\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": "F:\\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": 139287, - "names": [ - "mini-css-extract-plugin" - ], - "files": [ - "*" - ], - "hash": "bcf7ba4de8f2cf24eda6", - "siblings": [], - "parents": [], - "children": [], - "childrenByOrder": {}, - "modules": [ - { - "id": 0, - "identifier": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\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": 136770, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": null, - "issuerId": null, - "issuerName": null, - "issuerPath": null, - "profile": { - "factory": 146, - "building": 12945 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": null, - "moduleIdentifier": null, - "module": null, - "moduleName": null, - "type": "single entry", - "userRequest": "!!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\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, \":root{--layer-transition: .2s ease-in-out}@media only screen and (max-width: 896px){:root{--right-column-width: 100vw}}@media only screen and (min-width: 897px){:root{--right-column-width: calc(1680px / 4)}}.chats-container{position:relative}@media only screen and (max-width: 896px){.chats-container .search-group-recent.search-group{padding:2px 0 0}}.chats-container .input-search{position:relative;width:100%;margin-left:22px;margin-right:4px}@media only screen and (max-width: 896px){.chats-container .input-search{margin-left:16px}}.chats-container .input-search input{background-color:rgba(112,117,121,0.08);border:2px solid transparent;height:40px;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 .input-search .tgico-close{left:auto;right:0px}.chats-container .input-search input:-moz-placeholder-shown ~ .tgico-close{display:none}.chats-container .input-search input:-ms-input-placeholder ~ .tgico-close{display:none}.chats-container .input-search input:placeholder-shown ~ .tgico-close{display:none}.chats-container ul{margin:0;display:flex;flex-direction:column;width:100%;-webkit-user-select:none;-webkit-touch-callout:none}html.is-mac .chats-container ul{transform:translateZ(0)}.chats-container li{background-color:#fff}@media only screen and (max-width: 896px){.chats-container li{padding-bottom:0px}}.chats-container li.is-muted .user-title:after{content:\\\"\\\";color:#a3a3a3;font-size:1.125rem;line-height:27px;vertical-align:middle;margin-left:.125rem;display:inline-block;height:29px}.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 8px;overflow:hidden}@media not all and (min-resolution: 0.001dpcm){@supports (-webkit-appearance: none){.chats-container li>.rp{margin-right:3px}}}@media only screen and (max-width: 896px){.chats-container li>.rp{padding:9px 12px 0 9px !important;border-radius:0;margin:0;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;flex:0 0 auto}.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 8.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 i.verified-icon{content:\\\" \\\";background:url(assets/img/icon-verified.svg);display:inline-block;width:20px;height:20px;vertical-align:text-bottom;margin-left:.125rem}.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:-3px;flex:0 0 auto}.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%;padding:1rem 0 .5rem;margin-bottom:.5rem}@media only screen and (max-width: 896px){.chats-container .search-group{margin-bottom:0}}.chats-container .search-group__name{color:#707579;padding:0 23px;padding-bottom:1rem;font-weight:500;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@media only screen and (max-width: 896px){.chats-container .search-group__name{padding:0 9px 0 16px;font-size:15px}}.chats-container .search-group-contacts{padding:16px 0 7px}@media only screen and (max-width: 896px){.chats-container .search-group-contacts{padding:7px 0 0px}}.chats-container .search-group-contacts .search-group__name{padding-bottom:17px}@media only screen and (max-width: 896px){.chats-container .search-group-contacts .search-group__name{padding-bottom:0}}.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}@media only screen and (max-width: 896px){.contacts-container li,.search-group-contacts li{padding:0}}.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}@media only screen and (max-width: 896px){.contacts-container .user-caption,.search-group-contacts .user-caption{padding:0px 4px 0px 14px}}.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}@media only screen and (max-width: 896px){.contacts-container p,.search-group-contacts p{height:26px}}.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}@media only screen and (max-width: 896px){#bubble-contextmenu>div{padding:0 60px 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:0px 1px 5px -1px rgba(0,0,0,0.21);z-index:1;min-height:56px;max-height:56px}@media only screen and (max-width: 896px){#topbar.is-audio-shown+#bubbles,#topbar.is-pinned-shown:not(.hide-pinned)+#bubbles{margin-top:52px}#topbar.is-pinned-shown:not(.hide-pinned):not(.is-audio-shown) .pinned-message{display:flex}}@media only screen and (min-width: 897px){#topbar{border-left:1px solid #DADCE0;border-right:1px solid #DADCE0}#topbar .sidebar-close-button,#topbar .menu-search{display:none}#topbar.is-pinned-shown:not(.hide-pinned) .pinned-message{display:flex}}@media only screen and (max-width: 896px){#topbar .chat-mute-button,#topbar .chat-search-button{display:none}}#topbar .chat-more-button .btn-menu{top:calc(100% + 7px)}@media only screen and (max-width: 896px){#topbar .chat-more-button .btn-menu{top:29px}}@media only screen and (max-width: 896px){#topbar .chat-more-button{margin-left:0}}#topbar .chat-info{flex:1 1 auto;overflow:hidden}@media only screen and (min-width: 1276px){body.is-right-column-shown #topbar .chat-info{max-width:calc(100% - var(--right-column-width) * 1.6)}}@media only screen and (min-width: 1276px){body.is-right-column-shown #topbar.is-pinned-shown .chat-info{max-width:calc(100% - var(--right-column-width) * 1.75)}body.is-right-column-shown #topbar.is-pinned-shown.is-audio-shown .chat-info{max-width:calc(100% - var(--right-column-width) * 2.25)}}#topbar .chat-utils{display:flex;align-items:center;flex:0 0 auto}@media only screen and (min-width: 1276px){#topbar .chat-utils{transition:transform .2s ease-in-out;transition:transform var(--layer-transition)}body.is-right-column-shown #topbar .chat-utils{transform:translate3d(calc(var(--right-column-width) * -1), 0, 0)}body.animation-level-0 #topbar .chat-utils{transition:none}}#topbar .chat-join{width:auto;width:117px;height:36px;font-weight:400;font-size:0.875rem;margin-right:.5rem}#topbar .chat-join:not(.hide)+.chat-mute-button{display:none}#topbar .content{flex:1 1 auto;padding-left:10px;max-width:100%;overflow:hidden}@media only screen and (max-width: 896px){#topbar .content{max-width:208px}}#topbar .person{display:flex;align-items:center;cursor:pointer;margin-left:7px}@media only screen and (max-width: 896px){#topbar .person{margin-left:10px}}#topbar .person .bottom{font-size:14px;color:#707579}#topbar .person .bottom .online{color:#50a2e9}#topbar #im-avatar{width:40px;height:40px;line-height:40px;font-size:16px;flex:0 0 auto}#topbar #im-avatar:before{font-size:20px}#topbar #im-avatar.tgico-avatar_deletedaccount:before{font-size:40px}#topbar.hide-pinned+#bubbles #bubbles-inner{margin-bottom:.25rem}#chat-input{display:flex;width:100%;max-width:696px;padding-top:.25rem;flex-direction:column;flex:0 0 auto;position:relative}@media only screen and (min-width: 1276px){#chat-input{transition:transform .2s ease-in-out;transition:transform var(--layer-transition)}body.is-right-column-shown #chat-input{transform:translate3d(calc(var(--right-column-width) / -2), 0, 0)}body.animation-level-0 #chat-input{transition:none}}#chat-input .chat-input-container{display:flex;align-items:center;justify-content:space-between}@media only screen and (max-width: 896px){#chat-input .chat-input-container{padding:0 .5rem .5rem}}@media only screen and (min-width: 897px){#chat-input .chat-input-container{padding-bottom:21px}}#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 .toggle-emoticons:before{content:\\\"\\\"}#chat-input .toggle-emoticons.flip-icon:before{content:\\\"\\\"}#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 9px;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:240px;height:240px;transform:scale(0);position:absolute;top:-94px;left:-94px;transition:transform .03s, visibility .1s;visibility:hidden}@media only screen and (max-width: 896px){#chat-input .record-ripple{width:300px;height:300px;top:-124px;left:-124px}}#chat-input.is-recording #btn-record-cancel{opacity:1;visibility:visible;margin-right:9px;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;font-size:18px;line-height:24px;white-space:nowrap;text-overflow:ellipsis;max-width:calc(100% - 1.5rem);overflow:hidden}#im-title span.emoji{vertical-align:inherit}.info#im-subtitle{margin-top:-2px}.chat-container{display:flex;width:100%;align-items:center;flex-direction:column;position:relative}.chat-container .chat-background{overflow:hidden}.chat-container .chat-background,.chat-container .chat-background:before{position:absolute !important;top:0;left:0;bottom:0;right:0}.chat-container .chat-background:before{content:\\\"\\\";display:block;background-image:url(\\\"assets/img/camomile_blurred.jpg\\\");background-size:cover;background-position:center center}@media only screen and (min-width: 1276px){body.animation-level-2 .chat-container .chat-background:before{margin:-16rem -5rem -20rem 0;transform:scale(1);transform-origin:left center;transition:transform .2s ease-in-out;transition:transform var(--layer-transition)}body.animation-level-2.is-right-column-shown .chat-container .chat-background:before{transform:scale(0.67)}}.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}@media only screen and (max-width: 896px){.chat-container .input-message{min-height:46px;padding:.5px .5rem}}.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}@media only screen and (max-width: 896px){.chat-container .pinned-message{position:absolute !important;top:100%;width:100% !important;background:#fff;left:0;max-height:100% !important;height:52px;padding:1rem}.chat-container .pinned-message-subtitle{line-height:13px !important;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;max-width:280px}}.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-media .pinned-message-content,.chat-container .pinned-message.is-media .reply-content,.chat-container .reply.is-media .pinned-message-content,.chat-container .reply.is-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}.chat-container .pinned-container{flex:0 0 auto}@media only screen and (max-width: 896px){.chat-container .pinned-container{box-shadow:0px 1px 3px 0px rgba(0,0,0,0.15)}.chat-container .pinned-container:before{width:100%;content:\\\" \\\";height:52px;left:0;top:0;position:absolute;box-shadow:inset 0px 1px 2px 0px rgba(0,0,0,0.15)}}.chat-container .pinned-container .pinned-message-close,.chat-container .pinned-container .pinned-audio-close,.chat-container .pinned-container .pinned-audio-ico{font-size:1.5rem;position:absolute;display:flex;justify-content:center;right:0}.chat-container .pinned-container .pinned-message-close.tgico-close,.chat-container .pinned-container .pinned-audio-close.tgico-close,.chat-container .pinned-container .pinned-audio-ico.tgico-close{visibility:hidden}@media only screen and (max-width: 896px){.chat-container .pinned-container .pinned-message-close.tgico-close,.chat-container .pinned-container .pinned-audio-close.tgico-close,.chat-container .pinned-container .pinned-audio-ico.tgico-close{font-size:1.4rem;right:9px;visibility:visible}}.chat-container .pinned-audio{display:flex;flex-direction:column;justify-content:center;cursor:pointer}@media only screen and (max-width: 896px){.chat-container .pinned-audio{height:52px;padding-left:58px;background:#fff;width:100%;position:absolute;left:0;top:100%}}@media only screen and (min-width: 897px){.chat-container .pinned-audio{padding-left:2.5rem;padding-right:2.5rem;max-width:210px;position:relative}}.chat-container .pinned-audio-ico{left:0;right:auto !important;color:#50a2e9}@media only screen and (max-width: 896px){.chat-container .pinned-audio-ico{margin-left:20px}}.chat-container .pinned-audio-ico:before{content:\\\"\\\"}.chat-container .pinned-audio-ico.flip-icon:before{content:\\\"\\\"}.chat-container .pinned-audio-title{font-weight:500;width:100%;max-width:100%}.chat-container .pinned-audio-subtitle{color:#707579}.chat-container .pinned-audio-title,.chat-container .pinned-audio-subtitle{white-space:nowrap;text-overflow:ellipsis;font-size:14px;line-height:1.4;overflow:hidden;max-width:240px}#bubbles{width:100%;height:100%;max-height:100%;flex:1 1 auto;overflow:hidden;position:relative;padding:0 .5rem;-webkit-mask-image:-webkit-radial-gradient(circle, white 100%, black 100%)}#bubbles>.scrollable{padding:0 .75rem;height:auto;display:block}@media only screen and (max-width: 896px){#bubbles>.scrollable{padding:0 .5rem}}@media only screen and (min-width: 1276px){#bubbles>.scrollable{transition:transform .2s ease-in-out;transition:transform var(--layer-transition)}body.is-right-column-shown #bubbles>.scrollable{transform:translate3d(calc(var(--right-column-width) / -2), 0, 0)}body.animation-level-0 #bubbles>.scrollable{transition:none}}@media only screen and (min-width: 1276px){#bubbles>.preloader-container{transition:transform .2s ease-in-out;transition:transform var(--layer-transition)}body.is-right-column-shown #bubbles>.preloader-container{transform:translate3d(calc(var(--right-column-width) / -2), 0, 0)}body.animation-level-0 #bubbles>.preloader-container{transition:none}}#bubbles:not(.scrolled-down):not(.search-results-active){-webkit-mask-image:linear-gradient(0deg, transparent 0, #000 20px);mask-image:linear-gradient(0deg, transparent 0, #000 20px)}#bubbles:not(.scrolled-down):not(.search-results-active) #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 .search-group.search-group-messages{padding:0.25rem 0 .5rem}#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;max-width:min(calc(100% - 48px), 696px)}@media only screen and (max-width: 896px){#bubbles-inner{max-width:min(100%, 680px)}html.is-mac #bubbles-inner{-webkit-user-select:none;-webkit-touch-callout:none}}#bubbles-inner.is-chat .is-in .bubble__container{margin-left:45px}@media only screen and (max-width: 896px){#bubbles-inner.is-chat .is-in .bubble__container{max-width:calc(100% - 5.5625rem)}}#bubbles-inner.is-channel:not(.is-chat) .bubble__container{max-width:100%}#bubbles-inner.is-channel:not(.is-chat) .bubble.with-beside-button .bubble__container{max-width:calc(100% - 2.875rem) !important}#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:0.99999}#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}@media only screen and (max-width: 896px){#bubbles-go-down{width:2.875rem;height:2.875rem}}#bubbles-go-down:before{margin-left:.75px}@media only screen and (max-width: 896px){#bubbles-go-down{right:.5rem}}@media only screen and (min-width: 1276px){#bubbles-go-down{transition:transform .2s ease-in-out;transition:transform var(--layer-transition)}body.is-right-column-shown #bubbles-go-down{transform:translate3d(calc(var(--right-column-width) * -1), 0, 0)}body.animation-level-0 #bubbles-go-down{transition:none}}.popup.popup-delete-message .popup-header{margin-bottom:1rem}.chat-search{position:absolute !important;top:0;z-index:2}.chat-search-footer{height:46px;padding:0 8px;flex:0 0 auto;width:100%;background-color:#fff;display:flex;justify-content:space-between;align-items:center;box-shadow:0px -1px 5px -1px rgba(0,0,0,0.21)}.chat-search-footer .chat-search-count{margin-left:8px;color:#949596}.chat-search-footer+#chat-input{display:none}.chat-search-count:empty{display:none}.chat-search-count:not(:empty)+.btn-icon{display:none}.chat-search-controls{display:flex}.chat-search-results{width:100%;height:100%;max-height:100%;overflow:hidden;position:absolute;top:0;left:0;visibility:hidden;opacity:0;background-color:#fff;transition:.2s ease}.chat-search-results.active{opacity:1;visibility:visible}.chat-search .tgico-up{margin-right:2px}.quiz-hint{position:absolute;left:0;display:flex;width:100%;justify-content:center;z-index:5;top:8px;align-items:center;transform:translateY(calc(-100% - 10px));transition:transform .2s ease}.quiz-hint.active{transform:translateY(0)}.quiz-hint .container{background:rgba(0,0,0,0.7);text-align:center;width:auto;padding:10px 18px 12px 50px;min-height:48px;border-radius:12px;line-height:1.5;color:white;font-size:15px;max-width:400px;overflow:hidden;text-align:left;position:relative;display:flex;align-items:center;flex-wrap:wrap}@media only screen and (max-width: 896px){.quiz-hint .container{padding:10px 18px 12px 54px;margin:0 10px;font-size:14px}}.quiz-hint .container .text{word-break:break-word}.quiz-hint .container:before{content:\\\"\\\";position:absolute;left:15px;font-size:1.5rem;top:12px}.quiz-hint .container a{color:white;border-bottom:1px solid white}@-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:.25rem;top:0}.bubble{padding-top:.25rem;position:relative;z-index:1;margin:0 auto}.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% + $bubble-margin)}@media only screen and (max-width: 896px){.bubble.is-first-unread{max-width:unset}}.bubble.is-first-unread:before{content:\\\"Unread messages\\\";height:30px;margin-bottom:.25rem;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:.25rem;z-index:2;transition:opacity .3s ease;opacity:0.99999}.bubble.is-date.is-sticky{opacity:0.00001}#bubbles-inner:not(.is-scrolling) .bubble.is-date.is-sticky .bubble__container{cursor:default}.bubble.is-date .bubble__container{cursor:pointer}.bubble__container{min-width:56px;max-width:100%;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}@media only screen and (min-width: 897px){.bubble__container{max-width:85%}}@media only screen and (max-width: 896px){.bubble__container{max-width:calc(100% - 5.5625rem)}}.bubble__container>.user-avatar{position:absolute;left:-45px;width:40px;height:40px;line-height:40px;bottom:0;font-size:1rem;cursor:pointer}.bubble.service{padding:.25rem 0;max-width:696px}.bubble.service .bubble__container{margin:0 auto;max-width:100%}.bubble-beside-button{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}.bubble .forward svg{width:20px;height:20px}.bubble .message strong{font-weight:500 !important}.bubble.is-group-last{padding-bottom:.25rem}.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 .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 .thumbnail{position:absolute}.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-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 .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}@media only screen and (max-width: 896px){.bubble.is-reply.emoji-big .reply,.bubble.is-reply.sticker .reply{padding:8px 6px 8px 8px;max-width:94px}}.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}@media only screen and (max-width: 896px){.bubble .message.audio-message .audio{height:59px;padding-left:47px}}.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}@media only screen and (max-width: 896px){.bubble .message.audio-message .audio-details{margin-top:-1px}}.bubble .message.audio-message .audio-ico{font-size:2.15rem}@media only screen and (max-width: 896px){.bubble .message.audio-message .audio-ico{margin-top:1px;margin-left:2px}}.bubble .message.audio-message .progress-line{width:191px;margin:9px 0 9px}@media only screen and (max-width: 896px){.bubble .message.audio-message .progress-line{width:unset}}.bubble .message.audio-message .progress-line__filled{background-color:#47aa41;transform-origin:left;height:2px}.bubble .message.audio-message .progress-line__seek{height:2px;overflow:visible !important;background:rgba(124,195,107,0.52)}.bubble .message.audio-message .progress-line__seek::-webkit-slider-thumb{height:12px;width:12px;background:#47aa41;border:none}.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}@media only screen and (max-width: 896px){.bubble .message.document-message .document{padding-left:44px}}.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 !important}.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}.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{min-width:unset}.bubble:not(.forwarded).hide-name .name,.bubble.emoji-big .name{display:none}.bubble .name{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.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 .bubble__container:after,.bubble.video.is-message-empty.is-group-last .bubble__container:after{display:none}.bubble.is-message-empty.is-group-last.with-media-tail .bubble__container:after{display:none}.bubble.is-message-empty.is-group-last.with-media-tail .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;padding-left:14px !important}@media only screen and (max-width: 896px){.bubble-audio .time{padding-left:0px !important}}.bubble.is-in .bubble__container{margin-right:auto;background-color:#ffffff}.bubble.is-in .bubble__container,.bubble.is-in .bubble__container .poll-footer-button{border-radius:6px 12px 12px 6px}.bubble.is-in.is-group-first .bubble__container,.bubble.is-in.is-group-first .poll-footer-button{border-radius:12px 12px 12px 6px}.bubble.is-in.is-group-last .bubble__container,.bubble.is-in.is-group-last .poll-footer-button{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,.bubble.is-in.is-group-first.is-group-last .poll-footer-button{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}@media only screen and (max-width: 896px){.bubble.is-in.is-reply.emoji-big .reply,.bubble.is-in.is-reply.sticker .reply{left:calc(100% + 1px)}}.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;padding-left:36px}.bubble.is-in .time .inner{padding:0 7px 0 5px;margin-bottom:4px}.bubble.is-in.is-message-empty.is-group-last:not(.with-media-tail).photo .bubble__container,.bubble.is-in.is-message-empty.is-group-last:not(.with-media-tail).video .bubble__container{border-bottom-left-radius:6px}.bubble.is-in.is-message-empty.is-group-last.with-media-tail .attachment{border-bottom-left-radius:0}.bubble.is-in.is-message-empty.is-group-last.with-media-tail .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 .progress-line__seek{background:rgba(193,207,220,0.39)}.bubble.is-in .message.audio-message .progress-line__filled{background-color:#0089ff}.bubble.is-in .message.audio-message .progress-line__loaded{background-color:#cacaca}.bubble.is-in .message.audio-message .progress-line input::-webkit-slider-thumb{background:#63a2e3;border:none}.bubble.is-out .bubble__container{margin-left:auto;background-color:#eeffde}.bubble.is-out .bubble__container>.user-avatar{left:auto;right:-2.5rem}.bubble.is-out .bubble__container,.bubble.is-out .bubble__container .poll-footer-button{border-radius:12px 6px 6px 12px}.bubble.is-out.is-group-first .bubble__container,.bubble.is-out.is-group-first .poll-footer-button{border-radius:12px 12px 6px 12px}.bubble.is-out.is-group-last .bubble__container,.bubble.is-out.is-group-last .poll-footer-button{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,.bubble.is-out.is-group-first.is-group-last .poll-footer-button{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:90px !important}.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.is-message-empty.is-group-last:not(.with-media-tail).photo .bubble__container,.bubble.is-out.is-message-empty.is-group-last:not(.with-media-tail).video .bubble__container{border-bottom-right-radius:6px}.bubble.is-out.is-message-empty.is-group-last.with-media-tail .attachment{border-bottom-right-radius:0}.bubble.is-out.is-message-empty.is-group-last.with-media-tail .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 .poll-footer-button{color:#4fae4e}.bubble.is-out poll-element .progress-ring__circle{stroke:#4fae4e}.bubble.is-out.is-sending poll-element{pointer-events:none}.bubble.is-out .progress-line__loaded{background-color:#90e18d !important}.bubble.is-out .bubble-beside-button{right:auto;left:-46px}.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:330px}@media only screen and (max-width: 896px){poll-element{min-width:240px}}poll-element:not(.is-closed):not(.is-voted) .poll-answer{cursor:pointer}poll-element .poll-title{font-weight:500;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@media only screen and (max-width: 896px){poll-element .poll-title{max-width:88%}}poll-element .poll-desc{font-size:14px;color:#707579;margin-top:2px;margin-bottom:7px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:flex;position:relative}poll-element .poll-hint{position:absolute;font-size:1.5rem;top:-4px;right:2px;color:#50a2e9;cursor:pointer;transform:scale(1);transition:transform .2s ease}poll-element .poll-hint.active{transform:scale(0);pointer-events:none}poll-element .poll-send-vote{cursor:default}poll-element .poll-avatars{display:flex;margin-left:18px}poll-element .poll-answer{display:flex;position:relative;padding-bottom:20px;padding-left:28px;margin-top:1px}poll-element .poll-answer-text{margin-top:6px;margin-left:12px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}poll-element .poll-answer-percents{position:absolute;left:0;top:0;opacity:0;font-weight:500;margin-top:7px;font-size:14px;transition:.34s opacity;margin-left:-9px;text-align:right;width:40px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}poll-element .poll-answer-selected{position:absolute;bottom:1px;left:15px;color:#fff;background:#50a2e9;border-radius:50%;height:16px;width:16px;font-weight:bold;font-size:14px;line-height:1.4;opacity:0;-webkit-animation:fadeIn .1s ease forwards;animation:fadeIn .1s ease forwards;animation-direction:reverse;-webkit-animation-delay:.24s;animation-delay:.24s;text-align:center}poll-element .poll-answer-selected:before{content:\\\"\\\";font-weight:bold}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-answer:not(.is-correct):not(.is-chosen) .poll-answer-selected{display:none}poll-element .poll-answer.is-chosing .poll-answer-selected{opacity:1}poll-element .poll-answer.is-chosing ~ .poll-footer .poll-send-vote{cursor:pointer}poll-element .poll-votes-count{color:#707579;font-size:14px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding-top:1px}poll-element .poll-line{height:35px;position:absolute;left:10px;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 .poll-footer{text-align:center;margin-top:7px;height:21px}poll-element .poll-footer-button{cursor:pointer;position:absolute;left:0;margin-top:-7px;width:100%;height:41px;color:#50a2e9;font-weight:500;border-top-left-radius:0 !important;border-top-right-radius:0 !important;font-size:1rem;line-height:37px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden}poll-element .poll-quiz-timer{width:32px;height:32px;stroke:#a3adb6;transform:rotate(270deg);top:-7px;fill:none;position:absolute;right:-2px;stroke-linecap:round}poll-element .poll-time{font-size:12px;font-weight:500;position:absolute;right:27px;color:#a3adb6}poll-element.is-quiz .poll-answer.is-chosen:not(.is-correct) use{stroke:#DF3F40}poll-element.is-quiz .poll-answer.is-chosen:not(.is-correct) .poll-answer-selected{background:#DF3F40}poll-element.is-quiz .poll-answer.is-chosen:not(.is-correct) .poll-answer-selected:before{content:\\\"\\\";font-size:12px}poll-element avatar-element{width:18px;height:18px;border:1px solid #fff;line-height:20px;font-size:10px;cursor:pointer}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;position:absolute;left:-1px;top:-1px;transform:scale(1);transition:.1s transform}poll-element .circle-hover .poll-answer-selected{display:flex !important;opacity:0;left:50%;top:50%;transform:translate(-50%, -50%);width:20px;height:20px;font-size:20px;line-height:16px;-webkit-animation:none;animation:none;transition:opacity .2s ease}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:#dadbdc;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-header{background-color:#fff;display:flex;align-items:center;justify-content:space-between;padding:7.5px 16px;min-height:56px;flex:0 0 auto;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}@media only screen and (max-width: 896px){.sidebar-header{padding:7.5px 8px}}.sidebar-header__title{flex:1;font-weight:500;padding-left:22px;font-size:20px}@media only screen and (max-width: 896px){.sidebar-header__title{padding-left:24px}}.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 .folders-tabs-scrollable{z-index:1;background-color:#fff;border-bottom:1px solid #dadce0}#column-left .folders-tabs-scrollable .scrollable{position:relative}#column-left .folders-tabs-scrollable .menu-horizontal{border-bottom:none}#column-left .folders-tabs-scrollable .menu-horizontal ul{justify-content:space-between;z-index:0}#column-left .folders-tabs-scrollable .menu-horizontal li{height:43px;padding:0 16px;display:flex;justify-content:center;align-items:center}#column-left .folders-tabs-scrollable .menu-horizontal li>span:first-child{overflow:visible}#column-left .folders-tabs-scrollable .menu-horizontal li>span:first-child i{bottom:calc(-.625rem - -2px);padding-right:1rem !important;margin-left:-.5rem !important}#column-left .folders-tabs-scrollable .menu-horizontal__stripe{display:none}#column-left .folders-tabs-scrollable span.unread-count{margin-left:5px;background:#50a2e9;height:20px;border-radius:12px;font-weight:500;color:white;line-height:22px;min-width:20px;padding:0 6px}#column-left .folders-tabs-scrollable span.unread-count:empty{display:none}#column-left .folders-tabs-scrollable:not(.hide)+.scrollable{top:44px;height:calc(100% - 44px)}#column-left #chats-container{max-height:100%;overflow:hidden;position:relative}#column-left #folders-container{min-height:100%}#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)}@media only screen and (max-width: 896px){#column-left .sidebar-header__btn-container .btn-menu{margin-top:-4px}}#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}@media only screen and (max-width: 896px){#column-left .sidebar-tools-button .btn-menu .archived-count{font-size:14px;font-weight:600}}#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}@media only screen and (max-width: 896px){#column-left .search-group-people .rp{width:77px;max-width:77px}}#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}@media only screen and (max-width: 896px){#column-left .search-group-people .user-caption{max-width:56px}}#column-left .search-group-people .user-title{max-width:unset}#column-left .search-group-people .search-group-scrollable{position:relative}@media only screen and (max-width: 896px){#column-left .search-group-people .search-group-scrollable{margin-left:-7px;margin-top:4px}}#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:\\\"\\\"}@media only screen and (max-width: 896px){#column-left .item-main .sidebar-content .btn-corner{transform:translateY(0px);position:fixed !important}}@media only screen and (max-width: 896px){#column-left .item-main .sidebar-content .btn-menu-toggle{width:54px;height:54px;bottom:14px;right:14px}}@media only screen and (min-width: 897px){html.no-touch #column-left .item-main .sidebar-content:hover .btn-corner{transform:translateY(0px)}}#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}@media only screen and (max-width: 896px){.new-channel-container .input-wrapper,.new-group-container .input-wrapper,.edit-profile-container .input-wrapper{width:100%;padding:0 16px}}.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;padding-right:24px}.edit-folder-container .input-wrapper{width:380px;margin:0 auto;flex:0 0 auto}.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}@media only screen and (max-width: 896px){.settings-container .profile-button{padding:0.75rem 0.625rem;height:48px;margin:0 0 2px 0;border-radius:0}}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%}@media only screen and (max-width: 896px){.settings-container .profile-buttons{margin-top:0.6875rem}}.edit-profile-container .caption{margin-top:1.063rem;margin-left:1.438rem;line-height:1.2;padding-bottom:1.438rem}@media only screen and (max-width: 896px){.edit-profile-container .caption{padding-right:24px}}.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%}.chat-folders-container,.edit-folder-container{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.chat-folders-container .sticker-container,.edit-folder-container .sticker-container{width:86px;height:86px;margin:1px auto 29px;flex:0 0 auto}.chat-folders-container .caption,.edit-folder-container .caption{text-align:center;color:#707579;font-size:14px;line-height:1.3}.chat-folders-container .sidebar-left-h2,.edit-folder-container .sidebar-left-h2{color:#707579;font-size:15px;padding:7px 24px 15px 24px;font-weight:500}@media only screen and (max-width: 896px){.chat-folders-container .sidebar-left-h2,.edit-folder-container .sidebar-left-h2{padding:7px 16px 15px 16px}}.chat-folders-container .btn-primary{width:160px;height:40px;align-items:center;margin:15px auto 24px;border-radius:30px;padding:0 12px;display:flex}.chat-folders-container .tgico-add:before{content:\\\"\\\\e903\\\";font-size:24px;margin-right:6px}.chat-folders-container .category{padding:7px 24px 11px 24px;display:flex;justify-content:space-between;cursor:pointer;position:relative;margin-bottom:10px}@media only screen and (max-width: 896px){.chat-folders-container .category{padding:7px 16px 11px 16px}}.chat-folders-container .category p{height:unset}.chat-folders-container .category p:last-child{color:#707579;font-size:14px;line-height:20px}.chat-folders-container .category .btn-primary{height:30px;font-size:15px;width:52px;transition:width 0.2s;margin:5px 0 0 0}.edit-folder-container .caption{margin-bottom:18px}@media only screen and (max-width: 896px){.edit-folder-container .input-wrapper{width:100%;padding:0 16px}.edit-folder-container .input-field input{height:50px}}.edit-folder-container .sidebar-left-h2{padding:21px 24px 8px 24px}@media only screen and (max-width: 896px){.edit-folder-container .sidebar-left-h2{width:100%;padding:21px 16px 8px 16px}}.edit-folder-container .input-wrapper{margin-bottom:10px}.folder-list li{padding-bottom:2px}.folder-list li .rp{padding:8px 11px !important;height:48px !important}@media only screen and (max-width: 896px){.folder-list li .rp{padding:8px 12px !important}}.folder-list avatar-element{height:32px;width:32px}.folder-list .user-caption{padding:6px 28px}.folder-list p span{font-weight:normal}.folder-categories{width:100%}.folder-categories .checkbox{margin-top:-9px !important;right:0;position:absolute}.folder-categories .checkbox [type=\\\"checkbox\\\"]+span{padding-left:46px}@media only screen and (max-width: 896px){.folder-categories .checkbox [type=\\\"checkbox\\\"]+span{padding-left:38px}}.folder-categories .checkbox [type=\\\"checkbox\\\"]:checked+span:before{top:5px;left:0px}.folder-category-button{display:flex;font-size:1.5rem;padding:13px 24px 10px 24px}@media only screen and (max-width: 896px){.folder-category-button{padding:13px 16px 10px 16px}}.folder-category-button p{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin-left:32px;font-size:16px;flex:1 1 auto}.folder-category-button.blue,.folder-category-button.blue:before{color:#50a2e9}.folder-category-button:first-child{cursor:pointer}.folder-category-button:before{color:#797d82}.sidebar-header .tgico-check1{color:#50a2e9}.included-chats-container .sidebar-left-h2{color:#707579;font-size:15px;font-weight:500;padding:6px 24px 8px 24px}@media only screen and (max-width: 896px){.included-chats-container .sidebar-left-h2{padding:6px 16px 8px 16px}}.included-chats-container .selector ul li>.rp{margin:0 8px !important;padding:7px 12px !important;height:62px}@media only screen and (max-width: 896px){.included-chats-container .selector ul li>.rp{margin:0 !important}}.included-chats-container .selector ul .dialog-avatar{width:46px;height:46px}.included-chats-container .selector ul span.user-title{font-weight:500}.included-chats-container .selector ul .user-caption{padding:0px 0px 0 14px;margin-top:-2px}.included-chats-container .selector ul span.user-last-message{font-size:15px;margin-top:2px}.included-chats-container .selector ul .checkbox{margin-top:10px}.included-chats-container .selector ul [type=\\\"checkbox\\\"]+span{padding-left:26px}.included-chats-container .checkbox [type=\\\"checkbox\\\"]+span:after{border-radius:50%;height:20px;width:20px;border-color:#dadbdc}.included-chats-container .checkbox [type=\\\"checkbox\\\"]:checked+span:after{background-color:#4EA4F6;border:none}.included-chats-container .folder-category-button{cursor:pointer}.search-group-recent .search-group__name{display:flex;justify-content:space-between;align-items:center}@media only screen and (max-width: 896px){.search-group-recent li{padding-top:0}}.search-group-recent .btn-icon{font-size:22px}@media only screen and (max-width: 896px){.search-group-recent .user-caption{margin-top:-2px}}@media only screen and (max-width: 896px){.search-group-recent p span.user-title{font-weight:500}}@media only screen and (max-width: 896px){.search-group-recent .dialog-avatar{width:46px;height:46px}}@media only screen and (max-width: 896px){.search-group-recent li>.rp{height:62px}}@media only screen and (max-width: 896px){.search-group-recent.search-group.search-group-contacts ul{margin-top:-2px}}@media only screen and (max-width: 896px){.search-group.search-group-contacts ul,.search-group.search-group-messages ul{margin-top:7px}}@media only screen and (max-width: 896px){.search-group.search-group-messages{margin-top:-6px}}@media only screen and (min-width: 897px){.search-group-recent.search-group.search-group-contacts{padding:0px 0 7px}}#column-right{position:relative}@media only screen and (min-width: 897px) and (max-width: 1275px){#column-right{box-shadow:0 0.25rem 0.5rem 0.1rem rgba(114,114,114,0.25)}}@media only screen and (min-width: 897px){#column-right{width:var(--right-column-width);transition:transform .2s ease-in-out;transition:transform var(--layer-transition);position:absolute;right:0;z-index:3;transform:translate3d(var(--right-column-width), 0, 0)}#column-right .sidebar-content{min-width:var(--right-column-width)}body.is-right-column-shown #column-right{transform:translate3d(0, 0, 0)}body.animation-level-0 #column-right{transition:none}}@media only screen and (min-width: 1276px){#column-right{border-left:1px solid #DADCE0}}#column-right .sidebar-header{flex:0 0 auto}#column-right .sidebar-header .sidebar-close-button:before{content:\\\"\\\"}@media only screen and (min-width: 897px){#column-right .sidebar-header .sidebar-close-button:before{content:\\\"\\\"}}#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{flex:0 0 auto;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:13px}@media only screen and (min-width: 897px){.profile-content-wrapper{margin-top:15px}}.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:20px;line-height:1.4;font-weight:500;text-overflow:ellipsis;overflow:hidden;word-break:break-word;max-width:340px;margin:0 auto}.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;margin-top:1px}@media only screen and (max-width: 896px){.profile-subtitle{margin-top:3px}}.profile-subtitle.online{color:#50a2e9}.profile-row{display:flex;width:100%;flex-direction:column;padding-left:80px;padding-right:12px;position:relative;margin-top:27px;margin-bottom:1px;line-height:1.4}@media only screen and (max-width: 896px){.profile-row{padding-left:71px}}.profile-row:before{position:absolute;left:24px;font-size:24px;color:#707579}@media only screen and (max-width: 896px){.profile-row:before{left:15px}}.profile-row p{color:#000;margin:0;font-size:1rem;text-overflow:ellipsis;overflow:hidden;word-break:break-word}.profile-row-bio .emoji{width:24px;height:24px}.profile-row-label{color:#707579 !important;font-size:14px !important;line-height:1.6}@media only screen and (max-width: 896px){.profile-row-label{line-height:1.6}}.profile-row-notifications{margin-top:26px;line-height:1.3}.profile-avatar{width:120px;height:120px;margin:1px auto 10px;font-size:2.5rem !important}@media only screen and (max-width: 896px){.profile-avatar{margin:0 auto 10px;width:100px;height:100px}}.profile-avatar.tgico-avatar_deletedaccount{font-size:6rem}.profile-name,.profile-subtitle,.profile-row,.profile-avatar{flex:0 0 auto}.profile-tabs{position:-webkit-sticky !important;position:sticky !important;top:0;z-index:2;background-color:#fff}.profile-tabs i{padding-right:1.5rem !important;margin-left:-.75rem !important}.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}@media only screen and (max-width: 896px){.profile-tabs-content #content-media{padding:7.5px 7.5px 7.5px 6.5px}}.profile-tabs-content #content-media .media-item{height:0;padding-bottom:100%;overflow:hidden;position:relative;cursor:pointer}.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;opacity:1;transition:opacity .2s ease}html:not(.is-mac) .profile-tabs-content #content-media .media-image.thumbnail{-webkit-filter:blur(7px);filter:blur(7px)}.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 .preloader-container .preloader-circular{background-color:rgba(0,0,0,0.35)}@media only screen and (max-width: 896px){.profile-tabs-content #content-audio .preloader-container{width:40px;height:40px;top:9px;left:2px}}@media only screen and (min-width: 897px){.profile-tabs-content #content-audio .preloader-container{width:38px;height:38px}}.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}@media only screen and (min-width: 897px){.profile-tabs-content #content-audio .audio-download{width:48px;height:48px}}.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 .progress-line{margin:11px 0 8px}.profile-tabs-content #content-audio .progress-line__filled{background-color:#0089ff;transform-origin:left;height:2px}.profile-tabs-content #content-audio .progress-line__loaded{background-color:#cacaca}.profile-tabs-content #content-audio .progress-line__seek{height:2px;background:rgba(193,207,220,0.39)}.profile-tabs-content #content-audio .progress-line__seek::-webkit-slider-thumb{height:12px;width:12px;border:none}#stickers-container .sticker-sets{display:flex;flex-direction:column;margin-top:16px}#stickers-container .sticker-set{display:flex;flex-direction:column;height:140px;cursor:pointer}#stickers-container .sticker-set-name{font-weight:500}#stickers-container .sticker-set-count{font-size:14px;color:#707579}#stickers-container .sticker-set-header{display:flex;padding-left:16px;padding-bottom:12px;justify-content:space-between}#stickers-container .sticker-set-button{height:30px;padding-left:12px;padding-right:13px;margin-right:16px;font-size:15px;border-radius:16px;font-weight:400;width:52px;transition:width 0.2s}#stickers-container .sticker-set-button.gray{background:#F1F3F4;color:#707579;width:68px}#stickers-container .sticker-set-stickers{display:flex;justify-content:space-around}#stickers-container .sticker-set-sticker{width:68px;height:68px}#stickers-container .sticker-set-sticker:hover{border-radius:12px;background-color:rgba(112,117,121,0.08)}#stickers-container .sticker-set-sticker img{max-width:100%;max-height:100%}#poll-results-container .poll-results{display:flex;flex-direction:column;position:relative;width:100%}#poll-results-container .poll-results-answer{color:#707579;padding:0 16px 8px 16px;margin:0;padding-bottom:8px;font-weight:500;justify-content:space-between;display:flex;font-size:15px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@media only screen and (min-width: 897px){#poll-results-container .poll-results-answer{padding:0 24px 8px 24px}}#poll-results-container .poll-results-more{padding-top:13px;padding-bottom:13px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative}@media only screen and (min-width: 897px){#poll-results-container .poll-results-more{padding-left:8px}}#poll-results-container .poll-results-more .tgico-down{float:left;padding-right:32px;padding-left:16.5px;font-size:24px;color:#707579}#poll-results-container .poll-results h3{padding:0 16px;margin-top:15px;font-size:20px;margin-bottom:16px}@media only screen and (min-width: 897px){#poll-results-container .poll-results h3{padding:0 24px}}#poll-results-container .poll-results hr{margin-bottom:15px;margin-top:7px}#poll-results-container .poll-results avatar-element{width:32px;height:32px}#poll-results-container .poll-results .user-caption{padding:6px 28px}#poll-results-container .poll-results .user-title{font-weight:normal}#poll-results-container .poll-results li{padding-bottom:2px}#poll-results-container .poll-results li>.rp{padding:8px 5px;height:48px}@media only screen and (min-width: 897px){#poll-results-container .poll-results li>.rp{padding:8px 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 only screen and (max-width: 896px){.media-viewer{background:#000}}.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 only screen and (max-width: 896px){.media-viewer-userpic{display:none}}.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 only screen and (max-width: 896px){.media-viewer-buttons{display:none}}.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{position:absolute;left:0;top:60px;width:7rem;height:calc(100% - 120px);cursor:pointer;z-index:5}html.no-touch .media-viewer-switcher{height:calc(100% - 60px)}html.no-touch .media-viewer-switcher:hover>span{opacity:1}@media only screen and (max-width: 896px){.media-viewer-switcher{width:4rem}}.media-viewer-switcher-right{left:auto;right:0}.media-viewer-prev-button,.media-viewer-next-button{cursor:pointer;position:absolute;color:#fff;font-size:2rem;left:1rem;top:50%;transform:translateY(-50%) rotate(90deg);opacity:0;transition:.2s opacity;z-index:5}@media only screen and (min-width: 897px){.media-viewer-prev-button,.media-viewer-next-button{font-size:3rem;left:2rem}}.media-viewer-next-button{left:auto;right:1rem;transform:translateY(-50%) rotate(-90deg)}@media only screen and (min-width: 897px){.media-viewer-next-button{right:2rem}}.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;max-width:calc(100% - 16px);max-height:calc(100% - 100px)}@media only screen and (max-width: 896px){.media-viewer-mover{overflow:visible;max-width:100% !important}}.media-viewer-mover .ckin__player{width:100%;height:100%;position:absolute;left:0;top:0}.media-viewer-mover>svg{width:100%;height:100%}.media-viewer-mover img,.media-viewer-mover video{width:100%;height:100%;max-width:100%;max-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;position:absolute}.media-viewer-mover svg img,.media-viewer-mover svg video{position:unset}.media-viewer-mover.active{transition:.2s transform}.media-viewer-mover.moving{transition:.35s transform ease}.media-viewer-mover.no-transition{transition:none !important}.media-viewer-mover.center{left:50% !important;top:50% !important;transform:translate3d(-50%, -50%, 0) !important}@media only screen and (max-width: 896px){.media-viewer-mover.center{width:100% !important;height:100% !important}.media-viewer-mover.center .ckin__player:not(.ckin__fullscreen) .default__controls{bottom:-50px}.media-viewer-mover.center .ckin__player:not(.ckin__fullscreen) .default__gradient-bottom{bottom:-50px}}.media-viewer-mover.center img:not(.thumbnail),.media-viewer-mover.center video{height:auto;width:auto;-o-object-fit:contain;object-fit:contain}.media-viewer-mover.center img.thumbnail{width:auto;-o-object-fit:contain;object-fit:contain}.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);position:absolute;display:flex;align-items:center;justify-content:center}.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,.media-viewer-whole.active>.btn-icon{opacity:1;visibility:visible;transition:opacity .2s 0s,visibility 0s 0s}@media only screen and (max-width: 896px){.media-viewer-whole .menu-mobile-close{left:20px}.media-viewer-whole>.btn-icon{top:8px;position:fixed;z-index:5;opacity:0;transition:opacity .2s 0s,visibility 0s .2s}.media-viewer-whole .btn-menu-toggle{right:8px}.media-viewer-whole .btn-menu-toggle.menu-open{color:#fff;background-color:rgba(112,117,121,0.2) !important}}.media-viewer-whole.highlight-switchers .media-viewer-switcher>span{opacity:1}.media-viewer-switchers{position:relative;width:1680px;max-width:100%;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__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{width:100%;height:100%;-o-object-fit:contain;object-fit:contain}.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)}.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;cursor:pointer;display:flex;align-items:center;justify-content:center}.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{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:translate3d(-50%, -50%, 0) 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__controls .progress-line{margin:0 16px;height:5px;background:rgba(255,255,255,0.38);border-radius:4px;overflow:visible}.default__controls .progress-line__filled{background:#63a2e3;transform-origin:left;border-radius:4px;height:5px;transform:scaleX(0)}.default__controls .progress-line__loaded{background:rgba(255,255,255,0.38);left:11px;width:calc(100% - 11px)}.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 .toggle:before{content:\\\"\\\"}.default.is-playing .default__gradient-bottom{transform:translate3d(0, 50px, 0)}html.no-touch .default.is-playing:hover .default__gradient-bottom,.default.is-playing.show-controls .default__gradient-bottom{transform:translateZ(0)}html.no-touch .default.is-playing:hover .default__controls,.default.is-playing.show-controls .default__controls{transform:translateZ(0)}.default.is-playing:before{opacity:0;visibility:hidden;transform:translate3d(-50%, -50%, 0) scale(1.3)}.default.is-playing .default__button--big{opacity:0;visibility:hidden}.default.is-playing .default__controls{transform:translate3d(0, 52px, 0)}.default.is-playing .toggle:before{content:\\\"\\\"}.default .player-volume{margin:-3px 2px 0 10px;display:flex;align-items:center}@media only screen and (max-width: 896px){.default .player-volume{margin:-3px 2px 0 2px}}.default .player-volume__icon{fill:#fff;width:24px;height:24px;margin-right:8px;cursor:pointer}@media only screen and (max-width: 896px){.default .player-volume__icon{width:20px;height:20px}}.default .player-volume .progress-line{margin:0;width:50px}html.is-ios .default .player-volume .progress-line{display:none}.default .player-volume .progress-line__filled{background:#fff}.default .player-volume .progress-line input[type=range]::-webkit-slider-thumb{height:15px;width:15px;border-radius:16px;background:#fff}.default.is-buffering>.toggle{display:none !important}@media (max-width: 480px){.ckin__player button{font-size:18px}}video::-webkit-media-controls-enclosure{display:none !important}.progress-line{position:relative;cursor:pointer}.progress-line input[type=range]{-webkit-appearance:none;-moz-appearance:none;background:transparent;height:4.5px;cursor:pointer;padding:0;outline:none}.progress-line input[type=range]:focus{outline:none}.progress-line input[type=range]:focus::-webkit-slider-runnable-track{background:transparent}.progress-line input[type=range]:focus::-moz-range-track{outline:none}.progress-line 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}.progress-line input[type=range]::-webkit-slider-thumb{height:15px;width:15px;border-radius:16px;background:#63a2e3;cursor:pointer;-webkit-appearance:none;margin-left:-1px;border:none}.progress-line input[type=range]::-moz-range-track{width:100%;height:8.4px;cursor:pointer;border:1px solid transparent;background:transparent;border-radius:1.3px}.progress-line input[type=range]::-moz-range-thumb{height:14px;width:14px;border-radius:50px;border:1px solid #63a2e3;background:#63a2e3;cursor:pointer;margin-top:5px}.progress-line__seek{position:absolute;top:0;width:100%;cursor:pointer;margin:0}.progress-line__loaded{position:absolute;left:12px;top:0;width:calc(100% - 12px)}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}@media only screen and (max-width: 896px){.time{padding:7px 0px 9px 0px}}.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{display:flex;flex-direction:column;width:100%;height:282px;background:#fff;display:flex;overflow:hidden;flex:0 0 auto}@media only screen and (min-width: 897px){.emoji-dropdown{position:absolute !important;left:0;bottom:calc(85px);width:420px !important;height:420px;box-shadow:0px 5px 10px 5px rgba(16,35,47,0.14);z-index:3;border-radius:10px;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{margin-top:2px;border:none}.emoji-dropdown .emoji-container{width:100%;max-width:100%;overflow:hidden;height:100%}.emoji-dropdown .btn-icon{color:#8d969c}.emoji-dropdown .emoji-tabs ul{justify-content:center}.emoji-dropdown .emoji-tabs-search{position:absolute;left:0;margin-left:4px !important}.emoji-dropdown .emoji-tabs-delete{position:absolute;right:0;margin-right:4px !important}.emoji-dropdown .tabs-container{height:100%}.emoji-dropdown .tabs-container .category-title{top:0;font-size:14px;font-weight:500;color:#707579;z-index:2;padding:12px 6px 6px 6px;width:100%}.emoji-dropdown .tabs-container .sticky_sentinel--top{top:0;height:1px}.emoji-dropdown .tabs-container .emoji-category{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>span{margin:0;padding:4px 4px;line-height:inherit;border-radius:8px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:42px;height:42px}.emoji-dropdown .tabs-container .emoji-category .category-items>span .emoji{width:100%;height:100%;vertical-align:unset}html.no-touch .emoji-dropdown .tabs-container .emoji-category .category-items>span:hover{background-color:rgba(112,117,121,0.08)}.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;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding:1px 2.5px;justify-content:center;border-radius:12px;padding:0}@media only screen and (max-width: 896px){.emoji-dropdown .tabs-container .sticker-category .category-items>div{height:75px;justify-self:center;padding:0;min-width:64px;width:100%}}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>img{max-width:100%;max-height:100%;-webkit-animation:fadeIn .2s ease forwards;animation:fadeIn .2s ease forwards}.emoji-dropdown .tabs-container>div{min-height:100%;flex-direction:column;height:100%}.emoji-dropdown .tabs-container .emoticons-content{flex:1;padding:0}.emoji-dropdown .tabs-container .scrollable{padding:0 10px}@media only screen and (max-width: 896px){.emoji-dropdown .emoji-padding.active .menu-horizontal li{flex:unset;padding:0}.emoji-dropdown .emoji-padding.active .category-items>span{width:40px;height:40px;justify-self:center}.emoji-dropdown .emoji-padding.active .category-title{padding:12px 6px 6px 10px}.emoji-dropdown .emoji-padding.active .scrollable{padding:0}.emoji-dropdown .emoji-padding.active .emoji-category .category-items{grid-column-gap:unset;grid-template-columns:repeat(8, 1fr)}}.emoji-dropdown .emoji-padding .menu-horizontal,.emoji-dropdown .stickers-padding .menu-horizontal{height:48px;border-bottom:none;padding:2px 2px 2px 2px;width:100%;box-shadow:0px 1px 5px -1px rgba(0,0,0,0.21);z-index:4}.emoji-dropdown .emoji-padding .menu-horizontal li,.emoji-dropdown .stickers-padding .menu-horizontal li{margin:0}.emoji-dropdown .menu-horizontal li{border-radius:50%}.emoji-dropdown #content-stickers .scrollable{padding:0px 5px 0}.emoji-dropdown .menu-horizontal{width:100%;height:48px;box-shadow:0px -2px 5px -1px rgba(0,0,0,0.21)}.emoji-dropdown .menu-horizontal li{font-size:1.5rem;margin:0 12px;width:48px;height:48px;line-height:48px;display:flex;align-items:center;flex:0 0 auto}.emoji-dropdown .stickers-padding.active .scrollable{padding:0;box-shadow:0px 1px 5px -1px rgba(0,0,0,0.21)}.emoji-dropdown .stickers-padding.active .menu-horizontal{box-shadow:none}.emoji-dropdown .stickers-padding.active .menu-horizontal li{height:48px;width:48px;padding:0;margin-right:1px;margin-left:1px}.emoji-dropdown .stickers-padding .menu-wrapper{padding:0;height:48px;max-width: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>canvas,.emoji-dropdown .stickers-padding li>img{padding:8px;max-width:100%;max-height:100%;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%;transform:translateZ(0);position:absolute;top:0px;left:0px;bottom:0px;right:0px;-webkit-overflow-scrolling:touch}.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;opacity:0}div.scrollable:hover::-webkit-scrollbar{opacity:1}::-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}div.scrollable-x::-webkit-scrollbar{display:none}.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;flex-direction:row}.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:14px;font-weight:500;position:relative;border-top-left-radius:6px;border-top-right-radius:6px}.menu-horizontal li>span{position:relative;display:inline-flex;align-items:center}.menu-horizontal li.active{color:#50a2e9}.menu-horizontal li.active i{opacity:1}.menu-horizontal i{position:absolute;bottom:calc(-.625rem - 2px);left:0;opacity:0;background-color:#50a2e9;height:.1875rem;width:100%;border-radius:.1875rem .1875rem 0 0;pointer-events:none;padding-right:.5rem;margin-left:-.25rem;box-sizing:content-box;transform-origin:left}.menu-horizontal i.animate{transition:transform .25s}.tabs-container{min-width:100%;width:100%;display:grid;grid-template-columns:100%}.tabs-container>div{width:100%;max-width:100%;transition:transform .25s,-webkit-filter .25s;transition:transform .25s,filter .25s;transition:transform .25s,filter .25s,-webkit-filter .25s;display:none;flex-direction:column;position:relative;grid-row-start:1;grid-column-start:1;background-color:#fff;overflow:hidden}.tabs-container>div.active{display:flex}.tabs-container>div>div:not(.scroll-padding){width:100%;max-width:100%;position:relative}.tabs-container[data-slider=\\\"tabs\\\"]{transition:transform .25s}@-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;max-height:inherit}.selector-search-container avatar-element:before{font-size:18px}.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}@media only screen and (max-width: 896px){.selector ul li>.rp{margin:0}}@media not all and (min-resolution: 0.001dpcm){@supports (-webkit-appearance: none){.selector ul li>.rp{margin-right:4px}}}.selector hr{margin:0 0 8px}.selector [type=\\\"checkbox\\\"]+span{padding-left:calc(9px + 2.25rem)}.selector .checkbox{margin-top:11px;padding-left:11px}.gifs-masonry{display:flex;flex-wrap:wrap}.gifs-masonry>.gif{flex:1 0 auto;max-width:100%;height:100px;margin:2.5px;cursor:pointer;position:relative}.gifs-masonry>.gif video,.gifs-masonry>.gif img{-o-object-fit:cover;object-fit:cover;width:100%;height:100%}.gifs-masonry>.gif img{position:absolute;left:0;top:0}.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}.preloader-container.preloader-streamable,.preloader-container.preloader-streamable svg{cursor:pointer !important}.preloader-container.preloader-streamable circle{stroke-width:2.5 !important;-webkit-animation:dashNewStreamable 1.5s ease-in-out infinite !important;animation:dashNewStreamable 1.5s ease-in-out infinite !important}.preloader-container.preloader-streamable:after{content:\\\"\\\";position:absolute;width:.8125rem;height:.8125rem;border-radius:.125rem;background-color:#fff;left:50%;top:50%;transform:translate3d(-50%, -50%, 0)}@-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%}}@-webkit-keyframes dashNewStreamable{0%{stroke-dasharray:1, 200;stroke-dashoffset:0}50%{stroke-dasharray:89, 200;stroke-dashoffset:-35px}100%{stroke-dasharray:89, 200;stroke-dashoffset:-237%}}@keyframes dashNewStreamable{0%{stroke-dasharray:1, 200;stroke-dashoffset:0}50%{stroke-dasharray:89, 200;stroke-dashoffset:-35px}100%{stroke-dasharray:89, 200;stroke-dashoffset:-237%}}.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}.popup.active{opacity:1;visibility:visible;transition:opacity 0.3s 0s, visibility 0s 0s;z-index:4}.popup.active .popup-container{transform:translate3d(0, 0, 0)}.popup-container{position:relative;border-radius:10px;background-color:#fff;padding:1rem;transform:translate3d(0, -40px, 0);-webkit-backface-visibility:hidden;backface-visibility:hidden;transition-property:transform;transition-duration:0.3s;display:flex;flex-direction:column;overflow:hidden;margin:auto}.popup-centerer{margin:auto}.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-body{flex:1 1 auto;display:flex;flex-direction:column;overflow:hidden}.popup-body .scrollable{position:relative}.popup-buttons{display:flex;flex-direction:column;justify-content:flex-end;align-items:flex-end}.popup-buttons button{background:none;outline:none;border:none;font-weight:500;padding:.5rem;text-transform:uppercase;transition:.2s;border-radius:8px;cursor:pointer;color:#50a2e9;position:relative}html.no-touch .popup-buttons button:hover{background-color:rgba(112,117,121,0.08)}.popup-buttons button+button{margin-top:.5rem;text-overflow:ellipsis;white-space:nowrap;max-width:286px;overflow:hidden}.popup.popup-delete-chat .popup-container{max-width:328px}.popup-avatar .popup-container{max-width:600px;padding:15px 16px 16px 24px}.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-new-media .popup-container{width:420px;max-width:420px;padding:12px 20px 32.5px}.popup-new-media .popup-container.is-media:not(.is-album) .popup-photo{max-height:320px;margin:0 auto}.popup-new-media .popup-container.is-media:not(.is-album) .popup-photo img{-o-object-fit:contain;object-fit:contain}.popup-new-media .popup-container.is-media:not(.is-album) .popup-photo>div{display:flex;justify-content:center}.popup-new-media .popup-container.is-album .popup-photo{margin:0 auto;position:relative}.popup-new-media .popup-container.is-album .popup-photo>div{position:absolute}.popup-new-media .popup-container.is-document .popup-photo img,.popup-new-media .popup-container.is-document .popup-photo video,.popup-new-media .popup-container.is-album .popup-photo img,.popup-new-media .popup-container.is-album .popup-photo video{-o-object-fit:cover;object-fit:cover;width:100%;height:100%}.popup-new-media .popup-header{flex-wrap:wrap;justify-content:space-between;align-items:center;margin-bottom:9px;padding:12px 20px 15px}.popup-new-media .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-new-media .popup-close{font-size:1.5rem;margin:-1px 0 0 -4px}.popup-new-media .popup-title{flex:1;padding:0 2rem 0 1.5rem;margin:0;margin-top:-3px;font-size:1.25rem;font-weight:500}.popup-new-media .popup-photo{max-width:380px;overflow:hidden;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border-radius:10px}.popup-new-media .popup-photo .document{max-width:100%;overflow:hidden;cursor:default;padding-left:3.75rem;height:4.5rem}.popup-new-media .popup-photo .document-name{font-weight:normal;width:100%;max-width:100%;overflow:hidden;text-overflow:ellipsis;line-height:1.5}.popup-new-media .popup-photo .document-ico{height:48px;width:48px;font-size:16px;font-weight:normal;line-height:11px;letter-spacing:0}.popup-new-media .input-field{width:100%;margin-top:25px}.popup-new-media .input-field::-moz-placeholder{color:#a2acb4}.popup-new-media .input-field:-ms-input-placeholder{color:#a2acb4}.popup-new-media .input-field::-ms-input-placeholder{color:#a2acb4}.popup-new-media .input-field::placeholder{color:#a2acb4}.popup-new-media .input-field input{font-size:1rem;padding:0 15px;border-radius:10px}.popup-new-media .input-field input:focus{padding:0 14.5px}.popup-new-media .input-field label{font-size:inherit;opacity:0}.popup-create-poll.popup-new-media .btn-primary{width:94px}.popup-new-media.popup-send-photo .popup-header{padding: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}.popup-stickers h6{padding:0 2rem 0 1.5rem;margin:0;margin-top:3px;font-size:1.25rem;font-weight:500}.popup-stickers .sticker-set-footer{padding:19px 0 17px 0;border-top:1px solid #dadce0;text-align:center;color:#50a2e9}.popup-stickers .sticker-set-footer .btn-primary{width:164px;height:44px}.popup-stickers .sticker-set-footer.add{padding:8px 0}.popup-stickers .popup-container{max-width:420px;max-height:420px;width:420px;padding:0}.popup-stickers .popup-close{font-size:1.5rem;margin-top:6px;margin-left:16px}.popup-stickers .popup-header{margin-bottom:12px;flex:0 0 auto;margin-top:5px}.popup-stickers .sticker-set{margin-bottom:8px}.popup-stickers .sticker-set-stickers{padding:0 5px;display:grid;grid-template-columns:repeat(5, 1fr)}@media only screen and (max-width: 896px){.popup-stickers .sticker-set-stickers{grid-template-columns:repeat(4, 1fr)}}.popup-stickers .sticker-set-sticker{width:80px;height:80px;margin-bottom:2px;justify-self:center;cursor:pointer}.popup-stickers .sticker-set-sticker:hover{border-radius:12px;background-color:rgba(112,117,121,0.08)}.popup-stickers .sticker-set-sticker img{max-width:100%;max-height:100%}.popup-date-picker .popup-container{min-width:300px;width:300px;padding:12px 14px}@media (min-height: 470px){.popup-date-picker .popup-container.is-max-lines{top:19px}}.popup-date-picker .popup-header{margin-left:6px;margin-top:4px;margin-bottom:1.375rem}.popup-date-picker .popup-title{font-weight:500;font-size:20px}.popup-date-picker .popup-buttons{flex-direction:row;order:2;margin-right:-2px}.popup-date-picker .popup-buttons button+button{margin-left:9px;margin-top:0}.popup-date-picker .date-picker-controls{display:flex;justify-content:space-between;align-items:center}.popup-date-picker .date-picker-controls .date-picker-month-title{font-size:14px;font-weight:500}.popup-date-picker .date-picker-prev{transform:rotate(90deg)}.popup-date-picker .date-picker-next{transform:rotate(-90deg)}.popup-date-picker .date-picker-prev:disabled,.popup-date-picker .date-picker-next:disabled{visibility:hidden}.popup-date-picker .date-picker-months{margin-top:7px;margin-bottom:1.5rem}.popup-date-picker .date-picker-month{display:grid;grid-template-columns:repeat(7, 1fr);width:100%;justify-content:center}.popup-date-picker .date-picker-month span,.popup-date-picker .date-picker-month .btn-icon{justify-self:center;width:38px;height:38px;font-size:12px;color:#707579;display:flex;justify-content:center;align-items:center}.popup-date-picker .date-picker-month .btn-icon:not(:disabled){color:#000}.popup-date-picker .date-picker-month .btn-icon.active{color:#fff;border-radius:50%;background-color:#50a2e9}.popup-create-poll .popup-container{max-height:468px;padding:0}.popup-create-poll .input-field{margin-top:25px}.popup-create-poll .input-field .btn-icon{position:absolute;right:.5rem;top:50%;z-index:1;transform:translateY(-50%);opacity:1;transition:opacity .2s ease}.popup-create-poll .input-field:not(.is-filled) .btn-icon,.popup-create-poll .input-field:first-child:last-child .btn-icon{pointer-events:none;opacity:0}.popup-create-poll .caption{color:#707579;font-weight:500;padding:16px 24px 0}.popup-create-poll .poll-create-questions{padding:0px 20px 32.5px}.popup-create-poll hr{border-bottom:1px solid #edeff1}#auth-pages{max-width:720px;overflow:hidden}@media only screen and (max-width: 896px){#auth-pages .btn-primary{height:50px}}#auth-pages .subtitle{margin:0}@media only screen and (max-width: 896px){#auth-pages .subtitle{font-size:14px}}#auth-pages .input-wrapper{margin-top:49px}@media only screen and (max-width: 896px){#auth-pages .input-wrapper{margin-top:41px;width:100%;padding:0 16px}}#auth-pages .tabs-container{height:100%;transform:translateZ(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 only screen and (max-width: 896px){#auth-pages .page-password .input-wrapper{margin-top:31px}}#auth-pages .page-password .input-wrapper .btn-primary{margin-top:1rem}.page-sign .auth-image,.page-signUp .auth-image{width:7.5rem;height:7.5rem;margin-bottom:1.5rem}@media only screen and (min-width: 897px){.page-sign .auth-image,.page-signUp .auth-image{width:10rem;height:10rem;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}@media only screen and (max-width: 896px){.page-signQR .auth-image{width:166px;height:166px}}.page-signUp .auth-image{margin-top:10px;margin-bottom:14px}@media only screen and (max-width: 896px){.page-signUp .auth-image{margin-bottom:24px}}@media only screen and (max-width: 896px){.page-signUp #signUp{margin-top:100px}}.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}@media only screen and (max-width: 896px){.page-chats .main-column{width:100%}.page-chats .main-column:not(.active){display:none}}@media only screen and (min-width: 897px){.page-chats #column-left{width:25%}.page-chats #column-center{display:flex !important;background-color:#e6ebee;width:100%;flex:1}.page-chats #column-right{display:flex !important}.page-chats .main-column{height:100%;position:relative;min-height:100%;max-height:100%}.page-chats #main-columns{display:flex}}.page-chats .preloader{width:50px;height:50px;position:absolute;top:50%;left:50%;transform:translate3d(-50%, -50%, 0)}.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%;-webkit-font-smoothing:antialiased}@media only screen and (max-width: 896px){html,body{height:calc(1vh * 100);height:calc(var(--vh, 1vh) * 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}@media only screen and (min-width: 897px){.only-handhelds{display:none !important}}.container{margin:0 auto}h1,h2,h3,h4,h5,h6{font-weight:500}h4{font-size:2rem;margin:22px 0 14px;line-height:110%}@media only screen and (max-width: 896px){h4{font-size:20px;margin:2px 0 8px}}input{caret-color:#4EA4F6}input,textarea{-webkit-appearance:none}.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-icon:disabled{color:#cacaca}.btn-corner{position:absolute !important;bottom:20px;right:20px;transition:.2s ease;transform:translate3d(0, calc(100% + 20px), 0);z-index:3}.btn-corner.is-visible{transform:translate3d(0, 0, 0)}.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;-webkit-user-select:none;-webkit-touch-callout:none}.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}@media only screen and (max-width: 896px){.btn-menu-item{padding:0 30px 0 16px;height:50px}}#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;z-index:5}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}@media only screen and (max-width: 896px){avatar-element{font-size:14px}}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;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.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}@media only screen and (max-width: 896px){.c-ripple__circle{-webkit-animation-duration:.2s;animation-duration:.2s;transition-duration:.1s;border-radius:15%}}.c-ripple.is-square .c-ripple__circle,.btn-menu .c-ripple .c-ripple__circle{-webkit-animation-duration:.2s;animation-duration:.2s;transition-duration:.1s;border-radius:15%}.c-ripple__circle.hiding,.c-ripple__square.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 .document-thumb{-o-object-fit:cover;object-fit:cover;width:100%;height:100%}.document.photo .document-ico:after{display:none}.document.photo .document-download{background-color:rgba(0,0,0,0.15)}.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-ico.tgico-largeplay:before,.document-download.tgico-largeplay:before,.audio-ico.tgico-largeplay:before,.audio-download.tgico-largeplay:before{margin-right:-1px}@media only screen and (max-width: 896px){.document-ico,.document-download,.audio-ico,.audio-download{height:36px;width:36px}}.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}@media only screen and (max-width: 896px){.document .preloader-container,.audio .preloader-container{width:30px;height:30px}}.audio{position:relative;padding-left:67px;min-height:58px;max-width:244px;overflow:visible !important}@media only screen and (max-width: 896px){.audio{padding-left:45px}}.audio-toggle,.audio-download{border-radius:50%;background-color:#50a2e9;font-size:2.3rem;align-items:center}@media only screen and (max-width: 896px){.audio-toggle,.audio-download{font-size:24px !important}}.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;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.audio-time,.audio-subtitle{font-size:14px;color:#707579;margin-top:3px;margin-left:-1px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@media only screen and (max-width: 896px){.audio-time,.audio-subtitle{margin-top:1px;font-size:12px}}.audio-title,.audio:not(.audio-show-progress) .audio-subtitle{white-space:nowrap;overflow:hidden;max-width:100%;text-overflow:ellipsis}@media only screen and (max-width: 896px){.audio-download{margin-left:2px;margin-top:1px}.audio.is-voice .audio-download{margin:0}}.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 #707579;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}@media only screen and (max-width: 896px){.input-field input{height:50px}}.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 18px;position:relative}@media only screen and (max-width: 896px){.checkbox-field{margin-bottom:27px}}[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;transition:opacity .2s ease-out, transform .2s ease-out;transform:scale(0.95);transform-origin:top center;opacity:0}.select-wrapper.active{transform:scale(1);opacity:1}.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:#909192;opacity:1}:-ms-input-placeholder{color:#909192;opacity:1}::-ms-input-placeholder{color:#909192;opacity:1}::placeholder{color:#909192;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}@media only screen and (max-width: 896px){.auth-image{width:120px;height:120px}}.phone-edit{display:inline-block;width:24px;height:24px;margin-left:.4rem;opacity:.5;transition:.2s;cursor:pointer;font-size:1.5rem}@media only screen and (max-width: 896px){.phone-edit{margin-top:-14px}}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)}.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;margin:0 .125rem}.btn-circle{border-radius:50%;height:54px;width:54px;line-height:54px}@media only screen and (max-width: 896px){.btn-circle{height:46px;width:46px}}.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}.sticky_sentinel{position:absolute;left:0;right:0;visibility:hidden;pointer-events:none}.rlottie{max-width:100%;max-height:100%;width:100%;height:100%}.rlottie.fade-in{-webkit-animation:fadeIn .2s ease forwards;animation:fadeIn .2s ease forwards}.fade-in-transition{opacity:1;transition:opacity .2s ease}.show-more{padding-top:13px;padding-bottom:13px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative}@media only screen and (min-width: 897px){.show-more{padding-left:8px}}.show-more .tgico-down{float:left;padding-right:32px;padding-left:16px;font-size:24px;color:#707579}.chats-container #chats-container .scrollable #dialogs .rp avatar-element{font-size:20px}.chats-container #chats-container .scrollable #dialogs .rp avatar-element:before{font-size:26px}.chats-container #chats-container .scrollable #dialogs .rp avatar-element.tgico-avatar_deletedaccount:before{font-size:56px}.btn-disabled{pointer-events:none !important;cursor:default !important;color:#707579 !important}.btn-disabled:before{color:#707579 !important}.content-empty{color:#707579}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n" - }, - { - "id": 1, - "identifier": "F:\\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": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\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": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\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": 146, - "building": 12945 - } - } - ], - "profile": { - "factory": 0, - "building": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 0, - "moduleIdentifier": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\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": "!!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\tweb\\src\\scss\\style.scss", - "reasons": [] - } - ] - } - ], - "modules": [ - { - "id": 0, - "identifier": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\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": 136770, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": null, - "issuerId": null, - "issuerName": null, - "issuerPath": null, - "profile": { - "factory": 146, - "building": 12945 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": null, - "moduleIdentifier": null, - "module": null, - "moduleName": null, - "type": "single entry", - "userRequest": "!!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\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, \":root{--layer-transition: .2s ease-in-out}@media only screen and (max-width: 896px){:root{--right-column-width: 100vw}}@media only screen and (min-width: 897px){:root{--right-column-width: calc(1680px / 4)}}.chats-container{position:relative}@media only screen and (max-width: 896px){.chats-container .search-group-recent.search-group{padding:2px 0 0}}.chats-container .input-search{position:relative;width:100%;margin-left:22px;margin-right:4px}@media only screen and (max-width: 896px){.chats-container .input-search{margin-left:16px}}.chats-container .input-search input{background-color:rgba(112,117,121,0.08);border:2px solid transparent;height:40px;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 .input-search .tgico-close{left:auto;right:0px}.chats-container .input-search input:-moz-placeholder-shown ~ .tgico-close{display:none}.chats-container .input-search input:-ms-input-placeholder ~ .tgico-close{display:none}.chats-container .input-search input:placeholder-shown ~ .tgico-close{display:none}.chats-container ul{margin:0;display:flex;flex-direction:column;width:100%;-webkit-user-select:none;-webkit-touch-callout:none}html.is-mac .chats-container ul{transform:translateZ(0)}.chats-container li{background-color:#fff}@media only screen and (max-width: 896px){.chats-container li{padding-bottom:0px}}.chats-container li.is-muted .user-title:after{content:\\\"\\\";color:#a3a3a3;font-size:1.125rem;line-height:27px;vertical-align:middle;margin-left:.125rem;display:inline-block;height:29px}.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 8px;overflow:hidden}@media not all and (min-resolution: 0.001dpcm){@supports (-webkit-appearance: none){.chats-container li>.rp{margin-right:3px}}}@media only screen and (max-width: 896px){.chats-container li>.rp{padding:9px 12px 0 9px !important;border-radius:0;margin:0;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;flex:0 0 auto}.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 8.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 i.verified-icon{content:\\\" \\\";background:url(assets/img/icon-verified.svg);display:inline-block;width:20px;height:20px;vertical-align:text-bottom;margin-left:.125rem}.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:-3px;flex:0 0 auto}.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%;padding:1rem 0 .5rem;margin-bottom:.5rem}@media only screen and (max-width: 896px){.chats-container .search-group{margin-bottom:0}}.chats-container .search-group__name{color:#707579;padding:0 23px;padding-bottom:1rem;font-weight:500;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@media only screen and (max-width: 896px){.chats-container .search-group__name{padding:0 9px 0 16px;font-size:15px}}.chats-container .search-group-contacts{padding:16px 0 7px}@media only screen and (max-width: 896px){.chats-container .search-group-contacts{padding:7px 0 0px}}.chats-container .search-group-contacts .search-group__name{padding-bottom:17px}@media only screen and (max-width: 896px){.chats-container .search-group-contacts .search-group__name{padding-bottom:0}}.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}@media only screen and (max-width: 896px){.contacts-container li,.search-group-contacts li{padding:0}}.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}@media only screen and (max-width: 896px){.contacts-container .user-caption,.search-group-contacts .user-caption{padding:0px 4px 0px 14px}}.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}@media only screen and (max-width: 896px){.contacts-container p,.search-group-contacts p{height:26px}}.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}@media only screen and (max-width: 896px){#bubble-contextmenu>div{padding:0 60px 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:0px 1px 5px -1px rgba(0,0,0,0.21);z-index:1;min-height:56px;max-height:56px}@media only screen and (max-width: 896px){#topbar.is-audio-shown+#bubbles,#topbar.is-pinned-shown:not(.hide-pinned)+#bubbles{margin-top:52px}#topbar.is-pinned-shown:not(.hide-pinned):not(.is-audio-shown) .pinned-message{display:flex}}@media only screen and (min-width: 897px){#topbar{border-left:1px solid #DADCE0;border-right:1px solid #DADCE0}#topbar .sidebar-close-button,#topbar .menu-search{display:none}#topbar.is-pinned-shown:not(.hide-pinned) .pinned-message{display:flex}}@media only screen and (max-width: 896px){#topbar .chat-mute-button,#topbar .chat-search-button{display:none}}#topbar .chat-more-button .btn-menu{top:calc(100% + 7px)}@media only screen and (max-width: 896px){#topbar .chat-more-button .btn-menu{top:29px}}@media only screen and (max-width: 896px){#topbar .chat-more-button{margin-left:0}}#topbar .chat-info{flex:1 1 auto;overflow:hidden}@media only screen and (min-width: 1276px){body.is-right-column-shown #topbar .chat-info{max-width:calc(100% - var(--right-column-width) * 1.6)}}@media only screen and (min-width: 1276px){body.is-right-column-shown #topbar.is-pinned-shown .chat-info{max-width:calc(100% - var(--right-column-width) * 1.75)}body.is-right-column-shown #topbar.is-pinned-shown.is-audio-shown .chat-info{max-width:calc(100% - var(--right-column-width) * 2.25)}}#topbar .chat-utils{display:flex;align-items:center;flex:0 0 auto}@media only screen and (min-width: 1276px){#topbar .chat-utils{transition:transform .2s ease-in-out;transition:transform var(--layer-transition)}body.is-right-column-shown #topbar .chat-utils{transform:translate3d(calc(var(--right-column-width) * -1), 0, 0)}body.animation-level-0 #topbar .chat-utils{transition:none}}#topbar .chat-join{width:auto;width:117px;height:36px;font-weight:400;font-size:0.875rem;margin-right:.5rem}#topbar .chat-join:not(.hide)+.chat-mute-button{display:none}#topbar .content{flex:1 1 auto;padding-left:10px;max-width:100%;overflow:hidden}@media only screen and (max-width: 896px){#topbar .content{max-width:208px}}#topbar .person{display:flex;align-items:center;cursor:pointer;margin-left:7px}@media only screen and (max-width: 896px){#topbar .person{margin-left:10px}}#topbar .person .bottom{font-size:14px;color:#707579}#topbar .person .bottom .online{color:#50a2e9}#topbar #im-avatar{width:40px;height:40px;line-height:40px;font-size:16px;flex:0 0 auto}#topbar #im-avatar:before{font-size:20px}#topbar #im-avatar.tgico-avatar_deletedaccount:before{font-size:40px}#topbar.hide-pinned+#bubbles #bubbles-inner{margin-bottom:.25rem}#chat-input{display:flex;width:100%;max-width:696px;padding-top:.25rem;flex-direction:column;flex:0 0 auto;position:relative}@media only screen and (min-width: 1276px){#chat-input{transition:transform .2s ease-in-out;transition:transform var(--layer-transition)}body.is-right-column-shown #chat-input{transform:translate3d(calc(var(--right-column-width) / -2), 0, 0)}body.animation-level-0 #chat-input{transition:none}}#chat-input .chat-input-container{display:flex;align-items:center;justify-content:space-between}@media only screen and (max-width: 896px){#chat-input .chat-input-container{padding:0 .5rem .5rem}}@media only screen and (min-width: 897px){#chat-input .chat-input-container{padding-bottom:21px}}#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 .toggle-emoticons:before{content:\\\"\\\"}#chat-input .toggle-emoticons.flip-icon:before{content:\\\"\\\"}#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 9px;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:240px;height:240px;transform:scale(0);position:absolute;top:-94px;left:-94px;transition:transform .03s, visibility .1s;visibility:hidden}@media only screen and (max-width: 896px){#chat-input .record-ripple{width:300px;height:300px;top:-124px;left:-124px}}#chat-input.is-recording #btn-record-cancel{opacity:1;visibility:visible;margin-right:9px;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;font-size:18px;line-height:24px;white-space:nowrap;text-overflow:ellipsis;max-width:calc(100% - 1.5rem);overflow:hidden}#im-title span.emoji{vertical-align:inherit}.info#im-subtitle{margin-top:-2px}.chat-container{display:flex;width:100%;align-items:center;flex-direction:column;position:relative}.chat-container .chat-background{overflow:hidden}.chat-container .chat-background,.chat-container .chat-background:before{position:absolute !important;top:0;left:0;bottom:0;right:0}.chat-container .chat-background:before{content:\\\"\\\";display:block;background-image:url(\\\"assets/img/camomile_blurred.jpg\\\");background-size:cover;background-position:center center}@media only screen and (min-width: 1276px){body.animation-level-2 .chat-container .chat-background:before{margin:-16rem -5rem -20rem 0;transform:scale(1);transform-origin:left center;transition:transform .2s ease-in-out;transition:transform var(--layer-transition)}body.animation-level-2.is-right-column-shown .chat-container .chat-background:before{transform:scale(0.67)}}.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}@media only screen and (max-width: 896px){.chat-container .input-message{min-height:46px;padding:.5px .5rem}}.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}@media only screen and (max-width: 896px){.chat-container .pinned-message{position:absolute !important;top:100%;width:100% !important;background:#fff;left:0;max-height:100% !important;height:52px;padding:1rem}.chat-container .pinned-message-subtitle{line-height:13px !important;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;max-width:280px}}.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-media .pinned-message-content,.chat-container .pinned-message.is-media .reply-content,.chat-container .reply.is-media .pinned-message-content,.chat-container .reply.is-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}.chat-container .pinned-container{flex:0 0 auto}@media only screen and (max-width: 896px){.chat-container .pinned-container{box-shadow:0px 1px 3px 0px rgba(0,0,0,0.15)}.chat-container .pinned-container:before{width:100%;content:\\\" \\\";height:52px;left:0;top:0;position:absolute;box-shadow:inset 0px 1px 2px 0px rgba(0,0,0,0.15)}}.chat-container .pinned-container .pinned-message-close,.chat-container .pinned-container .pinned-audio-close,.chat-container .pinned-container .pinned-audio-ico{font-size:1.5rem;position:absolute;display:flex;justify-content:center;right:0}.chat-container .pinned-container .pinned-message-close.tgico-close,.chat-container .pinned-container .pinned-audio-close.tgico-close,.chat-container .pinned-container .pinned-audio-ico.tgico-close{visibility:hidden}@media only screen and (max-width: 896px){.chat-container .pinned-container .pinned-message-close.tgico-close,.chat-container .pinned-container .pinned-audio-close.tgico-close,.chat-container .pinned-container .pinned-audio-ico.tgico-close{font-size:1.4rem;right:9px;visibility:visible}}.chat-container .pinned-audio{display:flex;flex-direction:column;justify-content:center;cursor:pointer}@media only screen and (max-width: 896px){.chat-container .pinned-audio{height:52px;padding-left:58px;background:#fff;width:100%;position:absolute;left:0;top:100%}}@media only screen and (min-width: 897px){.chat-container .pinned-audio{padding-left:2.5rem;padding-right:2.5rem;max-width:210px;position:relative}}.chat-container .pinned-audio-ico{left:0;right:auto !important;color:#50a2e9}@media only screen and (max-width: 896px){.chat-container .pinned-audio-ico{margin-left:20px}}.chat-container .pinned-audio-ico:before{content:\\\"\\\"}.chat-container .pinned-audio-ico.flip-icon:before{content:\\\"\\\"}.chat-container .pinned-audio-title{font-weight:500;width:100%;max-width:100%}.chat-container .pinned-audio-subtitle{color:#707579}.chat-container .pinned-audio-title,.chat-container .pinned-audio-subtitle{white-space:nowrap;text-overflow:ellipsis;font-size:14px;line-height:1.4;overflow:hidden;max-width:240px}#bubbles{width:100%;height:100%;max-height:100%;flex:1 1 auto;overflow:hidden;position:relative;padding:0 .5rem;-webkit-mask-image:-webkit-radial-gradient(circle, white 100%, black 100%)}#bubbles>.scrollable{padding:0 .75rem;height:auto;display:block}@media only screen and (max-width: 896px){#bubbles>.scrollable{padding:0 .5rem}}@media only screen and (min-width: 1276px){#bubbles>.scrollable{transition:transform .2s ease-in-out;transition:transform var(--layer-transition)}body.is-right-column-shown #bubbles>.scrollable{transform:translate3d(calc(var(--right-column-width) / -2), 0, 0)}body.animation-level-0 #bubbles>.scrollable{transition:none}}@media only screen and (min-width: 1276px){#bubbles>.preloader-container{transition:transform .2s ease-in-out;transition:transform var(--layer-transition)}body.is-right-column-shown #bubbles>.preloader-container{transform:translate3d(calc(var(--right-column-width) / -2), 0, 0)}body.animation-level-0 #bubbles>.preloader-container{transition:none}}#bubbles:not(.scrolled-down):not(.search-results-active){-webkit-mask-image:linear-gradient(0deg, transparent 0, #000 20px);mask-image:linear-gradient(0deg, transparent 0, #000 20px)}#bubbles:not(.scrolled-down):not(.search-results-active) #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 .search-group.search-group-messages{padding:0.25rem 0 .5rem}#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;max-width:min(calc(100% - 48px), 696px)}@media only screen and (max-width: 896px){#bubbles-inner{max-width:min(100%, 680px)}html.is-mac #bubbles-inner{-webkit-user-select:none;-webkit-touch-callout:none}}#bubbles-inner.is-chat .is-in .bubble__container{margin-left:45px}@media only screen and (max-width: 896px){#bubbles-inner.is-chat .is-in .bubble__container{max-width:calc(100% - 5.5625rem)}}#bubbles-inner.is-channel:not(.is-chat) .bubble__container{max-width:100%}#bubbles-inner.is-channel:not(.is-chat) .bubble.with-beside-button .bubble__container{max-width:calc(100% - 2.875rem) !important}#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:0.99999}#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}@media only screen and (max-width: 896px){#bubbles-go-down{width:2.875rem;height:2.875rem}}#bubbles-go-down:before{margin-left:.75px}@media only screen and (max-width: 896px){#bubbles-go-down{right:.5rem}}@media only screen and (min-width: 1276px){#bubbles-go-down{transition:transform .2s ease-in-out;transition:transform var(--layer-transition)}body.is-right-column-shown #bubbles-go-down{transform:translate3d(calc(var(--right-column-width) * -1), 0, 0)}body.animation-level-0 #bubbles-go-down{transition:none}}.popup.popup-delete-message .popup-header{margin-bottom:1rem}.chat-search{position:absolute !important;top:0;z-index:2}.chat-search-footer{height:46px;padding:0 8px;flex:0 0 auto;width:100%;background-color:#fff;display:flex;justify-content:space-between;align-items:center;box-shadow:0px -1px 5px -1px rgba(0,0,0,0.21)}.chat-search-footer .chat-search-count{margin-left:8px;color:#949596}.chat-search-footer+#chat-input{display:none}.chat-search-count:empty{display:none}.chat-search-count:not(:empty)+.btn-icon{display:none}.chat-search-controls{display:flex}.chat-search-results{width:100%;height:100%;max-height:100%;overflow:hidden;position:absolute;top:0;left:0;visibility:hidden;opacity:0;background-color:#fff;transition:.2s ease}.chat-search-results.active{opacity:1;visibility:visible}.chat-search .tgico-up{margin-right:2px}.quiz-hint{position:absolute;left:0;display:flex;width:100%;justify-content:center;z-index:5;top:8px;align-items:center;transform:translateY(calc(-100% - 10px));transition:transform .2s ease}.quiz-hint.active{transform:translateY(0)}.quiz-hint .container{background:rgba(0,0,0,0.7);text-align:center;width:auto;padding:10px 18px 12px 50px;min-height:48px;border-radius:12px;line-height:1.5;color:white;font-size:15px;max-width:400px;overflow:hidden;text-align:left;position:relative;display:flex;align-items:center;flex-wrap:wrap}@media only screen and (max-width: 896px){.quiz-hint .container{padding:10px 18px 12px 54px;margin:0 10px;font-size:14px}}.quiz-hint .container .text{word-break:break-word}.quiz-hint .container:before{content:\\\"\\\";position:absolute;left:15px;font-size:1.5rem;top:12px}.quiz-hint .container a{color:white;border-bottom:1px solid white}@-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:.25rem;top:0}.bubble{padding-top:.25rem;position:relative;z-index:1;margin:0 auto}.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% + $bubble-margin)}@media only screen and (max-width: 896px){.bubble.is-first-unread{max-width:unset}}.bubble.is-first-unread:before{content:\\\"Unread messages\\\";height:30px;margin-bottom:.25rem;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:.25rem;z-index:2;transition:opacity .3s ease;opacity:0.99999}.bubble.is-date.is-sticky{opacity:0.00001}#bubbles-inner:not(.is-scrolling) .bubble.is-date.is-sticky .bubble__container{cursor:default}.bubble.is-date .bubble__container{cursor:pointer}.bubble__container{min-width:56px;max-width:100%;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}@media only screen and (min-width: 897px){.bubble__container{max-width:85%}}@media only screen and (max-width: 896px){.bubble__container{max-width:calc(100% - 5.5625rem)}}.bubble__container>.user-avatar{position:absolute;left:-45px;width:40px;height:40px;line-height:40px;bottom:0;font-size:1rem;cursor:pointer}.bubble.service{padding:.25rem 0;max-width:696px}.bubble.service .bubble__container{margin:0 auto;max-width:100%}.bubble-beside-button{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}.bubble .forward svg{width:20px;height:20px}.bubble .message strong{font-weight:500 !important}.bubble.is-group-last{padding-bottom:.25rem}.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 .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 .thumbnail{position:absolute}.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-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 .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}@media only screen and (max-width: 896px){.bubble.is-reply.emoji-big .reply,.bubble.is-reply.sticker .reply{padding:8px 6px 8px 8px;max-width:94px}}.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}@media only screen and (max-width: 896px){.bubble .message.audio-message .audio{height:59px;padding-left:47px}}.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}@media only screen and (max-width: 896px){.bubble .message.audio-message .audio-details{margin-top:-1px}}.bubble .message.audio-message .audio-ico{font-size:2.15rem}@media only screen and (max-width: 896px){.bubble .message.audio-message .audio-ico{margin-top:1px;margin-left:2px}}.bubble .message.audio-message .progress-line{width:191px;margin:9px 0 9px}@media only screen and (max-width: 896px){.bubble .message.audio-message .progress-line{width:unset}}.bubble .message.audio-message .progress-line__filled{background-color:#47aa41;transform-origin:left;height:2px}.bubble .message.audio-message .progress-line__seek{height:2px;overflow:visible !important;background:rgba(124,195,107,0.52)}.bubble .message.audio-message .progress-line__seek::-webkit-slider-thumb{height:12px;width:12px;background:#47aa41;border:none}.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}@media only screen and (max-width: 896px){.bubble .message.document-message .document{padding-left:44px}}.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 !important}.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}.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{min-width:unset}.bubble:not(.forwarded).hide-name .name,.bubble.emoji-big .name{display:none}.bubble .name{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.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 .bubble__container:after,.bubble.video.is-message-empty.is-group-last .bubble__container:after{display:none}.bubble.is-message-empty.is-group-last.with-media-tail .bubble__container:after{display:none}.bubble.is-message-empty.is-group-last.with-media-tail .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;padding-left:14px !important}@media only screen and (max-width: 896px){.bubble-audio .time{padding-left:0px !important}}.bubble.is-in .bubble__container{margin-right:auto;background-color:#ffffff}.bubble.is-in .bubble__container,.bubble.is-in .bubble__container .poll-footer-button{border-radius:6px 12px 12px 6px}.bubble.is-in.is-group-first .bubble__container,.bubble.is-in.is-group-first .poll-footer-button{border-radius:12px 12px 12px 6px}.bubble.is-in.is-group-last .bubble__container,.bubble.is-in.is-group-last .poll-footer-button{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,.bubble.is-in.is-group-first.is-group-last .poll-footer-button{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}@media only screen and (max-width: 896px){.bubble.is-in.is-reply.emoji-big .reply,.bubble.is-in.is-reply.sticker .reply{left:calc(100% + 1px)}}.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;padding-left:36px}.bubble.is-in .time .inner{padding:0 7px 0 5px;margin-bottom:4px}.bubble.is-in.is-message-empty.is-group-last:not(.with-media-tail).photo .bubble__container,.bubble.is-in.is-message-empty.is-group-last:not(.with-media-tail).video .bubble__container{border-bottom-left-radius:6px}.bubble.is-in.is-message-empty.is-group-last.with-media-tail .attachment{border-bottom-left-radius:0}.bubble.is-in.is-message-empty.is-group-last.with-media-tail .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 .progress-line__seek{background:rgba(193,207,220,0.39)}.bubble.is-in .message.audio-message .progress-line__filled{background-color:#0089ff}.bubble.is-in .message.audio-message .progress-line__loaded{background-color:#cacaca}.bubble.is-in .message.audio-message .progress-line input::-webkit-slider-thumb{background:#63a2e3;border:none}.bubble.is-out .bubble__container{margin-left:auto;background-color:#eeffde}.bubble.is-out .bubble__container>.user-avatar{left:auto;right:-2.5rem}.bubble.is-out .bubble__container,.bubble.is-out .bubble__container .poll-footer-button{border-radius:12px 6px 6px 12px}.bubble.is-out.is-group-first .bubble__container,.bubble.is-out.is-group-first .poll-footer-button{border-radius:12px 12px 6px 12px}.bubble.is-out.is-group-last .bubble__container,.bubble.is-out.is-group-last .poll-footer-button{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,.bubble.is-out.is-group-first.is-group-last .poll-footer-button{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:90px !important}.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.is-message-empty.is-group-last:not(.with-media-tail).photo .bubble__container,.bubble.is-out.is-message-empty.is-group-last:not(.with-media-tail).video .bubble__container{border-bottom-right-radius:6px}.bubble.is-out.is-message-empty.is-group-last.with-media-tail .attachment{border-bottom-right-radius:0}.bubble.is-out.is-message-empty.is-group-last.with-media-tail .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 .poll-footer-button{color:#4fae4e}.bubble.is-out poll-element .progress-ring__circle{stroke:#4fae4e}.bubble.is-out.is-sending poll-element{pointer-events:none}.bubble.is-out .progress-line__loaded{background-color:#90e18d !important}.bubble.is-out .bubble-beside-button{right:auto;left:-46px}.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:330px}@media only screen and (max-width: 896px){poll-element{min-width:240px}}poll-element:not(.is-closed):not(.is-voted) .poll-answer{cursor:pointer}poll-element .poll-title{font-weight:500;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@media only screen and (max-width: 896px){poll-element .poll-title{max-width:88%}}poll-element .poll-desc{font-size:14px;color:#707579;margin-top:2px;margin-bottom:7px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:flex;position:relative}poll-element .poll-hint{position:absolute;font-size:1.5rem;top:-4px;right:2px;color:#50a2e9;cursor:pointer;transform:scale(1);transition:transform .2s ease}poll-element .poll-hint.active{transform:scale(0);pointer-events:none}poll-element .poll-send-vote{cursor:default}poll-element .poll-avatars{display:flex;margin-left:18px}poll-element .poll-answer{display:flex;position:relative;padding-bottom:20px;padding-left:28px;margin-top:1px}poll-element .poll-answer-text{margin-top:6px;margin-left:12px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}poll-element .poll-answer-percents{position:absolute;left:0;top:0;opacity:0;font-weight:500;margin-top:7px;font-size:14px;transition:.34s opacity;margin-left:-9px;text-align:right;width:40px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}poll-element .poll-answer-selected{position:absolute;bottom:1px;left:15px;color:#fff;background:#50a2e9;border-radius:50%;height:16px;width:16px;font-weight:bold;font-size:14px;line-height:1.4;opacity:0;-webkit-animation:fadeIn .1s ease forwards;animation:fadeIn .1s ease forwards;animation-direction:reverse;-webkit-animation-delay:.24s;animation-delay:.24s;text-align:center}poll-element .poll-answer-selected:before{content:\\\"\\\";font-weight:bold}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-answer:not(.is-correct):not(.is-chosen) .poll-answer-selected{display:none}poll-element .poll-answer.is-chosing .poll-answer-selected{opacity:1}poll-element .poll-answer.is-chosing ~ .poll-footer .poll-send-vote{cursor:pointer}poll-element .poll-votes-count{color:#707579;font-size:14px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding-top:1px}poll-element .poll-line{height:35px;position:absolute;left:10px;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 .poll-footer{text-align:center;margin-top:7px;height:21px}poll-element .poll-footer-button{cursor:pointer;position:absolute;left:0;margin-top:-7px;width:100%;height:41px;color:#50a2e9;font-weight:500;border-top-left-radius:0 !important;border-top-right-radius:0 !important;font-size:1rem;line-height:37px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden}poll-element .poll-quiz-timer{width:32px;height:32px;stroke:#a3adb6;transform:rotate(270deg);top:-7px;fill:none;position:absolute;right:-2px;stroke-linecap:round}poll-element .poll-time{font-size:12px;font-weight:500;position:absolute;right:27px;color:#a3adb6}poll-element.is-quiz .poll-answer.is-chosen:not(.is-correct) use{stroke:#DF3F40}poll-element.is-quiz .poll-answer.is-chosen:not(.is-correct) .poll-answer-selected{background:#DF3F40}poll-element.is-quiz .poll-answer.is-chosen:not(.is-correct) .poll-answer-selected:before{content:\\\"\\\";font-size:12px}poll-element avatar-element{width:18px;height:18px;border:1px solid #fff;line-height:20px;font-size:10px;cursor:pointer}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;position:absolute;left:-1px;top:-1px;transform:scale(1);transition:.1s transform}poll-element .circle-hover .poll-answer-selected{display:flex !important;opacity:0;left:50%;top:50%;transform:translate(-50%, -50%);width:20px;height:20px;font-size:20px;line-height:16px;-webkit-animation:none;animation:none;transition:opacity .2s ease}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:#dadbdc;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-header{background-color:#fff;display:flex;align-items:center;justify-content:space-between;padding:7.5px 16px;min-height:56px;flex:0 0 auto;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}@media only screen and (max-width: 896px){.sidebar-header{padding:7.5px 8px}}.sidebar-header__title{flex:1;font-weight:500;padding-left:22px;font-size:20px}@media only screen and (max-width: 896px){.sidebar-header__title{padding-left:24px}}.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 .folders-tabs-scrollable{z-index:1;background-color:#fff;border-bottom:1px solid #dadce0}#column-left .folders-tabs-scrollable .scrollable{position:relative}#column-left .folders-tabs-scrollable .menu-horizontal{border-bottom:none}#column-left .folders-tabs-scrollable .menu-horizontal ul{justify-content:space-between;z-index:0}#column-left .folders-tabs-scrollable .menu-horizontal li{height:43px;padding:0 16px;display:flex;justify-content:center;align-items:center}#column-left .folders-tabs-scrollable .menu-horizontal li>span:first-child{overflow:visible}#column-left .folders-tabs-scrollable .menu-horizontal li>span:first-child i{bottom:calc(-.625rem - -2px);padding-right:1rem !important;margin-left:-.5rem !important}#column-left .folders-tabs-scrollable .menu-horizontal__stripe{display:none}#column-left .folders-tabs-scrollable span.unread-count{margin-left:5px;background:#50a2e9;height:20px;border-radius:12px;font-weight:500;color:white;line-height:22px;min-width:20px;padding:0 6px}#column-left .folders-tabs-scrollable span.unread-count:empty{display:none}#column-left .folders-tabs-scrollable:not(.hide)+.scrollable{top:44px;height:calc(100% - 44px)}#column-left #chats-container{max-height:100%;overflow:hidden;position:relative}#column-left #folders-container{min-height:100%}#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)}@media only screen and (max-width: 896px){#column-left .sidebar-header__btn-container .btn-menu{margin-top:-4px}}#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}@media only screen and (max-width: 896px){#column-left .sidebar-tools-button .btn-menu .archived-count{font-size:14px;font-weight:600}}#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}@media only screen and (max-width: 896px){#column-left .search-group-people .rp{width:77px;max-width:77px}}#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}@media only screen and (max-width: 896px){#column-left .search-group-people .user-caption{max-width:56px}}#column-left .search-group-people .user-title{max-width:unset}#column-left .search-group-people .search-group-scrollable{position:relative}@media only screen and (max-width: 896px){#column-left .search-group-people .search-group-scrollable{margin-left:-7px;margin-top:4px}}#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:\\\"\\\"}@media only screen and (max-width: 896px){#column-left .item-main .sidebar-content .btn-corner{transform:translateY(0px);position:fixed !important}}@media only screen and (max-width: 896px){#column-left .item-main .sidebar-content .btn-menu-toggle{width:54px;height:54px;bottom:14px;right:14px}}@media only screen and (min-width: 897px){html.no-touch #column-left .item-main .sidebar-content:hover .btn-corner{transform:translateY(0px)}}#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}@media only screen and (max-width: 896px){.new-channel-container .input-wrapper,.new-group-container .input-wrapper,.edit-profile-container .input-wrapper{width:100%;padding:0 16px}}.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;padding-right:24px}.edit-folder-container .input-wrapper{width:380px;margin:0 auto;flex:0 0 auto}.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}@media only screen and (max-width: 896px){.settings-container .profile-button{padding:0.75rem 0.625rem;height:48px;margin:0 0 2px 0;border-radius:0}}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%}@media only screen and (max-width: 896px){.settings-container .profile-buttons{margin-top:0.6875rem}}.edit-profile-container .caption{margin-top:1.063rem;margin-left:1.438rem;line-height:1.2;padding-bottom:1.438rem}@media only screen and (max-width: 896px){.edit-profile-container .caption{padding-right:24px}}.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%}.chat-folders-container,.edit-folder-container{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.chat-folders-container .sticker-container,.edit-folder-container .sticker-container{width:86px;height:86px;margin:1px auto 29px;flex:0 0 auto}.chat-folders-container .caption,.edit-folder-container .caption{text-align:center;color:#707579;font-size:14px;line-height:1.3}.chat-folders-container .sidebar-left-h2,.edit-folder-container .sidebar-left-h2{color:#707579;font-size:15px;padding:7px 24px 15px 24px;font-weight:500}@media only screen and (max-width: 896px){.chat-folders-container .sidebar-left-h2,.edit-folder-container .sidebar-left-h2{padding:7px 16px 15px 16px}}.chat-folders-container .btn-primary{width:160px;height:40px;align-items:center;margin:15px auto 24px;border-radius:30px;padding:0 12px;display:flex}.chat-folders-container .tgico-add:before{content:\\\"\\\\e903\\\";font-size:24px;margin-right:6px}.chat-folders-container .category{padding:7px 24px 11px 24px;display:flex;justify-content:space-between;cursor:pointer;position:relative;margin-bottom:10px}@media only screen and (max-width: 896px){.chat-folders-container .category{padding:7px 16px 11px 16px}}.chat-folders-container .category p{height:unset}.chat-folders-container .category p:last-child{color:#707579;font-size:14px;line-height:20px}.chat-folders-container .category .btn-primary{height:30px;font-size:15px;width:52px;transition:width 0.2s;margin:5px 0 0 0}.edit-folder-container .caption{margin-bottom:18px}@media only screen and (max-width: 896px){.edit-folder-container .input-wrapper{width:100%;padding:0 16px}.edit-folder-container .input-field input{height:50px}}.edit-folder-container .sidebar-left-h2{padding:21px 24px 8px 24px}@media only screen and (max-width: 896px){.edit-folder-container .sidebar-left-h2{width:100%;padding:21px 16px 8px 16px}}.edit-folder-container .input-wrapper{margin-bottom:10px}.folder-list li{padding-bottom:2px}.folder-list li .rp{padding:8px 11px !important;height:48px !important}@media only screen and (max-width: 896px){.folder-list li .rp{padding:8px 12px !important}}.folder-list avatar-element{height:32px;width:32px}.folder-list .user-caption{padding:6px 28px}.folder-list p span{font-weight:normal}.folder-categories{width:100%}.folder-categories .checkbox{margin-top:-9px !important;right:0;position:absolute}.folder-categories .checkbox [type=\\\"checkbox\\\"]+span{padding-left:46px}@media only screen and (max-width: 896px){.folder-categories .checkbox [type=\\\"checkbox\\\"]+span{padding-left:38px}}.folder-categories .checkbox [type=\\\"checkbox\\\"]:checked+span:before{top:5px;left:0px}.folder-category-button{display:flex;font-size:1.5rem;padding:13px 24px 10px 24px}@media only screen and (max-width: 896px){.folder-category-button{padding:13px 16px 10px 16px}}.folder-category-button p{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin-left:32px;font-size:16px;flex:1 1 auto}.folder-category-button.blue,.folder-category-button.blue:before{color:#50a2e9}.folder-category-button:first-child{cursor:pointer}.folder-category-button:before{color:#797d82}.sidebar-header .tgico-check1{color:#50a2e9}.included-chats-container .sidebar-left-h2{color:#707579;font-size:15px;font-weight:500;padding:6px 24px 8px 24px}@media only screen and (max-width: 896px){.included-chats-container .sidebar-left-h2{padding:6px 16px 8px 16px}}.included-chats-container .selector ul li>.rp{margin:0 8px !important;padding:7px 12px !important;height:62px}@media only screen and (max-width: 896px){.included-chats-container .selector ul li>.rp{margin:0 !important}}.included-chats-container .selector ul .dialog-avatar{width:46px;height:46px}.included-chats-container .selector ul span.user-title{font-weight:500}.included-chats-container .selector ul .user-caption{padding:0px 0px 0 14px;margin-top:-2px}.included-chats-container .selector ul span.user-last-message{font-size:15px;margin-top:2px}.included-chats-container .selector ul .checkbox{margin-top:10px}.included-chats-container .selector ul [type=\\\"checkbox\\\"]+span{padding-left:26px}.included-chats-container .checkbox [type=\\\"checkbox\\\"]+span:after{border-radius:50%;height:20px;width:20px;border-color:#dadbdc}.included-chats-container .checkbox [type=\\\"checkbox\\\"]:checked+span:after{background-color:#4EA4F6;border:none}.included-chats-container .folder-category-button{cursor:pointer}.search-group-recent .search-group__name{display:flex;justify-content:space-between;align-items:center}@media only screen and (max-width: 896px){.search-group-recent li{padding-top:0}}.search-group-recent .btn-icon{font-size:22px}@media only screen and (max-width: 896px){.search-group-recent .user-caption{margin-top:-2px}}@media only screen and (max-width: 896px){.search-group-recent p span.user-title{font-weight:500}}@media only screen and (max-width: 896px){.search-group-recent .dialog-avatar{width:46px;height:46px}}@media only screen and (max-width: 896px){.search-group-recent li>.rp{height:62px}}@media only screen and (max-width: 896px){.search-group-recent.search-group.search-group-contacts ul{margin-top:-2px}}@media only screen and (max-width: 896px){.search-group.search-group-contacts ul,.search-group.search-group-messages ul{margin-top:7px}}@media only screen and (max-width: 896px){.search-group.search-group-messages{margin-top:-6px}}@media only screen and (min-width: 897px){.search-group-recent.search-group.search-group-contacts{padding:0px 0 7px}}#column-right{position:relative}@media only screen and (min-width: 897px) and (max-width: 1275px){#column-right{box-shadow:0 0.25rem 0.5rem 0.1rem rgba(114,114,114,0.25)}}@media only screen and (min-width: 897px){#column-right{width:var(--right-column-width);transition:transform .2s ease-in-out;transition:transform var(--layer-transition);position:absolute;right:0;z-index:3;transform:translate3d(var(--right-column-width), 0, 0)}#column-right .sidebar-content{min-width:var(--right-column-width)}body.is-right-column-shown #column-right{transform:translate3d(0, 0, 0)}body.animation-level-0 #column-right{transition:none}}@media only screen and (min-width: 1276px){#column-right{border-left:1px solid #DADCE0}}#column-right .sidebar-header{flex:0 0 auto}#column-right .sidebar-header .sidebar-close-button:before{content:\\\"\\\"}@media only screen and (min-width: 897px){#column-right .sidebar-header .sidebar-close-button:before{content:\\\"\\\"}}#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{flex:0 0 auto;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:13px}@media only screen and (min-width: 897px){.profile-content-wrapper{margin-top:15px}}.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:20px;line-height:1.4;font-weight:500;text-overflow:ellipsis;overflow:hidden;word-break:break-word;max-width:340px;margin:0 auto}.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;margin-top:1px}@media only screen and (max-width: 896px){.profile-subtitle{margin-top:3px}}.profile-subtitle.online{color:#50a2e9}.profile-row{display:flex;width:100%;flex-direction:column;padding-left:80px;padding-right:12px;position:relative;margin-top:27px;margin-bottom:1px;line-height:1.4}@media only screen and (max-width: 896px){.profile-row{padding-left:71px}}.profile-row:before{position:absolute;left:24px;font-size:24px;color:#707579}@media only screen and (max-width: 896px){.profile-row:before{left:15px}}.profile-row p{color:#000;margin:0;font-size:1rem;text-overflow:ellipsis;overflow:hidden;word-break:break-word}.profile-row-bio .emoji{width:24px;height:24px}.profile-row-label{color:#707579 !important;font-size:14px !important;line-height:1.6}@media only screen and (max-width: 896px){.profile-row-label{line-height:1.6}}.profile-row-notifications{margin-top:26px;line-height:1.3}.profile-avatar{width:120px;height:120px;margin:1px auto 10px;font-size:2.5rem !important}@media only screen and (max-width: 896px){.profile-avatar{margin:0 auto 10px;width:100px;height:100px}}.profile-avatar.tgico-avatar_deletedaccount{font-size:6rem}.profile-name,.profile-subtitle,.profile-row,.profile-avatar{flex:0 0 auto}.profile-tabs{position:-webkit-sticky !important;position:sticky !important;top:0;z-index:2;background-color:#fff}.profile-tabs i{padding-right:1.5rem !important;margin-left:-.75rem !important}.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}@media only screen and (max-width: 896px){.profile-tabs-content #content-media{padding:7.5px 7.5px 7.5px 6.5px}}.profile-tabs-content #content-media .media-item{height:0;padding-bottom:100%;overflow:hidden;position:relative;cursor:pointer}.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;opacity:1;transition:opacity .2s ease}html:not(.is-mac) .profile-tabs-content #content-media .media-image.thumbnail{-webkit-filter:blur(7px);filter:blur(7px)}.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 .preloader-container .preloader-circular{background-color:rgba(0,0,0,0.35)}@media only screen and (max-width: 896px){.profile-tabs-content #content-audio .preloader-container{width:40px;height:40px;top:9px;left:2px}}@media only screen and (min-width: 897px){.profile-tabs-content #content-audio .preloader-container{width:38px;height:38px}}.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}@media only screen and (min-width: 897px){.profile-tabs-content #content-audio .audio-download{width:48px;height:48px}}.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 .progress-line{margin:11px 0 8px}.profile-tabs-content #content-audio .progress-line__filled{background-color:#0089ff;transform-origin:left;height:2px}.profile-tabs-content #content-audio .progress-line__loaded{background-color:#cacaca}.profile-tabs-content #content-audio .progress-line__seek{height:2px;background:rgba(193,207,220,0.39)}.profile-tabs-content #content-audio .progress-line__seek::-webkit-slider-thumb{height:12px;width:12px;border:none}#stickers-container .sticker-sets{display:flex;flex-direction:column;margin-top:16px}#stickers-container .sticker-set{display:flex;flex-direction:column;height:140px;cursor:pointer}#stickers-container .sticker-set-name{font-weight:500}#stickers-container .sticker-set-count{font-size:14px;color:#707579}#stickers-container .sticker-set-header{display:flex;padding-left:16px;padding-bottom:12px;justify-content:space-between}#stickers-container .sticker-set-button{height:30px;padding-left:12px;padding-right:13px;margin-right:16px;font-size:15px;border-radius:16px;font-weight:400;width:52px;transition:width 0.2s}#stickers-container .sticker-set-button.gray{background:#F1F3F4;color:#707579;width:68px}#stickers-container .sticker-set-stickers{display:flex;justify-content:space-around}#stickers-container .sticker-set-sticker{width:68px;height:68px}#stickers-container .sticker-set-sticker:hover{border-radius:12px;background-color:rgba(112,117,121,0.08)}#stickers-container .sticker-set-sticker img{max-width:100%;max-height:100%}#poll-results-container .poll-results{display:flex;flex-direction:column;position:relative;width:100%}#poll-results-container .poll-results-answer{color:#707579;padding:0 16px 8px 16px;margin:0;padding-bottom:8px;font-weight:500;justify-content:space-between;display:flex;font-size:15px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@media only screen and (min-width: 897px){#poll-results-container .poll-results-answer{padding:0 24px 8px 24px}}#poll-results-container .poll-results-more{padding-top:13px;padding-bottom:13px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative}@media only screen and (min-width: 897px){#poll-results-container .poll-results-more{padding-left:8px}}#poll-results-container .poll-results-more .tgico-down{float:left;padding-right:32px;padding-left:16.5px;font-size:24px;color:#707579}#poll-results-container .poll-results h3{padding:0 16px;margin-top:15px;font-size:20px;margin-bottom:16px}@media only screen and (min-width: 897px){#poll-results-container .poll-results h3{padding:0 24px}}#poll-results-container .poll-results hr{margin-bottom:15px;margin-top:7px}#poll-results-container .poll-results avatar-element{width:32px;height:32px}#poll-results-container .poll-results .user-caption{padding:6px 28px}#poll-results-container .poll-results .user-title{font-weight:normal}#poll-results-container .poll-results li{padding-bottom:2px}#poll-results-container .poll-results li>.rp{padding:8px 5px;height:48px}@media only screen and (min-width: 897px){#poll-results-container .poll-results li>.rp{padding:8px 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 only screen and (max-width: 896px){.media-viewer{background:#000}}.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 only screen and (max-width: 896px){.media-viewer-userpic{display:none}}.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 only screen and (max-width: 896px){.media-viewer-buttons{display:none}}.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{position:absolute;left:0;top:60px;width:7rem;height:calc(100% - 120px);cursor:pointer;z-index:5}html.no-touch .media-viewer-switcher{height:calc(100% - 60px)}html.no-touch .media-viewer-switcher:hover>span{opacity:1}@media only screen and (max-width: 896px){.media-viewer-switcher{width:4rem}}.media-viewer-switcher-right{left:auto;right:0}.media-viewer-prev-button,.media-viewer-next-button{cursor:pointer;position:absolute;color:#fff;font-size:2rem;left:1rem;top:50%;transform:translateY(-50%) rotate(90deg);opacity:0;transition:.2s opacity;z-index:5}@media only screen and (min-width: 897px){.media-viewer-prev-button,.media-viewer-next-button{font-size:3rem;left:2rem}}.media-viewer-next-button{left:auto;right:1rem;transform:translateY(-50%) rotate(-90deg)}@media only screen and (min-width: 897px){.media-viewer-next-button{right:2rem}}.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;max-width:calc(100% - 16px);max-height:calc(100% - 100px)}@media only screen and (max-width: 896px){.media-viewer-mover{overflow:visible;max-width:100% !important}}.media-viewer-mover .ckin__player{width:100%;height:100%;position:absolute;left:0;top:0}.media-viewer-mover>svg{width:100%;height:100%}.media-viewer-mover img,.media-viewer-mover video{width:100%;height:100%;max-width:100%;max-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;position:absolute}.media-viewer-mover svg img,.media-viewer-mover svg video{position:unset}.media-viewer-mover.active{transition:.2s transform}.media-viewer-mover.moving{transition:.35s transform ease}.media-viewer-mover.no-transition{transition:none !important}.media-viewer-mover.center{left:50% !important;top:50% !important;transform:translate3d(-50%, -50%, 0) !important}@media only screen and (max-width: 896px){.media-viewer-mover.center{width:100% !important;height:100% !important}.media-viewer-mover.center .ckin__player:not(.ckin__fullscreen) .default__controls{bottom:-50px}.media-viewer-mover.center .ckin__player:not(.ckin__fullscreen) .default__gradient-bottom{bottom:-50px}}.media-viewer-mover.center img:not(.thumbnail),.media-viewer-mover.center video{height:auto;width:auto;-o-object-fit:contain;object-fit:contain}.media-viewer-mover.center img.thumbnail{width:auto;-o-object-fit:contain;object-fit:contain}.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);position:absolute;display:flex;align-items:center;justify-content:center}.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,.media-viewer-whole.active>.btn-icon{opacity:1;visibility:visible;transition:opacity .2s 0s,visibility 0s 0s}@media only screen and (max-width: 896px){.media-viewer-whole .menu-mobile-close{left:20px}.media-viewer-whole>.btn-icon{top:8px;position:fixed;z-index:5;opacity:0;transition:opacity .2s 0s,visibility 0s .2s}.media-viewer-whole .btn-menu-toggle{right:8px}.media-viewer-whole .btn-menu-toggle.menu-open{color:#fff;background-color:rgba(112,117,121,0.2) !important}}.media-viewer-whole.highlight-switchers .media-viewer-switcher>span{opacity:1}.media-viewer-switchers{position:relative;width:1680px;max-width:100%;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__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{width:100%;height:100%;-o-object-fit:contain;object-fit:contain}.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)}.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;cursor:pointer;display:flex;align-items:center;justify-content:center}.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{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:translate3d(-50%, -50%, 0) 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__controls .progress-line{margin:0 16px;height:5px;background:rgba(255,255,255,0.38);border-radius:4px;overflow:visible}.default__controls .progress-line__filled{background:#63a2e3;transform-origin:left;border-radius:4px;height:5px;transform:scaleX(0)}.default__controls .progress-line__loaded{background:rgba(255,255,255,0.38);left:11px;width:calc(100% - 11px)}.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 .toggle:before{content:\\\"\\\"}.default.is-playing .default__gradient-bottom{transform:translate3d(0, 50px, 0)}html.no-touch .default.is-playing:hover .default__gradient-bottom,.default.is-playing.show-controls .default__gradient-bottom{transform:translateZ(0)}html.no-touch .default.is-playing:hover .default__controls,.default.is-playing.show-controls .default__controls{transform:translateZ(0)}.default.is-playing:before{opacity:0;visibility:hidden;transform:translate3d(-50%, -50%, 0) scale(1.3)}.default.is-playing .default__button--big{opacity:0;visibility:hidden}.default.is-playing .default__controls{transform:translate3d(0, 52px, 0)}.default.is-playing .toggle:before{content:\\\"\\\"}.default .player-volume{margin:-3px 2px 0 10px;display:flex;align-items:center}@media only screen and (max-width: 896px){.default .player-volume{margin:-3px 2px 0 2px}}.default .player-volume__icon{fill:#fff;width:24px;height:24px;margin-right:8px;cursor:pointer}@media only screen and (max-width: 896px){.default .player-volume__icon{width:20px;height:20px}}.default .player-volume .progress-line{margin:0;width:50px}html.is-ios .default .player-volume .progress-line{display:none}.default .player-volume .progress-line__filled{background:#fff}.default .player-volume .progress-line input[type=range]::-webkit-slider-thumb{height:15px;width:15px;border-radius:16px;background:#fff}.default.is-buffering>.toggle{display:none !important}@media (max-width: 480px){.ckin__player button{font-size:18px}}video::-webkit-media-controls-enclosure{display:none !important}.progress-line{position:relative;cursor:pointer}.progress-line input[type=range]{-webkit-appearance:none;-moz-appearance:none;background:transparent;height:4.5px;cursor:pointer;padding:0;outline:none}.progress-line input[type=range]:focus{outline:none}.progress-line input[type=range]:focus::-webkit-slider-runnable-track{background:transparent}.progress-line input[type=range]:focus::-moz-range-track{outline:none}.progress-line 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}.progress-line input[type=range]::-webkit-slider-thumb{height:15px;width:15px;border-radius:16px;background:#63a2e3;cursor:pointer;-webkit-appearance:none;margin-left:-1px;border:none}.progress-line input[type=range]::-moz-range-track{width:100%;height:8.4px;cursor:pointer;border:1px solid transparent;background:transparent;border-radius:1.3px}.progress-line input[type=range]::-moz-range-thumb{height:14px;width:14px;border-radius:50px;border:1px solid #63a2e3;background:#63a2e3;cursor:pointer;margin-top:5px}.progress-line__seek{position:absolute;top:0;width:100%;cursor:pointer;margin:0}.progress-line__loaded{position:absolute;left:12px;top:0;width:calc(100% - 12px)}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}@media only screen and (max-width: 896px){.time{padding:7px 0px 9px 0px}}.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{display:flex;flex-direction:column;width:100%;height:282px;background:#fff;display:flex;overflow:hidden;flex:0 0 auto}@media only screen and (min-width: 897px){.emoji-dropdown{position:absolute !important;left:0;bottom:calc(85px);width:420px !important;height:420px;box-shadow:0px 5px 10px 5px rgba(16,35,47,0.14);z-index:3;border-radius:10px;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{margin-top:2px;border:none}.emoji-dropdown .emoji-container{width:100%;max-width:100%;overflow:hidden;height:100%}.emoji-dropdown .btn-icon{color:#8d969c}.emoji-dropdown .emoji-tabs ul{justify-content:center}.emoji-dropdown .emoji-tabs-search{position:absolute;left:0;margin-left:4px !important}.emoji-dropdown .emoji-tabs-delete{position:absolute;right:0;margin-right:4px !important}.emoji-dropdown .tabs-container{height:100%}.emoji-dropdown .tabs-container .category-title{top:0;font-size:14px;font-weight:500;color:#707579;z-index:2;padding:12px 6px 6px 6px;width:100%}.emoji-dropdown .tabs-container .sticky_sentinel--top{top:0;height:1px}.emoji-dropdown .tabs-container .emoji-category{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>span{margin:0;padding:4px 4px;line-height:inherit;border-radius:8px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:42px;height:42px}.emoji-dropdown .tabs-container .emoji-category .category-items>span .emoji{width:100%;height:100%;vertical-align:unset}html.no-touch .emoji-dropdown .tabs-container .emoji-category .category-items>span:hover{background-color:rgba(112,117,121,0.08)}.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;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding:1px 2.5px;justify-content:center;border-radius:12px;padding:0}@media only screen and (max-width: 896px){.emoji-dropdown .tabs-container .sticker-category .category-items>div{height:75px;justify-self:center;padding:0;min-width:64px;width:100%}}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>img{max-width:100%;max-height:100%;-webkit-animation:fadeIn .2s ease forwards;animation:fadeIn .2s ease forwards}.emoji-dropdown .tabs-container>div{min-height:100%;flex-direction:column;height:100%}.emoji-dropdown .tabs-container .emoticons-content{flex:1;padding:0}.emoji-dropdown .tabs-container .scrollable{padding:0 10px}@media only screen and (max-width: 896px){.emoji-dropdown .emoji-padding.active .menu-horizontal li{flex:unset;padding:0}.emoji-dropdown .emoji-padding.active .category-items>span{width:40px;height:40px;justify-self:center}.emoji-dropdown .emoji-padding.active .category-title{padding:12px 6px 6px 10px}.emoji-dropdown .emoji-padding.active .scrollable{padding:0}.emoji-dropdown .emoji-padding.active .emoji-category .category-items{grid-column-gap:unset;grid-template-columns:repeat(8, 1fr)}}.emoji-dropdown .emoji-padding .menu-horizontal,.emoji-dropdown .stickers-padding .menu-horizontal{height:48px;border-bottom:none;padding:2px 2px 2px 2px;width:100%;box-shadow:0px 1px 5px -1px rgba(0,0,0,0.21);z-index:4}.emoji-dropdown .emoji-padding .menu-horizontal li,.emoji-dropdown .stickers-padding .menu-horizontal li{margin:0}.emoji-dropdown .menu-horizontal li{border-radius:50%}.emoji-dropdown #content-stickers .scrollable{padding:0px 5px 0}.emoji-dropdown .menu-horizontal{width:100%;height:48px;box-shadow:0px -2px 5px -1px rgba(0,0,0,0.21)}.emoji-dropdown .menu-horizontal li{font-size:1.5rem;margin:0 12px;width:48px;height:48px;line-height:48px;display:flex;align-items:center;flex:0 0 auto}.emoji-dropdown .stickers-padding.active .scrollable{padding:0;box-shadow:0px 1px 5px -1px rgba(0,0,0,0.21)}.emoji-dropdown .stickers-padding.active .menu-horizontal{box-shadow:none}.emoji-dropdown .stickers-padding.active .menu-horizontal li{height:48px;width:48px;padding:0;margin-right:1px;margin-left:1px}.emoji-dropdown .stickers-padding .menu-wrapper{padding:0;height:48px;max-width: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>canvas,.emoji-dropdown .stickers-padding li>img{padding:8px;max-width:100%;max-height:100%;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%;transform:translateZ(0);position:absolute;top:0px;left:0px;bottom:0px;right:0px;-webkit-overflow-scrolling:touch}.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;opacity:0}div.scrollable:hover::-webkit-scrollbar{opacity:1}::-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}div.scrollable-x::-webkit-scrollbar{display:none}.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;flex-direction:row}.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:14px;font-weight:500;position:relative;border-top-left-radius:6px;border-top-right-radius:6px}.menu-horizontal li>span{position:relative;display:inline-flex;align-items:center}.menu-horizontal li.active{color:#50a2e9}.menu-horizontal li.active i{opacity:1}.menu-horizontal i{position:absolute;bottom:calc(-.625rem - 2px);left:0;opacity:0;background-color:#50a2e9;height:.1875rem;width:100%;border-radius:.1875rem .1875rem 0 0;pointer-events:none;padding-right:.5rem;margin-left:-.25rem;box-sizing:content-box;transform-origin:left}.menu-horizontal i.animate{transition:transform .25s}.tabs-container{min-width:100%;width:100%;display:grid;grid-template-columns:100%}.tabs-container>div{width:100%;max-width:100%;transition:transform .25s,-webkit-filter .25s;transition:transform .25s,filter .25s;transition:transform .25s,filter .25s,-webkit-filter .25s;display:none;flex-direction:column;position:relative;grid-row-start:1;grid-column-start:1;background-color:#fff;overflow:hidden}.tabs-container>div.active{display:flex}.tabs-container>div>div:not(.scroll-padding){width:100%;max-width:100%;position:relative}.tabs-container[data-slider=\\\"tabs\\\"]{transition:transform .25s}@-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;max-height:inherit}.selector-search-container avatar-element:before{font-size:18px}.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}@media only screen and (max-width: 896px){.selector ul li>.rp{margin:0}}@media not all and (min-resolution: 0.001dpcm){@supports (-webkit-appearance: none){.selector ul li>.rp{margin-right:4px}}}.selector hr{margin:0 0 8px}.selector [type=\\\"checkbox\\\"]+span{padding-left:calc(9px + 2.25rem)}.selector .checkbox{margin-top:11px;padding-left:11px}.gifs-masonry{display:flex;flex-wrap:wrap}.gifs-masonry>.gif{flex:1 0 auto;max-width:100%;height:100px;margin:2.5px;cursor:pointer;position:relative}.gifs-masonry>.gif video,.gifs-masonry>.gif img{-o-object-fit:cover;object-fit:cover;width:100%;height:100%}.gifs-masonry>.gif img{position:absolute;left:0;top:0}.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}.preloader-container.preloader-streamable,.preloader-container.preloader-streamable svg{cursor:pointer !important}.preloader-container.preloader-streamable circle{stroke-width:2.5 !important;-webkit-animation:dashNewStreamable 1.5s ease-in-out infinite !important;animation:dashNewStreamable 1.5s ease-in-out infinite !important}.preloader-container.preloader-streamable:after{content:\\\"\\\";position:absolute;width:.8125rem;height:.8125rem;border-radius:.125rem;background-color:#fff;left:50%;top:50%;transform:translate3d(-50%, -50%, 0)}@-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%}}@-webkit-keyframes dashNewStreamable{0%{stroke-dasharray:1, 200;stroke-dashoffset:0}50%{stroke-dasharray:89, 200;stroke-dashoffset:-35px}100%{stroke-dasharray:89, 200;stroke-dashoffset:-237%}}@keyframes dashNewStreamable{0%{stroke-dasharray:1, 200;stroke-dashoffset:0}50%{stroke-dasharray:89, 200;stroke-dashoffset:-35px}100%{stroke-dasharray:89, 200;stroke-dashoffset:-237%}}.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}.popup.active{opacity:1;visibility:visible;transition:opacity 0.3s 0s, visibility 0s 0s;z-index:4}.popup.active .popup-container{transform:translate3d(0, 0, 0)}.popup-container{position:relative;border-radius:10px;background-color:#fff;padding:1rem;transform:translate3d(0, -40px, 0);-webkit-backface-visibility:hidden;backface-visibility:hidden;transition-property:transform;transition-duration:0.3s;display:flex;flex-direction:column;overflow:hidden;margin:auto}.popup-centerer{margin:auto}.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-body{flex:1 1 auto;display:flex;flex-direction:column;overflow:hidden}.popup-body .scrollable{position:relative}.popup-buttons{display:flex;flex-direction:column;justify-content:flex-end;align-items:flex-end}.popup-buttons button{background:none;outline:none;border:none;font-weight:500;padding:.5rem;text-transform:uppercase;transition:.2s;border-radius:8px;cursor:pointer;color:#50a2e9;position:relative}html.no-touch .popup-buttons button:hover{background-color:rgba(112,117,121,0.08)}.popup-buttons button+button{margin-top:.5rem;text-overflow:ellipsis;white-space:nowrap;max-width:286px;overflow:hidden}.popup.popup-delete-chat .popup-container{max-width:328px}.popup-avatar .popup-container{max-width:600px;padding:15px 16px 16px 24px}.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-new-media .popup-container{width:420px;max-width:420px;padding:12px 20px 32.5px}.popup-new-media .popup-container.is-media:not(.is-album) .popup-photo{max-height:320px;margin:0 auto}.popup-new-media .popup-container.is-media:not(.is-album) .popup-photo img{-o-object-fit:contain;object-fit:contain}.popup-new-media .popup-container.is-media:not(.is-album) .popup-photo>div{display:flex;justify-content:center}.popup-new-media .popup-container.is-album .popup-photo{margin:0 auto;position:relative}.popup-new-media .popup-container.is-album .popup-photo>div{position:absolute}.popup-new-media .popup-container.is-document .popup-photo img,.popup-new-media .popup-container.is-document .popup-photo video,.popup-new-media .popup-container.is-album .popup-photo img,.popup-new-media .popup-container.is-album .popup-photo video{-o-object-fit:cover;object-fit:cover;width:100%;height:100%}.popup-new-media .popup-header{flex-wrap:wrap;justify-content:space-between;align-items:center;margin-bottom:9px;padding:12px 20px 15px}.popup-new-media .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-new-media .popup-close{font-size:1.5rem;margin:-1px 0 0 -4px}.popup-new-media .popup-title{flex:1;padding:0 2rem 0 1.5rem;margin:0;margin-top:-3px;font-size:1.25rem;font-weight:500}.popup-new-media .popup-photo{max-width:380px;overflow:hidden;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border-radius:10px}.popup-new-media .popup-photo .document{max-width:100%;overflow:hidden;cursor:default;padding-left:3.75rem;height:4.5rem}.popup-new-media .popup-photo .document-name{font-weight:normal;width:100%;max-width:100%;overflow:hidden;text-overflow:ellipsis;line-height:1.5}.popup-new-media .popup-photo .document-ico{height:48px;width:48px;font-size:16px;font-weight:normal;line-height:11px;letter-spacing:0}.popup-new-media .input-field{width:100%;margin-top:25px}.popup-new-media .input-field::-moz-placeholder{color:#a2acb4}.popup-new-media .input-field:-ms-input-placeholder{color:#a2acb4}.popup-new-media .input-field::-ms-input-placeholder{color:#a2acb4}.popup-new-media .input-field::placeholder{color:#a2acb4}.popup-new-media .input-field input{font-size:1rem;padding:0 15px;border-radius:10px}.popup-new-media .input-field input:focus{padding:0 14.5px}.popup-new-media .input-field label{font-size:inherit;opacity:0}.popup-create-poll.popup-new-media .btn-primary{width:94px}.popup-new-media.popup-send-photo .popup-header{padding: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}.popup-stickers h6{padding:0 2rem 0 1.5rem;margin:0;margin-top:3px;font-size:1.25rem;font-weight:500}.popup-stickers .sticker-set-footer{padding:19px 0 17px 0;border-top:1px solid #dadce0;text-align:center;color:#50a2e9}.popup-stickers .sticker-set-footer .btn-primary{width:164px;height:44px}.popup-stickers .sticker-set-footer.add{padding:8px 0}.popup-stickers .popup-container{max-width:420px;max-height:420px;width:420px;padding:0}.popup-stickers .popup-close{font-size:1.5rem;margin-top:6px;margin-left:16px}.popup-stickers .popup-header{margin-bottom:12px;flex:0 0 auto;margin-top:5px}.popup-stickers .sticker-set{margin-bottom:8px}.popup-stickers .sticker-set-stickers{padding:0 5px;display:grid;grid-template-columns:repeat(5, 1fr)}@media only screen and (max-width: 896px){.popup-stickers .sticker-set-stickers{grid-template-columns:repeat(4, 1fr)}}.popup-stickers .sticker-set-sticker{width:80px;height:80px;margin-bottom:2px;justify-self:center;cursor:pointer}.popup-stickers .sticker-set-sticker:hover{border-radius:12px;background-color:rgba(112,117,121,0.08)}.popup-stickers .sticker-set-sticker img{max-width:100%;max-height:100%}.popup-date-picker .popup-container{min-width:300px;width:300px;padding:12px 14px}@media (min-height: 470px){.popup-date-picker .popup-container.is-max-lines{top:19px}}.popup-date-picker .popup-header{margin-left:6px;margin-top:4px;margin-bottom:1.375rem}.popup-date-picker .popup-title{font-weight:500;font-size:20px}.popup-date-picker .popup-buttons{flex-direction:row;order:2;margin-right:-2px}.popup-date-picker .popup-buttons button+button{margin-left:9px;margin-top:0}.popup-date-picker .date-picker-controls{display:flex;justify-content:space-between;align-items:center}.popup-date-picker .date-picker-controls .date-picker-month-title{font-size:14px;font-weight:500}.popup-date-picker .date-picker-prev{transform:rotate(90deg)}.popup-date-picker .date-picker-next{transform:rotate(-90deg)}.popup-date-picker .date-picker-prev:disabled,.popup-date-picker .date-picker-next:disabled{visibility:hidden}.popup-date-picker .date-picker-months{margin-top:7px;margin-bottom:1.5rem}.popup-date-picker .date-picker-month{display:grid;grid-template-columns:repeat(7, 1fr);width:100%;justify-content:center}.popup-date-picker .date-picker-month span,.popup-date-picker .date-picker-month .btn-icon{justify-self:center;width:38px;height:38px;font-size:12px;color:#707579;display:flex;justify-content:center;align-items:center}.popup-date-picker .date-picker-month .btn-icon:not(:disabled){color:#000}.popup-date-picker .date-picker-month .btn-icon.active{color:#fff;border-radius:50%;background-color:#50a2e9}.popup-create-poll .popup-container{max-height:468px;padding:0}.popup-create-poll .input-field{margin-top:25px}.popup-create-poll .input-field .btn-icon{position:absolute;right:.5rem;top:50%;z-index:1;transform:translateY(-50%);opacity:1;transition:opacity .2s ease}.popup-create-poll .input-field:not(.is-filled) .btn-icon,.popup-create-poll .input-field:first-child:last-child .btn-icon{pointer-events:none;opacity:0}.popup-create-poll .caption{color:#707579;font-weight:500;padding:16px 24px 0}.popup-create-poll .poll-create-questions{padding:0px 20px 32.5px}.popup-create-poll hr{border-bottom:1px solid #edeff1}#auth-pages{max-width:720px;overflow:hidden}@media only screen and (max-width: 896px){#auth-pages .btn-primary{height:50px}}#auth-pages .subtitle{margin:0}@media only screen and (max-width: 896px){#auth-pages .subtitle{font-size:14px}}#auth-pages .input-wrapper{margin-top:49px}@media only screen and (max-width: 896px){#auth-pages .input-wrapper{margin-top:41px;width:100%;padding:0 16px}}#auth-pages .tabs-container{height:100%;transform:translateZ(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 only screen and (max-width: 896px){#auth-pages .page-password .input-wrapper{margin-top:31px}}#auth-pages .page-password .input-wrapper .btn-primary{margin-top:1rem}.page-sign .auth-image,.page-signUp .auth-image{width:7.5rem;height:7.5rem;margin-bottom:1.5rem}@media only screen and (min-width: 897px){.page-sign .auth-image,.page-signUp .auth-image{width:10rem;height:10rem;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}@media only screen and (max-width: 896px){.page-signQR .auth-image{width:166px;height:166px}}.page-signUp .auth-image{margin-top:10px;margin-bottom:14px}@media only screen and (max-width: 896px){.page-signUp .auth-image{margin-bottom:24px}}@media only screen and (max-width: 896px){.page-signUp #signUp{margin-top:100px}}.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}@media only screen and (max-width: 896px){.page-chats .main-column{width:100%}.page-chats .main-column:not(.active){display:none}}@media only screen and (min-width: 897px){.page-chats #column-left{width:25%}.page-chats #column-center{display:flex !important;background-color:#e6ebee;width:100%;flex:1}.page-chats #column-right{display:flex !important}.page-chats .main-column{height:100%;position:relative;min-height:100%;max-height:100%}.page-chats #main-columns{display:flex}}.page-chats .preloader{width:50px;height:50px;position:absolute;top:50%;left:50%;transform:translate3d(-50%, -50%, 0)}.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%;-webkit-font-smoothing:antialiased}@media only screen and (max-width: 896px){html,body{height:calc(1vh * 100);height:calc(var(--vh, 1vh) * 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}@media only screen and (min-width: 897px){.only-handhelds{display:none !important}}.container{margin:0 auto}h1,h2,h3,h4,h5,h6{font-weight:500}h4{font-size:2rem;margin:22px 0 14px;line-height:110%}@media only screen and (max-width: 896px){h4{font-size:20px;margin:2px 0 8px}}input{caret-color:#4EA4F6}input,textarea{-webkit-appearance:none}.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-icon:disabled{color:#cacaca}.btn-corner{position:absolute !important;bottom:20px;right:20px;transition:.2s ease;transform:translate3d(0, calc(100% + 20px), 0);z-index:3}.btn-corner.is-visible{transform:translate3d(0, 0, 0)}.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;-webkit-user-select:none;-webkit-touch-callout:none}.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}@media only screen and (max-width: 896px){.btn-menu-item{padding:0 30px 0 16px;height:50px}}#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;z-index:5}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}@media only screen and (max-width: 896px){avatar-element{font-size:14px}}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;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.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}@media only screen and (max-width: 896px){.c-ripple__circle{-webkit-animation-duration:.2s;animation-duration:.2s;transition-duration:.1s;border-radius:15%}}.c-ripple.is-square .c-ripple__circle,.btn-menu .c-ripple .c-ripple__circle{-webkit-animation-duration:.2s;animation-duration:.2s;transition-duration:.1s;border-radius:15%}.c-ripple__circle.hiding,.c-ripple__square.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 .document-thumb{-o-object-fit:cover;object-fit:cover;width:100%;height:100%}.document.photo .document-ico:after{display:none}.document.photo .document-download{background-color:rgba(0,0,0,0.15)}.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-ico.tgico-largeplay:before,.document-download.tgico-largeplay:before,.audio-ico.tgico-largeplay:before,.audio-download.tgico-largeplay:before{margin-right:-1px}@media only screen and (max-width: 896px){.document-ico,.document-download,.audio-ico,.audio-download{height:36px;width:36px}}.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}@media only screen and (max-width: 896px){.document .preloader-container,.audio .preloader-container{width:30px;height:30px}}.audio{position:relative;padding-left:67px;min-height:58px;max-width:244px;overflow:visible !important}@media only screen and (max-width: 896px){.audio{padding-left:45px}}.audio-toggle,.audio-download{border-radius:50%;background-color:#50a2e9;font-size:2.3rem;align-items:center}@media only screen and (max-width: 896px){.audio-toggle,.audio-download{font-size:24px !important}}.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;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.audio-time,.audio-subtitle{font-size:14px;color:#707579;margin-top:3px;margin-left:-1px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@media only screen and (max-width: 896px){.audio-time,.audio-subtitle{margin-top:1px;font-size:12px}}.audio-title,.audio:not(.audio-show-progress) .audio-subtitle{white-space:nowrap;overflow:hidden;max-width:100%;text-overflow:ellipsis}@media only screen and (max-width: 896px){.audio-download{margin-left:2px;margin-top:1px}.audio.is-voice .audio-download{margin:0}}.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 #707579;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}@media only screen and (max-width: 896px){.input-field input{height:50px}}.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 18px;position:relative}@media only screen and (max-width: 896px){.checkbox-field{margin-bottom:27px}}[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;transition:opacity .2s ease-out, transform .2s ease-out;transform:scale(0.95);transform-origin:top center;opacity:0}.select-wrapper.active{transform:scale(1);opacity:1}.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:#909192;opacity:1}:-ms-input-placeholder{color:#909192;opacity:1}::-ms-input-placeholder{color:#909192;opacity:1}::placeholder{color:#909192;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}@media only screen and (max-width: 896px){.auth-image{width:120px;height:120px}}.phone-edit{display:inline-block;width:24px;height:24px;margin-left:.4rem;opacity:.5;transition:.2s;cursor:pointer;font-size:1.5rem}@media only screen and (max-width: 896px){.phone-edit{margin-top:-14px}}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)}.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;margin:0 .125rem}.btn-circle{border-radius:50%;height:54px;width:54px;line-height:54px}@media only screen and (max-width: 896px){.btn-circle{height:46px;width:46px}}.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}.sticky_sentinel{position:absolute;left:0;right:0;visibility:hidden;pointer-events:none}.rlottie{max-width:100%;max-height:100%;width:100%;height:100%}.rlottie.fade-in{-webkit-animation:fadeIn .2s ease forwards;animation:fadeIn .2s ease forwards}.fade-in-transition{opacity:1;transition:opacity .2s ease}.show-more{padding-top:13px;padding-bottom:13px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative}@media only screen and (min-width: 897px){.show-more{padding-left:8px}}.show-more .tgico-down{float:left;padding-right:32px;padding-left:16px;font-size:24px;color:#707579}.chats-container #chats-container .scrollable #dialogs .rp avatar-element{font-size:20px}.chats-container #chats-container .scrollable #dialogs .rp avatar-element:before{font-size:26px}.chats-container #chats-container .scrollable #dialogs .rp avatar-element.tgico-avatar_deletedaccount:before{font-size:56px}.btn-disabled{pointer-events:none !important;cursor:default !important;color:#707579 !important}.btn-disabled:before{color:#707579 !important}.content-empty{color:#707579}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n" - }, - { - "id": 1, - "identifier": "F:\\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": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\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": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\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": 146, - "building": 12945 - } - } - ], - "profile": { - "factory": 0, - "building": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 0, - "moduleIdentifier": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\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": "F:\\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": 8052, - "names": [ - "mini-css-extract-plugin" - ], - "files": [ - "*" - ], - "hash": "00928ce7a892a8cfaac0", - "siblings": [], - "parents": [], - "children": [], - "childrenByOrder": {}, - "modules": [ - { - "id": 0, - "identifier": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\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": 5535, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": null, - "issuerId": null, - "issuerName": null, - "issuerPath": null, - "profile": { - "factory": 145, - "building": 8105 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": null, - "moduleIdentifier": null, - "module": null, - "moduleName": null, - "type": "single entry", - "userRequest": "!!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\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:\\\"\\\"}.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:\\\"\\\"}.tgico-keyboard:before{content:\\\"\\\"}.tgico-lamp:before{content:\\\"\\\\e936\\\"}.tgico-language:before{content:\\\"\\\\e937\\\"}.tgico-largepause:before{content:\\\"\\\"}.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:\\\"\\\"}.tgico-pause:before{content:\\\"\\\"}.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:\\\"\\\"}.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:\\\"\\\"}.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": "F:\\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": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\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": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\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": 145, - "building": 8105 - } - } - ], - "profile": { - "factory": 688, - "building": 1286 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 0, - "moduleIdentifier": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\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": "!!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\tweb\\src\\scss\\tgico.scss", - "reasons": [] - } - ] - } - ], - "modules": [ - { - "id": 0, - "identifier": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\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": 5535, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": null, - "issuerId": null, - "issuerName": null, - "issuerPath": null, - "profile": { - "factory": 145, - "building": 8105 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": null, - "moduleIdentifier": null, - "module": null, - "moduleName": null, - "type": "single entry", - "userRequest": "!!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\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:\\\"\\\"}.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:\\\"\\\"}.tgico-keyboard:before{content:\\\"\\\"}.tgico-lamp:before{content:\\\"\\\\e936\\\"}.tgico-language:before{content:\\\"\\\\e937\\\"}.tgico-largepause:before{content:\\\"\\\"}.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:\\\"\\\"}.tgico-pause:before{content:\\\"\\\"}.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:\\\"\\\"}.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:\\\"\\\"}.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": "F:\\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": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\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": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\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": 145, - "building": 8105 - } - } - ], - "profile": { - "factory": 688, - "building": 1286 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 0, - "moduleIdentifier": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!F:\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!F:\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!F:\\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": "F:\\tweb\\public", - "assetsByChunkName": {}, - "assets": [ - { - "name": "sw.js", - "size": 6025, - "chunks": [ - 0 - ], - "chunkNames": [], - "info": {}, - "emitted": false - } - ], - "filteredAssets": 0, - "entrypoints": { - "undefined": { - "chunks": [ - 0 - ], - "assets": [ - "sw.js" - ], - "children": {}, - "childAssets": {} - } - }, - "namedChunkGroups": { - "undefined": { - "chunks": [ - 0 - ], - "assets": [ - "sw.js" - ], - "children": {}, - "childAssets": {} - } - }, - "chunks": [ - { - "id": 0, - "rendered": true, - "initial": true, - "entry": true, - "size": 13004, - "names": [], - "files": [ - "sw.js" - ], - "hash": "03aee2dfce2cd95a5bde", - "siblings": [], - "parents": [], - "children": [], - "childrenByOrder": {}, - "modules": [ - { - "id": 0, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.service.ts", - "name": "./src/lib/mtproto/mtproto.service.ts", - "index": 0, - "index2": 4, - "size": 6996, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": null, - "issuerId": null, - "issuerName": null, - "issuerPath": null, - "profile": { - "factory": 141, - "building": 5364 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": null, - "moduleIdentifier": null, - "module": null, - "moduleName": null, - "type": "single entry", - "userRequest": "F:\\tweb\\src\\lib\\mtproto\\mtproto.service.ts" - } - ], - "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\nconst userAgent_1 = require(\"../../helpers/userAgent\");\r\nconst logger_1 = require(\"../logger\");\r\nconst context_1 = require(\"../../helpers/context\");\r\nconst cancellablePromise_1 = require(\"../../helpers/cancellablePromise\");\r\nconst log = logger_1.logger('SW', logger_1.LogLevels.error /* | LogLevels.debug | LogLevels.log */);\r\nconst ctx = self;\r\nconst deferredPromises = {};\r\nctx.addEventListener('message', (e) => {\r\n const task = e.data;\r\n const promise = deferredPromises[task.id];\r\n if (task.payload) {\r\n promise.resolve(task.payload);\r\n }\r\n else {\r\n promise.reject();\r\n }\r\n delete deferredPromises[task.id];\r\n});\r\nlet taskID = 0;\r\n;\r\n;\r\nconst onFetch = (event) => {\r\n try {\r\n const [, url, scope, params] = /http[:s]+\\/\\/.*?(\\/(.*?)(?:$|\\/(.*)$))/.exec(event.request.url) || [];\r\n log.debug('[fetch]:', event);\r\n switch (scope) {\r\n case 'stream': {\r\n const range = parseRange(event.request.headers.get('Range'));\r\n let [offset, end] = range;\r\n const info = JSON.parse(decodeURIComponent(params));\r\n //const fileName = getFileNameByLocation(info.location);\r\n const limitPart = STREAM_CHUNK_UPPER_LIMIT;\r\n /* if(info.size > limitPart && isSafari && offset == limitPart) {\r\n //end = info.size - 1;\r\n //offset = info.size - 1 - limitPart;\r\n offset = info.size - (info.size % limitPart);\r\n } */\r\n log.debug('[stream]', url, offset, end);\r\n event.respondWith(Promise.race([\r\n timeout(45 * 1000),\r\n new Promise((resolve, reject) => {\r\n // safari workaround\r\n const possibleResponse = responseForSafariFirstRange(range, info.mimeType, info.size);\r\n if (possibleResponse) {\r\n return resolve(possibleResponse);\r\n }\r\n const limit = end && end < limitPart ? alignLimit(end - offset + 1) : limitPart;\r\n const alignedOffset = alignOffset(offset, limit);\r\n log.debug('[stream] requestFilePart:', /* info.dcID, info.location, */ alignedOffset, limit);\r\n const task = {\r\n type: 'requestFilePart',\r\n id: taskID++,\r\n payload: [info.dcID, info.location, alignedOffset, limit]\r\n };\r\n const deferred = deferredPromises[task.id] = cancellablePromise_1.deferredPromise();\r\n deferred.then(result => {\r\n let ab = result.bytes;\r\n log.debug('[stream] requestFilePart result:', result);\r\n const headers = {\r\n 'Accept-Ranges': 'bytes',\r\n 'Content-Range': `bytes ${alignedOffset}-${alignedOffset + ab.byteLength - 1}/${info.size || '*'}`,\r\n 'Content-Length': `${ab.byteLength}`,\r\n };\r\n if (info.mimeType)\r\n headers['Content-Type'] = info.mimeType;\r\n if (userAgent_1.isSafari) {\r\n ab = ab.slice(offset - alignedOffset, end - alignedOffset + 1);\r\n headers['Content-Range'] = `bytes ${offset}-${offset + ab.byteLength - 1}/${info.size || '*'}`;\r\n headers['Content-Length'] = `${ab.byteLength}`;\r\n }\r\n // simulate slow connection\r\n //setTimeout(() => {\r\n resolve(new Response(ab, {\r\n status: 206,\r\n statusText: 'Partial Content',\r\n headers,\r\n }));\r\n //}, 2.5e3);\r\n }).catch(err => { });\r\n context_1.notifySomeone(task);\r\n })\r\n ]));\r\n break;\r\n }\r\n }\r\n }\r\n catch (err) {\r\n event.respondWith(new Response('', {\r\n status: 500,\r\n statusText: 'Internal Server Error',\r\n }));\r\n }\r\n};\r\nconst onChangeState = () => {\r\n ctx.onfetch = onFetch;\r\n};\r\n/**\r\n * Service Worker Installation\r\n */\r\nctx.addEventListener('install', (event) => {\r\n log('installing');\r\n /* initCache();\r\n \r\n event.waitUntil(\r\n initNetwork(),\r\n ); */\r\n event.waitUntil(ctx.skipWaiting()); // Activate worker immediately\r\n});\r\n/**\r\n * Service Worker Activation\r\n */\r\nctx.addEventListener('activate', (event) => {\r\n log('activating', ctx);\r\n /* if (!ctx.cache) initCache();\r\n if (!ctx.network) initNetwork(); */\r\n event.waitUntil(ctx.clients.claim());\r\n});\r\nfunction timeout(delay) {\r\n return new Promise(((resolve) => {\r\n setTimeout(() => {\r\n resolve(new Response('', {\r\n status: 408,\r\n statusText: 'Request timed out.',\r\n }));\r\n }, delay);\r\n }));\r\n}\r\nfunction responseForSafariFirstRange(range, mimeType, size) {\r\n if (range[0] === 0 && range[1] === 1) {\r\n return new Response(new Uint8Array(2).buffer, {\r\n status: 206,\r\n statusText: 'Partial Content',\r\n headers: {\r\n 'Accept-Ranges': 'bytes',\r\n 'Content-Range': `bytes 0-1/${size || '*'}`,\r\n 'Content-Length': '2',\r\n 'Content-Type': mimeType || 'video/mp4',\r\n },\r\n });\r\n }\r\n return null;\r\n}\r\nctx.onerror = (error) => {\r\n log.error('error:', error);\r\n};\r\nctx.onunhandledrejection = (error) => {\r\n log.error('onunhandledrejection:', error);\r\n};\r\nctx.onoffline = ctx.ononline = onChangeState;\r\nonChangeState();\r\nconst DOWNLOAD_CHUNK_LIMIT = 512 * 1024;\r\n/* const STREAM_CHUNK_UPPER_LIMIT = 256 * 1024;\r\nconst SMALLEST_CHUNK_LIMIT = 256 * 4; */\r\n/* const STREAM_CHUNK_UPPER_LIMIT = 1024 * 1024;\r\nconst SMALLEST_CHUNK_LIMIT = 1024 * 4; */\r\nconst STREAM_CHUNK_UPPER_LIMIT = 512 * 1024;\r\nconst SMALLEST_CHUNK_LIMIT = 512 * 4;\r\nfunction parseRange(header) {\r\n if (!header)\r\n return [0, 0];\r\n const [, chunks] = header.split('=');\r\n const ranges = chunks.split(', ');\r\n const [offset, end] = ranges[0].split('-');\r\n return [+offset, +end || 0];\r\n}\r\nfunction alignOffset(offset, base = SMALLEST_CHUNK_LIMIT) {\r\n return offset - (offset % base);\r\n}\r\nfunction alignLimit(limit) {\r\n return 2 ** Math.ceil(Math.log(limit) / Math.log(2));\r\n}\r\n// @ts-ignore\r\nif (process.env.NODE_ENV != 'production') {\r\n ctx.onFetch = onFetch;\r\n}\r\n" - }, - { - "id": 1, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\helpers\\userAgent.ts", - "name": "./src/helpers/userAgent.ts", - "index": 1, - "index2": 0, - "size": 1248, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.service.ts", - "issuerId": 0, - "issuerName": "./src/lib/mtproto/mtproto.service.ts", - "issuerPath": [ - { - "id": 0, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.service.ts", - "name": "./src/lib/mtproto/mtproto.service.ts", - "profile": { - "factory": 141, - "building": 5364 - } - } - ], - "profile": { - "factory": 20, - "building": 870 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 0, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.service.ts", - "module": "./src/lib/mtproto/mtproto.service.ts", - "moduleName": "./src/lib/mtproto/mtproto.service.ts", - "type": "cjs require", - "userRequest": "../../helpers/userAgent", - "loc": "3:20-54" - } - ], - "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.isSafari = exports.isAppleMobile = exports.isAndroid = exports.isApple = exports.userAgent = void 0;\r\nexports.userAgent = navigator ? navigator.userAgent : null;\r\nexports.isApple = navigator.userAgent.search(/OS X|iPhone|iPad|iOS/i) != -1;\r\nexports.isAndroid = navigator.userAgent.toLowerCase().indexOf('android') != -1;\r\n/**\r\n * Returns true when run in WebKit derived browsers.\r\n * This is used as a workaround for a memory leak in Safari caused by using Transferable objects to\r\n * transfer data between WebWorkers and the main thread.\r\n * https://github.com/mapbox/mapbox-gl-js/issues/8771\r\n *\r\n * This should be removed once the underlying Safari issue is fixed.\r\n */\r\nconst ctx = typeof (window) !== 'undefined' ? window : self;\r\n// https://stackoverflow.com/a/58065241\r\nexports.isAppleMobile = (/iPad|iPhone|iPod/.test(navigator.platform) ||\r\n (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1)) &&\r\n !ctx.MSStream;\r\nexports.isSafari = !!('safari' in ctx) || !!(exports.userAgent && (/\\b(iPad|iPhone|iPod)\\b/.test(exports.userAgent) || (!!exports.userAgent.match('Safari') && !exports.userAgent.match('Chrome')))) /* || true */;\r\n" - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\logger.ts", - "name": "./src/lib/logger.ts", - "index": 2, - "index2": 1, - "size": 1851, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.service.ts", - "issuerId": 0, - "issuerName": "./src/lib/mtproto/mtproto.service.ts", - "issuerPath": [ - { - "id": 0, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.service.ts", - "name": "./src/lib/mtproto/mtproto.service.ts", - "profile": { - "factory": 141, - "building": 5364 - } - } - ], - "profile": { - "factory": 20, - "building": 870 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 0, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.service.ts", - "module": "./src/lib/mtproto/mtproto.service.ts", - "moduleName": "./src/lib/mtproto/mtproto.service.ts", - "type": "cjs require", - "userRequest": "../logger", - "loc": "4:17-37" - } - ], - "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.logger = exports.LogLevels = void 0;\r\nvar LogLevels;\r\n(function (LogLevels) {\r\n LogLevels[LogLevels[\"log\"] = 1] = \"log\";\r\n LogLevels[LogLevels[\"warn\"] = 2] = \"warn\";\r\n LogLevels[LogLevels[\"error\"] = 4] = \"error\";\r\n LogLevels[LogLevels[\"debug\"] = 8] = \"debug\";\r\n})(LogLevels = exports.LogLevels || (exports.LogLevels = {}));\r\n;\r\nvar _logTimer = Date.now();\r\nfunction dT() {\r\n return '[' + ((Date.now() - _logTimer) / 1000).toFixed(3) + ']';\r\n}\r\nfunction logger(prefix, level = LogLevels.log | LogLevels.warn | LogLevels.error) {\r\n // @ts-ignore\r\n if (process.env.NODE_ENV == 'production' /* || true */) {\r\n level = LogLevels.error;\r\n }\r\n //level = LogLevels.log | LogLevels.warn | LogLevels.error | LogLevels.debug\r\n function Log(...args) {\r\n return level & LogLevels.log && console.log(dT(), '[' + prefix + ']:', ...args);\r\n }\r\n Log.warn = function (...args) {\r\n return level & LogLevels.warn && console.warn(dT(), '[' + prefix + ']:', ...args);\r\n };\r\n Log.info = function (...args) {\r\n return level & LogLevels.log && console.info(dT(), '[' + prefix + ']:', ...args);\r\n };\r\n Log.error = function (...args) {\r\n return level & LogLevels.error && console.error(dT(), '[' + prefix + ']:', ...args);\r\n };\r\n Log.trace = function (...args) {\r\n return level & LogLevels.log && console.trace(dT(), '[' + prefix + ']:', ...args);\r\n };\r\n /* Log.debug = function(...args: any[]) {\r\n return level & LogLevels.debug && console.log(dT(), '[' + prefix + ']:', ...args);\r\n }; */\r\n Log.debug = function (...args) {\r\n return level & LogLevels.debug && console.debug(dT(), '[' + prefix + ']:', ...args);\r\n };\r\n return Log;\r\n}\r\nexports.logger = logger;\r\n;\r\n" - }, - { - "id": 3, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\helpers\\context.ts", - "name": "./src/helpers/context.ts", - "index": 3, - "index2": 2, - "size": 1471, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.service.ts", - "issuerId": 0, - "issuerName": "./src/lib/mtproto/mtproto.service.ts", - "issuerPath": [ - { - "id": 0, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.service.ts", - "name": "./src/lib/mtproto/mtproto.service.ts", - "profile": { - "factory": 141, - "building": 5364 - } - } - ], - "profile": { - "factory": 20, - "building": 870 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 0, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.service.ts", - "module": "./src/lib/mtproto/mtproto.service.ts", - "moduleName": "./src/lib/mtproto/mtproto.service.ts", - "type": "cjs require", - "userRequest": "../../helpers/context", - "loc": "5:18-50" - } - ], - "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.notifyAll = exports.notifySomeone = exports.isWorker = exports.isServiceWorker = exports.isWebWorker = void 0;\r\nexports.isWebWorker = typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope;\r\nexports.isServiceWorker = typeof ServiceWorkerGlobalScope !== 'undefined' && self instanceof ServiceWorkerGlobalScope;\r\nexports.isWorker = exports.isWebWorker || exports.isServiceWorker;\r\n// в SW может быть сразу две переменных TRUE, поэтому проверяю по последней\r\nconst notifyServiceWorker = (all, ...args) => {\r\n self\r\n .clients\r\n .matchAll({ includeUncontrolled: false, type: 'window' })\r\n .then((listeners) => {\r\n if (!listeners.length) {\r\n //console.trace('no listeners?', self, listeners);\r\n return;\r\n }\r\n listeners.slice(all ? 0 : -1).forEach(listener => {\r\n // @ts-ignore\r\n listener.postMessage(...args);\r\n });\r\n });\r\n};\r\nconst notifyWorker = (...args) => {\r\n // @ts-ignore\r\n self.postMessage(...args);\r\n};\r\nconst empty = () => { };\r\nexports.notifySomeone = exports.isServiceWorker ? notifyServiceWorker.bind(null, false) : (exports.isWebWorker ? notifyWorker : empty);\r\nexports.notifyAll = exports.isServiceWorker ? notifyServiceWorker.bind(null, true) : (exports.isWebWorker ? notifyWorker : empty);\r\n" - }, - { - "id": 4, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\helpers\\cancellablePromise.ts", - "name": "./src/helpers/cancellablePromise.ts", - "index": 4, - "index2": 3, - "size": 1438, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.service.ts", - "issuerId": 0, - "issuerName": "./src/lib/mtproto/mtproto.service.ts", - "issuerPath": [ - { - "id": 0, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.service.ts", - "name": "./src/lib/mtproto/mtproto.service.ts", - "profile": { - "factory": 141, - "building": 5364 - } - } - ], - "profile": { - "factory": 20, - "building": 870 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 0, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.service.ts", - "module": "./src/lib/mtproto/mtproto.service.ts", - "moduleName": "./src/lib/mtproto/mtproto.service.ts", - "type": "cjs require", - "userRequest": "../../helpers/cancellablePromise", - "loc": "6:29-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.deferredPromise = void 0;\r\nfunction deferredPromise() {\r\n let deferredHelper = {\r\n isFulfilled: false,\r\n isRejected: false,\r\n notify: () => { },\r\n notifyAll: (...args) => {\r\n deferredHelper.lastNotify = args;\r\n deferredHelper.listeners.forEach((callback) => callback(...args));\r\n },\r\n lastNotify: undefined,\r\n listeners: [],\r\n addNotifyListener: (callback) => {\r\n if (deferredHelper.lastNotify) {\r\n callback(...deferredHelper.lastNotify);\r\n }\r\n deferredHelper.listeners.push(callback);\r\n }\r\n };\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 deferred.finally(() => {\r\n deferred.notify = null;\r\n deferred.listeners.length = 0;\r\n deferred.lastNotify = null;\r\n });\r\n Object.assign(deferred, deferredHelper);\r\n return deferred;\r\n}\r\nexports.deferredPromise = deferredPromise;\r\n" - } - ], - "filteredModules": 0, - "origins": [ - { - "module": "", - "moduleIdentifier": "", - "moduleName": "", - "loc": "", - "request": "F:\\tweb\\src\\lib\\mtproto\\mtproto.service.ts", - "reasons": [] - } - ] - } - ], - "modules": [ - { - "id": 0, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.service.ts", - "name": "./src/lib/mtproto/mtproto.service.ts", - "index": 0, - "index2": 4, - "size": 6996, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": null, - "issuerId": null, - "issuerName": null, - "issuerPath": null, - "profile": { - "factory": 141, - "building": 5364 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": null, - "moduleIdentifier": null, - "module": null, - "moduleName": null, - "type": "single entry", - "userRequest": "F:\\tweb\\src\\lib\\mtproto\\mtproto.service.ts" - } - ], - "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\nconst userAgent_1 = require(\"../../helpers/userAgent\");\r\nconst logger_1 = require(\"../logger\");\r\nconst context_1 = require(\"../../helpers/context\");\r\nconst cancellablePromise_1 = require(\"../../helpers/cancellablePromise\");\r\nconst log = logger_1.logger('SW', logger_1.LogLevels.error /* | LogLevels.debug | LogLevels.log */);\r\nconst ctx = self;\r\nconst deferredPromises = {};\r\nctx.addEventListener('message', (e) => {\r\n const task = e.data;\r\n const promise = deferredPromises[task.id];\r\n if (task.payload) {\r\n promise.resolve(task.payload);\r\n }\r\n else {\r\n promise.reject();\r\n }\r\n delete deferredPromises[task.id];\r\n});\r\nlet taskID = 0;\r\n;\r\n;\r\nconst onFetch = (event) => {\r\n try {\r\n const [, url, scope, params] = /http[:s]+\\/\\/.*?(\\/(.*?)(?:$|\\/(.*)$))/.exec(event.request.url) || [];\r\n log.debug('[fetch]:', event);\r\n switch (scope) {\r\n case 'stream': {\r\n const range = parseRange(event.request.headers.get('Range'));\r\n let [offset, end] = range;\r\n const info = JSON.parse(decodeURIComponent(params));\r\n //const fileName = getFileNameByLocation(info.location);\r\n const limitPart = STREAM_CHUNK_UPPER_LIMIT;\r\n /* if(info.size > limitPart && isSafari && offset == limitPart) {\r\n //end = info.size - 1;\r\n //offset = info.size - 1 - limitPart;\r\n offset = info.size - (info.size % limitPart);\r\n } */\r\n log.debug('[stream]', url, offset, end);\r\n event.respondWith(Promise.race([\r\n timeout(45 * 1000),\r\n new Promise((resolve, reject) => {\r\n // safari workaround\r\n const possibleResponse = responseForSafariFirstRange(range, info.mimeType, info.size);\r\n if (possibleResponse) {\r\n return resolve(possibleResponse);\r\n }\r\n const limit = end && end < limitPart ? alignLimit(end - offset + 1) : limitPart;\r\n const alignedOffset = alignOffset(offset, limit);\r\n log.debug('[stream] requestFilePart:', /* info.dcID, info.location, */ alignedOffset, limit);\r\n const task = {\r\n type: 'requestFilePart',\r\n id: taskID++,\r\n payload: [info.dcID, info.location, alignedOffset, limit]\r\n };\r\n const deferred = deferredPromises[task.id] = cancellablePromise_1.deferredPromise();\r\n deferred.then(result => {\r\n let ab = result.bytes;\r\n log.debug('[stream] requestFilePart result:', result);\r\n const headers = {\r\n 'Accept-Ranges': 'bytes',\r\n 'Content-Range': `bytes ${alignedOffset}-${alignedOffset + ab.byteLength - 1}/${info.size || '*'}`,\r\n 'Content-Length': `${ab.byteLength}`,\r\n };\r\n if (info.mimeType)\r\n headers['Content-Type'] = info.mimeType;\r\n if (userAgent_1.isSafari) {\r\n ab = ab.slice(offset - alignedOffset, end - alignedOffset + 1);\r\n headers['Content-Range'] = `bytes ${offset}-${offset + ab.byteLength - 1}/${info.size || '*'}`;\r\n headers['Content-Length'] = `${ab.byteLength}`;\r\n }\r\n // simulate slow connection\r\n //setTimeout(() => {\r\n resolve(new Response(ab, {\r\n status: 206,\r\n statusText: 'Partial Content',\r\n headers,\r\n }));\r\n //}, 2.5e3);\r\n }).catch(err => { });\r\n context_1.notifySomeone(task);\r\n })\r\n ]));\r\n break;\r\n }\r\n }\r\n }\r\n catch (err) {\r\n event.respondWith(new Response('', {\r\n status: 500,\r\n statusText: 'Internal Server Error',\r\n }));\r\n }\r\n};\r\nconst onChangeState = () => {\r\n ctx.onfetch = onFetch;\r\n};\r\n/**\r\n * Service Worker Installation\r\n */\r\nctx.addEventListener('install', (event) => {\r\n log('installing');\r\n /* initCache();\r\n \r\n event.waitUntil(\r\n initNetwork(),\r\n ); */\r\n event.waitUntil(ctx.skipWaiting()); // Activate worker immediately\r\n});\r\n/**\r\n * Service Worker Activation\r\n */\r\nctx.addEventListener('activate', (event) => {\r\n log('activating', ctx);\r\n /* if (!ctx.cache) initCache();\r\n if (!ctx.network) initNetwork(); */\r\n event.waitUntil(ctx.clients.claim());\r\n});\r\nfunction timeout(delay) {\r\n return new Promise(((resolve) => {\r\n setTimeout(() => {\r\n resolve(new Response('', {\r\n status: 408,\r\n statusText: 'Request timed out.',\r\n }));\r\n }, delay);\r\n }));\r\n}\r\nfunction responseForSafariFirstRange(range, mimeType, size) {\r\n if (range[0] === 0 && range[1] === 1) {\r\n return new Response(new Uint8Array(2).buffer, {\r\n status: 206,\r\n statusText: 'Partial Content',\r\n headers: {\r\n 'Accept-Ranges': 'bytes',\r\n 'Content-Range': `bytes 0-1/${size || '*'}`,\r\n 'Content-Length': '2',\r\n 'Content-Type': mimeType || 'video/mp4',\r\n },\r\n });\r\n }\r\n return null;\r\n}\r\nctx.onerror = (error) => {\r\n log.error('error:', error);\r\n};\r\nctx.onunhandledrejection = (error) => {\r\n log.error('onunhandledrejection:', error);\r\n};\r\nctx.onoffline = ctx.ononline = onChangeState;\r\nonChangeState();\r\nconst DOWNLOAD_CHUNK_LIMIT = 512 * 1024;\r\n/* const STREAM_CHUNK_UPPER_LIMIT = 256 * 1024;\r\nconst SMALLEST_CHUNK_LIMIT = 256 * 4; */\r\n/* const STREAM_CHUNK_UPPER_LIMIT = 1024 * 1024;\r\nconst SMALLEST_CHUNK_LIMIT = 1024 * 4; */\r\nconst STREAM_CHUNK_UPPER_LIMIT = 512 * 1024;\r\nconst SMALLEST_CHUNK_LIMIT = 512 * 4;\r\nfunction parseRange(header) {\r\n if (!header)\r\n return [0, 0];\r\n const [, chunks] = header.split('=');\r\n const ranges = chunks.split(', ');\r\n const [offset, end] = ranges[0].split('-');\r\n return [+offset, +end || 0];\r\n}\r\nfunction alignOffset(offset, base = SMALLEST_CHUNK_LIMIT) {\r\n return offset - (offset % base);\r\n}\r\nfunction alignLimit(limit) {\r\n return 2 ** Math.ceil(Math.log(limit) / Math.log(2));\r\n}\r\n// @ts-ignore\r\nif (process.env.NODE_ENV != 'production') {\r\n ctx.onFetch = onFetch;\r\n}\r\n" - }, - { - "id": 1, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\helpers\\userAgent.ts", - "name": "./src/helpers/userAgent.ts", - "index": 1, - "index2": 0, - "size": 1248, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.service.ts", - "issuerId": 0, - "issuerName": "./src/lib/mtproto/mtproto.service.ts", - "issuerPath": [ - { - "id": 0, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.service.ts", - "name": "./src/lib/mtproto/mtproto.service.ts", - "profile": { - "factory": 141, - "building": 5364 - } - } - ], - "profile": { - "factory": 20, - "building": 870 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 0, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.service.ts", - "module": "./src/lib/mtproto/mtproto.service.ts", - "moduleName": "./src/lib/mtproto/mtproto.service.ts", - "type": "cjs require", - "userRequest": "../../helpers/userAgent", - "loc": "3:20-54" - } - ], - "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.isSafari = exports.isAppleMobile = exports.isAndroid = exports.isApple = exports.userAgent = void 0;\r\nexports.userAgent = navigator ? navigator.userAgent : null;\r\nexports.isApple = navigator.userAgent.search(/OS X|iPhone|iPad|iOS/i) != -1;\r\nexports.isAndroid = navigator.userAgent.toLowerCase().indexOf('android') != -1;\r\n/**\r\n * Returns true when run in WebKit derived browsers.\r\n * This is used as a workaround for a memory leak in Safari caused by using Transferable objects to\r\n * transfer data between WebWorkers and the main thread.\r\n * https://github.com/mapbox/mapbox-gl-js/issues/8771\r\n *\r\n * This should be removed once the underlying Safari issue is fixed.\r\n */\r\nconst ctx = typeof (window) !== 'undefined' ? window : self;\r\n// https://stackoverflow.com/a/58065241\r\nexports.isAppleMobile = (/iPad|iPhone|iPod/.test(navigator.platform) ||\r\n (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1)) &&\r\n !ctx.MSStream;\r\nexports.isSafari = !!('safari' in ctx) || !!(exports.userAgent && (/\\b(iPad|iPhone|iPod)\\b/.test(exports.userAgent) || (!!exports.userAgent.match('Safari') && !exports.userAgent.match('Chrome')))) /* || true */;\r\n" - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\logger.ts", - "name": "./src/lib/logger.ts", - "index": 2, - "index2": 1, - "size": 1851, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.service.ts", - "issuerId": 0, - "issuerName": "./src/lib/mtproto/mtproto.service.ts", - "issuerPath": [ - { - "id": 0, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.service.ts", - "name": "./src/lib/mtproto/mtproto.service.ts", - "profile": { - "factory": 141, - "building": 5364 - } - } - ], - "profile": { - "factory": 20, - "building": 870 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 0, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.service.ts", - "module": "./src/lib/mtproto/mtproto.service.ts", - "moduleName": "./src/lib/mtproto/mtproto.service.ts", - "type": "cjs require", - "userRequest": "../logger", - "loc": "4:17-37" - } - ], - "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.logger = exports.LogLevels = void 0;\r\nvar LogLevels;\r\n(function (LogLevels) {\r\n LogLevels[LogLevels[\"log\"] = 1] = \"log\";\r\n LogLevels[LogLevels[\"warn\"] = 2] = \"warn\";\r\n LogLevels[LogLevels[\"error\"] = 4] = \"error\";\r\n LogLevels[LogLevels[\"debug\"] = 8] = \"debug\";\r\n})(LogLevels = exports.LogLevels || (exports.LogLevels = {}));\r\n;\r\nvar _logTimer = Date.now();\r\nfunction dT() {\r\n return '[' + ((Date.now() - _logTimer) / 1000).toFixed(3) + ']';\r\n}\r\nfunction logger(prefix, level = LogLevels.log | LogLevels.warn | LogLevels.error) {\r\n // @ts-ignore\r\n if (process.env.NODE_ENV == 'production' /* || true */) {\r\n level = LogLevels.error;\r\n }\r\n //level = LogLevels.log | LogLevels.warn | LogLevels.error | LogLevels.debug\r\n function Log(...args) {\r\n return level & LogLevels.log && console.log(dT(), '[' + prefix + ']:', ...args);\r\n }\r\n Log.warn = function (...args) {\r\n return level & LogLevels.warn && console.warn(dT(), '[' + prefix + ']:', ...args);\r\n };\r\n Log.info = function (...args) {\r\n return level & LogLevels.log && console.info(dT(), '[' + prefix + ']:', ...args);\r\n };\r\n Log.error = function (...args) {\r\n return level & LogLevels.error && console.error(dT(), '[' + prefix + ']:', ...args);\r\n };\r\n Log.trace = function (...args) {\r\n return level & LogLevels.log && console.trace(dT(), '[' + prefix + ']:', ...args);\r\n };\r\n /* Log.debug = function(...args: any[]) {\r\n return level & LogLevels.debug && console.log(dT(), '[' + prefix + ']:', ...args);\r\n }; */\r\n Log.debug = function (...args) {\r\n return level & LogLevels.debug && console.debug(dT(), '[' + prefix + ']:', ...args);\r\n };\r\n return Log;\r\n}\r\nexports.logger = logger;\r\n;\r\n" - }, - { - "id": 3, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\helpers\\context.ts", - "name": "./src/helpers/context.ts", - "index": 3, - "index2": 2, - "size": 1471, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.service.ts", - "issuerId": 0, - "issuerName": "./src/lib/mtproto/mtproto.service.ts", - "issuerPath": [ - { - "id": 0, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.service.ts", - "name": "./src/lib/mtproto/mtproto.service.ts", - "profile": { - "factory": 141, - "building": 5364 - } - } - ], - "profile": { - "factory": 20, - "building": 870 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 0, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.service.ts", - "module": "./src/lib/mtproto/mtproto.service.ts", - "moduleName": "./src/lib/mtproto/mtproto.service.ts", - "type": "cjs require", - "userRequest": "../../helpers/context", - "loc": "5:18-50" - } - ], - "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.notifyAll = exports.notifySomeone = exports.isWorker = exports.isServiceWorker = exports.isWebWorker = void 0;\r\nexports.isWebWorker = typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope;\r\nexports.isServiceWorker = typeof ServiceWorkerGlobalScope !== 'undefined' && self instanceof ServiceWorkerGlobalScope;\r\nexports.isWorker = exports.isWebWorker || exports.isServiceWorker;\r\n// в SW может быть сразу две переменных TRUE, поэтому проверяю по последней\r\nconst notifyServiceWorker = (all, ...args) => {\r\n self\r\n .clients\r\n .matchAll({ includeUncontrolled: false, type: 'window' })\r\n .then((listeners) => {\r\n if (!listeners.length) {\r\n //console.trace('no listeners?', self, listeners);\r\n return;\r\n }\r\n listeners.slice(all ? 0 : -1).forEach(listener => {\r\n // @ts-ignore\r\n listener.postMessage(...args);\r\n });\r\n });\r\n};\r\nconst notifyWorker = (...args) => {\r\n // @ts-ignore\r\n self.postMessage(...args);\r\n};\r\nconst empty = () => { };\r\nexports.notifySomeone = exports.isServiceWorker ? notifyServiceWorker.bind(null, false) : (exports.isWebWorker ? notifyWorker : empty);\r\nexports.notifyAll = exports.isServiceWorker ? notifyServiceWorker.bind(null, true) : (exports.isWebWorker ? notifyWorker : empty);\r\n" - }, - { - "id": 4, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\helpers\\cancellablePromise.ts", - "name": "./src/helpers/cancellablePromise.ts", - "index": 4, - "index2": 3, - "size": 1438, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.service.ts", - "issuerId": 0, - "issuerName": "./src/lib/mtproto/mtproto.service.ts", - "issuerPath": [ - { - "id": 0, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.service.ts", - "name": "./src/lib/mtproto/mtproto.service.ts", - "profile": { - "factory": 141, - "building": 5364 - } - } - ], - "profile": { - "factory": 20, - "building": 870 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 0, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.service.ts", - "module": "./src/lib/mtproto/mtproto.service.ts", - "moduleName": "./src/lib/mtproto/mtproto.service.ts", - "type": "cjs require", - "userRequest": "../../helpers/cancellablePromise", - "loc": "6:29-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.deferredPromise = void 0;\r\nfunction deferredPromise() {\r\n let deferredHelper = {\r\n isFulfilled: false,\r\n isRejected: false,\r\n notify: () => { },\r\n notifyAll: (...args) => {\r\n deferredHelper.lastNotify = args;\r\n deferredHelper.listeners.forEach((callback) => callback(...args));\r\n },\r\n lastNotify: undefined,\r\n listeners: [],\r\n addNotifyListener: (callback) => {\r\n if (deferredHelper.lastNotify) {\r\n callback(...deferredHelper.lastNotify);\r\n }\r\n deferredHelper.listeners.push(callback);\r\n }\r\n };\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 deferred.finally(() => {\r\n deferred.notify = null;\r\n deferred.listeners.length = 0;\r\n deferred.lastNotify = null;\r\n });\r\n Object.assign(deferred, deferredHelper);\r\n return deferred;\r\n}\r\nexports.deferredPromise = deferredPromise;\r\n" - } - ], - "filteredModules": 0, - "logging": { - "webpack.buildChunkGraph.visitModules": { - "entries": [], - "filteredEntries": 2, - "debug": false - } - }, - "children": [], - "name": "serviceworker-plugin" - }, - { - "errors": [], - "warnings": [], - "publicPath": "", - "outputPath": "F:\\tweb\\public", - "assetsByChunkName": { - "main": "608dbdcf64455bd4cc24.worker.js" - }, - "assets": [ - { - "name": "608dbdcf64455bd4cc24.worker.js", - "size": 123301, - "chunks": [ - 0 - ], - "chunkNames": [ - "main" - ], - "info": { - "immutable": true - }, - "emitted": true - } - ], - "filteredAssets": 0, - "entrypoints": { - "main": { - "chunks": [ - 0 - ], - "assets": [ - "608dbdcf64455bd4cc24.worker.js" - ], - "children": {}, - "childAssets": {} - } - }, - "namedChunkGroups": { - "main": { - "chunks": [ - 0 - ], - "assets": [ - "608dbdcf64455bd4cc24.worker.js" - ], - "children": {}, - "childAssets": {} - } - }, - "chunks": [ - { - "id": 0, - "rendered": true, - "initial": true, - "entry": true, - "size": 382528, - "names": [ - "main" - ], - "files": [ - "608dbdcf64455bd4cc24.worker.js" - ], - "hash": "db3d1ae4fa0815eb9447", - "siblings": [], - "parents": [], - "children": [], - "childrenByOrder": {}, - "modules": [ - { - "id": 0, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\utils\\common.js", - "name": "./node_modules/pako/lib/utils/common.js", - "index": 9, - "index2": 4, - "size": 2444, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\pako\\index.js", - "issuerId": 1, - "issuerName": "./node_modules/pako/index.js", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "name": "./node_modules/fast-png/lib-esm/index.js", - "profile": { - "factory": 2180, - "building": 1082 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "name": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "profile": { - "factory": 21, - "building": 92, - "dependencies": 43 - } - }, - { - "id": 1, - "identifier": "F:\\tweb\\node_modules\\pako\\index.js", - "name": "./node_modules/pako/index.js", - "profile": { - "factory": 48, - "building": 7 - } - } - ], - "profile": { - "factory": 11, - "building": 13, - "dependencies": 8 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 1, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\index.js", - "module": "./node_modules/pako/index.js", - "moduleName": "./node_modules/pako/index.js", - "type": "cjs require", - "userRequest": "./lib/utils/common", - "loc": "4:16-45" - }, - { - "moduleId": 5, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\lib\\utils\\strings.js", - "module": "./node_modules/pako/lib/utils/strings.js", - "moduleName": "./node_modules/pako/lib/utils/strings.js", - "type": "cjs require", - "userRequest": "./common", - "loc": "5:12-31" - }, - { - "moduleId": 12, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\lib\\deflate.js", - "module": "./node_modules/pako/lib/deflate.js", - "moduleName": "./node_modules/pako/lib/deflate.js", - "type": "cjs require", - "userRequest": "./utils/common", - "loc": "5:19-44" - }, - { - "moduleId": 13, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\deflate.js", - "module": "./node_modules/pako/lib/zlib/deflate.js", - "moduleName": "./node_modules/pako/lib/zlib/deflate.js", - "type": "cjs require", - "userRequest": "../utils/common", - "loc": "22:14-40" - }, - { - "moduleId": 14, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\trees.js", - "module": "./node_modules/pako/lib/zlib/trees.js", - "moduleName": "./node_modules/pako/lib/zlib/trees.js", - "type": "cjs require", - "userRequest": "../utils/common", - "loc": "24:12-38" - }, - { - "moduleId": 15, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\lib\\inflate.js", - "module": "./node_modules/pako/lib/inflate.js", - "moduleName": "./node_modules/pako/lib/inflate.js", - "type": "cjs require", - "userRequest": "./utils/common", - "loc": "5:19-44" - }, - { - "moduleId": 16, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\inflate.js", - "module": "./node_modules/pako/lib/zlib/inflate.js", - "moduleName": "./node_modules/pako/lib/zlib/inflate.js", - "type": "cjs require", - "userRequest": "../utils/common", - "loc": "22:20-46" - }, - { - "moduleId": 18, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\inftrees.js", - "module": "./node_modules/pako/lib/zlib/inftrees.js", - "moduleName": "./node_modules/pako/lib/zlib/inftrees.js", - "type": "cjs require", - "userRequest": "../utils/common", - "loc": "22:12-38" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 5, - "source": "'use strict';\n\n\nvar TYPED_OK = (typeof Uint8Array !== 'undefined') &&\n (typeof Uint16Array !== 'undefined') &&\n (typeof Int32Array !== 'undefined');\n\nfunction _has(obj, key) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nexports.assign = function (obj /*from1, from2, from3, ...*/) {\n var sources = Array.prototype.slice.call(arguments, 1);\n while (sources.length) {\n var source = sources.shift();\n if (!source) { continue; }\n\n if (typeof source !== 'object') {\n throw new TypeError(source + 'must be non-object');\n }\n\n for (var p in source) {\n if (_has(source, p)) {\n obj[p] = source[p];\n }\n }\n }\n\n return obj;\n};\n\n\n// reduce buffer size, avoiding mem copy\nexports.shrinkBuf = function (buf, size) {\n if (buf.length === size) { return buf; }\n if (buf.subarray) { return buf.subarray(0, size); }\n buf.length = size;\n return buf;\n};\n\n\nvar fnTyped = {\n arraySet: function (dest, src, src_offs, len, dest_offs) {\n if (src.subarray && dest.subarray) {\n dest.set(src.subarray(src_offs, src_offs + len), dest_offs);\n return;\n }\n // Fallback to ordinary array\n for (var i = 0; i < len; i++) {\n dest[dest_offs + i] = src[src_offs + i];\n }\n },\n // Join array of chunks to single array.\n flattenChunks: function (chunks) {\n var i, l, len, pos, chunk, result;\n\n // calculate data length\n len = 0;\n for (i = 0, l = chunks.length; i < l; i++) {\n len += chunks[i].length;\n }\n\n // join chunks\n result = new Uint8Array(len);\n pos = 0;\n for (i = 0, l = chunks.length; i < l; i++) {\n chunk = chunks[i];\n result.set(chunk, pos);\n pos += chunk.length;\n }\n\n return result;\n }\n};\n\nvar fnUntyped = {\n arraySet: function (dest, src, src_offs, len, dest_offs) {\n for (var i = 0; i < len; i++) {\n dest[dest_offs + i] = src[src_offs + i];\n }\n },\n // Join array of chunks to single array.\n flattenChunks: function (chunks) {\n return [].concat.apply([], chunks);\n }\n};\n\n\n// Enable/Disable typed arrays use, for testing\n//\nexports.setTyped = function (on) {\n if (on) {\n exports.Buf8 = Uint8Array;\n exports.Buf16 = Uint16Array;\n exports.Buf32 = Int32Array;\n exports.assign(exports, fnTyped);\n } else {\n exports.Buf8 = Array;\n exports.Buf16 = Array;\n exports.Buf32 = Array;\n exports.assign(exports, fnUntyped);\n }\n};\n\nexports.setTyped(TYPED_OK);\n" - }, - { - "id": 1, - "identifier": "F:\\tweb\\node_modules\\pako\\index.js", - "name": "./node_modules/pako/index.js", - "index": 8, - "index2": 19, - "size": 347, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "issuerId": null, - "issuerName": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "name": "./node_modules/fast-png/lib-esm/index.js", - "profile": { - "factory": 2180, - "building": 1082 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "name": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "profile": { - "factory": 21, - "building": 92, - "dependencies": 43 - } - } - ], - "profile": { - "factory": 48, - "building": 7 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 20, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js 1f5c27d337cdd358fe6548a5eda250ca", - "module": "./node_modules/fast-png/lib-esm/index.js + 7 modules", - "moduleName": "./node_modules/fast-png/lib-esm/index.js + 7 modules", - "type": "harmony side effect evaluation", - "userRequest": "pako", - "loc": "2:0-43" - }, - { - "moduleId": 20, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js 1f5c27d337cdd358fe6548a5eda250ca", - "module": "./node_modules/fast-png/lib-esm/index.js + 7 modules", - "moduleName": "./node_modules/fast-png/lib-esm/index.js + 7 modules", - "type": "harmony side effect evaluation", - "userRequest": "pako", - "loc": "2:0-31" - }, - { - "moduleId": 20, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js 1f5c27d337cdd358fe6548a5eda250ca", - "module": "./node_modules/fast-png/lib-esm/index.js + 7 modules", - "moduleName": "./node_modules/fast-png/lib-esm/index.js + 7 modules", - "type": "harmony import specifier", - "userRequest": "pako", - "loc": "15:29-37" - }, - { - "moduleId": 20, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js 1f5c27d337cdd358fe6548a5eda250ca", - "module": "./node_modules/fast-png/lib-esm/index.js + 7 modules", - "moduleName": "./node_modules/fast-png/lib-esm/index.js + 7 modules", - "type": "harmony import specifier", - "userRequest": "pako", - "loc": "72:27-34" - } - ], - "usedExports": [ - "Inflate", - "deflate" - ], - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 4, - "source": "// Top level file is just a mixin of submodules & constants\n'use strict';\n\nvar assign = require('./lib/utils/common').assign;\n\nvar deflate = require('./lib/deflate');\nvar inflate = require('./lib/inflate');\nvar constants = require('./lib/zlib/constants');\n\nvar pako = {};\n\nassign(pako, deflate, inflate, constants);\n\nmodule.exports = pako;\n" - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\messages.js", - "name": "./node_modules/pako/lib/zlib/messages.js", - "index": 15, - "index2": 8, - "size": 1538, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\pako\\lib\\deflate.js", - "issuerId": 12, - "issuerName": "./node_modules/pako/lib/deflate.js", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "name": "./node_modules/fast-png/lib-esm/index.js", - "profile": { - "factory": 2180, - "building": 1082 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "name": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "profile": { - "factory": 21, - "building": 92, - "dependencies": 43 - } - }, - { - "id": 1, - "identifier": "F:\\tweb\\node_modules\\pako\\index.js", - "name": "./node_modules/pako/index.js", - "profile": { - "factory": 48, - "building": 7 - } - }, - { - "id": 12, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\deflate.js", - "name": "./node_modules/pako/lib/deflate.js", - "profile": { - "factory": 11, - "building": 13, - "dependencies": 8 - } - } - ], - "profile": { - "factory": 16, - "building": 21, - "dependencies": 2 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 12, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\lib\\deflate.js", - "module": "./node_modules/pako/lib/deflate.js", - "moduleName": "./node_modules/pako/lib/deflate.js", - "type": "cjs require", - "userRequest": "./zlib/messages", - "loc": "7:19-45" - }, - { - "moduleId": 13, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\deflate.js", - "module": "./node_modules/pako/lib/zlib/deflate.js", - "moduleName": "./node_modules/pako/lib/zlib/deflate.js", - "type": "cjs require", - "userRequest": "./messages", - "loc": "26:14-35" - }, - { - "moduleId": 15, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\lib\\inflate.js", - "module": "./node_modules/pako/lib/inflate.js", - "moduleName": "./node_modules/pako/lib/inflate.js", - "type": "cjs require", - "userRequest": "./zlib/messages", - "loc": "8:19-45" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 6, - "source": "'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nmodule.exports = {\n 2: 'need dictionary', /* Z_NEED_DICT 2 */\n 1: 'stream end', /* Z_STREAM_END 1 */\n 0: '', /* Z_OK 0 */\n '-1': 'file error', /* Z_ERRNO (-1) */\n '-2': 'stream error', /* Z_STREAM_ERROR (-2) */\n '-3': 'data error', /* Z_DATA_ERROR (-3) */\n '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */\n '-5': 'buffer error', /* Z_BUF_ERROR (-5) */\n '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */\n};\n" - }, - { - "id": 3, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\adler32.js", - "name": "./node_modules/pako/lib/zlib/adler32.js", - "index": 13, - "index2": 6, - "size": 1656, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\deflate.js", - "issuerId": 13, - "issuerName": "./node_modules/pako/lib/zlib/deflate.js", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "name": "./node_modules/fast-png/lib-esm/index.js", - "profile": { - "factory": 2180, - "building": 1082 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "name": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "profile": { - "factory": 21, - "building": 92, - "dependencies": 43 - } - }, - { - "id": 1, - "identifier": "F:\\tweb\\node_modules\\pako\\index.js", - "name": "./node_modules/pako/index.js", - "profile": { - "factory": 48, - "building": 7 - } - }, - { - "id": 12, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\deflate.js", - "name": "./node_modules/pako/lib/deflate.js", - "profile": { - "factory": 11, - "building": 13, - "dependencies": 8 - } - }, - { - "id": 13, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\deflate.js", - "name": "./node_modules/pako/lib/zlib/deflate.js", - "profile": { - "factory": 16, - "building": 21, - "dependencies": 2 - } - } - ], - "profile": { - "factory": 40, - "building": 27, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 13, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\deflate.js", - "module": "./node_modules/pako/lib/zlib/deflate.js", - "moduleName": "./node_modules/pako/lib/zlib/deflate.js", - "type": "cjs require", - "userRequest": "./adler32", - "loc": "24:14-34" - }, - { - "moduleId": 16, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\inflate.js", - "module": "./node_modules/pako/lib/zlib/inflate.js", - "moduleName": "./node_modules/pako/lib/zlib/inflate.js", - "type": "cjs require", - "userRequest": "./adler32", - "loc": "23:20-40" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 7, - "source": "'use strict';\n\n// Note: adler32 takes 12% for level 0 and 2% for level 6.\n// It isn't worth it to make additional optimizations as in original.\n// Small size is preferable.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction adler32(adler, buf, len, pos) {\n var s1 = (adler & 0xffff) |0,\n s2 = ((adler >>> 16) & 0xffff) |0,\n n = 0;\n\n while (len !== 0) {\n // Set limit ~ twice less than 5552, to keep\n // s2 in 31-bits, because we force signed ints.\n // in other case %= will fail.\n n = len > 2000 ? 2000 : len;\n len -= n;\n\n do {\n s1 = (s1 + buf[pos++]) |0;\n s2 = (s2 + s1) |0;\n } while (--n);\n\n s1 %= 65521;\n s2 %= 65521;\n }\n\n return (s1 | (s2 << 16)) |0;\n}\n\n\nmodule.exports = adler32;\n" - }, - { - "id": 4, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\crc32.js", - "name": "./node_modules/pako/lib/zlib/crc32.js", - "index": 14, - "index2": 7, - "size": 1750, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\deflate.js", - "issuerId": 13, - "issuerName": "./node_modules/pako/lib/zlib/deflate.js", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "name": "./node_modules/fast-png/lib-esm/index.js", - "profile": { - "factory": 2180, - "building": 1082 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "name": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "profile": { - "factory": 21, - "building": 92, - "dependencies": 43 - } - }, - { - "id": 1, - "identifier": "F:\\tweb\\node_modules\\pako\\index.js", - "name": "./node_modules/pako/index.js", - "profile": { - "factory": 48, - "building": 7 - } - }, - { - "id": 12, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\deflate.js", - "name": "./node_modules/pako/lib/deflate.js", - "profile": { - "factory": 11, - "building": 13, - "dependencies": 8 - } - }, - { - "id": 13, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\deflate.js", - "name": "./node_modules/pako/lib/zlib/deflate.js", - "profile": { - "factory": 16, - "building": 21, - "dependencies": 2 - } - } - ], - "profile": { - "factory": 40, - "building": 27, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 13, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\deflate.js", - "module": "./node_modules/pako/lib/zlib/deflate.js", - "moduleName": "./node_modules/pako/lib/zlib/deflate.js", - "type": "cjs require", - "userRequest": "./crc32", - "loc": "25:14-32" - }, - { - "moduleId": 16, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\inflate.js", - "module": "./node_modules/pako/lib/zlib/inflate.js", - "moduleName": "./node_modules/pako/lib/zlib/inflate.js", - "type": "cjs require", - "userRequest": "./crc32", - "loc": "24:20-38" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 7, - "source": "'use strict';\n\n// Note: we can't get significant speed boost here.\n// So write code to minimize size - no pregenerated tables\n// and array tools dependencies.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// Use ordinary array, since untyped makes no boost here\nfunction makeTable() {\n var c, table = [];\n\n for (var n = 0; n < 256; n++) {\n c = n;\n for (var k = 0; k < 8; k++) {\n c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));\n }\n table[n] = c;\n }\n\n return table;\n}\n\n// Create table on load. Just 255 signed longs. Not a problem.\nvar crcTable = makeTable();\n\n\nfunction crc32(crc, buf, len, pos) {\n var t = crcTable,\n end = pos + len;\n\n crc ^= -1;\n\n for (var i = pos; i < end; i++) {\n crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];\n }\n\n return (crc ^ (-1)); // >>> 0;\n}\n\n\nmodule.exports = crc32;\n" - }, - { - "id": 5, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\utils\\strings.js", - "name": "./node_modules/pako/lib/utils/strings.js", - "index": 16, - "index2": 10, - "size": 5293, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\pako\\lib\\deflate.js", - "issuerId": 12, - "issuerName": "./node_modules/pako/lib/deflate.js", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "name": "./node_modules/fast-png/lib-esm/index.js", - "profile": { - "factory": 2180, - "building": 1082 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "name": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "profile": { - "factory": 21, - "building": 92, - "dependencies": 43 - } - }, - { - "id": 1, - "identifier": "F:\\tweb\\node_modules\\pako\\index.js", - "name": "./node_modules/pako/index.js", - "profile": { - "factory": 48, - "building": 7 - } - }, - { - "id": 12, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\deflate.js", - "name": "./node_modules/pako/lib/deflate.js", - "profile": { - "factory": 11, - "building": 13, - "dependencies": 8 - } - } - ], - "profile": { - "factory": 16, - "building": 21, - "dependencies": 2 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 12, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\lib\\deflate.js", - "module": "./node_modules/pako/lib/deflate.js", - "moduleName": "./node_modules/pako/lib/deflate.js", - "type": "cjs require", - "userRequest": "./utils/strings", - "loc": "6:19-45" - }, - { - "moduleId": 15, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\lib\\inflate.js", - "module": "./node_modules/pako/lib/inflate.js", - "moduleName": "./node_modules/pako/lib/inflate.js", - "type": "cjs require", - "userRequest": "./utils/strings", - "loc": "6:19-45" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 6, - "source": "// String encode/decode helpers\n'use strict';\n\n\nvar utils = require('./common');\n\n\n// Quick check if we can use fast array to bin string conversion\n//\n// - apply(Array) can fail on Android 2.2\n// - apply(Uint8Array) can fail on iOS 5.1 Safari\n//\nvar STR_APPLY_OK = true;\nvar STR_APPLY_UIA_OK = true;\n\ntry { String.fromCharCode.apply(null, [ 0 ]); } catch (__) { STR_APPLY_OK = false; }\ntry { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; }\n\n\n// Table with utf8 lengths (calculated by first byte of sequence)\n// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,\n// because max possible codepoint is 0x10ffff\nvar _utf8len = new utils.Buf8(256);\nfor (var q = 0; q < 256; q++) {\n _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1);\n}\n_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start\n\n\n// convert string to array (typed, when possible)\nexports.string2buf = function (str) {\n var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;\n\n // count binary size\n for (m_pos = 0; m_pos < str_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;\n }\n\n // allocate buffer\n buf = new utils.Buf8(buf_len);\n\n // convert\n for (i = 0, m_pos = 0; i < buf_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n if (c < 0x80) {\n /* one byte */\n buf[i++] = c;\n } else if (c < 0x800) {\n /* two bytes */\n buf[i++] = 0xC0 | (c >>> 6);\n buf[i++] = 0x80 | (c & 0x3f);\n } else if (c < 0x10000) {\n /* three bytes */\n buf[i++] = 0xE0 | (c >>> 12);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n } else {\n /* four bytes */\n buf[i++] = 0xf0 | (c >>> 18);\n buf[i++] = 0x80 | (c >>> 12 & 0x3f);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n }\n }\n\n return buf;\n};\n\n// Helper (used in 2 places)\nfunction buf2binstring(buf, len) {\n // On Chrome, the arguments in a function call that are allowed is `65534`.\n // If the length of the buffer is smaller than that, we can use this optimization,\n // otherwise we will take a slower path.\n if (len < 65534) {\n if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) {\n return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len));\n }\n }\n\n var result = '';\n for (var i = 0; i < len; i++) {\n result += String.fromCharCode(buf[i]);\n }\n return result;\n}\n\n\n// Convert byte array to binary string\nexports.buf2binstring = function (buf) {\n return buf2binstring(buf, buf.length);\n};\n\n\n// Convert binary string (typed, when possible)\nexports.binstring2buf = function (str) {\n var buf = new utils.Buf8(str.length);\n for (var i = 0, len = buf.length; i < len; i++) {\n buf[i] = str.charCodeAt(i);\n }\n return buf;\n};\n\n\n// convert array to string\nexports.buf2string = function (buf, max) {\n var i, out, c, c_len;\n var len = max || buf.length;\n\n // Reserve max possible length (2 words per char)\n // NB: by unknown reasons, Array is significantly faster for\n // String.fromCharCode.apply than Uint16Array.\n var utf16buf = new Array(len * 2);\n\n for (out = 0, i = 0; i < len;) {\n c = buf[i++];\n // quick process ascii\n if (c < 0x80) { utf16buf[out++] = c; continue; }\n\n c_len = _utf8len[c];\n // skip 5 & 6 byte codes\n if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; }\n\n // apply mask on first byte\n c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;\n // join the rest\n while (c_len > 1 && i < len) {\n c = (c << 6) | (buf[i++] & 0x3f);\n c_len--;\n }\n\n // terminated by end of string?\n if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }\n\n if (c < 0x10000) {\n utf16buf[out++] = c;\n } else {\n c -= 0x10000;\n utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);\n utf16buf[out++] = 0xdc00 | (c & 0x3ff);\n }\n }\n\n return buf2binstring(utf16buf, out);\n};\n\n\n// Calculate max possible position in utf8 buffer,\n// that will not break sequence. If that's not possible\n// - (very small limits) return max size as is.\n//\n// buf[] - utf8 bytes array\n// max - length limit (mandatory);\nexports.utf8border = function (buf, max) {\n var pos;\n\n max = max || buf.length;\n if (max > buf.length) { max = buf.length; }\n\n // go back from last position, until start of sequence found\n pos = max - 1;\n while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }\n\n // Very small and broken sequence,\n // return max, because we should return something anyway.\n if (pos < 0) { return max; }\n\n // If we came to start of buffer - that means buffer is too small,\n // return max too.\n if (pos === 0) { return max; }\n\n return (pos + _utf8len[buf[pos]] > max) ? pos : max;\n};\n" - }, - { - "id": 6, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\zstream.js", - "name": "./node_modules/pako/lib/zlib/zstream.js", - "index": 17, - "index2": 11, - "size": 1811, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\pako\\lib\\deflate.js", - "issuerId": 12, - "issuerName": "./node_modules/pako/lib/deflate.js", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "name": "./node_modules/fast-png/lib-esm/index.js", - "profile": { - "factory": 2180, - "building": 1082 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "name": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "profile": { - "factory": 21, - "building": 92, - "dependencies": 43 - } - }, - { - "id": 1, - "identifier": "F:\\tweb\\node_modules\\pako\\index.js", - "name": "./node_modules/pako/index.js", - "profile": { - "factory": 48, - "building": 7 - } - }, - { - "id": 12, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\deflate.js", - "name": "./node_modules/pako/lib/deflate.js", - "profile": { - "factory": 11, - "building": 13, - "dependencies": 8 - } - } - ], - "profile": { - "factory": 16, - "building": 21, - "dependencies": 2 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 12, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\lib\\deflate.js", - "module": "./node_modules/pako/lib/deflate.js", - "moduleName": "./node_modules/pako/lib/deflate.js", - "type": "cjs require", - "userRequest": "./zlib/zstream", - "loc": "8:19-44" - }, - { - "moduleId": 15, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\lib\\inflate.js", - "module": "./node_modules/pako/lib/inflate.js", - "moduleName": "./node_modules/pako/lib/inflate.js", - "type": "cjs require", - "userRequest": "./zlib/zstream", - "loc": "9:19-44" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 6, - "source": "'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction ZStream() {\n /* next input byte */\n this.input = null; // JS specific, because we have no pointers\n this.next_in = 0;\n /* number of bytes available at input */\n this.avail_in = 0;\n /* total number of input bytes read so far */\n this.total_in = 0;\n /* next output byte should be put there */\n this.output = null; // JS specific, because we have no pointers\n this.next_out = 0;\n /* remaining free space at output */\n this.avail_out = 0;\n /* total number of bytes output so far */\n this.total_out = 0;\n /* last error message, NULL if no error */\n this.msg = ''/*Z_NULL*/;\n /* not visible by applications */\n this.state = null;\n /* best guess about the data type: binary or text */\n this.data_type = 2/*Z_UNKNOWN*/;\n /* adler32 value of the uncompressed data */\n this.adler = 0;\n}\n\nmodule.exports = ZStream;\n" - }, - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\constants.js", - "name": "./node_modules/pako/lib/zlib/constants.js", - "index": 22, - "index2": 16, - "size": 2312, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\pako\\index.js", - "issuerId": 1, - "issuerName": "./node_modules/pako/index.js", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "name": "./node_modules/fast-png/lib-esm/index.js", - "profile": { - "factory": 2180, - "building": 1082 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "name": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "profile": { - "factory": 21, - "building": 92, - "dependencies": 43 - } - }, - { - "id": 1, - "identifier": "F:\\tweb\\node_modules\\pako\\index.js", - "name": "./node_modules/pako/index.js", - "profile": { - "factory": 48, - "building": 7 - } - } - ], - "profile": { - "factory": 11, - "building": 13, - "dependencies": 8 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 1, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\index.js", - "module": "./node_modules/pako/index.js", - "moduleName": "./node_modules/pako/index.js", - "type": "cjs require", - "userRequest": "./lib/zlib/constants", - "loc": "8:16-47" - }, - { - "moduleId": 15, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\lib\\inflate.js", - "module": "./node_modules/pako/lib/inflate.js", - "moduleName": "./node_modules/pako/lib/inflate.js", - "type": "cjs require", - "userRequest": "./zlib/constants", - "loc": "7:19-46" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 5, - "source": "'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nmodule.exports = {\n\n /* Allowed flush values; see deflate() and inflate() below for details */\n Z_NO_FLUSH: 0,\n Z_PARTIAL_FLUSH: 1,\n Z_SYNC_FLUSH: 2,\n Z_FULL_FLUSH: 3,\n Z_FINISH: 4,\n Z_BLOCK: 5,\n Z_TREES: 6,\n\n /* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\n Z_OK: 0,\n Z_STREAM_END: 1,\n Z_NEED_DICT: 2,\n Z_ERRNO: -1,\n Z_STREAM_ERROR: -2,\n Z_DATA_ERROR: -3,\n //Z_MEM_ERROR: -4,\n Z_BUF_ERROR: -5,\n //Z_VERSION_ERROR: -6,\n\n /* compression levels */\n Z_NO_COMPRESSION: 0,\n Z_BEST_SPEED: 1,\n Z_BEST_COMPRESSION: 9,\n Z_DEFAULT_COMPRESSION: -1,\n\n\n Z_FILTERED: 1,\n Z_HUFFMAN_ONLY: 2,\n Z_RLE: 3,\n Z_FIXED: 4,\n Z_DEFAULT_STRATEGY: 0,\n\n /* Possible values of the data_type field (though see inflate()) */\n Z_BINARY: 0,\n Z_TEXT: 1,\n //Z_ASCII: 1, // = Z_TEXT (deprecated)\n Z_UNKNOWN: 2,\n\n /* The deflate compression method */\n Z_DEFLATED: 8\n //Z_NULL: null // Use -1 or null inline, depending on var type\n};\n" - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "index": 0, - "index2": 27, - "size": 1403, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": null, - "issuerId": null, - "issuerName": null, - "issuerPath": null, - "profile": { - "factory": 4, - "building": 3760 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": null, - "moduleIdentifier": null, - "module": null, - "moduleName": null, - "type": "single entry", - "userRequest": "!!F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "loc": "main" - } - ], - "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\nconst webp_1 = require(\"./webp\");\r\nconst ctx = self;\r\nconst tasks = [];\r\n//let isProcessing = false;\r\nfunction finishTask() {\r\n //isProcessing = false;\r\n processTasks();\r\n}\r\nfunction processTasks() {\r\n //if(isProcessing) return;\r\n const task = tasks.shift();\r\n if (!task)\r\n return;\r\n //isProcessing = true;\r\n switch (task.type) {\r\n case 'convertWebp': {\r\n const { fileName, bytes } = task.payload;\r\n let convertedBytes;\r\n try {\r\n convertedBytes = webp_1.webp2png(bytes).bytes;\r\n }\r\n catch (err) {\r\n console.error('Convert webp2png error:', err, 'payload:', task.payload);\r\n }\r\n ctx.postMessage({\r\n type: 'convertWebp',\r\n payload: {\r\n fileName,\r\n bytes: convertedBytes\r\n }\r\n });\r\n finishTask();\r\n break;\r\n }\r\n default:\r\n finishTask();\r\n }\r\n}\r\nfunction scheduleTask(task) {\r\n tasks.push(task);\r\n /* if(task.payload.fileName.indexOf('main-') === 0) {\r\n tasks.push(task);\r\n } else {\r\n tasks.unshift(task);\r\n } */\r\n processTasks();\r\n}\r\nctx.addEventListener('message', (event) => {\r\n scheduleTask(event.data);\r\n});\r\n" - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "index": 1, - "index2": 26, - "size": 1358, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "issuerId": 8, - "issuerName": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - } - ], - "profile": { - "factory": 2933, - "building": 717 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 8, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "module": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "moduleName": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "type": "cjs require", - "userRequest": "./webp", - "loc": "3:15-32" - } - ], - "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.webp2pngAsBlob = exports.webp2png = void 0;\r\nconst libwebp_0_2_0_1 = require(\"../../vendor/libwebp-0.2.0\");\r\nconst fast_png_1 = require(\"fast-png\");\r\nfunction webp2png(data) {\r\n const decoder = new libwebp_0_2_0_1.WebPDecoder();\r\n const config = decoder.WebPDecoderConfig;\r\n const buffer = config.j || config.output;\r\n const bitstream = config.input;\r\n decoder.WebPInitDecoderConfig(config);\r\n decoder.WebPGetFeatures(data, data.length, bitstream);\r\n /** MODE_RGBA = 1 MODE_ARGB = 4, */\r\n buffer.J = 1;\r\n let status;\r\n try {\r\n status = decoder.WebPDecode(data, data.length, config);\r\n }\r\n catch (e) {\r\n status = e;\r\n }\r\n if (status === 0) {\r\n const rgbaData = buffer.Jb;\r\n const pngData = fast_png_1.encode({\r\n data: rgbaData,\r\n width: buffer.width,\r\n height: buffer.height,\r\n channels: 4,\r\n depth: 8,\r\n });\r\n return { status, bytes: pngData };\r\n }\r\n return { status, bytes: data };\r\n}\r\nexports.webp2png = webp2png;\r\nfunction webp2pngAsBlob(data) {\r\n const { status, bytes } = webp2png(data);\r\n return new Blob([bytes], { type: status === 0 ? 'image/png' : 'image/webp' });\r\n}\r\nexports.webp2pngAsBlob = webp2pngAsBlob;\r\n" - }, - { - "id": 10, - "identifier": "F:\\tweb\\src\\vendor\\libwebp-0.2.0.js", - "name": "./src/vendor/libwebp-0.2.0.js", - "index": 2, - "index2": 0, - "size": 119427, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "issuerId": 9, - "issuerName": "./src/lib/webp/webp.ts", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - } - ], - "profile": { - "factory": 2180, - "building": 1082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 9, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "module": "./src/lib/webp/webp.ts", - "moduleName": "./src/lib/webp/webp.ts", - "type": "cjs require", - "userRequest": "../../vendor/libwebp-0.2.0", - "loc": "4:24-61" - } - ], - "usedExports": true, - "providedExports": [ - "WebPDecoder" - ], - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./src/lib/webp/webp.ts (referenced with cjs require)" - ], - "depth": 2, - "source": "// Copyright 2011 Google Inc.\n//\n// This code is licensed under the same terms as WebM:\n// Software License Agreement: http://www.webmproject.org/license/software/\n// Additional IP Rights Grant: http://www.webmproject.org/license/additional/\n// -----------------------------------------------------------------------------\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n// IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// -----------------------------------------------------------------------------\n//\n// Copyright 2011-2013 Dominik Homberger\n// Libwebp Javascript / libwebpjs - the libwebp implementation in javascript (v0.2.0)\n//\n// Author: Dominik Homberger (dominik.homberger@gmail.com)\n\nlet i;\nlet a;\nlet self;\nconst ca = 0;\nconst p = null;\nconst s = 0;\nconst x = 0;\nconst la = s;\nconst E = s;\nconst bb = 0;\nconst Mb = 0;\n\nfunction M(F) {\n return JSON.parse(JSON.stringify(F));\n}\n\nfunction N(F, G, w, D, S) {\n for (i = 0; i < S; ++i) F[G + i] = w[D + i];\n}\n\nfunction Nb(F) {\n const G = [];\n const w = F.length;\n let D;\n for (D = 0; D < w; ++D) G.push(F[D]);\n return G;\n}\n\nfunction ic(F, G) {\n const w = [];\n w.push(M(F));\n let D;\n for (D = 0; D < G; ++D) w.push(M(F));\n w.push(0);\n return w;\n}\n\nfunction rc(F, G) {\n const w = [];\n let D;\n for (D = 0; D < G; ++D) w.push(F);\n w.push(0);\n return w;\n}\n\nfunction memmove(arr1, index1, arr2, index2, length) {\n let i;\n for (i = 0; i < length; i++) {\n arr1[index1 + i] = arr2[index2 + i];\n }\n}\n\nfunction jd(F, G, w, D) {\n let S;\n for (S = 0; S < D; ++S) F[G + S] = w;\n}\n\nfunction kd(F, G, w, D) {\n let S = '';\n let ga;\n for (ga = 0; ga < D; ++ga) S += String.fromCharCode(F[G + ga]);\n return w == S ? 0 : 1;\n}\n\nfunction U(F, G) {\n let w; const\n D = [];\n for (w = 0; w < F; ++w) D.push(G);\n return D;\n}\n\nfunction ld(F, G) {\n let w; const\n D = [];\n for (w = 0; w < F; ++w) D.push(M(G));\n return D;\n}\n\nfunction md(F, G) {\n let w;\n for (w = F.length - 1; w >= 0; --w) G = M(U(F[w], G));\n return G;\n}\n\nfunction $(F) {\n if (!F) throw Error('assert :P');\n}\nexport const WebPDecoder = function () {\n function F(a) {\n return a == Ob || a == Pb || a == Bb || a == Qb;\n }\n\n function G(a) {\n return S(a, 1);\n }\n\n function w(a, b) {\n const c = 1 + ((a.la - 1) * b >> 8);\n const d = c << 8;\n let e = s;\n a.Z >= d ? (e = 1, a.la -= c, a.Z -= d) : (e = 0, a.la = c);\n for (; a.la < 128;) a.Z <<= 1, a.la <<= 1, ++a.gc == 8 && (a.gc = 0, a.bc && (a.Z += a.qa[a.Ia++], a.bc--));\n return e;\n }\n\n function D(a, b, c, d) {\n d -= c;\n d >= 2 ? (a.Z = b[c + 0] << 8 | b[c + 1], a.qa = b, a.Ia = c + 2, a.bc = d - 2) : (a.Z = 0, a.qa = p, a.bc = 0);\n a.la = 255;\n a.gc = 0;\n }\n\n function S(a, b) {\n for (var c = 0, d = s, d = b - 1; d >= 0; d--) c |= w(a, 128) << d;\n return c;\n }\n\n function ga(a, b) {\n const c = S(a, b);\n return G(a) ? -c : c;\n }\n\n function Rb(a, b, c, d) {\n let e = Mb;\n $(a != p);\n $(b != p);\n $(d < 4294967288);\n a.qa = b;\n a.Ia = c;\n a.ya = d;\n a.T = 0;\n a.Q = 0;\n a.g = 0;\n a.L = 0;\n for (e = a.fa = 0; e < 4 && e < a.ya; ++e) a.T |= a.qa[a.Ia + a.Q] << 8 * e, ++a.Q;\n }\n\n function Sb(a) {\n for (; a.g >= 8 && a.Q < a.ya;) a.T >>>= 8, a.T += a.qa[a.Ia + a.Q] << 24 >>> 0, ++a.Q, a.g -= 8;\n }\n\n function Da(a) {\n a.g >= 8 && Sb(a);\n a.Q == a.ya && a.g == 32 && (a.L = 1);\n }\n\n function T(a, b) {\n let c = 0;\n $(b >= 0);\n if (!a.L && b < gf) {\n if (a.Q == a.ya && a.g + b >= 32 && (a.L = 1, a.g + b > 32)) return c;\n c = a.T >> a.g & hf[b];\n a.g += b;\n a.g >= 8 && a.g >= 8 && Sb(a);\n } else a.fa = 1;\n return c;\n }\n\n function ma(a) {\n return a.Pa == a.gb;\n }\n\n function nd(a, b) {\n $(a != p);\n if (b == 0) return 0;\n a.gb = 2 * b - 1;\n a.Y = ld(a.gb, jf);\n if (a.Y == p) return 0;\n a.Y[0].s = -1;\n return a.Pa = 1;\n }\n\n function ja(a) {\n a != p && (a.Y = p, a.Y = p, a.gb = 0, a.Pa = 0);\n }\n\n function jc(a, b, c, d) {\n for (var e = a.Y, g = 0, k = +a.gb; d-- > 0;) {\n if (g >= k) return 0;\n if (e[g].s < 0) {\n if (ma(a)) return 0;\n const h = a;\n const n = h.Y;\n const l = +h.Pa;\n e[g].s = l - g;\n h.Pa += 2;\n n[l + 0].s = -1;\n n[l + 1].s = -1;\n } else if (e[g].s == 0) return 0;\n g += e[g].s + (c >> d & 1);\n }\n if (e[g].s < 0) e[g].s = 0;\n else if (e[g].s != 0) return 0;\n e[g].kc = b;\n return 1;\n }\n\n function od(a, b, c) {\n var d = s;\n let e = 0;\n let g = 0;\n $(a != p);\n $(b != p);\n for (d = 0; d < c; ++d) b[d] > 0 && (++e, g = d);\n if (!nd(a, e)) return 0;\n if (e == 1) return g < 0 || g >= c ? (ja(a), 0) : jc(a, g, 0, 0);\n e = 0;\n g = U(c, s);\n if (g == p) return (e = e && ma(a)) || ja(a), e;\n var k = s;\n var k = s;\n var d = U(Tb + 1, 0);\n let h = s;\n const n = U(Tb + 1, 0);\n let l = 0;\n $(b != p);\n $(c > 0);\n $(g != p);\n for (k = 0; k < c; ++k) b[k] > l && (l = b[k]);\n if (l > Tb) d = 0;\n else {\n for (k = 0; k < c; ++k) ++d[b[k]];\n h = d[0] = 0;\n n[0] = -1;\n for (k = 1; k <= l; ++k) h = h + d[k - 1] << 1, n[k] = h;\n for (k = 0; k < c; ++k) g[k] = b[k] > 0 ? n[b[k]]++ : pd;\n d = 1;\n }\n if (!d) return (e = e && ma(a)) || ja(a), e;\n for (d = 0; d < c; ++d) {\n if (b[d] > 0 && !jc(a, d, g[d], b[d])) {\n return (e = e && ma(a)) || ja(a), e;\n }\n }\n (e = ma(a)) || ja(a);\n return e;\n }\n\n function Ea(a, b, c, d, e, g, k) {\n for (var h = s, h = 0; h < k; ++h) e[g + h] = a[b + h] + c[d + h] & 255;\n }\n\n function qd(a, b, c) {\n const d = a.P.l;\n if (!(c = b < 0 || c < 0 || b + c > a.P.v)) {\n if (c = b == 0) {\n a: {\n let e = a.Ga;\n var g = a.G;\n var k = a.ub;\n c = a.P.l;\n let h = a.P.v;\n const n = a.Xb;\n var l = [p];\n let m = p;\n let f = h * c;\n var q = p;\n var r = p;\n var r = 'WEBP_FILTER_TYPE';\n let u = s;\n var l = s;\n var v = 0;\n let C = s;\n $(c > 0 && h > 0 && d >= c);\n $(e != p && n != p);\n if (k <= Ub) c = 0;\n else if (C = e[g + 0] >> 0 & 3, r = e[g + 0] >> 2 & 3, u = e[g + 0] >> 4 & 3, l = e[g + 0] >> 6 & 3, C < kc || C > kf || r >= lf || u > rd || l != 0) c = 0;\n else {\n if (C == kc) v = k >= f, l = e, m = g + Ub;\n else {\n l = U(f, 0);\n m = 0;\n if (l\n == p) {\n c = 0;\n break a;\n }\n var v = g + Ub;\n var k = k - Ub;\n var g = l;\n var q = M(Vb);\n let A = 0;\n const z = sd();\n z == p ? v = 0 : (z.l = c, z.v = h, z.N = q, td(na), q.put = ud, q.Mb = vd, q.Pb = wd, q.ka = p, q.ka = g, q.fd = 0, q.width = c, q.height = h, z.a = L, Rb(z.o, e, v, k), z.Wa = Cb, Ka(c, h, 1, z, p) && xd(z, c) && (z.Wa = Db, A = lc(z, z.V, z.Ha, z.l, z.v, mf)), z != p && sa(z), v = A);\n }\n if (v) {\n e = nf[r];\n e != p ? (q = U(f, 0), r = 0, q == p && (v = 0, C != kc && (m = l = p)), e(l, m, c, h, 1, c, q, r), f = q, C = r) : (f = l, C = m);\n for (e = 0; h-- > 0;) N(n, e, f, C, c), C += c, e += d;\n u == rd && (v = l == p || m <= 0 || c <= 0 ? 0 : 1);\n }\n c = v;\n }\n }\n c = !c;\n }\n }\n return c ? p : b == 0 ? a.Xb : +b * d;\n }\n\n function of(a) {\n let b = a.width;\n const c = a.height;\n let d = a.J;\n if (b <= 0 || c <= 0 || !(d >= Qa && d < Cc)) return ta;\n if (!a.Fc && a.Jb == p) {\n var e = p;\n var g = 0;\n var k = 0;\n var h = 0;\n var n = 0;\n var e = bb;\n var l = b * yd[d];\n var m = l * c;\n d < ua || (g = parseInt((b + 1) / 2, 10), h = g * parseInt((c + 1) / 2, 10), d == Ra && (k = b, n = k * c));\n e = m + 2 * h + n;\n if (e != e) return ta;\n e = U(e, 205);\n if (e == p) return cb;\n a.Jb = e;\n a.jc = p;\n d < ua ? (b = a.c.RGBA, b.ma = e, b.Sa = p, b.f = l, b.size = m) : (b = a.c.Va, b.y = e, b.D = p, b.F = l, b.Wc = m, b.c = e, b.B = p + m, b.nb = g, b.Rc = h, b.S = e, b.C = p + m + h, b.rb = g, b.Uc = h, d == Ra && (b.p = e, b.q = p + m + 2 * h), b.Wb = n, b.Fa = k);\n }\n d = 1;\n g = a.J;\n k = a.width;\n h = a.height;\n g >= Qa && g < Cc ? g < ua ? (a = a.c.RGBA, d\n &= a.f * h <= a.size, d &= a.f >= k * yd[g], d &= a.ma != p) : (a = a.c.Va, n = a.nb * parseInt((h + 1) / 2, 10), l = a.rb * parseInt((h + 1) / 2, 10), m = a.Fa * h, d &= a.F * h <= a.Wc, d &= n <= a.Rc, d &= l <= a.Uc, d &= m <= a.Wb, d &= a.F >= k, d &= a.nb >= parseInt((k + 1) / 2, 10), d &= a.rb >= parseInt((k + 1) / 2, 10), d &= a.y != p, d &= a.c != p, d &= a.S != p, g == Ra && (d &= a.Fa >= k, d &= m <= a.Wb, d &= a.p != p)) : d = 0;\n return d ? L : ta;\n }\n\n function zd(a, b, c, d) {\n if (d == p || a <= 0 || b <= 0) return ta;\n if (c != p) {\n if (c.Ua) {\n const e = c.wc;\n const g = c.vc;\n const k = c.t & -2;\n const h = c.k & -2;\n if (k < 0 || h < 0 || e <= 0 || g <= 0 || k + e > a || h + g > b) return ta;\n a = e;\n b = g;\n }\n if (c.I) {\n if (c.Ba <= 0\n || c.Aa <= 0) return ta;\n a = c.Ba;\n b = c.Aa;\n }\n }\n d.width = a;\n d.height = b;\n return of(d);\n }\n\n function mb(a) {\n return !(a & -256) ? a : a < 0 ? 0 : 255;\n }\n\n function Ad(a, b, c, d) {\n const e = U(16, 0);\n let g;\n g = 0;\n let k;\n for (k = 0; k < 4; ++k) {\n var h = a[b + 0] + a[b + 8];\n var n = a[b + 0] - a[b + 8];\n var l = (a[b + 4] * Wb >> 16) - (a[b + 12] * Xb >> 16);\n var m = (a[b + 4] * Xb >> 16) + (a[b + 12] * Wb >> 16);\n e[g + 0] = h + m;\n e[g + 1] = n + l;\n e[g + 2] = n - l;\n e[g + 3] = h - m;\n g += 4;\n b++;\n }\n for (k = g = 0; k < 4; ++k) {\n a = e[g + 0] + 4, h = a + e[g + 8], n = a - e[g + 8], l = (e[g + 4] * Wb >> 16) - (e[g + 12] * Xb >> 16), m = (e[g + 4] * Xb >> 16) + (e[g + 12] * Wb >> 16), c[d + 0 + 0 * f] = mb(c[d + 0 + 0 * f] + (h + m >> 3)), c[d + 1 + 0 * f] = mb(c[d\n + 1 + 0 * f] + (n + l >> 3)), c[d + 2 + 0 * f] = mb(c[d + 2 + 0 * f] + (n - l >> 3)), c[d + 3 + 0 * f] = mb(c[d + 3 + 0 * f] + (h - m >> 3)), g++, d += f;\n }\n }\n\n function pf(a, b, c, d, e) {\n Ad(a, b, c, d);\n e && Ad(a, b + 16, c, d + 4);\n }\n\n function qf(a, b, c, d) {\n mc(a, b + 0, c, d + 0, 1);\n mc(a, b + 32, c, d + 4 * f, 1);\n }\n\n function nc(a, b, c, d) {\n a = a[b + 0] + 4;\n let e;\n for (e = 0; e < 4; ++e) for (b = 0; b < 4; ++b) c[d + b + e * f] = mb(c[d + b + e * f] + (a >> 3));\n }\n\n function rf(a, b, c, d) {\n a[b + 0] && nc(a, b + 0, c, d + 0);\n a[b + 16] && nc(a, b + 16, c, d + 4);\n a[b + 32] && nc(a, b + 32, c, d + 4 * f);\n a[b + 48] && nc(a, b + 48, c, d + 4 * f + 4);\n }\n\n function Dc(a, b, c) {\n const d = b - f;\n const e = oa;\n const g = 255 - a[d - 1];\n let k;\n for (k = 0; k\n < c; ++k) {\n const h = e;\n const n = g + a[b - 1];\n var l;\n for (l = 0; l < c; ++l) a[b + l] = h[n + a[d + l]];\n b += f;\n }\n }\n\n function Yb(a, b, c) {\n let d;\n for (d = 0; d < 16; ++d) for (i = 0; i < 16; ++i) b[c + d * f + i] = a;\n }\n\n function y(a, b, c) {\n return a + 2 * b + c + 2 >> 2;\n }\n\n function Zb(a, b, c) {\n let d; let\n e;\n for (d = 0; d < 8; ++d) for (e = 0; e < 8; ++e) b[c + e + d * f] = a;\n }\n\n function nb(a, b, c) {\n const d = a[b - c];\n const e = a[b + 0];\n const g = 3 * (e - d) + sc[1020 + a[b - 2 * c] - a[b + c]];\n const k = oc[112 + (g + 4 >> 3)];\n a[b - c] = oa[255 + d + oc[112 + (g + 3 >> 3)]];\n a[b + 0] = oa[255 + e - k];\n }\n\n function Bd(a, b, c, d) {\n const e = a[b + 0];\n const g = a[b + c];\n return va[255 + a[b - 2 * c] - a[b - c]] > d || va[255 + g - e] > d;\n }\n\n function Cd(a,\n b, c, d, e) {\n const g = a[b - 3 * c];\n const k = a[b - 2 * c];\n const h = a[b - c];\n const n = a[b + 0];\n const l = a[b + c];\n const m = a[b + 2 * c];\n const f = a[b + 3 * c];\n return 2 * va[255 + h - n] + tc[255 + k - l] > d ? 0 : va[255 + a[b - 4 * c] - g] <= e && va[255 + g - k] <= e && va[255 + k - h] <= e && va[255 + f - m] <= e && va[255 + m - l] <= e && va[255 + l - n] <= e;\n }\n\n function Dd(a, b, c, d) {\n let e;\n for (e = 0; e < 16; ++e) 2 * va[255 + a[b + e - c] - a[b + e + 0]] + tc[255 + a[b + e - 2 * c] - a[b + e + c]] <= d && nb(a, b + e, c);\n }\n\n function Ed(a, b, c, d) {\n let e;\n for (e = 0; e < 16; ++e) 2 * va[255 + a[b + e * c - 1] - a[b + e * c + 0]] + tc[255 + a[b + e * c - 2] - a[b + e * c + 1]] <= d && nb(a, b + e * c, 1);\n }\n\n function sf(a, b, c, d) {\n let e;\n for (e = 3; e > 0; --e) {\n b\n += 4 * c, Dd(a, b + 0, c, d);\n }\n }\n\n function tf(a, b, c, d) {\n let e;\n for (e = 3; e > 0; --e) b += 4, Ed(a, b + 0, c, d);\n }\n\n function Fa(a, b, c, d, e, g, k, h) {\n for (; e-- > 0;) {\n if (Cd(a, b + 0, c, g, k)) {\n if (Bd(a, b + 0, c, h)) nb(a, b + 0, c);\n else {\n const n = a;\n const l = b + 0;\n const m = c;\n const f = n[l - 2 * m];\n const q = n[l - m];\n const r = n[l + 0];\n const u = n[l + m];\n const v = n[l + 2 * m];\n var C = sc[1020 + 3 * (r - q) + sc[1020 + f - u]];\n const A = 27 * C + 63 >> 7;\n const z = 18 * C + 63 >> 7;\n var C = 9 * C + 63 >> 7;\n n[l - 3 * m] = oa[255 + n[l - 3 * m] + C];\n n[l - 2 * m] = oa[255 + f + z];\n n[l - m] = oa[255 + q + A];\n n[l + 0] = oa[255 + r - A];\n n[l + m] = oa[255 + u - z];\n n[l + 2 * m] = oa[255 + v - C];\n }\n }\n b += d;\n }\n }\n\n function Ga(a, b, c, d, e, g, k, h) {\n for (; e-- > 0;) {\n if (Cd(a, b + 0, c,\n g, k)) {\n if (Bd(a, b + 0, c, h)) nb(a, b + 0, c);\n else {\n const n = a;\n const l = b + 0;\n const m = c;\n const f = n[l - m];\n const q = n[l + 0];\n const r = n[l + m];\n var u = 3 * (q - f);\n const v = oc[112 + (u + 4 >> 3)];\n var u = oc[112 + (u + 3 >> 3)];\n const C = v + 1 >> 1;\n n[l - 2 * m] = oa[255 + n[l - 2 * m] + C];\n n[l - m] = oa[255 + f + u];\n n[l + 0] = oa[255 + q - v];\n n[l + m] = oa[255 + r - C];\n }\n }\n b += d;\n }\n }\n\n function uf(a, b, c, d, e, g) {\n Fa(a, b + 0, c, 1, 16, d, e, g);\n }\n\n function vf(a, b, c, d, e, g) {\n Fa(a, b + 0, 1, c, 16, d, e, g);\n }\n\n function wf(a, b, c, d, e, g) {\n let k;\n for (k = 3; k > 0; --k) b += 4 * c, Ga(a, b + 0, c, 1, 16, d, e, g);\n }\n\n function xf(a, b, c, d, e, g) {\n let k;\n for (k = 3; k > 0; --k) b += 4, Ga(a, b + 0, 1, c, 16, d, e, g);\n }\n\n function yf(a, b, c, d, e,\n g, k, h) {\n Fa(a, b, e, 1, 8, g, k, h);\n Fa(c, d, e, 1, 8, g, k, h);\n }\n\n function zf(a, b, c, d, e, g, k, h) {\n Fa(a, b, 1, e, 8, g, k, h);\n Fa(c, d, 1, e, 8, g, k, h);\n }\n\n function Af(a, b, c, d, e, g, k, h) {\n Ga(a, b + 4 * e, e, 1, 8, g, k, h);\n Ga(c, d + 4 * e, e, 1, 8, g, k, h);\n }\n\n function Bf(a, b, c, d, e, g, k, h) {\n Ga(a, b + 4, 1, e, 8, g, k, h);\n Ga(c, d + 4, 1, e, 8, g, k, h);\n }\n\n function Fd(a, b) {\n return b == $b ? a.i == 0 ? a.d == 0 ? Cf : Df : a.d == 0 ? Ef : $b : b;\n }\n\n function Ec(a, b, c, d) {\n for (i = 0; i < 4; ++i) a[b + i] = c[d + i];\n }\n\n function wa(a, b) {\n return a < 0 ? 0 : a > b ? b : a;\n }\n\n function Gd(a) {\n a.a = 'VP8_STATUS_OK';\n a.xc = 'OK';\n }\n\n function td(a) {\n a >>> 8 != na >>> 8 && alert('mismatch error');\n }\n\n function Y(a, b, c) {\n a.a == L && (a.a = b, a.xc = c, a.za = 0);\n // alert(b + \": \" + c);\n return 0;\n }\n\n function Hd(a, b) {\n let c = [0];\n let d = x;\n var e = [Mb];\n var g = M(Id);\n var k = M(Jd);\n let h = M(Fc);\n var e = 'VP8StatusCode';\n var g = M(Gc);\n if (a == p) return alert('(dec == null)'), 0;\n Gd(a);\n if (b == p) return Y(a, 'VP8_STATUS_INVALID_PARAM', 'null VP8Io passed to VP8GetHeaders()');\n g.data = b.data;\n g.b = b.b;\n g.e = b.e;\n g.b = [g.b];\n g.e = [g.e];\n g = [g];\n e = Kd(g);\n if (e != L) return Y(a, e, 'Incorrect/incomplete header.');\n g = g[0];\n g.b = g.b[0];\n g.e = g.e[0];\n if (g.ia) return Y(a, W, 'Unexpected lossless format encountered.');\n a.Ga == p && ($(a.ub == 0), a.Ga = g.$, a.G = g.G, a.ub = g.pa);\n d = g.data;\n c = g.b + g.offset;\n e = g.e - g.offset;\n $(g.e >= g.offset);\n if (e[0] < 4) return Y(a, Z, 'Truncated header.');\n h = d[c + 0] | d[c + 1] << 8 | d[c + 2] << 16;\n g = a.Ac;\n g.fb = !(h & 1) + 0;\n g.Jc = h >> 1 & 7;\n g.Nc = h >> 4 & 1;\n g.Ra = h >> 5;\n if (g.Jc > 3) return Y(a, 'VP8_STATUS_BITSTREAM_ERROR', 'Incorrect keyframe parameters.');\n if (!g.Nc) return Y(a, 'VP8_STATUS_UNSUPPORTED_FEATURE', 'Frame not displayable.');\n c += 3;\n e -= 3;\n k = a.P;\n if (g.fb) {\n if (e < 7) return Y(a, 'VP8_STATUS_NOT_ENOUGH_DATA', 'cannot parse picture header');\n if (!(e\n >= 3 && d[c + 0] == 157 && d[c + 1] == 1 && d[c + 2] == 42)) return Y(a, 'VP8_STATUS_BITSTREAM_ERROR', 'Bad code word');\n k.l = (d[c + 4] << 8 | d[c + 3]) & 16383;\n k.gd = d[c + 4] >> 6;\n k.v = (d[c + 6] << 8 | d[c + 5]) & 16383;\n k.hd = d[c + 6] >> 6;\n c += 7;\n e -= 7;\n a.Ma = k.l + 15 >> 4;\n a.hb = k.v + 15 >> 4;\n b.width = k.l;\n b.height = k.v;\n b.I = 0;\n b.Ua = 0;\n b.k = 0;\n b.t = 0;\n b.Ka = b.width;\n b.K = b.height;\n b.m = b.width;\n b.h = b.height;\n h = a.R;\n for (i = 0; i < h.Ta.length; ++i) h.Ta[i] = 255;\n h.z = M(Ff);\n h = a.Ca;\n $(h != p);\n h.pb = 0;\n h.ob = 0;\n h.tb = 1;\n for (i = 0; i < h.Kb.length; ++i) h.Kb[i] = 0;\n for (i = 0; i < h.Cb.length; ++i) h.Cb[i] = 0;\n a.Lb = 0;\n }\n if (g.Ra\n > e) return Y(a, 'VP8_STATUS_NOT_ENOUGH_DATA', 'bad partition length');\n h = a.o;\n D(h, d, c, c + g.Ra);\n c += g.Ra;\n e -= g.Ra;\n g.fb && (k.uc = G(h), k.$c = G(h));\n var k = h;\n var n = a.Ca;\n let l = a.R;\n $(k != p);\n $(n != p);\n n.pb = G(k);\n if (n.pb) {\n n.ob = G(k);\n if (G(k)) {\n var m;\n n.tb = G(k);\n for (m = 0; m < xa; ++m) n.Kb[m] = G(k) ? ga(k, 7) : 0;\n for (m = 0; m < xa; ++m) n.Cb[m] = G(k) ? ga(k, 6) : 0;\n }\n if (n.ob) for (m = 0; m < Ld; ++m) l.Ta[m] = G(k) ? S(k, 8) : 255;\n } else n.ob = 0;\n if (k.Ab) return Y(a, 'VP8_STATUS_BITSTREAM_ERROR', 'cannot parse segment header');\n k = h;\n n = a.ga;\n n.Oc = G(k);\n n.Fb = S(k, 6);\n n.kb = S(k, 3);\n n.oc = G(k);\n if (n.oc\n && G(k)) {\n for (l = 0; l < Hc; ++l) G(k) && (n.Lc[l] = ga(k, 6));\n for (l = 0; l < Gf; ++l) G(k) && (n.Gc[l] = ga(k, 6));\n }\n a.A = n.Fb == 0 ? 0 : n.Oc ? 1 : 2;\n if (a.A > 0) {\n if (a.Ca.pb) for (l = 0; l < xa; ++l) m = a.Ca.Cb[l], a.Ca.tb || (m += n.Fb), a.Zb[l] = m;\n else a.Zb[0] = n.Fb;\n }\n if (k.Ab) return Y(a, 'VP8_STATUS_BITSTREAM_ERROR', 'cannot parse filter header');\n var k = d;\n var f = c;\n var n = f;\n var e = f + e;\n m = 0;\n let q = s;\n let r = s;\n a.Hb = 1 << S(a.o, 2);\n q = a.Hb - 1;\n l = k;\n m = f + 3 * q;\n if (e < m) e = 'VP8_STATUS_NOT_ENOUGH_DATA';\n else {\n for (r = 0; r < q; ++r) {\n var f = l;\n var u = m + (k[n + 0] | k[n + 1] << 8 | k[n + 2] << 16);\n u > e && (f = k);\n D(a.ic[+r], l, m, u);\n l = f;\n m = u;\n n += 3;\n }\n D(a.ic[+q], l, m, e);\n e = m < e ? 'VP8_STATUS_OK' : 'VP8_STATUS_SUSPENDED';\n }\n if (e != 'VP8_STATUS_OK') return Y(a, 'VP8_STATUS_BITSTREAM_ERROR', 'cannot parse partitions');\n q = a.o;\n e = S(q, 7);\n k = G(q) ? ga(q, 4) : 0;\n n = G(q) ? ga(q, 4) : 0;\n l = G(q) ? ga(q, 4) : 0;\n m = G(q) ? ga(q, 4) : 0;\n q = G(q) ? ga(q, 4) : 0;\n r = a.Ca;\n f = s;\n for (f = 0; f < xa; ++f) {\n u = s;\n if (r.pb) u = r.Kb[f], r.tb || (u += e);\n else if (f > 0) {\n a.yb[f] = a.yb[0];\n continue;\n } else u = e;\n const v = a.yb[f];\n v.sc[0] = Ic[wa(u + k, 127)];\n v.sc[1] = Jc[wa(u + 0, 127)];\n v.sb[0] = 2 * Ic[wa(u + n, 127)];\n v.sb[1] = 101581 * Jc[wa(u + l, 127)] >> 16;\n v.sb[1] < 8\n && (v.sb[1] = 8);\n v.qc[0] = Ic[wa(u + m, 117)];\n v.qc[1] = Jc[wa(u + q, 127)];\n }\n if (g.fb) a.Zc = 259;\n else return Y(a, Hf, 'Not a key frame.');\n G(h);\n e = a.R;\n for (k = 0; k < Md; ++k) for (n = 0; n < Nd; ++n) for (l = 0; l < Kc; ++l) for (m = 0; m < Lc; ++m) w(h, If[k][n][l][m]) && (e.z[k][n][l][m] = S(h, 8));\n a.pc = G(h);\n a.pc && (a.Pc = S(h, 8));\n if (a.P.uc) {\n c -= 8;\n h = Mb;\n if (g.Ra < 8 || d[c + 8 - 1] != 1) return Y(a, W, 'RIFF: Inconsistent extra information.');\n h = d[c + 0] << 0 | d[c + 1] << 8 | d[c + 2] << 16;\n a.fc = h;\n a.dd = p;\n a.cd = d[c + 3];\n }\n return a.za = 1;\n }\n\n function Mc(a, b, c, d, e, g) {\n let k = b[e][c];\n if (!w(a, k[0])) return 0;\n for (;;) {\n ++e;\n if (w(a, k[1])) {\n var h;\n if (w(a, k[2])) {\n if (w(a, k[3])) {\n if (w(a, k[6])) {\n h = x;\n c = w(a, k[8]);\n k = w(a, k[9 + c]);\n k = 2 * c + k;\n c = 0;\n h = Jf[k];\n var n;\n for (n = 0; n < h.length - 1; ++n) c += c + w(a, h[n]);\n c += 3 + (8 << k);\n } else w(a, k[7]) ? (c = 7 + 2 * w(a, 165), c += w(a, 145)) : c = 5 + w(a, 159);\n } else c = w(a, k[4]) ? 3 + w(a, k[5]) : 2;\n k = b[Nc[e]][2];\n } else k = b[Nc[e]][1], c = 1;\n h = Kf[e - 1];\n g[g[g.length - 1] + h] = (w(a, 128) ? -c : c) * d[(h > 0) + 0];\n if (e == 16 || !w(a, k[0])) return e;\n } else k = b[Nc[e]][0];\n if (e == 16) return 16;\n }\n }\n\n function ob(a, b) {\n return ((16777216 * a[0] + 65536 * a[1] + 256 * a[2] + 1 * a[3]) * Lf\n & 4278190080) >> b;\n }\n\n function Mf(a, b) {\n let c = 0;\n if (a == p) return 0;\n if (b == p) return Y(a, 'VP8_STATUS_INVALID_PARAM', 'NULL VP8Io parameter in VP8Decode().');\n if (!a.za && !Hd(a, b)) return 0;\n $(a.za);\n let d;\n if (b.Mb && !b.Mb(b)) Y(a, Nf, 'Frame setup failed'), d = a.a;\n else {\n b.Za && (a.A = 0);\n const e = uc[a.A];\n a.A == 2 ? (a.lb = 0, a.mb = 0) : (a.lb = b.t - e >> 4, a.mb = b.k - e >> 4, a.lb < 0 && (a.lb = 0), a.mb < 0 && (a.mb = 0));\n a.Ya = b.K + 15 + e >> 4;\n a.wb = b.Ka + 15 + e >> 4;\n a.wb > a.Ma && (a.wb = a.Ma);\n a.Ya > a.hb && (a.Ya = a.hb);\n d = L;\n }\n if (c = d == L) {\n if (c) {\n let g;\n b: {\n a.Ja = 0;\n if (a.qb) {\n const k = a.rc;\n if (!WebPWorkerReset(k)) {\n g = Y(a, cb, 'thread initialization failed.');\n break b;\n }\n k.Qd = a;\n k.Rd = a.oa.N;\n k.Ud = FinishRow;\n a.jb = a.A > 0 ? Od : Od - 1;\n } else a.jb = Of;\n g = 1;\n }\n let h;\n if (!(h = !g)) {\n let n;\n b: {\n const l = a.jb;\n const m = a.Ma;\n const t = 4 * m;\n const q = 32 * m;\n const r = m + 1;\n const u = a.A > 0 ? m * (a.qb ? 2 : 1) : 0;\n const v = Pf;\n const C = q * (16 * l + parseInt(3 * uc[a.A] / 2, 10));\n const A = a.Ga != p ? a.P.l * a.P.v : 0;\n const z = t + q + r + u + v + 384 + C + A + Pd;\n if (z != z) n = 0;\n else {\n if (z > a.Gb) {\n a.ib = 0;\n a.Gb = 0;\n if (a.ib == p) {\n n = Y(a, 'VP8_STATUS_OUT_OF_MEMORY', 'no memory during frame initialization.');\n break b;\n }\n a.Gb = z;\n }\n a.dc = 205;\n a.Xc = rc(205, 16 * m);\n a.Sc = rc(205, 8 * m);\n a.Vc = rc(205, 8 * m);\n a.M = u ? ic(Oc, u) : p;\n a.Sd = u ? 0 : p;\n a.oa.ha = 0;\n a.oa.M = a.M;\n $((v & Pd) == 0);\n a.Ea = rc(205, 1 * v);\n a.z = -12851;\n a.H = 16 * m;\n a.r = 8 * m;\n const Ha = uc[a.A];\n const G = Ha * a.H;\n const y = Ha / 2 * a.r;\n a.ca = U(C, 205);\n a.da = +G;\n a.aa = a.ca;\n a.ba = a.da + 16 * l * a.H + y;\n a.ra = a.aa;\n a.sa = a.ba + 8 * l * a.r + y;\n a.Xb = A ? U(A, x) : p;\n a.La = ic(Qd, r);\n a.dc = rc($b, t);\n n = 1;\n }\n }\n h = !n;\n }\n if (h) c = 0;\n else {\n b.width = a.P.l;\n b.height = a.P.v;\n b.w = 0;\n b.y = a.ca;\n b.D = a.da;\n b.c = a.aa;\n b.B = a.ba;\n b.S = a.ra;\n b.C = a.sa;\n b.F = a.H;\n b.Da = a.r;\n b.p = p;\n b.q = p;\n if (!Rd) {\n let B;\n for (B = -255; B <= 255; ++B) va[255 + B] = B < 0 ? -B : B, tc[255 + B] = va[255 + B] >> 1;\n for (B = -1020; B\n <= 1020; ++B) sc[1020 + B] = B < -128 ? -128 : B > 127 ? 127 : B;\n for (B = -112; B <= 112; ++B) oc[112 + B] = B < -16 ? -16 : B > 15 ? 15 : B;\n for (B = -255; B <= 510; ++B) oa[255 + B] = B < 0 ? 0 : B > 255 ? 255 : B;\n Rd = 1;\n }\n mc = pf;\n Pc = qf;\n Qc = nc;\n Rc = rf;\n Sd = uf;\n Td = vf;\n Ud = yf;\n Vd = zf;\n Wd = wf;\n Xd = xf;\n Yd = Af;\n Zd = Bf;\n $d = Dd;\n ae = Ed;\n be = sf;\n ce = tf;\n c = 1;\n }\n }\n if (c) {\n a: {\n for (a.d = 0; a.d < a.Ya; ++a.d) {\n const Qf = a.ic[a.d & a.Hb - 1];\n const db = a;\n const F = db.La[0];\n F.X = 0;\n F.ua = 0;\n jd(db.cc, 0, $b, db.cc.length);\n db.W = (db.A > 0 && db.d >= db.mb && db.d <= db.Ya) + 0;\n for (a.i = 0; a.i < a.Ma; a.i++) {\n var D;\n const H = a;\n const T = Qf;\n const ya = H.o;\n const S = H.La[0];\n const J = H.La[1 + H.i];\n H.Ca.ob && (H.Lb = !w(ya,\n H.R.Ta[0]) ? 0 + w(ya, H.R.Ta[1]) : 2 + w(ya, H.R.Ta[2]));\n J.Nb = H.pc ? w(ya, H.Pc) : 0;\n const O = H.dc;\n O[O.length - 1] = 0 + 4 * H.i;\n const Sc = H.cc;\n H.wa = !w(ya, 145);\n if (H.wa) {\n for (var ga = H.Eb, ja = 0, Z = ca, Z = 0; Z < 4; ++Z) {\n var V = Sc[Z];\n var R;\n for (R = 0; R < 4; ++R) {\n const ta = Rf[O[O[O.length - 1] + R]][V];\n var za = 0;\n do za = Sf[2 * za + w(ya, ta[za])]; while (za > 0);\n V = -za;\n O[O[O.length - 1] + R] = V;\n ga[ja] = V;\n ja++;\n }\n Sc[Z] = V;\n }\n } else {\n var V = w(ya, 156) ? w(ya, 128) ? de : ee : w(ya, 163) ? fe : ge;\n H.Eb[0] = V;\n for (za = 0; za < 4; ++za) O[za + O[O.length - 1]] = V;\n for (za = 0; za < 4; ++za) Sc[za] = V;\n }\n H.Tc = !w(ya, 142) ? ge : !w(ya, 114) ? fe\n : w(ya, 183) ? de : ee;\n if (ya.Ab) D = 0;\n else {\n if (J.Nb) S.X = J.X = 0, H.wa || (S.ua = J.ua = 0), H.ja = 0, H.Oa = 0;\n else {\n let ia = ca;\n let ka = ca;\n var sa = ca;\n var wa = Tf;\n const Aa = H.yb[H.Lb];\n var aa = H.z;\n const ma = H.La[0];\n const ua = U(4, 0);\n const xa = U(4, 0);\n let ea = U(4, 0);\n let pb = U(4, 0);\n let na = 0;\n let Ba = 0;\n var pa = ca;\n let qa = ca;\n let Sa = ca;\n var aa = rc(0, 384);\n if (H.wa) sa = 0, wa = H.R.z[3];\n else {\n const ab = U(16, 0);\n var Ca = J.ua + ma.ua;\n J.ua = ma.ua = (Mc(T, H.R.z[1], Ca, Aa.sb, 0, ab) > 0) + 0;\n for (var sa = 1, wa = H.R.z[0], qb = ab, Ta = aa, La = U(16, s), X = s, X = 0; X < 4; ++X) {\n var Da = qb[0 + X] + qb[12 + X];\n var Ea = qb[4 + X] + qb[8 + X];\n var Fa = qb[4 + X] - qb[8 + X];\n var Ga = qb[0 + X] - qb[12 + X];\n La[0 + X] = Da + Ea;\n La[8\n + X] = Da - Ea;\n La[4 + X] = Ga + Fa;\n La[12 + X] = Ga - Fa;\n }\n for (X = 0; X < 4; ++X) {\n const Oa = Ta[Ta.length - 1];\n const lb = La[0 + 4 * X] + 3;\n var Da = lb + La[3 + 4 * X];\n var Ea = La[1 + 4 * X] + La[2 + 4 * X];\n var Fa = La[1 + 4 * X] - La[2 + 4 * X];\n var Ga = lb - La[3 + 4 * X];\n Ta[Oa + 0] = Da + Ea >> 3;\n Ta[Oa + 16] = Ga + Fa >> 3;\n Ta[Oa + 32] = Da - Ea >> 3;\n Ta[Oa + 48] = Ga - Fa >> 3;\n Ta[Ta.length - 1] += 64;\n }\n aa[aa.length - 1] = 0;\n }\n ea = Nb(vc[J.X & 15]);\n pb = Nb(vc[ma.X & 15]);\n for (qa = 0; qa < 4; ++qa) {\n for (var Eb = pb[qa], pa = 0; pa < 4; ++pa) {\n var Ca = Eb + ea[pa];\n var Ka = Mc(T, wa, Ca, Aa.sc, sa, aa);\n ea[pa] = Eb = (Ka > 0) + 0;\n xa[pa] = (aa[aa[aa.length - 1] + 0] != 0) + 0;\n ua[pa] = (Ka > 1) + 0;\n aa[aa.length\n - 1] += 16;\n }\n pb[qa] = Eb;\n Ba |= ob(xa, 24 - 4 * qa);\n na |= ob(ua, 24 - 4 * qa);\n }\n ia = ob(ea, 24);\n ka = ob(pb, 24);\n ea = Nb(vc[J.X >> 4]);\n pb = Nb(vc[ma.X >> 4]);\n for (Sa = 0; Sa < 4; Sa += 2) {\n for (qa = 0; qa < 2; ++qa) {\n Eb = pb[Sa + qa];\n for (pa = 0; pa < 2; ++pa) Ca = Eb + ea[Sa + pa], Ka = Mc(T, H.R.z[2], Ca, Aa.qc, 0, aa), ea[Sa + pa] = Eb = (Ka > 0) + 0, xa[2 * qa + pa] = (aa[aa[aa.length - 1] + 0] != 0) + 0, ua[2 * qa + pa] = (Ka > 1) + 0, aa[aa.length - 1] += 16;\n pb[Sa + qa] = Eb;\n }\n Ba |= ob(xa, 8 - 2 * Sa);\n na |= ob(ua, 8 - 2 * Sa);\n }\n ia |= ob(ea, 20);\n ka |= ob(pb, 20);\n J.X = ia;\n ma.X = ka;\n H.z = aa;\n H.Oa = na + 0;\n H.ja = na | Ba;\n J.Nb = !H.ja + 0;\n }\n D = !T.Ab;\n }\n if (!D) {\n c = Y(a, 'VP8_STATUS_NOT_ENOUGH_DATA',\n `Premature end-of-file encountered.${a.i} ${a.d}`);\n break a;\n }\n const P = a;\n const da = P.Ea;\n const Ma = Tc;\n const Ua = P.Ea;\n const Va = Uc;\n const Wa = P.Ea;\n const Xa = he;\n if (P.i > 0) {\n for (var ba = ca, ba = -1; ba < 16; ++ba) Ec(da, Ma + ba * f - 4, da, Ma + ba * f + 12);\n for (ba = -1; ba < 8; ++ba) Ec(Ua, Va + ba * f - 4, Ua, Va + ba * f + 4), Ec(Wa, Xa + ba * f - 4, Wa, Xa + ba * f + 4);\n } else {\n for (ba = 0; ba < 16; ++ba) da[Ma + ba * f - 1] = 129;\n for (ba = 0; ba < 8; ++ba) Ua[Va + ba * f - 1] = 129, Wa[Xa + ba * f - 1] = 129;\n P.d > 0 && (da[Ma - 1 - f] = Ua[Va - 1 - f] = Wa[Xa - 1 - f] = 129);\n }\n const Qa = P.Xc;\n const Ra = 16 * +P.i;\n const mb = P.Sc;\n const vb = 8 * +P.i;\n const wb = P.Vc;\n const xb = 8 * +P.i;\n const Za = P.z;\n let fa = ca;\n if (P.d > 0) {\n N(da, Ma - f, Qa, Ra,\n 16), N(Ua, Va - f, mb, vb, 8), N(Wa, Xa - f, wb, xb, 8);\n } else if (P.i == 0) {\n for (i = 0; i < 21; ++i) da[Ma - f - 1 + i] = 127;\n for (i = 0; i < 9; ++i) Ua[Va - f - 1 + i] = 127;\n for (i = 0; i < 9; ++i) Wa[Xa - f - 1 + i] = 127;\n }\n if (P.wa) {\n const Ya = Ma - f + 16;\n P.d > 0 && (P.i >= P.Ma - 1 ? da[Ya + 0] = da[Ya + 1] = da[Ya + 2] = da[Ya + 3] = Qa[Ra + 15] : N(da, Ya + 0, Qa, Ra + 16, 4));\n for (let Fb = 0; Fb < 4; ++Fb) da[Fb + Ya + 4 * f] = da[Fb + Ya + 4 * f] = da[Fb + Ya + 8 * f] = da[Fb + Ya + 12 * f] = da[Fb + Ya + 0];\n for (fa = 0; fa < 16; fa++) {\n var ac = da;\n var bc = Ma + ie[fa];\n Uf[P.Eb[fa]](ac, bc);\n P.Oa & 1 << fa ? mc(Za, 16 * +fa, ac, bc, 0) : P.ja & 1 << fa && Qc(Za, 16 * +fa, ac, bc);\n }\n } else {\n var $a = Fd(P, P.Eb[0]);\n Vf[$a](da, Ma);\n if (P.ja) for (fa = 0; fa < 16; fa++) ac = da, bc = Ma + ie[fa], P.Oa & 1 << fa ? mc(Za, 16 * +fa, ac, bc, 0) : P.ja & 1 << fa && Qc(Za, 16 * +fa, ac, bc);\n }\n $a = Fd(P, P.Tc);\n je[$a](Ua, Va);\n je[$a](Wa, Xa);\n if (P.ja & 983040) {\n const zb = P.z;\n var Pa = 256;\n P.Oa & 983040 ? Pc(zb, Pa, Ua, Va) : Rc(zb, Pa, Ua, Va);\n }\n if (P.ja & 15728640) {\n const Ab = P.z;\n var Pa = 320;\n P.Oa & 15728640 ? Pc(Ab, Pa, Wa, Xa) : Rc(Ab, Pa, Wa, Xa);\n }\n P.d < P.hb - 1 && (N(Qa, Ra, da, Ma + 15 * f, 16), N(mb, vb, Ua, Va + 7 * f, 8), N(wb, xb, Wa, Xa + 7 * f, 8));\n const Q = a;\n if (Q.A > 0) {\n const kb = Q.M[1 + Q.i];\n const Kb = Q.La[1 + Q.i].Nb;\n let ha = Q.Zb[Q.Lb];\n Q.ga.oc && (ha\n += Q.ga.Lc[0], Q.wa && (ha += Q.ga.Gc[0]));\n ha = ha < 0 ? 0 : ha > 63 ? 63 : ha;\n kb.zc = ha;\n Q.ga.kb > 0 && (ha = Q.ga.kb > 4 ? ha >> 2 : ha >> 1, ha > 9 - Q.ga.kb && (ha = 9 - Q.ga.kb));\n kb.yc = ha < 1 ? 1 : ha;\n kb.ab = (!Kb || Q.wa) + 0;\n }\n for (var Ia = ca, Bb = 8 * Q.Ja * Q.r, Qb = Q.ca, Ub = Q.da + 16 * Q.i + 16 * Q.Ja * Q.H, Wb = Q.aa, Xb = Q.ba + 8 * Q.i + Bb, Yb = Q.ra, Zb = Q.sa + 8 * Q.i + Bb, Ia = 0; Ia < 16; ++Ia) N(Qb, Ub + Ia * Q.H, Q.Ea, +Tc + Ia * f, 16);\n for (Ia = 0; Ia < 8; ++Ia) N(Wb, Xb + Ia * Q.r, Q.Ea, +Uc + Ia * f, 8), N(Yb, Zb + Ia * Q.r, Q.Ea, +he + Ia * f, 8);\n }\n const K = a;\n const I = b;\n var cc = 1;\n const eb = K.oa;\n if (K.qb) {\n const nb = K.rc;\n var cc = cc & WebPWorkerSync(nb);\n $(nb.a == OK);\n if (cc) {\n eb.N = I;\n eb.ha = K.Ja;\n eb.d = K.d;\n eb.W = K.W;\n if (eb.W) {\n const hc = eb.M;\n eb.M = K.M;\n K.M = hc;\n }\n WebPWorkerLaunch(nb);\n ++K.Ja == K.jb && (K.Ja = 0);\n }\n } else {\n eb.d = K.d;\n eb.W = K.W;\n b: {\n let Hb = 1;\n const rb = K.oa;\n const ib = uc[K.A];\n const yb = ib * K.H;\n const dc = parseInt(ib / 2) * K.r;\n const Ib = 16 * rb.ha * K.H;\n const jb = 8 * rb.ha * K.r;\n const Jb = K.ca;\n const Lb = K.da - yb + Ib;\n const Ob = K.aa;\n const Pb = K.ba - dc + jb;\n const Rb = K.ra;\n const Sb = K.sa - dc + jb;\n const jc = rb.d == 0;\n const Tb = (rb.d >= K.hb - 1) + 0;\n var ra = 16 * rb.d;\n let fb = 16 * (rb.d + 1);\n if (rb.W) {\n const pc = K;\n let wc = s;\n const kc = pc.oa.d;\n $(pc.oa.W);\n for (wc = pc.lb; wc < pc.wb; ++wc) {\n const Na = pc;\n const ec = wc;\n const Vb = kc;\n const xc = Na.oa;\n const gb = Na.H;\n const fc = xc.M[1 + ec];\n const sb = Na.ca;\n const tb = Na.da + 16 * xc.ha\n * gb + 16 * ec;\n const Gb = fc.zc;\n const hb = fc.yc;\n const Ja = 2 * Gb + hb;\n if (Gb != 0) {\n if (Na.A == 1) ec > 0 && ae(sb, tb, gb, Ja + 4), fc.ab && ce(sb, tb, gb, Ja), Vb > 0 && $d(sb, tb, gb, Ja + 4), fc.ab && be(sb, tb, gb, Ja);\n else {\n const gc = Na.r;\n const yc = Na.aa;\n const zc = Na.ba + 8 * xc.ha * gc + 8 * ec;\n const Ac = Na.ra;\n const Bc = Na.sa + 8 * xc.ha * gc + 8 * ec;\n const ub = Na.Ac.fb ? Gb >= 40 ? 2 : Gb >= 15 ? 1 : 0 : Gb >= 40 ? 3 : Gb >= 20 ? 2 : Gb >= 15 ? 1 : 0;\n ec > 0 && (Td(sb, tb, gb, Ja + 4, hb, ub), Vd(yc, zc, Ac, Bc, gc, Ja + 4, hb, ub));\n fc.ab && (Xd(sb, tb, gb, Ja, hb, ub), Zd(yc, zc, Ac, Bc, gc, Ja, hb, ub));\n Vb > 0 && (Sd(sb, tb, gb, Ja + 4, hb, ub), Ud(yc, zc, Ac, Bc, gc, Ja + 4, hb, ub));\n fc.ab && (Wd(sb, tb, gb,\n Ja, hb, ub), Yd(yc, zc, Ac, Bc, gc, Ja, hb, ub));\n }\n }\n }\n }\n if (I.put) {\n jc ? (I.y = K.ca, I.D = K.da + Ib, I.c = K.aa, I.B = K.ba + jb, I.S = K.ra, I.C = K.sa + jb) : (ra -= ib, I.y = Jb, I.D = Lb, I.c = Ob, I.B = Pb, I.S = Rb, I.C = Sb);\n Tb || (fb -= ib);\n fb > I.K && (fb = I.K);\n if (K.Ga != p && ra < fb && (ra == 0 ? (I.p = qd(K, ra, fb - ra), I.q = 0) : I.q = qd(K, ra, fb - ra), I.p == p)) {\n cc = Y(K, W, 'Could not decode alpha data.');\n break b;\n }\n if (ra < I.k) {\n const qc = I.k - ra;\n var ra = I.k;\n $(!(qc & 1));\n I.D += K.H * qc;\n I.B += K.r * (qc >> 1);\n I.C += K.r * (qc >> 1);\n I.p != p && (I.q += I.width * qc);\n }\n ra < fb && (I.D += I.t, I.B += I.t >> 1, I.C += I.t >> 1, I.p != p && (I.q += I.t),\n I.w = ra - I.k, I.m = I.Ka - I.t, I.h = fb - ra, Hb = I.put(I));\n }\n rb.ha + 1 == K.jb && !Tb && (N(K.ca, K.da - yb, Jb, Lb + 16 * K.H, yb), N(K.aa, K.ba - dc, Ob, Pb + 8 * K.r, dc), N(K.ra, K.sa - dc, Rb, Sb + 8 * K.r, dc));\n cc = Hb;\n }\n }\n if (!cc) {\n c = Y(a, 'VP8_STATUS_USER_ABORT', 'Output aborted.');\n break a;\n }\n }\n let Cb;\n if (!(Cb = a.qb && !WebPWorkerSync(a.rc))) {\n let Db;\n if (Db = a.fc > 0) $(a), $(a.fc > 0), Db = !1;\n Cb = Db;\n }\n c = Cb ? 0 : 1;\n }\n }\n const lc = c;\n b.Pb && b.Pb(b);\n c = lc & 1;\n }\n if (!c) return ke(a), 0;\n a.za = 0;\n return c;\n }\n\n function ke(a) {\n a != p && (a.ib && (a.ib = 0), a.ib = p, a.Gb = 0, a.za = 0);\n }\n\n function Aa(a, b) {\n return a + (1 << b) - 1 >> b;\n }\n\n function hc(a, b, c, d, e) {\n const g = vb[c] + wb[b] >> ea;\n b = xb[b];\n d[e + 0] = ia[a + Za[c] - J];\n d[e + 1] = ia[a + g - J];\n d[e + 2] = ia[a + b - J];\n }\n\n function le(a, b, c, d, e) {\n const g = vb[c] + wb[b] >> ea;\n b = xb[b];\n d[e + 0] = ia[a + Za[c] - J] & 248 | ia[a + g - J] >> 5;\n d[e + 1] = ia[a + g - J] << 3 & 224 | ia[a + b - J] >> 3;\n }\n\n function me(a, b, c, d, e) {\n d[e + 0] = 255;\n hc(a, b, c, d, e + 1);\n }\n\n function ne(a, b, c, d, e) {\n const g = xb[b];\n d[e + 0] = Hb[a + Za[c] - J] << 4 | Hb[a + (vb[c] + wb[b] >> ea) - J];\n d[e + 1] = 15 | Hb[a + g - J] << 4;\n }\n\n function Vc(a, b, c, d, e) {\n const g = Za[c];\n c = vb[c] + wb[b] >> ea;\n d[e + 0] = ia[a + xb[b] - J];\n d[e + 1] = ia[a + c - J];\n d[e + 2] = ia[a + g - J];\n }\n\n function oe(a, b, c, d, e) {\n Vc(a, b, c, d, e);\n d[e + 3] = 255;\n }\n\n function pe(a, b, c, d, e) {\n hc(a, b, c, d, e);\n d[e + 3] = 255;\n }\n\n function ib(a, b, c) {\n a[b] = ((((a[b] & 4278255360) >>> 0) + ((c & 4278255360) >>> 0) & 4278255360) >>> 0 | (a[b] & 16711935) + (c & 16711935) & 16711935) >>> 0;\n }\n\n function ka(a, b) {\n return (((a ^ b) & 4278124286) >>> 1) + ((a & b) >>> 0) >>> 0;\n }\n\n function $a(a) {\n return a < 256 && a > 0 ? a : a <= 0 ? 0 : ~a >> 24 & 255;\n }\n\n function yb(a, b) {\n return $a(a + parseInt((a - b) / 2, 10));\n }\n\n function Wc() {\n return qe;\n }\n\n function Xc(a, b) {\n a &= 255;\n b &= 255;\n a > 127 && (a -= 256);\n b > 127 && (b -= 256);\n return a * b >>> 5;\n }\n\n function re(a,\n b, c, d, e, g, k) {\n var h = s;\n const n = 8 >> a.n;\n const l = a.U;\n const f = a.u;\n if (n < 8) {\n a = (1 << a.n) - 1;\n for (var t = (1 << n) - 1, h = b; h < c; ++h) {\n b = 0;\n for (var q = s, q = 0; q < l; ++q) (q & a) == 0 && (b = d[e++] >> 8 & 255), g[k++] = f[b & t], b >>= n;\n }\n } else for (h = b; h < c; ++h) for (q = 0; q < l; ++q) g[k++] = f[d[e++] >> 8 & 255];\n }\n\n function se(a, b, c, d, e) {\n for (c = b + c; b < c;) {\n const g = a[b++];\n d[e++] = g >> 16 & 255;\n d[e++] = g >> 8 & 255;\n d[e++] = g >> 0 & 255;\n d[e++] = g >> 24 & 255;\n }\n }\n\n function te(a, b, c, d, e) {\n for (c = b + c; b < c;) {\n const g = a[b++];\n d[e++] = g >> 16 & 240 | g >> 12 & 15;\n d[e++] = g >> 0 & 240 | g >> 28 & 15;\n }\n }\n\n function Ib(a, b, c, d, e) {\n for (c = b + c; b < c;) {\n const g = a[b++];\n d[e++] = g >> 24 & 255;\n d[e++] = g >> 16 & 255;\n d[e++] = g >> 8 & 255;\n d[e++] = g >> 0 & 255;\n }\n }\n\n function ue(a, b, c, d) {\n if (T(a, 8) != ve) return 0;\n b[0] = T(a, we) + 1;\n c[0] = T(a, we) + 1;\n d[0] = T(a, 1);\n T(a, Wf);\n return 1;\n }\n\n function xe(a, b) {\n let c = s;\n if (a < 4) return a + 1;\n c = a - 2 >> 1;\n return (2 + (a & 1) << c) + T(b, c) + 1;\n }\n\n function Oa(a, b) {\n if (b.Q + 8 > b.ya) {\n var c = a.Y;\n var d = 0;\n for ($(c != p); c[d].s != 0;) {\n var e = c;\n var g = b;\n const k = g.T >> g.g & 1;\n g.L ? g.fa = 1 : (++g.g, g.g >= 8 && Sb(g), g.Q == g.ya && g.g == 32 && (g.L = 1));\n d = d + e[d].s + k;\n }\n return c[d].kc;\n }\n c = a.Y;\n d = 0;\n for ($(c != p); c[d].s != 0;) {\n e = c, g = b.T >> b.g & 1, ++b.g, d = d\n + e[d].s + g;\n }\n return c[d].kc;\n }\n\n function zb(a, b) {\n if (a != p) for (var c = s, d = s, c = 0; c < b; ++c) for (var e = a[c].va, d = 0; d < Yc; ++d) ja(e[d]);\n }\n\n function ye(a, b, c) {\n b = a.eb == 0 ? 0 : a.ac[a.bd + a.Ec * (c >> a.eb) + (b >> a.eb)];\n $(b < a.hc);\n return a.Db[+b];\n }\n\n function ze(a, b, c, d) {\n let e = a.Na;\n const g = a.O;\n const k = g + b;\n var h = c;\n var f = d;\n d = a.Xa;\n c = a.vb;\n for (N(d, c, h, f, a.l * b); e-- > 0;) {\n b = a.nc[e];\n let l = g;\n var m = k;\n var t = h;\n var q = f;\n var f = d;\n var h = c;\n $(l < m);\n $(m <= b.Vb);\n switch (b.Qc) {\n case Ae:\n t = 0;\n for (b = h + (m - l) * b.U; h < b;) {\n var m = f;\n var q = h;\n var r = m[q] >> 8 & 255;\n var u = (m[q] & 16711935) >>> 0;\n var u = u + (r << 16 | r);\n var u = u & 16711935;\n f[h++] = ((m[q] & 4278255360)\n >>> 0 | u) >>> 0;\n l == 32 && t++;\n }\n break;\n case Be:\n var v = b;\n var C = l;\n var t = m;\n var q = f;\n var r = h;\n var u = v.U;\n if (C == 0) {\n var A = s;\n ib(q, r, qe);\n for (A = 1; A < u; ++A) ib(q, r + A, q[r + A - 1]);\n r += u;\n ++C;\n }\n for (var z = (1 << v.n) - 1, Ha = Aa(u, v.n), w = v.u, v = +(C >> v.n) * Ha; C < t;) {\n var y = w;\n var B = v;\n let G = p;\n ib(q, r, q[r - u + 0]);\n G = Ce[y[B++] >> 8 & 15];\n for (A = 1; A < u; ++A) {\n let F = E;\n (A & z) == 0 && (G = Ce[y[B++] >> 8 & 15]);\n F = G(q[r + A - 1], q, r + A - u);\n ib(q, r + A, F);\n }\n r += u;\n ++C;\n (C & z) == 0 && (v += Ha);\n }\n m != b.Vb && (b = b.U, N(f, h - b, f, h + (m - l - 1) * b, b));\n break;\n case De:\n t = b.U;\n q = (1 << b.n) - 1;\n r = Aa(t, b.n);\n u = b.u;\n for (b = +(l >> b.n) * r; l < m;) {\n A = u;\n C = b;\n z = M(Xf);\n Ha = s;\n for (Ha = 0; Ha < t; ++Ha) (Ha & q) == 0 && (w = A[C++], v = z, v.Cc = w >> 0 & 255, v.Bc = w >> 8 & 255, v.Kc = w >> 16 & 255), w = f[h + Ha], v = w >>> 8, y = w >>> 16, B = w, y += Xc(z.Cc, v), y &= 255, B += Xc(z.Bc, v), B += Xc(z.Kc, y), B &= 255, f[h + Ha] = (w & 4278255360 | y << 16 | B) >>> 0;\n h += t;\n ++l;\n (l & q) == 0 && (b += r);\n }\n break;\n case Ee:\n t == f && b.n > 0 ? (t = (m - l) * Aa(b.U, b.n), q = h + (m - l) * b.U - t, memmove(f, q, f, h, t), re(b, l, m, f, q, f, h)) : re(b, l, m, t, q, f, h);\n }\n h = d;\n f = c;\n }\n }\n\n function Yf(a, b) {\n var c = a.V;\n var d = a.Ha + a.l * a.O;\n var e = b - a.O;\n if (!(e <= 0)) {\n ze(a, e, c, d);\n var g = a.N;\n var c = a.Xa;\n let k = [a.vb];\n var d = a.O;\n var e = b;\n var h = k;\n var f = g.width;\n $(d < e);\n $(g.t < g.Ka);\n e > g.K && (e = g.K);\n if (d < g.k) {\n var l = g.k - d;\n var d = g.k;\n h[0] += f * l;\n }\n d >= e ? d = 0 : (h[0] += g.t, g.w = d - g.k, g.m = g.Ka - g.t, g.h = e - d, d = 1);\n if (d) {\n k = k[0];\n d = a.Ib;\n e = g.width;\n if (d.J < ua) {\n var m = d.c.RGBA;\n var h = m.ma;\n let t = m.Sa + a.xa * m.f;\n if (g.I) c = EmitRescaledRows(a, c, k, e, g.h, h, t, m.f);\n else {\n for (var f = d.J, l = g.m, g = g.h, m = m.f, q = g; q-- > 0;) {\n const r = c;\n let u = k;\n let v = l;\n const C = h;\n let A = t;\n switch (f) {\n case Qa:\n for (v = u + v; u < v;) {\n var z = r[u++];\n C[A++] = z >> 16 & 255;\n C[A++] = z >> 8 & 255;\n C[A++] = z >> 0 & 255;\n }\n break;\n case jb:\n se(r, u, v, C, A);\n break;\n case Ob:\n se(r, u, v, C, A);\n WebPApplyAlphaMultiply(C, 0, v,\n 1, 0);\n break;\n case Zc:\n for (v = u + v; u < v;) z = r[u++], C[A++] = z >> 0 & 255, C[A++] = z >> 8 & 255, C[A++] = z >> 16 & 255;\n break;\n case Pa:\n Ib(r, u, v, C, A);\n break;\n case Pb:\n Ib(r, u, v, C, A);\n WebPApplyAlphaMultiply(C, 0, v, 1, 0);\n break;\n case Ab:\n Ib(r, u, v, C, A);\n break;\n case Bb:\n Ib(r, u, v, C, A);\n WebPApplyAlphaMultiply(C, 1, v, 1, 0);\n break;\n case kb:\n te(r, u, v, C, A);\n break;\n case Qb:\n te(r, u, v, C, A);\n WebPApplyAlphaMultiply4444(C, v, 1, 0);\n break;\n case Fe:\n for (v = u + v; u < v;) z = r[u++], C[A++] = z >> 16 & 248 | z >> 13 & 7, C[A++] = z >> 5 & 224 | z >> 3 & 31;\n break;\n default:\n $(0);\n }\n k += e;\n t += m;\n }\n c = g;\n }\n a.xa += c;\n } else {\n a.xa = g.I ? EmitRescaledRowsYUVA(a, c, k, e, g.h) : EmitRowsYUVA(a, c, k, e, g.m, g.h);\n }\n $(a.xa <= d.height);\n }\n a.O = b;\n $(a.O <= a.v);\n }\n }\n\n function lc(a, b, c, d, e, g) {\n let k = 1;\n let h = 0;\n let f = 0;\n const l = a.o;\n const m = a.cb;\n let t = m.Db;\n let q = c;\n let r = c;\n c += d * e;\n e = Ba + Ge;\n const u = e + m.xb;\n const v = m.xb > 0 ? m.Yb : p;\n const C = m.Dc;\n let A = !1;\n $(t != p);\n for (; !l.L && q < c;) {\n let z = s;\n A || ((h & C) == 0 && (t = ye(m, h, f)), Da(l), z = Oa(t.va[Zf], l));\n if (z < Ba || A) {\n if (!A) {\n var w = k = A = s;\n var y = s;\n Da(l);\n A = Oa(t.va[$f], l);\n k = z;\n Da(l);\n w = Oa(t.va[ag], l);\n Da(l);\n y = Oa(t.va[bg], l);\n b[q] = (y << 24 >>> 0) + (A << 16) + (k << 8) + w;\n }\n A = !1;\n ++q;\n ++h;\n if (h >= d && (h = 0, ++f, g != p && f\n % $c == 0 && g(a, f), v != p)) for (; r < q;) k = b[r++], v.ea[ad * k >>> v.bb] = k;\n } else if (z < e) {\n w = w = s;\n k = xe(z - Ba, l);\n z = Oa(t.va[cg], l);\n Da(l);\n w = xe(z, l);\n w > He ? w -= He : (z = dg[w - 1], z = (z >> 4) * d + (8 - (z & 15)), w = z >= 1 ? z : 1);\n z = s;\n for (z = 0; z < k; ++z) b[q + z] = b[q + z - w];\n q += k;\n for (h += k; h >= d;) h -= d, ++f, g != p && f % $c == 0 && g(a, f);\n if (q < c && (t = ye(m, h, f), v != p)) for (; r < q;) k = b[r++], v.ea[ad * k >>> v.bb] = k;\n } else if (z < u) {\n A = z - e;\n for ($(v != p); r < q;) z = b[r++], v.ea[ad * z >>> v.bb] = z;\n z = b;\n w = q;\n y = v;\n $(A <= -1 >>> y.bb);\n z[w] = y.ea[A];\n A = !0;\n continue;\n }(k = !l.fa) || End;\n }\n g != p && g(a, f);\n l.fa || !k || l.L && q < c ? (k = 0, a.a = !l.L ? W : Ie) : q == c && (a.Ob = Db);\n return k;\n }\n\n function bd(a) {\n $(a);\n a.ac = p;\n zb(a.Db, a.hc);\n const b = a.Yb;\n b != p && (b.ea = p, b.ea = p);\n $(a);\n }\n\n function sd() {\n const a = M(eg);\n if (a == p) return p;\n a.a = L;\n a.Wa = cd;\n a.Ob = cd;\n return a;\n }\n\n function sa(a) {\n let b = s;\n if (a != p) {\n bd(a.cb);\n a.V = p;\n a.V = p;\n for (b = 0; b < a.Na; ++b) {\n const c = a.nc[b];\n c.u = p;\n c.u = p;\n }\n a.Na = 0;\n a.Ub = 0;\n a.Mc = p;\n a.Mc = p;\n a.Ib = p;\n }\n }\n\n function Ka(a, b, c, d, e) {\n var g = 1;\n a = [a];\n b = [b];\n for (var k = d.o, h = d.cb, f = p, l = p, l = 0; ;) {\n if (c) {\n for (; g && T(k, 1);) {\n var m = a;\n var t = b;\n var q = d;\n var r = 1;\n var u = q.o;\n var g = q.nc[q.Na];\n var v = T(u, 2);\n if (q.Ub & 1 << v) g = 0;\n else {\n q.Ub\n |= 1 << v;\n g.Qc = v;\n g.U = m[0];\n g.Vb = t[0];\n g.u = [p];\n g.b = 0;\n ++q.Na;\n $(q.Na <= Je);\n switch (v) {\n case Be:\n case De:\n g.n = T(u, 3) + 2;\n r = Ka(Aa(g.U, g.n), Aa(g.Vb, g.n), 0, q, g.u);\n break;\n case Ee:\n t = T(u, 8) + 1;\n r = t > 16 ? 0 : t > 4 ? 1 : t > 2 ? 2 : 3;\n m[0] = Aa(g.U, r);\n g.n = r;\n if (m = r = Ka(t, 1, 0, q, g.u)) {\n if (m = t, q = g, r = s, t = 1 << (8 >>> q.n) >>> 0, u = Array(t), u == p) m = 0;\n else {\n var v = q.u[0];\n var C = q.b;\n u[0] = q.u[0][q.b + 0];\n for (r = 1; r < m; ++r) u[r] = ((((v[C + r] & 4278255360) >>> 0) + ((u[r - 1] & 4278255360) >>> 0) & 4278255360) >>> 0 | (v[C + r] & 16711935) + (u[r - 1] & 16711935) & 16711935) >>> 0;\n for (; r < t; ++r) u[r] = 0;\n q.u[0] = p;\n q.b = p;\n q.u[0] = u;\n q.b = 0;\n m = 1;\n }\n }\n r = m;\n break;\n case Ae:\n break;\n default:\n $(0);\n }\n g.u = g.u[0];\n g = r;\n }\n }\n }\n if (g && T(k, 1) && (l = T(k, 4), g = l >= 1 && l <= fg, !g)) {\n d.a = W;\n break;\n }\n if (g) {\n a: {\n var g = d;\n var A = a[0];\n var z = b[0];\n var m = l;\n var C = v = s;\n var C = g.o;\n var q = g.cb;\n var r = [p];\n var t = p;\n var u = 1;\n if (c && T(C, 1)) {\n var v = T(C, 3) + 2;\n var A = Aa(A, v);\n var w = Aa(z, v);\n var z = A * w;\n if (!Ka(A, w, 0, g, r)) {\n g.a = W;\n zb(t, u);\n g = 0;\n break a;\n }\n r = r[0];\n q.eb = v;\n for (v = 0; v < z; ++v) A = r[v] >>> 8 & 65535, r[v] = A, A >= u && (u = A + 1);\n }\n if (C.fa) zb(t, u), g = 0;\n else if ($(u <= 65536), t = ld(u, gg), t == p) g.a = cb, zb(t, u), g = 0;\n else {\n for (v = 0; v < u; ++v) {\n z = t[v].va;\n for (C = 0; C < Yc; ++C) {\n A = hg[C];\n C == 0 && m > 0 && (A += 1 << m);\n b: {\n const y = A;\n var A = g;\n const G = z[+C];\n var B = 0;\n var w = A.o;\n if (T(w, 1)) {\n var F = Array(2);\n var D = Array(2);\n var L = Array(2);\n var B = T(w, 1) + 1;\n var J = T(w, 1);\n F[0] = T(w, J == 0 ? 1 : 8);\n D[0] = 0;\n L[0] = B - 1;\n B == 2 && (F[1] = T(w, 8), D[1] = 1, L[1] = B - 1);\n c: {\n var J = 0;\n var H = s;\n $(G != p);\n $(L != p);\n $(D != p);\n $(F != p);\n if (nd(G, B)) {\n for (H = 0; H < B; ++H) {\n if (D[H] != pd) {\n if (F[H] < 0 || F[H] >= y) {\n (J = J && ma(G)) || ja(G);\n B = J;\n break c;\n }\n if (!jc(G, F[H], D[H], L[H])) {\n (J = J && ma(G)) || ja(G);\n B = J;\n break c;\n }\n }\n }(J = (J = 1) && ma(G)) || ja(G);\n B = J;\n } else B = 0;\n }\n } else {\n B = s;\n D = [];\n F = T(w, 4) + 4;\n if (F > Ke) {\n A.a = W;\n A = 0;\n break b;\n }\n L = Array(y);\n if (L == p) {\n A.a = cb;\n A = 0;\n break b;\n }\n for (B = 0; B < F; ++B) D[ig[B]] = T(w, 3);\n c: {\n var B = A;\n var O = D;\n var D = y;\n var F = L;\n var J = 0;\n var H = B.o;\n let S = s;\n let V = s;\n let Y = jg;\n const Z = M(Le);\n if (od(Z, O, Ke)) {\n if (T(H, 1)) {\n if (S = 2 + 2 * T(H, 3), V = 2 + T(H, S), V > D) {\n B.a = W;\n ja(Z);\n B = J;\n break c;\n }\n } else V = D;\n for (S = 0; S < D;) {\n var R = s;\n if (V-- == 0) break;\n Da(H);\n R = Oa(Z, H);\n if (R < Me) F[S++] = R, R != 0 && (Y = R);\n else {\n var O = R == kg;\n var R = R - Me;\n const ea = lg[R];\n var R = T(H, mg[R]) + ea;\n if (S + R > D) {\n B.a = W;\n ja(Z);\n B = J;\n break c;\n }\n for (O = O ? Y : 0; R-- > 0;) F[S++] = O;\n }\n }\n J = 1;\n ja(Z);\n B = J;\n } else B.a = W, B = 0;\n }\n B && (B = od(G, L, y));\n }(B = B && !w.fa) ? A = 1 : (A.a = W, A = 0);\n }\n if (!A) {\n zb(t, u);\n g = 0;\n break a;\n }\n }\n }\n q.ac = r;\n q.hc = u;\n q.Db = t;\n g = 1;\n }\n }\n }\n if (!g) {\n d.a = W;\n break;\n }\n if (l > 0) {\n if (h.xb = 1 << l, m = h.Yb, q = 1 << l, $(m != p), $(l > 0), m.ea = U(q, 0), m.ea == p ? l = 0 : (m.bb = 32 - l, l = 1), !l) {\n d.a = cb;\n g = 0;\n break;\n }\n } else h.xb = 0;\n l = d;\n m = a[0];\n q = b[0];\n r = l.cb;\n t = r.eb;\n l.l = m;\n l.v = q;\n r.Ec = Aa(m, t);\n r.Dc = t == 0 ? -1 : (1 << t) - 1;\n if (c) {\n d.Ob = Cb;\n break;\n }\n f = Array(a * b);\n l = 0;\n if (f == p) {\n d.a = cb;\n g = 0;\n break;\n }\n g = (g = lc(d, f, l, a, b, p)) && !k.fa;\n break;\n }\n g ? (e != p ? e[0] = f : ($(f == p), $(c)), c || bd(h)) : (bd(h), d.a == W && d.o.L && (d.a = Ie));\n return g;\n }\n\n function xd(a, b) {\n const c = a.l * a.v;\n const d = c + b + b * $c;\n $(a.l <= b);\n a.V = Array(d);\n a.Ha = 0;\n if (a.V == p) {\n return a.Xa = p, a.a = cb, 0;\n }\n a.Xa = a.V;\n a.vb = a.Ha + c + b;\n return 1;\n }\n\n function mf(a, b) {\n var c = b - a.O;\n var d = a.V;\n var e = a.Ha + a.l * a.O;\n if (!(c <= 0)) {\n ze(a, c, d, e);\n for (var e = a.N.width, c = e * c, d = a.N.ka, e = a.N.fd + e * a.O, g = a.Xa, k = a.vb, h = s, h = 0; h < c; ++h) d[e + h] = g[k + h] >>> 8 & 255;\n a.O = a.xa = b;\n }\n }\n\n function ng(a, b) {\n const c = [s];\n const d = [s];\n const e = [s];\n if (a == p) return 0;\n if (b == p) return a.a = ta, 0;\n a.N = b;\n a.a = L;\n Rb(a.o, b.data, b.b, b.e);\n if (!ue(a.o, c, d, e)) return a.a = W, sa(a), $(a.a != L), 0;\n a.Ob = cd;\n b.width = c[0];\n b.height = d[0];\n a.Wa = Cb;\n return !Ka(c[0], d[0], 1, a, p) ? (sa(a), $(a.a != L), 0) : 1;\n }\n\n function og(a) {\n let b = p;\n let c = p;\n if (a == p) return 0;\n b = a.N;\n $(b != p);\n c = b.ka;\n $(c != p);\n a.Ib = c.j;\n a.Hc = c.Hc;\n $(a.Ib != p);\n if (!Ne(c.Qa, b, Pa)) return a.a = ta, sa(a), $(a.a != L), 0;\n if (!xd(a, b.width) || b.I && !AllocateAndInitRescaler(a, b)) return sa(a), $(a.a != L), 0;\n a.Wa = Db;\n if (!lc(a, a.V, a.Ha, a.l, a.v, Yf)) return sa(a), $(a.a != L), 0;\n c.ec = a.xa;\n sa(a);\n return 1;\n }\n\n function wa(a, b) {\n return a < 0 ? 0 : a > b ? b : a;\n }\n\n function ab(a, b, c, d, e, g, k, h, f, l, m, t, q, r, u, v, C, w, z) {\n let y; const G = C - 1 >> 1;\n let F = e[g + 0] | k[h + 0] << 16;\n let B = f[l + 0] | m[t + 0] << 16;\n if (a) {\n var D = 3 * F + B + 131074 >> 2;\n w(a[b + 0], D & 255, D >> 16, q, r);\n }\n c && (D = 3 * B + F + 131074 >> 2, w(c[d + 0], D & 255, D >> 16, u, v));\n for (y = 1; y <= G; ++y) {\n const J = e[g + y] | k[h + y] << 16;\n const L = f[l + y] | m[t + y] << 16;\n var D = F + J + B + L + 524296;\n const O = D + 2 * (J + B) >> 3;\n const H = D + 2 * (F + L) >> 3;\n a && (D = O + F >> 1, F = H + J >> 1, w(a[b + 2 * y - 1], D & 255, D >> 16, q, r + (2 * y - 1) * z), w(a[b + 2 * y - 0], F & 255, F >> 16, q, r + (2 * y - 0) * z));\n c && (D = H + B >> 1, F = O + L >> 1, w(c[d + 2 * y - 1], D & 255, D >> 16, u, v + (2 * y - 1) * z), w(c[d + 2 * y + 0], F & 255, F >> 16, u, v + (2 * y + 0) * z));\n F = J;\n B = L;\n }\n C & 1 || (a && (D = 3 * F + B + 131074 >> 2, w(a[b + C - 1], D & 255, D >> 16, q, r + (C - 1) * z)), c && (D = 3 * B + F + 131074 >> 2, w(c[d + C - 1], D & 255, D >> 16, u, v + (C - 1) * z)));\n }\n\n function pg(a,\n b, c, d, e, g, k, h, f, l, m, t, q, r, u, v, w) {\n ab(a, b, c, d, e, g, k, h, f, l, m, t, q, r, u, v, w, hc, 3);\n }\n\n function qg(a, b, c, d, e, g, k, h, f, l, m, t, q, r, u, v, w) {\n ab(a, b, c, d, e, g, k, h, f, l, m, t, q, r, u, v, w, Vc, 3);\n }\n\n function Oe(a, b, c, d, e, g, k, h, f, l, m, t, q, r, u, v, w) {\n ab(a, b, c, d, e, g, k, h, f, l, m, t, q, r, u, v, w, pe, 4);\n }\n\n function Pe(a, b, c, d, e, g, k, h, f, l, m, t, q, r, u, v, w) {\n ab(a, b, c, d, e, g, k, h, f, l, m, t, q, r, u, v, w, oe, 4);\n }\n\n function Qe(a, b, c, d, e, g, k, h, f, l, m, t, q, r, u, v, w) {\n ab(a, b, c, d, e, g, k, h, f, l, m, t, q, r, u, v, w, me, 4);\n }\n\n function Re(a, b, c, d, e, g, k, h, f, l, m, t, q, r, u, v, w) {\n ab(a, b, c, d, e, g, k, h,\n f, l, m, t, q, r, u, v, w, ne, 2);\n }\n\n function rg(a, b, c, d, e, g, k, h, f, l, m, t, q, r, u, v, w) {\n ab(a, b, c, d, e, g, k, h, f, l, m, t, q, r, u, v, w, le, 2);\n }\n\n function Ca(a, b, c, d, e, g, k, h, f, l, m, t, q, r, u) {\n let v;\n for (v = 0; v < q - 1; v += 2) r(a[b + 0], e[g + 0], k[h + 0], f, l), r(a[b + 1], e[g + 0], k[h + 0], f, l + u), r(c[d + 0], e[g + 0], k[h + 0], m, t), r(c[d + 1], e[g + 0], k[h + 0], m, t + u), b += 2, d += 2, g++, h++, l += 2 * u, t += 2 * u;\n v == q - 1 && (r(a[b + 0], e[g + 0], k[h + 0], f, l), r(c[d + 0], e[g + 0], k[h + 0], m, t));\n }\n\n function Se(a, b, c, d, e, g, k, f, n, l, m, t, q) {\n Ca(a, b, c, d, e, g, k, f, n, l, m, t, q, pe, 4);\n }\n\n function Te(a, b, c, d, e, g, k, f, n, l,\n m, t, q) {\n Ca(a, b, c, d, e, g, k, f, n, l, m, t, q, oe, 4);\n }\n\n function Ue(a, b, c, d, e, g, k, f, n, l, m, t, q) {\n Ca(a, b, c, d, e, g, k, f, n, l, m, t, q, me, 4);\n }\n\n function Ve(a, b, c, d, e, g, k, f, n, l, m, t, q) {\n Ca(a, b, c, d, e, g, k, f, n, l, m, t, q, ne, 2);\n }\n\n function sg(a, b, c, d, e, g) {\n for (; e-- > 0;) {\n for (var k = a, f = b + (c ? 1 : 0), n = a, l = b + (c ? 0 : 3), m = s, m = 0; m < d; ++m) {\n var t = n[l + 4 * m];\n if (t != 255) {\n var t = 32897 * t;\n let q = k;\n let r = f + 4 * m + 0;\n k[f + 4 * m + 0] * t >>> 23;\n q[r] = ca;\n q = k;\n r = f + 4 * m + 1;\n k[f + 4 * m + 1] * t >>> 23;\n q[r] = ca;\n q = k;\n r = f + 4 * m + 2;\n k[f + 4 * m + 2] * t >>> 23;\n q[r] = ca;\n }\n }\n b += g;\n }\n }\n\n function tg(a, b) {\n const c = b.j.c.Va;\n const d = c.y;\n const e = c.D + a.w * c.F;\n const g = c.c;\n const k = c.B + (a.w >> 1) * c.nb;\n const f = c.S;\n const n = c.C + (a.w >> 1) * c.rb;\n const l = a.m;\n const m = a.h;\n const t = parseInt((l + 1) / 2, 10);\n const q = parseInt((m + 1) / 2, 10);\n let r;\n for (r = 0; r < m; ++r) N(d, e + r * c.F, a.y, a.D + r * a.F, l);\n for (r = 0; r < q; ++r) N(g, k + r * c.nb, a.c, a.B + r * a.Da, t), N(f, n + r * c.rb, a.S, a.C + r * a.Da, t);\n return a.h;\n }\n\n function ug(a, b) {\n var c = b.j;\n const d = c.c.RGBA;\n const e = d.ma;\n let g = d.Sa + a.w * d.f;\n const k = a.y;\n let f = a.D;\n const n = a.c;\n let l = a.B;\n const m = a.S;\n let t = a.C;\n var c = vg[c.J];\n const q = a.m;\n const r = a.h - 1;\n let u;\n for (u = 0; u < r; u += 2) c(k, f, k, f + a.F, n, l, m, t, e, g, e, g + d.f, q), f += 2 * a.F, l += a.Da, t += a.Da, g += 2 * d.f;\n u == r && c(k, f, k, f, n, l, m, t, e, g, e, g, q);\n return a.h;\n }\n\n function wg(a, b) {\n let c = a.h;\n const d = b.j.c.RGBA;\n const e = d.ma;\n let g = d.Sa + a.w * d.f;\n const k = V[b.j.J];\n const f = a.y;\n let n = a.D;\n const l = a.c;\n let m = a.B;\n const t = a.S;\n let q = a.C;\n let r = b.Qb;\n let u = b.Rb;\n let v = b.lc;\n let w = b.mc;\n let A = a.w;\n const z = a.w + a.h;\n const y = a.m;\n const D = parseInt((y + 1) / 2, 10);\n A == 0 ? k(p, p, f, n, l, m, t, q, l, m, t, q, p, p, e, g, y) : (k(b.Sb, b.Tb, f, n, r, u, v, w, l, m, t, q, e, g - d.f, e, g, y), ++c);\n for (; A + 2 < z; A += 2) r = l, u = m, v = t, w = q, m += a.Da, q += a.Da, g += 2 * d.f, n += 2 * a.F, k(f, n - a.F, f, n, r, u, v, w, l, m, t, q, e, g - d.f, e, g, y);\n n += a.F;\n a.k + z < a.K ? (N(b.Sb, b.Tb, f, n, 1 * y), N(b.Qb, b.Rb, l, m, 1 * D), N(b.lc, b.mc, t, q, 1 * D), c--) : z & 1 || k(f, n, p, p, l, m, t, q, l, m,\n t, q, e, g + d.f, p, p, y);\n return c;\n }\n\n function xg(a, b) {\n var c = a.p;\n var d = a.q;\n const e = b.j.c.Va;\n const g = a.m;\n const f = a.h;\n const h = e.p;\n let n = e.q + a.w * e.Fa;\n var c = a.p;\n var d = a.q;\n let l = s;\n if (c != p) for (l = 0; l < f; ++l) N(h, n, c, d, 1 * g), d += a.width, n += e.Fa;\n else if (e.p != p) for (l = 0; l < f; ++l) jd(h, n, 255, g), n += e.Fa;\n return 0;\n }\n\n function We(a, b, c) {\n let d = a.w;\n c[0] = a.h;\n a.Bb && (d == 0 ? --c[0] : (--d, b[0] -= a.width), a.k + a.w + a.h == a.K && (c[0] = a.K - a.k - d));\n return d;\n }\n\n function yg(a, b) {\n const c = a.p;\n var d = [a.q];\n if (c != p) {\n for (var e = a.m, g = b.j.J, f = g == Ab || g == Bb, h = b.j.c.RGBA, n = [s], l = We(a, d, n), d = d[0], m = h.ma, l = h.Sa + l * h.f,\n t = l + (f ? 0 : 3), q = 255, r = s, u = s, u = 0; u < n[0]; ++u) {\n for (r = 0; r < e; ++r) {\n const v = c[d + r];\n m[t + 4 * r] = v;\n q &= v;\n }\n d += a.width;\n t += h.f;\n }\n q != 255 && F(g) && WebPApplyAlphaMultiply(m, l, f, e, n, h.f);\n }\n return 0;\n }\n\n function zg(a, b) {\n const c = a.p;\n var d = [a.q];\n if (c != p) {\n const e = a.m;\n const g = b.j.J;\n const f = b.j.c.RGBA;\n const h = [s];\n var n = We(a, d, h);\n var d = d[0];\n const l = f.ma;\n var n = f.Sa + n * f.f;\n let m = n + 1;\n let t = 15;\n let q = s;\n for (j = 0; j < h[0]; ++j) {\n for (q = 0; q < e; ++q) {\n const r = c[d + q] >> 4;\n l[m + 2 * q] = l[m + 2 * q] & 240 | r;\n t &= r;\n }\n d += a.width;\n m += f.f;\n }\n t != 15 && F(g) && WebPApplyAlphaMultiply4444(l, n, e, h, f.f);\n }\n return 0;\n }\n\n function vd(a) {\n let b = a.ka;\n const c = b.j.J;\n const d = c\n < ua;\n const e = c == jb || c == Pa || c == Ab || c == kb || c == Ra || F(c);\n b.memory = p;\n b.$a = p;\n b.zb = p;\n b.ad = p;\n if (!Ne(b.Qa, a, e ? ua : Ra)) return 0;\n if (a.I) {\n if (!(d ? InitRGBRescaler(a, b) : InitYUVRescaler(a, b))) return alert('memory error #1'), 0;\n } else {\n if (d) {\n if (b.$a = ug, a.Bb) {\n const g = a.m + 1 >> 1;\n const f = a.m + 2 * g;\n let h; const\n n = [];\n for (h = 0; h < f; ++h) n.push(205);\n n.push(0);\n b.memory = n;\n if (b.memory == p) return alert('memory error #2'), 0;\n b.Sb = b.memory;\n b.Tb = 0;\n b.Qb = b.Sb;\n b.Rb = b.Tb + a.m;\n b.lc = b.Qb;\n b.mc = b.Rb + g;\n b.$a = wg;\n V[Qa] = pg;\n V[jb] = Oe;\n V[Zc] = qg;\n V[Pa] = Pe;\n V[Ab] = Qe;\n V[kb] = Re;\n V[Fe] = rg;\n }\n } else {\n b.$a = tg;\n }\n e && (F(c) && (WebPApplyAlphaMultiply = sg, V[Ob] = Oe, V[Pb] = Pe, V[Bb] = Qe, V[Qb] = Re), b.zb = c == kb || c == Qb ? zg : d ? yg : xg);\n }\n if (d && !Xe) {\n for (a = 0; a < 256; ++a) Za[a] = 89858 * (a - 128) + Jb >> ea, wb[a] = -22014 * (a - 128) + Jb, vb[a] = -45773 * (a - 128), xb[a] = 113618 * (a - 128) + Jb >> ea;\n for (a = J; a < dd; ++a) b = 76283 * (a - 16) + Jb >> ea, ia[a - J] = wa(b, 255), Hb[a - J] = wa(b + 8 >> 4, 15);\n Xe = 1;\n }\n return 1;\n }\n\n function ud(a) {\n const b = a.ka;\n let c = a.m;\n const d = a.h;\n $(!(a.w & 1));\n if (c <= 0 || d <= 0) return 0;\n c = b.$a(a, b);\n b.ec += c;\n b.zb && b.zb(a, b);\n return 1;\n }\n\n function wd(a) {\n a = a.ka;\n a.memory = '';\n a.memory = p;\n }\n\n function ed(a,\n b) {\n return a[b + 0] | a[b + 1] << 8 | a[b + 2] << 16;\n }\n\n function Kb(a, b) {\n return (ed(a, b) | a[b + 3] << 24) >>> 0;\n }\n\n function Ye(a, b, c, d, e, g, f) {\n var h = 0;\n var n = [0];\n var l = 'VP8StatusCode';\n const m = M(Gc);\n if (a == p || c[0] < Lb) return Z;\n m.data = a;\n m.b = [b[0]];\n m.e = [c[0]];\n m.na = [m.na];\n a: {\n h = m.na;\n $(a != p);\n $(c != p);\n $(h != p);\n h[0] = 0;\n if (c[0] >= Lb && !kd(a, b[0], 'RIFF', O)) {\n if (kd(a, b[0] + 8, 'WEBP', O)) {\n l = W;\n break a;\n }\n var t = Kb(a, b[0] + O);\n if (t < O + R) {\n l = W;\n break a;\n }\n h[0] = t;\n b[0] += Lb;\n c[0] -= Lb;\n } else h[0] = 0;\n l = L;\n }\n m.na = m.na[0];\n if (l != L) return l;\n h = m.na > 0;\n t = [0];\n a: if (l = R + fd, $(a != p), $(c != p), $(n != p), n[0] = 0, c[0] < R) l = Z;\n else {\n if (!kd(a, b[0], 'VP8X', O)) {\n var q = s;\n var r = s;\n var u = E;\n if (Kb(a, b[0] + O) != fd) {\n l = W;\n break a;\n }\n if (c[0] < l) {\n l = Z;\n break a;\n }\n u = Kb(a, b[0] + 8);\n q = 1 + ed(a, b[0] + 12);\n r = 1 + ed(a, b[0] + 15);\n if (q * r >= Ag) {\n l = W;\n break a;\n }\n t != p && (t[0] = u);\n d != p && (d[0] = q);\n e != p && (e[0] = r);\n b[0] += l;\n c[0] -= l;\n n[0] = 1;\n }\n l = L;\n }\n if (l != L) return l;\n if (!h && n[0]) return W;\n g != p && (g[0] = !!(t[0] & Bg));\n if (n && f == p) return L;\n if (c < O) return Z;\n if (h && n[0] || !h && !n[0] && !kd(a, b[0], 'ALPH', O)) {\n m.$ = [m.$];\n m.G = [m.G];\n m.pa = [m.pa];\n a: {\n var n = m.na;\n var h = m.$;\n var t = m.G;\n var l = m.pa;\n var q = x;\n var r = 0;\n var u = Mb;\n let v = O + R + fd;\n $(a != p);\n $(c != p);\n q = a;\n r = b[0];\n u = c[0];\n $(h != p);\n $(l != p);\n h[0] = p;\n t[0] = p;\n for (l[0] = 0; ;) {\n let w = E;\n let y = E;\n b[0] = r;\n c[0] = u;\n if (u < R) {\n l = Z;\n break a;\n }\n w = Kb(q, r + O);\n y = R + w + 1 & -2;\n v += y;\n if (n > 0 && v > n) {\n l = W;\n break a;\n }\n if (u < y) {\n l = Z;\n break a;\n }\n if (kd(q, r, 'ALPH', O)) {\n if (!kd(q, r, 'VP8 ', O) || !kd(q, 'VP8L', O)) {\n l = L;\n break a;\n }\n } else h[0] = q, t[0] = r + R, l[0] = w;\n r += y;\n u -= y;\n }\n l = ca;\n }\n m.$ = m.$[0];\n m.G = m.G[0];\n m.pa = m.pa[0];\n if (l != L) return l;\n }\n m.ta = [m.ta];\n m.ia = [m.ia];\n a: if (n = m.na, h = m.ta, t = m.ia, r = !kd(a, b[0], 'VP8 ', O), l = !kd(a, b[0], 'VP8L', O), q = O + R, $(a != p), $(c != p), $(h != p), $(t != p), c[0] < R) l = Z;\n else {\n if (r || l) {\n r = Kb(a, b[0] + O);\n if (n >= q && r > n - q) {\n l = W;\n break a;\n }\n h[0] = r;\n b[0] += R;\n c[0] -= R;\n t[0] = l;\n } else t[0] = c >= 1 && a[b + 0] == ve, h[0] = c[0];\n l = L;\n }\n m.ta = m.ta[0];\n m.ia = m.ia[0];\n if (l != L) return l;\n if (m.ta > Ze) return W;\n if (m.ia) {\n if (c[0] < $e) return Z;\n n = b[0];\n h = c[0];\n d = d ? d[0] : p;\n e = e ? e[0] : p;\n t = g ? g[0] : p;\n a == p || h < $e ? a = 0 : (l = [s], q = [s], r = [s], u = M(af), Rb(u, a, n, h), ue(u, l, q, r) ? (d != p && (d[0] = l[0]), e != p && (e[0] = q[0]), t != p && (t[0] = r[0]), a = 1) : a = 0);\n } else {\n if (c < bf) return Z;\n n = b[0];\n h = c[0];\n d = d ? d[0] : p;\n e = e ? e[0] : p;\n !(a == p || h < bf) && h - 3 >= 3 && a[n + 3 + 0] == 157 && a[n\n + 3 + 1] == 1 && a[n + 3 + 2] == 42 ? (h = a[n + 0] | a[n + 1] << 8 | a[n + 2] << 16, t = (a[n + 7] << 8 | a[n + 6]) & 16383, a = (a[n + 9] << 8 | a[n + 8]) & 16383, !(!(h & 1) + 0) || (h >> 1 & 7) > 3 || !(h >> 4 & 1) || h >> 5 >= m.ta ? a = 0 : (d && (d[0] = t), e && (e[0] = a), a = 1)) : a = 0;\n }\n if (!a) return W;\n g != p && (g[0] |= m.$ != p);\n f != p && (f[0] = m, f[0].offset = b[0] - f[0].b, $(b[0] - f[0].b < Ze), $(f[0].offset == f[0].e - c[0]));\n return L;\n }\n\n function Kd(a) {\n $(a != p);\n return Ye(a[0].data, a[0].b, a[0].e, p, p, p, a);\n }\n\n function cf(a, b, c, d) {\n let e = 'VP8StatusCode';\n const g = M(Vb);\n let f = M(Gc);\n f.data = a;\n f.b = b;\n f.e = c;\n f.b = [f.b];\n f.e = [f.e];\n f = [f];\n e = Kd(f);\n if (e\n != L) return e;\n f = f[0];\n f.b = f.b[0];\n f.e = f.e[0];\n $(d != p);\n td(na);\n g.data = f.data;\n g.b = b + f.offset;\n g.e = f.e - f.offset;\n g.put = ud;\n g.Mb = vd;\n g.Pb = wd;\n g.ka = d;\n if (f.ia) {\n a = sd();\n if (a == p) return cb;\n ng(a, g) ? (e = zd(g.width, g.height, d.Qa, d.j), e == L && !og(a) && (e = a.a)) : e = a.a;\n a != p && sa(a);\n } else {\n e = M(Cg);\n e != p && (Gd(e), e.za = 0, e.Hb = 1);\n a = e;\n if (a == p) return cb;\n a.qb = 0;\n a.Ga = f.$;\n a.G = f.G;\n a.ub = f.pa;\n Hd(a, g) ? (e = zd(g.width, g.height, d.Qa, d.j), e == L && !Mf(a, g) && (e = a.a)) : e = a.a;\n a != p && ke(a);\n }\n e != L && (self || this).Yc(d.j);\n return e;\n }\n\n function lb(a, b, c, d, e) {\n const g = {\n value: 0,\n };\n c = {\n value: c,\n };\n const f = M(df);\n const h = M(gd);\n f.j = h;\n h.J = a;\n const n = {\n value: h.width,\n };\n const l = {\n value: h.height,\n };\n let m;\n m = c;\n const t = M(ef);\n hd(b, g, m, t) != L ? m = 0 : (n != p && (n.value = t.width), l != p && (l.value = t.height), m = 1);\n if (!m) return p;\n h.width = n.value;\n h.height = l.value;\n d != p && (d.value = h.width.value);\n e != p && (e.value = h.height.value);\n return cf(b, g.value, c.value, f) != L ? p : a < ua ? h.c.RGBA.ma : h.c.Va.y;\n }\n\n function hd(a, b, c, d) {\n if (d == p || a == p) return ta;\n $(d != p);\n d.tc = 0;\n d.width = [d.width];\n d.height = [d.height];\n d.$b = [d.$b];\n return Ye(a, b, c, d.width, d.height, d.$b, p);\n }\n\n function Ne(a,\n b, c) {\n const d = b.width;\n const e = b.height;\n let g = 0;\n let f = 0;\n let h = d;\n let n = e;\n b.Ua = a != p && a.Ua > 0;\n if (b.Ua && (h = a.wc, n = a.vc, g = a.t, f = a.k, c < ua || (g &= -2, f &= -2), g < 0 || f < 0 || h <= 0 || n <= 0 || g + h > d || f + n > e)) return 0;\n b.t = g;\n b.k = f;\n b.Ka = g + h;\n b.K = f + n;\n b.m = h;\n b.h = n;\n b.I = a != p && a.I > 0;\n if (b.I) {\n if (a.Ba <= 0 || a.Aa <= 0) return 0;\n b.Ba = a.Ba;\n b.Aa = a.Aa;\n }\n b.Za = a && a.Za;\n b.Bb = a == p || !a.ed;\n b.I && (b.Za = b.Ba < 3 * d / 4 && b.Aa < 3 * e / 4, b.Bb = 0);\n return 1;\n }\n var na = 512;\n var Qa = 0;\n var jb = 1;\n var Zc = 2;\n var Pa = 3;\n var Ab = 4;\n var kb = 5;\n var Fe = 6;\n var Ob = 7;\n var Pb = 8;\n var Bb = 9;\n var Qb = 10;\n var ua = 11;\n var Ra = 12;\n var Cc = 13;\n this.WEBP_CSP_MODE = this.Cd = {\n nd: 0,\n od: 1,\n kd: 2,\n ld: 3,\n jd: 4,\n pd: 5,\n qd: 6,\n rd: 7,\n sd: 8,\n md: 9,\n };\n var gd = {\n J: 'WEBP_CSP_MODE',\n width: s,\n height: s,\n Fc: s,\n c: {\n RGBA: {\n ma: x,\n Sa: 0,\n f: s,\n size: Mb,\n },\n Va: {\n y: x,\n c: x,\n S: x,\n p: x,\n D: x,\n B: x,\n C: x,\n q: x,\n F: s,\n nb: s,\n rb: s,\n Fa: s,\n Wc: Mb,\n Rc: Mb,\n Uc: Mb,\n Wb: Mb,\n },\n },\n Ic: U(4, E),\n Jb: p,\n jc: x,\n };\n var L = 0;\n var cb = 1;\n var ta = 2;\n var W = 3;\n var Hf = 4;\n var Ie = 5;\n var Nf = 6;\n var Z = 7;\n this.VP8StatusCode = this.td = {\n xd: 0,\n yd: 1,\n vd: 2,\n ud: 3,\n Ad: 4,\n zd: 5,\n Bd: 6,\n wd: 7,\n };\n var ef = {\n width: {\n value: s,\n },\n height: {\n value: s,\n },\n $b: {\n value: s,\n },\n tc: s,\n Yd: s,\n rotate: s,\n be: s,\n Ic: U(3, E),\n };\n this.WebPGetFeatures = this.Md = function (a, b, c) {\n let d = 'VP8StatusCode';\n na >>> 8 != na >>> 8 || c == p ? a = ta : (b = [b], d = hd(a, [0], b, c), a = d == Z ? W : d);\n return a;\n };\n const ff = {\n Za: s,\n ed: s,\n Ua: s,\n t: s,\n k: s,\n wc: s,\n vc: s,\n I: s,\n Ba: s,\n Aa: s,\n ae: s,\n Td: s,\n Xd: s,\n Ic: U(6, E),\n };\n this.WebPDecoderConfig = this.Kd = {\n input: M(ef),\n j: M(gd),\n options: M(ff),\n };\n this.WebPInitDecoderConfig = this.Nd = function (a) {\n na >>> 8 != na >>> 8 || a == p ? a = 0 : (a = a.input, $(a != p), a.tc = 0, a = 1);\n return a;\n };\n var Vb = {\n width: s,\n height: s,\n w: s,\n m: s,\n h: s,\n y: x,\n c: x,\n S: x,\n D: 0,\n B: 0,\n C: 0,\n F: s,\n Da: s,\n ka: 0,\n put: 0,\n Mb: 0,\n Pb: 0,\n Bb: s,\n e: Mb,\n data: x,\n b: 0,\n Za: s,\n Ua: s,\n t: s,\n Ka: s,\n k: s,\n K: s,\n I: s,\n Ba: s,\n Aa: s,\n p: x,\n q: 0,\n };\n var df = {\n j: M(gd),\n Sb: x,\n Qb: x,\n lc: x,\n Tb: 0,\n Rb: 0,\n mc: 0,\n ec: s,\n Qa: M(ff),\n memory: 0,\n $a: '(OutputFunc)',\n zb: '(OutputFunc)',\n ad: '(OutputRowFunc)',\n };\n var Gc = {\n data: x,\n b: x,\n e: Mb,\n offset: Mb,\n $: p,\n G: x,\n pa: Mb,\n ta: Mb,\n na: Mb,\n ia: s,\n };\n var Fc = {\n qa: x,\n Ia: p,\n Pd: x,\n Ab: s,\n la: E,\n Z: E,\n gc: s,\n };\n var af = {\n T: bb,\n qa: x,\n Ia: x,\n ya: Mb,\n Q: Mb,\n g: s,\n L: s,\n fa: s,\n };\n var gf = 25;\n var hf = [0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767, 65535, 131071, 262143, 524287, 1048575, 2097151, 4194303, 8388607, 16777215];\n var bf = 10;\n var ve = 47;\n var we = 14;\n var Wf = 3;\n var $e = 5;\n var fg = 11;\n var Yc = 5;\n var qe = 4278190080;\n var jg = 8;\n var Tb = 15;\n var Ba = 256;\n var Ge = 24;\n var Je = 4;\n var Be = 0;\n var De = 1;\n var Ae = 2;\n var Ee = 3;\n var Ub = 1;\n var kc = 0;\n var kf = 1;\n var rd = 1;\n var O = 4;\n var R = 8;\n var Lb = 12;\n var fd = 10;\n var Bg = 16;\n var Ag = 1 * Math.pow(2, 32);\n var Ze = -1 - R - 1 >>> 0;\n var jf = {\n kc: s,\n s,\n };\n var Le = {\n Y: 'HuffmanTreeNode*',\n gb: s,\n Pa: s,\n };\n var pd = -1;\n const Dg = {\n ea: E,\n bb: s,\n };\n var ad = 506832829;\n var $b = 0;\n var ge = $b;\n var fe = 2;\n var ee = 3;\n var de = 1;\n var Ef = 4;\n var Df = 5;\n var Cf = 6;\n var Ld = 3;\n var xa = 4;\n var Hc = 4;\n var Gf = 4;\n var Md = 4;\n var Nd = 8;\n var Kc = 3;\n var Lc = 11;\n var f = 32;\n var Pf = 17 * f + 9 * f;\n var Tc = 1 * f + 8;\n var Uc = Tc + 16 * f + f;\n var he = Uc + 16;\n var Id = {\n fb: x,\n Jc: x,\n Nc: x,\n Ra: E,\n };\n var Jd = {\n l: 0,\n v: 0,\n gd: x,\n hd: x,\n uc: x,\n $c: x,\n };\n const Eg = {\n pb: s,\n ob: s,\n tb: s,\n Kb: U(xa, 0),\n Cb: U(xa, 0),\n };\n const Fg = {\n Ta: U(Ld, x),\n z: md([Md, Nd, Kc, Lc], x),\n };\n const Gg = {\n Oc: s,\n Fb: s,\n kb: s,\n oc: s,\n Lc: U(Hc, s),\n Gc: U(Hc, s),\n };\n var Oc = {\n zc: s,\n yc: s,\n ab: s,\n };\n var Qd = {\n X: s,\n ua: s,\n Nb: s,\n };\n const id = U(2, s);\n const Hg = {\n sc: M(id),\n sb: M(id),\n qc: M(id),\n };\n const Ig = {\n ha: s,\n d: s,\n W: s,\n M: Oc,\n N: Vb,\n };\n var Cg = {\n a: 'VP8StatusCode',\n za: s,\n xc: 0,\n o: M(Fc),\n Ac: M(Id),\n P: M(Jd),\n ga: M(Gg),\n Ca: M(Eg),\n rc: 'WebPWorker',\n qb: s,\n Ja: s,\n jb: s,\n oa: Ig,\n Ma: s,\n hb: s,\n lb: s,\n mb: s,\n wb: s,\n Ya: s,\n Hb: s,\n ic: ld(8, Fc),\n Zc: E,\n yb: ld(xa, Hg),\n R: M(Fg),\n pc: s,\n Pc: x,\n dc: x,\n cc: U(4, x),\n Xc: x,\n Sc: x,\n Vc: x,\n La: M(Qd),\n M: M(Oc),\n Ea: x,\n z: 0,\n ca: x,\n aa: x,\n ra: x,\n da: s,\n ba: s,\n sa: s,\n H: s,\n r: s,\n ib: 0,\n Gb: Mb,\n i: s,\n d: s,\n wa: x,\n Eb: U(16, x),\n Vd: 0,\n Tc: x,\n Lb: x,\n ja: E,\n Oa: E,\n A: s,\n W: s,\n Zb: U(xa, x),\n Ga: p,\n G: 0,\n ub: Mb,\n Xb: x,\n Od: 0,\n cd: s,\n dd: x,\n Wd: 0,\n fc: Mb,\n };\n var Db = 0;\n var Cb = 1;\n var cd = 2;\n const Jg = {\n Qc: 'VP8LImageTransformType',\n n: s,\n U: s,\n Vb: s,\n u: E,\n b: E,\n };\n var gg = {\n va: ld(Yc, Le),\n };\n const Kg = {\n xb: s,\n Yb: M(Dg),\n Dc: s,\n eb: s,\n Ec: s,\n ac: E,\n bd: E,\n hc: s,\n Db: 'HTreeGroup',\n };\n var eg = {\n a: 'VP8StatusCode',\n Wa: 'VP8LDecodeState',\n Ob: 'VP8LDecodeState',\n N: 'VP8Io',\n Ib: 'WebPDecBuffer',\n Hc: 'WebPDecBuffer',\n V: E,\n Ha: E,\n Xa: E,\n vb: E,\n o: M(af),\n l: s,\n v: s,\n O: s,\n xa: s,\n cb: M(Kg),\n Na: s,\n nc: ld(Je, Jg),\n Ub: E,\n Mc: x,\n $d: x,\n Zd: '*WebPRescaler',\n };\n var lf = 4;\n var nf = [p, function (a, b, c, d, e, g, f, h) {\n let n = s;\n let l = h;\n $(a != p);\n $(f != p);\n $(c > 0);\n $(d > 0);\n $(e > 0);\n $(g >= c * e);\n for (n = 0; n < d; ++n) {\n n == 0 ? N(f, h, a, b, e) : Ea(a, b, f, l - g, f, h, e), Ea(a, b + e, f, l, f, h + e, e * (c - 1)),\n l += g, b += g, h += g;\n }\n }, function (a, b, c, d, e, f, k, h) {\n let n = s;\n let l = h;\n $(a != p);\n $(k != p);\n $(c > 0);\n $(d > 0);\n $(e > 0);\n $(f >= c * e);\n N(k, h, a, b, e);\n Ea(a, b + e, k, l, k, h + e, e * (c - 1));\n for (n = 1; n < d; ++n) b += f, h += f, Ea(a, b, k, l, k, h, e * c), l += f;\n }, function (a, b, c, d, e, f, k, h) {\n var n = h;\n let l = s;\n $(a != p);\n $(k != p);\n $(c > 0);\n $(d > 0);\n $(e > 0);\n $(f >= c * e);\n N(k, h, a, b, e);\n Ea(a, b + e, k, n, k, h + e, e * (c - 1));\n for (l = 1; l < d; ++l) {\n let m = s;\n var n = n + f;\n b += f;\n h += f;\n Ea(a, b, k, n - f, k, h, e);\n for (m = e; m < c * e; ++m) {\n const t = k[n + m - e] + k[n + m - f] - k[n + m - f - e];\n k[h + m] = a[b + m] + (t < 0 ? 0 : t > 255 ? 255 : t) & 255;\n }\n }\n }];\n var yd = [3, 4, 3, 4, 4, 2, 2, 4, 4, 4,\n 2, 1, 1,\n ];\n this.WebPFreeDecBuffer = this.Yc = function (a) {\n a != p && (a.Fc || (a.Jb = ''), a.jc = 0, a.Jb = a.jc = p);\n };\n self = this;\n var va = U(511, x);\n var tc = U(511, x);\n var sc = U(2041, 0);\n var oc = U(225, 0);\n var oa = U(766, x);\n var Rd = 0;\n var Xb = 85627;\n var Wb = 35468;\n var Uf = [function (a, b) {\n let c = 4;\n let d;\n for (d = 0; d < 4; ++d) c += a[b + d - f] + a[b - 1 + d * f];\n c >>= 3;\n for (d = 0; d < 4; ++d) jd(a, b + d * f, c, 4);\n }, function (a, b) {\n Dc(a, b, 4);\n }, function (a, b) {\n let c = b - f;\n const d = [];\n d.push(y(a[c - 1], a[c + 0], a[c + 1]));\n d.push(y(a[c + 0], a[c + 1], a[c + 2]));\n d.push(y(a[c + 1], a[c + 2], a[c + 3]));\n d.push(y(a[c + 2], a[c + 3], a[c + 4]));\n for (c = 0; c < 4; ++c) N(a, b + c * f, d, 0, 4);\n },\n function (a, b) {\n const c = a[b - 1];\n const d = a[b - 1 + f];\n const e = a[b - 1 + 2 * f];\n const g = a[b - 1 + 3 * f];\n a[b + 0 + 0 * f] = a[b + 1 + 0 * f] = a[b + 2 + 0 * f] = a[b + 3 + 0 * f] = y(a[b - 1 - f], c, d);\n a[b + 0 + 1 * f] = a[b + 1 + 1 * f] = a[b + 2 + 1 * f] = a[b + 3 + 1 * f] = y(c, d, e);\n a[b + 0 + 2 * f] = a[b + 1 + 2 * f] = a[b + 2 + 2 * f] = a[b + 3 + 2 * f] = y(d, e, g);\n a[b + 0 + 3 * f] = a[b + 1 + 3 * f] = a[b + 2 + 3 * f] = a[b + 3 + 3 * f] = y(e, g, g);\n },\n function (a, b) {\n const c = a[b - 1 + 0 * f];\n const d = a[b - 1 + 1 * f];\n const e = a[b - 1 + 2 * f];\n const g = a[b - 1 - f];\n const k = a[b + 0 - f];\n const h = a[b + 1 - f];\n const n = a[b + 2 - f];\n const l = a[b + 3 - f];\n a[b + 0 + 3 * f] = y(d, e, a[b - 1 + 3 * f]);\n a[b + 0 + 2 * f] = a[b + 1 + 3 * f] = y(c, d, e);\n a[b + 0 + 1 * f] = a[b + 1 + 2 * f] = a[b + 2 + 3 * f] = y(g, c, d);\n a[b\n + 0 + 0 * f] = a[b + 1 + 1 * f] = a[b + 2 + 2 * f] = a[b + 3 + 3 * f] = y(k, g, c);\n a[b + 1 + 0 * f] = a[b + 2 + 1 * f] = a[b + 3 + 2 * f] = y(h, k, g);\n a[b + 2 + 0 * f] = a[b + 3 + 1 * f] = y(n, h, k);\n a[b + 3 + 0 * f] = y(l, n, h);\n },\n function (a, b) {\n const c = a[b - 1 + 0 * f];\n const d = a[b - 1 + 1 * f];\n const e = a[b - 1 + 2 * f];\n const g = a[b - 1 - f];\n const k = a[b + 0 - f];\n const h = a[b + 1 - f];\n const n = a[b + 2 - f];\n const l = a[b + 3 - f];\n a[b + 0 + 0 * f] = a[b + 1 + 2 * f] = g + k + 1 >> 1;\n a[b + 1 + 0 * f] = a[b + 2 + 2 * f] = k + h + 1 >> 1;\n a[b + 2 + 0 * f] = a[b + 3 + 2 * f] = h + n + 1 >> 1;\n a[b + 3 + 0 * f] = n + l + 1 >> 1;\n a[b + 0 + 3 * f] = y(e, d, c);\n a[b + 0 + 2 * f] = y(d, c, g);\n a[b + 0 + 1 * f] = a[b + 1 + 3 * f] = y(c, g, k);\n a[b + 1 + 1 * f] = a[b + 2 + 3 * f] = y(g, k, h);\n a[b + 2 + 1 * f] = a[b + 3 + 3 * f] = y(k, h, n);\n a[b + 3 + 1 * f] = y(h, n, l);\n },\n function (a, b) {\n const c = a[b + 1 - f];\n const d = a[b + 2 - f];\n const e = a[b + 3 - f];\n const g = a[b + 4 - f];\n const k = a[b + 5 - f];\n const h = a[b + 6 - f];\n const n = a[b + 7 - f];\n a[b + 0 + 0 * f] = y(a[b + 0 - f], c, d);\n a[b + 1 + 0 * f] = a[b + 0 + 1 * f] = y(c, d, e);\n a[b + 2 + 0 * f] = a[b + 1 + 1 * f] = a[b + 0 + 2 * f] = y(d, e, g);\n a[b + 3 + 0 * f] = a[b + 2 + 1 * f] = a[b + 1 + 2 * f] = a[b + 0 + 3 * f] = y(e, g, k);\n a[b + 3 + 1 * f] = a[b + 2 + 2 * f] = a[b + 1 + 3 * f] = y(g, k, h);\n a[b + 3 + 2 * f] = a[b + 2 + 3 * f] = y(k, h, n);\n a[b + 3 + 3 * f] = y(h, n, n);\n },\n function (a, b) {\n const c = a[b + 0 - f];\n const d = a[b + 1 - f];\n const e = a[b + 2 - f];\n const g = a[b + 3 - f];\n const k = a[b + 4 - f];\n const h = a[b + 5 - f];\n const n = a[b + 6 - f];\n const l = a[b + 7 - f];\n a[b + 0 + 0 * f] = c + d + 1 >> 1;\n a[b + 1 + 0 * f] = a[b\n + 0 + 2 * f] = d + e + 1 >> 1;\n a[b + 2 + 0 * f] = a[b + 1 + 2 * f] = e + g + 1 >> 1;\n a[b + 3 + 0 * f] = a[b + 2 + 2 * f] = g + k + 1 >> 1;\n a[b + 0 + 1 * f] = y(c, d, e);\n a[b + 1 + 1 * f] = a[b + 0 + 3 * f] = y(d, e, g);\n a[b + 2 + 1 * f] = a[b + 1 + 3 * f] = y(e, g, k);\n a[b + 3 + 1 * f] = a[b + 2 + 3 * f] = y(g, k, h);\n a[b + 3 + 2 * f] = y(k, h, n);\n a[b + 3 + 3 * f] = y(h, n, l);\n },\n function (a, b) {\n const c = a[b - 1 + 0 * f];\n const d = a[b - 1 + 1 * f];\n const e = a[b - 1 + 2 * f];\n const g = a[b - 1 + 3 * f];\n const k = a[b - 1 - f];\n const h = a[b + 0 - f];\n const n = a[b + 1 - f];\n const l = a[b + 2 - f];\n a[b + 0 + 0 * f] = a[b + 2 + 1 * f] = c + k + 1 >> 1;\n a[b + 0 + 1 * f] = a[b + 2 + 2 * f] = d + c + 1 >> 1;\n a[b + 0 + 2 * f] = a[b + 2 + 3 * f] = e + d + 1 >> 1;\n a[b + 0 + 3 * f] = g + e + 1 >> 1;\n a[b + 3 + 0 * f] = y(h, n, l);\n a[b + 2 + 0 * f] = y(k, h, n);\n a[b\n + 1 + 0 * f] = a[b + 3 + 1 * f] = y(c, k, h);\n a[b + 1 + 1 * f] = a[b + 3 + 2 * f] = y(d, c, k);\n a[b + 1 + 2 * f] = a[b + 3 + 3 * f] = y(e, d, c);\n a[b + 1 + 3 * f] = y(g, e, d);\n },\n function (a, b) {\n const c = a[b - 1 + 0 * f];\n const d = a[b - 1 + 1 * f];\n const e = a[b - 1 + 2 * f];\n const g = a[b - 1 + 3 * f];\n a[b + 0 + 0 * f] = c + d + 1 >> 1;\n a[b + 2 + 0 * f] = a[b + 0 + 1 * f] = d + e + 1 >> 1;\n a[b + 2 + 1 * f] = a[b + 0 + 2 * f] = e + g + 1 >> 1;\n a[b + 1 + 0 * f] = y(c, d, e);\n a[b + 3 + 0 * f] = a[b + 1 + 1 * f] = y(d, e, g);\n a[b + 3 + 1 * f] = a[b + 1 + 2 * f] = y(e, g, g);\n a[b + 3 + 2 * f] = a[b + 2 + 2 * f] = a[b + 0 + 3 * f] = a[b + 1 + 3 * f] = a[b + 2 + 3 * f] = a[b + 3 + 3 * f] = g;\n },\n ];\n var Vf = [function (a, b) {\n let c = 16;\n let d;\n for (d = 0; d < 16; ++d) c += a[b - 1 + d * f] + a[b + d - f];\n Yb(c >> 5, a, b);\n }, function (a,\n b) {\n Dc(a, b, 16);\n }, function (a, b) {\n let c;\n for (c = 0; c < 16; ++c) N(a, b + c * f, a, b - f, 16);\n }, function (a, b) {\n let c;\n for (c = 16; c > 0; --c) jd(a, b + 0, a[b - 1], 16), b += f;\n }, function (a, b) {\n let c = 8;\n let d;\n for (d = 0; d < 16; ++d) c += a[b - 1 + d * f];\n Yb(c >> 4, a, b);\n }, function (a, b) {\n let c = 8;\n let d;\n for (d = 0; d < 16; ++d) c += a[b + d - f];\n Yb(c >> 4, a, b);\n }, function (a, b) {\n Yb(128, a, b);\n }];\n var je = [function (a, b) {\n let c = 8;\n let d;\n for (d = 0; d < 8; ++d) c += a[b + d - f] + a[b - 1 + d * f];\n Zb(1 * (c >> 4), a, b);\n }, function (a, b) {\n Dc(a, b, 8);\n }, function (a, b) {\n let c;\n for (c = 0; c < 8; ++c) N(a, b + c * f, a, b - f, 8);\n }, function (a, b) {\n let c;\n for (c = 0; c < 8; ++c) {\n jd(a,\n b + 0, a[b - 1], 8), b += f;\n }\n }, function (a, b) {\n let c = 4;\n let d;\n for (d = 0; d < 8; ++d) c += a[b - 1 + d * f];\n Zb(1 * (c >> 3), a, b);\n }, function (a, b) {\n let c = 4;\n let d;\n for (d = 0; d < 8; ++d) c += a[b + d - f];\n Zb(1 * (c >> 3), a, b);\n }, function (a, b) {\n Zb(128, a, b);\n }];\n let mc; let Pc; let Qc; let Rc; let Sd; let Td; let Ud; let Vd; let Wd; let Xd; let Yd; let Zd; let $d; let ae; let be; let ce; var Pd = 31;\n var uc = [0, 2, 8];\n var Od = 3;\n var Of = 1;\n var ie = [0 + 0 * f, 4 + 0 * f, 8 + 0 * f, 12 + 0 * f, 0 + 4 * f, 4 + 4 * f, 8 + 4 * f, 12 + 4 * f, 0 + 8 * f, 4 + 8 * f, 8 + 8 * f, 12 + 8 * f, 0 + 12 * f, 4 + 12 * f, 8 + 12 * f, 12 + 12 * f];\n var Ic = [4, 5, 6, 7, 8, 9, 10, 10, 11, 12, 13, 14, 15, 16, 17, 17, 18, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 25, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 37, 38,\n 39, 40, 41, 42, 43, 44, 45, 46, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 91, 93, 95, 96, 98, 100, 101, 102, 104, 106, 108, 110, 112, 114, 116, 118, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 143, 145, 148, 151, 154, 157,\n ];\n var Jc = [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96,\n 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 119, 122, 125, 128, 131, 134, 137, 140, 143, 146, 149, 152, 155, 158, 161, 164, 167, 170, 173, 177, 181, 185, 189, 193, 197, 201, 205, 209, 213, 217, 221, 225, 229, 234, 239, 245, 249, 254, 259, 264, 269, 274, 279, 284,\n ];\n var Sf = [-$b, 1, -1, 2, -2, 3, 4, 6, -3, 5, -4, -5, -6, 7, -7, 8, -8, -9];\n var Ff = [\n [\n [\n [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128],\n [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128],\n [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128],\n ],\n [\n [253, 136, 254, 255, 228, 219, 128, 128, 128, 128, 128],\n [189, 129, 242, 255, 227, 213, 255, 219, 128, 128,\n 128,\n ],\n [106, 126, 227, 252, 214, 209, 255, 255, 128, 128, 128],\n ],\n [\n [1, 98, 248, 255, 236, 226, 255, 255, 128, 128, 128],\n [181, 133, 238, 254, 221, 234, 255, 154, 128, 128, 128],\n [78, 134, 202, 247, 198, 180, 255, 219, 128, 128, 128],\n ],\n [\n [1, 185, 249, 255, 243, 255, 128, 128, 128, 128, 128],\n [184, 150, 247, 255, 236, 224, 128, 128, 128, 128, 128],\n [77, 110, 216, 255, 236, 230, 128, 128, 128, 128, 128],\n ],\n [\n [1, 101, 251, 255, 241, 255, 128, 128, 128, 128, 128],\n [170, 139, 241, 252, 236, 209, 255, 255, 128, 128, 128],\n [37, 116, 196, 243, 228, 255, 255, 255, 128, 128, 128],\n ],\n [\n [1, 204, 254, 255, 245, 255, 128, 128, 128, 128,\n 128,\n ],\n [207, 160, 250, 255, 238, 128, 128, 128, 128, 128, 128],\n [102, 103, 231, 255, 211, 171, 128, 128, 128, 128, 128],\n ],\n [\n [1, 152, 252, 255, 240, 255, 128, 128, 128, 128, 128],\n [177, 135, 243, 255, 234, 225, 128, 128, 128, 128, 128],\n [80, 129, 211, 255, 194, 224, 128, 128, 128, 128, 128],\n ],\n [\n [1, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n [246, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n [255, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128],\n ],\n ],\n [\n [\n [198, 35, 237, 223, 193, 187, 162, 160, 145, 155, 62],\n [131, 45, 198, 221, 172, 176, 220, 157, 252, 221, 1],\n [68, 47, 146, 208, 149, 167, 221, 162, 255, 223, 128],\n ],\n [\n [1, 149, 241, 255, 221, 224, 255, 255, 128, 128, 128],\n [184, 141, 234, 253, 222, 220, 255, 199, 128, 128, 128],\n [81, 99, 181, 242, 176, 190, 249, 202, 255, 255, 128],\n ],\n [\n [1, 129, 232, 253, 214, 197, 242, 196, 255, 255, 128],\n [99, 121, 210, 250, 201, 198, 255, 202, 128, 128, 128],\n [23, 91, 163, 242, 170, 187, 247, 210, 255, 255, 128],\n ],\n [\n [1, 200, 246, 255, 234, 255, 128, 128, 128, 128, 128],\n [109, 178, 241, 255, 231, 245, 255, 255, 128, 128, 128],\n [44, 130, 201, 253, 205, 192, 255, 255, 128, 128, 128],\n ],\n [\n [1, 132, 239, 251, 219, 209, 255, 165, 128, 128, 128],\n [94, 136, 225, 251, 218, 190, 255, 255, 128, 128, 128],\n [22,\n 100, 174, 245, 186, 161, 255, 199, 128, 128, 128,\n ],\n ],\n [\n [1, 182, 249, 255, 232, 235, 128, 128, 128, 128, 128],\n [124, 143, 241, 255, 227, 234, 128, 128, 128, 128, 128],\n [35, 77, 181, 251, 193, 211, 255, 205, 128, 128, 128],\n ],\n [\n [1, 157, 247, 255, 236, 231, 255, 255, 128, 128, 128],\n [121, 141, 235, 255, 225, 227, 255, 255, 128, 128, 128],\n [45, 99, 188, 251, 195, 217, 255, 224, 128, 128, 128],\n ],\n [\n [1, 1, 251, 255, 213, 255, 128, 128, 128, 128, 128],\n [203, 1, 248, 255, 255, 128, 128, 128, 128, 128, 128],\n [137, 1, 177, 255, 224, 255, 128, 128, 128, 128, 128],\n ],\n ],\n [\n [\n [253, 9, 248, 251, 207, 208, 255, 192, 128, 128, 128],\n [175, 13,\n 224, 243, 193, 185, 249, 198, 255, 255, 128,\n ],\n [73, 17, 171, 221, 161, 179, 236, 167, 255, 234, 128],\n ],\n [\n [1, 95, 247, 253, 212, 183, 255, 255, 128, 128, 128],\n [239, 90, 244, 250, 211, 209, 255, 255, 128, 128, 128],\n [155, 77, 195, 248, 188, 195, 255, 255, 128, 128, 128],\n ],\n [\n [1, 24, 239, 251, 218, 219, 255, 205, 128, 128, 128],\n [201, 51, 219, 255, 196, 186, 128, 128, 128, 128, 128],\n [69, 46, 190, 239, 201, 218, 255, 228, 128, 128, 128],\n ],\n [\n [1, 191, 251, 255, 255, 128, 128, 128, 128, 128, 128],\n [223, 165, 249, 255, 213, 255, 128, 128, 128, 128, 128],\n [141, 124, 248, 255, 255, 128, 128, 128, 128, 128, 128],\n ],\n [\n [1, 16, 248, 255,\n 255, 128, 128, 128, 128, 128, 128,\n ],\n [190, 36, 230, 255, 236, 255, 128, 128, 128, 128, 128],\n [149, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n ],\n [\n [1, 226, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n [247, 192, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n [240, 128, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n ],\n [\n [1, 134, 252, 255, 255, 128, 128, 128, 128, 128, 128],\n [213, 62, 250, 255, 255, 128, 128, 128, 128, 128, 128],\n [55, 93, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n ],\n [\n [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128],\n [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128],\n [128, 128, 128, 128,\n 128, 128, 128, 128, 128, 128, 128,\n ],\n ],\n ],\n [\n [\n [202, 24, 213, 235, 186, 191, 220, 160, 240, 175, 255],\n [126, 38, 182, 232, 169, 184, 228, 174, 255, 187, 128],\n [61, 46, 138, 219, 151, 178, 240, 170, 255, 216, 128],\n ],\n [\n [1, 112, 230, 250, 199, 191, 247, 159, 255, 255, 128],\n [166, 109, 228, 252, 211, 215, 255, 174, 128, 128, 128],\n [39, 77, 162, 232, 172, 180, 245, 178, 255, 255, 128],\n ],\n [\n [1, 52, 220, 246, 198, 199, 249, 220, 255, 255, 128],\n [124, 74, 191, 243, 183, 193, 250, 221, 255, 255, 128],\n [24, 71, 130, 219, 154, 170, 243, 182, 255, 255, 128],\n ],\n [\n [1, 182, 225, 249, 219, 240, 255, 224, 128, 128, 128],\n [149, 150, 226, 252, 216,\n 205, 255, 171, 128, 128, 128,\n ],\n [28, 108, 170, 242, 183, 194, 254, 223, 255, 255, 128],\n ],\n [\n [1, 81, 230, 252, 204, 203, 255, 192, 128, 128, 128],\n [123, 102, 209, 247, 188, 196, 255, 233, 128, 128, 128],\n [20, 95, 153, 243, 164, 173, 255, 203, 128, 128, 128],\n ],\n [\n [1, 222, 248, 255, 216, 213, 128, 128, 128, 128, 128],\n [168, 175, 246, 252, 235, 205, 255, 255, 128, 128, 128],\n [47, 116, 215, 255, 211, 212, 255, 255, 128, 128, 128],\n ],\n [\n [1, 121, 236, 253, 212, 214, 255, 255, 128, 128, 128],\n [141, 84, 213, 252, 201, 202, 255, 219, 128, 128, 128],\n [42, 80, 160, 240, 162, 185, 255, 205, 128, 128, 128],\n ],\n [\n [1, 1, 255, 128, 128, 128, 128,\n 128, 128, 128, 128,\n ],\n [244, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n [238, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n ],\n ],\n ];\n var Rf = [\n [\n [231, 120, 48, 89, 115, 113, 120, 152, 112],\n [152, 179, 64, 126, 170, 118, 46, 70, 95],\n [175, 69, 143, 80, 85, 82, 72, 155, 103],\n [56, 58, 10, 171, 218, 189, 17, 13, 152],\n [114, 26, 17, 163, 44, 195, 21, 10, 173],\n [121, 24, 80, 195, 26, 62, 44, 64, 85],\n [144, 71, 10, 38, 171, 213, 144, 34, 26],\n [170, 46, 55, 19, 136, 160, 33, 206, 71],\n [63, 20, 8, 114, 114, 208, 12, 9, 226],\n [81, 40, 11, 96, 182, 84, 29, 16, 36],\n ],\n [\n [134, 183, 89, 137, 98, 101, 106, 165, 148],\n [72, 187, 100, 130, 157, 111,\n 32, 75, 80,\n ],\n [66, 102, 167, 99, 74, 62, 40, 234, 128],\n [41, 53, 9, 178, 241, 141, 26, 8, 107],\n [74, 43, 26, 146, 73, 166, 49, 23, 157],\n [65, 38, 105, 160, 51, 52, 31, 115, 128],\n [104, 79, 12, 27, 217, 255, 87, 17, 7],\n [87, 68, 71, 44, 114, 51, 15, 186, 23],\n [47, 41, 14, 110, 182, 183, 21, 17, 194],\n [66, 45, 25, 102, 197, 189, 23, 18, 22],\n ],\n [\n [88, 88, 147, 150, 42, 46, 45, 196, 205],\n [43, 97, 183, 117, 85, 38, 35, 179, 61],\n [39, 53, 200, 87, 26, 21, 43, 232, 171],\n [56, 34, 51, 104, 114, 102, 29, 93, 77],\n [39, 28, 85, 171, 58, 165, 90, 98, 64],\n [34, 22, 116, 206, 23, 34, 43, 166, 73],\n [107, 54, 32, 26, 51, 1, 81, 43, 31],\n [68, 25, 106, 22,\n 64, 171, 36, 225, 114,\n ],\n [34, 19, 21, 102, 132, 188, 16, 76, 124],\n [62, 18, 78, 95, 85, 57, 50, 48, 51],\n ],\n [\n [193, 101, 35, 159, 215, 111, 89, 46, 111],\n [60, 148, 31, 172, 219, 228, 21, 18, 111],\n [112, 113, 77, 85, 179, 255, 38, 120, 114],\n [40, 42, 1, 196, 245, 209, 10, 25, 109],\n [88, 43, 29, 140, 166, 213, 37, 43, 154],\n [61, 63, 30, 155, 67, 45, 68, 1, 209],\n [100, 80, 8, 43, 154, 1, 51, 26, 71],\n [142, 78, 78, 16, 255, 128, 34, 197, 171],\n [41, 40, 5, 102, 211, 183, 4, 1, 221],\n [51, 50, 17, 168, 209, 192, 23, 25, 82],\n ],\n [\n [138, 31, 36, 171, 27, 166, 38, 44, 229],\n [67, 87, 58, 169, 82, 115, 26, 59, 179],\n [63, 59, 90, 180, 59, 166, 93, 73,\n 154,\n ],\n [40, 40, 21, 116, 143, 209, 34, 39, 175],\n [47, 15, 16, 183, 34, 223, 49, 45, 183],\n [46, 17, 33, 183, 6, 98, 15, 32, 183],\n [57, 46, 22, 24, 128, 1, 54, 17, 37],\n [65, 32, 73, 115, 28, 128, 23, 128, 205],\n [40, 3, 9, 115, 51, 192, 18, 6, 223],\n [87, 37, 9, 115, 59, 77, 64, 21, 47],\n ],\n [\n [104, 55, 44, 218, 9, 54, 53, 130, 226],\n [64, 90, 70, 205, 40, 41, 23, 26, 57],\n [54, 57, 112, 184, 5, 41, 38, 166, 213],\n [30, 34, 26, 133, 152, 116, 10, 32, 134],\n [39, 19, 53, 221, 26, 114, 32, 73, 255],\n [31, 9, 65, 234, 2, 15, 1, 118, 73],\n [75, 32, 12, 51, 192, 255, 160, 43, 51],\n [88, 31, 35, 67, 102, 85, 55, 186, 85],\n [56, 21, 23, 111, 59, 205, 45, 37, 192],\n [55, 38, 70, 124, 73, 102, 1, 34, 98],\n ],\n [\n [125, 98, 42, 88, 104, 85, 117, 175, 82],\n [95, 84, 53, 89, 128, 100, 113, 101, 45],\n [75, 79, 123, 47, 51, 128, 81, 171, 1],\n [57, 17, 5, 71, 102, 57, 53, 41, 49],\n [38, 33, 13, 121, 57, 73, 26, 1, 85],\n [41, 10, 67, 138, 77, 110, 90, 47, 114],\n [115, 21, 2, 10, 102, 255, 166, 23, 6],\n [101, 29, 16, 10, 85, 128, 101, 196, 26],\n [57, 18, 10, 102, 102, 213, 34, 20, 43],\n [117, 20, 15, 36, 163, 128, 68, 1, 26],\n ],\n [\n [102, 61, 71, 37, 34, 53, 31, 243, 192],\n [69, 60, 71, 38, 73, 119, 28, 222, 37],\n [68, 45, 128, 34, 1, 47, 11, 245, 171],\n [62, 17, 19, 70, 146, 85, 55, 62, 70],\n [37, 43, 37, 154, 100, 163, 85, 160,\n 1,\n ],\n [63, 9, 92, 136, 28, 64, 32, 201, 85],\n [75, 15, 9, 9, 64, 255, 184, 119, 16],\n [86, 6, 28, 5, 64, 255, 25, 248, 1],\n [56, 8, 17, 132, 137, 255, 55, 116, 128],\n [58, 15, 20, 82, 135, 57, 26, 121, 40],\n ],\n [\n [164, 50, 31, 137, 154, 133, 25, 35, 218],\n [51, 103, 44, 131, 131, 123, 31, 6, 158],\n [86, 40, 64, 135, 148, 224, 45, 183, 128],\n [22, 26, 17, 131, 240, 154, 14, 1, 209],\n [45, 16, 21, 91, 64, 222, 7, 1, 197],\n [56, 21, 39, 155, 60, 138, 23, 102, 213],\n [83, 12, 13, 54, 192, 255, 68, 47, 28],\n [85, 26, 85, 85, 128, 128, 32, 146, 171],\n [18, 11, 7, 63, 144, 171, 4, 4, 246],\n [35, 27, 10, 146, 174, 171, 12, 26, 128],\n ],\n [\n [190, 80, 35, 99, 180, 80,\n 126, 54, 45,\n ],\n [85, 126, 47, 87, 176, 51, 41, 20, 32],\n [101, 75, 128, 139, 118, 146, 116, 128, 85],\n [56, 41, 15, 176, 236, 85, 37, 9, 62],\n [71, 30, 17, 119, 118, 255, 17, 18, 138],\n [101, 38, 60, 138, 55, 70, 43, 26, 142],\n [146, 36, 19, 30, 171, 255, 97, 27, 20],\n [138, 45, 61, 62, 219, 1, 81, 188, 64],\n [32, 41, 20, 117, 151, 142, 20, 21, 163],\n [112, 19, 12, 61, 195, 128, 48, 4, 24],\n ],\n ];\n var If = [\n [\n [\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n ],\n [\n [176, 246, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [223, 241,\n 252, 255, 255, 255, 255, 255, 255, 255, 255,\n ],\n [249, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n ],\n [\n [255, 244, 252, 255, 255, 255, 255, 255, 255, 255, 255],\n [234, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n ],\n [\n [255, 246, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [239, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n ],\n [\n [255, 248, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [251, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n ],\n [\n [255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [251, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n ],\n [\n [255, 254, 253, 255, 254, 255, 255, 255, 255, 255, 255],\n [250, 255, 254, 255, 254, 255, 255, 255, 255, 255, 255],\n [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n ],\n [\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n ],\n ],\n [\n [\n [217, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [225, 252, 241, 253, 255, 255, 254, 255,\n 255, 255, 255,\n ],\n [234, 250, 241, 250, 253, 255, 253, 254, 255, 255, 255],\n ],\n [\n [255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [223, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [238, 253, 254, 254, 255, 255, 255, 255, 255, 255, 255],\n ],\n [\n [255, 248, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [249, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n ],\n [\n [255, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [247, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n ],\n [\n [255, 253, 254, 255, 255,\n 255, 255, 255, 255, 255, 255,\n ],\n [252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n ],\n [\n [255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n ],\n [\n [255, 254, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n [250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n ],\n [\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255,\n 255, 255, 255, 255, 255, 255, 255, 255,\n ],\n ],\n ],\n [\n [\n [186, 251, 250, 255, 255, 255, 255, 255, 255, 255, 255],\n [234, 251, 244, 254, 255, 255, 255, 255, 255, 255, 255],\n [251, 251, 243, 253, 254, 255, 254, 255, 255, 255, 255],\n ],\n [\n [255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [236, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [251, 253, 253, 254, 254, 255, 255, 255, 255, 255, 255],\n ],\n [\n [255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [254, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n ],\n [\n [255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [254, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n ],\n [\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n ],\n [\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n ],\n [\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255,\n 255, 255,\n ],\n ],\n [\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n ],\n ],\n [\n [\n [248, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [250, 254, 252, 254, 255, 255, 255, 255, 255, 255, 255],\n [248, 254, 249, 253, 255, 255, 255, 255, 255, 255, 255],\n ],\n [\n [255, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n [246, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n [252, 254, 251, 254, 254, 255, 255, 255, 255, 255, 255],\n ],\n [\n [255, 254, 252, 255, 255, 255, 255, 255, 255, 255, 255],\n [248, 254, 253, 255, 255, 255,\n 255, 255, 255, 255, 255,\n ],\n [253, 255, 254, 254, 255, 255, 255, 255, 255, 255, 255],\n ],\n [\n [255, 251, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [245, 251, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [253, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n ],\n [\n [255, 251, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n [252, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n ],\n [\n [255, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [249, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n ],\n [\n [255, 255, 253,\n 255, 255, 255, 255, 255, 255, 255, 255,\n ],\n [250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n ],\n [\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n ],\n ],\n ];\n this.WebPGetDecoderVersion = this.Ld = function () {\n return 512;\n };\n var Nc = [0, 1, 2, 3, 6, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 0];\n var Jf = [\n [173, 148, 140, 0],\n [176, 155, 140, 135, 0],\n [180, 157, 141, 134, 130, 0],\n [254, 254, 243, 230, 196, 177, 153, 140, 133, 130, 129, 0],\n ];\n var Kf = [0, 1, 4, 8, 5, 2, 3, 6,\n 9, 12, 13, 10, 7, 11, 14, 15,\n ];\n var Tf = md([Kc, Lc], '');\n U(4, x);\n var vc = [\n [0, 0, 0, 0],\n [1, 0, 0, 0],\n [0, 1, 0, 0],\n [1, 1, 0, 0],\n [0, 0, 1, 0],\n [1, 0, 1, 0],\n [0, 1, 1, 0],\n [1, 1, 1, 0],\n [0, 0, 0, 1],\n [1, 0, 0, 1],\n [0, 1, 0, 1],\n [1, 1, 0, 1],\n [0, 0, 1, 1],\n [1, 0, 1, 1],\n [0, 1, 1, 1],\n [1, 1, 1, 1],\n ];\n var Lf = 134480385;\n var ea = 16;\n var J = -227;\n var dd = 482;\n var Ce = [Wc, function (a) {\n return a;\n }, function (a, b, c) {\n return b[c + 0];\n }, function (a, b, c) {\n return b[c + 1];\n }, function (a, b, c) {\n return b[c - 1];\n }, function (a, b, c) {\n return ka(ka(a, b[c + 1]), b[c + 0]);\n }, function (a, b, c) {\n return ka(a, b[c - 1]);\n }, function (a, b, c) {\n return ka(a, b[c + 0]);\n }, function (a,\n b, c) {\n return ka(b[c - 1], b[c + 0]);\n }, function (a, b, c) {\n return ka(b[c + 0], b[c + 1]);\n }, function (a, b, c) {\n return ka(ka(a, b[c - 1]), ka(b[c + 0], b[c + 1]));\n }, function (a, b, c) {\n return Math.abs((a >> 24 & 255) - (b[c - 1] >> 24 & 255)) - Math.abs((b[c + 0] >> 24 & 255) - (b[c - 1] >> 24 & 255)) + (Math.abs((a >> 16 & 255) - (b[c - 1] >> 16 & 255)) - Math.abs((b[c + 0] >> 16 & 255) - (b[c - 1] >> 16 & 255))) + (Math.abs((a >> 8 & 255) - (b[c - 1] >> 8 & 255)) - Math.abs((b[c + 0] >> 8 & 255) - (b[c - 1] >> 8 & 255))) + (Math.abs((a & 255) - (b[c - 1] & 255)) - Math.abs((b[c + 0] & 255) - (b[c - 1] & 255))) <= 0 ? b[c + 0] : a;\n }, function (a, b, c) {\n return ($a((a\n >> 24 & 255) + (b[c + 0] >> 24 & 255) - (b[c - 1] >> 24 & 255)) << 24 | $a((a >> 16 & 255) + (b[c + 0] >> 16 & 255) - (b[c - 1] >> 16 & 255)) << 16 | $a((a >> 8 & 255) + (b[c + 0] >> 8 & 255) - (b[c - 1] >> 8 & 255)) << 8 | $a((a & 255) + (b[c + 0] & 255) - (b[c - 1] & 255))) >>> 0;\n }, function (a, b, c) {\n const d = b[c - 1];\n a = ka(a, b[c + 0]);\n return (yb(a >> 24 & 255, d >> 24 & 255) << 24 | yb(a >> 16 & 255, d >> 16 & 255) << 16 | yb(a >> 8 & 255, d >> 8 & 255) << 8 | yb(a >> 0 & 255, d >> 0 & 255)) >>> 0;\n }, Wc, Wc];\n var Xf = {\n Cc: x,\n Bc: x,\n Kc: x,\n };\n var $c = 16;\n var Me = 16;\n var kg = 16;\n var mg = [2, 3, 7];\n var lg = [3, 3, 11];\n var Zf = 0;\n var $f = 1;\n var ag = 2;\n var bg = 3;\n var cg = 4;\n var hg = [Ba + Ge, Ba, Ba, Ba, 40];\n var Ke = 19;\n var ig = [17, 18, 0, 1, 2, 3, 4, 5, 16,\n 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\n ];\n var He = 120;\n var dg = [24, 7, 23, 25, 40, 6, 39, 41, 22, 26, 38, 42, 56, 5, 55, 57, 21, 27, 54, 58, 37, 43, 72, 4, 71, 73, 20, 28, 53, 59, 70, 74, 36, 44, 88, 69, 75, 52, 60, 3, 87, 89, 19, 29, 86, 90, 35, 45, 68, 76, 85, 91, 51, 61, 104, 2, 103, 105, 18, 30, 102, 106, 34, 46, 84, 92, 67, 77, 101, 107, 50, 62, 120, 1, 119, 121, 83, 93, 17, 31, 100, 108, 66, 78, 118, 122, 33, 47, 117, 123, 49, 63, 99, 109, 82, 94, 0, 116, 124, 65, 79, 16, 32, 98, 110, 48, 115, 125, 81, 95, 64, 114, 126, 97, 111, 80, 113, 127, 96, 112];\n var Jb = 1 << ea - 1;\n var Za = U(256, 0);\n var xb = U(256, 0);\n var vb = U(256, la);\n var wb = U(256, la);\n var ia = U(dd - J, x);\n var Hb = U(dd\n - J, x);\n var Xe = 0;\n var V = Array(Cc);\n var vg = [function (a, b, c, d, e, f, k, h, n, l, m, t, q) {\n Ca(a, b, c, d, e, f, k, h, n, l, m, t, q, hc, 3);\n }, Se, function (a, b, c, d, e, f, k, h, n, l, m, t, q) {\n Ca(a, b, c, d, e, f, k, h, n, l, m, t, q, Vc, 3);\n }, Te, Ue, Ve, function (a, b, c, d, e, f, k, h, n, l, m, t, q) {\n Ca(a, b, c, d, e, f, k, h, n, l, m, t, q, le, 2);\n }, Se, Te, Ue, Ve];\n this.Hd = function (a, b, c, d) {\n return lb(Qa, a, b, c, d);\n };\n this.Id = function (a, b, c, d) {\n return lb(jb, a, b, c, d);\n };\n this.Jd = function (a, b, c, d) {\n return lb(kb, a, b, c, d);\n };\n this.Ed = function (a, b, c, d) {\n return lb(Ab, a, b, c, d);\n };\n this.Fd = function (a, b, c, d) {\n return lb(Zc,\n a, b, c, d);\n };\n this.Gd = function (a, b, c, d) {\n return lb(Pa, a, b, c, d);\n };\n this.WebPDecode = this.Dd = function (a, b, c) {\n const d = M(df);\n let e = 'VP8StatusCode';\n if (c == p) return ta;\n e = hd(a, [0], [b], c.input);\n if (e != L) return e == Z ? W : e;\n d.j = c.j;\n d.Qa = c.Qa;\n return e = cf(a, 0, [b], d);\n };\n};\n" - }, - { - "id": 11, - "identifier": "F:\\tweb\\node_modules\\iobuffer\\lib-esm\\text-encoding-polyfill.js", - "name": "./node_modules/iobuffer/lib-esm/text-encoding-polyfill.js", - "index": 7, - "index2": 1, - "size": 7028, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\iobuffer\\lib-esm\\utf8.browser.js", - "issuerId": null, - "issuerName": "./node_modules/iobuffer/lib-esm/utf8.browser.js", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "name": "./node_modules/fast-png/lib-esm/index.js", - "profile": { - "factory": 2180, - "building": 1082 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "name": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "profile": { - "factory": 21, - "building": 92, - "dependencies": 43 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\iobuffer\\lib-esm\\IOBuffer.js", - "name": "./node_modules/iobuffer/lib-esm/IOBuffer.js", - "profile": { - "factory": 48, - "building": 7 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\iobuffer\\lib-esm\\utf8.browser.js", - "name": "./node_modules/iobuffer/lib-esm/utf8.browser.js", - "profile": { - "factory": 6, - "building": 16 - } - } - ], - "profile": { - "factory": 51, - "building": 5 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 20, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js 1f5c27d337cdd358fe6548a5eda250ca", - "module": "./node_modules/fast-png/lib-esm/index.js + 7 modules", - "moduleName": "./node_modules/fast-png/lib-esm/index.js + 7 modules", - "type": "harmony side effect evaluation", - "userRequest": "./text-encoding-polyfill", - "loc": "1:0-34" - } - ], - "usedExports": false, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 6, - "source": "\"use strict\";\r\n/*\r\n * Copyright 2017 Sam Thorogood. All rights reserved.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\r\n * use this file except in compliance with the License. You may obtain a copy of\r\n * the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\r\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\r\n * License for the specific language governing permissions and limitations under\r\n * the License.\r\n */\r\n(function (scope) {\r\n 'use strict';\r\n // fail early\r\n if (scope['TextEncoder'] && scope['TextDecoder']) {\r\n return false;\r\n }\r\n /**\r\n * @constructor\r\n * @param {string=} utfLabel\r\n */\r\n function FastTextEncoder(utfLabel = 'utf-8') {\r\n if (utfLabel !== 'utf-8') {\r\n throw new RangeError(`Failed to construct 'TextEncoder': The encoding label provided ('${utfLabel}') is invalid.`);\r\n }\r\n }\r\n Object.defineProperty(FastTextEncoder.prototype, 'encoding', {\r\n value: 'utf-8',\r\n });\r\n /**\r\n * @param {string} string\r\n * @param {{stream: boolean}=} options\r\n * @return {!Uint8Array}\r\n */\r\n FastTextEncoder.prototype.encode = function (string, options = { stream: false }) {\r\n if (options.stream) {\r\n throw new Error(`Failed to encode: the 'stream' option is unsupported.`);\r\n }\r\n let pos = 0;\r\n const len = string.length;\r\n const out = [];\r\n let at = 0; // output position\r\n let tlen = Math.max(32, len + (len >> 1) + 7); // 1.5x size\r\n let target = new Uint8Array((tlen >> 3) << 3); // ... but at 8 byte offset\r\n while (pos < len) {\r\n let value = string.charCodeAt(pos++);\r\n if (value >= 0xd800 && value <= 0xdbff) {\r\n // high surrogate\r\n if (pos < len) {\r\n const extra = string.charCodeAt(pos);\r\n if ((extra & 0xfc00) === 0xdc00) {\r\n ++pos;\r\n value = ((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000;\r\n }\r\n }\r\n if (value >= 0xd800 && value <= 0xdbff) {\r\n continue; // drop lone surrogate\r\n }\r\n }\r\n // expand the buffer if we couldn't write 4 bytes\r\n if (at + 4 > target.length) {\r\n tlen += 8; // minimum extra\r\n tlen *= 1.0 + (pos / string.length) * 2; // take 2x the remaining\r\n tlen = (tlen >> 3) << 3; // 8 byte offset\r\n const update = new Uint8Array(tlen);\r\n update.set(target);\r\n target = update;\r\n }\r\n if ((value & 0xffffff80) === 0) {\r\n // 1-byte\r\n target[at++] = value; // ASCII\r\n continue;\r\n }\r\n else if ((value & 0xfffff800) === 0) {\r\n // 2-byte\r\n target[at++] = ((value >> 6) & 0x1f) | 0xc0;\r\n }\r\n else if ((value & 0xffff0000) === 0) {\r\n // 3-byte\r\n target[at++] = ((value >> 12) & 0x0f) | 0xe0;\r\n target[at++] = ((value >> 6) & 0x3f) | 0x80;\r\n }\r\n else if ((value & 0xffe00000) === 0) {\r\n // 4-byte\r\n target[at++] = ((value >> 18) & 0x07) | 0xf0;\r\n target[at++] = ((value >> 12) & 0x3f) | 0x80;\r\n target[at++] = ((value >> 6) & 0x3f) | 0x80;\r\n }\r\n else {\r\n // FIXME: do we care\r\n continue;\r\n }\r\n target[at++] = (value & 0x3f) | 0x80;\r\n }\r\n return target.slice(0, at);\r\n };\r\n /**\r\n * @constructor\r\n * @param {string=} utfLabel\r\n * @param {{fatal: boolean}=} options\r\n */\r\n function FastTextDecoder(utfLabel = 'utf-8', options = { fatal: false }) {\r\n if (utfLabel !== 'utf-8') {\r\n throw new RangeError(`Failed to construct 'TextDecoder': The encoding label provided ('${utfLabel}') is invalid.`);\r\n }\r\n if (options.fatal) {\r\n throw new Error(`Failed to construct 'TextDecoder': the 'fatal' option is unsupported.`);\r\n }\r\n }\r\n Object.defineProperty(FastTextDecoder.prototype, 'encoding', {\r\n value: 'utf-8',\r\n });\r\n Object.defineProperty(FastTextDecoder.prototype, 'fatal', { value: false });\r\n Object.defineProperty(FastTextDecoder.prototype, 'ignoreBOM', {\r\n value: false,\r\n });\r\n /**\r\n * @param {(!ArrayBuffer|!ArrayBufferView)} buffer\r\n * @param {{stream: boolean}=} options\r\n */\r\n FastTextDecoder.prototype.decode = function (buffer, options = { stream: false }) {\r\n if (options['stream']) {\r\n throw new Error(`Failed to decode: the 'stream' option is unsupported.`);\r\n }\r\n const bytes = new Uint8Array(buffer);\r\n let pos = 0;\r\n const len = bytes.length;\r\n const out = [];\r\n while (pos < len) {\r\n const byte1 = bytes[pos++];\r\n if (byte1 === 0) {\r\n break; // NULL\r\n }\r\n if ((byte1 & 0x80) === 0) {\r\n // 1-byte\r\n out.push(byte1);\r\n }\r\n else if ((byte1 & 0xe0) === 0xc0) {\r\n // 2-byte\r\n const byte2 = bytes[pos++] & 0x3f;\r\n out.push(((byte1 & 0x1f) << 6) | byte2);\r\n }\r\n else if ((byte1 & 0xf0) === 0xe0) {\r\n const byte2 = bytes[pos++] & 0x3f;\r\n const byte3 = bytes[pos++] & 0x3f;\r\n out.push(((byte1 & 0x1f) << 12) | (byte2 << 6) | byte3);\r\n }\r\n else if ((byte1 & 0xf8) === 0xf0) {\r\n const byte2 = bytes[pos++] & 0x3f;\r\n const byte3 = bytes[pos++] & 0x3f;\r\n const byte4 = bytes[pos++] & 0x3f;\r\n // this can be > 0xffff, so possibly generate surrogates\r\n let codepoint = ((byte1 & 0x07) << 0x12) | (byte2 << 0x0c) | (byte3 << 0x06) | byte4;\r\n if (codepoint > 0xffff) {\r\n // codepoint &= ~0x10000;\r\n codepoint -= 0x10000;\r\n out.push(((codepoint >>> 10) & 0x3ff) | 0xd800);\r\n codepoint = 0xdc00 | (codepoint & 0x3ff);\r\n }\r\n out.push(codepoint);\r\n }\r\n else {\r\n // FIXME: we're ignoring this\r\n }\r\n }\r\n return String.fromCharCode.apply(null, out);\r\n };\r\n scope['TextEncoder'] = FastTextEncoder;\r\n scope['TextDecoder'] = FastTextDecoder;\r\n})(typeof window !== 'undefined'\r\n ? window\r\n : typeof self !== 'undefined'\r\n ? self\r\n : this);\r\n//# sourceMappingURL=text-encoding-polyfill.js.map" - }, - { - "id": 12, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\deflate.js", - "name": "./node_modules/pako/lib/deflate.js", - "index": 10, - "index2": 12, - "size": 11074, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\pako\\index.js", - "issuerId": 1, - "issuerName": "./node_modules/pako/index.js", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "name": "./node_modules/fast-png/lib-esm/index.js", - "profile": { - "factory": 2180, - "building": 1082 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "name": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "profile": { - "factory": 21, - "building": 92, - "dependencies": 43 - } - }, - { - "id": 1, - "identifier": "F:\\tweb\\node_modules\\pako\\index.js", - "name": "./node_modules/pako/index.js", - "profile": { - "factory": 48, - "building": 7 - } - } - ], - "profile": { - "factory": 11, - "building": 13, - "dependencies": 8 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 1, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\index.js", - "module": "./node_modules/pako/index.js", - "moduleName": "./node_modules/pako/index.js", - "type": "cjs require", - "userRequest": "./lib/deflate", - "loc": "6:16-40" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 5, - "source": "'use strict';\n\n\nvar zlib_deflate = require('./zlib/deflate');\nvar utils = require('./utils/common');\nvar strings = require('./utils/strings');\nvar msg = require('./zlib/messages');\nvar ZStream = require('./zlib/zstream');\n\nvar toString = Object.prototype.toString;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nvar Z_NO_FLUSH = 0;\nvar Z_FINISH = 4;\n\nvar Z_OK = 0;\nvar Z_STREAM_END = 1;\nvar Z_SYNC_FLUSH = 2;\n\nvar Z_DEFAULT_COMPRESSION = -1;\n\nvar Z_DEFAULT_STRATEGY = 0;\n\nvar Z_DEFLATED = 8;\n\n/* ===========================================================================*/\n\n\n/**\n * class Deflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[deflate]],\n * [[deflateRaw]] and [[gzip]].\n **/\n\n/* internal\n * Deflate.chunks -> Array\n *\n * Chunks of output data, if [[Deflate#onData]] not overridden.\n **/\n\n/**\n * Deflate.result -> Uint8Array|Array\n *\n * Compressed result, generated by default [[Deflate#onData]]\n * and [[Deflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Deflate#push]] with `Z_FINISH` / `true` param) or if you\n * push a chunk with explicit flush (call [[Deflate#push]] with\n * `Z_SYNC_FLUSH` param).\n **/\n\n/**\n * Deflate.err -> Number\n *\n * Error code after deflate finished. 0 (Z_OK) on success.\n * You will not need it in real life, because deflate errors\n * are possible only on wrong options or bad `onData` / `onEnd`\n * custom handlers.\n **/\n\n/**\n * Deflate.msg -> String\n *\n * Error message, if [[Deflate.err]] != 0\n **/\n\n\n/**\n * new Deflate(options)\n * - options (Object): zlib deflate options.\n *\n * Creates new deflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `level`\n * - `windowBits`\n * - `memLevel`\n * - `strategy`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw deflate\n * - `gzip` (Boolean) - create gzip wrapper\n * - `to` (String) - if equal to 'string', then result will be \"binary string\"\n * (each char code [0..255])\n * - `header` (Object) - custom header for gzip\n * - `text` (Boolean) - true if compressed data believed to be text\n * - `time` (Number) - modification time, unix timestamp\n * - `os` (Number) - operation system code\n * - `extra` (Array) - array of bytes with extra data (max 65536)\n * - `name` (String) - file name (binary string)\n * - `comment` (String) - comment (binary string)\n * - `hcrc` (Boolean) - true if header crc should be added\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])\n * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * var deflate = new pako.Deflate({ level: 3});\n *\n * deflate.push(chunk1, false);\n * deflate.push(chunk2, true); // true -> last chunk\n *\n * if (deflate.err) { throw new Error(deflate.err); }\n *\n * console.log(deflate.result);\n * ```\n **/\nfunction Deflate(options) {\n if (!(this instanceof Deflate)) return new Deflate(options);\n\n this.options = utils.assign({\n level: Z_DEFAULT_COMPRESSION,\n method: Z_DEFLATED,\n chunkSize: 16384,\n windowBits: 15,\n memLevel: 8,\n strategy: Z_DEFAULT_STRATEGY,\n to: ''\n }, options || {});\n\n var opt = this.options;\n\n if (opt.raw && (opt.windowBits > 0)) {\n opt.windowBits = -opt.windowBits;\n }\n\n else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) {\n opt.windowBits += 16;\n }\n\n this.err = 0; // error code, if happens (0 = Z_OK)\n this.msg = ''; // error message\n this.ended = false; // used to avoid multiple onEnd() calls\n this.chunks = []; // chunks of compressed data\n\n this.strm = new ZStream();\n this.strm.avail_out = 0;\n\n var status = zlib_deflate.deflateInit2(\n this.strm,\n opt.level,\n opt.method,\n opt.windowBits,\n opt.memLevel,\n opt.strategy\n );\n\n if (status !== Z_OK) {\n throw new Error(msg[status]);\n }\n\n if (opt.header) {\n zlib_deflate.deflateSetHeader(this.strm, opt.header);\n }\n\n if (opt.dictionary) {\n var dict;\n // Convert data if needed\n if (typeof opt.dictionary === 'string') {\n // If we need to compress text, change encoding to utf8.\n dict = strings.string2buf(opt.dictionary);\n } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {\n dict = new Uint8Array(opt.dictionary);\n } else {\n dict = opt.dictionary;\n }\n\n status = zlib_deflate.deflateSetDictionary(this.strm, dict);\n\n if (status !== Z_OK) {\n throw new Error(msg[status]);\n }\n\n this._dict_set = true;\n }\n}\n\n/**\n * Deflate#push(data[, mode]) -> Boolean\n * - data (Uint8Array|Array|ArrayBuffer|String): input data. Strings will be\n * converted to utf8 byte sequence.\n * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.\n *\n * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with\n * new compressed chunks. Returns `true` on success. The last data block must have\n * mode Z_FINISH (or `true`). That will flush internal pending buffers and call\n * [[Deflate#onEnd]]. For interim explicit flushes (without ending the stream) you\n * can use mode Z_SYNC_FLUSH, keeping the compression context.\n *\n * On fail call [[Deflate#onEnd]] with error code and return false.\n *\n * We strongly recommend to use `Uint8Array` on input for best speed (output\n * array format is detected automatically). Also, don't skip last param and always\n * use the same type in your code (boolean or number). That will improve JS speed.\n *\n * For regular `Array`-s make sure all elements are [0..255].\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true); // push last chunk\n * ```\n **/\nDeflate.prototype.push = function (data, mode) {\n var strm = this.strm;\n var chunkSize = this.options.chunkSize;\n var status, _mode;\n\n if (this.ended) { return false; }\n\n _mode = (mode === ~~mode) ? mode : ((mode === true) ? Z_FINISH : Z_NO_FLUSH);\n\n // Convert data if needed\n if (typeof data === 'string') {\n // If we need to compress text, change encoding to utf8.\n strm.input = strings.string2buf(data);\n } else if (toString.call(data) === '[object ArrayBuffer]') {\n strm.input = new Uint8Array(data);\n } else {\n strm.input = data;\n }\n\n strm.next_in = 0;\n strm.avail_in = strm.input.length;\n\n do {\n if (strm.avail_out === 0) {\n strm.output = new utils.Buf8(chunkSize);\n strm.next_out = 0;\n strm.avail_out = chunkSize;\n }\n status = zlib_deflate.deflate(strm, _mode); /* no bad return value */\n\n if (status !== Z_STREAM_END && status !== Z_OK) {\n this.onEnd(status);\n this.ended = true;\n return false;\n }\n if (strm.avail_out === 0 || (strm.avail_in === 0 && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH))) {\n if (this.options.to === 'string') {\n this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out)));\n } else {\n this.onData(utils.shrinkBuf(strm.output, strm.next_out));\n }\n }\n } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END);\n\n // Finalize on the last chunk.\n if (_mode === Z_FINISH) {\n status = zlib_deflate.deflateEnd(this.strm);\n this.onEnd(status);\n this.ended = true;\n return status === Z_OK;\n }\n\n // callback interim results if Z_SYNC_FLUSH.\n if (_mode === Z_SYNC_FLUSH) {\n this.onEnd(Z_OK);\n strm.avail_out = 0;\n return true;\n }\n\n return true;\n};\n\n\n/**\n * Deflate#onData(chunk) -> Void\n * - chunk (Uint8Array|Array|String): output data. Type of array depends\n * on js engine support. When string output requested, each chunk\n * will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nDeflate.prototype.onData = function (chunk) {\n this.chunks.push(chunk);\n};\n\n\n/**\n * Deflate#onEnd(status) -> Void\n * - status (Number): deflate status. 0 (Z_OK) on success,\n * other if not.\n *\n * Called once after you tell deflate that the input stream is\n * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)\n * or if an error happened. By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nDeflate.prototype.onEnd = function (status) {\n // On success - join\n if (status === Z_OK) {\n if (this.options.to === 'string') {\n this.result = this.chunks.join('');\n } else {\n this.result = utils.flattenChunks(this.chunks);\n }\n }\n this.chunks = [];\n this.err = status;\n this.msg = this.strm.msg;\n};\n\n\n/**\n * deflate(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * Compress `data` with deflate algorithm and `options`.\n *\n * Supported options are:\n *\n * - level\n * - windowBits\n * - memLevel\n * - strategy\n * - dictionary\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n * negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be \"binary string\"\n * (each char code [0..255])\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , data = Uint8Array([1,2,3,4,5,6,7,8,9]);\n *\n * console.log(pako.deflate(data));\n * ```\n **/\nfunction deflate(input, options) {\n var deflator = new Deflate(options);\n\n deflator.push(input, true);\n\n // That will never happens, if you don't cheat with options :)\n if (deflator.err) { throw deflator.msg || msg[deflator.err]; }\n\n return deflator.result;\n}\n\n\n/**\n * deflateRaw(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction deflateRaw(input, options) {\n options = options || {};\n options.raw = true;\n return deflate(input, options);\n}\n\n\n/**\n * gzip(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but create gzip wrapper instead of\n * deflate one.\n **/\nfunction gzip(input, options) {\n options = options || {};\n options.gzip = true;\n return deflate(input, options);\n}\n\n\nexports.Deflate = Deflate;\nexports.deflate = deflate;\nexports.deflateRaw = deflateRaw;\nexports.gzip = gzip;\n" - }, - { - "id": 13, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\deflate.js", - "name": "./node_modules/pako/lib/zlib/deflate.js", - "index": 11, - "index2": 9, - "size": 61184, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\pako\\lib\\deflate.js", - "issuerId": 12, - "issuerName": "./node_modules/pako/lib/deflate.js", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "name": "./node_modules/fast-png/lib-esm/index.js", - "profile": { - "factory": 2180, - "building": 1082 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "name": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "profile": { - "factory": 21, - "building": 92, - "dependencies": 43 - } - }, - { - "id": 1, - "identifier": "F:\\tweb\\node_modules\\pako\\index.js", - "name": "./node_modules/pako/index.js", - "profile": { - "factory": 48, - "building": 7 - } - }, - { - "id": 12, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\deflate.js", - "name": "./node_modules/pako/lib/deflate.js", - "profile": { - "factory": 11, - "building": 13, - "dependencies": 8 - } - } - ], - "profile": { - "factory": 16, - "building": 21, - "dependencies": 2 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 12, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\lib\\deflate.js", - "module": "./node_modules/pako/lib/deflate.js", - "moduleName": "./node_modules/pako/lib/deflate.js", - "type": "cjs require", - "userRequest": "./zlib/deflate", - "loc": "4:19-44" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 6, - "source": "'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils = require('../utils/common');\nvar trees = require('./trees');\nvar adler32 = require('./adler32');\nvar crc32 = require('./crc32');\nvar msg = require('./messages');\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n/* Allowed flush values; see deflate() and inflate() below for details */\nvar Z_NO_FLUSH = 0;\nvar Z_PARTIAL_FLUSH = 1;\n//var Z_SYNC_FLUSH = 2;\nvar Z_FULL_FLUSH = 3;\nvar Z_FINISH = 4;\nvar Z_BLOCK = 5;\n//var Z_TREES = 6;\n\n\n/* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\nvar Z_OK = 0;\nvar Z_STREAM_END = 1;\n//var Z_NEED_DICT = 2;\n//var Z_ERRNO = -1;\nvar Z_STREAM_ERROR = -2;\nvar Z_DATA_ERROR = -3;\n//var Z_MEM_ERROR = -4;\nvar Z_BUF_ERROR = -5;\n//var Z_VERSION_ERROR = -6;\n\n\n/* compression levels */\n//var Z_NO_COMPRESSION = 0;\n//var Z_BEST_SPEED = 1;\n//var Z_BEST_COMPRESSION = 9;\nvar Z_DEFAULT_COMPRESSION = -1;\n\n\nvar Z_FILTERED = 1;\nvar Z_HUFFMAN_ONLY = 2;\nvar Z_RLE = 3;\nvar Z_FIXED = 4;\nvar Z_DEFAULT_STRATEGY = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\n//var Z_BINARY = 0;\n//var Z_TEXT = 1;\n//var Z_ASCII = 1; // = Z_TEXT\nvar Z_UNKNOWN = 2;\n\n\n/* The deflate compression method */\nvar Z_DEFLATED = 8;\n\n/*============================================================================*/\n\n\nvar MAX_MEM_LEVEL = 9;\n/* Maximum value for memLevel in deflateInit2 */\nvar MAX_WBITS = 15;\n/* 32K LZ77 window */\nvar DEF_MEM_LEVEL = 8;\n\n\nvar LENGTH_CODES = 29;\n/* number of length codes, not counting the special END_BLOCK code */\nvar LITERALS = 256;\n/* number of literal bytes 0..255 */\nvar L_CODES = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\nvar D_CODES = 30;\n/* number of distance codes */\nvar BL_CODES = 19;\n/* number of codes used to transfer the bit lengths */\nvar HEAP_SIZE = 2 * L_CODES + 1;\n/* maximum heap size */\nvar MAX_BITS = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nvar MIN_MATCH = 3;\nvar MAX_MATCH = 258;\nvar MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nvar PRESET_DICT = 0x20;\n\nvar INIT_STATE = 42;\nvar EXTRA_STATE = 69;\nvar NAME_STATE = 73;\nvar COMMENT_STATE = 91;\nvar HCRC_STATE = 103;\nvar BUSY_STATE = 113;\nvar FINISH_STATE = 666;\n\nvar BS_NEED_MORE = 1; /* block not completed, need more input or more output */\nvar BS_BLOCK_DONE = 2; /* block flush performed */\nvar BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */\nvar BS_FINISH_DONE = 4; /* finish done, accept no more input or output */\n\nvar OS_CODE = 0x03; // Unix :) . Don't detect, use this default.\n\nfunction err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}\n\nfunction rank(f) {\n return ((f) << 1) - ((f) > 4 ? 9 : 0);\n}\n\nfunction zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }\n\n\n/* =========================================================================\n * Flush as much pending output as possible. All deflate() output goes\n * through this function so some applications may wish to modify it\n * to avoid allocating a large strm->output buffer and copying into it.\n * (See also read_buf()).\n */\nfunction flush_pending(strm) {\n var s = strm.state;\n\n //_tr_flush_bits(s);\n var len = s.pending;\n if (len > strm.avail_out) {\n len = strm.avail_out;\n }\n if (len === 0) { return; }\n\n utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out);\n strm.next_out += len;\n s.pending_out += len;\n strm.total_out += len;\n strm.avail_out -= len;\n s.pending -= len;\n if (s.pending === 0) {\n s.pending_out = 0;\n }\n}\n\n\nfunction flush_block_only(s, last) {\n trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last);\n s.block_start = s.strstart;\n flush_pending(s.strm);\n}\n\n\nfunction put_byte(s, b) {\n s.pending_buf[s.pending++] = b;\n}\n\n\n/* =========================================================================\n * Put a short in the pending buffer. The 16-bit value is put in MSB order.\n * IN assertion: the stream state is correct and there is enough room in\n * pending_buf.\n */\nfunction putShortMSB(s, b) {\n// put_byte(s, (Byte)(b >> 8));\n// put_byte(s, (Byte)(b & 0xff));\n s.pending_buf[s.pending++] = (b >>> 8) & 0xff;\n s.pending_buf[s.pending++] = b & 0xff;\n}\n\n\n/* ===========================================================================\n * Read a new buffer from the current input stream, update the adler32\n * and total number of bytes read. All deflate() input goes through\n * this function so some applications may wish to modify it to avoid\n * allocating a large strm->input buffer and copying from it.\n * (See also flush_pending()).\n */\nfunction read_buf(strm, buf, start, size) {\n var len = strm.avail_in;\n\n if (len > size) { len = size; }\n if (len === 0) { return 0; }\n\n strm.avail_in -= len;\n\n // zmemcpy(buf, strm->next_in, len);\n utils.arraySet(buf, strm.input, strm.next_in, len, start);\n if (strm.state.wrap === 1) {\n strm.adler = adler32(strm.adler, buf, len, start);\n }\n\n else if (strm.state.wrap === 2) {\n strm.adler = crc32(strm.adler, buf, len, start);\n }\n\n strm.next_in += len;\n strm.total_in += len;\n\n return len;\n}\n\n\n/* ===========================================================================\n * Set match_start to the longest match starting at the given string and\n * return its length. Matches shorter or equal to prev_length are discarded,\n * in which case the result is equal to prev_length and match_start is\n * garbage.\n * IN assertions: cur_match is the head of the hash chain for the current\n * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1\n * OUT assertion: the match length is not greater than s->lookahead.\n */\nfunction longest_match(s, cur_match) {\n var chain_length = s.max_chain_length; /* max hash chain length */\n var scan = s.strstart; /* current string */\n var match; /* matched string */\n var len; /* length of current match */\n var best_len = s.prev_length; /* best match length so far */\n var nice_match = s.nice_match; /* stop if match long enough */\n var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ?\n s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/;\n\n var _win = s.window; // shortcut\n\n var wmask = s.w_mask;\n var prev = s.prev;\n\n /* Stop when cur_match becomes <= limit. To simplify the code,\n * we prevent matches with the string of window index 0.\n */\n\n var strend = s.strstart + MAX_MATCH;\n var scan_end1 = _win[scan + best_len - 1];\n var scan_end = _win[scan + best_len];\n\n /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.\n * It is easy to get rid of this optimization if necessary.\n */\n // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, \"Code too clever\");\n\n /* Do not waste too much time if we already have a good match: */\n if (s.prev_length >= s.good_match) {\n chain_length >>= 2;\n }\n /* Do not look for matches beyond the end of the input. This is necessary\n * to make deflate deterministic.\n */\n if (nice_match > s.lookahead) { nice_match = s.lookahead; }\n\n // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, \"need lookahead\");\n\n do {\n // Assert(cur_match < s->strstart, \"no future\");\n match = cur_match;\n\n /* Skip to next match if the match length cannot increase\n * or if the match length is less than 2. Note that the checks below\n * for insufficient lookahead only occur occasionally for performance\n * reasons. Therefore uninitialized memory will be accessed, and\n * conditional jumps will be made that depend on those values.\n * However the length of the match is limited to the lookahead, so\n * the output of deflate is not affected by the uninitialized values.\n */\n\n if (_win[match + best_len] !== scan_end ||\n _win[match + best_len - 1] !== scan_end1 ||\n _win[match] !== _win[scan] ||\n _win[++match] !== _win[scan + 1]) {\n continue;\n }\n\n /* The check at best_len-1 can be removed because it will be made\n * again later. (This heuristic is not always a win.)\n * It is not necessary to compare scan[2] and match[2] since they\n * are always equal when the other bytes match, given that\n * the hash keys are equal and that HASH_BITS >= 8.\n */\n scan += 2;\n match++;\n // Assert(*scan == *match, \"match[2]?\");\n\n /* We check for insufficient lookahead only every 8th comparison;\n * the 256th check will be made at strstart+258.\n */\n do {\n /*jshint noempty:false*/\n } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n scan < strend);\n\n // Assert(scan <= s->window+(unsigned)(s->window_size-1), \"wild scan\");\n\n len = MAX_MATCH - (strend - scan);\n scan = strend - MAX_MATCH;\n\n if (len > best_len) {\n s.match_start = cur_match;\n best_len = len;\n if (len >= nice_match) {\n break;\n }\n scan_end1 = _win[scan + best_len - 1];\n scan_end = _win[scan + best_len];\n }\n } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0);\n\n if (best_len <= s.lookahead) {\n return best_len;\n }\n return s.lookahead;\n}\n\n\n/* ===========================================================================\n * Fill the window when the lookahead becomes insufficient.\n * Updates strstart and lookahead.\n *\n * IN assertion: lookahead < MIN_LOOKAHEAD\n * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n * At least one byte has been read, or avail_in == 0; reads are\n * performed for at least two bytes (required for the zip translate_eol\n * option -- not supported here).\n */\nfunction fill_window(s) {\n var _w_size = s.w_size;\n var p, n, m, more, str;\n\n //Assert(s->lookahead < MIN_LOOKAHEAD, \"already enough lookahead\");\n\n do {\n more = s.window_size - s.lookahead - s.strstart;\n\n // JS ints have 32 bit, block below not needed\n /* Deal with !@#$% 64K limit: */\n //if (sizeof(int) <= 2) {\n // if (more == 0 && s->strstart == 0 && s->lookahead == 0) {\n // more = wsize;\n //\n // } else if (more == (unsigned)(-1)) {\n // /* Very unlikely, but possible on 16 bit machine if\n // * strstart == 0 && lookahead == 1 (input done a byte at time)\n // */\n // more--;\n // }\n //}\n\n\n /* If the window is almost full and there is insufficient lookahead,\n * move the upper half to the lower one to make room in the upper half.\n */\n if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) {\n\n utils.arraySet(s.window, s.window, _w_size, _w_size, 0);\n s.match_start -= _w_size;\n s.strstart -= _w_size;\n /* we now have strstart >= MAX_DIST */\n s.block_start -= _w_size;\n\n /* Slide the hash table (could be avoided with 32 bit values\n at the expense of memory usage). We slide even when level == 0\n to keep the hash table consistent if we switch back to level > 0\n later. (Using level 0 permanently is not an optimal usage of\n zlib, so we don't care about this pathological case.)\n */\n\n n = s.hash_size;\n p = n;\n do {\n m = s.head[--p];\n s.head[p] = (m >= _w_size ? m - _w_size : 0);\n } while (--n);\n\n n = _w_size;\n p = n;\n do {\n m = s.prev[--p];\n s.prev[p] = (m >= _w_size ? m - _w_size : 0);\n /* If n is not on any hash chain, prev[n] is garbage but\n * its value will never be used.\n */\n } while (--n);\n\n more += _w_size;\n }\n if (s.strm.avail_in === 0) {\n break;\n }\n\n /* If there was no sliding:\n * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n * more == window_size - lookahead - strstart\n * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n * => more >= window_size - 2*WSIZE + 2\n * In the BIG_MEM or MMAP case (not yet supported),\n * window_size == input_size + MIN_LOOKAHEAD &&\n * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n * Otherwise, window_size == 2*WSIZE so more >= 2.\n * If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n */\n //Assert(more >= 2, \"more < 2\");\n n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more);\n s.lookahead += n;\n\n /* Initialize the hash value now that we have some input: */\n if (s.lookahead + s.insert >= MIN_MATCH) {\n str = s.strstart - s.insert;\n s.ins_h = s.window[str];\n\n /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask;\n//#if MIN_MATCH != 3\n// Call update_hash() MIN_MATCH-3 more times\n//#endif\n while (s.insert) {\n /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask;\n\n s.prev[str & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = str;\n str++;\n s.insert--;\n if (s.lookahead + s.insert < MIN_MATCH) {\n break;\n }\n }\n }\n /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,\n * but this is not important since only literal bytes will be emitted.\n */\n\n } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0);\n\n /* If the WIN_INIT bytes after the end of the current data have never been\n * written, then zero those bytes in order to avoid memory check reports of\n * the use of uninitialized (or uninitialised as Julian writes) bytes by\n * the longest match routines. Update the high water mark for the next\n * time through here. WIN_INIT is set to MAX_MATCH since the longest match\n * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.\n */\n// if (s.high_water < s.window_size) {\n// var curr = s.strstart + s.lookahead;\n// var init = 0;\n//\n// if (s.high_water < curr) {\n// /* Previous high water mark below current data -- zero WIN_INIT\n// * bytes or up to end of window, whichever is less.\n// */\n// init = s.window_size - curr;\n// if (init > WIN_INIT)\n// init = WIN_INIT;\n// zmemzero(s->window + curr, (unsigned)init);\n// s->high_water = curr + init;\n// }\n// else if (s->high_water < (ulg)curr + WIN_INIT) {\n// /* High water mark at or above current data, but below current data\n// * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up\n// * to end of window, whichever is less.\n// */\n// init = (ulg)curr + WIN_INIT - s->high_water;\n// if (init > s->window_size - s->high_water)\n// init = s->window_size - s->high_water;\n// zmemzero(s->window + s->high_water, (unsigned)init);\n// s->high_water += init;\n// }\n// }\n//\n// Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,\n// \"not enough room for search\");\n}\n\n/* ===========================================================================\n * Copy without compression as much as possible from the input stream, return\n * the current block state.\n * This function does not insert new strings in the dictionary since\n * uncompressible data is probably not useful. This function is used\n * only for the level=0 compression option.\n * NOTE: this function should be optimized to avoid extra copying from\n * window to pending_buf.\n */\nfunction deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}\n\n/* ===========================================================================\n * Compress as much as possible from the input stream, return the current\n * block state.\n * This function does not perform lazy evaluation of matches and inserts\n * new strings in the dictionary only for unmatched strings or for short\n * matches. It is used only for the fast compression options.\n */\nfunction deflate_fast(s, flush) {\n var hash_head; /* head of the hash chain */\n var bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) {\n break; /* flush the current block */\n }\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0/*NIL*/;\n if (s.lookahead >= MIN_MATCH) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n * At this point we have always match_length < MIN_MATCH\n */\n if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n }\n if (s.match_length >= MIN_MATCH) {\n // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only\n\n /*** _tr_tally_dist(s, s.strstart - s.match_start,\n s.match_length - MIN_MATCH, bflush); ***/\n bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH);\n\n s.lookahead -= s.match_length;\n\n /* Insert new strings in the hash table only if the match length\n * is not too large. This saves time but degrades compression.\n */\n if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) {\n s.match_length--; /* string at strstart already in table */\n do {\n s.strstart++;\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n /* strstart never exceeds WSIZE-MAX_MATCH, so there are\n * always MIN_MATCH bytes ahead.\n */\n } while (--s.match_length !== 0);\n s.strstart++;\n } else\n {\n s.strstart += s.match_length;\n s.match_length = 0;\n s.ins_h = s.window[s.strstart];\n /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask;\n\n//#if MIN_MATCH != 3\n// Call UPDATE_HASH() MIN_MATCH-3 more times\n//#endif\n /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not\n * matter since it will be recomputed at next deflate call.\n */\n }\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s.window[s.strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1);\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n}\n\n/* ===========================================================================\n * Same as above, but achieves better compression. We use a lazy\n * evaluation for matches: a match is finally adopted only if there is\n * no better match at the next window position.\n */\nfunction deflate_slow(s, flush) {\n var hash_head; /* head of hash chain */\n var bflush; /* set if current block must be flushed */\n\n var max_insert;\n\n /* Process the input block. */\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) { break; } /* flush the current block */\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0/*NIL*/;\n if (s.lookahead >= MIN_MATCH) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n */\n s.prev_length = s.match_length;\n s.prev_match = s.match_start;\n s.match_length = MIN_MATCH - 1;\n\n if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match &&\n s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n\n if (s.match_length <= 5 &&\n (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) {\n\n /* If prev_match is also MIN_MATCH, match_start is garbage\n * but we will ignore the current match anyway.\n */\n s.match_length = MIN_MATCH - 1;\n }\n }\n /* If there was a match at the previous step and the current\n * match is not better, output the previous match:\n */\n if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) {\n max_insert = s.strstart + s.lookahead - MIN_MATCH;\n /* Do not insert strings in hash table beyond this. */\n\n //check_match(s, s.strstart-1, s.prev_match, s.prev_length);\n\n /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,\n s.prev_length - MIN_MATCH, bflush);***/\n bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH);\n /* Insert in hash table all strings up to the end of the match.\n * strstart-1 and strstart are already inserted. If there is not\n * enough lookahead, the last two strings are not inserted in\n * the hash table.\n */\n s.lookahead -= s.prev_length - 1;\n s.prev_length -= 2;\n do {\n if (++s.strstart <= max_insert) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n } while (--s.prev_length !== 0);\n s.match_available = 0;\n s.match_length = MIN_MATCH - 1;\n s.strstart++;\n\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n } else if (s.match_available) {\n /* If there was no match at the previous position, output a\n * single literal. If there was a match but the current match\n * is longer, truncate the previous match to a single literal.\n */\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);\n\n if (bflush) {\n /*** FLUSH_BLOCK_ONLY(s, 0) ***/\n flush_block_only(s, false);\n /***/\n }\n s.strstart++;\n s.lookahead--;\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n } else {\n /* There is no previous match to compare with, wait for\n * the next step to decide.\n */\n s.match_available = 1;\n s.strstart++;\n s.lookahead--;\n }\n }\n //Assert (flush != Z_NO_FLUSH, \"no flush?\");\n if (s.match_available) {\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);\n\n s.match_available = 0;\n }\n s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_BLOCK_DONE;\n}\n\n\n/* ===========================================================================\n * For Z_RLE, simply look for runs of bytes, generate matches only of distance\n * one. Do not maintain a hash table. (It will be regenerated if this run of\n * deflate switches away from Z_RLE.)\n */\nfunction deflate_rle(s, flush) {\n var bflush; /* set if current block must be flushed */\n var prev; /* byte at distance one to match */\n var scan, strend; /* scan goes up to strend for length of run */\n\n var _win = s.window;\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the longest run, plus one for the unrolled loop.\n */\n if (s.lookahead <= MAX_MATCH) {\n fill_window(s);\n if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) { break; } /* flush the current block */\n }\n\n /* See how many times the previous byte repeats */\n s.match_length = 0;\n if (s.lookahead >= MIN_MATCH && s.strstart > 0) {\n scan = s.strstart - 1;\n prev = _win[scan];\n if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) {\n strend = s.strstart + MAX_MATCH;\n do {\n /*jshint noempty:false*/\n } while (prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n scan < strend);\n s.match_length = MAX_MATCH - (strend - scan);\n if (s.match_length > s.lookahead) {\n s.match_length = s.lookahead;\n }\n }\n //Assert(scan <= s->window+(uInt)(s->window_size-1), \"wild scan\");\n }\n\n /* Emit match if have run of MIN_MATCH or longer, else emit literal */\n if (s.match_length >= MIN_MATCH) {\n //check_match(s, s.strstart, s.strstart - 1, s.match_length);\n\n /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/\n bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH);\n\n s.lookahead -= s.match_length;\n s.strstart += s.match_length;\n s.match_length = 0;\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n}\n\n/* ===========================================================================\n * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table.\n * (It will be regenerated if this run of deflate switches away from Huffman.)\n */\nfunction deflate_huff(s, flush) {\n var bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we have a literal to write. */\n if (s.lookahead === 0) {\n fill_window(s);\n if (s.lookahead === 0) {\n if (flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n break; /* flush the current block */\n }\n }\n\n /* Output a literal byte */\n s.match_length = 0;\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n s.lookahead--;\n s.strstart++;\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n}\n\n/* Values for max_lazy_match, good_match and max_chain_length, depending on\n * the desired pack level (0..9). The values given below have been tuned to\n * exclude worst case performance for pathological files. Better values may be\n * found for specific files.\n */\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n this.good_length = good_length;\n this.max_lazy = max_lazy;\n this.nice_length = nice_length;\n this.max_chain = max_chain;\n this.func = func;\n}\n\nvar configuration_table;\n\nconfiguration_table = [\n /* good lazy nice chain */\n new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */\n new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */\n new Config(4, 5, 16, 8, deflate_fast), /* 2 */\n new Config(4, 6, 32, 32, deflate_fast), /* 3 */\n\n new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */\n new Config(8, 16, 32, 32, deflate_slow), /* 5 */\n new Config(8, 16, 128, 128, deflate_slow), /* 6 */\n new Config(8, 32, 128, 256, deflate_slow), /* 7 */\n new Config(32, 128, 258, 1024, deflate_slow), /* 8 */\n new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */\n];\n\n\n/* ===========================================================================\n * Initialize the \"longest match\" routines for a new zlib stream\n */\nfunction lm_init(s) {\n s.window_size = 2 * s.w_size;\n\n /*** CLEAR_HASH(s); ***/\n zero(s.head); // Fill with NIL (= 0);\n\n /* Set the default configuration parameters:\n */\n s.max_lazy_match = configuration_table[s.level].max_lazy;\n s.good_match = configuration_table[s.level].good_length;\n s.nice_match = configuration_table[s.level].nice_length;\n s.max_chain_length = configuration_table[s.level].max_chain;\n\n s.strstart = 0;\n s.block_start = 0;\n s.lookahead = 0;\n s.insert = 0;\n s.match_length = s.prev_length = MIN_MATCH - 1;\n s.match_available = 0;\n s.ins_h = 0;\n}\n\n\nfunction DeflateState() {\n this.strm = null; /* pointer back to this zlib stream */\n this.status = 0; /* as the name implies */\n this.pending_buf = null; /* output still pending */\n this.pending_buf_size = 0; /* size of pending_buf */\n this.pending_out = 0; /* next pending byte to output to the stream */\n this.pending = 0; /* nb of bytes in the pending buffer */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n this.gzhead = null; /* gzip header information to write */\n this.gzindex = 0; /* where in extra, name, or comment */\n this.method = Z_DEFLATED; /* can only be DEFLATED */\n this.last_flush = -1; /* value of flush param for previous deflate call */\n\n this.w_size = 0; /* LZ77 window size (32K by default) */\n this.w_bits = 0; /* log2(w_size) (8..16) */\n this.w_mask = 0; /* w_size - 1 */\n\n this.window = null;\n /* Sliding window. Input bytes are read into the second half of the window,\n * and move to the first half later to keep a dictionary of at least wSize\n * bytes. With this organization, matches are limited to a distance of\n * wSize-MAX_MATCH bytes, but this ensures that IO is always\n * performed with a length multiple of the block size.\n */\n\n this.window_size = 0;\n /* Actual size of window: 2*wSize, except when the user input buffer\n * is directly used as sliding window.\n */\n\n this.prev = null;\n /* Link to older string with same hash index. To limit the size of this\n * array to 64K, this link is maintained only for the last 32K strings.\n * An index in this array is thus a window index modulo 32K.\n */\n\n this.head = null; /* Heads of the hash chains or NIL. */\n\n this.ins_h = 0; /* hash index of string to be inserted */\n this.hash_size = 0; /* number of elements in hash table */\n this.hash_bits = 0; /* log2(hash_size) */\n this.hash_mask = 0; /* hash_size-1 */\n\n this.hash_shift = 0;\n /* Number of bits by which ins_h must be shifted at each input\n * step. It must be such that after MIN_MATCH steps, the oldest\n * byte no longer takes part in the hash key, that is:\n * hash_shift * MIN_MATCH >= hash_bits\n */\n\n this.block_start = 0;\n /* Window position at the beginning of the current output block. Gets\n * negative when the window is moved backwards.\n */\n\n this.match_length = 0; /* length of best match */\n this.prev_match = 0; /* previous match */\n this.match_available = 0; /* set if previous match exists */\n this.strstart = 0; /* start of string to insert */\n this.match_start = 0; /* start of matching string */\n this.lookahead = 0; /* number of valid bytes ahead in window */\n\n this.prev_length = 0;\n /* Length of the best match at previous step. Matches not greater than this\n * are discarded. This is used in the lazy match evaluation.\n */\n\n this.max_chain_length = 0;\n /* To speed up deflation, hash chains are never searched beyond this\n * length. A higher limit improves compression ratio but degrades the\n * speed.\n */\n\n this.max_lazy_match = 0;\n /* Attempt to find a better match only when the current match is strictly\n * smaller than this value. This mechanism is used only for compression\n * levels >= 4.\n */\n // That's alias to max_lazy_match, don't use directly\n //this.max_insert_length = 0;\n /* Insert new strings in the hash table only if the match length is not\n * greater than this length. This saves time but degrades compression.\n * max_insert_length is used only for compression levels <= 3.\n */\n\n this.level = 0; /* compression level (1..9) */\n this.strategy = 0; /* favor or force Huffman coding*/\n\n this.good_match = 0;\n /* Use a faster search when the previous match is longer than this */\n\n this.nice_match = 0; /* Stop searching when current match exceeds this */\n\n /* used by trees.c: */\n\n /* Didn't use ct_data typedef below to suppress compiler warning */\n\n // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */\n // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */\n // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */\n\n // Use flat array of DOUBLE size, with interleaved fata,\n // because JS does not support effective\n this.dyn_ltree = new utils.Buf16(HEAP_SIZE * 2);\n this.dyn_dtree = new utils.Buf16((2 * D_CODES + 1) * 2);\n this.bl_tree = new utils.Buf16((2 * BL_CODES + 1) * 2);\n zero(this.dyn_ltree);\n zero(this.dyn_dtree);\n zero(this.bl_tree);\n\n this.l_desc = null; /* desc. for literal tree */\n this.d_desc = null; /* desc. for distance tree */\n this.bl_desc = null; /* desc. for bit length tree */\n\n //ush bl_count[MAX_BITS+1];\n this.bl_count = new utils.Buf16(MAX_BITS + 1);\n /* number of codes at each bit length for an optimal tree */\n\n //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */\n this.heap = new utils.Buf16(2 * L_CODES + 1); /* heap used to build the Huffman trees */\n zero(this.heap);\n\n this.heap_len = 0; /* number of elements in the heap */\n this.heap_max = 0; /* element of largest frequency */\n /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n * The same heap array is used to build all trees.\n */\n\n this.depth = new utils.Buf16(2 * L_CODES + 1); //uch depth[2*L_CODES+1];\n zero(this.depth);\n /* Depth of each subtree used as tie breaker for trees of equal frequency\n */\n\n this.l_buf = 0; /* buffer index for literals or lengths */\n\n this.lit_bufsize = 0;\n /* Size of match buffer for literals/lengths. There are 4 reasons for\n * limiting lit_bufsize to 64K:\n * - frequencies can be kept in 16 bit counters\n * - if compression is not successful for the first block, all input\n * data is still in the window so we can still emit a stored block even\n * when input comes from standard input. (This can also be done for\n * all blocks if lit_bufsize is not greater than 32K.)\n * - if compression is not successful for a file smaller than 64K, we can\n * even emit a stored file instead of a stored block (saving 5 bytes).\n * This is applicable only for zip (not gzip or zlib).\n * - creating new Huffman trees less frequently may not provide fast\n * adaptation to changes in the input data statistics. (Take for\n * example a binary file with poorly compressible code followed by\n * a highly compressible string table.) Smaller buffer sizes give\n * fast adaptation but have of course the overhead of transmitting\n * trees more frequently.\n * - I can't count above 4\n */\n\n this.last_lit = 0; /* running index in l_buf */\n\n this.d_buf = 0;\n /* Buffer index for distances. To simplify the code, d_buf and l_buf have\n * the same number of elements. To use different lengths, an extra flag\n * array would be necessary.\n */\n\n this.opt_len = 0; /* bit length of current block with optimal trees */\n this.static_len = 0; /* bit length of current block with static trees */\n this.matches = 0; /* number of string matches in current block */\n this.insert = 0; /* bytes at end of window left to insert */\n\n\n this.bi_buf = 0;\n /* Output buffer. bits are inserted starting at the bottom (least\n * significant bits).\n */\n this.bi_valid = 0;\n /* Number of valid bits in bi_buf. All bits above the last valid bit\n * are always zero.\n */\n\n // Used for window memory init. We safely ignore it for JS. That makes\n // sense only for pointers and memory check tools.\n //this.high_water = 0;\n /* High water mark offset in window for initialized bytes -- bytes above\n * this are set to zero in order to avoid memory check warnings when\n * longest match routines access bytes past the input. This is then\n * updated to the new high water mark.\n */\n}\n\n\nfunction deflateResetKeep(strm) {\n var s;\n\n if (!strm || !strm.state) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n strm.total_in = strm.total_out = 0;\n strm.data_type = Z_UNKNOWN;\n\n s = strm.state;\n s.pending = 0;\n s.pending_out = 0;\n\n if (s.wrap < 0) {\n s.wrap = -s.wrap;\n /* was made negative by deflate(..., Z_FINISH); */\n }\n s.status = (s.wrap ? INIT_STATE : BUSY_STATE);\n strm.adler = (s.wrap === 2) ?\n 0 // crc32(0, Z_NULL, 0)\n :\n 1; // adler32(0, Z_NULL, 0)\n s.last_flush = Z_NO_FLUSH;\n trees._tr_init(s);\n return Z_OK;\n}\n\n\nfunction deflateReset(strm) {\n var ret = deflateResetKeep(strm);\n if (ret === Z_OK) {\n lm_init(strm.state);\n }\n return ret;\n}\n\n\nfunction deflateSetHeader(strm, head) {\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; }\n strm.state.gzhead = head;\n return Z_OK;\n}\n\n\nfunction deflateInit2(strm, level, method, windowBits, memLevel, strategy) {\n if (!strm) { // === Z_NULL\n return Z_STREAM_ERROR;\n }\n var wrap = 1;\n\n if (level === Z_DEFAULT_COMPRESSION) {\n level = 6;\n }\n\n if (windowBits < 0) { /* suppress zlib wrapper */\n wrap = 0;\n windowBits = -windowBits;\n }\n\n else if (windowBits > 15) {\n wrap = 2; /* write gzip wrapper instead */\n windowBits -= 16;\n }\n\n\n if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED ||\n windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||\n strategy < 0 || strategy > Z_FIXED) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n\n if (windowBits === 8) {\n windowBits = 9;\n }\n /* until 256-byte window bug fixed */\n\n var s = new DeflateState();\n\n strm.state = s;\n s.strm = strm;\n\n s.wrap = wrap;\n s.gzhead = null;\n s.w_bits = windowBits;\n s.w_size = 1 << s.w_bits;\n s.w_mask = s.w_size - 1;\n\n s.hash_bits = memLevel + 7;\n s.hash_size = 1 << s.hash_bits;\n s.hash_mask = s.hash_size - 1;\n s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n s.window = new utils.Buf8(s.w_size * 2);\n s.head = new utils.Buf16(s.hash_size);\n s.prev = new utils.Buf16(s.w_size);\n\n // Don't need mem init magic for JS.\n //s.high_water = 0; /* nothing written to s->window yet */\n\n s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */\n\n s.pending_buf_size = s.lit_bufsize * 4;\n\n //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);\n //s->pending_buf = (uchf *) overlay;\n s.pending_buf = new utils.Buf8(s.pending_buf_size);\n\n // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`)\n //s->d_buf = overlay + s->lit_bufsize/sizeof(ush);\n s.d_buf = 1 * s.lit_bufsize;\n\n //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize;\n s.l_buf = (1 + 2) * s.lit_bufsize;\n\n s.level = level;\n s.strategy = strategy;\n s.method = method;\n\n return deflateReset(strm);\n}\n\nfunction deflateInit(strm, level) {\n return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY);\n}\n\n\nfunction deflate(strm, flush) {\n var old_flush, s;\n var beg, val; // for gzip header write only\n\n if (!strm || !strm.state ||\n flush > Z_BLOCK || flush < 0) {\n return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR;\n }\n\n s = strm.state;\n\n if (!strm.output ||\n (!strm.input && strm.avail_in !== 0) ||\n (s.status === FINISH_STATE && flush !== Z_FINISH)) {\n return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR);\n }\n\n s.strm = strm; /* just in case */\n old_flush = s.last_flush;\n s.last_flush = flush;\n\n /* Write the header */\n if (s.status === INIT_STATE) {\n\n if (s.wrap === 2) { // GZIP header\n strm.adler = 0; //crc32(0L, Z_NULL, 0);\n put_byte(s, 31);\n put_byte(s, 139);\n put_byte(s, 8);\n if (!s.gzhead) { // s->gzhead == Z_NULL\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, s.level === 9 ? 2 :\n (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n 4 : 0));\n put_byte(s, OS_CODE);\n s.status = BUSY_STATE;\n }\n else {\n put_byte(s, (s.gzhead.text ? 1 : 0) +\n (s.gzhead.hcrc ? 2 : 0) +\n (!s.gzhead.extra ? 0 : 4) +\n (!s.gzhead.name ? 0 : 8) +\n (!s.gzhead.comment ? 0 : 16)\n );\n put_byte(s, s.gzhead.time & 0xff);\n put_byte(s, (s.gzhead.time >> 8) & 0xff);\n put_byte(s, (s.gzhead.time >> 16) & 0xff);\n put_byte(s, (s.gzhead.time >> 24) & 0xff);\n put_byte(s, s.level === 9 ? 2 :\n (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n 4 : 0));\n put_byte(s, s.gzhead.os & 0xff);\n if (s.gzhead.extra && s.gzhead.extra.length) {\n put_byte(s, s.gzhead.extra.length & 0xff);\n put_byte(s, (s.gzhead.extra.length >> 8) & 0xff);\n }\n if (s.gzhead.hcrc) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0);\n }\n s.gzindex = 0;\n s.status = EXTRA_STATE;\n }\n }\n else // DEFLATE header\n {\n var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8;\n var level_flags = -1;\n\n if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) {\n level_flags = 0;\n } else if (s.level < 6) {\n level_flags = 1;\n } else if (s.level === 6) {\n level_flags = 2;\n } else {\n level_flags = 3;\n }\n header |= (level_flags << 6);\n if (s.strstart !== 0) { header |= PRESET_DICT; }\n header += 31 - (header % 31);\n\n s.status = BUSY_STATE;\n putShortMSB(s, header);\n\n /* Save the adler32 of the preset dictionary: */\n if (s.strstart !== 0) {\n putShortMSB(s, strm.adler >>> 16);\n putShortMSB(s, strm.adler & 0xffff);\n }\n strm.adler = 1; // adler32(0L, Z_NULL, 0);\n }\n }\n\n//#ifdef GZIP\n if (s.status === EXTRA_STATE) {\n if (s.gzhead.extra/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n\n while (s.gzindex < (s.gzhead.extra.length & 0xffff)) {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n break;\n }\n }\n put_byte(s, s.gzhead.extra[s.gzindex] & 0xff);\n s.gzindex++;\n }\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (s.gzindex === s.gzhead.extra.length) {\n s.gzindex = 0;\n s.status = NAME_STATE;\n }\n }\n else {\n s.status = NAME_STATE;\n }\n }\n if (s.status === NAME_STATE) {\n if (s.gzhead.name/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n //int val;\n\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n // JS specific: little magic to add zero terminator to end of string\n if (s.gzindex < s.gzhead.name.length) {\n val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff;\n } else {\n val = 0;\n }\n put_byte(s, val);\n } while (val !== 0);\n\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (val === 0) {\n s.gzindex = 0;\n s.status = COMMENT_STATE;\n }\n }\n else {\n s.status = COMMENT_STATE;\n }\n }\n if (s.status === COMMENT_STATE) {\n if (s.gzhead.comment/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n //int val;\n\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n // JS specific: little magic to add zero terminator to end of string\n if (s.gzindex < s.gzhead.comment.length) {\n val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff;\n } else {\n val = 0;\n }\n put_byte(s, val);\n } while (val !== 0);\n\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (val === 0) {\n s.status = HCRC_STATE;\n }\n }\n else {\n s.status = HCRC_STATE;\n }\n }\n if (s.status === HCRC_STATE) {\n if (s.gzhead.hcrc) {\n if (s.pending + 2 > s.pending_buf_size) {\n flush_pending(strm);\n }\n if (s.pending + 2 <= s.pending_buf_size) {\n put_byte(s, strm.adler & 0xff);\n put_byte(s, (strm.adler >> 8) & 0xff);\n strm.adler = 0; //crc32(0L, Z_NULL, 0);\n s.status = BUSY_STATE;\n }\n }\n else {\n s.status = BUSY_STATE;\n }\n }\n//#endif\n\n /* Flush as much pending output as possible */\n if (s.pending !== 0) {\n flush_pending(strm);\n if (strm.avail_out === 0) {\n /* Since avail_out is 0, deflate will be called again with\n * more output space, but possibly with both pending and\n * avail_in equal to zero. There won't be anything to do,\n * but this is not an error situation so make sure we\n * return OK instead of BUF_ERROR at next call of deflate:\n */\n s.last_flush = -1;\n return Z_OK;\n }\n\n /* Make sure there is something to do and avoid duplicate consecutive\n * flushes. For repeated and useless calls with Z_FINISH, we keep\n * returning Z_STREAM_END instead of Z_BUF_ERROR.\n */\n } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) &&\n flush !== Z_FINISH) {\n return err(strm, Z_BUF_ERROR);\n }\n\n /* User must not provide more input after the first FINISH: */\n if (s.status === FINISH_STATE && strm.avail_in !== 0) {\n return err(strm, Z_BUF_ERROR);\n }\n\n /* Start a new block or continue the current one.\n */\n if (strm.avail_in !== 0 || s.lookahead !== 0 ||\n (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) {\n var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) :\n (s.strategy === Z_RLE ? deflate_rle(s, flush) :\n configuration_table[s.level].func(s, flush));\n\n if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) {\n s.status = FINISH_STATE;\n }\n if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) {\n if (strm.avail_out === 0) {\n s.last_flush = -1;\n /* avoid BUF_ERROR next call, see above */\n }\n return Z_OK;\n /* If flush != Z_NO_FLUSH && avail_out == 0, the next call\n * of deflate should use the same flush parameter to make sure\n * that the flush is complete. So we don't have to output an\n * empty block here, this will be done at next call. This also\n * ensures that for a very small output buffer, we emit at most\n * one empty block.\n */\n }\n if (bstate === BS_BLOCK_DONE) {\n if (flush === Z_PARTIAL_FLUSH) {\n trees._tr_align(s);\n }\n else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */\n\n trees._tr_stored_block(s, 0, 0, false);\n /* For a full flush, this empty block will be recognized\n * as a special marker by inflate_sync().\n */\n if (flush === Z_FULL_FLUSH) {\n /*** CLEAR_HASH(s); ***/ /* forget history */\n zero(s.head); // Fill with NIL (= 0);\n\n if (s.lookahead === 0) {\n s.strstart = 0;\n s.block_start = 0;\n s.insert = 0;\n }\n }\n }\n flush_pending(strm);\n if (strm.avail_out === 0) {\n s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */\n return Z_OK;\n }\n }\n }\n //Assert(strm->avail_out > 0, \"bug2\");\n //if (strm.avail_out <= 0) { throw new Error(\"bug2\");}\n\n if (flush !== Z_FINISH) { return Z_OK; }\n if (s.wrap <= 0) { return Z_STREAM_END; }\n\n /* Write the trailer */\n if (s.wrap === 2) {\n put_byte(s, strm.adler & 0xff);\n put_byte(s, (strm.adler >> 8) & 0xff);\n put_byte(s, (strm.adler >> 16) & 0xff);\n put_byte(s, (strm.adler >> 24) & 0xff);\n put_byte(s, strm.total_in & 0xff);\n put_byte(s, (strm.total_in >> 8) & 0xff);\n put_byte(s, (strm.total_in >> 16) & 0xff);\n put_byte(s, (strm.total_in >> 24) & 0xff);\n }\n else\n {\n putShortMSB(s, strm.adler >>> 16);\n putShortMSB(s, strm.adler & 0xffff);\n }\n\n flush_pending(strm);\n /* If avail_out is zero, the application will call deflate again\n * to flush the rest.\n */\n if (s.wrap > 0) { s.wrap = -s.wrap; }\n /* write the trailer only once! */\n return s.pending !== 0 ? Z_OK : Z_STREAM_END;\n}\n\nfunction deflateEnd(strm) {\n var status;\n\n if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {\n return Z_STREAM_ERROR;\n }\n\n status = strm.state.status;\n if (status !== INIT_STATE &&\n status !== EXTRA_STATE &&\n status !== NAME_STATE &&\n status !== COMMENT_STATE &&\n status !== HCRC_STATE &&\n status !== BUSY_STATE &&\n status !== FINISH_STATE\n ) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n strm.state = null;\n\n return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK;\n}\n\n\n/* =========================================================================\n * Initializes the compression dictionary from the given byte\n * sequence without producing any compressed output.\n */\nfunction deflateSetDictionary(strm, dictionary) {\n var dictLength = dictionary.length;\n\n var s;\n var str, n;\n var wrap;\n var avail;\n var next;\n var input;\n var tmpDict;\n\n if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {\n return Z_STREAM_ERROR;\n }\n\n s = strm.state;\n wrap = s.wrap;\n\n if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) {\n return Z_STREAM_ERROR;\n }\n\n /* when using zlib wrappers, compute Adler-32 for provided dictionary */\n if (wrap === 1) {\n /* adler32(strm->adler, dictionary, dictLength); */\n strm.adler = adler32(strm.adler, dictionary, dictLength, 0);\n }\n\n s.wrap = 0; /* avoid computing Adler-32 in read_buf */\n\n /* if dictionary would fill window, just replace the history */\n if (dictLength >= s.w_size) {\n if (wrap === 0) { /* already empty otherwise */\n /*** CLEAR_HASH(s); ***/\n zero(s.head); // Fill with NIL (= 0);\n s.strstart = 0;\n s.block_start = 0;\n s.insert = 0;\n }\n /* use the tail */\n // dictionary = dictionary.slice(dictLength - s.w_size);\n tmpDict = new utils.Buf8(s.w_size);\n utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0);\n dictionary = tmpDict;\n dictLength = s.w_size;\n }\n /* insert dictionary into window and hash */\n avail = strm.avail_in;\n next = strm.next_in;\n input = strm.input;\n strm.avail_in = dictLength;\n strm.next_in = 0;\n strm.input = dictionary;\n fill_window(s);\n while (s.lookahead >= MIN_MATCH) {\n str = s.strstart;\n n = s.lookahead - (MIN_MATCH - 1);\n do {\n /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask;\n\n s.prev[str & s.w_mask] = s.head[s.ins_h];\n\n s.head[s.ins_h] = str;\n str++;\n } while (--n);\n s.strstart = str;\n s.lookahead = MIN_MATCH - 1;\n fill_window(s);\n }\n s.strstart += s.lookahead;\n s.block_start = s.strstart;\n s.insert = s.lookahead;\n s.lookahead = 0;\n s.match_length = s.prev_length = MIN_MATCH - 1;\n s.match_available = 0;\n strm.next_in = next;\n strm.input = input;\n strm.avail_in = avail;\n s.wrap = wrap;\n return Z_OK;\n}\n\n\nexports.deflateInit = deflateInit;\nexports.deflateInit2 = deflateInit2;\nexports.deflateReset = deflateReset;\nexports.deflateResetKeep = deflateResetKeep;\nexports.deflateSetHeader = deflateSetHeader;\nexports.deflate = deflate;\nexports.deflateEnd = deflateEnd;\nexports.deflateSetDictionary = deflateSetDictionary;\nexports.deflateInfo = 'pako deflate (from Nodeca project)';\n\n/* Not implemented\nexports.deflateBound = deflateBound;\nexports.deflateCopy = deflateCopy;\nexports.deflateParams = deflateParams;\nexports.deflatePending = deflatePending;\nexports.deflatePrime = deflatePrime;\nexports.deflateTune = deflateTune;\n*/\n" - }, - { - "id": 14, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\trees.js", - "name": "./node_modules/pako/lib/zlib/trees.js", - "index": 12, - "index2": 5, - "size": 39879, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\deflate.js", - "issuerId": 13, - "issuerName": "./node_modules/pako/lib/zlib/deflate.js", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "name": "./node_modules/fast-png/lib-esm/index.js", - "profile": { - "factory": 2180, - "building": 1082 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "name": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "profile": { - "factory": 21, - "building": 92, - "dependencies": 43 - } - }, - { - "id": 1, - "identifier": "F:\\tweb\\node_modules\\pako\\index.js", - "name": "./node_modules/pako/index.js", - "profile": { - "factory": 48, - "building": 7 - } - }, - { - "id": 12, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\deflate.js", - "name": "./node_modules/pako/lib/deflate.js", - "profile": { - "factory": 11, - "building": 13, - "dependencies": 8 - } - }, - { - "id": 13, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\deflate.js", - "name": "./node_modules/pako/lib/zlib/deflate.js", - "profile": { - "factory": 16, - "building": 21, - "dependencies": 2 - } - } - ], - "profile": { - "factory": 40, - "building": 27, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 13, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\deflate.js", - "module": "./node_modules/pako/lib/zlib/deflate.js", - "moduleName": "./node_modules/pako/lib/zlib/deflate.js", - "type": "cjs require", - "userRequest": "./trees", - "loc": "23:14-32" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 7, - "source": "'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n/* eslint-disable space-unary-ops */\n\nvar utils = require('../utils/common');\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n//var Z_FILTERED = 1;\n//var Z_HUFFMAN_ONLY = 2;\n//var Z_RLE = 3;\nvar Z_FIXED = 4;\n//var Z_DEFAULT_STRATEGY = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\nvar Z_BINARY = 0;\nvar Z_TEXT = 1;\n//var Z_ASCII = 1; // = Z_TEXT\nvar Z_UNKNOWN = 2;\n\n/*============================================================================*/\n\n\nfunction zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }\n\n// From zutil.h\n\nvar STORED_BLOCK = 0;\nvar STATIC_TREES = 1;\nvar DYN_TREES = 2;\n/* The three kinds of block type */\n\nvar MIN_MATCH = 3;\nvar MAX_MATCH = 258;\n/* The minimum and maximum match lengths */\n\n// From deflate.h\n/* ===========================================================================\n * Internal compression state.\n */\n\nvar LENGTH_CODES = 29;\n/* number of length codes, not counting the special END_BLOCK code */\n\nvar LITERALS = 256;\n/* number of literal bytes 0..255 */\n\nvar L_CODES = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\n\nvar D_CODES = 30;\n/* number of distance codes */\n\nvar BL_CODES = 19;\n/* number of codes used to transfer the bit lengths */\n\nvar HEAP_SIZE = 2 * L_CODES + 1;\n/* maximum heap size */\n\nvar MAX_BITS = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nvar Buf_size = 16;\n/* size of bit buffer in bi_buf */\n\n\n/* ===========================================================================\n * Constants\n */\n\nvar MAX_BL_BITS = 7;\n/* Bit length codes must not exceed MAX_BL_BITS bits */\n\nvar END_BLOCK = 256;\n/* end of block literal code */\n\nvar REP_3_6 = 16;\n/* repeat previous bit length 3-6 times (2 bits of repeat count) */\n\nvar REPZ_3_10 = 17;\n/* repeat a zero length 3-10 times (3 bits of repeat count) */\n\nvar REPZ_11_138 = 18;\n/* repeat a zero length 11-138 times (7 bits of repeat count) */\n\n/* eslint-disable comma-spacing,array-bracket-spacing */\nvar extra_lbits = /* extra bits for each length code */\n [0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];\n\nvar extra_dbits = /* extra bits for each distance code */\n [0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];\n\nvar extra_blbits = /* extra bits for each bit length code */\n [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];\n\nvar bl_order =\n [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];\n/* eslint-enable comma-spacing,array-bracket-spacing */\n\n/* The lengths of the bit length codes are sent in order of decreasing\n * probability, to avoid transmitting the lengths for unused bit length codes.\n */\n\n/* ===========================================================================\n * Local data. These are initialized only once.\n */\n\n// We pre-fill arrays with 0 to avoid uninitialized gaps\n\nvar DIST_CODE_LEN = 512; /* see definition of array dist_code below */\n\n// !!!! Use flat array instead of structure, Freq = i*2, Len = i*2+1\nvar static_ltree = new Array((L_CODES + 2) * 2);\nzero(static_ltree);\n/* The static literal tree. Since the bit lengths are imposed, there is no\n * need for the L_CODES extra codes used during heap construction. However\n * The codes 286 and 287 are needed to build a canonical tree (see _tr_init\n * below).\n */\n\nvar static_dtree = new Array(D_CODES * 2);\nzero(static_dtree);\n/* The static distance tree. (Actually a trivial tree since all codes use\n * 5 bits.)\n */\n\nvar _dist_code = new Array(DIST_CODE_LEN);\nzero(_dist_code);\n/* Distance codes. The first 256 values correspond to the distances\n * 3 .. 258, the last 256 values correspond to the top 8 bits of\n * the 15 bit distances.\n */\n\nvar _length_code = new Array(MAX_MATCH - MIN_MATCH + 1);\nzero(_length_code);\n/* length code for each normalized match length (0 == MIN_MATCH) */\n\nvar base_length = new Array(LENGTH_CODES);\nzero(base_length);\n/* First normalized length for each code (0 = MIN_MATCH) */\n\nvar base_dist = new Array(D_CODES);\nzero(base_dist);\n/* First normalized distance for each code (0 = distance of 1) */\n\n\nfunction StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) {\n\n this.static_tree = static_tree; /* static tree or NULL */\n this.extra_bits = extra_bits; /* extra bits for each code or NULL */\n this.extra_base = extra_base; /* base index for extra_bits */\n this.elems = elems; /* max number of elements in the tree */\n this.max_length = max_length; /* max bit length for the codes */\n\n // show if `static_tree` has data or dummy - needed for monomorphic objects\n this.has_stree = static_tree && static_tree.length;\n}\n\n\nvar static_l_desc;\nvar static_d_desc;\nvar static_bl_desc;\n\n\nfunction TreeDesc(dyn_tree, stat_desc) {\n this.dyn_tree = dyn_tree; /* the dynamic tree */\n this.max_code = 0; /* largest code with non zero frequency */\n this.stat_desc = stat_desc; /* the corresponding static tree */\n}\n\n\n\nfunction d_code(dist) {\n return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)];\n}\n\n\n/* ===========================================================================\n * Output a short LSB first on the stream.\n * IN assertion: there is enough room in pendingBuf.\n */\nfunction put_short(s, w) {\n// put_byte(s, (uch)((w) & 0xff));\n// put_byte(s, (uch)((ush)(w) >> 8));\n s.pending_buf[s.pending++] = (w) & 0xff;\n s.pending_buf[s.pending++] = (w >>> 8) & 0xff;\n}\n\n\n/* ===========================================================================\n * Send a value on a given number of bits.\n * IN assertion: length <= 16 and value fits in length bits.\n */\nfunction send_bits(s, value, length) {\n if (s.bi_valid > (Buf_size - length)) {\n s.bi_buf |= (value << s.bi_valid) & 0xffff;\n put_short(s, s.bi_buf);\n s.bi_buf = value >> (Buf_size - s.bi_valid);\n s.bi_valid += length - Buf_size;\n } else {\n s.bi_buf |= (value << s.bi_valid) & 0xffff;\n s.bi_valid += length;\n }\n}\n\n\nfunction send_code(s, c, tree) {\n send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/);\n}\n\n\n/* ===========================================================================\n * Reverse the first len bits of a code, using straightforward code (a faster\n * method would use a table)\n * IN assertion: 1 <= len <= 15\n */\nfunction bi_reverse(code, len) {\n var res = 0;\n do {\n res |= code & 1;\n code >>>= 1;\n res <<= 1;\n } while (--len > 0);\n return res >>> 1;\n}\n\n\n/* ===========================================================================\n * Flush the bit buffer, keeping at most 7 bits in it.\n */\nfunction bi_flush(s) {\n if (s.bi_valid === 16) {\n put_short(s, s.bi_buf);\n s.bi_buf = 0;\n s.bi_valid = 0;\n\n } else if (s.bi_valid >= 8) {\n s.pending_buf[s.pending++] = s.bi_buf & 0xff;\n s.bi_buf >>= 8;\n s.bi_valid -= 8;\n }\n}\n\n\n/* ===========================================================================\n * Compute the optimal bit lengths for a tree and update the total bit length\n * for the current block.\n * IN assertion: the fields freq and dad are set, heap[heap_max] and\n * above are the tree nodes sorted by increasing frequency.\n * OUT assertions: the field len is set to the optimal bit length, the\n * array bl_count contains the frequencies for each bit length.\n * The length opt_len is updated; static_len is also updated if stree is\n * not null.\n */\nfunction gen_bitlen(s, desc)\n// deflate_state *s;\n// tree_desc *desc; /* the tree descriptor */\n{\n var tree = desc.dyn_tree;\n var max_code = desc.max_code;\n var stree = desc.stat_desc.static_tree;\n var has_stree = desc.stat_desc.has_stree;\n var extra = desc.stat_desc.extra_bits;\n var base = desc.stat_desc.extra_base;\n var max_length = desc.stat_desc.max_length;\n var h; /* heap index */\n var n, m; /* iterate over the tree elements */\n var bits; /* bit length */\n var xbits; /* extra bits */\n var f; /* frequency */\n var overflow = 0; /* number of elements with bit length too large */\n\n for (bits = 0; bits <= MAX_BITS; bits++) {\n s.bl_count[bits] = 0;\n }\n\n /* In a first pass, compute the optimal bit lengths (which may\n * overflow in the case of the bit length tree).\n */\n tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */\n\n for (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n n = s.heap[h];\n bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1;\n if (bits > max_length) {\n bits = max_length;\n overflow++;\n }\n tree[n * 2 + 1]/*.Len*/ = bits;\n /* We overwrite tree[n].Dad which is no longer needed */\n\n if (n > max_code) { continue; } /* not a leaf node */\n\n s.bl_count[bits]++;\n xbits = 0;\n if (n >= base) {\n xbits = extra[n - base];\n }\n f = tree[n * 2]/*.Freq*/;\n s.opt_len += f * (bits + xbits);\n if (has_stree) {\n s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits);\n }\n }\n if (overflow === 0) { return; }\n\n // Trace((stderr,\"\\nbit length overflow\\n\"));\n /* This happens for example on obj2 and pic of the Calgary corpus */\n\n /* Find the first bit length which could increase: */\n do {\n bits = max_length - 1;\n while (s.bl_count[bits] === 0) { bits--; }\n s.bl_count[bits]--; /* move one leaf down the tree */\n s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */\n s.bl_count[max_length]--;\n /* The brother of the overflow item also moves one step up,\n * but this does not affect bl_count[max_length]\n */\n overflow -= 2;\n } while (overflow > 0);\n\n /* Now recompute all bit lengths, scanning in increasing frequency.\n * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all\n * lengths instead of fixing only the wrong ones. This idea is taken\n * from 'ar' written by Haruhiko Okumura.)\n */\n for (bits = max_length; bits !== 0; bits--) {\n n = s.bl_count[bits];\n while (n !== 0) {\n m = s.heap[--h];\n if (m > max_code) { continue; }\n if (tree[m * 2 + 1]/*.Len*/ !== bits) {\n // Trace((stderr,\"code %d bits %d->%d\\n\", m, tree[m].Len, bits));\n s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/;\n tree[m * 2 + 1]/*.Len*/ = bits;\n }\n n--;\n }\n }\n}\n\n\n/* ===========================================================================\n * Generate the codes for a given tree and bit counts (which need not be\n * optimal).\n * IN assertion: the array bl_count contains the bit length statistics for\n * the given tree and the field len is set for all tree elements.\n * OUT assertion: the field code is set for all tree elements of non\n * zero code length.\n */\nfunction gen_codes(tree, max_code, bl_count)\n// ct_data *tree; /* the tree to decorate */\n// int max_code; /* largest code with non zero frequency */\n// ushf *bl_count; /* number of codes at each bit length */\n{\n var next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */\n var code = 0; /* running code value */\n var bits; /* bit index */\n var n; /* code index */\n\n /* The distribution counts are first used to generate the code values\n * without bit reversal.\n */\n for (bits = 1; bits <= MAX_BITS; bits++) {\n next_code[bits] = code = (code + bl_count[bits - 1]) << 1;\n }\n /* Check that the bit counts in bl_count are consistent. The last code\n * must be all ones.\n */\n //Assert (code + bl_count[MAX_BITS]-1 == (1< length code (0..28) */\n length = 0;\n for (code = 0; code < LENGTH_CODES - 1; code++) {\n base_length[code] = length;\n for (n = 0; n < (1 << extra_lbits[code]); n++) {\n _length_code[length++] = code;\n }\n }\n //Assert (length == 256, \"tr_static_init: length != 256\");\n /* Note that the length 255 (match length 258) can be represented\n * in two different ways: code 284 + 5 bits or code 285, so we\n * overwrite length_code[255] to use the best encoding:\n */\n _length_code[length - 1] = code;\n\n /* Initialize the mapping dist (0..32K) -> dist code (0..29) */\n dist = 0;\n for (code = 0; code < 16; code++) {\n base_dist[code] = dist;\n for (n = 0; n < (1 << extra_dbits[code]); n++) {\n _dist_code[dist++] = code;\n }\n }\n //Assert (dist == 256, \"tr_static_init: dist != 256\");\n dist >>= 7; /* from now on, all distances are divided by 128 */\n for (; code < D_CODES; code++) {\n base_dist[code] = dist << 7;\n for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) {\n _dist_code[256 + dist++] = code;\n }\n }\n //Assert (dist == 256, \"tr_static_init: 256+dist != 512\");\n\n /* Construct the codes of the static literal tree */\n for (bits = 0; bits <= MAX_BITS; bits++) {\n bl_count[bits] = 0;\n }\n\n n = 0;\n while (n <= 143) {\n static_ltree[n * 2 + 1]/*.Len*/ = 8;\n n++;\n bl_count[8]++;\n }\n while (n <= 255) {\n static_ltree[n * 2 + 1]/*.Len*/ = 9;\n n++;\n bl_count[9]++;\n }\n while (n <= 279) {\n static_ltree[n * 2 + 1]/*.Len*/ = 7;\n n++;\n bl_count[7]++;\n }\n while (n <= 287) {\n static_ltree[n * 2 + 1]/*.Len*/ = 8;\n n++;\n bl_count[8]++;\n }\n /* Codes 286 and 287 do not exist, but we must include them in the\n * tree construction to get a canonical Huffman tree (longest code\n * all ones)\n */\n gen_codes(static_ltree, L_CODES + 1, bl_count);\n\n /* The static distance tree is trivial: */\n for (n = 0; n < D_CODES; n++) {\n static_dtree[n * 2 + 1]/*.Len*/ = 5;\n static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5);\n }\n\n // Now data ready and we can init static trees\n static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS);\n static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n //static_init_done = true;\n}\n\n\n/* ===========================================================================\n * Initialize a new block.\n */\nfunction init_block(s) {\n var n; /* iterates over tree elements */\n\n /* Initialize the trees. */\n for (n = 0; n < L_CODES; n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; }\n for (n = 0; n < D_CODES; n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; }\n for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; }\n\n s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1;\n s.opt_len = s.static_len = 0;\n s.last_lit = s.matches = 0;\n}\n\n\n/* ===========================================================================\n * Flush the bit buffer and align the output on a byte boundary\n */\nfunction bi_windup(s)\n{\n if (s.bi_valid > 8) {\n put_short(s, s.bi_buf);\n } else if (s.bi_valid > 0) {\n //put_byte(s, (Byte)s->bi_buf);\n s.pending_buf[s.pending++] = s.bi_buf;\n }\n s.bi_buf = 0;\n s.bi_valid = 0;\n}\n\n/* ===========================================================================\n * Copy a stored block, storing first the length and its\n * one's complement if requested.\n */\nfunction copy_block(s, buf, len, header)\n//DeflateState *s;\n//charf *buf; /* the input data */\n//unsigned len; /* its length */\n//int header; /* true if block header must be written */\n{\n bi_windup(s); /* align on byte boundary */\n\n if (header) {\n put_short(s, len);\n put_short(s, ~len);\n }\n// while (len--) {\n// put_byte(s, *buf++);\n// }\n utils.arraySet(s.pending_buf, s.window, buf, len, s.pending);\n s.pending += len;\n}\n\n/* ===========================================================================\n * Compares to subtrees, using the tree depth as tie breaker when\n * the subtrees have equal frequency. This minimizes the worst case length.\n */\nfunction smaller(tree, n, m, depth) {\n var _n2 = n * 2;\n var _m2 = m * 2;\n return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ ||\n (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m]));\n}\n\n/* ===========================================================================\n * Restore the heap property by moving down the tree starting at node k,\n * exchanging a node with the smallest of its two sons if necessary, stopping\n * when the heap property is re-established (each father smaller than its\n * two sons).\n */\nfunction pqdownheap(s, tree, k)\n// deflate_state *s;\n// ct_data *tree; /* the tree to restore */\n// int k; /* node to move down */\n{\n var v = s.heap[k];\n var j = k << 1; /* left son of k */\n while (j <= s.heap_len) {\n /* Set j to the smallest of the two sons: */\n if (j < s.heap_len &&\n smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {\n j++;\n }\n /* Exit if v is smaller than both sons */\n if (smaller(tree, v, s.heap[j], s.depth)) { break; }\n\n /* Exchange v with the smallest son */\n s.heap[k] = s.heap[j];\n k = j;\n\n /* And continue down the tree, setting j to the left son of k */\n j <<= 1;\n }\n s.heap[k] = v;\n}\n\n\n// inlined manually\n// var SMALLEST = 1;\n\n/* ===========================================================================\n * Send the block data compressed using the given Huffman trees\n */\nfunction compress_block(s, ltree, dtree)\n// deflate_state *s;\n// const ct_data *ltree; /* literal tree */\n// const ct_data *dtree; /* distance tree */\n{\n var dist; /* distance of matched string */\n var lc; /* match length or unmatched char (if dist == 0) */\n var lx = 0; /* running index in l_buf */\n var code; /* the code to send */\n var extra; /* number of extra bits to send */\n\n if (s.last_lit !== 0) {\n do {\n dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]);\n lc = s.pending_buf[s.l_buf + lx];\n lx++;\n\n if (dist === 0) {\n send_code(s, lc, ltree); /* send a literal byte */\n //Tracecv(isgraph(lc), (stderr,\" '%c' \", lc));\n } else {\n /* Here, lc is the match length - MIN_MATCH */\n code = _length_code[lc];\n send_code(s, code + LITERALS + 1, ltree); /* send the length code */\n extra = extra_lbits[code];\n if (extra !== 0) {\n lc -= base_length[code];\n send_bits(s, lc, extra); /* send the extra length bits */\n }\n dist--; /* dist is now the match distance - 1 */\n code = d_code(dist);\n //Assert (code < D_CODES, \"bad d_code\");\n\n send_code(s, code, dtree); /* send the distance code */\n extra = extra_dbits[code];\n if (extra !== 0) {\n dist -= base_dist[code];\n send_bits(s, dist, extra); /* send the extra distance bits */\n }\n } /* literal or match pair ? */\n\n /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */\n //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx,\n // \"pendingBuf overflow\");\n\n } while (lx < s.last_lit);\n }\n\n send_code(s, END_BLOCK, ltree);\n}\n\n\n/* ===========================================================================\n * Construct one Huffman tree and assigns the code bit strings and lengths.\n * Update the total bit length for the current block.\n * IN assertion: the field freq is set for all tree elements.\n * OUT assertions: the fields len and code are set to the optimal bit length\n * and corresponding code. The length opt_len is updated; static_len is\n * also updated if stree is not null. The field max_code is set.\n */\nfunction build_tree(s, desc)\n// deflate_state *s;\n// tree_desc *desc; /* the tree descriptor */\n{\n var tree = desc.dyn_tree;\n var stree = desc.stat_desc.static_tree;\n var has_stree = desc.stat_desc.has_stree;\n var elems = desc.stat_desc.elems;\n var n, m; /* iterate over heap elements */\n var max_code = -1; /* largest code with non zero frequency */\n var node; /* new node being created */\n\n /* Construct the initial heap, with least frequent element in\n * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].\n * heap[0] is not used.\n */\n s.heap_len = 0;\n s.heap_max = HEAP_SIZE;\n\n for (n = 0; n < elems; n++) {\n if (tree[n * 2]/*.Freq*/ !== 0) {\n s.heap[++s.heap_len] = max_code = n;\n s.depth[n] = 0;\n\n } else {\n tree[n * 2 + 1]/*.Len*/ = 0;\n }\n }\n\n /* The pkzip format requires that at least one distance code exists,\n * and that at least one bit should be sent even if there is only one\n * possible code. So to avoid special checks later on we force at least\n * two codes of non zero frequency.\n */\n while (s.heap_len < 2) {\n node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0);\n tree[node * 2]/*.Freq*/ = 1;\n s.depth[node] = 0;\n s.opt_len--;\n\n if (has_stree) {\n s.static_len -= stree[node * 2 + 1]/*.Len*/;\n }\n /* node is 0 or 1 so it does not have extra bits */\n }\n desc.max_code = max_code;\n\n /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,\n * establish sub-heaps of increasing lengths:\n */\n for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); }\n\n /* Construct the Huffman tree by repeatedly combining the least two\n * frequent nodes.\n */\n node = elems; /* next internal node of the tree */\n do {\n //pqremove(s, tree, n); /* n = node of least frequency */\n /*** pqremove ***/\n n = s.heap[1/*SMALLEST*/];\n s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--];\n pqdownheap(s, tree, 1/*SMALLEST*/);\n /***/\n\n m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */\n\n s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */\n s.heap[--s.heap_max] = m;\n\n /* Create a new node father of n and m */\n tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/;\n s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1;\n tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node;\n\n /* and insert the new node in the heap */\n s.heap[1/*SMALLEST*/] = node++;\n pqdownheap(s, tree, 1/*SMALLEST*/);\n\n } while (s.heap_len >= 2);\n\n s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/];\n\n /* At this point, the fields freq and dad are set. We can now\n * generate the bit lengths.\n */\n gen_bitlen(s, desc);\n\n /* The field len is now set, we can generate the bit codes */\n gen_codes(tree, max_code, s.bl_count);\n}\n\n\n/* ===========================================================================\n * Scan a literal or distance tree to determine the frequencies of the codes\n * in the bit length tree.\n */\nfunction scan_tree(s, tree, max_code)\n// deflate_state *s;\n// ct_data *tree; /* the tree to be scanned */\n// int max_code; /* and its largest code of non zero frequency */\n{\n var n; /* iterates over all tree elements */\n var prevlen = -1; /* last emitted length */\n var curlen; /* length of current code */\n\n var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n var count = 0; /* repeat count of the current code */\n var max_count = 7; /* max repeat count */\n var min_count = 4; /* min repeat count */\n\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n }\n tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n if (++count < max_count && curlen === nextlen) {\n continue;\n\n } else if (count < min_count) {\n s.bl_tree[curlen * 2]/*.Freq*/ += count;\n\n } else if (curlen !== 0) {\n\n if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; }\n s.bl_tree[REP_3_6 * 2]/*.Freq*/++;\n\n } else if (count <= 10) {\n s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++;\n\n } else {\n s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++;\n }\n\n count = 0;\n prevlen = curlen;\n\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n\n } else if (curlen === nextlen) {\n max_count = 6;\n min_count = 3;\n\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n}\n\n\n/* ===========================================================================\n * Send a literal or distance tree in compressed form, using the codes in\n * bl_tree.\n */\nfunction send_tree(s, tree, max_code)\n// deflate_state *s;\n// ct_data *tree; /* the tree to be scanned */\n// int max_code; /* and its largest code of non zero frequency */\n{\n var n; /* iterates over all tree elements */\n var prevlen = -1; /* last emitted length */\n var curlen; /* length of current code */\n\n var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n var count = 0; /* repeat count of the current code */\n var max_count = 7; /* max repeat count */\n var min_count = 4; /* min repeat count */\n\n /* tree[max_code+1].Len = -1; */ /* guard already set */\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n }\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n if (++count < max_count && curlen === nextlen) {\n continue;\n\n } else if (count < min_count) {\n do { send_code(s, curlen, s.bl_tree); } while (--count !== 0);\n\n } else if (curlen !== 0) {\n if (curlen !== prevlen) {\n send_code(s, curlen, s.bl_tree);\n count--;\n }\n //Assert(count >= 3 && count <= 6, \" 3_6?\");\n send_code(s, REP_3_6, s.bl_tree);\n send_bits(s, count - 3, 2);\n\n } else if (count <= 10) {\n send_code(s, REPZ_3_10, s.bl_tree);\n send_bits(s, count - 3, 3);\n\n } else {\n send_code(s, REPZ_11_138, s.bl_tree);\n send_bits(s, count - 11, 7);\n }\n\n count = 0;\n prevlen = curlen;\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n\n } else if (curlen === nextlen) {\n max_count = 6;\n min_count = 3;\n\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n}\n\n\n/* ===========================================================================\n * Construct the Huffman tree for the bit lengths and return the index in\n * bl_order of the last bit length code to send.\n */\nfunction build_bl_tree(s) {\n var max_blindex; /* index of last bit length code of non zero freq */\n\n /* Determine the bit length frequencies for literal and distance trees */\n scan_tree(s, s.dyn_ltree, s.l_desc.max_code);\n scan_tree(s, s.dyn_dtree, s.d_desc.max_code);\n\n /* Build the bit length tree: */\n build_tree(s, s.bl_desc);\n /* opt_len now includes the length of the tree representations, except\n * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.\n */\n\n /* Determine the number of bit length codes to send. The pkzip format\n * requires that at least 4 bit length codes be sent. (appnote.txt says\n * 3 but the actual value used is 4.)\n */\n for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) {\n break;\n }\n }\n /* Update opt_len to include the bit length tree and counts */\n s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n //Tracev((stderr, \"\\ndyn trees: dyn %ld, stat %ld\",\n // s->opt_len, s->static_len));\n\n return max_blindex;\n}\n\n\n/* ===========================================================================\n * Send the header for a block using dynamic Huffman trees: the counts, the\n * lengths of the bit length codes, the literal tree and the distance tree.\n * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n */\nfunction send_all_trees(s, lcodes, dcodes, blcodes)\n// deflate_state *s;\n// int lcodes, dcodes, blcodes; /* number of codes for each tree */\n{\n var rank; /* index in bl_order */\n\n //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, \"not enough codes\");\n //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,\n // \"too many codes\");\n //Tracev((stderr, \"\\nbl counts: \"));\n send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */\n send_bits(s, dcodes - 1, 5);\n send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */\n for (rank = 0; rank < blcodes; rank++) {\n //Tracev((stderr, \"\\nbl code %2d \", bl_order[rank]));\n send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3);\n }\n //Tracev((stderr, \"\\nbl tree: sent %ld\", s->bits_sent));\n\n send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */\n //Tracev((stderr, \"\\nlit tree: sent %ld\", s->bits_sent));\n\n send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */\n //Tracev((stderr, \"\\ndist tree: sent %ld\", s->bits_sent));\n}\n\n\n/* ===========================================================================\n * Check if the data type is TEXT or BINARY, using the following algorithm:\n * - TEXT if the two conditions below are satisfied:\n * a) There are no non-portable control characters belonging to the\n * \"black list\" (0..6, 14..25, 28..31).\n * b) There is at least one printable character belonging to the\n * \"white list\" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255).\n * - BINARY otherwise.\n * - The following partially-portable control characters form a\n * \"gray list\" that is ignored in this detection algorithm:\n * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}).\n * IN assertion: the fields Freq of dyn_ltree are set.\n */\nfunction detect_data_type(s) {\n /* black_mask is the bit mask of black-listed bytes\n * set bits 0..6, 14..25, and 28..31\n * 0xf3ffc07f = binary 11110011111111111100000001111111\n */\n var black_mask = 0xf3ffc07f;\n var n;\n\n /* Check for non-textual (\"black-listed\") bytes. */\n for (n = 0; n <= 31; n++, black_mask >>>= 1) {\n if ((black_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) {\n return Z_BINARY;\n }\n }\n\n /* Check for textual (\"white-listed\") bytes. */\n if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 ||\n s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) {\n return Z_TEXT;\n }\n for (n = 32; n < LITERALS; n++) {\n if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) {\n return Z_TEXT;\n }\n }\n\n /* There are no \"black-listed\" or \"white-listed\" bytes:\n * this stream either is empty or has tolerated (\"gray-listed\") bytes only.\n */\n return Z_BINARY;\n}\n\n\nvar static_init_done = false;\n\n/* ===========================================================================\n * Initialize the tree data structures for a new zlib stream.\n */\nfunction _tr_init(s)\n{\n\n if (!static_init_done) {\n tr_static_init();\n static_init_done = true;\n }\n\n s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc);\n s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc);\n s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc);\n\n s.bi_buf = 0;\n s.bi_valid = 0;\n\n /* Initialize the first block of the first file: */\n init_block(s);\n}\n\n\n/* ===========================================================================\n * Send a stored block\n */\nfunction _tr_stored_block(s, buf, stored_len, last)\n//DeflateState *s;\n//charf *buf; /* input block */\n//ulg stored_len; /* length of input block */\n//int last; /* one if this is the last block for a file */\n{\n send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); /* send block type */\n copy_block(s, buf, stored_len, true); /* with header */\n}\n\n\n/* ===========================================================================\n * Send one empty static block to give enough lookahead for inflate.\n * This takes 10 bits, of which 7 may remain in the bit buffer.\n */\nfunction _tr_align(s) {\n send_bits(s, STATIC_TREES << 1, 3);\n send_code(s, END_BLOCK, static_ltree);\n bi_flush(s);\n}\n\n\n/* ===========================================================================\n * Determine the best encoding for the current block: dynamic trees, static\n * trees or store, and output the encoded block to the zip file.\n */\nfunction _tr_flush_block(s, buf, stored_len, last)\n//DeflateState *s;\n//charf *buf; /* input block, or NULL if too old */\n//ulg stored_len; /* length of input block */\n//int last; /* one if this is the last block for a file */\n{\n var opt_lenb, static_lenb; /* opt_len and static_len in bytes */\n var max_blindex = 0; /* index of last bit length code of non zero freq */\n\n /* Build the Huffman trees unless a stored block is forced */\n if (s.level > 0) {\n\n /* Check if the file is binary or text */\n if (s.strm.data_type === Z_UNKNOWN) {\n s.strm.data_type = detect_data_type(s);\n }\n\n /* Construct the literal and distance trees */\n build_tree(s, s.l_desc);\n // Tracev((stderr, \"\\nlit data: dyn %ld, stat %ld\", s->opt_len,\n // s->static_len));\n\n build_tree(s, s.d_desc);\n // Tracev((stderr, \"\\ndist data: dyn %ld, stat %ld\", s->opt_len,\n // s->static_len));\n /* At this point, opt_len and static_len are the total bit lengths of\n * the compressed block data, excluding the tree representations.\n */\n\n /* Build the bit length tree for the above two trees, and get the index\n * in bl_order of the last bit length code to send.\n */\n max_blindex = build_bl_tree(s);\n\n /* Determine the best encoding. Compute the block lengths in bytes. */\n opt_lenb = (s.opt_len + 3 + 7) >>> 3;\n static_lenb = (s.static_len + 3 + 7) >>> 3;\n\n // Tracev((stderr, \"\\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u \",\n // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,\n // s->last_lit));\n\n if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; }\n\n } else {\n // Assert(buf != (char*)0, \"lost buf\");\n opt_lenb = static_lenb = stored_len + 5; /* force a stored block */\n }\n\n if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) {\n /* 4: two words for the lengths */\n\n /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n * Otherwise we can't have processed more than WSIZE input bytes since\n * the last block flush, because compression would have been\n * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n * transform a block into a stored block.\n */\n _tr_stored_block(s, buf, stored_len, last);\n\n } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) {\n\n send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3);\n compress_block(s, static_ltree, static_dtree);\n\n } else {\n send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3);\n send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1);\n compress_block(s, s.dyn_ltree, s.dyn_dtree);\n }\n // Assert (s->compressed_len == s->bits_sent, \"bad compressed size\");\n /* The above check is made mod 2^32, for files larger than 512 MB\n * and uLong implemented on 32 bits.\n */\n init_block(s);\n\n if (last) {\n bi_windup(s);\n }\n // Tracev((stderr,\"\\ncomprlen %lu(%lu) \", s->compressed_len>>3,\n // s->compressed_len-7*last));\n}\n\n/* ===========================================================================\n * Save the match info and tally the frequency counts. Return true if\n * the current block must be flushed.\n */\nfunction _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}\n\nexports._tr_init = _tr_init;\nexports._tr_stored_block = _tr_stored_block;\nexports._tr_flush_block = _tr_flush_block;\nexports._tr_tally = _tr_tally;\nexports._tr_align = _tr_align;\n" - }, - { - "id": 15, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\inflate.js", - "name": "./node_modules/pako/lib/inflate.js", - "index": 18, - "index2": 18, - "size": 12412, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\pako\\index.js", - "issuerId": 1, - "issuerName": "./node_modules/pako/index.js", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "name": "./node_modules/fast-png/lib-esm/index.js", - "profile": { - "factory": 2180, - "building": 1082 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "name": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "profile": { - "factory": 21, - "building": 92, - "dependencies": 43 - } - }, - { - "id": 1, - "identifier": "F:\\tweb\\node_modules\\pako\\index.js", - "name": "./node_modules/pako/index.js", - "profile": { - "factory": 48, - "building": 7 - } - } - ], - "profile": { - "factory": 11, - "building": 13, - "dependencies": 8 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 1, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\index.js", - "module": "./node_modules/pako/index.js", - "moduleName": "./node_modules/pako/index.js", - "type": "cjs require", - "userRequest": "./lib/inflate", - "loc": "7:16-40" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 5, - "source": "'use strict';\n\n\nvar zlib_inflate = require('./zlib/inflate');\nvar utils = require('./utils/common');\nvar strings = require('./utils/strings');\nvar c = require('./zlib/constants');\nvar msg = require('./zlib/messages');\nvar ZStream = require('./zlib/zstream');\nvar GZheader = require('./zlib/gzheader');\n\nvar toString = Object.prototype.toString;\n\n/**\n * class Inflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[inflate]]\n * and [[inflateRaw]].\n **/\n\n/* internal\n * inflate.chunks -> Array\n *\n * Chunks of output data, if [[Inflate#onData]] not overridden.\n **/\n\n/**\n * Inflate.result -> Uint8Array|Array|String\n *\n * Uncompressed result, generated by default [[Inflate#onData]]\n * and [[Inflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Inflate#push]] with `Z_FINISH` / `true` param) or if you\n * push a chunk with explicit flush (call [[Inflate#push]] with\n * `Z_SYNC_FLUSH` param).\n **/\n\n/**\n * Inflate.err -> Number\n *\n * Error code after inflate finished. 0 (Z_OK) on success.\n * Should be checked if broken data possible.\n **/\n\n/**\n * Inflate.msg -> String\n *\n * Error message, if [[Inflate.err]] != 0\n **/\n\n\n/**\n * new Inflate(options)\n * - options (Object): zlib inflate options.\n *\n * Creates new inflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `windowBits`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw inflate\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n * By default, when no options set, autodetect deflate/gzip data format via\n * wrapper header.\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])\n * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * var inflate = new pako.Inflate({ level: 3});\n *\n * inflate.push(chunk1, false);\n * inflate.push(chunk2, true); // true -> last chunk\n *\n * if (inflate.err) { throw new Error(inflate.err); }\n *\n * console.log(inflate.result);\n * ```\n **/\nfunction Inflate(options) {\n if (!(this instanceof Inflate)) return new Inflate(options);\n\n this.options = utils.assign({\n chunkSize: 16384,\n windowBits: 0,\n to: ''\n }, options || {});\n\n var opt = this.options;\n\n // Force window size for `raw` data, if not set directly,\n // because we have no header for autodetect.\n if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) {\n opt.windowBits = -opt.windowBits;\n if (opt.windowBits === 0) { opt.windowBits = -15; }\n }\n\n // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate\n if ((opt.windowBits >= 0) && (opt.windowBits < 16) &&\n !(options && options.windowBits)) {\n opt.windowBits += 32;\n }\n\n // Gzip header has no info about windows size, we can do autodetect only\n // for deflate. So, if window size not set, force it to max when gzip possible\n if ((opt.windowBits > 15) && (opt.windowBits < 48)) {\n // bit 3 (16) -> gzipped data\n // bit 4 (32) -> autodetect gzip/deflate\n if ((opt.windowBits & 15) === 0) {\n opt.windowBits |= 15;\n }\n }\n\n this.err = 0; // error code, if happens (0 = Z_OK)\n this.msg = ''; // error message\n this.ended = false; // used to avoid multiple onEnd() calls\n this.chunks = []; // chunks of compressed data\n\n this.strm = new ZStream();\n this.strm.avail_out = 0;\n\n var status = zlib_inflate.inflateInit2(\n this.strm,\n opt.windowBits\n );\n\n if (status !== c.Z_OK) {\n throw new Error(msg[status]);\n }\n\n this.header = new GZheader();\n\n zlib_inflate.inflateGetHeader(this.strm, this.header);\n\n // Setup dictionary\n if (opt.dictionary) {\n // Convert data if needed\n if (typeof opt.dictionary === 'string') {\n opt.dictionary = strings.string2buf(opt.dictionary);\n } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {\n opt.dictionary = new Uint8Array(opt.dictionary);\n }\n if (opt.raw) { //In raw mode we need to set the dictionary early\n status = zlib_inflate.inflateSetDictionary(this.strm, opt.dictionary);\n if (status !== c.Z_OK) {\n throw new Error(msg[status]);\n }\n }\n }\n}\n\n/**\n * Inflate#push(data[, mode]) -> Boolean\n * - data (Uint8Array|Array|ArrayBuffer|String): input data\n * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.\n *\n * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with\n * new output chunks. Returns `true` on success. The last data block must have\n * mode Z_FINISH (or `true`). That will flush internal pending buffers and call\n * [[Inflate#onEnd]]. For interim explicit flushes (without ending the stream) you\n * can use mode Z_SYNC_FLUSH, keeping the decompression context.\n *\n * On fail call [[Inflate#onEnd]] with error code and return false.\n *\n * We strongly recommend to use `Uint8Array` on input for best speed (output\n * format is detected automatically). Also, don't skip last param and always\n * use the same type in your code (boolean or number). That will improve JS speed.\n *\n * For regular `Array`-s make sure all elements are [0..255].\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true); // push last chunk\n * ```\n **/\nInflate.prototype.push = function (data, mode) {\n var strm = this.strm;\n var chunkSize = this.options.chunkSize;\n var dictionary = this.options.dictionary;\n var status, _mode;\n var next_out_utf8, tail, utf8str;\n\n // Flag to properly process Z_BUF_ERROR on testing inflate call\n // when we check that all output data was flushed.\n var allowBufError = false;\n\n if (this.ended) { return false; }\n _mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH);\n\n // Convert data if needed\n if (typeof data === 'string') {\n // Only binary strings can be decompressed on practice\n strm.input = strings.binstring2buf(data);\n } else if (toString.call(data) === '[object ArrayBuffer]') {\n strm.input = new Uint8Array(data);\n } else {\n strm.input = data;\n }\n\n strm.next_in = 0;\n strm.avail_in = strm.input.length;\n\n do {\n if (strm.avail_out === 0) {\n strm.output = new utils.Buf8(chunkSize);\n strm.next_out = 0;\n strm.avail_out = chunkSize;\n }\n\n status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH); /* no bad return value */\n\n if (status === c.Z_NEED_DICT && dictionary) {\n status = zlib_inflate.inflateSetDictionary(this.strm, dictionary);\n }\n\n if (status === c.Z_BUF_ERROR && allowBufError === true) {\n status = c.Z_OK;\n allowBufError = false;\n }\n\n if (status !== c.Z_STREAM_END && status !== c.Z_OK) {\n this.onEnd(status);\n this.ended = true;\n return false;\n }\n\n if (strm.next_out) {\n if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH))) {\n\n if (this.options.to === 'string') {\n\n next_out_utf8 = strings.utf8border(strm.output, strm.next_out);\n\n tail = strm.next_out - next_out_utf8;\n utf8str = strings.buf2string(strm.output, next_out_utf8);\n\n // move tail\n strm.next_out = tail;\n strm.avail_out = chunkSize - tail;\n if (tail) { utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); }\n\n this.onData(utf8str);\n\n } else {\n this.onData(utils.shrinkBuf(strm.output, strm.next_out));\n }\n }\n }\n\n // When no more input data, we should check that internal inflate buffers\n // are flushed. The only way to do it when avail_out = 0 - run one more\n // inflate pass. But if output data not exists, inflate return Z_BUF_ERROR.\n // Here we set flag to process this error properly.\n //\n // NOTE. Deflate does not return error in this case and does not needs such\n // logic.\n if (strm.avail_in === 0 && strm.avail_out === 0) {\n allowBufError = true;\n }\n\n } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c.Z_STREAM_END);\n\n if (status === c.Z_STREAM_END) {\n _mode = c.Z_FINISH;\n }\n\n // Finalize on the last chunk.\n if (_mode === c.Z_FINISH) {\n status = zlib_inflate.inflateEnd(this.strm);\n this.onEnd(status);\n this.ended = true;\n return status === c.Z_OK;\n }\n\n // callback interim results if Z_SYNC_FLUSH.\n if (_mode === c.Z_SYNC_FLUSH) {\n this.onEnd(c.Z_OK);\n strm.avail_out = 0;\n return true;\n }\n\n return true;\n};\n\n\n/**\n * Inflate#onData(chunk) -> Void\n * - chunk (Uint8Array|Array|String): output data. Type of array depends\n * on js engine support. When string output requested, each chunk\n * will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nInflate.prototype.onData = function (chunk) {\n this.chunks.push(chunk);\n};\n\n\n/**\n * Inflate#onEnd(status) -> Void\n * - status (Number): inflate status. 0 (Z_OK) on success,\n * other if not.\n *\n * Called either after you tell inflate that the input stream is\n * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)\n * or if an error happened. By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nInflate.prototype.onEnd = function (status) {\n // On success - join\n if (status === c.Z_OK) {\n if (this.options.to === 'string') {\n // Glue & convert here, until we teach pako to send\n // utf8 aligned strings to onData\n this.result = this.chunks.join('');\n } else {\n this.result = utils.flattenChunks(this.chunks);\n }\n }\n this.chunks = [];\n this.err = status;\n this.msg = this.strm.msg;\n};\n\n\n/**\n * inflate(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Decompress `data` with inflate/ungzip and `options`. Autodetect\n * format via wrapper header by default. That's why we don't provide\n * separate `ungzip` method.\n *\n * Supported options are:\n *\n * - windowBits\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n * negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , input = pako.deflate([1,2,3,4,5,6,7,8,9])\n * , output;\n *\n * try {\n * output = pako.inflate(input);\n * } catch (err)\n * console.log(err);\n * }\n * ```\n **/\nfunction inflate(input, options) {\n var inflator = new Inflate(options);\n\n inflator.push(input, true);\n\n // That will never happens, if you don't cheat with options :)\n if (inflator.err) { throw inflator.msg || msg[inflator.err]; }\n\n return inflator.result;\n}\n\n\n/**\n * inflateRaw(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * The same as [[inflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction inflateRaw(input, options) {\n options = options || {};\n options.raw = true;\n return inflate(input, options);\n}\n\n\n/**\n * ungzip(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Just shortcut to [[inflate]], because it autodetects format\n * by header.content. Done for convenience.\n **/\n\n\nexports.Inflate = Inflate;\nexports.inflate = inflate;\nexports.inflateRaw = inflateRaw;\nexports.ungzip = inflate;\n" - }, - { - "id": 16, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\inflate.js", - "name": "./node_modules/pako/lib/zlib/inflate.js", - "index": 19, - "index2": 15, - "size": 50284, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\pako\\lib\\inflate.js", - "issuerId": 15, - "issuerName": "./node_modules/pako/lib/inflate.js", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "name": "./node_modules/fast-png/lib-esm/index.js", - "profile": { - "factory": 2180, - "building": 1082 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "name": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "profile": { - "factory": 21, - "building": 92, - "dependencies": 43 - } - }, - { - "id": 1, - "identifier": "F:\\tweb\\node_modules\\pako\\index.js", - "name": "./node_modules/pako/index.js", - "profile": { - "factory": 48, - "building": 7 - } - }, - { - "id": 15, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\inflate.js", - "name": "./node_modules/pako/lib/inflate.js", - "profile": { - "factory": 11, - "building": 13, - "dependencies": 8 - } - } - ], - "profile": { - "factory": 9, - "building": 47, - "dependencies": 9 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 15, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\lib\\inflate.js", - "module": "./node_modules/pako/lib/inflate.js", - "moduleName": "./node_modules/pako/lib/inflate.js", - "type": "cjs require", - "userRequest": "./zlib/inflate", - "loc": "4:19-44" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 6, - "source": "'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils = require('../utils/common');\nvar adler32 = require('./adler32');\nvar crc32 = require('./crc32');\nvar inflate_fast = require('./inffast');\nvar inflate_table = require('./inftrees');\n\nvar CODES = 0;\nvar LENS = 1;\nvar DISTS = 2;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n/* Allowed flush values; see deflate() and inflate() below for details */\n//var Z_NO_FLUSH = 0;\n//var Z_PARTIAL_FLUSH = 1;\n//var Z_SYNC_FLUSH = 2;\n//var Z_FULL_FLUSH = 3;\nvar Z_FINISH = 4;\nvar Z_BLOCK = 5;\nvar Z_TREES = 6;\n\n\n/* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\nvar Z_OK = 0;\nvar Z_STREAM_END = 1;\nvar Z_NEED_DICT = 2;\n//var Z_ERRNO = -1;\nvar Z_STREAM_ERROR = -2;\nvar Z_DATA_ERROR = -3;\nvar Z_MEM_ERROR = -4;\nvar Z_BUF_ERROR = -5;\n//var Z_VERSION_ERROR = -6;\n\n/* The deflate compression method */\nvar Z_DEFLATED = 8;\n\n\n/* STATES ====================================================================*/\n/* ===========================================================================*/\n\n\nvar HEAD = 1; /* i: waiting for magic header */\nvar FLAGS = 2; /* i: waiting for method and flags (gzip) */\nvar TIME = 3; /* i: waiting for modification time (gzip) */\nvar OS = 4; /* i: waiting for extra flags and operating system (gzip) */\nvar EXLEN = 5; /* i: waiting for extra length (gzip) */\nvar EXTRA = 6; /* i: waiting for extra bytes (gzip) */\nvar NAME = 7; /* i: waiting for end of file name (gzip) */\nvar COMMENT = 8; /* i: waiting for end of comment (gzip) */\nvar HCRC = 9; /* i: waiting for header crc (gzip) */\nvar DICTID = 10; /* i: waiting for dictionary check value */\nvar DICT = 11; /* waiting for inflateSetDictionary() call */\nvar TYPE = 12; /* i: waiting for type bits, including last-flag bit */\nvar TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */\nvar STORED = 14; /* i: waiting for stored size (length and complement) */\nvar COPY_ = 15; /* i/o: same as COPY below, but only first time in */\nvar COPY = 16; /* i/o: waiting for input or output to copy stored block */\nvar TABLE = 17; /* i: waiting for dynamic block table lengths */\nvar LENLENS = 18; /* i: waiting for code length code lengths */\nvar CODELENS = 19; /* i: waiting for length/lit and distance code lengths */\nvar LEN_ = 20; /* i: same as LEN below, but only first time in */\nvar LEN = 21; /* i: waiting for length/lit/eob code */\nvar LENEXT = 22; /* i: waiting for length extra bits */\nvar DIST = 23; /* i: waiting for distance code */\nvar DISTEXT = 24; /* i: waiting for distance extra bits */\nvar MATCH = 25; /* o: waiting for output space to copy string */\nvar LIT = 26; /* o: waiting for output space to write literal */\nvar CHECK = 27; /* i: waiting for 32-bit check value */\nvar LENGTH = 28; /* i: waiting for 32-bit length (gzip) */\nvar DONE = 29; /* finished check, done -- remain here until reset */\nvar BAD = 30; /* got a data error -- remain here until reset */\nvar MEM = 31; /* got an inflate() memory error -- remain here until reset */\nvar SYNC = 32; /* looking for synchronization bytes to restart inflate() */\n\n/* ===========================================================================*/\n\n\n\nvar ENOUGH_LENS = 852;\nvar ENOUGH_DISTS = 592;\n//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nvar MAX_WBITS = 15;\n/* 32K LZ77 window */\nvar DEF_WBITS = MAX_WBITS;\n\n\nfunction zswap32(q) {\n return (((q >>> 24) & 0xff) +\n ((q >>> 8) & 0xff00) +\n ((q & 0xff00) << 8) +\n ((q & 0xff) << 24));\n}\n\n\nfunction InflateState() {\n this.mode = 0; /* current inflate mode */\n this.last = false; /* true if processing last block */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n this.havedict = false; /* true if dictionary provided */\n this.flags = 0; /* gzip header method and flags (0 if zlib) */\n this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */\n this.check = 0; /* protected copy of check value */\n this.total = 0; /* protected copy of output count */\n // TODO: may be {}\n this.head = null; /* where to save gzip header information */\n\n /* sliding window */\n this.wbits = 0; /* log base 2 of requested window size */\n this.wsize = 0; /* window size or zero if not using window */\n this.whave = 0; /* valid bytes in the window */\n this.wnext = 0; /* window write index */\n this.window = null; /* allocated sliding window, if needed */\n\n /* bit accumulator */\n this.hold = 0; /* input bit accumulator */\n this.bits = 0; /* number of bits in \"in\" */\n\n /* for string and stored block copying */\n this.length = 0; /* literal or length of data to copy */\n this.offset = 0; /* distance back to copy string from */\n\n /* for table and code decoding */\n this.extra = 0; /* extra bits needed */\n\n /* fixed and dynamic code tables */\n this.lencode = null; /* starting table for length/literal codes */\n this.distcode = null; /* starting table for distance codes */\n this.lenbits = 0; /* index bits for lencode */\n this.distbits = 0; /* index bits for distcode */\n\n /* dynamic table building */\n this.ncode = 0; /* number of code length code lengths */\n this.nlen = 0; /* number of length code lengths */\n this.ndist = 0; /* number of distance code lengths */\n this.have = 0; /* number of code lengths in lens[] */\n this.next = null; /* next available space in codes[] */\n\n this.lens = new utils.Buf16(320); /* temporary storage for code lengths */\n this.work = new utils.Buf16(288); /* work area for code table building */\n\n /*\n because we don't have pointers in js, we use lencode and distcode directly\n as buffers so we don't need codes\n */\n //this.codes = new utils.Buf32(ENOUGH); /* space for code tables */\n this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */\n this.distdyn = null; /* dynamic table for distance codes (JS specific) */\n this.sane = 0; /* if false, allow invalid distance too far */\n this.back = 0; /* bits back of last unprocessed length/lit */\n this.was = 0; /* initial length of match */\n}\n\nfunction inflateResetKeep(strm) {\n var state;\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n strm.total_in = strm.total_out = state.total = 0;\n strm.msg = ''; /*Z_NULL*/\n if (state.wrap) { /* to support ill-conceived Java test suite */\n strm.adler = state.wrap & 1;\n }\n state.mode = HEAD;\n state.last = 0;\n state.havedict = 0;\n state.dmax = 32768;\n state.head = null/*Z_NULL*/;\n state.hold = 0;\n state.bits = 0;\n //state.lencode = state.distcode = state.next = state.codes;\n state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS);\n state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS);\n\n state.sane = 1;\n state.back = -1;\n //Tracev((stderr, \"inflate: reset\\n\"));\n return Z_OK;\n}\n\nfunction inflateReset(strm) {\n var state;\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n state.wsize = 0;\n state.whave = 0;\n state.wnext = 0;\n return inflateResetKeep(strm);\n\n}\n\nfunction inflateReset2(strm, windowBits) {\n var wrap;\n var state;\n\n /* get the state */\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n\n /* extract wrap request from windowBits parameter */\n if (windowBits < 0) {\n wrap = 0;\n windowBits = -windowBits;\n }\n else {\n wrap = (windowBits >> 4) + 1;\n if (windowBits < 48) {\n windowBits &= 15;\n }\n }\n\n /* set number of window bits, free window if different */\n if (windowBits && (windowBits < 8 || windowBits > 15)) {\n return Z_STREAM_ERROR;\n }\n if (state.window !== null && state.wbits !== windowBits) {\n state.window = null;\n }\n\n /* update state and reset the rest of it */\n state.wrap = wrap;\n state.wbits = windowBits;\n return inflateReset(strm);\n}\n\nfunction inflateInit2(strm, windowBits) {\n var ret;\n var state;\n\n if (!strm) { return Z_STREAM_ERROR; }\n //strm.msg = Z_NULL; /* in case we return an error */\n\n state = new InflateState();\n\n //if (state === Z_NULL) return Z_MEM_ERROR;\n //Tracev((stderr, \"inflate: allocated\\n\"));\n strm.state = state;\n state.window = null/*Z_NULL*/;\n ret = inflateReset2(strm, windowBits);\n if (ret !== Z_OK) {\n strm.state = null/*Z_NULL*/;\n }\n return ret;\n}\n\nfunction inflateInit(strm) {\n return inflateInit2(strm, DEF_WBITS);\n}\n\n\n/*\n Return state with length and distance decoding tables and index sizes set to\n fixed code decoding. Normally this returns fixed tables from inffixed.h.\n If BUILDFIXED is defined, then instead this routine builds the tables the\n first time it's called, and returns those tables the first time and\n thereafter. This reduces the size of the code by about 2K bytes, in\n exchange for a little execution time. However, BUILDFIXED should not be\n used for threaded applications, since the rewriting of the tables and virgin\n may not be thread-safe.\n */\nvar virgin = true;\n\nvar lenfix, distfix; // We have no pointers in JS, so keep tables separate\n\nfunction fixedtables(state) {\n /* build fixed huffman tables if first call (may not be thread safe) */\n if (virgin) {\n var sym;\n\n lenfix = new utils.Buf32(512);\n distfix = new utils.Buf32(32);\n\n /* literal/length table */\n sym = 0;\n while (sym < 144) { state.lens[sym++] = 8; }\n while (sym < 256) { state.lens[sym++] = 9; }\n while (sym < 280) { state.lens[sym++] = 7; }\n while (sym < 288) { state.lens[sym++] = 8; }\n\n inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 });\n\n /* distance table */\n sym = 0;\n while (sym < 32) { state.lens[sym++] = 5; }\n\n inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 });\n\n /* do this just once */\n virgin = false;\n }\n\n state.lencode = lenfix;\n state.lenbits = 9;\n state.distcode = distfix;\n state.distbits = 5;\n}\n\n\n/*\n Update the window with the last wsize (normally 32K) bytes written before\n returning. If window does not exist yet, create it. This is only called\n when a window is already in use, or when output has been written during this\n inflate call, but the end of the deflate stream has not been reached yet.\n It is also called to create a window for dictionary data when a dictionary\n is loaded.\n\n Providing output buffers larger than 32K to inflate() should provide a speed\n advantage, since only the last 32K of output is copied to the sliding window\n upon return from inflate(), and since all distances after the first 32K of\n output will fall in the output data, making match copies simpler and faster.\n The advantage may be dependent on the size of the processor's data caches.\n */\nfunction updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}\n\nfunction inflate(strm, flush) {\n var state;\n var input, output; // input/output buffers\n var next; /* next input INDEX */\n var put; /* next output INDEX */\n var have, left; /* available input and output */\n var hold; /* bit buffer */\n var bits; /* bits in bit buffer */\n var _in, _out; /* save starting available input and output */\n var copy; /* number of stored or match bytes to copy */\n var from; /* where to copy match bytes from */\n var from_source;\n var here = 0; /* current decoding table entry */\n var here_bits, here_op, here_val; // paked \"here\" denormalized (JS specific)\n //var last; /* parent table entry */\n var last_bits, last_op, last_val; // paked \"last\" denormalized (JS specific)\n var len; /* length to copy for repeats, bits to drop */\n var ret; /* return code */\n var hbuf = new utils.Buf8(4); /* buffer for gzip header crc calculation */\n var opts;\n\n var n; // temporary var for NEED_BITS\n\n var order = /* permutation of code lengths */\n [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ];\n\n\n if (!strm || !strm.state || !strm.output ||\n (!strm.input && strm.avail_in !== 0)) {\n return Z_STREAM_ERROR;\n }\n\n state = strm.state;\n if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */\n\n\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n _in = have;\n _out = left;\n ret = Z_OK;\n\n inf_leave: // goto emulation\n for (;;) {\n switch (state.mode) {\n case HEAD:\n if (state.wrap === 0) {\n state.mode = TYPEDO;\n break;\n }\n //=== NEEDBITS(16);\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */\n state.check = 0/*crc32(0L, Z_NULL, 0)*/;\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = FLAGS;\n break;\n }\n state.flags = 0; /* expect zlib header */\n if (state.head) {\n state.head.done = false;\n }\n if (!(state.wrap & 1) || /* check if zlib header allowed */\n (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) {\n strm.msg = 'incorrect header check';\n state.mode = BAD;\n break;\n }\n if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n len = (hold & 0x0f)/*BITS(4)*/ + 8;\n if (state.wbits === 0) {\n state.wbits = len;\n }\n else if (len > state.wbits) {\n strm.msg = 'invalid window size';\n state.mode = BAD;\n break;\n }\n state.dmax = 1 << len;\n //Tracev((stderr, \"inflate: zlib header ok\\n\"));\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = hold & 0x200 ? DICTID : TYPE;\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n break;\n case FLAGS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.flags = hold;\n if ((state.flags & 0xff) !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n if (state.flags & 0xe000) {\n strm.msg = 'unknown header flags set';\n state.mode = BAD;\n break;\n }\n if (state.head) {\n state.head.text = ((hold >> 8) & 1);\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = TIME;\n /* falls through */\n case TIME:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.time = hold;\n }\n if (state.flags & 0x0200) {\n //=== CRC4(state.check, hold)\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n hbuf[2] = (hold >>> 16) & 0xff;\n hbuf[3] = (hold >>> 24) & 0xff;\n state.check = crc32(state.check, hbuf, 4, 0);\n //===\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = OS;\n /* falls through */\n case OS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.xflags = (hold & 0xff);\n state.head.os = (hold >> 8);\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = EXLEN;\n /* falls through */\n case EXLEN:\n if (state.flags & 0x0400) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length = hold;\n if (state.head) {\n state.head.extra_len = hold;\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n else if (state.head) {\n state.head.extra = null/*Z_NULL*/;\n }\n state.mode = EXTRA;\n /* falls through */\n case EXTRA:\n if (state.flags & 0x0400) {\n copy = state.length;\n if (copy > have) { copy = have; }\n if (copy) {\n if (state.head) {\n len = state.head.extra_len - state.length;\n if (!state.head.extra) {\n // Use untyped array for more convenient processing later\n state.head.extra = new Array(state.head.extra_len);\n }\n utils.arraySet(\n state.head.extra,\n input,\n next,\n // extra field is limited to 65536 bytes\n // - no need for additional size check\n copy,\n /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/\n len\n );\n //zmemcpy(state.head.extra + len, next,\n // len + copy > state.head.extra_max ?\n // state.head.extra_max - len : copy);\n }\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n state.length -= copy;\n }\n if (state.length) { break inf_leave; }\n }\n state.length = 0;\n state.mode = NAME;\n /* falls through */\n case NAME:\n if (state.flags & 0x0800) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n // TODO: 2 or 1 bytes?\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.name_max*/)) {\n state.head.name += String.fromCharCode(len);\n }\n } while (len && copy < have);\n\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.name = null;\n }\n state.length = 0;\n state.mode = COMMENT;\n /* falls through */\n case COMMENT:\n if (state.flags & 0x1000) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.comm_max*/)) {\n state.head.comment += String.fromCharCode(len);\n }\n } while (len && copy < have);\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.comment = null;\n }\n state.mode = HCRC;\n /* falls through */\n case HCRC:\n if (state.flags & 0x0200) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (hold !== (state.check & 0xffff)) {\n strm.msg = 'header crc mismatch';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n if (state.head) {\n state.head.hcrc = ((state.flags >> 9) & 1);\n state.head.done = true;\n }\n strm.adler = state.check = 0;\n state.mode = TYPE;\n break;\n case DICTID:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n strm.adler = state.check = zswap32(hold);\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = DICT;\n /* falls through */\n case DICT:\n if (state.havedict === 0) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n return Z_NEED_DICT;\n }\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = TYPE;\n /* falls through */\n case TYPE:\n if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case TYPEDO:\n if (state.last) {\n //--- BYTEBITS() ---//\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n state.mode = CHECK;\n break;\n }\n //=== NEEDBITS(3); */\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.last = (hold & 0x01)/*BITS(1)*/;\n //--- DROPBITS(1) ---//\n hold >>>= 1;\n bits -= 1;\n //---//\n\n switch ((hold & 0x03)/*BITS(2)*/) {\n case 0: /* stored block */\n //Tracev((stderr, \"inflate: stored block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = STORED;\n break;\n case 1: /* fixed block */\n fixedtables(state);\n //Tracev((stderr, \"inflate: fixed codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = LEN_; /* decode codes */\n if (flush === Z_TREES) {\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break inf_leave;\n }\n break;\n case 2: /* dynamic block */\n //Tracev((stderr, \"inflate: dynamic codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = TABLE;\n break;\n case 3:\n strm.msg = 'invalid block type';\n state.mode = BAD;\n }\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break;\n case STORED:\n //--- BYTEBITS() ---// /* go to byte boundary */\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) {\n strm.msg = 'invalid stored block lengths';\n state.mode = BAD;\n break;\n }\n state.length = hold & 0xffff;\n //Tracev((stderr, \"inflate: stored length %u\\n\",\n // state.length));\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = COPY_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case COPY_:\n state.mode = COPY;\n /* falls through */\n case COPY:\n copy = state.length;\n if (copy) {\n if (copy > have) { copy = have; }\n if (copy > left) { copy = left; }\n if (copy === 0) { break inf_leave; }\n //--- zmemcpy(put, next, copy); ---\n utils.arraySet(output, input, next, copy, put);\n //---//\n have -= copy;\n next += copy;\n left -= copy;\n put += copy;\n state.length -= copy;\n break;\n }\n //Tracev((stderr, \"inflate: stored end\\n\"));\n state.mode = TYPE;\n break;\n case TABLE:\n //=== NEEDBITS(14); */\n while (bits < 14) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4;\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n//#ifndef PKZIP_BUG_WORKAROUND\n if (state.nlen > 286 || state.ndist > 30) {\n strm.msg = 'too many length or distance symbols';\n state.mode = BAD;\n break;\n }\n//#endif\n //Tracev((stderr, \"inflate: table sizes ok\\n\"));\n state.have = 0;\n state.mode = LENLENS;\n /* falls through */\n case LENLENS:\n while (state.have < state.ncode) {\n //=== NEEDBITS(3);\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.lens[order[state.have++]] = (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n while (state.have < 19) {\n state.lens[order[state.have++]] = 0;\n }\n // We have separate tables & no pointers. 2 commented lines below not needed.\n //state.next = state.codes;\n //state.lencode = state.next;\n // Switch to use dynamic table\n state.lencode = state.lendyn;\n state.lenbits = 7;\n\n opts = { bits: state.lenbits };\n ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts);\n state.lenbits = opts.bits;\n\n if (ret) {\n strm.msg = 'invalid code lengths set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, \"inflate: code lengths ok\\n\"));\n state.have = 0;\n state.mode = CODELENS;\n /* falls through */\n case CODELENS:\n while (state.have < state.nlen + state.ndist) {\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_val < 16) {\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.lens[state.have++] = here_val;\n }\n else {\n if (here_val === 16) {\n //=== NEEDBITS(here.bits + 2);\n n = here_bits + 2;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n if (state.have === 0) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n len = state.lens[state.have - 1];\n copy = 3 + (hold & 0x03);//BITS(2);\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n }\n else if (here_val === 17) {\n //=== NEEDBITS(here.bits + 3);\n n = here_bits + 3;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 3 + (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n else {\n //=== NEEDBITS(here.bits + 7);\n n = here_bits + 7;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 11 + (hold & 0x7f);//BITS(7);\n //--- DROPBITS(7) ---//\n hold >>>= 7;\n bits -= 7;\n //---//\n }\n if (state.have + copy > state.nlen + state.ndist) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n while (copy--) {\n state.lens[state.have++] = len;\n }\n }\n }\n\n /* handle error breaks in while */\n if (state.mode === BAD) { break; }\n\n /* check for end-of-block code (better have one) */\n if (state.lens[256] === 0) {\n strm.msg = 'invalid code -- missing end-of-block';\n state.mode = BAD;\n break;\n }\n\n /* build code tables -- note: do not change the lenbits or distbits\n values here (9 and 6) without reading the comments in inftrees.h\n concerning the ENOUGH constants, which depend on those values */\n state.lenbits = 9;\n\n opts = { bits: state.lenbits };\n ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.lenbits = opts.bits;\n // state.lencode = state.next;\n\n if (ret) {\n strm.msg = 'invalid literal/lengths set';\n state.mode = BAD;\n break;\n }\n\n state.distbits = 6;\n //state.distcode.copy(state.codes);\n // Switch to use dynamic table\n state.distcode = state.distdyn;\n opts = { bits: state.distbits };\n ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.distbits = opts.bits;\n // state.distcode = state.next;\n\n if (ret) {\n strm.msg = 'invalid distances set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, 'inflate: codes ok\\n'));\n state.mode = LEN_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case LEN_:\n state.mode = LEN;\n /* falls through */\n case LEN:\n if (have >= 6 && left >= 258) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n inflate_fast(strm, _out);\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n if (state.mode === TYPE) {\n state.back = -1;\n }\n break;\n }\n state.back = 0;\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if (here_bits <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_op && (here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.lencode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n state.length = here_val;\n if (here_op === 0) {\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n state.mode = LIT;\n break;\n }\n if (here_op & 32) {\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.back = -1;\n state.mode = TYPE;\n break;\n }\n if (here_op & 64) {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD;\n break;\n }\n state.extra = here_op & 15;\n state.mode = LENEXT;\n /* falls through */\n case LENEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", state.length));\n state.was = state.length;\n state.mode = DIST;\n /* falls through */\n case DIST:\n for (;;) {\n here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if ((here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.distcode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n if (here_op & 64) {\n strm.msg = 'invalid distance code';\n state.mode = BAD;\n break;\n }\n state.offset = here_val;\n state.extra = (here_op) & 15;\n state.mode = DISTEXT;\n /* falls through */\n case DISTEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n//#ifdef INFLATE_STRICT\n if (state.offset > state.dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n//#endif\n //Tracevv((stderr, \"inflate: distance %u\\n\", state.offset));\n state.mode = MATCH;\n /* falls through */\n case MATCH:\n if (left === 0) { break inf_leave; }\n copy = _out - left;\n if (state.offset > copy) { /* copy from window */\n copy = state.offset - copy;\n if (copy > state.whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n// Trace((stderr, \"inflate.c too far\\n\"));\n// copy -= state.whave;\n// if (copy > state.length) { copy = state.length; }\n// if (copy > left) { copy = left; }\n// left -= copy;\n// state.length -= copy;\n// do {\n// output[put++] = 0;\n// } while (--copy);\n// if (state.length === 0) { state.mode = LEN; }\n// break;\n//#endif\n }\n if (copy > state.wnext) {\n copy -= state.wnext;\n from = state.wsize - copy;\n }\n else {\n from = state.wnext - copy;\n }\n if (copy > state.length) { copy = state.length; }\n from_source = state.window;\n }\n else { /* copy from output */\n from_source = output;\n from = put - state.offset;\n copy = state.length;\n }\n if (copy > left) { copy = left; }\n left -= copy;\n state.length -= copy;\n do {\n output[put++] = from_source[from++];\n } while (--copy);\n if (state.length === 0) { state.mode = LEN; }\n break;\n case LIT:\n if (left === 0) { break inf_leave; }\n output[put++] = state.length;\n left--;\n state.mode = LEN;\n break;\n case CHECK:\n if (state.wrap) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n // Use '|' instead of '+' to make sure that result is signed\n hold |= input[next++] << bits;\n bits += 8;\n }\n //===//\n _out -= left;\n strm.total_out += _out;\n state.total += _out;\n if (_out) {\n strm.adler = state.check =\n /*UPDATE(state.check, put - _out, _out);*/\n (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out));\n\n }\n _out = left;\n // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too\n if ((state.flags ? hold : zswap32(hold)) !== state.check) {\n strm.msg = 'incorrect data check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: check matches trailer\\n\"));\n }\n state.mode = LENGTH;\n /* falls through */\n case LENGTH:\n if (state.wrap && state.flags) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (hold !== (state.total & 0xffffffff)) {\n strm.msg = 'incorrect length check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: length matches trailer\\n\"));\n }\n state.mode = DONE;\n /* falls through */\n case DONE:\n ret = Z_STREAM_END;\n break inf_leave;\n case BAD:\n ret = Z_DATA_ERROR;\n break inf_leave;\n case MEM:\n return Z_MEM_ERROR;\n case SYNC:\n /* falls through */\n default:\n return Z_STREAM_ERROR;\n }\n }\n\n // inf_leave <- here is real place for \"goto inf_leave\", emulated via \"break inf_leave\"\n\n /*\n Return from inflate(), updating the total counts and the check value.\n If there was no progress during the inflate() call, return a buffer\n error. Call updatewindow() to create and/or update the window state.\n Note: a memory error from inflate() is non-recoverable.\n */\n\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n\n if (state.wsize || (_out !== strm.avail_out && state.mode < BAD &&\n (state.mode < CHECK || flush !== Z_FINISH))) {\n if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) {\n state.mode = MEM;\n return Z_MEM_ERROR;\n }\n }\n _in -= strm.avail_in;\n _out -= strm.avail_out;\n strm.total_in += _in;\n strm.total_out += _out;\n state.total += _out;\n if (state.wrap && _out) {\n strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/\n (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out));\n }\n strm.data_type = state.bits + (state.last ? 64 : 0) +\n (state.mode === TYPE ? 128 : 0) +\n (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);\n if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) {\n ret = Z_BUF_ERROR;\n }\n return ret;\n}\n\nfunction inflateEnd(strm) {\n\n if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) {\n return Z_STREAM_ERROR;\n }\n\n var state = strm.state;\n if (state.window) {\n state.window = null;\n }\n strm.state = null;\n return Z_OK;\n}\n\nfunction inflateGetHeader(strm, head) {\n var state;\n\n /* check state */\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; }\n\n /* save header structure */\n state.head = head;\n head.done = false;\n return Z_OK;\n}\n\nfunction inflateSetDictionary(strm, dictionary) {\n var dictLength = dictionary.length;\n\n var state;\n var dictid;\n var ret;\n\n /* check state */\n if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR; }\n state = strm.state;\n\n if (state.wrap !== 0 && state.mode !== DICT) {\n return Z_STREAM_ERROR;\n }\n\n /* check for correct dictionary identifier */\n if (state.mode === DICT) {\n dictid = 1; /* adler32(0, null, 0)*/\n /* dictid = adler32(dictid, dictionary, dictLength); */\n dictid = adler32(dictid, dictionary, dictLength, 0);\n if (dictid !== state.check) {\n return Z_DATA_ERROR;\n }\n }\n /* copy dictionary to window using updatewindow(), which will amend the\n existing dictionary if appropriate */\n ret = updatewindow(strm, dictionary, dictLength, dictLength);\n if (ret) {\n state.mode = MEM;\n return Z_MEM_ERROR;\n }\n state.havedict = 1;\n // Tracev((stderr, \"inflate: dictionary set\\n\"));\n return Z_OK;\n}\n\nexports.inflateReset = inflateReset;\nexports.inflateReset2 = inflateReset2;\nexports.inflateResetKeep = inflateResetKeep;\nexports.inflateInit = inflateInit;\nexports.inflateInit2 = inflateInit2;\nexports.inflate = inflate;\nexports.inflateEnd = inflateEnd;\nexports.inflateGetHeader = inflateGetHeader;\nexports.inflateSetDictionary = inflateSetDictionary;\nexports.inflateInfo = 'pako inflate (from Nodeca project)';\n\n/* Not implemented\nexports.inflateCopy = inflateCopy;\nexports.inflateGetDictionary = inflateGetDictionary;\nexports.inflateMark = inflateMark;\nexports.inflatePrime = inflatePrime;\nexports.inflateSync = inflateSync;\nexports.inflateSyncPoint = inflateSyncPoint;\nexports.inflateUndermine = inflateUndermine;\n*/\n" - }, - { - "id": 17, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\inffast.js", - "name": "./node_modules/pako/lib/zlib/inffast.js", - "index": 20, - "index2": 13, - "size": 12668, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\inflate.js", - "issuerId": 16, - "issuerName": "./node_modules/pako/lib/zlib/inflate.js", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "name": "./node_modules/fast-png/lib-esm/index.js", - "profile": { - "factory": 2180, - "building": 1082 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "name": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "profile": { - "factory": 21, - "building": 92, - "dependencies": 43 - } - }, - { - "id": 1, - "identifier": "F:\\tweb\\node_modules\\pako\\index.js", - "name": "./node_modules/pako/index.js", - "profile": { - "factory": 48, - "building": 7 - } - }, - { - "id": 15, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\inflate.js", - "name": "./node_modules/pako/lib/inflate.js", - "profile": { - "factory": 11, - "building": 13, - "dependencies": 8 - } - }, - { - "id": 16, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\inflate.js", - "name": "./node_modules/pako/lib/zlib/inflate.js", - "profile": { - "factory": 9, - "building": 47, - "dependencies": 9 - } - } - ], - "profile": { - "factory": 9, - "building": 12, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 16, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\inflate.js", - "module": "./node_modules/pako/lib/zlib/inflate.js", - "moduleName": "./node_modules/pako/lib/zlib/inflate.js", - "type": "cjs require", - "userRequest": "./inffast", - "loc": "25:20-40" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 7, - "source": "'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// See state defs from inflate.js\nvar BAD = 30; /* got a data error -- remain here until reset */\nvar TYPE = 12; /* i: waiting for type bits, including last-flag bit */\n\n/*\n Decode literal, length, and distance codes and write out the resulting\n literal and match bytes until either not enough input or output is\n available, an end-of-block is encountered, or a data error is encountered.\n When large enough input and output buffers are supplied to inflate(), for\n example, a 16K input buffer and a 64K output buffer, more than 95% of the\n inflate execution time is spent in this routine.\n\n Entry assumptions:\n\n state.mode === LEN\n strm.avail_in >= 6\n strm.avail_out >= 258\n start >= strm.avail_out\n state.bits < 8\n\n On return, state.mode is one of:\n\n LEN -- ran out of enough output space or enough available input\n TYPE -- reached end of block code, inflate() to interpret next block\n BAD -- error in block data\n\n Notes:\n\n - The maximum input bits used by a length/distance pair is 15 bits for the\n length code, 5 bits for the length extra, 15 bits for the distance code,\n and 13 bits for the distance extra. This totals 48 bits, or six bytes.\n Therefore if strm.avail_in >= 6, then there is enough input to avoid\n checking for available input while decoding.\n\n - The maximum bytes that a single length/distance pair can output is 258\n bytes, which is the maximum length that can be coded. inflate_fast()\n requires strm.avail_out >= 258 for each loop to avoid checking for\n output space.\n */\nmodule.exports = function inflate_fast(strm, start) {\n var state;\n var _in; /* local strm.input */\n var last; /* have enough input while in < last */\n var _out; /* local strm.output */\n var beg; /* inflate()'s initial strm.output */\n var end; /* while out < end, enough space available */\n//#ifdef INFLATE_STRICT\n var dmax; /* maximum distance from zlib header */\n//#endif\n var wsize; /* window size or zero if not using window */\n var whave; /* valid bytes in the window */\n var wnext; /* window write index */\n // Use `s_window` instead `window`, avoid conflict with instrumentation tools\n var s_window; /* allocated sliding window, if wsize != 0 */\n var hold; /* local strm.hold */\n var bits; /* local strm.bits */\n var lcode; /* local strm.lencode */\n var dcode; /* local strm.distcode */\n var lmask; /* mask for first level of length codes */\n var dmask; /* mask for first level of distance codes */\n var here; /* retrieved table entry */\n var op; /* code bits, operation, extra bits, or */\n /* window position, window bytes to copy */\n var len; /* match length, unused bytes */\n var dist; /* match distance */\n var from; /* where to copy match from */\n var from_source;\n\n\n var input, output; // JS specific, because we have no pointers\n\n /* copy state to local variables */\n state = strm.state;\n //here = state.here;\n _in = strm.next_in;\n input = strm.input;\n last = _in + (strm.avail_in - 5);\n _out = strm.next_out;\n output = strm.output;\n beg = _out - (start - strm.avail_out);\n end = _out + (strm.avail_out - 257);\n//#ifdef INFLATE_STRICT\n dmax = state.dmax;\n//#endif\n wsize = state.wsize;\n whave = state.whave;\n wnext = state.wnext;\n s_window = state.window;\n hold = state.hold;\n bits = state.bits;\n lcode = state.lencode;\n dcode = state.distcode;\n lmask = (1 << state.lenbits) - 1;\n dmask = (1 << state.distbits) - 1;\n\n\n /* decode literals and length/distances until end-of-block or not enough\n input data or output space */\n\n top:\n do {\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n\n here = lcode[hold & lmask];\n\n dolen:\n for (;;) { // Goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n if (op === 0) { /* literal */\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n output[_out++] = here & 0xffff/*here.val*/;\n }\n else if (op & 16) { /* length base */\n len = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (op) {\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n len += hold & ((1 << op) - 1);\n hold >>>= op;\n bits -= op;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", len));\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n here = dcode[hold & dmask];\n\n dodist:\n for (;;) { // goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n\n if (op & 16) { /* distance base */\n dist = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n }\n dist += hold & ((1 << op) - 1);\n//#ifdef INFLATE_STRICT\n if (dist > dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break top;\n }\n//#endif\n hold >>>= op;\n bits -= op;\n //Tracevv((stderr, \"inflate: distance %u\\n\", dist));\n op = _out - beg; /* max distance in output */\n if (dist > op) { /* see if copy from window */\n op = dist - op; /* distance back in window */\n if (op > whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break top;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n// if (len <= op - whave) {\n// do {\n// output[_out++] = 0;\n// } while (--len);\n// continue top;\n// }\n// len -= op - whave;\n// do {\n// output[_out++] = 0;\n// } while (--op > whave);\n// if (op === 0) {\n// from = _out - dist;\n// do {\n// output[_out++] = output[from++];\n// } while (--len);\n// continue top;\n// }\n//#endif\n }\n from = 0; // window index\n from_source = s_window;\n if (wnext === 0) { /* very common case */\n from += wsize - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n else if (wnext < op) { /* wrap around window */\n from += wsize + wnext - op;\n op -= wnext;\n if (op < len) { /* some from end of window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = 0;\n if (wnext < len) { /* some from start of window */\n op = wnext;\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n }\n else { /* contiguous in window */\n from += wnext - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n while (len > 2) {\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n len -= 3;\n }\n if (len) {\n output[_out++] = from_source[from++];\n if (len > 1) {\n output[_out++] = from_source[from++];\n }\n }\n }\n else {\n from = _out - dist; /* copy direct from output */\n do { /* minimum length is three */\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n len -= 3;\n } while (len > 2);\n if (len) {\n output[_out++] = output[from++];\n if (len > 1) {\n output[_out++] = output[from++];\n }\n }\n }\n }\n else if ((op & 64) === 0) { /* 2nd level distance code */\n here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dodist;\n }\n else {\n strm.msg = 'invalid distance code';\n state.mode = BAD;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n }\n else if ((op & 64) === 0) { /* 2nd level length code */\n here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dolen;\n }\n else if (op & 32) { /* end-of-block */\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.mode = TYPE;\n break top;\n }\n else {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n } while (_in < last && _out < end);\n\n /* return unused bytes (on entry, bits < 8, so in won't go too far back) */\n len = bits >> 3;\n _in -= len;\n bits -= len << 3;\n hold &= (1 << bits) - 1;\n\n /* update state and return */\n strm.next_in = _in;\n strm.next_out = _out;\n strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last));\n strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end));\n state.hold = hold;\n state.bits = bits;\n return;\n};\n" - }, - { - "id": 18, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\inftrees.js", - "name": "./node_modules/pako/lib/zlib/inftrees.js", - "index": 21, - "index2": 14, - "size": 12500, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\inflate.js", - "issuerId": 16, - "issuerName": "./node_modules/pako/lib/zlib/inflate.js", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "name": "./node_modules/fast-png/lib-esm/index.js", - "profile": { - "factory": 2180, - "building": 1082 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "name": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "profile": { - "factory": 21, - "building": 92, - "dependencies": 43 - } - }, - { - "id": 1, - "identifier": "F:\\tweb\\node_modules\\pako\\index.js", - "name": "./node_modules/pako/index.js", - "profile": { - "factory": 48, - "building": 7 - } - }, - { - "id": 15, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\inflate.js", - "name": "./node_modules/pako/lib/inflate.js", - "profile": { - "factory": 11, - "building": 13, - "dependencies": 8 - } - }, - { - "id": 16, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\inflate.js", - "name": "./node_modules/pako/lib/zlib/inflate.js", - "profile": { - "factory": 9, - "building": 47, - "dependencies": 9 - } - } - ], - "profile": { - "factory": 9, - "building": 12, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 16, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\inflate.js", - "module": "./node_modules/pako/lib/zlib/inflate.js", - "moduleName": "./node_modules/pako/lib/zlib/inflate.js", - "type": "cjs require", - "userRequest": "./inftrees", - "loc": "26:20-41" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 7, - "source": "'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils = require('../utils/common');\n\nvar MAXBITS = 15;\nvar ENOUGH_LENS = 852;\nvar ENOUGH_DISTS = 592;\n//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nvar CODES = 0;\nvar LENS = 1;\nvar DISTS = 2;\n\nvar lbase = [ /* Length codes 257..285 base */\n 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,\n 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0\n];\n\nvar lext = [ /* Length codes 257..285 extra */\n 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,\n 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78\n];\n\nvar dbase = [ /* Distance codes 0..29 base */\n 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,\n 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,\n 8193, 12289, 16385, 24577, 0, 0\n];\n\nvar dext = [ /* Distance codes 0..29 extra */\n 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,\n 23, 23, 24, 24, 25, 25, 26, 26, 27, 27,\n 28, 28, 29, 29, 64, 64\n];\n\nmodule.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts)\n{\n var bits = opts.bits;\n //here = opts.here; /* table entry for duplication */\n\n var len = 0; /* a code's length in bits */\n var sym = 0; /* index of code symbols */\n var min = 0, max = 0; /* minimum and maximum code lengths */\n var root = 0; /* number of index bits for root table */\n var curr = 0; /* number of index bits for current table */\n var drop = 0; /* code bits to drop for sub-table */\n var left = 0; /* number of prefix codes available */\n var used = 0; /* code entries in table used */\n var huff = 0; /* Huffman code */\n var incr; /* for incrementing code, index */\n var fill; /* index for replicating entries */\n var low; /* low bits for current root entry */\n var mask; /* mask for low root bits */\n var next; /* next available space in table */\n var base = null; /* base value table to use */\n var base_index = 0;\n// var shoextra; /* extra bits table to use */\n var end; /* use base and extra for symbol > end */\n var count = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */\n var offs = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */\n var extra = null;\n var extra_index = 0;\n\n var here_bits, here_op, here_val;\n\n /*\n Process a set of code lengths to create a canonical Huffman code. The\n code lengths are lens[0..codes-1]. Each length corresponds to the\n symbols 0..codes-1. The Huffman code is generated by first sorting the\n symbols by length from short to long, and retaining the symbol order\n for codes with equal lengths. Then the code starts with all zero bits\n for the first code of the shortest length, and the codes are integer\n increments for the same length, and zeros are appended as the length\n increases. For the deflate format, these bits are stored backwards\n from their more natural integer increment ordering, and so when the\n decoding tables are built in the large loop below, the integer codes\n are incremented backwards.\n\n This routine assumes, but does not check, that all of the entries in\n lens[] are in the range 0..MAXBITS. The caller must assure this.\n 1..MAXBITS is interpreted as that code length. zero means that that\n symbol does not occur in this code.\n\n The codes are sorted by computing a count of codes for each length,\n creating from that a table of starting indices for each length in the\n sorted table, and then entering the symbols in order in the sorted\n table. The sorted table is work[], with that space being provided by\n the caller.\n\n The length counts are used for other purposes as well, i.e. finding\n the minimum and maximum length codes, determining if there are any\n codes at all, checking for a valid set of lengths, and looking ahead\n at length counts to determine sub-table sizes when building the\n decoding tables.\n */\n\n /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */\n for (len = 0; len <= MAXBITS; len++) {\n count[len] = 0;\n }\n for (sym = 0; sym < codes; sym++) {\n count[lens[lens_index + sym]]++;\n }\n\n /* bound code lengths, force root to be within code lengths */\n root = bits;\n for (max = MAXBITS; max >= 1; max--) {\n if (count[max] !== 0) { break; }\n }\n if (root > max) {\n root = max;\n }\n if (max === 0) { /* no symbols to code at all */\n //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */\n //table.bits[opts.table_index] = 1; //here.bits = (var char)1;\n //table.val[opts.table_index++] = 0; //here.val = (var short)0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n\n //table.op[opts.table_index] = 64;\n //table.bits[opts.table_index] = 1;\n //table.val[opts.table_index++] = 0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n opts.bits = 1;\n return 0; /* no symbols, but wait for decoding to report error */\n }\n for (min = 1; min < max; min++) {\n if (count[min] !== 0) { break; }\n }\n if (root < min) {\n root = min;\n }\n\n /* check for an over-subscribed or incomplete set of lengths */\n left = 1;\n for (len = 1; len <= MAXBITS; len++) {\n left <<= 1;\n left -= count[len];\n if (left < 0) {\n return -1;\n } /* over-subscribed */\n }\n if (left > 0 && (type === CODES || max !== 1)) {\n return -1; /* incomplete set */\n }\n\n /* generate offsets into symbol table for each length for sorting */\n offs[1] = 0;\n for (len = 1; len < MAXBITS; len++) {\n offs[len + 1] = offs[len] + count[len];\n }\n\n /* sort symbols by length, by symbol order within each length */\n for (sym = 0; sym < codes; sym++) {\n if (lens[lens_index + sym] !== 0) {\n work[offs[lens[lens_index + sym]]++] = sym;\n }\n }\n\n /*\n Create and fill in decoding tables. In this loop, the table being\n filled is at next and has curr index bits. The code being used is huff\n with length len. That code is converted to an index by dropping drop\n bits off of the bottom. For codes where len is less than drop + curr,\n those top drop + curr - len bits are incremented through all values to\n fill the table with replicated entries.\n\n root is the number of index bits for the root table. When len exceeds\n root, sub-tables are created pointed to by the root entry with an index\n of the low root bits of huff. This is saved in low to check for when a\n new sub-table should be started. drop is zero when the root table is\n being filled, and drop is root when sub-tables are being filled.\n\n When a new sub-table is needed, it is necessary to look ahead in the\n code lengths to determine what size sub-table is needed. The length\n counts are used for this, and so count[] is decremented as codes are\n entered in the tables.\n\n used keeps track of how many table entries have been allocated from the\n provided *table space. It is checked for LENS and DIST tables against\n the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in\n the initial root table size constants. See the comments in inftrees.h\n for more information.\n\n sym increments through all symbols, and the loop terminates when\n all codes of length max, i.e. all codes, have been processed. This\n routine permits incomplete codes, so another loop after this one fills\n in the rest of the decoding tables with invalid code markers.\n */\n\n /* set up for code type */\n // poor man optimization - use if-else instead of switch,\n // to avoid deopts in old v8\n if (type === CODES) {\n base = extra = work; /* dummy value--not used */\n end = 19;\n\n } else if (type === LENS) {\n base = lbase;\n base_index -= 257;\n extra = lext;\n extra_index -= 257;\n end = 256;\n\n } else { /* DISTS */\n base = dbase;\n extra = dext;\n end = -1;\n }\n\n /* initialize opts for loop */\n huff = 0; /* starting code */\n sym = 0; /* starting code symbol */\n len = min; /* starting code length */\n next = table_index; /* current table to fill in */\n curr = root; /* current table index bits */\n drop = 0; /* current bits to drop from code for index */\n low = -1; /* trigger new sub-table when len > root */\n used = 1 << root; /* use root table entries */\n mask = used - 1; /* mask for comparing low */\n\n /* check available table space */\n if ((type === LENS && used > ENOUGH_LENS) ||\n (type === DISTS && used > ENOUGH_DISTS)) {\n return 1;\n }\n\n /* process all codes and make table entries */\n for (;;) {\n /* create table entry */\n here_bits = len - drop;\n if (work[sym] < end) {\n here_op = 0;\n here_val = work[sym];\n }\n else if (work[sym] > end) {\n here_op = extra[extra_index + work[sym]];\n here_val = base[base_index + work[sym]];\n }\n else {\n here_op = 32 + 64; /* end of block */\n here_val = 0;\n }\n\n /* replicate for those indices with low len bits equal to huff */\n incr = 1 << (len - drop);\n fill = 1 << curr;\n min = fill; /* save offset to next table */\n do {\n fill -= incr;\n table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0;\n } while (fill !== 0);\n\n /* backwards increment the len-bit code huff */\n incr = 1 << (len - 1);\n while (huff & incr) {\n incr >>= 1;\n }\n if (incr !== 0) {\n huff &= incr - 1;\n huff += incr;\n } else {\n huff = 0;\n }\n\n /* go to next symbol, update count, len */\n sym++;\n if (--count[len] === 0) {\n if (len === max) { break; }\n len = lens[lens_index + work[sym]];\n }\n\n /* create new sub-table if needed */\n if (len > root && (huff & mask) !== low) {\n /* if first time, transition to sub-tables */\n if (drop === 0) {\n drop = root;\n }\n\n /* increment past last table */\n next += min; /* here min is 1 << curr */\n\n /* determine length of next table */\n curr = len - drop;\n left = 1 << curr;\n while (curr + drop < max) {\n left -= count[curr + drop];\n if (left <= 0) { break; }\n curr++;\n left <<= 1;\n }\n\n /* check for enough space */\n used += 1 << curr;\n if ((type === LENS && used > ENOUGH_LENS) ||\n (type === DISTS && used > ENOUGH_DISTS)) {\n return 1;\n }\n\n /* point entry in root table to sub-table */\n low = huff & mask;\n /*table.op[low] = curr;\n table.bits[low] = root;\n table.val[low] = next - opts.table_index;*/\n table[low] = (root << 24) | (curr << 16) | (next - table_index) |0;\n }\n }\n\n /* fill in remaining table entry if code is incomplete (guaranteed to have\n at most one remaining entry, since if the code is incomplete, the\n maximum code length that was allowed to get this far is one bit) */\n if (huff !== 0) {\n //table.op[next + huff] = 64; /* invalid code marker */\n //table.bits[next + huff] = len - drop;\n //table.val[next + huff] = 0;\n table[next + huff] = ((len - drop) << 24) | (64 << 16) |0;\n }\n\n /* set return parameters */\n //opts.table_index += used;\n opts.bits = root;\n return 0;\n};\n" - }, - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\gzheader.js", - "name": "./node_modules/pako/lib/zlib/gzheader.js", - "index": 23, - "index2": 17, - "size": 2240, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\pako\\lib\\inflate.js", - "issuerId": 15, - "issuerName": "./node_modules/pako/lib/inflate.js", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "name": "./node_modules/fast-png/lib-esm/index.js", - "profile": { - "factory": 2180, - "building": 1082 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "name": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "profile": { - "factory": 21, - "building": 92, - "dependencies": 43 - } - }, - { - "id": 1, - "identifier": "F:\\tweb\\node_modules\\pako\\index.js", - "name": "./node_modules/pako/index.js", - "profile": { - "factory": 48, - "building": 7 - } - }, - { - "id": 15, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\inflate.js", - "name": "./node_modules/pako/lib/inflate.js", - "profile": { - "factory": 11, - "building": 13, - "dependencies": 8 - } - } - ], - "profile": { - "factory": 9, - "building": 47, - "dependencies": 9 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 15, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\lib\\inflate.js", - "module": "./node_modules/pako/lib/inflate.js", - "moduleName": "./node_modules/pako/lib/inflate.js", - "type": "cjs require", - "userRequest": "./zlib/gzheader", - "loc": "10:19-45" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 6, - "source": "'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction GZheader() {\n /* true if compressed data believed to be text */\n this.text = 0;\n /* modification time */\n this.time = 0;\n /* extra flags (not used when writing a gzip file) */\n this.xflags = 0;\n /* operating system */\n this.os = 0;\n /* pointer to extra field or Z_NULL if none */\n this.extra = null;\n /* extra field length (valid if extra != Z_NULL) */\n this.extra_len = 0; // Actually, we don't need it in JS,\n // but leave for few code modifications\n\n //\n // Setup limits is not necessary because in js we should not preallocate memory\n // for inflate use constant limit in 65536 bytes\n //\n\n /* space at extra (only when reading header) */\n // this.extra_max = 0;\n /* pointer to zero-terminated file name or Z_NULL */\n this.name = '';\n /* space at name (only when reading header) */\n // this.name_max = 0;\n /* pointer to zero-terminated comment or Z_NULL */\n this.comment = '';\n /* space at comment (only when reading header) */\n // this.comm_max = 0;\n /* true if there was or will be a header crc */\n this.hcrc = 0;\n /* true when done reading gzip header (not used when writing a gzip file) */\n this.done = false;\n}\n\nmodule.exports = GZheader;\n" - }, - { - "id": 20, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js 1f5c27d337cdd358fe6548a5eda250ca", - "name": "./node_modules/fast-png/lib-esm/index.js + 7 modules", - "index": 3, - "index2": 25, - "size": 33920, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": null, - "issuerId": null, - "issuerName": null, - "issuerPath": null, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 9, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "module": "./src/lib/webp/webp.ts", - "moduleName": "./src/lib/webp/webp.ts", - "type": "cjs require", - "userRequest": "fast-png", - "loc": "5:19-38" - } - ], - "usedExports": true, - "providedExports": [ - "ResolutionUnitSpecifier", - "decode", - "encode" - ], - "optimizationBailout": [ - "ModuleConcatenation bailout: Cannot concat with ./node_modules/pako/index.js (<- Module is not an ECMAScript module)" - ], - "depth": 2, - "modules": [ - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "name": "./node_modules/fast-png/lib-esm/index.js", - "index": 3, - "index2": 25, - "size": 435, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "issuerId": 9, - "issuerName": "./src/lib/webp/webp.ts", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - } - ], - "profile": { - "factory": 2180, - "building": 1082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 9, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "module": "./src/lib/webp/webp.ts", - "moduleName": "./src/lib/webp/webp.ts", - "type": "cjs require", - "userRequest": "fast-png", - "loc": "5:19-38" - } - ], - "usedExports": true, - "providedExports": [ - "ResolutionUnitSpecifier", - "decode", - "encode" - ], - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./src/lib/webp/webp.ts (referenced with cjs require)" - ], - "depth": 2, - "source": "import PNGDecoder from './PNGDecoder';\r\nimport PNGEncoder from './PNGEncoder';\r\nexport * from './types';\r\nfunction decodePNG(data, options) {\r\n const decoder = new PNGDecoder(data, options);\r\n return decoder.decode();\r\n}\r\nfunction encodePNG(png, options) {\r\n const encoder = new PNGEncoder(png, options);\r\n return encoder.encode();\r\n}\r\nexport { decodePNG as decode, encodePNG as encode };\r\n//# sourceMappingURL=index.js.map" - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "name": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "index": 4, - "index2": 22, - "size": 12767, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [], - "issuer": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "issuerId": null, - "issuerName": "./node_modules/fast-png/lib-esm/index.js", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "name": "./node_modules/fast-png/lib-esm/index.js", - "profile": { - "factory": 2180, - "building": 1082 - } - } - ], - "profile": { - "factory": 21, - "building": 92, - "dependencies": 43 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "module": "./node_modules/fast-png/lib-esm/index.js", - "moduleName": "./node_modules/fast-png/lib-esm/index.js", - "type": "harmony side effect evaluation", - "userRequest": "./PNGDecoder", - "loc": "1:0-38" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "module": "./node_modules/fast-png/lib-esm/index.js", - "moduleName": "./node_modules/fast-png/lib-esm/index.js", - "type": "harmony import specifier", - "userRequest": "./PNGDecoder", - "loc": "5:24-34" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 3, - "source": "import { IOBuffer } from 'iobuffer';\r\nimport { Inflate as Inflator } from 'pako';\r\nimport { pngSignature, crc } from './common';\r\nimport { ColorType, CompressionMethod, FilterMethod, InterlaceMethod, } from './internalTypes';\r\nconst empty = new Uint8Array(0);\r\nconst NULL = '\\0';\r\nconst uint16 = new Uint16Array([0x00ff]);\r\nconst uint8 = new Uint8Array(uint16.buffer);\r\nconst osIsLittleEndian = uint8[0] === 0xff;\r\nexport default class PNGDecoder extends IOBuffer {\r\n constructor(data, options = {}) {\r\n super(data);\r\n const { checkCrc = false } = options;\r\n this._checkCrc = checkCrc;\r\n this._inflator = new Inflator();\r\n this._png = {\r\n width: -1,\r\n height: -1,\r\n channels: -1,\r\n data: new Uint8Array(0),\r\n depth: 1,\r\n text: {},\r\n };\r\n this._end = false;\r\n this._hasPalette = false;\r\n this._palette = [];\r\n this._compressionMethod = CompressionMethod.UNKNOWN;\r\n this._filterMethod = FilterMethod.UNKNOWN;\r\n this._interlaceMethod = InterlaceMethod.UNKNOWN;\r\n this._colorType = -1;\r\n // PNG is always big endian\r\n // https://www.w3.org/TR/PNG/#7Integers-and-byte-order\r\n this.setBigEndian();\r\n }\r\n decode() {\r\n this.decodeSignature();\r\n while (!this._end) {\r\n this.decodeChunk();\r\n }\r\n this.decodeImage();\r\n return this._png;\r\n }\r\n // https://www.w3.org/TR/PNG/#5PNG-file-signature\r\n decodeSignature() {\r\n for (let i = 0; i < pngSignature.length; i++) {\r\n if (this.readUint8() !== pngSignature[i]) {\r\n throw new Error(`wrong PNG signature. Byte at ${i} should be ${pngSignature[i]}.`);\r\n }\r\n }\r\n }\r\n // https://www.w3.org/TR/PNG/#5Chunk-layout\r\n decodeChunk() {\r\n const length = this.readUint32();\r\n const type = this.readChars(4);\r\n const offset = this.offset;\r\n switch (type) {\r\n // 11.2 Critical chunks\r\n case 'IHDR': // 11.2.2 IHDR Image header\r\n this.decodeIHDR();\r\n break;\r\n case 'PLTE': // 11.2.3 PLTE Palette\r\n this.decodePLTE(length);\r\n break;\r\n case 'IDAT': // 11.2.4 IDAT Image data\r\n this.decodeIDAT(length);\r\n break;\r\n case 'IEND': // 11.2.5 IEND Image trailer\r\n this._end = true;\r\n break;\r\n // 11.3 Ancillary chunks\r\n case 'tRNS': // 11.3.2.1 tRNS Transparency\r\n this.decodetRNS(length);\r\n break;\r\n case 'tEXt': // 11.3.4.3 tEXt Textual data\r\n this.decodetEXt(length);\r\n break;\r\n case 'pHYs': // 11.3.5.3 pHYs Physical pixel dimensions\r\n this.decodepHYs();\r\n break;\r\n default:\r\n this.skip(length);\r\n break;\r\n }\r\n if (this.offset - offset !== length) {\r\n throw new Error(`Length mismatch while decoding chunk ${type}`);\r\n }\r\n if (this._checkCrc) {\r\n const expectedCrc = this.readUint32();\r\n const crcLength = length + 4; // includes type\r\n const actualCrc = crc(new Uint8Array(this.buffer, this.byteOffset + this.offset - crcLength - 4, crcLength), crcLength); // \"- 4\" because we already advanced by reading the CRC\r\n if (actualCrc !== expectedCrc) {\r\n throw new Error(`CRC mismatch for chunk ${type}. Expected ${expectedCrc}, found ${actualCrc}`);\r\n }\r\n }\r\n else {\r\n this.skip(4);\r\n }\r\n }\r\n // https://www.w3.org/TR/PNG/#11IHDR\r\n decodeIHDR() {\r\n const image = this._png;\r\n image.width = this.readUint32();\r\n image.height = this.readUint32();\r\n image.depth = checkBitDepth(this.readUint8());\r\n const colorType = this.readUint8();\r\n this._colorType = colorType;\r\n let channels;\r\n switch (colorType) {\r\n case ColorType.GREYSCALE:\r\n channels = 1;\r\n break;\r\n case ColorType.TRUECOLOUR:\r\n channels = 3;\r\n break;\r\n case ColorType.INDEXED_COLOUR:\r\n channels = 1;\r\n break;\r\n case ColorType.GREYSCALE_ALPHA:\r\n channels = 2;\r\n break;\r\n case ColorType.TRUECOLOUR_ALPHA:\r\n channels = 4;\r\n break;\r\n default:\r\n throw new Error(`Unknown color type: ${colorType}`);\r\n }\r\n this._png.channels = channels;\r\n this._compressionMethod = this.readUint8();\r\n if (this._compressionMethod !== CompressionMethod.DEFLATE) {\r\n throw new Error(`Unsupported compression method: ${this._compressionMethod}`);\r\n }\r\n this._filterMethod = this.readUint8();\r\n this._interlaceMethod = this.readUint8();\r\n }\r\n // https://www.w3.org/TR/PNG/#11PLTE\r\n decodePLTE(length) {\r\n if (length % 3 !== 0) {\r\n throw new RangeError(`PLTE field length must be a multiple of 3. Got ${length}`);\r\n }\r\n const l = length / 3;\r\n this._hasPalette = true;\r\n const palette = [];\r\n this._palette = palette;\r\n for (let i = 0; i < l; i++) {\r\n palette.push([this.readUint8(), this.readUint8(), this.readUint8()]);\r\n }\r\n }\r\n // https://www.w3.org/TR/PNG/#11IDAT\r\n decodeIDAT(length) {\r\n this._inflator.push(new Uint8Array(this.buffer, this.offset + this.byteOffset, length), false);\r\n this.skip(length);\r\n }\r\n // https://www.w3.org/TR/PNG/#11tRNS\r\n decodetRNS(length) {\r\n // TODO: support other color types.\r\n if (this._colorType === 3) {\r\n if (length > this._palette.length) {\r\n throw new Error(`tRNS chunk contains more alpha values than there are palette colors (${length} vs ${this._palette.length})`);\r\n }\r\n let i = 0;\r\n for (; i < length; i++) {\r\n const alpha = this.readByte();\r\n this._palette[i].push(alpha);\r\n }\r\n for (; i < this._palette.length; i++) {\r\n this._palette[i].push(255);\r\n }\r\n }\r\n }\r\n // https://www.w3.org/TR/PNG/#11tEXt\r\n decodetEXt(length) {\r\n let keyword = '';\r\n let char;\r\n while ((char = this.readChar()) !== NULL) {\r\n keyword += char;\r\n }\r\n this._png.text[keyword] = this.readChars(length - keyword.length - 1);\r\n }\r\n // https://www.w3.org/TR/PNG/#11pHYs\r\n decodepHYs() {\r\n const ppuX = this.readUint32();\r\n const ppuY = this.readUint32();\r\n const unitSpecifier = this.readByte();\r\n this._png.resolution = { x: ppuX, y: ppuY, unit: unitSpecifier };\r\n }\r\n decodeImage() {\r\n this._inflator.push(empty, true);\r\n if (this._inflator.err) {\r\n throw new Error(`Error while decompressing the data: ${this._inflator.err}`);\r\n }\r\n const data = this._inflator.result;\r\n if (this._filterMethod !== FilterMethod.ADAPTIVE) {\r\n throw new Error(`Filter method ${this._filterMethod} not supported`);\r\n }\r\n if (this._interlaceMethod === InterlaceMethod.NO_INTERLACE) {\r\n this.decodeInterlaceNull(data);\r\n }\r\n else {\r\n throw new Error(`Interlace method ${this._interlaceMethod} not supported`);\r\n }\r\n }\r\n decodeInterlaceNull(data) {\r\n const height = this._png.height;\r\n const bytesPerPixel = (this._png.channels * this._png.depth) / 8;\r\n const bytesPerLine = this._png.width * bytesPerPixel;\r\n const newData = new Uint8Array(this._png.height * bytesPerLine);\r\n let prevLine = empty;\r\n let offset = 0;\r\n let currentLine;\r\n let newLine;\r\n for (let i = 0; i < height; i++) {\r\n currentLine = data.subarray(offset + 1, offset + 1 + bytesPerLine);\r\n newLine = newData.subarray(i * bytesPerLine, (i + 1) * bytesPerLine);\r\n switch (data[offset]) {\r\n case 0:\r\n unfilterNone(currentLine, newLine, bytesPerLine);\r\n break;\r\n case 1:\r\n unfilterSub(currentLine, newLine, bytesPerLine, bytesPerPixel);\r\n break;\r\n case 2:\r\n unfilterUp(currentLine, newLine, prevLine, bytesPerLine);\r\n break;\r\n case 3:\r\n unfilterAverage(currentLine, newLine, prevLine, bytesPerLine, bytesPerPixel);\r\n break;\r\n case 4:\r\n unfilterPaeth(currentLine, newLine, prevLine, bytesPerLine, bytesPerPixel);\r\n break;\r\n default:\r\n throw new Error(`Unsupported filter: ${data[offset]}`);\r\n }\r\n prevLine = newLine;\r\n offset += bytesPerLine + 1;\r\n }\r\n if (this._hasPalette) {\r\n this._png.palette = this._palette;\r\n }\r\n if (this._png.depth === 16) {\r\n const uint16Data = new Uint16Array(newData.buffer);\r\n if (osIsLittleEndian) {\r\n for (let k = 0; k < uint16Data.length; k++) {\r\n // PNG is always big endian. Swap the bytes.\r\n uint16Data[k] = swap16(uint16Data[k]);\r\n }\r\n }\r\n this._png.data = uint16Data;\r\n }\r\n else {\r\n this._png.data = newData;\r\n }\r\n }\r\n}\r\nfunction unfilterNone(currentLine, newLine, bytesPerLine) {\r\n for (let i = 0; i < bytesPerLine; i++) {\r\n newLine[i] = currentLine[i];\r\n }\r\n}\r\nfunction unfilterSub(currentLine, newLine, bytesPerLine, bytesPerPixel) {\r\n let i = 0;\r\n for (; i < bytesPerPixel; i++) {\r\n // just copy first bytes\r\n newLine[i] = currentLine[i];\r\n }\r\n for (; i < bytesPerLine; i++) {\r\n newLine[i] = (currentLine[i] + newLine[i - bytesPerPixel]) & 0xff;\r\n }\r\n}\r\nfunction unfilterUp(currentLine, newLine, prevLine, bytesPerLine) {\r\n let i = 0;\r\n if (prevLine.length === 0) {\r\n // just copy bytes for first line\r\n for (; i < bytesPerLine; i++) {\r\n newLine[i] = currentLine[i];\r\n }\r\n }\r\n else {\r\n for (; i < bytesPerLine; i++) {\r\n newLine[i] = (currentLine[i] + prevLine[i]) & 0xff;\r\n }\r\n }\r\n}\r\nfunction unfilterAverage(currentLine, newLine, prevLine, bytesPerLine, bytesPerPixel) {\r\n let i = 0;\r\n if (prevLine.length === 0) {\r\n for (; i < bytesPerPixel; i++) {\r\n newLine[i] = currentLine[i];\r\n }\r\n for (; i < bytesPerLine; i++) {\r\n newLine[i] = (currentLine[i] + (newLine[i - bytesPerPixel] >> 1)) & 0xff;\r\n }\r\n }\r\n else {\r\n for (; i < bytesPerPixel; i++) {\r\n newLine[i] = (currentLine[i] + (prevLine[i] >> 1)) & 0xff;\r\n }\r\n for (; i < bytesPerLine; i++) {\r\n newLine[i] =\r\n (currentLine[i] + ((newLine[i - bytesPerPixel] + prevLine[i]) >> 1)) &\r\n 0xff;\r\n }\r\n }\r\n}\r\nfunction unfilterPaeth(currentLine, newLine, prevLine, bytesPerLine, bytesPerPixel) {\r\n let i = 0;\r\n if (prevLine.length === 0) {\r\n for (; i < bytesPerPixel; i++) {\r\n newLine[i] = currentLine[i];\r\n }\r\n for (; i < bytesPerLine; i++) {\r\n newLine[i] = (currentLine[i] + newLine[i - bytesPerPixel]) & 0xff;\r\n }\r\n }\r\n else {\r\n for (; i < bytesPerPixel; i++) {\r\n newLine[i] = (currentLine[i] + prevLine[i]) & 0xff;\r\n }\r\n for (; i < bytesPerLine; i++) {\r\n newLine[i] =\r\n (currentLine[i] +\r\n paethPredictor(newLine[i - bytesPerPixel], prevLine[i], prevLine[i - bytesPerPixel])) &\r\n 0xff;\r\n }\r\n }\r\n}\r\nfunction paethPredictor(a, b, c) {\r\n const p = a + b - c;\r\n const pa = Math.abs(p - a);\r\n const pb = Math.abs(p - b);\r\n const pc = Math.abs(p - c);\r\n if (pa <= pb && pa <= pc)\r\n return a;\r\n else if (pb <= pc)\r\n return b;\r\n else\r\n return c;\r\n}\r\nfunction swap16(val) {\r\n return ((val & 0xff) << 8) | ((val >> 8) & 0xff);\r\n}\r\nfunction checkBitDepth(value) {\r\n if (value !== 1 &&\r\n value !== 2 &&\r\n value !== 4 &&\r\n value !== 8 &&\r\n value !== 16) {\r\n throw new Error(`invalid bit depth: ${value}`);\r\n }\r\n return value;\r\n}\r\n//# sourceMappingURL=PNGDecoder.js.map" - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGEncoder.js", - "name": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "index": 26, - "index2": 23, - "size": 4983, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [], - "issuer": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "issuerId": null, - "issuerName": "./node_modules/fast-png/lib-esm/index.js", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "name": "./node_modules/fast-png/lib-esm/index.js", - "profile": { - "factory": 2180, - "building": 1082 - } - } - ], - "profile": { - "factory": 21, - "building": 92, - "dependencies": 43 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "module": "./node_modules/fast-png/lib-esm/index.js", - "moduleName": "./node_modules/fast-png/lib-esm/index.js", - "type": "harmony side effect evaluation", - "userRequest": "./PNGEncoder", - "loc": "2:0-38" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "module": "./node_modules/fast-png/lib-esm/index.js", - "moduleName": "./node_modules/fast-png/lib-esm/index.js", - "type": "harmony import specifier", - "userRequest": "./PNGEncoder", - "loc": "9:24-34" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 3, - "source": "import { IOBuffer } from 'iobuffer';\r\nimport { deflate } from 'pako';\r\nimport { pngSignature, crc } from './common';\r\nimport { ColorType, CompressionMethod, FilterMethod, InterlaceMethod, } from './internalTypes';\r\nconst defaultZlibOptions = {\r\n level: 3,\r\n};\r\nexport default class PNGEncoder extends IOBuffer {\r\n constructor(data, options = {}) {\r\n super();\r\n this._colorType = ColorType.UNKNOWN;\r\n this._zlibOptions = Object.assign({}, defaultZlibOptions, options.zlib);\r\n this._png = this._checkData(data);\r\n this.setBigEndian();\r\n }\r\n encode() {\r\n this.encodeSignature();\r\n this.encodeIHDR();\r\n this.encodeData();\r\n this.encodeIEND();\r\n return this.toArray();\r\n }\r\n // https://www.w3.org/TR/PNG/#5PNG-file-signature\r\n encodeSignature() {\r\n this.writeBytes(pngSignature);\r\n }\r\n // https://www.w3.org/TR/PNG/#11IHDR\r\n encodeIHDR() {\r\n this.writeUint32(13);\r\n this.writeChars('IHDR');\r\n this.writeUint32(this._png.width);\r\n this.writeUint32(this._png.height);\r\n this.writeByte(this._png.depth);\r\n this.writeByte(this._colorType);\r\n this.writeByte(CompressionMethod.DEFLATE);\r\n this.writeByte(FilterMethod.ADAPTIVE);\r\n this.writeByte(InterlaceMethod.NO_INTERLACE);\r\n this.writeCrc(17);\r\n }\r\n // https://www.w3.org/TR/PNG/#11IEND\r\n encodeIEND() {\r\n this.writeUint32(0);\r\n this.writeChars('IEND');\r\n this.writeCrc(4);\r\n }\r\n // https://www.w3.org/TR/PNG/#11IDAT\r\n encodeIDAT(data) {\r\n this.writeUint32(data.length);\r\n this.writeChars('IDAT');\r\n this.writeBytes(data);\r\n this.writeCrc(data.length + 4);\r\n }\r\n encodeData() {\r\n const { width, height, channels, depth, data } = this._png;\r\n const slotsPerLine = channels * width;\r\n const newData = new IOBuffer().setBigEndian();\r\n let offset = 0;\r\n for (let i = 0; i < height; i++) {\r\n newData.writeByte(0); // no filter\r\n /* istanbul ignore else */\r\n if (depth === 8) {\r\n offset = writeDataBytes(data, newData, slotsPerLine, offset);\r\n }\r\n else if (depth === 16) {\r\n offset = writeDataUint16(data, newData, slotsPerLine, offset);\r\n }\r\n else {\r\n throw new Error('unreachable');\r\n }\r\n }\r\n const buffer = newData.toArray();\r\n const compressed = deflate(buffer, this._zlibOptions);\r\n this.encodeIDAT(compressed);\r\n }\r\n _checkData(data) {\r\n const { colorType, channels, depth } = getColorType(data);\r\n const png = {\r\n width: checkInteger(data.width, 'width'),\r\n height: checkInteger(data.height, 'height'),\r\n channels: channels,\r\n data: data.data,\r\n depth: depth,\r\n text: {},\r\n };\r\n this._colorType = colorType;\r\n const expectedSize = png.width * png.height * channels;\r\n if (png.data.length !== expectedSize) {\r\n throw new RangeError(`wrong data size. Found ${png.data.length}, expected ${expectedSize}`);\r\n }\r\n return png;\r\n }\r\n writeCrc(length) {\r\n this.writeUint32(crc(new Uint8Array(this.buffer, this.byteOffset + this.offset - length, length), length));\r\n }\r\n}\r\nfunction checkInteger(value, name) {\r\n if (Number.isInteger(value) && value > 0) {\r\n return value;\r\n }\r\n throw new TypeError(`${name} must be a positive integer`);\r\n}\r\nfunction getColorType(data) {\r\n const { channels = 4, depth = 8 } = data;\r\n if (channels !== 4 && channels !== 3 && channels !== 2 && channels !== 1) {\r\n throw new RangeError(`unsupported number of channels: ${channels}`);\r\n }\r\n if (depth !== 8 && depth !== 16) {\r\n throw new RangeError(`unsupported bit depth: ${depth}`);\r\n }\r\n const returnValue = { channels, depth, colorType: ColorType.UNKNOWN };\r\n switch (channels) {\r\n case 4:\r\n returnValue.colorType = ColorType.TRUECOLOUR_ALPHA;\r\n break;\r\n case 3:\r\n returnValue.colorType = ColorType.TRUECOLOUR;\r\n break;\r\n case 1:\r\n returnValue.colorType = ColorType.GREYSCALE;\r\n break;\r\n case 2:\r\n returnValue.colorType = ColorType.GREYSCALE_ALPHA;\r\n break;\r\n default:\r\n throw new Error(`unsupported number of channels: ${channels}`);\r\n }\r\n return returnValue;\r\n}\r\nfunction writeDataBytes(data, newData, slotsPerLine, offset) {\r\n for (let j = 0; j < slotsPerLine; j++) {\r\n newData.writeByte(data[offset++]);\r\n }\r\n return offset;\r\n}\r\nfunction writeDataUint16(data, newData, slotsPerLine, offset) {\r\n for (let j = 0; j < slotsPerLine; j++) {\r\n newData.writeUint16(data[offset++]);\r\n }\r\n return offset;\r\n}\r\n//# sourceMappingURL=PNGEncoder.js.map" - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\types.js", - "name": "./node_modules/fast-png/lib-esm/types.js", - "index": 27, - "index2": 24, - "size": 419, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [], - "issuer": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "issuerId": null, - "issuerName": "./node_modules/fast-png/lib-esm/index.js", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "name": "./node_modules/fast-png/lib-esm/index.js", - "profile": { - "factory": 2180, - "building": 1082 - } - } - ], - "profile": { - "factory": 21, - "building": 92, - "dependencies": 43 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "module": "./node_modules/fast-png/lib-esm/index.js", - "moduleName": "./node_modules/fast-png/lib-esm/index.js", - "type": "harmony side effect evaluation", - "userRequest": "./types", - "loc": "3:0-24" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "module": "./node_modules/fast-png/lib-esm/index.js", - "moduleName": "./node_modules/fast-png/lib-esm/index.js", - "type": "harmony export imported specifier", - "userRequest": "./types", - "loc": "3:0-24" - } - ], - "usedExports": [ - "ResolutionUnitSpecifier" - ], - "providedExports": [ - "ResolutionUnitSpecifier" - ], - "optimizationBailout": [], - "depth": 3, - "source": "export var ResolutionUnitSpecifier;\r\n(function (ResolutionUnitSpecifier) {\r\n /**\r\n * Unit is unknown\r\n */\r\n ResolutionUnitSpecifier[ResolutionUnitSpecifier[\"UNKNOWN\"] = 0] = \"UNKNOWN\";\r\n /**\r\n * Unit is the metre\r\n */\r\n ResolutionUnitSpecifier[ResolutionUnitSpecifier[\"METRE\"] = 1] = \"METRE\";\r\n})(ResolutionUnitSpecifier || (ResolutionUnitSpecifier = {}));\r\n//# sourceMappingURL=types.js.map" - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\iobuffer\\lib-esm\\IOBuffer.js", - "name": "./node_modules/iobuffer/lib-esm/IOBuffer.js", - "index": 5, - "index2": 3, - "size": 13016, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [], - "issuer": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "issuerId": null, - "issuerName": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "name": "./node_modules/fast-png/lib-esm/index.js", - "profile": { - "factory": 2180, - "building": 1082 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "name": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "profile": { - "factory": 21, - "building": 92, - "dependencies": 43 - } - } - ], - "profile": { - "factory": 48, - "building": 7 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "type": "harmony side effect evaluation", - "userRequest": "iobuffer", - "loc": "1:0-36" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGEncoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "type": "harmony side effect evaluation", - "userRequest": "iobuffer", - "loc": "1:0-36" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGEncoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "type": "harmony import specifier", - "userRequest": "iobuffer", - "loc": "8:40-48" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "type": "harmony import specifier", - "userRequest": "iobuffer", - "loc": "10:40-48" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGEncoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "type": "harmony import specifier", - "userRequest": "iobuffer", - "loc": "56:28-36" - } - ], - "usedExports": [ - "IOBuffer" - ], - "providedExports": [ - "IOBuffer" - ], - "optimizationBailout": [], - "depth": 4, - "source": "import { decode, encode } from './utf8';\r\nconst defaultByteLength = 1024 * 8;\r\nexport class IOBuffer {\r\n /**\r\n * @param data - The data to construct the IOBuffer with.\r\n * If data is a number, it will be the new buffer's length
              \r\n * If data is `undefined`, the buffer will be initialized with a default length of 8Kb
              \r\n * If data is an ArrayBuffer, SharedArrayBuffer, an ArrayBufferView (Typed Array), an IOBuffer instance,\r\n * or a Node.js Buffer, a view will be created over the underlying ArrayBuffer.\r\n * @param options\r\n */\r\n constructor(data = defaultByteLength, options = {}) {\r\n let dataIsGiven = false;\r\n if (typeof data === 'number') {\r\n data = new ArrayBuffer(data);\r\n }\r\n else {\r\n dataIsGiven = true;\r\n this.lastWrittenByte = data.byteLength;\r\n }\r\n const offset = options.offset ? options.offset >>> 0 : 0;\r\n const byteLength = data.byteLength - offset;\r\n let dvOffset = offset;\r\n if (ArrayBuffer.isView(data) || data instanceof IOBuffer) {\r\n if (data.byteLength !== data.buffer.byteLength) {\r\n dvOffset = data.byteOffset + offset;\r\n }\r\n data = data.buffer;\r\n }\r\n if (dataIsGiven) {\r\n this.lastWrittenByte = byteLength;\r\n }\r\n else {\r\n this.lastWrittenByte = 0;\r\n }\r\n this.buffer = data;\r\n this.length = byteLength;\r\n this.byteLength = byteLength;\r\n this.byteOffset = dvOffset;\r\n this.offset = 0;\r\n this.littleEndian = true;\r\n this._data = new DataView(this.buffer, dvOffset, byteLength);\r\n this._mark = 0;\r\n this._marks = [];\r\n }\r\n /**\r\n * Checks if the memory allocated to the buffer is sufficient to store more\r\n * bytes after the offset.\r\n * @param byteLength - The needed memory in bytes.\r\n * @returns `true` if there is sufficient space and `false` otherwise.\r\n */\r\n available(byteLength = 1) {\r\n return this.offset + byteLength <= this.length;\r\n }\r\n /**\r\n * Check if little-endian mode is used for reading and writing multi-byte\r\n * values.\r\n * @returns `true` if little-endian mode is used, `false` otherwise.\r\n */\r\n isLittleEndian() {\r\n return this.littleEndian;\r\n }\r\n /**\r\n * Set little-endian mode for reading and writing multi-byte values.\r\n */\r\n setLittleEndian() {\r\n this.littleEndian = true;\r\n return this;\r\n }\r\n /**\r\n * Check if big-endian mode is used for reading and writing multi-byte values.\r\n * @returns `true` if big-endian mode is used, `false` otherwise.\r\n */\r\n isBigEndian() {\r\n return !this.littleEndian;\r\n }\r\n /**\r\n * Switches to big-endian mode for reading and writing multi-byte values.\r\n */\r\n setBigEndian() {\r\n this.littleEndian = false;\r\n return this;\r\n }\r\n /**\r\n * Move the pointer n bytes forward.\r\n * @param n - Number of bytes to skip.\r\n */\r\n skip(n = 1) {\r\n this.offset += n;\r\n return this;\r\n }\r\n /**\r\n * Move the pointer to the given offset.\r\n * @param offset\r\n */\r\n seek(offset) {\r\n this.offset = offset;\r\n return this;\r\n }\r\n /**\r\n * Store the current pointer offset.\r\n * @see {@link IOBuffer#reset}\r\n */\r\n mark() {\r\n this._mark = this.offset;\r\n return this;\r\n }\r\n /**\r\n * Move the pointer back to the last pointer offset set by mark.\r\n * @see {@link IOBuffer#mark}\r\n */\r\n reset() {\r\n this.offset = this._mark;\r\n return this;\r\n }\r\n /**\r\n * Push the current pointer offset to the mark stack.\r\n * @see {@link IOBuffer#popMark}\r\n */\r\n pushMark() {\r\n this._marks.push(this.offset);\r\n return this;\r\n }\r\n /**\r\n * Pop the last pointer offset from the mark stack, and set the current\r\n * pointer offset to the popped value.\r\n * @see {@link IOBuffer#pushMark}\r\n */\r\n popMark() {\r\n const offset = this._marks.pop();\r\n if (offset === undefined) {\r\n throw new Error('Mark stack empty');\r\n }\r\n this.seek(offset);\r\n return this;\r\n }\r\n /**\r\n * Move the pointer offset back to 0.\r\n */\r\n rewind() {\r\n this.offset = 0;\r\n return this;\r\n }\r\n /**\r\n * Make sure the buffer has sufficient memory to write a given byteLength at\r\n * the current pointer offset.\r\n * If the buffer's memory is insufficient, this method will create a new\r\n * buffer (a copy) with a length that is twice (byteLength + current offset).\r\n * @param byteLength\r\n */\r\n ensureAvailable(byteLength = 1) {\r\n if (!this.available(byteLength)) {\r\n const lengthNeeded = this.offset + byteLength;\r\n const newLength = lengthNeeded * 2;\r\n const newArray = new Uint8Array(newLength);\r\n newArray.set(new Uint8Array(this.buffer));\r\n this.buffer = newArray.buffer;\r\n this.length = this.byteLength = newLength;\r\n this._data = new DataView(this.buffer);\r\n }\r\n return this;\r\n }\r\n /**\r\n * Read a byte and return false if the byte's value is 0, or true otherwise.\r\n * Moves pointer forward by one byte.\r\n */\r\n readBoolean() {\r\n return this.readUint8() !== 0;\r\n }\r\n /**\r\n * Read a signed 8-bit integer and move pointer forward by 1 byte.\r\n */\r\n readInt8() {\r\n return this._data.getInt8(this.offset++);\r\n }\r\n /**\r\n * Read an unsigned 8-bit integer and move pointer forward by 1 byte.\r\n */\r\n readUint8() {\r\n return this._data.getUint8(this.offset++);\r\n }\r\n /**\r\n * Alias for {@link IOBuffer#readUint8}.\r\n */\r\n readByte() {\r\n return this.readUint8();\r\n }\r\n /**\r\n * Read `n` bytes and move pointer forward by `n` bytes.\r\n */\r\n readBytes(n = 1) {\r\n const bytes = new Uint8Array(n);\r\n for (let i = 0; i < n; i++) {\r\n bytes[i] = this.readByte();\r\n }\r\n return bytes;\r\n }\r\n /**\r\n * Read a 16-bit signed integer and move pointer forward by 2 bytes.\r\n */\r\n readInt16() {\r\n const value = this._data.getInt16(this.offset, this.littleEndian);\r\n this.offset += 2;\r\n return value;\r\n }\r\n /**\r\n * Read a 16-bit unsigned integer and move pointer forward by 2 bytes.\r\n */\r\n readUint16() {\r\n const value = this._data.getUint16(this.offset, this.littleEndian);\r\n this.offset += 2;\r\n return value;\r\n }\r\n /**\r\n * Read a 32-bit signed integer and move pointer forward by 4 bytes.\r\n */\r\n readInt32() {\r\n const value = this._data.getInt32(this.offset, this.littleEndian);\r\n this.offset += 4;\r\n return value;\r\n }\r\n /**\r\n * Read a 32-bit unsigned integer and move pointer forward by 4 bytes.\r\n */\r\n readUint32() {\r\n const value = this._data.getUint32(this.offset, this.littleEndian);\r\n this.offset += 4;\r\n return value;\r\n }\r\n /**\r\n * Read a 32-bit floating number and move pointer forward by 4 bytes.\r\n */\r\n readFloat32() {\r\n const value = this._data.getFloat32(this.offset, this.littleEndian);\r\n this.offset += 4;\r\n return value;\r\n }\r\n /**\r\n * Read a 64-bit floating number and move pointer forward by 8 bytes.\r\n */\r\n readFloat64() {\r\n const value = this._data.getFloat64(this.offset, this.littleEndian);\r\n this.offset += 8;\r\n return value;\r\n }\r\n /**\r\n * Read a 1-byte ASCII character and move pointer forward by 1 byte.\r\n */\r\n readChar() {\r\n return String.fromCharCode(this.readInt8());\r\n }\r\n /**\r\n * Read `n` 1-byte ASCII characters and move pointer forward by `n` bytes.\r\n */\r\n readChars(n = 1) {\r\n let result = '';\r\n for (let i = 0; i < n; i++) {\r\n result += this.readChar();\r\n }\r\n return result;\r\n }\r\n /**\r\n * Read the next `n` bytes, return a UTF-8 decoded string and move pointer\r\n * forward by `n` bytes.\r\n */\r\n readUtf8(n = 1) {\r\n return decode(this.readBytes(n));\r\n }\r\n /**\r\n * Write 0xff if the passed value is truthy, 0x00 otherwise and move pointer\r\n * forward by 1 byte.\r\n */\r\n writeBoolean(value) {\r\n this.writeUint8(value ? 0xff : 0x00);\r\n return this;\r\n }\r\n /**\r\n * Write `value` as an 8-bit signed integer and move pointer forward by 1 byte.\r\n */\r\n writeInt8(value) {\r\n this.ensureAvailable(1);\r\n this._data.setInt8(this.offset++, value);\r\n this._updateLastWrittenByte();\r\n return this;\r\n }\r\n /**\r\n * Write `value` as an 8-bit unsigned integer and move pointer forward by 1\r\n * byte.\r\n */\r\n writeUint8(value) {\r\n this.ensureAvailable(1);\r\n this._data.setUint8(this.offset++, value);\r\n this._updateLastWrittenByte();\r\n return this;\r\n }\r\n /**\r\n * An alias for {@link IOBuffer#writeUint8}.\r\n */\r\n writeByte(value) {\r\n return this.writeUint8(value);\r\n }\r\n /**\r\n * Write all elements of `bytes` as uint8 values and move pointer forward by\r\n * `bytes.length` bytes.\r\n */\r\n writeBytes(bytes) {\r\n this.ensureAvailable(bytes.length);\r\n for (let i = 0; i < bytes.length; i++) {\r\n this._data.setUint8(this.offset++, bytes[i]);\r\n }\r\n this._updateLastWrittenByte();\r\n return this;\r\n }\r\n /**\r\n * Write `value` as a 16-bit signed integer and move pointer forward by 2\r\n * bytes.\r\n */\r\n writeInt16(value) {\r\n this.ensureAvailable(2);\r\n this._data.setInt16(this.offset, value, this.littleEndian);\r\n this.offset += 2;\r\n this._updateLastWrittenByte();\r\n return this;\r\n }\r\n /**\r\n * Write `value` as a 16-bit unsigned integer and move pointer forward by 2\r\n * bytes.\r\n */\r\n writeUint16(value) {\r\n this.ensureAvailable(2);\r\n this._data.setUint16(this.offset, value, this.littleEndian);\r\n this.offset += 2;\r\n this._updateLastWrittenByte();\r\n return this;\r\n }\r\n /**\r\n * Write `value` as a 32-bit signed integer and move pointer forward by 4\r\n * bytes.\r\n */\r\n writeInt32(value) {\r\n this.ensureAvailable(4);\r\n this._data.setInt32(this.offset, value, this.littleEndian);\r\n this.offset += 4;\r\n this._updateLastWrittenByte();\r\n return this;\r\n }\r\n /**\r\n * Write `value` as a 32-bit unsigned integer and move pointer forward by 4\r\n * bytes.\r\n */\r\n writeUint32(value) {\r\n this.ensureAvailable(4);\r\n this._data.setUint32(this.offset, value, this.littleEndian);\r\n this.offset += 4;\r\n this._updateLastWrittenByte();\r\n return this;\r\n }\r\n /**\r\n * Write `value` as a 32-bit floating number and move pointer forward by 4\r\n * bytes.\r\n */\r\n writeFloat32(value) {\r\n this.ensureAvailable(4);\r\n this._data.setFloat32(this.offset, value, this.littleEndian);\r\n this.offset += 4;\r\n this._updateLastWrittenByte();\r\n return this;\r\n }\r\n /**\r\n * Write `value` as a 64-bit floating number and move pointer forward by 8\r\n * bytes.\r\n */\r\n writeFloat64(value) {\r\n this.ensureAvailable(8);\r\n this._data.setFloat64(this.offset, value, this.littleEndian);\r\n this.offset += 8;\r\n this._updateLastWrittenByte();\r\n return this;\r\n }\r\n /**\r\n * Write the charCode of `str`'s first character as an 8-bit unsigned integer\r\n * and move pointer forward by 1 byte.\r\n */\r\n writeChar(str) {\r\n return this.writeUint8(str.charCodeAt(0));\r\n }\r\n /**\r\n * Write the charCodes of all `str`'s characters as 8-bit unsigned integers\r\n * and move pointer forward by `str.length` bytes.\r\n */\r\n writeChars(str) {\r\n for (let i = 0; i < str.length; i++) {\r\n this.writeUint8(str.charCodeAt(i));\r\n }\r\n return this;\r\n }\r\n /**\r\n * UTF-8 encode and write `str` to the current pointer offset and move pointer\r\n * forward according to the encoded length.\r\n */\r\n writeUtf8(str) {\r\n return this.writeBytes(encode(str));\r\n }\r\n /**\r\n * Export a Uint8Array view of the internal buffer.\r\n * The view starts at the byte offset and its length\r\n * is calculated to stop at the last written byte or the original length.\r\n */\r\n toArray() {\r\n return new Uint8Array(this.buffer, this.byteOffset, this.lastWrittenByte);\r\n }\r\n /**\r\n * Update the last written byte offset\r\n * @private\r\n */\r\n _updateLastWrittenByte() {\r\n if (this.offset > this.lastWrittenByte) {\r\n this.lastWrittenByte = this.offset;\r\n }\r\n }\r\n}\r\n//# sourceMappingURL=IOBuffer.js.map" - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\common.js", - "name": "./node_modules/fast-png/lib-esm/common.js", - "index": 24, - "index2": 20, - "size": 700, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [], - "issuer": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "issuerId": null, - "issuerName": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "name": "./node_modules/fast-png/lib-esm/index.js", - "profile": { - "factory": 2180, - "building": 1082 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "name": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "profile": { - "factory": 21, - "building": 92, - "dependencies": 43 - } - } - ], - "profile": { - "factory": 48, - "building": 7 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "type": "harmony side effect evaluation", - "userRequest": "./common", - "loc": "3:0-45" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGEncoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "type": "harmony side effect evaluation", - "userRequest": "./common", - "loc": "3:0-45" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGEncoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "type": "harmony import specifier", - "userRequest": "./common", - "loc": "25:24-36" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "type": "harmony import specifier", - "userRequest": "./common", - "loc": "45:28-40" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "type": "harmony import specifier", - "userRequest": "./common", - "loc": "46:37-49" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "type": "harmony import specifier", - "userRequest": "./common", - "loc": "47:79-91" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "type": "harmony import specifier", - "userRequest": "./common", - "loc": "90:30-33" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGEncoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "type": "harmony import specifier", - "userRequest": "./common", - "loc": "93:25-28" - } - ], - "usedExports": [ - "pngSignature", - "crc" - ], - "providedExports": [ - "pngSignature", - "crc" - ], - "optimizationBailout": [], - "depth": 4, - "source": "export const pngSignature = [137, 80, 78, 71, 13, 10, 26, 10];\r\nconst crcTable = [];\r\nfor (let n = 0; n < 256; n++) {\r\n let c = n;\r\n for (let k = 0; k < 8; k++) {\r\n if (c & 1) {\r\n c = 0xedb88320 ^ (c >>> 1);\r\n }\r\n else {\r\n c = c >>> 1;\r\n }\r\n }\r\n crcTable[n] = c;\r\n}\r\nconst initialCrc = 0xffffffff;\r\nfunction updateCrc(currentCrc, data, length) {\r\n let c = currentCrc;\r\n for (let n = 0; n < length; n++) {\r\n c = crcTable[(c ^ data[n]) & 0xff] ^ (c >>> 8);\r\n }\r\n return c;\r\n}\r\nexport function crc(data, length) {\r\n return (updateCrc(initialCrc, data, length) ^ initialCrc) >>> 0;\r\n}\r\n//# sourceMappingURL=common.js.map" - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\internalTypes.js", - "name": "./node_modules/fast-png/lib-esm/internalTypes.js", - "index": 25, - "index2": 21, - "size": 1297, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [], - "issuer": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "issuerId": null, - "issuerName": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "name": "./node_modules/fast-png/lib-esm/index.js", - "profile": { - "factory": 2180, - "building": 1082 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "name": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "profile": { - "factory": 21, - "building": 92, - "dependencies": 43 - } - } - ], - "profile": { - "factory": 48, - "building": 7 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "type": "harmony side effect evaluation", - "userRequest": "./internalTypes", - "loc": "4:0-95" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGEncoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "type": "harmony side effect evaluation", - "userRequest": "./internalTypes", - "loc": "4:0-95" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGEncoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "type": "harmony import specifier", - "userRequest": "./internalTypes", - "loc": "11:26-35" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "type": "harmony import specifier", - "userRequest": "./internalTypes", - "loc": "27:34-51" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "type": "harmony import specifier", - "userRequest": "./internalTypes", - "loc": "28:29-41" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "type": "harmony import specifier", - "userRequest": "./internalTypes", - "loc": "29:32-47" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGEncoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "type": "harmony import specifier", - "userRequest": "./internalTypes", - "loc": "35:23-40" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGEncoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "type": "harmony import specifier", - "userRequest": "./internalTypes", - "loc": "36:23-35" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGEncoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "type": "harmony import specifier", - "userRequest": "./internalTypes", - "loc": "37:23-38" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "type": "harmony import specifier", - "userRequest": "./internalTypes", - "loc": "109:17-26" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGEncoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "type": "harmony import specifier", - "userRequest": "./internalTypes", - "loc": "110:54-63" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "type": "harmony import specifier", - "userRequest": "./internalTypes", - "loc": "112:17-26" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGEncoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "type": "harmony import specifier", - "userRequest": "./internalTypes", - "loc": "113:36-45" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "type": "harmony import specifier", - "userRequest": "./internalTypes", - "loc": "115:17-26" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGEncoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "type": "harmony import specifier", - "userRequest": "./internalTypes", - "loc": "116:36-45" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "type": "harmony import specifier", - "userRequest": "./internalTypes", - "loc": "118:17-26" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGEncoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "type": "harmony import specifier", - "userRequest": "./internalTypes", - "loc": "119:36-45" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "type": "harmony import specifier", - "userRequest": "./internalTypes", - "loc": "121:17-26" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGEncoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "type": "harmony import specifier", - "userRequest": "./internalTypes", - "loc": "122:36-45" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "type": "harmony import specifier", - "userRequest": "./internalTypes", - "loc": "129:40-57" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "type": "harmony import specifier", - "userRequest": "./internalTypes", - "loc": "192:35-47" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "type": "harmony import specifier", - "userRequest": "./internalTypes", - "loc": "195:38-53" - } - ], - "usedExports": [ - "ColorType", - "CompressionMethod", - "FilterMethod", - "InterlaceMethod" - ], - "providedExports": [ - "ColorType", - "CompressionMethod", - "FilterMethod", - "InterlaceMethod" - ], - "optimizationBailout": [], - "depth": 4, - "source": "export var ColorType;\r\n(function (ColorType) {\r\n ColorType[ColorType[\"UNKNOWN\"] = -1] = \"UNKNOWN\";\r\n ColorType[ColorType[\"GREYSCALE\"] = 0] = \"GREYSCALE\";\r\n ColorType[ColorType[\"TRUECOLOUR\"] = 2] = \"TRUECOLOUR\";\r\n ColorType[ColorType[\"INDEXED_COLOUR\"] = 3] = \"INDEXED_COLOUR\";\r\n ColorType[ColorType[\"GREYSCALE_ALPHA\"] = 4] = \"GREYSCALE_ALPHA\";\r\n ColorType[ColorType[\"TRUECOLOUR_ALPHA\"] = 6] = \"TRUECOLOUR_ALPHA\";\r\n})(ColorType || (ColorType = {}));\r\nexport var CompressionMethod;\r\n(function (CompressionMethod) {\r\n CompressionMethod[CompressionMethod[\"UNKNOWN\"] = -1] = \"UNKNOWN\";\r\n CompressionMethod[CompressionMethod[\"DEFLATE\"] = 0] = \"DEFLATE\";\r\n})(CompressionMethod || (CompressionMethod = {}));\r\nexport var FilterMethod;\r\n(function (FilterMethod) {\r\n FilterMethod[FilterMethod[\"UNKNOWN\"] = -1] = \"UNKNOWN\";\r\n FilterMethod[FilterMethod[\"ADAPTIVE\"] = 0] = \"ADAPTIVE\";\r\n})(FilterMethod || (FilterMethod = {}));\r\nexport var InterlaceMethod;\r\n(function (InterlaceMethod) {\r\n InterlaceMethod[InterlaceMethod[\"UNKNOWN\"] = -1] = \"UNKNOWN\";\r\n InterlaceMethod[InterlaceMethod[\"NO_INTERLACE\"] = 0] = \"NO_INTERLACE\";\r\n InterlaceMethod[InterlaceMethod[\"ADAM7\"] = 1] = \"ADAM7\";\r\n})(InterlaceMethod || (InterlaceMethod = {}));\r\n//# sourceMappingURL=internalTypes.js.map" - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\iobuffer\\lib-esm\\utf8.browser.js", - "name": "./node_modules/iobuffer/lib-esm/utf8.browser.js", - "index": 6, - "index2": 2, - "size": 293, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [], - "issuer": "F:\\tweb\\node_modules\\iobuffer\\lib-esm\\IOBuffer.js", - "issuerId": null, - "issuerName": "./node_modules/iobuffer/lib-esm/IOBuffer.js", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "name": "./node_modules/fast-png/lib-esm/index.js", - "profile": { - "factory": 2180, - "building": 1082 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "name": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "profile": { - "factory": 21, - "building": 92, - "dependencies": 43 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\iobuffer\\lib-esm\\IOBuffer.js", - "name": "./node_modules/iobuffer/lib-esm/IOBuffer.js", - "profile": { - "factory": 48, - "building": 7 - } - } - ], - "profile": { - "factory": 6, - "building": 16 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\iobuffer\\lib-esm\\IOBuffer.js", - "module": "./node_modules/iobuffer/lib-esm/IOBuffer.js", - "moduleName": "./node_modules/iobuffer/lib-esm/IOBuffer.js", - "type": "harmony side effect evaluation", - "userRequest": "./utf8", - "loc": "1:0-40" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\iobuffer\\lib-esm\\IOBuffer.js", - "module": "./node_modules/iobuffer/lib-esm/IOBuffer.js", - "moduleName": "./node_modules/iobuffer/lib-esm/IOBuffer.js", - "type": "harmony import specifier", - "userRequest": "./utf8", - "loc": "267:15-21" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\iobuffer\\lib-esm\\IOBuffer.js", - "module": "./node_modules/iobuffer/lib-esm/IOBuffer.js", - "moduleName": "./node_modules/iobuffer/lib-esm/IOBuffer.js", - "type": "harmony import specifier", - "userRequest": "./utf8", - "loc": "402:31-37" - } - ], - "usedExports": [ - "decode", - "encode" - ], - "providedExports": [ - "decode", - "encode" - ], - "optimizationBailout": [], - "depth": 5, - "source": "import './text-encoding-polyfill';\r\nconst decoder = new TextDecoder('utf-8');\r\nexport function decode(bytes) {\r\n return decoder.decode(bytes);\r\n}\r\nconst encoder = new TextEncoder();\r\nexport function encode(str) {\r\n return encoder.encode(str);\r\n}\r\n//# sourceMappingURL=utf8.browser.js.map" - } - ], - "filteredModules": 0 - } - ], - "filteredModules": 0, - "origins": [ - { - "module": "", - "moduleIdentifier": "", - "moduleName": "", - "loc": "main", - "request": "!!F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "reasons": [] - } - ] - } - ], - "modules": [ - { - "id": 0, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\utils\\common.js", - "name": "./node_modules/pako/lib/utils/common.js", - "index": 9, - "index2": 4, - "size": 2444, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\pako\\index.js", - "issuerId": 1, - "issuerName": "./node_modules/pako/index.js", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "name": "./node_modules/fast-png/lib-esm/index.js", - "profile": { - "factory": 2180, - "building": 1082 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "name": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "profile": { - "factory": 21, - "building": 92, - "dependencies": 43 - } - }, - { - "id": 1, - "identifier": "F:\\tweb\\node_modules\\pako\\index.js", - "name": "./node_modules/pako/index.js", - "profile": { - "factory": 48, - "building": 7 - } - } - ], - "profile": { - "factory": 11, - "building": 13, - "dependencies": 8 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 1, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\index.js", - "module": "./node_modules/pako/index.js", - "moduleName": "./node_modules/pako/index.js", - "type": "cjs require", - "userRequest": "./lib/utils/common", - "loc": "4:16-45" - }, - { - "moduleId": 5, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\lib\\utils\\strings.js", - "module": "./node_modules/pako/lib/utils/strings.js", - "moduleName": "./node_modules/pako/lib/utils/strings.js", - "type": "cjs require", - "userRequest": "./common", - "loc": "5:12-31" - }, - { - "moduleId": 12, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\lib\\deflate.js", - "module": "./node_modules/pako/lib/deflate.js", - "moduleName": "./node_modules/pako/lib/deflate.js", - "type": "cjs require", - "userRequest": "./utils/common", - "loc": "5:19-44" - }, - { - "moduleId": 13, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\deflate.js", - "module": "./node_modules/pako/lib/zlib/deflate.js", - "moduleName": "./node_modules/pako/lib/zlib/deflate.js", - "type": "cjs require", - "userRequest": "../utils/common", - "loc": "22:14-40" - }, - { - "moduleId": 14, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\trees.js", - "module": "./node_modules/pako/lib/zlib/trees.js", - "moduleName": "./node_modules/pako/lib/zlib/trees.js", - "type": "cjs require", - "userRequest": "../utils/common", - "loc": "24:12-38" - }, - { - "moduleId": 15, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\lib\\inflate.js", - "module": "./node_modules/pako/lib/inflate.js", - "moduleName": "./node_modules/pako/lib/inflate.js", - "type": "cjs require", - "userRequest": "./utils/common", - "loc": "5:19-44" - }, - { - "moduleId": 16, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\inflate.js", - "module": "./node_modules/pako/lib/zlib/inflate.js", - "moduleName": "./node_modules/pako/lib/zlib/inflate.js", - "type": "cjs require", - "userRequest": "../utils/common", - "loc": "22:20-46" - }, - { - "moduleId": 18, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\inftrees.js", - "module": "./node_modules/pako/lib/zlib/inftrees.js", - "moduleName": "./node_modules/pako/lib/zlib/inftrees.js", - "type": "cjs require", - "userRequest": "../utils/common", - "loc": "22:12-38" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 5, - "source": "'use strict';\n\n\nvar TYPED_OK = (typeof Uint8Array !== 'undefined') &&\n (typeof Uint16Array !== 'undefined') &&\n (typeof Int32Array !== 'undefined');\n\nfunction _has(obj, key) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nexports.assign = function (obj /*from1, from2, from3, ...*/) {\n var sources = Array.prototype.slice.call(arguments, 1);\n while (sources.length) {\n var source = sources.shift();\n if (!source) { continue; }\n\n if (typeof source !== 'object') {\n throw new TypeError(source + 'must be non-object');\n }\n\n for (var p in source) {\n if (_has(source, p)) {\n obj[p] = source[p];\n }\n }\n }\n\n return obj;\n};\n\n\n// reduce buffer size, avoiding mem copy\nexports.shrinkBuf = function (buf, size) {\n if (buf.length === size) { return buf; }\n if (buf.subarray) { return buf.subarray(0, size); }\n buf.length = size;\n return buf;\n};\n\n\nvar fnTyped = {\n arraySet: function (dest, src, src_offs, len, dest_offs) {\n if (src.subarray && dest.subarray) {\n dest.set(src.subarray(src_offs, src_offs + len), dest_offs);\n return;\n }\n // Fallback to ordinary array\n for (var i = 0; i < len; i++) {\n dest[dest_offs + i] = src[src_offs + i];\n }\n },\n // Join array of chunks to single array.\n flattenChunks: function (chunks) {\n var i, l, len, pos, chunk, result;\n\n // calculate data length\n len = 0;\n for (i = 0, l = chunks.length; i < l; i++) {\n len += chunks[i].length;\n }\n\n // join chunks\n result = new Uint8Array(len);\n pos = 0;\n for (i = 0, l = chunks.length; i < l; i++) {\n chunk = chunks[i];\n result.set(chunk, pos);\n pos += chunk.length;\n }\n\n return result;\n }\n};\n\nvar fnUntyped = {\n arraySet: function (dest, src, src_offs, len, dest_offs) {\n for (var i = 0; i < len; i++) {\n dest[dest_offs + i] = src[src_offs + i];\n }\n },\n // Join array of chunks to single array.\n flattenChunks: function (chunks) {\n return [].concat.apply([], chunks);\n }\n};\n\n\n// Enable/Disable typed arrays use, for testing\n//\nexports.setTyped = function (on) {\n if (on) {\n exports.Buf8 = Uint8Array;\n exports.Buf16 = Uint16Array;\n exports.Buf32 = Int32Array;\n exports.assign(exports, fnTyped);\n } else {\n exports.Buf8 = Array;\n exports.Buf16 = Array;\n exports.Buf32 = Array;\n exports.assign(exports, fnUntyped);\n }\n};\n\nexports.setTyped(TYPED_OK);\n" - }, - { - "id": 1, - "identifier": "F:\\tweb\\node_modules\\pako\\index.js", - "name": "./node_modules/pako/index.js", - "index": 8, - "index2": 19, - "size": 347, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "issuerId": null, - "issuerName": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "name": "./node_modules/fast-png/lib-esm/index.js", - "profile": { - "factory": 2180, - "building": 1082 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "name": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "profile": { - "factory": 21, - "building": 92, - "dependencies": 43 - } - } - ], - "profile": { - "factory": 48, - "building": 7 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 20, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js 1f5c27d337cdd358fe6548a5eda250ca", - "module": "./node_modules/fast-png/lib-esm/index.js + 7 modules", - "moduleName": "./node_modules/fast-png/lib-esm/index.js + 7 modules", - "type": "harmony side effect evaluation", - "userRequest": "pako", - "loc": "2:0-43" - }, - { - "moduleId": 20, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js 1f5c27d337cdd358fe6548a5eda250ca", - "module": "./node_modules/fast-png/lib-esm/index.js + 7 modules", - "moduleName": "./node_modules/fast-png/lib-esm/index.js + 7 modules", - "type": "harmony side effect evaluation", - "userRequest": "pako", - "loc": "2:0-31" - }, - { - "moduleId": 20, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js 1f5c27d337cdd358fe6548a5eda250ca", - "module": "./node_modules/fast-png/lib-esm/index.js + 7 modules", - "moduleName": "./node_modules/fast-png/lib-esm/index.js + 7 modules", - "type": "harmony import specifier", - "userRequest": "pako", - "loc": "15:29-37" - }, - { - "moduleId": 20, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js 1f5c27d337cdd358fe6548a5eda250ca", - "module": "./node_modules/fast-png/lib-esm/index.js + 7 modules", - "moduleName": "./node_modules/fast-png/lib-esm/index.js + 7 modules", - "type": "harmony import specifier", - "userRequest": "pako", - "loc": "72:27-34" - } - ], - "usedExports": [ - "Inflate", - "deflate" - ], - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 4, - "source": "// Top level file is just a mixin of submodules & constants\n'use strict';\n\nvar assign = require('./lib/utils/common').assign;\n\nvar deflate = require('./lib/deflate');\nvar inflate = require('./lib/inflate');\nvar constants = require('./lib/zlib/constants');\n\nvar pako = {};\n\nassign(pako, deflate, inflate, constants);\n\nmodule.exports = pako;\n" - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\messages.js", - "name": "./node_modules/pako/lib/zlib/messages.js", - "index": 15, - "index2": 8, - "size": 1538, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\pako\\lib\\deflate.js", - "issuerId": 12, - "issuerName": "./node_modules/pako/lib/deflate.js", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "name": "./node_modules/fast-png/lib-esm/index.js", - "profile": { - "factory": 2180, - "building": 1082 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "name": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "profile": { - "factory": 21, - "building": 92, - "dependencies": 43 - } - }, - { - "id": 1, - "identifier": "F:\\tweb\\node_modules\\pako\\index.js", - "name": "./node_modules/pako/index.js", - "profile": { - "factory": 48, - "building": 7 - } - }, - { - "id": 12, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\deflate.js", - "name": "./node_modules/pako/lib/deflate.js", - "profile": { - "factory": 11, - "building": 13, - "dependencies": 8 - } - } - ], - "profile": { - "factory": 16, - "building": 21, - "dependencies": 2 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 12, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\lib\\deflate.js", - "module": "./node_modules/pako/lib/deflate.js", - "moduleName": "./node_modules/pako/lib/deflate.js", - "type": "cjs require", - "userRequest": "./zlib/messages", - "loc": "7:19-45" - }, - { - "moduleId": 13, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\deflate.js", - "module": "./node_modules/pako/lib/zlib/deflate.js", - "moduleName": "./node_modules/pako/lib/zlib/deflate.js", - "type": "cjs require", - "userRequest": "./messages", - "loc": "26:14-35" - }, - { - "moduleId": 15, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\lib\\inflate.js", - "module": "./node_modules/pako/lib/inflate.js", - "moduleName": "./node_modules/pako/lib/inflate.js", - "type": "cjs require", - "userRequest": "./zlib/messages", - "loc": "8:19-45" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 6, - "source": "'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nmodule.exports = {\n 2: 'need dictionary', /* Z_NEED_DICT 2 */\n 1: 'stream end', /* Z_STREAM_END 1 */\n 0: '', /* Z_OK 0 */\n '-1': 'file error', /* Z_ERRNO (-1) */\n '-2': 'stream error', /* Z_STREAM_ERROR (-2) */\n '-3': 'data error', /* Z_DATA_ERROR (-3) */\n '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */\n '-5': 'buffer error', /* Z_BUF_ERROR (-5) */\n '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */\n};\n" - }, - { - "id": 3, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\adler32.js", - "name": "./node_modules/pako/lib/zlib/adler32.js", - "index": 13, - "index2": 6, - "size": 1656, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\deflate.js", - "issuerId": 13, - "issuerName": "./node_modules/pako/lib/zlib/deflate.js", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "name": "./node_modules/fast-png/lib-esm/index.js", - "profile": { - "factory": 2180, - "building": 1082 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "name": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "profile": { - "factory": 21, - "building": 92, - "dependencies": 43 - } - }, - { - "id": 1, - "identifier": "F:\\tweb\\node_modules\\pako\\index.js", - "name": "./node_modules/pako/index.js", - "profile": { - "factory": 48, - "building": 7 - } - }, - { - "id": 12, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\deflate.js", - "name": "./node_modules/pako/lib/deflate.js", - "profile": { - "factory": 11, - "building": 13, - "dependencies": 8 - } - }, - { - "id": 13, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\deflate.js", - "name": "./node_modules/pako/lib/zlib/deflate.js", - "profile": { - "factory": 16, - "building": 21, - "dependencies": 2 - } - } - ], - "profile": { - "factory": 40, - "building": 27, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 13, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\deflate.js", - "module": "./node_modules/pako/lib/zlib/deflate.js", - "moduleName": "./node_modules/pako/lib/zlib/deflate.js", - "type": "cjs require", - "userRequest": "./adler32", - "loc": "24:14-34" - }, - { - "moduleId": 16, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\inflate.js", - "module": "./node_modules/pako/lib/zlib/inflate.js", - "moduleName": "./node_modules/pako/lib/zlib/inflate.js", - "type": "cjs require", - "userRequest": "./adler32", - "loc": "23:20-40" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 7, - "source": "'use strict';\n\n// Note: adler32 takes 12% for level 0 and 2% for level 6.\n// It isn't worth it to make additional optimizations as in original.\n// Small size is preferable.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction adler32(adler, buf, len, pos) {\n var s1 = (adler & 0xffff) |0,\n s2 = ((adler >>> 16) & 0xffff) |0,\n n = 0;\n\n while (len !== 0) {\n // Set limit ~ twice less than 5552, to keep\n // s2 in 31-bits, because we force signed ints.\n // in other case %= will fail.\n n = len > 2000 ? 2000 : len;\n len -= n;\n\n do {\n s1 = (s1 + buf[pos++]) |0;\n s2 = (s2 + s1) |0;\n } while (--n);\n\n s1 %= 65521;\n s2 %= 65521;\n }\n\n return (s1 | (s2 << 16)) |0;\n}\n\n\nmodule.exports = adler32;\n" - }, - { - "id": 4, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\crc32.js", - "name": "./node_modules/pako/lib/zlib/crc32.js", - "index": 14, - "index2": 7, - "size": 1750, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\deflate.js", - "issuerId": 13, - "issuerName": "./node_modules/pako/lib/zlib/deflate.js", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "name": "./node_modules/fast-png/lib-esm/index.js", - "profile": { - "factory": 2180, - "building": 1082 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "name": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "profile": { - "factory": 21, - "building": 92, - "dependencies": 43 - } - }, - { - "id": 1, - "identifier": "F:\\tweb\\node_modules\\pako\\index.js", - "name": "./node_modules/pako/index.js", - "profile": { - "factory": 48, - "building": 7 - } - }, - { - "id": 12, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\deflate.js", - "name": "./node_modules/pako/lib/deflate.js", - "profile": { - "factory": 11, - "building": 13, - "dependencies": 8 - } - }, - { - "id": 13, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\deflate.js", - "name": "./node_modules/pako/lib/zlib/deflate.js", - "profile": { - "factory": 16, - "building": 21, - "dependencies": 2 - } - } - ], - "profile": { - "factory": 40, - "building": 27, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 13, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\deflate.js", - "module": "./node_modules/pako/lib/zlib/deflate.js", - "moduleName": "./node_modules/pako/lib/zlib/deflate.js", - "type": "cjs require", - "userRequest": "./crc32", - "loc": "25:14-32" - }, - { - "moduleId": 16, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\inflate.js", - "module": "./node_modules/pako/lib/zlib/inflate.js", - "moduleName": "./node_modules/pako/lib/zlib/inflate.js", - "type": "cjs require", - "userRequest": "./crc32", - "loc": "24:20-38" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 7, - "source": "'use strict';\n\n// Note: we can't get significant speed boost here.\n// So write code to minimize size - no pregenerated tables\n// and array tools dependencies.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// Use ordinary array, since untyped makes no boost here\nfunction makeTable() {\n var c, table = [];\n\n for (var n = 0; n < 256; n++) {\n c = n;\n for (var k = 0; k < 8; k++) {\n c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));\n }\n table[n] = c;\n }\n\n return table;\n}\n\n// Create table on load. Just 255 signed longs. Not a problem.\nvar crcTable = makeTable();\n\n\nfunction crc32(crc, buf, len, pos) {\n var t = crcTable,\n end = pos + len;\n\n crc ^= -1;\n\n for (var i = pos; i < end; i++) {\n crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];\n }\n\n return (crc ^ (-1)); // >>> 0;\n}\n\n\nmodule.exports = crc32;\n" - }, - { - "id": 5, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\utils\\strings.js", - "name": "./node_modules/pako/lib/utils/strings.js", - "index": 16, - "index2": 10, - "size": 5293, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\pako\\lib\\deflate.js", - "issuerId": 12, - "issuerName": "./node_modules/pako/lib/deflate.js", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "name": "./node_modules/fast-png/lib-esm/index.js", - "profile": { - "factory": 2180, - "building": 1082 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "name": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "profile": { - "factory": 21, - "building": 92, - "dependencies": 43 - } - }, - { - "id": 1, - "identifier": "F:\\tweb\\node_modules\\pako\\index.js", - "name": "./node_modules/pako/index.js", - "profile": { - "factory": 48, - "building": 7 - } - }, - { - "id": 12, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\deflate.js", - "name": "./node_modules/pako/lib/deflate.js", - "profile": { - "factory": 11, - "building": 13, - "dependencies": 8 - } - } - ], - "profile": { - "factory": 16, - "building": 21, - "dependencies": 2 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 12, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\lib\\deflate.js", - "module": "./node_modules/pako/lib/deflate.js", - "moduleName": "./node_modules/pako/lib/deflate.js", - "type": "cjs require", - "userRequest": "./utils/strings", - "loc": "6:19-45" - }, - { - "moduleId": 15, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\lib\\inflate.js", - "module": "./node_modules/pako/lib/inflate.js", - "moduleName": "./node_modules/pako/lib/inflate.js", - "type": "cjs require", - "userRequest": "./utils/strings", - "loc": "6:19-45" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 6, - "source": "// String encode/decode helpers\n'use strict';\n\n\nvar utils = require('./common');\n\n\n// Quick check if we can use fast array to bin string conversion\n//\n// - apply(Array) can fail on Android 2.2\n// - apply(Uint8Array) can fail on iOS 5.1 Safari\n//\nvar STR_APPLY_OK = true;\nvar STR_APPLY_UIA_OK = true;\n\ntry { String.fromCharCode.apply(null, [ 0 ]); } catch (__) { STR_APPLY_OK = false; }\ntry { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; }\n\n\n// Table with utf8 lengths (calculated by first byte of sequence)\n// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,\n// because max possible codepoint is 0x10ffff\nvar _utf8len = new utils.Buf8(256);\nfor (var q = 0; q < 256; q++) {\n _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1);\n}\n_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start\n\n\n// convert string to array (typed, when possible)\nexports.string2buf = function (str) {\n var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;\n\n // count binary size\n for (m_pos = 0; m_pos < str_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;\n }\n\n // allocate buffer\n buf = new utils.Buf8(buf_len);\n\n // convert\n for (i = 0, m_pos = 0; i < buf_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n if (c < 0x80) {\n /* one byte */\n buf[i++] = c;\n } else if (c < 0x800) {\n /* two bytes */\n buf[i++] = 0xC0 | (c >>> 6);\n buf[i++] = 0x80 | (c & 0x3f);\n } else if (c < 0x10000) {\n /* three bytes */\n buf[i++] = 0xE0 | (c >>> 12);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n } else {\n /* four bytes */\n buf[i++] = 0xf0 | (c >>> 18);\n buf[i++] = 0x80 | (c >>> 12 & 0x3f);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n }\n }\n\n return buf;\n};\n\n// Helper (used in 2 places)\nfunction buf2binstring(buf, len) {\n // On Chrome, the arguments in a function call that are allowed is `65534`.\n // If the length of the buffer is smaller than that, we can use this optimization,\n // otherwise we will take a slower path.\n if (len < 65534) {\n if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) {\n return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len));\n }\n }\n\n var result = '';\n for (var i = 0; i < len; i++) {\n result += String.fromCharCode(buf[i]);\n }\n return result;\n}\n\n\n// Convert byte array to binary string\nexports.buf2binstring = function (buf) {\n return buf2binstring(buf, buf.length);\n};\n\n\n// Convert binary string (typed, when possible)\nexports.binstring2buf = function (str) {\n var buf = new utils.Buf8(str.length);\n for (var i = 0, len = buf.length; i < len; i++) {\n buf[i] = str.charCodeAt(i);\n }\n return buf;\n};\n\n\n// convert array to string\nexports.buf2string = function (buf, max) {\n var i, out, c, c_len;\n var len = max || buf.length;\n\n // Reserve max possible length (2 words per char)\n // NB: by unknown reasons, Array is significantly faster for\n // String.fromCharCode.apply than Uint16Array.\n var utf16buf = new Array(len * 2);\n\n for (out = 0, i = 0; i < len;) {\n c = buf[i++];\n // quick process ascii\n if (c < 0x80) { utf16buf[out++] = c; continue; }\n\n c_len = _utf8len[c];\n // skip 5 & 6 byte codes\n if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; }\n\n // apply mask on first byte\n c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;\n // join the rest\n while (c_len > 1 && i < len) {\n c = (c << 6) | (buf[i++] & 0x3f);\n c_len--;\n }\n\n // terminated by end of string?\n if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }\n\n if (c < 0x10000) {\n utf16buf[out++] = c;\n } else {\n c -= 0x10000;\n utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);\n utf16buf[out++] = 0xdc00 | (c & 0x3ff);\n }\n }\n\n return buf2binstring(utf16buf, out);\n};\n\n\n// Calculate max possible position in utf8 buffer,\n// that will not break sequence. If that's not possible\n// - (very small limits) return max size as is.\n//\n// buf[] - utf8 bytes array\n// max - length limit (mandatory);\nexports.utf8border = function (buf, max) {\n var pos;\n\n max = max || buf.length;\n if (max > buf.length) { max = buf.length; }\n\n // go back from last position, until start of sequence found\n pos = max - 1;\n while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }\n\n // Very small and broken sequence,\n // return max, because we should return something anyway.\n if (pos < 0) { return max; }\n\n // If we came to start of buffer - that means buffer is too small,\n // return max too.\n if (pos === 0) { return max; }\n\n return (pos + _utf8len[buf[pos]] > max) ? pos : max;\n};\n" - }, - { - "id": 6, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\zstream.js", - "name": "./node_modules/pako/lib/zlib/zstream.js", - "index": 17, - "index2": 11, - "size": 1811, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\pako\\lib\\deflate.js", - "issuerId": 12, - "issuerName": "./node_modules/pako/lib/deflate.js", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "name": "./node_modules/fast-png/lib-esm/index.js", - "profile": { - "factory": 2180, - "building": 1082 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "name": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "profile": { - "factory": 21, - "building": 92, - "dependencies": 43 - } - }, - { - "id": 1, - "identifier": "F:\\tweb\\node_modules\\pako\\index.js", - "name": "./node_modules/pako/index.js", - "profile": { - "factory": 48, - "building": 7 - } - }, - { - "id": 12, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\deflate.js", - "name": "./node_modules/pako/lib/deflate.js", - "profile": { - "factory": 11, - "building": 13, - "dependencies": 8 - } - } - ], - "profile": { - "factory": 16, - "building": 21, - "dependencies": 2 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 12, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\lib\\deflate.js", - "module": "./node_modules/pako/lib/deflate.js", - "moduleName": "./node_modules/pako/lib/deflate.js", - "type": "cjs require", - "userRequest": "./zlib/zstream", - "loc": "8:19-44" - }, - { - "moduleId": 15, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\lib\\inflate.js", - "module": "./node_modules/pako/lib/inflate.js", - "moduleName": "./node_modules/pako/lib/inflate.js", - "type": "cjs require", - "userRequest": "./zlib/zstream", - "loc": "9:19-44" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 6, - "source": "'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction ZStream() {\n /* next input byte */\n this.input = null; // JS specific, because we have no pointers\n this.next_in = 0;\n /* number of bytes available at input */\n this.avail_in = 0;\n /* total number of input bytes read so far */\n this.total_in = 0;\n /* next output byte should be put there */\n this.output = null; // JS specific, because we have no pointers\n this.next_out = 0;\n /* remaining free space at output */\n this.avail_out = 0;\n /* total number of bytes output so far */\n this.total_out = 0;\n /* last error message, NULL if no error */\n this.msg = ''/*Z_NULL*/;\n /* not visible by applications */\n this.state = null;\n /* best guess about the data type: binary or text */\n this.data_type = 2/*Z_UNKNOWN*/;\n /* adler32 value of the uncompressed data */\n this.adler = 0;\n}\n\nmodule.exports = ZStream;\n" - }, - { - "id": 7, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\constants.js", - "name": "./node_modules/pako/lib/zlib/constants.js", - "index": 22, - "index2": 16, - "size": 2312, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\pako\\index.js", - "issuerId": 1, - "issuerName": "./node_modules/pako/index.js", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "name": "./node_modules/fast-png/lib-esm/index.js", - "profile": { - "factory": 2180, - "building": 1082 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "name": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "profile": { - "factory": 21, - "building": 92, - "dependencies": 43 - } - }, - { - "id": 1, - "identifier": "F:\\tweb\\node_modules\\pako\\index.js", - "name": "./node_modules/pako/index.js", - "profile": { - "factory": 48, - "building": 7 - } - } - ], - "profile": { - "factory": 11, - "building": 13, - "dependencies": 8 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 1, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\index.js", - "module": "./node_modules/pako/index.js", - "moduleName": "./node_modules/pako/index.js", - "type": "cjs require", - "userRequest": "./lib/zlib/constants", - "loc": "8:16-47" - }, - { - "moduleId": 15, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\lib\\inflate.js", - "module": "./node_modules/pako/lib/inflate.js", - "moduleName": "./node_modules/pako/lib/inflate.js", - "type": "cjs require", - "userRequest": "./zlib/constants", - "loc": "7:19-46" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 5, - "source": "'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nmodule.exports = {\n\n /* Allowed flush values; see deflate() and inflate() below for details */\n Z_NO_FLUSH: 0,\n Z_PARTIAL_FLUSH: 1,\n Z_SYNC_FLUSH: 2,\n Z_FULL_FLUSH: 3,\n Z_FINISH: 4,\n Z_BLOCK: 5,\n Z_TREES: 6,\n\n /* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\n Z_OK: 0,\n Z_STREAM_END: 1,\n Z_NEED_DICT: 2,\n Z_ERRNO: -1,\n Z_STREAM_ERROR: -2,\n Z_DATA_ERROR: -3,\n //Z_MEM_ERROR: -4,\n Z_BUF_ERROR: -5,\n //Z_VERSION_ERROR: -6,\n\n /* compression levels */\n Z_NO_COMPRESSION: 0,\n Z_BEST_SPEED: 1,\n Z_BEST_COMPRESSION: 9,\n Z_DEFAULT_COMPRESSION: -1,\n\n\n Z_FILTERED: 1,\n Z_HUFFMAN_ONLY: 2,\n Z_RLE: 3,\n Z_FIXED: 4,\n Z_DEFAULT_STRATEGY: 0,\n\n /* Possible values of the data_type field (though see inflate()) */\n Z_BINARY: 0,\n Z_TEXT: 1,\n //Z_ASCII: 1, // = Z_TEXT (deprecated)\n Z_UNKNOWN: 2,\n\n /* The deflate compression method */\n Z_DEFLATED: 8\n //Z_NULL: null // Use -1 or null inline, depending on var type\n};\n" - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "index": 0, - "index2": 27, - "size": 1403, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": null, - "issuerId": null, - "issuerName": null, - "issuerPath": null, - "profile": { - "factory": 4, - "building": 3760 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": null, - "moduleIdentifier": null, - "module": null, - "moduleName": null, - "type": "single entry", - "userRequest": "!!F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "loc": "main" - } - ], - "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\nconst webp_1 = require(\"./webp\");\r\nconst ctx = self;\r\nconst tasks = [];\r\n//let isProcessing = false;\r\nfunction finishTask() {\r\n //isProcessing = false;\r\n processTasks();\r\n}\r\nfunction processTasks() {\r\n //if(isProcessing) return;\r\n const task = tasks.shift();\r\n if (!task)\r\n return;\r\n //isProcessing = true;\r\n switch (task.type) {\r\n case 'convertWebp': {\r\n const { fileName, bytes } = task.payload;\r\n let convertedBytes;\r\n try {\r\n convertedBytes = webp_1.webp2png(bytes).bytes;\r\n }\r\n catch (err) {\r\n console.error('Convert webp2png error:', err, 'payload:', task.payload);\r\n }\r\n ctx.postMessage({\r\n type: 'convertWebp',\r\n payload: {\r\n fileName,\r\n bytes: convertedBytes\r\n }\r\n });\r\n finishTask();\r\n break;\r\n }\r\n default:\r\n finishTask();\r\n }\r\n}\r\nfunction scheduleTask(task) {\r\n tasks.push(task);\r\n /* if(task.payload.fileName.indexOf('main-') === 0) {\r\n tasks.push(task);\r\n } else {\r\n tasks.unshift(task);\r\n } */\r\n processTasks();\r\n}\r\nctx.addEventListener('message', (event) => {\r\n scheduleTask(event.data);\r\n});\r\n" - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "index": 1, - "index2": 26, - "size": 1358, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "issuerId": 8, - "issuerName": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - } - ], - "profile": { - "factory": 2933, - "building": 717 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 8, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "module": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "moduleName": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "type": "cjs require", - "userRequest": "./webp", - "loc": "3:15-32" - } - ], - "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.webp2pngAsBlob = exports.webp2png = void 0;\r\nconst libwebp_0_2_0_1 = require(\"../../vendor/libwebp-0.2.0\");\r\nconst fast_png_1 = require(\"fast-png\");\r\nfunction webp2png(data) {\r\n const decoder = new libwebp_0_2_0_1.WebPDecoder();\r\n const config = decoder.WebPDecoderConfig;\r\n const buffer = config.j || config.output;\r\n const bitstream = config.input;\r\n decoder.WebPInitDecoderConfig(config);\r\n decoder.WebPGetFeatures(data, data.length, bitstream);\r\n /** MODE_RGBA = 1 MODE_ARGB = 4, */\r\n buffer.J = 1;\r\n let status;\r\n try {\r\n status = decoder.WebPDecode(data, data.length, config);\r\n }\r\n catch (e) {\r\n status = e;\r\n }\r\n if (status === 0) {\r\n const rgbaData = buffer.Jb;\r\n const pngData = fast_png_1.encode({\r\n data: rgbaData,\r\n width: buffer.width,\r\n height: buffer.height,\r\n channels: 4,\r\n depth: 8,\r\n });\r\n return { status, bytes: pngData };\r\n }\r\n return { status, bytes: data };\r\n}\r\nexports.webp2png = webp2png;\r\nfunction webp2pngAsBlob(data) {\r\n const { status, bytes } = webp2png(data);\r\n return new Blob([bytes], { type: status === 0 ? 'image/png' : 'image/webp' });\r\n}\r\nexports.webp2pngAsBlob = webp2pngAsBlob;\r\n" - }, - { - "id": 10, - "identifier": "F:\\tweb\\src\\vendor\\libwebp-0.2.0.js", - "name": "./src/vendor/libwebp-0.2.0.js", - "index": 2, - "index2": 0, - "size": 119427, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "issuerId": 9, - "issuerName": "./src/lib/webp/webp.ts", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - } - ], - "profile": { - "factory": 2180, - "building": 1082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 9, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "module": "./src/lib/webp/webp.ts", - "moduleName": "./src/lib/webp/webp.ts", - "type": "cjs require", - "userRequest": "../../vendor/libwebp-0.2.0", - "loc": "4:24-61" - } - ], - "usedExports": true, - "providedExports": [ - "WebPDecoder" - ], - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./src/lib/webp/webp.ts (referenced with cjs require)" - ], - "depth": 2, - "source": "// Copyright 2011 Google Inc.\n//\n// This code is licensed under the same terms as WebM:\n// Software License Agreement: http://www.webmproject.org/license/software/\n// Additional IP Rights Grant: http://www.webmproject.org/license/additional/\n// -----------------------------------------------------------------------------\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n// IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// -----------------------------------------------------------------------------\n//\n// Copyright 2011-2013 Dominik Homberger\n// Libwebp Javascript / libwebpjs - the libwebp implementation in javascript (v0.2.0)\n//\n// Author: Dominik Homberger (dominik.homberger@gmail.com)\n\nlet i;\nlet a;\nlet self;\nconst ca = 0;\nconst p = null;\nconst s = 0;\nconst x = 0;\nconst la = s;\nconst E = s;\nconst bb = 0;\nconst Mb = 0;\n\nfunction M(F) {\n return JSON.parse(JSON.stringify(F));\n}\n\nfunction N(F, G, w, D, S) {\n for (i = 0; i < S; ++i) F[G + i] = w[D + i];\n}\n\nfunction Nb(F) {\n const G = [];\n const w = F.length;\n let D;\n for (D = 0; D < w; ++D) G.push(F[D]);\n return G;\n}\n\nfunction ic(F, G) {\n const w = [];\n w.push(M(F));\n let D;\n for (D = 0; D < G; ++D) w.push(M(F));\n w.push(0);\n return w;\n}\n\nfunction rc(F, G) {\n const w = [];\n let D;\n for (D = 0; D < G; ++D) w.push(F);\n w.push(0);\n return w;\n}\n\nfunction memmove(arr1, index1, arr2, index2, length) {\n let i;\n for (i = 0; i < length; i++) {\n arr1[index1 + i] = arr2[index2 + i];\n }\n}\n\nfunction jd(F, G, w, D) {\n let S;\n for (S = 0; S < D; ++S) F[G + S] = w;\n}\n\nfunction kd(F, G, w, D) {\n let S = '';\n let ga;\n for (ga = 0; ga < D; ++ga) S += String.fromCharCode(F[G + ga]);\n return w == S ? 0 : 1;\n}\n\nfunction U(F, G) {\n let w; const\n D = [];\n for (w = 0; w < F; ++w) D.push(G);\n return D;\n}\n\nfunction ld(F, G) {\n let w; const\n D = [];\n for (w = 0; w < F; ++w) D.push(M(G));\n return D;\n}\n\nfunction md(F, G) {\n let w;\n for (w = F.length - 1; w >= 0; --w) G = M(U(F[w], G));\n return G;\n}\n\nfunction $(F) {\n if (!F) throw Error('assert :P');\n}\nexport const WebPDecoder = function () {\n function F(a) {\n return a == Ob || a == Pb || a == Bb || a == Qb;\n }\n\n function G(a) {\n return S(a, 1);\n }\n\n function w(a, b) {\n const c = 1 + ((a.la - 1) * b >> 8);\n const d = c << 8;\n let e = s;\n a.Z >= d ? (e = 1, a.la -= c, a.Z -= d) : (e = 0, a.la = c);\n for (; a.la < 128;) a.Z <<= 1, a.la <<= 1, ++a.gc == 8 && (a.gc = 0, a.bc && (a.Z += a.qa[a.Ia++], a.bc--));\n return e;\n }\n\n function D(a, b, c, d) {\n d -= c;\n d >= 2 ? (a.Z = b[c + 0] << 8 | b[c + 1], a.qa = b, a.Ia = c + 2, a.bc = d - 2) : (a.Z = 0, a.qa = p, a.bc = 0);\n a.la = 255;\n a.gc = 0;\n }\n\n function S(a, b) {\n for (var c = 0, d = s, d = b - 1; d >= 0; d--) c |= w(a, 128) << d;\n return c;\n }\n\n function ga(a, b) {\n const c = S(a, b);\n return G(a) ? -c : c;\n }\n\n function Rb(a, b, c, d) {\n let e = Mb;\n $(a != p);\n $(b != p);\n $(d < 4294967288);\n a.qa = b;\n a.Ia = c;\n a.ya = d;\n a.T = 0;\n a.Q = 0;\n a.g = 0;\n a.L = 0;\n for (e = a.fa = 0; e < 4 && e < a.ya; ++e) a.T |= a.qa[a.Ia + a.Q] << 8 * e, ++a.Q;\n }\n\n function Sb(a) {\n for (; a.g >= 8 && a.Q < a.ya;) a.T >>>= 8, a.T += a.qa[a.Ia + a.Q] << 24 >>> 0, ++a.Q, a.g -= 8;\n }\n\n function Da(a) {\n a.g >= 8 && Sb(a);\n a.Q == a.ya && a.g == 32 && (a.L = 1);\n }\n\n function T(a, b) {\n let c = 0;\n $(b >= 0);\n if (!a.L && b < gf) {\n if (a.Q == a.ya && a.g + b >= 32 && (a.L = 1, a.g + b > 32)) return c;\n c = a.T >> a.g & hf[b];\n a.g += b;\n a.g >= 8 && a.g >= 8 && Sb(a);\n } else a.fa = 1;\n return c;\n }\n\n function ma(a) {\n return a.Pa == a.gb;\n }\n\n function nd(a, b) {\n $(a != p);\n if (b == 0) return 0;\n a.gb = 2 * b - 1;\n a.Y = ld(a.gb, jf);\n if (a.Y == p) return 0;\n a.Y[0].s = -1;\n return a.Pa = 1;\n }\n\n function ja(a) {\n a != p && (a.Y = p, a.Y = p, a.gb = 0, a.Pa = 0);\n }\n\n function jc(a, b, c, d) {\n for (var e = a.Y, g = 0, k = +a.gb; d-- > 0;) {\n if (g >= k) return 0;\n if (e[g].s < 0) {\n if (ma(a)) return 0;\n const h = a;\n const n = h.Y;\n const l = +h.Pa;\n e[g].s = l - g;\n h.Pa += 2;\n n[l + 0].s = -1;\n n[l + 1].s = -1;\n } else if (e[g].s == 0) return 0;\n g += e[g].s + (c >> d & 1);\n }\n if (e[g].s < 0) e[g].s = 0;\n else if (e[g].s != 0) return 0;\n e[g].kc = b;\n return 1;\n }\n\n function od(a, b, c) {\n var d = s;\n let e = 0;\n let g = 0;\n $(a != p);\n $(b != p);\n for (d = 0; d < c; ++d) b[d] > 0 && (++e, g = d);\n if (!nd(a, e)) return 0;\n if (e == 1) return g < 0 || g >= c ? (ja(a), 0) : jc(a, g, 0, 0);\n e = 0;\n g = U(c, s);\n if (g == p) return (e = e && ma(a)) || ja(a), e;\n var k = s;\n var k = s;\n var d = U(Tb + 1, 0);\n let h = s;\n const n = U(Tb + 1, 0);\n let l = 0;\n $(b != p);\n $(c > 0);\n $(g != p);\n for (k = 0; k < c; ++k) b[k] > l && (l = b[k]);\n if (l > Tb) d = 0;\n else {\n for (k = 0; k < c; ++k) ++d[b[k]];\n h = d[0] = 0;\n n[0] = -1;\n for (k = 1; k <= l; ++k) h = h + d[k - 1] << 1, n[k] = h;\n for (k = 0; k < c; ++k) g[k] = b[k] > 0 ? n[b[k]]++ : pd;\n d = 1;\n }\n if (!d) return (e = e && ma(a)) || ja(a), e;\n for (d = 0; d < c; ++d) {\n if (b[d] > 0 && !jc(a, d, g[d], b[d])) {\n return (e = e && ma(a)) || ja(a), e;\n }\n }\n (e = ma(a)) || ja(a);\n return e;\n }\n\n function Ea(a, b, c, d, e, g, k) {\n for (var h = s, h = 0; h < k; ++h) e[g + h] = a[b + h] + c[d + h] & 255;\n }\n\n function qd(a, b, c) {\n const d = a.P.l;\n if (!(c = b < 0 || c < 0 || b + c > a.P.v)) {\n if (c = b == 0) {\n a: {\n let e = a.Ga;\n var g = a.G;\n var k = a.ub;\n c = a.P.l;\n let h = a.P.v;\n const n = a.Xb;\n var l = [p];\n let m = p;\n let f = h * c;\n var q = p;\n var r = p;\n var r = 'WEBP_FILTER_TYPE';\n let u = s;\n var l = s;\n var v = 0;\n let C = s;\n $(c > 0 && h > 0 && d >= c);\n $(e != p && n != p);\n if (k <= Ub) c = 0;\n else if (C = e[g + 0] >> 0 & 3, r = e[g + 0] >> 2 & 3, u = e[g + 0] >> 4 & 3, l = e[g + 0] >> 6 & 3, C < kc || C > kf || r >= lf || u > rd || l != 0) c = 0;\n else {\n if (C == kc) v = k >= f, l = e, m = g + Ub;\n else {\n l = U(f, 0);\n m = 0;\n if (l\n == p) {\n c = 0;\n break a;\n }\n var v = g + Ub;\n var k = k - Ub;\n var g = l;\n var q = M(Vb);\n let A = 0;\n const z = sd();\n z == p ? v = 0 : (z.l = c, z.v = h, z.N = q, td(na), q.put = ud, q.Mb = vd, q.Pb = wd, q.ka = p, q.ka = g, q.fd = 0, q.width = c, q.height = h, z.a = L, Rb(z.o, e, v, k), z.Wa = Cb, Ka(c, h, 1, z, p) && xd(z, c) && (z.Wa = Db, A = lc(z, z.V, z.Ha, z.l, z.v, mf)), z != p && sa(z), v = A);\n }\n if (v) {\n e = nf[r];\n e != p ? (q = U(f, 0), r = 0, q == p && (v = 0, C != kc && (m = l = p)), e(l, m, c, h, 1, c, q, r), f = q, C = r) : (f = l, C = m);\n for (e = 0; h-- > 0;) N(n, e, f, C, c), C += c, e += d;\n u == rd && (v = l == p || m <= 0 || c <= 0 ? 0 : 1);\n }\n c = v;\n }\n }\n c = !c;\n }\n }\n return c ? p : b == 0 ? a.Xb : +b * d;\n }\n\n function of(a) {\n let b = a.width;\n const c = a.height;\n let d = a.J;\n if (b <= 0 || c <= 0 || !(d >= Qa && d < Cc)) return ta;\n if (!a.Fc && a.Jb == p) {\n var e = p;\n var g = 0;\n var k = 0;\n var h = 0;\n var n = 0;\n var e = bb;\n var l = b * yd[d];\n var m = l * c;\n d < ua || (g = parseInt((b + 1) / 2, 10), h = g * parseInt((c + 1) / 2, 10), d == Ra && (k = b, n = k * c));\n e = m + 2 * h + n;\n if (e != e) return ta;\n e = U(e, 205);\n if (e == p) return cb;\n a.Jb = e;\n a.jc = p;\n d < ua ? (b = a.c.RGBA, b.ma = e, b.Sa = p, b.f = l, b.size = m) : (b = a.c.Va, b.y = e, b.D = p, b.F = l, b.Wc = m, b.c = e, b.B = p + m, b.nb = g, b.Rc = h, b.S = e, b.C = p + m + h, b.rb = g, b.Uc = h, d == Ra && (b.p = e, b.q = p + m + 2 * h), b.Wb = n, b.Fa = k);\n }\n d = 1;\n g = a.J;\n k = a.width;\n h = a.height;\n g >= Qa && g < Cc ? g < ua ? (a = a.c.RGBA, d\n &= a.f * h <= a.size, d &= a.f >= k * yd[g], d &= a.ma != p) : (a = a.c.Va, n = a.nb * parseInt((h + 1) / 2, 10), l = a.rb * parseInt((h + 1) / 2, 10), m = a.Fa * h, d &= a.F * h <= a.Wc, d &= n <= a.Rc, d &= l <= a.Uc, d &= m <= a.Wb, d &= a.F >= k, d &= a.nb >= parseInt((k + 1) / 2, 10), d &= a.rb >= parseInt((k + 1) / 2, 10), d &= a.y != p, d &= a.c != p, d &= a.S != p, g == Ra && (d &= a.Fa >= k, d &= m <= a.Wb, d &= a.p != p)) : d = 0;\n return d ? L : ta;\n }\n\n function zd(a, b, c, d) {\n if (d == p || a <= 0 || b <= 0) return ta;\n if (c != p) {\n if (c.Ua) {\n const e = c.wc;\n const g = c.vc;\n const k = c.t & -2;\n const h = c.k & -2;\n if (k < 0 || h < 0 || e <= 0 || g <= 0 || k + e > a || h + g > b) return ta;\n a = e;\n b = g;\n }\n if (c.I) {\n if (c.Ba <= 0\n || c.Aa <= 0) return ta;\n a = c.Ba;\n b = c.Aa;\n }\n }\n d.width = a;\n d.height = b;\n return of(d);\n }\n\n function mb(a) {\n return !(a & -256) ? a : a < 0 ? 0 : 255;\n }\n\n function Ad(a, b, c, d) {\n const e = U(16, 0);\n let g;\n g = 0;\n let k;\n for (k = 0; k < 4; ++k) {\n var h = a[b + 0] + a[b + 8];\n var n = a[b + 0] - a[b + 8];\n var l = (a[b + 4] * Wb >> 16) - (a[b + 12] * Xb >> 16);\n var m = (a[b + 4] * Xb >> 16) + (a[b + 12] * Wb >> 16);\n e[g + 0] = h + m;\n e[g + 1] = n + l;\n e[g + 2] = n - l;\n e[g + 3] = h - m;\n g += 4;\n b++;\n }\n for (k = g = 0; k < 4; ++k) {\n a = e[g + 0] + 4, h = a + e[g + 8], n = a - e[g + 8], l = (e[g + 4] * Wb >> 16) - (e[g + 12] * Xb >> 16), m = (e[g + 4] * Xb >> 16) + (e[g + 12] * Wb >> 16), c[d + 0 + 0 * f] = mb(c[d + 0 + 0 * f] + (h + m >> 3)), c[d + 1 + 0 * f] = mb(c[d\n + 1 + 0 * f] + (n + l >> 3)), c[d + 2 + 0 * f] = mb(c[d + 2 + 0 * f] + (n - l >> 3)), c[d + 3 + 0 * f] = mb(c[d + 3 + 0 * f] + (h - m >> 3)), g++, d += f;\n }\n }\n\n function pf(a, b, c, d, e) {\n Ad(a, b, c, d);\n e && Ad(a, b + 16, c, d + 4);\n }\n\n function qf(a, b, c, d) {\n mc(a, b + 0, c, d + 0, 1);\n mc(a, b + 32, c, d + 4 * f, 1);\n }\n\n function nc(a, b, c, d) {\n a = a[b + 0] + 4;\n let e;\n for (e = 0; e < 4; ++e) for (b = 0; b < 4; ++b) c[d + b + e * f] = mb(c[d + b + e * f] + (a >> 3));\n }\n\n function rf(a, b, c, d) {\n a[b + 0] && nc(a, b + 0, c, d + 0);\n a[b + 16] && nc(a, b + 16, c, d + 4);\n a[b + 32] && nc(a, b + 32, c, d + 4 * f);\n a[b + 48] && nc(a, b + 48, c, d + 4 * f + 4);\n }\n\n function Dc(a, b, c) {\n const d = b - f;\n const e = oa;\n const g = 255 - a[d - 1];\n let k;\n for (k = 0; k\n < c; ++k) {\n const h = e;\n const n = g + a[b - 1];\n var l;\n for (l = 0; l < c; ++l) a[b + l] = h[n + a[d + l]];\n b += f;\n }\n }\n\n function Yb(a, b, c) {\n let d;\n for (d = 0; d < 16; ++d) for (i = 0; i < 16; ++i) b[c + d * f + i] = a;\n }\n\n function y(a, b, c) {\n return a + 2 * b + c + 2 >> 2;\n }\n\n function Zb(a, b, c) {\n let d; let\n e;\n for (d = 0; d < 8; ++d) for (e = 0; e < 8; ++e) b[c + e + d * f] = a;\n }\n\n function nb(a, b, c) {\n const d = a[b - c];\n const e = a[b + 0];\n const g = 3 * (e - d) + sc[1020 + a[b - 2 * c] - a[b + c]];\n const k = oc[112 + (g + 4 >> 3)];\n a[b - c] = oa[255 + d + oc[112 + (g + 3 >> 3)]];\n a[b + 0] = oa[255 + e - k];\n }\n\n function Bd(a, b, c, d) {\n const e = a[b + 0];\n const g = a[b + c];\n return va[255 + a[b - 2 * c] - a[b - c]] > d || va[255 + g - e] > d;\n }\n\n function Cd(a,\n b, c, d, e) {\n const g = a[b - 3 * c];\n const k = a[b - 2 * c];\n const h = a[b - c];\n const n = a[b + 0];\n const l = a[b + c];\n const m = a[b + 2 * c];\n const f = a[b + 3 * c];\n return 2 * va[255 + h - n] + tc[255 + k - l] > d ? 0 : va[255 + a[b - 4 * c] - g] <= e && va[255 + g - k] <= e && va[255 + k - h] <= e && va[255 + f - m] <= e && va[255 + m - l] <= e && va[255 + l - n] <= e;\n }\n\n function Dd(a, b, c, d) {\n let e;\n for (e = 0; e < 16; ++e) 2 * va[255 + a[b + e - c] - a[b + e + 0]] + tc[255 + a[b + e - 2 * c] - a[b + e + c]] <= d && nb(a, b + e, c);\n }\n\n function Ed(a, b, c, d) {\n let e;\n for (e = 0; e < 16; ++e) 2 * va[255 + a[b + e * c - 1] - a[b + e * c + 0]] + tc[255 + a[b + e * c - 2] - a[b + e * c + 1]] <= d && nb(a, b + e * c, 1);\n }\n\n function sf(a, b, c, d) {\n let e;\n for (e = 3; e > 0; --e) {\n b\n += 4 * c, Dd(a, b + 0, c, d);\n }\n }\n\n function tf(a, b, c, d) {\n let e;\n for (e = 3; e > 0; --e) b += 4, Ed(a, b + 0, c, d);\n }\n\n function Fa(a, b, c, d, e, g, k, h) {\n for (; e-- > 0;) {\n if (Cd(a, b + 0, c, g, k)) {\n if (Bd(a, b + 0, c, h)) nb(a, b + 0, c);\n else {\n const n = a;\n const l = b + 0;\n const m = c;\n const f = n[l - 2 * m];\n const q = n[l - m];\n const r = n[l + 0];\n const u = n[l + m];\n const v = n[l + 2 * m];\n var C = sc[1020 + 3 * (r - q) + sc[1020 + f - u]];\n const A = 27 * C + 63 >> 7;\n const z = 18 * C + 63 >> 7;\n var C = 9 * C + 63 >> 7;\n n[l - 3 * m] = oa[255 + n[l - 3 * m] + C];\n n[l - 2 * m] = oa[255 + f + z];\n n[l - m] = oa[255 + q + A];\n n[l + 0] = oa[255 + r - A];\n n[l + m] = oa[255 + u - z];\n n[l + 2 * m] = oa[255 + v - C];\n }\n }\n b += d;\n }\n }\n\n function Ga(a, b, c, d, e, g, k, h) {\n for (; e-- > 0;) {\n if (Cd(a, b + 0, c,\n g, k)) {\n if (Bd(a, b + 0, c, h)) nb(a, b + 0, c);\n else {\n const n = a;\n const l = b + 0;\n const m = c;\n const f = n[l - m];\n const q = n[l + 0];\n const r = n[l + m];\n var u = 3 * (q - f);\n const v = oc[112 + (u + 4 >> 3)];\n var u = oc[112 + (u + 3 >> 3)];\n const C = v + 1 >> 1;\n n[l - 2 * m] = oa[255 + n[l - 2 * m] + C];\n n[l - m] = oa[255 + f + u];\n n[l + 0] = oa[255 + q - v];\n n[l + m] = oa[255 + r - C];\n }\n }\n b += d;\n }\n }\n\n function uf(a, b, c, d, e, g) {\n Fa(a, b + 0, c, 1, 16, d, e, g);\n }\n\n function vf(a, b, c, d, e, g) {\n Fa(a, b + 0, 1, c, 16, d, e, g);\n }\n\n function wf(a, b, c, d, e, g) {\n let k;\n for (k = 3; k > 0; --k) b += 4 * c, Ga(a, b + 0, c, 1, 16, d, e, g);\n }\n\n function xf(a, b, c, d, e, g) {\n let k;\n for (k = 3; k > 0; --k) b += 4, Ga(a, b + 0, 1, c, 16, d, e, g);\n }\n\n function yf(a, b, c, d, e,\n g, k, h) {\n Fa(a, b, e, 1, 8, g, k, h);\n Fa(c, d, e, 1, 8, g, k, h);\n }\n\n function zf(a, b, c, d, e, g, k, h) {\n Fa(a, b, 1, e, 8, g, k, h);\n Fa(c, d, 1, e, 8, g, k, h);\n }\n\n function Af(a, b, c, d, e, g, k, h) {\n Ga(a, b + 4 * e, e, 1, 8, g, k, h);\n Ga(c, d + 4 * e, e, 1, 8, g, k, h);\n }\n\n function Bf(a, b, c, d, e, g, k, h) {\n Ga(a, b + 4, 1, e, 8, g, k, h);\n Ga(c, d + 4, 1, e, 8, g, k, h);\n }\n\n function Fd(a, b) {\n return b == $b ? a.i == 0 ? a.d == 0 ? Cf : Df : a.d == 0 ? Ef : $b : b;\n }\n\n function Ec(a, b, c, d) {\n for (i = 0; i < 4; ++i) a[b + i] = c[d + i];\n }\n\n function wa(a, b) {\n return a < 0 ? 0 : a > b ? b : a;\n }\n\n function Gd(a) {\n a.a = 'VP8_STATUS_OK';\n a.xc = 'OK';\n }\n\n function td(a) {\n a >>> 8 != na >>> 8 && alert('mismatch error');\n }\n\n function Y(a, b, c) {\n a.a == L && (a.a = b, a.xc = c, a.za = 0);\n // alert(b + \": \" + c);\n return 0;\n }\n\n function Hd(a, b) {\n let c = [0];\n let d = x;\n var e = [Mb];\n var g = M(Id);\n var k = M(Jd);\n let h = M(Fc);\n var e = 'VP8StatusCode';\n var g = M(Gc);\n if (a == p) return alert('(dec == null)'), 0;\n Gd(a);\n if (b == p) return Y(a, 'VP8_STATUS_INVALID_PARAM', 'null VP8Io passed to VP8GetHeaders()');\n g.data = b.data;\n g.b = b.b;\n g.e = b.e;\n g.b = [g.b];\n g.e = [g.e];\n g = [g];\n e = Kd(g);\n if (e != L) return Y(a, e, 'Incorrect/incomplete header.');\n g = g[0];\n g.b = g.b[0];\n g.e = g.e[0];\n if (g.ia) return Y(a, W, 'Unexpected lossless format encountered.');\n a.Ga == p && ($(a.ub == 0), a.Ga = g.$, a.G = g.G, a.ub = g.pa);\n d = g.data;\n c = g.b + g.offset;\n e = g.e - g.offset;\n $(g.e >= g.offset);\n if (e[0] < 4) return Y(a, Z, 'Truncated header.');\n h = d[c + 0] | d[c + 1] << 8 | d[c + 2] << 16;\n g = a.Ac;\n g.fb = !(h & 1) + 0;\n g.Jc = h >> 1 & 7;\n g.Nc = h >> 4 & 1;\n g.Ra = h >> 5;\n if (g.Jc > 3) return Y(a, 'VP8_STATUS_BITSTREAM_ERROR', 'Incorrect keyframe parameters.');\n if (!g.Nc) return Y(a, 'VP8_STATUS_UNSUPPORTED_FEATURE', 'Frame not displayable.');\n c += 3;\n e -= 3;\n k = a.P;\n if (g.fb) {\n if (e < 7) return Y(a, 'VP8_STATUS_NOT_ENOUGH_DATA', 'cannot parse picture header');\n if (!(e\n >= 3 && d[c + 0] == 157 && d[c + 1] == 1 && d[c + 2] == 42)) return Y(a, 'VP8_STATUS_BITSTREAM_ERROR', 'Bad code word');\n k.l = (d[c + 4] << 8 | d[c + 3]) & 16383;\n k.gd = d[c + 4] >> 6;\n k.v = (d[c + 6] << 8 | d[c + 5]) & 16383;\n k.hd = d[c + 6] >> 6;\n c += 7;\n e -= 7;\n a.Ma = k.l + 15 >> 4;\n a.hb = k.v + 15 >> 4;\n b.width = k.l;\n b.height = k.v;\n b.I = 0;\n b.Ua = 0;\n b.k = 0;\n b.t = 0;\n b.Ka = b.width;\n b.K = b.height;\n b.m = b.width;\n b.h = b.height;\n h = a.R;\n for (i = 0; i < h.Ta.length; ++i) h.Ta[i] = 255;\n h.z = M(Ff);\n h = a.Ca;\n $(h != p);\n h.pb = 0;\n h.ob = 0;\n h.tb = 1;\n for (i = 0; i < h.Kb.length; ++i) h.Kb[i] = 0;\n for (i = 0; i < h.Cb.length; ++i) h.Cb[i] = 0;\n a.Lb = 0;\n }\n if (g.Ra\n > e) return Y(a, 'VP8_STATUS_NOT_ENOUGH_DATA', 'bad partition length');\n h = a.o;\n D(h, d, c, c + g.Ra);\n c += g.Ra;\n e -= g.Ra;\n g.fb && (k.uc = G(h), k.$c = G(h));\n var k = h;\n var n = a.Ca;\n let l = a.R;\n $(k != p);\n $(n != p);\n n.pb = G(k);\n if (n.pb) {\n n.ob = G(k);\n if (G(k)) {\n var m;\n n.tb = G(k);\n for (m = 0; m < xa; ++m) n.Kb[m] = G(k) ? ga(k, 7) : 0;\n for (m = 0; m < xa; ++m) n.Cb[m] = G(k) ? ga(k, 6) : 0;\n }\n if (n.ob) for (m = 0; m < Ld; ++m) l.Ta[m] = G(k) ? S(k, 8) : 255;\n } else n.ob = 0;\n if (k.Ab) return Y(a, 'VP8_STATUS_BITSTREAM_ERROR', 'cannot parse segment header');\n k = h;\n n = a.ga;\n n.Oc = G(k);\n n.Fb = S(k, 6);\n n.kb = S(k, 3);\n n.oc = G(k);\n if (n.oc\n && G(k)) {\n for (l = 0; l < Hc; ++l) G(k) && (n.Lc[l] = ga(k, 6));\n for (l = 0; l < Gf; ++l) G(k) && (n.Gc[l] = ga(k, 6));\n }\n a.A = n.Fb == 0 ? 0 : n.Oc ? 1 : 2;\n if (a.A > 0) {\n if (a.Ca.pb) for (l = 0; l < xa; ++l) m = a.Ca.Cb[l], a.Ca.tb || (m += n.Fb), a.Zb[l] = m;\n else a.Zb[0] = n.Fb;\n }\n if (k.Ab) return Y(a, 'VP8_STATUS_BITSTREAM_ERROR', 'cannot parse filter header');\n var k = d;\n var f = c;\n var n = f;\n var e = f + e;\n m = 0;\n let q = s;\n let r = s;\n a.Hb = 1 << S(a.o, 2);\n q = a.Hb - 1;\n l = k;\n m = f + 3 * q;\n if (e < m) e = 'VP8_STATUS_NOT_ENOUGH_DATA';\n else {\n for (r = 0; r < q; ++r) {\n var f = l;\n var u = m + (k[n + 0] | k[n + 1] << 8 | k[n + 2] << 16);\n u > e && (f = k);\n D(a.ic[+r], l, m, u);\n l = f;\n m = u;\n n += 3;\n }\n D(a.ic[+q], l, m, e);\n e = m < e ? 'VP8_STATUS_OK' : 'VP8_STATUS_SUSPENDED';\n }\n if (e != 'VP8_STATUS_OK') return Y(a, 'VP8_STATUS_BITSTREAM_ERROR', 'cannot parse partitions');\n q = a.o;\n e = S(q, 7);\n k = G(q) ? ga(q, 4) : 0;\n n = G(q) ? ga(q, 4) : 0;\n l = G(q) ? ga(q, 4) : 0;\n m = G(q) ? ga(q, 4) : 0;\n q = G(q) ? ga(q, 4) : 0;\n r = a.Ca;\n f = s;\n for (f = 0; f < xa; ++f) {\n u = s;\n if (r.pb) u = r.Kb[f], r.tb || (u += e);\n else if (f > 0) {\n a.yb[f] = a.yb[0];\n continue;\n } else u = e;\n const v = a.yb[f];\n v.sc[0] = Ic[wa(u + k, 127)];\n v.sc[1] = Jc[wa(u + 0, 127)];\n v.sb[0] = 2 * Ic[wa(u + n, 127)];\n v.sb[1] = 101581 * Jc[wa(u + l, 127)] >> 16;\n v.sb[1] < 8\n && (v.sb[1] = 8);\n v.qc[0] = Ic[wa(u + m, 117)];\n v.qc[1] = Jc[wa(u + q, 127)];\n }\n if (g.fb) a.Zc = 259;\n else return Y(a, Hf, 'Not a key frame.');\n G(h);\n e = a.R;\n for (k = 0; k < Md; ++k) for (n = 0; n < Nd; ++n) for (l = 0; l < Kc; ++l) for (m = 0; m < Lc; ++m) w(h, If[k][n][l][m]) && (e.z[k][n][l][m] = S(h, 8));\n a.pc = G(h);\n a.pc && (a.Pc = S(h, 8));\n if (a.P.uc) {\n c -= 8;\n h = Mb;\n if (g.Ra < 8 || d[c + 8 - 1] != 1) return Y(a, W, 'RIFF: Inconsistent extra information.');\n h = d[c + 0] << 0 | d[c + 1] << 8 | d[c + 2] << 16;\n a.fc = h;\n a.dd = p;\n a.cd = d[c + 3];\n }\n return a.za = 1;\n }\n\n function Mc(a, b, c, d, e, g) {\n let k = b[e][c];\n if (!w(a, k[0])) return 0;\n for (;;) {\n ++e;\n if (w(a, k[1])) {\n var h;\n if (w(a, k[2])) {\n if (w(a, k[3])) {\n if (w(a, k[6])) {\n h = x;\n c = w(a, k[8]);\n k = w(a, k[9 + c]);\n k = 2 * c + k;\n c = 0;\n h = Jf[k];\n var n;\n for (n = 0; n < h.length - 1; ++n) c += c + w(a, h[n]);\n c += 3 + (8 << k);\n } else w(a, k[7]) ? (c = 7 + 2 * w(a, 165), c += w(a, 145)) : c = 5 + w(a, 159);\n } else c = w(a, k[4]) ? 3 + w(a, k[5]) : 2;\n k = b[Nc[e]][2];\n } else k = b[Nc[e]][1], c = 1;\n h = Kf[e - 1];\n g[g[g.length - 1] + h] = (w(a, 128) ? -c : c) * d[(h > 0) + 0];\n if (e == 16 || !w(a, k[0])) return e;\n } else k = b[Nc[e]][0];\n if (e == 16) return 16;\n }\n }\n\n function ob(a, b) {\n return ((16777216 * a[0] + 65536 * a[1] + 256 * a[2] + 1 * a[3]) * Lf\n & 4278190080) >> b;\n }\n\n function Mf(a, b) {\n let c = 0;\n if (a == p) return 0;\n if (b == p) return Y(a, 'VP8_STATUS_INVALID_PARAM', 'NULL VP8Io parameter in VP8Decode().');\n if (!a.za && !Hd(a, b)) return 0;\n $(a.za);\n let d;\n if (b.Mb && !b.Mb(b)) Y(a, Nf, 'Frame setup failed'), d = a.a;\n else {\n b.Za && (a.A = 0);\n const e = uc[a.A];\n a.A == 2 ? (a.lb = 0, a.mb = 0) : (a.lb = b.t - e >> 4, a.mb = b.k - e >> 4, a.lb < 0 && (a.lb = 0), a.mb < 0 && (a.mb = 0));\n a.Ya = b.K + 15 + e >> 4;\n a.wb = b.Ka + 15 + e >> 4;\n a.wb > a.Ma && (a.wb = a.Ma);\n a.Ya > a.hb && (a.Ya = a.hb);\n d = L;\n }\n if (c = d == L) {\n if (c) {\n let g;\n b: {\n a.Ja = 0;\n if (a.qb) {\n const k = a.rc;\n if (!WebPWorkerReset(k)) {\n g = Y(a, cb, 'thread initialization failed.');\n break b;\n }\n k.Qd = a;\n k.Rd = a.oa.N;\n k.Ud = FinishRow;\n a.jb = a.A > 0 ? Od : Od - 1;\n } else a.jb = Of;\n g = 1;\n }\n let h;\n if (!(h = !g)) {\n let n;\n b: {\n const l = a.jb;\n const m = a.Ma;\n const t = 4 * m;\n const q = 32 * m;\n const r = m + 1;\n const u = a.A > 0 ? m * (a.qb ? 2 : 1) : 0;\n const v = Pf;\n const C = q * (16 * l + parseInt(3 * uc[a.A] / 2, 10));\n const A = a.Ga != p ? a.P.l * a.P.v : 0;\n const z = t + q + r + u + v + 384 + C + A + Pd;\n if (z != z) n = 0;\n else {\n if (z > a.Gb) {\n a.ib = 0;\n a.Gb = 0;\n if (a.ib == p) {\n n = Y(a, 'VP8_STATUS_OUT_OF_MEMORY', 'no memory during frame initialization.');\n break b;\n }\n a.Gb = z;\n }\n a.dc = 205;\n a.Xc = rc(205, 16 * m);\n a.Sc = rc(205, 8 * m);\n a.Vc = rc(205, 8 * m);\n a.M = u ? ic(Oc, u) : p;\n a.Sd = u ? 0 : p;\n a.oa.ha = 0;\n a.oa.M = a.M;\n $((v & Pd) == 0);\n a.Ea = rc(205, 1 * v);\n a.z = -12851;\n a.H = 16 * m;\n a.r = 8 * m;\n const Ha = uc[a.A];\n const G = Ha * a.H;\n const y = Ha / 2 * a.r;\n a.ca = U(C, 205);\n a.da = +G;\n a.aa = a.ca;\n a.ba = a.da + 16 * l * a.H + y;\n a.ra = a.aa;\n a.sa = a.ba + 8 * l * a.r + y;\n a.Xb = A ? U(A, x) : p;\n a.La = ic(Qd, r);\n a.dc = rc($b, t);\n n = 1;\n }\n }\n h = !n;\n }\n if (h) c = 0;\n else {\n b.width = a.P.l;\n b.height = a.P.v;\n b.w = 0;\n b.y = a.ca;\n b.D = a.da;\n b.c = a.aa;\n b.B = a.ba;\n b.S = a.ra;\n b.C = a.sa;\n b.F = a.H;\n b.Da = a.r;\n b.p = p;\n b.q = p;\n if (!Rd) {\n let B;\n for (B = -255; B <= 255; ++B) va[255 + B] = B < 0 ? -B : B, tc[255 + B] = va[255 + B] >> 1;\n for (B = -1020; B\n <= 1020; ++B) sc[1020 + B] = B < -128 ? -128 : B > 127 ? 127 : B;\n for (B = -112; B <= 112; ++B) oc[112 + B] = B < -16 ? -16 : B > 15 ? 15 : B;\n for (B = -255; B <= 510; ++B) oa[255 + B] = B < 0 ? 0 : B > 255 ? 255 : B;\n Rd = 1;\n }\n mc = pf;\n Pc = qf;\n Qc = nc;\n Rc = rf;\n Sd = uf;\n Td = vf;\n Ud = yf;\n Vd = zf;\n Wd = wf;\n Xd = xf;\n Yd = Af;\n Zd = Bf;\n $d = Dd;\n ae = Ed;\n be = sf;\n ce = tf;\n c = 1;\n }\n }\n if (c) {\n a: {\n for (a.d = 0; a.d < a.Ya; ++a.d) {\n const Qf = a.ic[a.d & a.Hb - 1];\n const db = a;\n const F = db.La[0];\n F.X = 0;\n F.ua = 0;\n jd(db.cc, 0, $b, db.cc.length);\n db.W = (db.A > 0 && db.d >= db.mb && db.d <= db.Ya) + 0;\n for (a.i = 0; a.i < a.Ma; a.i++) {\n var D;\n const H = a;\n const T = Qf;\n const ya = H.o;\n const S = H.La[0];\n const J = H.La[1 + H.i];\n H.Ca.ob && (H.Lb = !w(ya,\n H.R.Ta[0]) ? 0 + w(ya, H.R.Ta[1]) : 2 + w(ya, H.R.Ta[2]));\n J.Nb = H.pc ? w(ya, H.Pc) : 0;\n const O = H.dc;\n O[O.length - 1] = 0 + 4 * H.i;\n const Sc = H.cc;\n H.wa = !w(ya, 145);\n if (H.wa) {\n for (var ga = H.Eb, ja = 0, Z = ca, Z = 0; Z < 4; ++Z) {\n var V = Sc[Z];\n var R;\n for (R = 0; R < 4; ++R) {\n const ta = Rf[O[O[O.length - 1] + R]][V];\n var za = 0;\n do za = Sf[2 * za + w(ya, ta[za])]; while (za > 0);\n V = -za;\n O[O[O.length - 1] + R] = V;\n ga[ja] = V;\n ja++;\n }\n Sc[Z] = V;\n }\n } else {\n var V = w(ya, 156) ? w(ya, 128) ? de : ee : w(ya, 163) ? fe : ge;\n H.Eb[0] = V;\n for (za = 0; za < 4; ++za) O[za + O[O.length - 1]] = V;\n for (za = 0; za < 4; ++za) Sc[za] = V;\n }\n H.Tc = !w(ya, 142) ? ge : !w(ya, 114) ? fe\n : w(ya, 183) ? de : ee;\n if (ya.Ab) D = 0;\n else {\n if (J.Nb) S.X = J.X = 0, H.wa || (S.ua = J.ua = 0), H.ja = 0, H.Oa = 0;\n else {\n let ia = ca;\n let ka = ca;\n var sa = ca;\n var wa = Tf;\n const Aa = H.yb[H.Lb];\n var aa = H.z;\n const ma = H.La[0];\n const ua = U(4, 0);\n const xa = U(4, 0);\n let ea = U(4, 0);\n let pb = U(4, 0);\n let na = 0;\n let Ba = 0;\n var pa = ca;\n let qa = ca;\n let Sa = ca;\n var aa = rc(0, 384);\n if (H.wa) sa = 0, wa = H.R.z[3];\n else {\n const ab = U(16, 0);\n var Ca = J.ua + ma.ua;\n J.ua = ma.ua = (Mc(T, H.R.z[1], Ca, Aa.sb, 0, ab) > 0) + 0;\n for (var sa = 1, wa = H.R.z[0], qb = ab, Ta = aa, La = U(16, s), X = s, X = 0; X < 4; ++X) {\n var Da = qb[0 + X] + qb[12 + X];\n var Ea = qb[4 + X] + qb[8 + X];\n var Fa = qb[4 + X] - qb[8 + X];\n var Ga = qb[0 + X] - qb[12 + X];\n La[0 + X] = Da + Ea;\n La[8\n + X] = Da - Ea;\n La[4 + X] = Ga + Fa;\n La[12 + X] = Ga - Fa;\n }\n for (X = 0; X < 4; ++X) {\n const Oa = Ta[Ta.length - 1];\n const lb = La[0 + 4 * X] + 3;\n var Da = lb + La[3 + 4 * X];\n var Ea = La[1 + 4 * X] + La[2 + 4 * X];\n var Fa = La[1 + 4 * X] - La[2 + 4 * X];\n var Ga = lb - La[3 + 4 * X];\n Ta[Oa + 0] = Da + Ea >> 3;\n Ta[Oa + 16] = Ga + Fa >> 3;\n Ta[Oa + 32] = Da - Ea >> 3;\n Ta[Oa + 48] = Ga - Fa >> 3;\n Ta[Ta.length - 1] += 64;\n }\n aa[aa.length - 1] = 0;\n }\n ea = Nb(vc[J.X & 15]);\n pb = Nb(vc[ma.X & 15]);\n for (qa = 0; qa < 4; ++qa) {\n for (var Eb = pb[qa], pa = 0; pa < 4; ++pa) {\n var Ca = Eb + ea[pa];\n var Ka = Mc(T, wa, Ca, Aa.sc, sa, aa);\n ea[pa] = Eb = (Ka > 0) + 0;\n xa[pa] = (aa[aa[aa.length - 1] + 0] != 0) + 0;\n ua[pa] = (Ka > 1) + 0;\n aa[aa.length\n - 1] += 16;\n }\n pb[qa] = Eb;\n Ba |= ob(xa, 24 - 4 * qa);\n na |= ob(ua, 24 - 4 * qa);\n }\n ia = ob(ea, 24);\n ka = ob(pb, 24);\n ea = Nb(vc[J.X >> 4]);\n pb = Nb(vc[ma.X >> 4]);\n for (Sa = 0; Sa < 4; Sa += 2) {\n for (qa = 0; qa < 2; ++qa) {\n Eb = pb[Sa + qa];\n for (pa = 0; pa < 2; ++pa) Ca = Eb + ea[Sa + pa], Ka = Mc(T, H.R.z[2], Ca, Aa.qc, 0, aa), ea[Sa + pa] = Eb = (Ka > 0) + 0, xa[2 * qa + pa] = (aa[aa[aa.length - 1] + 0] != 0) + 0, ua[2 * qa + pa] = (Ka > 1) + 0, aa[aa.length - 1] += 16;\n pb[Sa + qa] = Eb;\n }\n Ba |= ob(xa, 8 - 2 * Sa);\n na |= ob(ua, 8 - 2 * Sa);\n }\n ia |= ob(ea, 20);\n ka |= ob(pb, 20);\n J.X = ia;\n ma.X = ka;\n H.z = aa;\n H.Oa = na + 0;\n H.ja = na | Ba;\n J.Nb = !H.ja + 0;\n }\n D = !T.Ab;\n }\n if (!D) {\n c = Y(a, 'VP8_STATUS_NOT_ENOUGH_DATA',\n `Premature end-of-file encountered.${a.i} ${a.d}`);\n break a;\n }\n const P = a;\n const da = P.Ea;\n const Ma = Tc;\n const Ua = P.Ea;\n const Va = Uc;\n const Wa = P.Ea;\n const Xa = he;\n if (P.i > 0) {\n for (var ba = ca, ba = -1; ba < 16; ++ba) Ec(da, Ma + ba * f - 4, da, Ma + ba * f + 12);\n for (ba = -1; ba < 8; ++ba) Ec(Ua, Va + ba * f - 4, Ua, Va + ba * f + 4), Ec(Wa, Xa + ba * f - 4, Wa, Xa + ba * f + 4);\n } else {\n for (ba = 0; ba < 16; ++ba) da[Ma + ba * f - 1] = 129;\n for (ba = 0; ba < 8; ++ba) Ua[Va + ba * f - 1] = 129, Wa[Xa + ba * f - 1] = 129;\n P.d > 0 && (da[Ma - 1 - f] = Ua[Va - 1 - f] = Wa[Xa - 1 - f] = 129);\n }\n const Qa = P.Xc;\n const Ra = 16 * +P.i;\n const mb = P.Sc;\n const vb = 8 * +P.i;\n const wb = P.Vc;\n const xb = 8 * +P.i;\n const Za = P.z;\n let fa = ca;\n if (P.d > 0) {\n N(da, Ma - f, Qa, Ra,\n 16), N(Ua, Va - f, mb, vb, 8), N(Wa, Xa - f, wb, xb, 8);\n } else if (P.i == 0) {\n for (i = 0; i < 21; ++i) da[Ma - f - 1 + i] = 127;\n for (i = 0; i < 9; ++i) Ua[Va - f - 1 + i] = 127;\n for (i = 0; i < 9; ++i) Wa[Xa - f - 1 + i] = 127;\n }\n if (P.wa) {\n const Ya = Ma - f + 16;\n P.d > 0 && (P.i >= P.Ma - 1 ? da[Ya + 0] = da[Ya + 1] = da[Ya + 2] = da[Ya + 3] = Qa[Ra + 15] : N(da, Ya + 0, Qa, Ra + 16, 4));\n for (let Fb = 0; Fb < 4; ++Fb) da[Fb + Ya + 4 * f] = da[Fb + Ya + 4 * f] = da[Fb + Ya + 8 * f] = da[Fb + Ya + 12 * f] = da[Fb + Ya + 0];\n for (fa = 0; fa < 16; fa++) {\n var ac = da;\n var bc = Ma + ie[fa];\n Uf[P.Eb[fa]](ac, bc);\n P.Oa & 1 << fa ? mc(Za, 16 * +fa, ac, bc, 0) : P.ja & 1 << fa && Qc(Za, 16 * +fa, ac, bc);\n }\n } else {\n var $a = Fd(P, P.Eb[0]);\n Vf[$a](da, Ma);\n if (P.ja) for (fa = 0; fa < 16; fa++) ac = da, bc = Ma + ie[fa], P.Oa & 1 << fa ? mc(Za, 16 * +fa, ac, bc, 0) : P.ja & 1 << fa && Qc(Za, 16 * +fa, ac, bc);\n }\n $a = Fd(P, P.Tc);\n je[$a](Ua, Va);\n je[$a](Wa, Xa);\n if (P.ja & 983040) {\n const zb = P.z;\n var Pa = 256;\n P.Oa & 983040 ? Pc(zb, Pa, Ua, Va) : Rc(zb, Pa, Ua, Va);\n }\n if (P.ja & 15728640) {\n const Ab = P.z;\n var Pa = 320;\n P.Oa & 15728640 ? Pc(Ab, Pa, Wa, Xa) : Rc(Ab, Pa, Wa, Xa);\n }\n P.d < P.hb - 1 && (N(Qa, Ra, da, Ma + 15 * f, 16), N(mb, vb, Ua, Va + 7 * f, 8), N(wb, xb, Wa, Xa + 7 * f, 8));\n const Q = a;\n if (Q.A > 0) {\n const kb = Q.M[1 + Q.i];\n const Kb = Q.La[1 + Q.i].Nb;\n let ha = Q.Zb[Q.Lb];\n Q.ga.oc && (ha\n += Q.ga.Lc[0], Q.wa && (ha += Q.ga.Gc[0]));\n ha = ha < 0 ? 0 : ha > 63 ? 63 : ha;\n kb.zc = ha;\n Q.ga.kb > 0 && (ha = Q.ga.kb > 4 ? ha >> 2 : ha >> 1, ha > 9 - Q.ga.kb && (ha = 9 - Q.ga.kb));\n kb.yc = ha < 1 ? 1 : ha;\n kb.ab = (!Kb || Q.wa) + 0;\n }\n for (var Ia = ca, Bb = 8 * Q.Ja * Q.r, Qb = Q.ca, Ub = Q.da + 16 * Q.i + 16 * Q.Ja * Q.H, Wb = Q.aa, Xb = Q.ba + 8 * Q.i + Bb, Yb = Q.ra, Zb = Q.sa + 8 * Q.i + Bb, Ia = 0; Ia < 16; ++Ia) N(Qb, Ub + Ia * Q.H, Q.Ea, +Tc + Ia * f, 16);\n for (Ia = 0; Ia < 8; ++Ia) N(Wb, Xb + Ia * Q.r, Q.Ea, +Uc + Ia * f, 8), N(Yb, Zb + Ia * Q.r, Q.Ea, +he + Ia * f, 8);\n }\n const K = a;\n const I = b;\n var cc = 1;\n const eb = K.oa;\n if (K.qb) {\n const nb = K.rc;\n var cc = cc & WebPWorkerSync(nb);\n $(nb.a == OK);\n if (cc) {\n eb.N = I;\n eb.ha = K.Ja;\n eb.d = K.d;\n eb.W = K.W;\n if (eb.W) {\n const hc = eb.M;\n eb.M = K.M;\n K.M = hc;\n }\n WebPWorkerLaunch(nb);\n ++K.Ja == K.jb && (K.Ja = 0);\n }\n } else {\n eb.d = K.d;\n eb.W = K.W;\n b: {\n let Hb = 1;\n const rb = K.oa;\n const ib = uc[K.A];\n const yb = ib * K.H;\n const dc = parseInt(ib / 2) * K.r;\n const Ib = 16 * rb.ha * K.H;\n const jb = 8 * rb.ha * K.r;\n const Jb = K.ca;\n const Lb = K.da - yb + Ib;\n const Ob = K.aa;\n const Pb = K.ba - dc + jb;\n const Rb = K.ra;\n const Sb = K.sa - dc + jb;\n const jc = rb.d == 0;\n const Tb = (rb.d >= K.hb - 1) + 0;\n var ra = 16 * rb.d;\n let fb = 16 * (rb.d + 1);\n if (rb.W) {\n const pc = K;\n let wc = s;\n const kc = pc.oa.d;\n $(pc.oa.W);\n for (wc = pc.lb; wc < pc.wb; ++wc) {\n const Na = pc;\n const ec = wc;\n const Vb = kc;\n const xc = Na.oa;\n const gb = Na.H;\n const fc = xc.M[1 + ec];\n const sb = Na.ca;\n const tb = Na.da + 16 * xc.ha\n * gb + 16 * ec;\n const Gb = fc.zc;\n const hb = fc.yc;\n const Ja = 2 * Gb + hb;\n if (Gb != 0) {\n if (Na.A == 1) ec > 0 && ae(sb, tb, gb, Ja + 4), fc.ab && ce(sb, tb, gb, Ja), Vb > 0 && $d(sb, tb, gb, Ja + 4), fc.ab && be(sb, tb, gb, Ja);\n else {\n const gc = Na.r;\n const yc = Na.aa;\n const zc = Na.ba + 8 * xc.ha * gc + 8 * ec;\n const Ac = Na.ra;\n const Bc = Na.sa + 8 * xc.ha * gc + 8 * ec;\n const ub = Na.Ac.fb ? Gb >= 40 ? 2 : Gb >= 15 ? 1 : 0 : Gb >= 40 ? 3 : Gb >= 20 ? 2 : Gb >= 15 ? 1 : 0;\n ec > 0 && (Td(sb, tb, gb, Ja + 4, hb, ub), Vd(yc, zc, Ac, Bc, gc, Ja + 4, hb, ub));\n fc.ab && (Xd(sb, tb, gb, Ja, hb, ub), Zd(yc, zc, Ac, Bc, gc, Ja, hb, ub));\n Vb > 0 && (Sd(sb, tb, gb, Ja + 4, hb, ub), Ud(yc, zc, Ac, Bc, gc, Ja + 4, hb, ub));\n fc.ab && (Wd(sb, tb, gb,\n Ja, hb, ub), Yd(yc, zc, Ac, Bc, gc, Ja, hb, ub));\n }\n }\n }\n }\n if (I.put) {\n jc ? (I.y = K.ca, I.D = K.da + Ib, I.c = K.aa, I.B = K.ba + jb, I.S = K.ra, I.C = K.sa + jb) : (ra -= ib, I.y = Jb, I.D = Lb, I.c = Ob, I.B = Pb, I.S = Rb, I.C = Sb);\n Tb || (fb -= ib);\n fb > I.K && (fb = I.K);\n if (K.Ga != p && ra < fb && (ra == 0 ? (I.p = qd(K, ra, fb - ra), I.q = 0) : I.q = qd(K, ra, fb - ra), I.p == p)) {\n cc = Y(K, W, 'Could not decode alpha data.');\n break b;\n }\n if (ra < I.k) {\n const qc = I.k - ra;\n var ra = I.k;\n $(!(qc & 1));\n I.D += K.H * qc;\n I.B += K.r * (qc >> 1);\n I.C += K.r * (qc >> 1);\n I.p != p && (I.q += I.width * qc);\n }\n ra < fb && (I.D += I.t, I.B += I.t >> 1, I.C += I.t >> 1, I.p != p && (I.q += I.t),\n I.w = ra - I.k, I.m = I.Ka - I.t, I.h = fb - ra, Hb = I.put(I));\n }\n rb.ha + 1 == K.jb && !Tb && (N(K.ca, K.da - yb, Jb, Lb + 16 * K.H, yb), N(K.aa, K.ba - dc, Ob, Pb + 8 * K.r, dc), N(K.ra, K.sa - dc, Rb, Sb + 8 * K.r, dc));\n cc = Hb;\n }\n }\n if (!cc) {\n c = Y(a, 'VP8_STATUS_USER_ABORT', 'Output aborted.');\n break a;\n }\n }\n let Cb;\n if (!(Cb = a.qb && !WebPWorkerSync(a.rc))) {\n let Db;\n if (Db = a.fc > 0) $(a), $(a.fc > 0), Db = !1;\n Cb = Db;\n }\n c = Cb ? 0 : 1;\n }\n }\n const lc = c;\n b.Pb && b.Pb(b);\n c = lc & 1;\n }\n if (!c) return ke(a), 0;\n a.za = 0;\n return c;\n }\n\n function ke(a) {\n a != p && (a.ib && (a.ib = 0), a.ib = p, a.Gb = 0, a.za = 0);\n }\n\n function Aa(a, b) {\n return a + (1 << b) - 1 >> b;\n }\n\n function hc(a, b, c, d, e) {\n const g = vb[c] + wb[b] >> ea;\n b = xb[b];\n d[e + 0] = ia[a + Za[c] - J];\n d[e + 1] = ia[a + g - J];\n d[e + 2] = ia[a + b - J];\n }\n\n function le(a, b, c, d, e) {\n const g = vb[c] + wb[b] >> ea;\n b = xb[b];\n d[e + 0] = ia[a + Za[c] - J] & 248 | ia[a + g - J] >> 5;\n d[e + 1] = ia[a + g - J] << 3 & 224 | ia[a + b - J] >> 3;\n }\n\n function me(a, b, c, d, e) {\n d[e + 0] = 255;\n hc(a, b, c, d, e + 1);\n }\n\n function ne(a, b, c, d, e) {\n const g = xb[b];\n d[e + 0] = Hb[a + Za[c] - J] << 4 | Hb[a + (vb[c] + wb[b] >> ea) - J];\n d[e + 1] = 15 | Hb[a + g - J] << 4;\n }\n\n function Vc(a, b, c, d, e) {\n const g = Za[c];\n c = vb[c] + wb[b] >> ea;\n d[e + 0] = ia[a + xb[b] - J];\n d[e + 1] = ia[a + c - J];\n d[e + 2] = ia[a + g - J];\n }\n\n function oe(a, b, c, d, e) {\n Vc(a, b, c, d, e);\n d[e + 3] = 255;\n }\n\n function pe(a, b, c, d, e) {\n hc(a, b, c, d, e);\n d[e + 3] = 255;\n }\n\n function ib(a, b, c) {\n a[b] = ((((a[b] & 4278255360) >>> 0) + ((c & 4278255360) >>> 0) & 4278255360) >>> 0 | (a[b] & 16711935) + (c & 16711935) & 16711935) >>> 0;\n }\n\n function ka(a, b) {\n return (((a ^ b) & 4278124286) >>> 1) + ((a & b) >>> 0) >>> 0;\n }\n\n function $a(a) {\n return a < 256 && a > 0 ? a : a <= 0 ? 0 : ~a >> 24 & 255;\n }\n\n function yb(a, b) {\n return $a(a + parseInt((a - b) / 2, 10));\n }\n\n function Wc() {\n return qe;\n }\n\n function Xc(a, b) {\n a &= 255;\n b &= 255;\n a > 127 && (a -= 256);\n b > 127 && (b -= 256);\n return a * b >>> 5;\n }\n\n function re(a,\n b, c, d, e, g, k) {\n var h = s;\n const n = 8 >> a.n;\n const l = a.U;\n const f = a.u;\n if (n < 8) {\n a = (1 << a.n) - 1;\n for (var t = (1 << n) - 1, h = b; h < c; ++h) {\n b = 0;\n for (var q = s, q = 0; q < l; ++q) (q & a) == 0 && (b = d[e++] >> 8 & 255), g[k++] = f[b & t], b >>= n;\n }\n } else for (h = b; h < c; ++h) for (q = 0; q < l; ++q) g[k++] = f[d[e++] >> 8 & 255];\n }\n\n function se(a, b, c, d, e) {\n for (c = b + c; b < c;) {\n const g = a[b++];\n d[e++] = g >> 16 & 255;\n d[e++] = g >> 8 & 255;\n d[e++] = g >> 0 & 255;\n d[e++] = g >> 24 & 255;\n }\n }\n\n function te(a, b, c, d, e) {\n for (c = b + c; b < c;) {\n const g = a[b++];\n d[e++] = g >> 16 & 240 | g >> 12 & 15;\n d[e++] = g >> 0 & 240 | g >> 28 & 15;\n }\n }\n\n function Ib(a, b, c, d, e) {\n for (c = b + c; b < c;) {\n const g = a[b++];\n d[e++] = g >> 24 & 255;\n d[e++] = g >> 16 & 255;\n d[e++] = g >> 8 & 255;\n d[e++] = g >> 0 & 255;\n }\n }\n\n function ue(a, b, c, d) {\n if (T(a, 8) != ve) return 0;\n b[0] = T(a, we) + 1;\n c[0] = T(a, we) + 1;\n d[0] = T(a, 1);\n T(a, Wf);\n return 1;\n }\n\n function xe(a, b) {\n let c = s;\n if (a < 4) return a + 1;\n c = a - 2 >> 1;\n return (2 + (a & 1) << c) + T(b, c) + 1;\n }\n\n function Oa(a, b) {\n if (b.Q + 8 > b.ya) {\n var c = a.Y;\n var d = 0;\n for ($(c != p); c[d].s != 0;) {\n var e = c;\n var g = b;\n const k = g.T >> g.g & 1;\n g.L ? g.fa = 1 : (++g.g, g.g >= 8 && Sb(g), g.Q == g.ya && g.g == 32 && (g.L = 1));\n d = d + e[d].s + k;\n }\n return c[d].kc;\n }\n c = a.Y;\n d = 0;\n for ($(c != p); c[d].s != 0;) {\n e = c, g = b.T >> b.g & 1, ++b.g, d = d\n + e[d].s + g;\n }\n return c[d].kc;\n }\n\n function zb(a, b) {\n if (a != p) for (var c = s, d = s, c = 0; c < b; ++c) for (var e = a[c].va, d = 0; d < Yc; ++d) ja(e[d]);\n }\n\n function ye(a, b, c) {\n b = a.eb == 0 ? 0 : a.ac[a.bd + a.Ec * (c >> a.eb) + (b >> a.eb)];\n $(b < a.hc);\n return a.Db[+b];\n }\n\n function ze(a, b, c, d) {\n let e = a.Na;\n const g = a.O;\n const k = g + b;\n var h = c;\n var f = d;\n d = a.Xa;\n c = a.vb;\n for (N(d, c, h, f, a.l * b); e-- > 0;) {\n b = a.nc[e];\n let l = g;\n var m = k;\n var t = h;\n var q = f;\n var f = d;\n var h = c;\n $(l < m);\n $(m <= b.Vb);\n switch (b.Qc) {\n case Ae:\n t = 0;\n for (b = h + (m - l) * b.U; h < b;) {\n var m = f;\n var q = h;\n var r = m[q] >> 8 & 255;\n var u = (m[q] & 16711935) >>> 0;\n var u = u + (r << 16 | r);\n var u = u & 16711935;\n f[h++] = ((m[q] & 4278255360)\n >>> 0 | u) >>> 0;\n l == 32 && t++;\n }\n break;\n case Be:\n var v = b;\n var C = l;\n var t = m;\n var q = f;\n var r = h;\n var u = v.U;\n if (C == 0) {\n var A = s;\n ib(q, r, qe);\n for (A = 1; A < u; ++A) ib(q, r + A, q[r + A - 1]);\n r += u;\n ++C;\n }\n for (var z = (1 << v.n) - 1, Ha = Aa(u, v.n), w = v.u, v = +(C >> v.n) * Ha; C < t;) {\n var y = w;\n var B = v;\n let G = p;\n ib(q, r, q[r - u + 0]);\n G = Ce[y[B++] >> 8 & 15];\n for (A = 1; A < u; ++A) {\n let F = E;\n (A & z) == 0 && (G = Ce[y[B++] >> 8 & 15]);\n F = G(q[r + A - 1], q, r + A - u);\n ib(q, r + A, F);\n }\n r += u;\n ++C;\n (C & z) == 0 && (v += Ha);\n }\n m != b.Vb && (b = b.U, N(f, h - b, f, h + (m - l - 1) * b, b));\n break;\n case De:\n t = b.U;\n q = (1 << b.n) - 1;\n r = Aa(t, b.n);\n u = b.u;\n for (b = +(l >> b.n) * r; l < m;) {\n A = u;\n C = b;\n z = M(Xf);\n Ha = s;\n for (Ha = 0; Ha < t; ++Ha) (Ha & q) == 0 && (w = A[C++], v = z, v.Cc = w >> 0 & 255, v.Bc = w >> 8 & 255, v.Kc = w >> 16 & 255), w = f[h + Ha], v = w >>> 8, y = w >>> 16, B = w, y += Xc(z.Cc, v), y &= 255, B += Xc(z.Bc, v), B += Xc(z.Kc, y), B &= 255, f[h + Ha] = (w & 4278255360 | y << 16 | B) >>> 0;\n h += t;\n ++l;\n (l & q) == 0 && (b += r);\n }\n break;\n case Ee:\n t == f && b.n > 0 ? (t = (m - l) * Aa(b.U, b.n), q = h + (m - l) * b.U - t, memmove(f, q, f, h, t), re(b, l, m, f, q, f, h)) : re(b, l, m, t, q, f, h);\n }\n h = d;\n f = c;\n }\n }\n\n function Yf(a, b) {\n var c = a.V;\n var d = a.Ha + a.l * a.O;\n var e = b - a.O;\n if (!(e <= 0)) {\n ze(a, e, c, d);\n var g = a.N;\n var c = a.Xa;\n let k = [a.vb];\n var d = a.O;\n var e = b;\n var h = k;\n var f = g.width;\n $(d < e);\n $(g.t < g.Ka);\n e > g.K && (e = g.K);\n if (d < g.k) {\n var l = g.k - d;\n var d = g.k;\n h[0] += f * l;\n }\n d >= e ? d = 0 : (h[0] += g.t, g.w = d - g.k, g.m = g.Ka - g.t, g.h = e - d, d = 1);\n if (d) {\n k = k[0];\n d = a.Ib;\n e = g.width;\n if (d.J < ua) {\n var m = d.c.RGBA;\n var h = m.ma;\n let t = m.Sa + a.xa * m.f;\n if (g.I) c = EmitRescaledRows(a, c, k, e, g.h, h, t, m.f);\n else {\n for (var f = d.J, l = g.m, g = g.h, m = m.f, q = g; q-- > 0;) {\n const r = c;\n let u = k;\n let v = l;\n const C = h;\n let A = t;\n switch (f) {\n case Qa:\n for (v = u + v; u < v;) {\n var z = r[u++];\n C[A++] = z >> 16 & 255;\n C[A++] = z >> 8 & 255;\n C[A++] = z >> 0 & 255;\n }\n break;\n case jb:\n se(r, u, v, C, A);\n break;\n case Ob:\n se(r, u, v, C, A);\n WebPApplyAlphaMultiply(C, 0, v,\n 1, 0);\n break;\n case Zc:\n for (v = u + v; u < v;) z = r[u++], C[A++] = z >> 0 & 255, C[A++] = z >> 8 & 255, C[A++] = z >> 16 & 255;\n break;\n case Pa:\n Ib(r, u, v, C, A);\n break;\n case Pb:\n Ib(r, u, v, C, A);\n WebPApplyAlphaMultiply(C, 0, v, 1, 0);\n break;\n case Ab:\n Ib(r, u, v, C, A);\n break;\n case Bb:\n Ib(r, u, v, C, A);\n WebPApplyAlphaMultiply(C, 1, v, 1, 0);\n break;\n case kb:\n te(r, u, v, C, A);\n break;\n case Qb:\n te(r, u, v, C, A);\n WebPApplyAlphaMultiply4444(C, v, 1, 0);\n break;\n case Fe:\n for (v = u + v; u < v;) z = r[u++], C[A++] = z >> 16 & 248 | z >> 13 & 7, C[A++] = z >> 5 & 224 | z >> 3 & 31;\n break;\n default:\n $(0);\n }\n k += e;\n t += m;\n }\n c = g;\n }\n a.xa += c;\n } else {\n a.xa = g.I ? EmitRescaledRowsYUVA(a, c, k, e, g.h) : EmitRowsYUVA(a, c, k, e, g.m, g.h);\n }\n $(a.xa <= d.height);\n }\n a.O = b;\n $(a.O <= a.v);\n }\n }\n\n function lc(a, b, c, d, e, g) {\n let k = 1;\n let h = 0;\n let f = 0;\n const l = a.o;\n const m = a.cb;\n let t = m.Db;\n let q = c;\n let r = c;\n c += d * e;\n e = Ba + Ge;\n const u = e + m.xb;\n const v = m.xb > 0 ? m.Yb : p;\n const C = m.Dc;\n let A = !1;\n $(t != p);\n for (; !l.L && q < c;) {\n let z = s;\n A || ((h & C) == 0 && (t = ye(m, h, f)), Da(l), z = Oa(t.va[Zf], l));\n if (z < Ba || A) {\n if (!A) {\n var w = k = A = s;\n var y = s;\n Da(l);\n A = Oa(t.va[$f], l);\n k = z;\n Da(l);\n w = Oa(t.va[ag], l);\n Da(l);\n y = Oa(t.va[bg], l);\n b[q] = (y << 24 >>> 0) + (A << 16) + (k << 8) + w;\n }\n A = !1;\n ++q;\n ++h;\n if (h >= d && (h = 0, ++f, g != p && f\n % $c == 0 && g(a, f), v != p)) for (; r < q;) k = b[r++], v.ea[ad * k >>> v.bb] = k;\n } else if (z < e) {\n w = w = s;\n k = xe(z - Ba, l);\n z = Oa(t.va[cg], l);\n Da(l);\n w = xe(z, l);\n w > He ? w -= He : (z = dg[w - 1], z = (z >> 4) * d + (8 - (z & 15)), w = z >= 1 ? z : 1);\n z = s;\n for (z = 0; z < k; ++z) b[q + z] = b[q + z - w];\n q += k;\n for (h += k; h >= d;) h -= d, ++f, g != p && f % $c == 0 && g(a, f);\n if (q < c && (t = ye(m, h, f), v != p)) for (; r < q;) k = b[r++], v.ea[ad * k >>> v.bb] = k;\n } else if (z < u) {\n A = z - e;\n for ($(v != p); r < q;) z = b[r++], v.ea[ad * z >>> v.bb] = z;\n z = b;\n w = q;\n y = v;\n $(A <= -1 >>> y.bb);\n z[w] = y.ea[A];\n A = !0;\n continue;\n }(k = !l.fa) || End;\n }\n g != p && g(a, f);\n l.fa || !k || l.L && q < c ? (k = 0, a.a = !l.L ? W : Ie) : q == c && (a.Ob = Db);\n return k;\n }\n\n function bd(a) {\n $(a);\n a.ac = p;\n zb(a.Db, a.hc);\n const b = a.Yb;\n b != p && (b.ea = p, b.ea = p);\n $(a);\n }\n\n function sd() {\n const a = M(eg);\n if (a == p) return p;\n a.a = L;\n a.Wa = cd;\n a.Ob = cd;\n return a;\n }\n\n function sa(a) {\n let b = s;\n if (a != p) {\n bd(a.cb);\n a.V = p;\n a.V = p;\n for (b = 0; b < a.Na; ++b) {\n const c = a.nc[b];\n c.u = p;\n c.u = p;\n }\n a.Na = 0;\n a.Ub = 0;\n a.Mc = p;\n a.Mc = p;\n a.Ib = p;\n }\n }\n\n function Ka(a, b, c, d, e) {\n var g = 1;\n a = [a];\n b = [b];\n for (var k = d.o, h = d.cb, f = p, l = p, l = 0; ;) {\n if (c) {\n for (; g && T(k, 1);) {\n var m = a;\n var t = b;\n var q = d;\n var r = 1;\n var u = q.o;\n var g = q.nc[q.Na];\n var v = T(u, 2);\n if (q.Ub & 1 << v) g = 0;\n else {\n q.Ub\n |= 1 << v;\n g.Qc = v;\n g.U = m[0];\n g.Vb = t[0];\n g.u = [p];\n g.b = 0;\n ++q.Na;\n $(q.Na <= Je);\n switch (v) {\n case Be:\n case De:\n g.n = T(u, 3) + 2;\n r = Ka(Aa(g.U, g.n), Aa(g.Vb, g.n), 0, q, g.u);\n break;\n case Ee:\n t = T(u, 8) + 1;\n r = t > 16 ? 0 : t > 4 ? 1 : t > 2 ? 2 : 3;\n m[0] = Aa(g.U, r);\n g.n = r;\n if (m = r = Ka(t, 1, 0, q, g.u)) {\n if (m = t, q = g, r = s, t = 1 << (8 >>> q.n) >>> 0, u = Array(t), u == p) m = 0;\n else {\n var v = q.u[0];\n var C = q.b;\n u[0] = q.u[0][q.b + 0];\n for (r = 1; r < m; ++r) u[r] = ((((v[C + r] & 4278255360) >>> 0) + ((u[r - 1] & 4278255360) >>> 0) & 4278255360) >>> 0 | (v[C + r] & 16711935) + (u[r - 1] & 16711935) & 16711935) >>> 0;\n for (; r < t; ++r) u[r] = 0;\n q.u[0] = p;\n q.b = p;\n q.u[0] = u;\n q.b = 0;\n m = 1;\n }\n }\n r = m;\n break;\n case Ae:\n break;\n default:\n $(0);\n }\n g.u = g.u[0];\n g = r;\n }\n }\n }\n if (g && T(k, 1) && (l = T(k, 4), g = l >= 1 && l <= fg, !g)) {\n d.a = W;\n break;\n }\n if (g) {\n a: {\n var g = d;\n var A = a[0];\n var z = b[0];\n var m = l;\n var C = v = s;\n var C = g.o;\n var q = g.cb;\n var r = [p];\n var t = p;\n var u = 1;\n if (c && T(C, 1)) {\n var v = T(C, 3) + 2;\n var A = Aa(A, v);\n var w = Aa(z, v);\n var z = A * w;\n if (!Ka(A, w, 0, g, r)) {\n g.a = W;\n zb(t, u);\n g = 0;\n break a;\n }\n r = r[0];\n q.eb = v;\n for (v = 0; v < z; ++v) A = r[v] >>> 8 & 65535, r[v] = A, A >= u && (u = A + 1);\n }\n if (C.fa) zb(t, u), g = 0;\n else if ($(u <= 65536), t = ld(u, gg), t == p) g.a = cb, zb(t, u), g = 0;\n else {\n for (v = 0; v < u; ++v) {\n z = t[v].va;\n for (C = 0; C < Yc; ++C) {\n A = hg[C];\n C == 0 && m > 0 && (A += 1 << m);\n b: {\n const y = A;\n var A = g;\n const G = z[+C];\n var B = 0;\n var w = A.o;\n if (T(w, 1)) {\n var F = Array(2);\n var D = Array(2);\n var L = Array(2);\n var B = T(w, 1) + 1;\n var J = T(w, 1);\n F[0] = T(w, J == 0 ? 1 : 8);\n D[0] = 0;\n L[0] = B - 1;\n B == 2 && (F[1] = T(w, 8), D[1] = 1, L[1] = B - 1);\n c: {\n var J = 0;\n var H = s;\n $(G != p);\n $(L != p);\n $(D != p);\n $(F != p);\n if (nd(G, B)) {\n for (H = 0; H < B; ++H) {\n if (D[H] != pd) {\n if (F[H] < 0 || F[H] >= y) {\n (J = J && ma(G)) || ja(G);\n B = J;\n break c;\n }\n if (!jc(G, F[H], D[H], L[H])) {\n (J = J && ma(G)) || ja(G);\n B = J;\n break c;\n }\n }\n }(J = (J = 1) && ma(G)) || ja(G);\n B = J;\n } else B = 0;\n }\n } else {\n B = s;\n D = [];\n F = T(w, 4) + 4;\n if (F > Ke) {\n A.a = W;\n A = 0;\n break b;\n }\n L = Array(y);\n if (L == p) {\n A.a = cb;\n A = 0;\n break b;\n }\n for (B = 0; B < F; ++B) D[ig[B]] = T(w, 3);\n c: {\n var B = A;\n var O = D;\n var D = y;\n var F = L;\n var J = 0;\n var H = B.o;\n let S = s;\n let V = s;\n let Y = jg;\n const Z = M(Le);\n if (od(Z, O, Ke)) {\n if (T(H, 1)) {\n if (S = 2 + 2 * T(H, 3), V = 2 + T(H, S), V > D) {\n B.a = W;\n ja(Z);\n B = J;\n break c;\n }\n } else V = D;\n for (S = 0; S < D;) {\n var R = s;\n if (V-- == 0) break;\n Da(H);\n R = Oa(Z, H);\n if (R < Me) F[S++] = R, R != 0 && (Y = R);\n else {\n var O = R == kg;\n var R = R - Me;\n const ea = lg[R];\n var R = T(H, mg[R]) + ea;\n if (S + R > D) {\n B.a = W;\n ja(Z);\n B = J;\n break c;\n }\n for (O = O ? Y : 0; R-- > 0;) F[S++] = O;\n }\n }\n J = 1;\n ja(Z);\n B = J;\n } else B.a = W, B = 0;\n }\n B && (B = od(G, L, y));\n }(B = B && !w.fa) ? A = 1 : (A.a = W, A = 0);\n }\n if (!A) {\n zb(t, u);\n g = 0;\n break a;\n }\n }\n }\n q.ac = r;\n q.hc = u;\n q.Db = t;\n g = 1;\n }\n }\n }\n if (!g) {\n d.a = W;\n break;\n }\n if (l > 0) {\n if (h.xb = 1 << l, m = h.Yb, q = 1 << l, $(m != p), $(l > 0), m.ea = U(q, 0), m.ea == p ? l = 0 : (m.bb = 32 - l, l = 1), !l) {\n d.a = cb;\n g = 0;\n break;\n }\n } else h.xb = 0;\n l = d;\n m = a[0];\n q = b[0];\n r = l.cb;\n t = r.eb;\n l.l = m;\n l.v = q;\n r.Ec = Aa(m, t);\n r.Dc = t == 0 ? -1 : (1 << t) - 1;\n if (c) {\n d.Ob = Cb;\n break;\n }\n f = Array(a * b);\n l = 0;\n if (f == p) {\n d.a = cb;\n g = 0;\n break;\n }\n g = (g = lc(d, f, l, a, b, p)) && !k.fa;\n break;\n }\n g ? (e != p ? e[0] = f : ($(f == p), $(c)), c || bd(h)) : (bd(h), d.a == W && d.o.L && (d.a = Ie));\n return g;\n }\n\n function xd(a, b) {\n const c = a.l * a.v;\n const d = c + b + b * $c;\n $(a.l <= b);\n a.V = Array(d);\n a.Ha = 0;\n if (a.V == p) {\n return a.Xa = p, a.a = cb, 0;\n }\n a.Xa = a.V;\n a.vb = a.Ha + c + b;\n return 1;\n }\n\n function mf(a, b) {\n var c = b - a.O;\n var d = a.V;\n var e = a.Ha + a.l * a.O;\n if (!(c <= 0)) {\n ze(a, c, d, e);\n for (var e = a.N.width, c = e * c, d = a.N.ka, e = a.N.fd + e * a.O, g = a.Xa, k = a.vb, h = s, h = 0; h < c; ++h) d[e + h] = g[k + h] >>> 8 & 255;\n a.O = a.xa = b;\n }\n }\n\n function ng(a, b) {\n const c = [s];\n const d = [s];\n const e = [s];\n if (a == p) return 0;\n if (b == p) return a.a = ta, 0;\n a.N = b;\n a.a = L;\n Rb(a.o, b.data, b.b, b.e);\n if (!ue(a.o, c, d, e)) return a.a = W, sa(a), $(a.a != L), 0;\n a.Ob = cd;\n b.width = c[0];\n b.height = d[0];\n a.Wa = Cb;\n return !Ka(c[0], d[0], 1, a, p) ? (sa(a), $(a.a != L), 0) : 1;\n }\n\n function og(a) {\n let b = p;\n let c = p;\n if (a == p) return 0;\n b = a.N;\n $(b != p);\n c = b.ka;\n $(c != p);\n a.Ib = c.j;\n a.Hc = c.Hc;\n $(a.Ib != p);\n if (!Ne(c.Qa, b, Pa)) return a.a = ta, sa(a), $(a.a != L), 0;\n if (!xd(a, b.width) || b.I && !AllocateAndInitRescaler(a, b)) return sa(a), $(a.a != L), 0;\n a.Wa = Db;\n if (!lc(a, a.V, a.Ha, a.l, a.v, Yf)) return sa(a), $(a.a != L), 0;\n c.ec = a.xa;\n sa(a);\n return 1;\n }\n\n function wa(a, b) {\n return a < 0 ? 0 : a > b ? b : a;\n }\n\n function ab(a, b, c, d, e, g, k, h, f, l, m, t, q, r, u, v, C, w, z) {\n let y; const G = C - 1 >> 1;\n let F = e[g + 0] | k[h + 0] << 16;\n let B = f[l + 0] | m[t + 0] << 16;\n if (a) {\n var D = 3 * F + B + 131074 >> 2;\n w(a[b + 0], D & 255, D >> 16, q, r);\n }\n c && (D = 3 * B + F + 131074 >> 2, w(c[d + 0], D & 255, D >> 16, u, v));\n for (y = 1; y <= G; ++y) {\n const J = e[g + y] | k[h + y] << 16;\n const L = f[l + y] | m[t + y] << 16;\n var D = F + J + B + L + 524296;\n const O = D + 2 * (J + B) >> 3;\n const H = D + 2 * (F + L) >> 3;\n a && (D = O + F >> 1, F = H + J >> 1, w(a[b + 2 * y - 1], D & 255, D >> 16, q, r + (2 * y - 1) * z), w(a[b + 2 * y - 0], F & 255, F >> 16, q, r + (2 * y - 0) * z));\n c && (D = H + B >> 1, F = O + L >> 1, w(c[d + 2 * y - 1], D & 255, D >> 16, u, v + (2 * y - 1) * z), w(c[d + 2 * y + 0], F & 255, F >> 16, u, v + (2 * y + 0) * z));\n F = J;\n B = L;\n }\n C & 1 || (a && (D = 3 * F + B + 131074 >> 2, w(a[b + C - 1], D & 255, D >> 16, q, r + (C - 1) * z)), c && (D = 3 * B + F + 131074 >> 2, w(c[d + C - 1], D & 255, D >> 16, u, v + (C - 1) * z)));\n }\n\n function pg(a,\n b, c, d, e, g, k, h, f, l, m, t, q, r, u, v, w) {\n ab(a, b, c, d, e, g, k, h, f, l, m, t, q, r, u, v, w, hc, 3);\n }\n\n function qg(a, b, c, d, e, g, k, h, f, l, m, t, q, r, u, v, w) {\n ab(a, b, c, d, e, g, k, h, f, l, m, t, q, r, u, v, w, Vc, 3);\n }\n\n function Oe(a, b, c, d, e, g, k, h, f, l, m, t, q, r, u, v, w) {\n ab(a, b, c, d, e, g, k, h, f, l, m, t, q, r, u, v, w, pe, 4);\n }\n\n function Pe(a, b, c, d, e, g, k, h, f, l, m, t, q, r, u, v, w) {\n ab(a, b, c, d, e, g, k, h, f, l, m, t, q, r, u, v, w, oe, 4);\n }\n\n function Qe(a, b, c, d, e, g, k, h, f, l, m, t, q, r, u, v, w) {\n ab(a, b, c, d, e, g, k, h, f, l, m, t, q, r, u, v, w, me, 4);\n }\n\n function Re(a, b, c, d, e, g, k, h, f, l, m, t, q, r, u, v, w) {\n ab(a, b, c, d, e, g, k, h,\n f, l, m, t, q, r, u, v, w, ne, 2);\n }\n\n function rg(a, b, c, d, e, g, k, h, f, l, m, t, q, r, u, v, w) {\n ab(a, b, c, d, e, g, k, h, f, l, m, t, q, r, u, v, w, le, 2);\n }\n\n function Ca(a, b, c, d, e, g, k, h, f, l, m, t, q, r, u) {\n let v;\n for (v = 0; v < q - 1; v += 2) r(a[b + 0], e[g + 0], k[h + 0], f, l), r(a[b + 1], e[g + 0], k[h + 0], f, l + u), r(c[d + 0], e[g + 0], k[h + 0], m, t), r(c[d + 1], e[g + 0], k[h + 0], m, t + u), b += 2, d += 2, g++, h++, l += 2 * u, t += 2 * u;\n v == q - 1 && (r(a[b + 0], e[g + 0], k[h + 0], f, l), r(c[d + 0], e[g + 0], k[h + 0], m, t));\n }\n\n function Se(a, b, c, d, e, g, k, f, n, l, m, t, q) {\n Ca(a, b, c, d, e, g, k, f, n, l, m, t, q, pe, 4);\n }\n\n function Te(a, b, c, d, e, g, k, f, n, l,\n m, t, q) {\n Ca(a, b, c, d, e, g, k, f, n, l, m, t, q, oe, 4);\n }\n\n function Ue(a, b, c, d, e, g, k, f, n, l, m, t, q) {\n Ca(a, b, c, d, e, g, k, f, n, l, m, t, q, me, 4);\n }\n\n function Ve(a, b, c, d, e, g, k, f, n, l, m, t, q) {\n Ca(a, b, c, d, e, g, k, f, n, l, m, t, q, ne, 2);\n }\n\n function sg(a, b, c, d, e, g) {\n for (; e-- > 0;) {\n for (var k = a, f = b + (c ? 1 : 0), n = a, l = b + (c ? 0 : 3), m = s, m = 0; m < d; ++m) {\n var t = n[l + 4 * m];\n if (t != 255) {\n var t = 32897 * t;\n let q = k;\n let r = f + 4 * m + 0;\n k[f + 4 * m + 0] * t >>> 23;\n q[r] = ca;\n q = k;\n r = f + 4 * m + 1;\n k[f + 4 * m + 1] * t >>> 23;\n q[r] = ca;\n q = k;\n r = f + 4 * m + 2;\n k[f + 4 * m + 2] * t >>> 23;\n q[r] = ca;\n }\n }\n b += g;\n }\n }\n\n function tg(a, b) {\n const c = b.j.c.Va;\n const d = c.y;\n const e = c.D + a.w * c.F;\n const g = c.c;\n const k = c.B + (a.w >> 1) * c.nb;\n const f = c.S;\n const n = c.C + (a.w >> 1) * c.rb;\n const l = a.m;\n const m = a.h;\n const t = parseInt((l + 1) / 2, 10);\n const q = parseInt((m + 1) / 2, 10);\n let r;\n for (r = 0; r < m; ++r) N(d, e + r * c.F, a.y, a.D + r * a.F, l);\n for (r = 0; r < q; ++r) N(g, k + r * c.nb, a.c, a.B + r * a.Da, t), N(f, n + r * c.rb, a.S, a.C + r * a.Da, t);\n return a.h;\n }\n\n function ug(a, b) {\n var c = b.j;\n const d = c.c.RGBA;\n const e = d.ma;\n let g = d.Sa + a.w * d.f;\n const k = a.y;\n let f = a.D;\n const n = a.c;\n let l = a.B;\n const m = a.S;\n let t = a.C;\n var c = vg[c.J];\n const q = a.m;\n const r = a.h - 1;\n let u;\n for (u = 0; u < r; u += 2) c(k, f, k, f + a.F, n, l, m, t, e, g, e, g + d.f, q), f += 2 * a.F, l += a.Da, t += a.Da, g += 2 * d.f;\n u == r && c(k, f, k, f, n, l, m, t, e, g, e, g, q);\n return a.h;\n }\n\n function wg(a, b) {\n let c = a.h;\n const d = b.j.c.RGBA;\n const e = d.ma;\n let g = d.Sa + a.w * d.f;\n const k = V[b.j.J];\n const f = a.y;\n let n = a.D;\n const l = a.c;\n let m = a.B;\n const t = a.S;\n let q = a.C;\n let r = b.Qb;\n let u = b.Rb;\n let v = b.lc;\n let w = b.mc;\n let A = a.w;\n const z = a.w + a.h;\n const y = a.m;\n const D = parseInt((y + 1) / 2, 10);\n A == 0 ? k(p, p, f, n, l, m, t, q, l, m, t, q, p, p, e, g, y) : (k(b.Sb, b.Tb, f, n, r, u, v, w, l, m, t, q, e, g - d.f, e, g, y), ++c);\n for (; A + 2 < z; A += 2) r = l, u = m, v = t, w = q, m += a.Da, q += a.Da, g += 2 * d.f, n += 2 * a.F, k(f, n - a.F, f, n, r, u, v, w, l, m, t, q, e, g - d.f, e, g, y);\n n += a.F;\n a.k + z < a.K ? (N(b.Sb, b.Tb, f, n, 1 * y), N(b.Qb, b.Rb, l, m, 1 * D), N(b.lc, b.mc, t, q, 1 * D), c--) : z & 1 || k(f, n, p, p, l, m, t, q, l, m,\n t, q, e, g + d.f, p, p, y);\n return c;\n }\n\n function xg(a, b) {\n var c = a.p;\n var d = a.q;\n const e = b.j.c.Va;\n const g = a.m;\n const f = a.h;\n const h = e.p;\n let n = e.q + a.w * e.Fa;\n var c = a.p;\n var d = a.q;\n let l = s;\n if (c != p) for (l = 0; l < f; ++l) N(h, n, c, d, 1 * g), d += a.width, n += e.Fa;\n else if (e.p != p) for (l = 0; l < f; ++l) jd(h, n, 255, g), n += e.Fa;\n return 0;\n }\n\n function We(a, b, c) {\n let d = a.w;\n c[0] = a.h;\n a.Bb && (d == 0 ? --c[0] : (--d, b[0] -= a.width), a.k + a.w + a.h == a.K && (c[0] = a.K - a.k - d));\n return d;\n }\n\n function yg(a, b) {\n const c = a.p;\n var d = [a.q];\n if (c != p) {\n for (var e = a.m, g = b.j.J, f = g == Ab || g == Bb, h = b.j.c.RGBA, n = [s], l = We(a, d, n), d = d[0], m = h.ma, l = h.Sa + l * h.f,\n t = l + (f ? 0 : 3), q = 255, r = s, u = s, u = 0; u < n[0]; ++u) {\n for (r = 0; r < e; ++r) {\n const v = c[d + r];\n m[t + 4 * r] = v;\n q &= v;\n }\n d += a.width;\n t += h.f;\n }\n q != 255 && F(g) && WebPApplyAlphaMultiply(m, l, f, e, n, h.f);\n }\n return 0;\n }\n\n function zg(a, b) {\n const c = a.p;\n var d = [a.q];\n if (c != p) {\n const e = a.m;\n const g = b.j.J;\n const f = b.j.c.RGBA;\n const h = [s];\n var n = We(a, d, h);\n var d = d[0];\n const l = f.ma;\n var n = f.Sa + n * f.f;\n let m = n + 1;\n let t = 15;\n let q = s;\n for (j = 0; j < h[0]; ++j) {\n for (q = 0; q < e; ++q) {\n const r = c[d + q] >> 4;\n l[m + 2 * q] = l[m + 2 * q] & 240 | r;\n t &= r;\n }\n d += a.width;\n m += f.f;\n }\n t != 15 && F(g) && WebPApplyAlphaMultiply4444(l, n, e, h, f.f);\n }\n return 0;\n }\n\n function vd(a) {\n let b = a.ka;\n const c = b.j.J;\n const d = c\n < ua;\n const e = c == jb || c == Pa || c == Ab || c == kb || c == Ra || F(c);\n b.memory = p;\n b.$a = p;\n b.zb = p;\n b.ad = p;\n if (!Ne(b.Qa, a, e ? ua : Ra)) return 0;\n if (a.I) {\n if (!(d ? InitRGBRescaler(a, b) : InitYUVRescaler(a, b))) return alert('memory error #1'), 0;\n } else {\n if (d) {\n if (b.$a = ug, a.Bb) {\n const g = a.m + 1 >> 1;\n const f = a.m + 2 * g;\n let h; const\n n = [];\n for (h = 0; h < f; ++h) n.push(205);\n n.push(0);\n b.memory = n;\n if (b.memory == p) return alert('memory error #2'), 0;\n b.Sb = b.memory;\n b.Tb = 0;\n b.Qb = b.Sb;\n b.Rb = b.Tb + a.m;\n b.lc = b.Qb;\n b.mc = b.Rb + g;\n b.$a = wg;\n V[Qa] = pg;\n V[jb] = Oe;\n V[Zc] = qg;\n V[Pa] = Pe;\n V[Ab] = Qe;\n V[kb] = Re;\n V[Fe] = rg;\n }\n } else {\n b.$a = tg;\n }\n e && (F(c) && (WebPApplyAlphaMultiply = sg, V[Ob] = Oe, V[Pb] = Pe, V[Bb] = Qe, V[Qb] = Re), b.zb = c == kb || c == Qb ? zg : d ? yg : xg);\n }\n if (d && !Xe) {\n for (a = 0; a < 256; ++a) Za[a] = 89858 * (a - 128) + Jb >> ea, wb[a] = -22014 * (a - 128) + Jb, vb[a] = -45773 * (a - 128), xb[a] = 113618 * (a - 128) + Jb >> ea;\n for (a = J; a < dd; ++a) b = 76283 * (a - 16) + Jb >> ea, ia[a - J] = wa(b, 255), Hb[a - J] = wa(b + 8 >> 4, 15);\n Xe = 1;\n }\n return 1;\n }\n\n function ud(a) {\n const b = a.ka;\n let c = a.m;\n const d = a.h;\n $(!(a.w & 1));\n if (c <= 0 || d <= 0) return 0;\n c = b.$a(a, b);\n b.ec += c;\n b.zb && b.zb(a, b);\n return 1;\n }\n\n function wd(a) {\n a = a.ka;\n a.memory = '';\n a.memory = p;\n }\n\n function ed(a,\n b) {\n return a[b + 0] | a[b + 1] << 8 | a[b + 2] << 16;\n }\n\n function Kb(a, b) {\n return (ed(a, b) | a[b + 3] << 24) >>> 0;\n }\n\n function Ye(a, b, c, d, e, g, f) {\n var h = 0;\n var n = [0];\n var l = 'VP8StatusCode';\n const m = M(Gc);\n if (a == p || c[0] < Lb) return Z;\n m.data = a;\n m.b = [b[0]];\n m.e = [c[0]];\n m.na = [m.na];\n a: {\n h = m.na;\n $(a != p);\n $(c != p);\n $(h != p);\n h[0] = 0;\n if (c[0] >= Lb && !kd(a, b[0], 'RIFF', O)) {\n if (kd(a, b[0] + 8, 'WEBP', O)) {\n l = W;\n break a;\n }\n var t = Kb(a, b[0] + O);\n if (t < O + R) {\n l = W;\n break a;\n }\n h[0] = t;\n b[0] += Lb;\n c[0] -= Lb;\n } else h[0] = 0;\n l = L;\n }\n m.na = m.na[0];\n if (l != L) return l;\n h = m.na > 0;\n t = [0];\n a: if (l = R + fd, $(a != p), $(c != p), $(n != p), n[0] = 0, c[0] < R) l = Z;\n else {\n if (!kd(a, b[0], 'VP8X', O)) {\n var q = s;\n var r = s;\n var u = E;\n if (Kb(a, b[0] + O) != fd) {\n l = W;\n break a;\n }\n if (c[0] < l) {\n l = Z;\n break a;\n }\n u = Kb(a, b[0] + 8);\n q = 1 + ed(a, b[0] + 12);\n r = 1 + ed(a, b[0] + 15);\n if (q * r >= Ag) {\n l = W;\n break a;\n }\n t != p && (t[0] = u);\n d != p && (d[0] = q);\n e != p && (e[0] = r);\n b[0] += l;\n c[0] -= l;\n n[0] = 1;\n }\n l = L;\n }\n if (l != L) return l;\n if (!h && n[0]) return W;\n g != p && (g[0] = !!(t[0] & Bg));\n if (n && f == p) return L;\n if (c < O) return Z;\n if (h && n[0] || !h && !n[0] && !kd(a, b[0], 'ALPH', O)) {\n m.$ = [m.$];\n m.G = [m.G];\n m.pa = [m.pa];\n a: {\n var n = m.na;\n var h = m.$;\n var t = m.G;\n var l = m.pa;\n var q = x;\n var r = 0;\n var u = Mb;\n let v = O + R + fd;\n $(a != p);\n $(c != p);\n q = a;\n r = b[0];\n u = c[0];\n $(h != p);\n $(l != p);\n h[0] = p;\n t[0] = p;\n for (l[0] = 0; ;) {\n let w = E;\n let y = E;\n b[0] = r;\n c[0] = u;\n if (u < R) {\n l = Z;\n break a;\n }\n w = Kb(q, r + O);\n y = R + w + 1 & -2;\n v += y;\n if (n > 0 && v > n) {\n l = W;\n break a;\n }\n if (u < y) {\n l = Z;\n break a;\n }\n if (kd(q, r, 'ALPH', O)) {\n if (!kd(q, r, 'VP8 ', O) || !kd(q, 'VP8L', O)) {\n l = L;\n break a;\n }\n } else h[0] = q, t[0] = r + R, l[0] = w;\n r += y;\n u -= y;\n }\n l = ca;\n }\n m.$ = m.$[0];\n m.G = m.G[0];\n m.pa = m.pa[0];\n if (l != L) return l;\n }\n m.ta = [m.ta];\n m.ia = [m.ia];\n a: if (n = m.na, h = m.ta, t = m.ia, r = !kd(a, b[0], 'VP8 ', O), l = !kd(a, b[0], 'VP8L', O), q = O + R, $(a != p), $(c != p), $(h != p), $(t != p), c[0] < R) l = Z;\n else {\n if (r || l) {\n r = Kb(a, b[0] + O);\n if (n >= q && r > n - q) {\n l = W;\n break a;\n }\n h[0] = r;\n b[0] += R;\n c[0] -= R;\n t[0] = l;\n } else t[0] = c >= 1 && a[b + 0] == ve, h[0] = c[0];\n l = L;\n }\n m.ta = m.ta[0];\n m.ia = m.ia[0];\n if (l != L) return l;\n if (m.ta > Ze) return W;\n if (m.ia) {\n if (c[0] < $e) return Z;\n n = b[0];\n h = c[0];\n d = d ? d[0] : p;\n e = e ? e[0] : p;\n t = g ? g[0] : p;\n a == p || h < $e ? a = 0 : (l = [s], q = [s], r = [s], u = M(af), Rb(u, a, n, h), ue(u, l, q, r) ? (d != p && (d[0] = l[0]), e != p && (e[0] = q[0]), t != p && (t[0] = r[0]), a = 1) : a = 0);\n } else {\n if (c < bf) return Z;\n n = b[0];\n h = c[0];\n d = d ? d[0] : p;\n e = e ? e[0] : p;\n !(a == p || h < bf) && h - 3 >= 3 && a[n + 3 + 0] == 157 && a[n\n + 3 + 1] == 1 && a[n + 3 + 2] == 42 ? (h = a[n + 0] | a[n + 1] << 8 | a[n + 2] << 16, t = (a[n + 7] << 8 | a[n + 6]) & 16383, a = (a[n + 9] << 8 | a[n + 8]) & 16383, !(!(h & 1) + 0) || (h >> 1 & 7) > 3 || !(h >> 4 & 1) || h >> 5 >= m.ta ? a = 0 : (d && (d[0] = t), e && (e[0] = a), a = 1)) : a = 0;\n }\n if (!a) return W;\n g != p && (g[0] |= m.$ != p);\n f != p && (f[0] = m, f[0].offset = b[0] - f[0].b, $(b[0] - f[0].b < Ze), $(f[0].offset == f[0].e - c[0]));\n return L;\n }\n\n function Kd(a) {\n $(a != p);\n return Ye(a[0].data, a[0].b, a[0].e, p, p, p, a);\n }\n\n function cf(a, b, c, d) {\n let e = 'VP8StatusCode';\n const g = M(Vb);\n let f = M(Gc);\n f.data = a;\n f.b = b;\n f.e = c;\n f.b = [f.b];\n f.e = [f.e];\n f = [f];\n e = Kd(f);\n if (e\n != L) return e;\n f = f[0];\n f.b = f.b[0];\n f.e = f.e[0];\n $(d != p);\n td(na);\n g.data = f.data;\n g.b = b + f.offset;\n g.e = f.e - f.offset;\n g.put = ud;\n g.Mb = vd;\n g.Pb = wd;\n g.ka = d;\n if (f.ia) {\n a = sd();\n if (a == p) return cb;\n ng(a, g) ? (e = zd(g.width, g.height, d.Qa, d.j), e == L && !og(a) && (e = a.a)) : e = a.a;\n a != p && sa(a);\n } else {\n e = M(Cg);\n e != p && (Gd(e), e.za = 0, e.Hb = 1);\n a = e;\n if (a == p) return cb;\n a.qb = 0;\n a.Ga = f.$;\n a.G = f.G;\n a.ub = f.pa;\n Hd(a, g) ? (e = zd(g.width, g.height, d.Qa, d.j), e == L && !Mf(a, g) && (e = a.a)) : e = a.a;\n a != p && ke(a);\n }\n e != L && (self || this).Yc(d.j);\n return e;\n }\n\n function lb(a, b, c, d, e) {\n const g = {\n value: 0,\n };\n c = {\n value: c,\n };\n const f = M(df);\n const h = M(gd);\n f.j = h;\n h.J = a;\n const n = {\n value: h.width,\n };\n const l = {\n value: h.height,\n };\n let m;\n m = c;\n const t = M(ef);\n hd(b, g, m, t) != L ? m = 0 : (n != p && (n.value = t.width), l != p && (l.value = t.height), m = 1);\n if (!m) return p;\n h.width = n.value;\n h.height = l.value;\n d != p && (d.value = h.width.value);\n e != p && (e.value = h.height.value);\n return cf(b, g.value, c.value, f) != L ? p : a < ua ? h.c.RGBA.ma : h.c.Va.y;\n }\n\n function hd(a, b, c, d) {\n if (d == p || a == p) return ta;\n $(d != p);\n d.tc = 0;\n d.width = [d.width];\n d.height = [d.height];\n d.$b = [d.$b];\n return Ye(a, b, c, d.width, d.height, d.$b, p);\n }\n\n function Ne(a,\n b, c) {\n const d = b.width;\n const e = b.height;\n let g = 0;\n let f = 0;\n let h = d;\n let n = e;\n b.Ua = a != p && a.Ua > 0;\n if (b.Ua && (h = a.wc, n = a.vc, g = a.t, f = a.k, c < ua || (g &= -2, f &= -2), g < 0 || f < 0 || h <= 0 || n <= 0 || g + h > d || f + n > e)) return 0;\n b.t = g;\n b.k = f;\n b.Ka = g + h;\n b.K = f + n;\n b.m = h;\n b.h = n;\n b.I = a != p && a.I > 0;\n if (b.I) {\n if (a.Ba <= 0 || a.Aa <= 0) return 0;\n b.Ba = a.Ba;\n b.Aa = a.Aa;\n }\n b.Za = a && a.Za;\n b.Bb = a == p || !a.ed;\n b.I && (b.Za = b.Ba < 3 * d / 4 && b.Aa < 3 * e / 4, b.Bb = 0);\n return 1;\n }\n var na = 512;\n var Qa = 0;\n var jb = 1;\n var Zc = 2;\n var Pa = 3;\n var Ab = 4;\n var kb = 5;\n var Fe = 6;\n var Ob = 7;\n var Pb = 8;\n var Bb = 9;\n var Qb = 10;\n var ua = 11;\n var Ra = 12;\n var Cc = 13;\n this.WEBP_CSP_MODE = this.Cd = {\n nd: 0,\n od: 1,\n kd: 2,\n ld: 3,\n jd: 4,\n pd: 5,\n qd: 6,\n rd: 7,\n sd: 8,\n md: 9,\n };\n var gd = {\n J: 'WEBP_CSP_MODE',\n width: s,\n height: s,\n Fc: s,\n c: {\n RGBA: {\n ma: x,\n Sa: 0,\n f: s,\n size: Mb,\n },\n Va: {\n y: x,\n c: x,\n S: x,\n p: x,\n D: x,\n B: x,\n C: x,\n q: x,\n F: s,\n nb: s,\n rb: s,\n Fa: s,\n Wc: Mb,\n Rc: Mb,\n Uc: Mb,\n Wb: Mb,\n },\n },\n Ic: U(4, E),\n Jb: p,\n jc: x,\n };\n var L = 0;\n var cb = 1;\n var ta = 2;\n var W = 3;\n var Hf = 4;\n var Ie = 5;\n var Nf = 6;\n var Z = 7;\n this.VP8StatusCode = this.td = {\n xd: 0,\n yd: 1,\n vd: 2,\n ud: 3,\n Ad: 4,\n zd: 5,\n Bd: 6,\n wd: 7,\n };\n var ef = {\n width: {\n value: s,\n },\n height: {\n value: s,\n },\n $b: {\n value: s,\n },\n tc: s,\n Yd: s,\n rotate: s,\n be: s,\n Ic: U(3, E),\n };\n this.WebPGetFeatures = this.Md = function (a, b, c) {\n let d = 'VP8StatusCode';\n na >>> 8 != na >>> 8 || c == p ? a = ta : (b = [b], d = hd(a, [0], b, c), a = d == Z ? W : d);\n return a;\n };\n const ff = {\n Za: s,\n ed: s,\n Ua: s,\n t: s,\n k: s,\n wc: s,\n vc: s,\n I: s,\n Ba: s,\n Aa: s,\n ae: s,\n Td: s,\n Xd: s,\n Ic: U(6, E),\n };\n this.WebPDecoderConfig = this.Kd = {\n input: M(ef),\n j: M(gd),\n options: M(ff),\n };\n this.WebPInitDecoderConfig = this.Nd = function (a) {\n na >>> 8 != na >>> 8 || a == p ? a = 0 : (a = a.input, $(a != p), a.tc = 0, a = 1);\n return a;\n };\n var Vb = {\n width: s,\n height: s,\n w: s,\n m: s,\n h: s,\n y: x,\n c: x,\n S: x,\n D: 0,\n B: 0,\n C: 0,\n F: s,\n Da: s,\n ka: 0,\n put: 0,\n Mb: 0,\n Pb: 0,\n Bb: s,\n e: Mb,\n data: x,\n b: 0,\n Za: s,\n Ua: s,\n t: s,\n Ka: s,\n k: s,\n K: s,\n I: s,\n Ba: s,\n Aa: s,\n p: x,\n q: 0,\n };\n var df = {\n j: M(gd),\n Sb: x,\n Qb: x,\n lc: x,\n Tb: 0,\n Rb: 0,\n mc: 0,\n ec: s,\n Qa: M(ff),\n memory: 0,\n $a: '(OutputFunc)',\n zb: '(OutputFunc)',\n ad: '(OutputRowFunc)',\n };\n var Gc = {\n data: x,\n b: x,\n e: Mb,\n offset: Mb,\n $: p,\n G: x,\n pa: Mb,\n ta: Mb,\n na: Mb,\n ia: s,\n };\n var Fc = {\n qa: x,\n Ia: p,\n Pd: x,\n Ab: s,\n la: E,\n Z: E,\n gc: s,\n };\n var af = {\n T: bb,\n qa: x,\n Ia: x,\n ya: Mb,\n Q: Mb,\n g: s,\n L: s,\n fa: s,\n };\n var gf = 25;\n var hf = [0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767, 65535, 131071, 262143, 524287, 1048575, 2097151, 4194303, 8388607, 16777215];\n var bf = 10;\n var ve = 47;\n var we = 14;\n var Wf = 3;\n var $e = 5;\n var fg = 11;\n var Yc = 5;\n var qe = 4278190080;\n var jg = 8;\n var Tb = 15;\n var Ba = 256;\n var Ge = 24;\n var Je = 4;\n var Be = 0;\n var De = 1;\n var Ae = 2;\n var Ee = 3;\n var Ub = 1;\n var kc = 0;\n var kf = 1;\n var rd = 1;\n var O = 4;\n var R = 8;\n var Lb = 12;\n var fd = 10;\n var Bg = 16;\n var Ag = 1 * Math.pow(2, 32);\n var Ze = -1 - R - 1 >>> 0;\n var jf = {\n kc: s,\n s,\n };\n var Le = {\n Y: 'HuffmanTreeNode*',\n gb: s,\n Pa: s,\n };\n var pd = -1;\n const Dg = {\n ea: E,\n bb: s,\n };\n var ad = 506832829;\n var $b = 0;\n var ge = $b;\n var fe = 2;\n var ee = 3;\n var de = 1;\n var Ef = 4;\n var Df = 5;\n var Cf = 6;\n var Ld = 3;\n var xa = 4;\n var Hc = 4;\n var Gf = 4;\n var Md = 4;\n var Nd = 8;\n var Kc = 3;\n var Lc = 11;\n var f = 32;\n var Pf = 17 * f + 9 * f;\n var Tc = 1 * f + 8;\n var Uc = Tc + 16 * f + f;\n var he = Uc + 16;\n var Id = {\n fb: x,\n Jc: x,\n Nc: x,\n Ra: E,\n };\n var Jd = {\n l: 0,\n v: 0,\n gd: x,\n hd: x,\n uc: x,\n $c: x,\n };\n const Eg = {\n pb: s,\n ob: s,\n tb: s,\n Kb: U(xa, 0),\n Cb: U(xa, 0),\n };\n const Fg = {\n Ta: U(Ld, x),\n z: md([Md, Nd, Kc, Lc], x),\n };\n const Gg = {\n Oc: s,\n Fb: s,\n kb: s,\n oc: s,\n Lc: U(Hc, s),\n Gc: U(Hc, s),\n };\n var Oc = {\n zc: s,\n yc: s,\n ab: s,\n };\n var Qd = {\n X: s,\n ua: s,\n Nb: s,\n };\n const id = U(2, s);\n const Hg = {\n sc: M(id),\n sb: M(id),\n qc: M(id),\n };\n const Ig = {\n ha: s,\n d: s,\n W: s,\n M: Oc,\n N: Vb,\n };\n var Cg = {\n a: 'VP8StatusCode',\n za: s,\n xc: 0,\n o: M(Fc),\n Ac: M(Id),\n P: M(Jd),\n ga: M(Gg),\n Ca: M(Eg),\n rc: 'WebPWorker',\n qb: s,\n Ja: s,\n jb: s,\n oa: Ig,\n Ma: s,\n hb: s,\n lb: s,\n mb: s,\n wb: s,\n Ya: s,\n Hb: s,\n ic: ld(8, Fc),\n Zc: E,\n yb: ld(xa, Hg),\n R: M(Fg),\n pc: s,\n Pc: x,\n dc: x,\n cc: U(4, x),\n Xc: x,\n Sc: x,\n Vc: x,\n La: M(Qd),\n M: M(Oc),\n Ea: x,\n z: 0,\n ca: x,\n aa: x,\n ra: x,\n da: s,\n ba: s,\n sa: s,\n H: s,\n r: s,\n ib: 0,\n Gb: Mb,\n i: s,\n d: s,\n wa: x,\n Eb: U(16, x),\n Vd: 0,\n Tc: x,\n Lb: x,\n ja: E,\n Oa: E,\n A: s,\n W: s,\n Zb: U(xa, x),\n Ga: p,\n G: 0,\n ub: Mb,\n Xb: x,\n Od: 0,\n cd: s,\n dd: x,\n Wd: 0,\n fc: Mb,\n };\n var Db = 0;\n var Cb = 1;\n var cd = 2;\n const Jg = {\n Qc: 'VP8LImageTransformType',\n n: s,\n U: s,\n Vb: s,\n u: E,\n b: E,\n };\n var gg = {\n va: ld(Yc, Le),\n };\n const Kg = {\n xb: s,\n Yb: M(Dg),\n Dc: s,\n eb: s,\n Ec: s,\n ac: E,\n bd: E,\n hc: s,\n Db: 'HTreeGroup',\n };\n var eg = {\n a: 'VP8StatusCode',\n Wa: 'VP8LDecodeState',\n Ob: 'VP8LDecodeState',\n N: 'VP8Io',\n Ib: 'WebPDecBuffer',\n Hc: 'WebPDecBuffer',\n V: E,\n Ha: E,\n Xa: E,\n vb: E,\n o: M(af),\n l: s,\n v: s,\n O: s,\n xa: s,\n cb: M(Kg),\n Na: s,\n nc: ld(Je, Jg),\n Ub: E,\n Mc: x,\n $d: x,\n Zd: '*WebPRescaler',\n };\n var lf = 4;\n var nf = [p, function (a, b, c, d, e, g, f, h) {\n let n = s;\n let l = h;\n $(a != p);\n $(f != p);\n $(c > 0);\n $(d > 0);\n $(e > 0);\n $(g >= c * e);\n for (n = 0; n < d; ++n) {\n n == 0 ? N(f, h, a, b, e) : Ea(a, b, f, l - g, f, h, e), Ea(a, b + e, f, l, f, h + e, e * (c - 1)),\n l += g, b += g, h += g;\n }\n }, function (a, b, c, d, e, f, k, h) {\n let n = s;\n let l = h;\n $(a != p);\n $(k != p);\n $(c > 0);\n $(d > 0);\n $(e > 0);\n $(f >= c * e);\n N(k, h, a, b, e);\n Ea(a, b + e, k, l, k, h + e, e * (c - 1));\n for (n = 1; n < d; ++n) b += f, h += f, Ea(a, b, k, l, k, h, e * c), l += f;\n }, function (a, b, c, d, e, f, k, h) {\n var n = h;\n let l = s;\n $(a != p);\n $(k != p);\n $(c > 0);\n $(d > 0);\n $(e > 0);\n $(f >= c * e);\n N(k, h, a, b, e);\n Ea(a, b + e, k, n, k, h + e, e * (c - 1));\n for (l = 1; l < d; ++l) {\n let m = s;\n var n = n + f;\n b += f;\n h += f;\n Ea(a, b, k, n - f, k, h, e);\n for (m = e; m < c * e; ++m) {\n const t = k[n + m - e] + k[n + m - f] - k[n + m - f - e];\n k[h + m] = a[b + m] + (t < 0 ? 0 : t > 255 ? 255 : t) & 255;\n }\n }\n }];\n var yd = [3, 4, 3, 4, 4, 2, 2, 4, 4, 4,\n 2, 1, 1,\n ];\n this.WebPFreeDecBuffer = this.Yc = function (a) {\n a != p && (a.Fc || (a.Jb = ''), a.jc = 0, a.Jb = a.jc = p);\n };\n self = this;\n var va = U(511, x);\n var tc = U(511, x);\n var sc = U(2041, 0);\n var oc = U(225, 0);\n var oa = U(766, x);\n var Rd = 0;\n var Xb = 85627;\n var Wb = 35468;\n var Uf = [function (a, b) {\n let c = 4;\n let d;\n for (d = 0; d < 4; ++d) c += a[b + d - f] + a[b - 1 + d * f];\n c >>= 3;\n for (d = 0; d < 4; ++d) jd(a, b + d * f, c, 4);\n }, function (a, b) {\n Dc(a, b, 4);\n }, function (a, b) {\n let c = b - f;\n const d = [];\n d.push(y(a[c - 1], a[c + 0], a[c + 1]));\n d.push(y(a[c + 0], a[c + 1], a[c + 2]));\n d.push(y(a[c + 1], a[c + 2], a[c + 3]));\n d.push(y(a[c + 2], a[c + 3], a[c + 4]));\n for (c = 0; c < 4; ++c) N(a, b + c * f, d, 0, 4);\n },\n function (a, b) {\n const c = a[b - 1];\n const d = a[b - 1 + f];\n const e = a[b - 1 + 2 * f];\n const g = a[b - 1 + 3 * f];\n a[b + 0 + 0 * f] = a[b + 1 + 0 * f] = a[b + 2 + 0 * f] = a[b + 3 + 0 * f] = y(a[b - 1 - f], c, d);\n a[b + 0 + 1 * f] = a[b + 1 + 1 * f] = a[b + 2 + 1 * f] = a[b + 3 + 1 * f] = y(c, d, e);\n a[b + 0 + 2 * f] = a[b + 1 + 2 * f] = a[b + 2 + 2 * f] = a[b + 3 + 2 * f] = y(d, e, g);\n a[b + 0 + 3 * f] = a[b + 1 + 3 * f] = a[b + 2 + 3 * f] = a[b + 3 + 3 * f] = y(e, g, g);\n },\n function (a, b) {\n const c = a[b - 1 + 0 * f];\n const d = a[b - 1 + 1 * f];\n const e = a[b - 1 + 2 * f];\n const g = a[b - 1 - f];\n const k = a[b + 0 - f];\n const h = a[b + 1 - f];\n const n = a[b + 2 - f];\n const l = a[b + 3 - f];\n a[b + 0 + 3 * f] = y(d, e, a[b - 1 + 3 * f]);\n a[b + 0 + 2 * f] = a[b + 1 + 3 * f] = y(c, d, e);\n a[b + 0 + 1 * f] = a[b + 1 + 2 * f] = a[b + 2 + 3 * f] = y(g, c, d);\n a[b\n + 0 + 0 * f] = a[b + 1 + 1 * f] = a[b + 2 + 2 * f] = a[b + 3 + 3 * f] = y(k, g, c);\n a[b + 1 + 0 * f] = a[b + 2 + 1 * f] = a[b + 3 + 2 * f] = y(h, k, g);\n a[b + 2 + 0 * f] = a[b + 3 + 1 * f] = y(n, h, k);\n a[b + 3 + 0 * f] = y(l, n, h);\n },\n function (a, b) {\n const c = a[b - 1 + 0 * f];\n const d = a[b - 1 + 1 * f];\n const e = a[b - 1 + 2 * f];\n const g = a[b - 1 - f];\n const k = a[b + 0 - f];\n const h = a[b + 1 - f];\n const n = a[b + 2 - f];\n const l = a[b + 3 - f];\n a[b + 0 + 0 * f] = a[b + 1 + 2 * f] = g + k + 1 >> 1;\n a[b + 1 + 0 * f] = a[b + 2 + 2 * f] = k + h + 1 >> 1;\n a[b + 2 + 0 * f] = a[b + 3 + 2 * f] = h + n + 1 >> 1;\n a[b + 3 + 0 * f] = n + l + 1 >> 1;\n a[b + 0 + 3 * f] = y(e, d, c);\n a[b + 0 + 2 * f] = y(d, c, g);\n a[b + 0 + 1 * f] = a[b + 1 + 3 * f] = y(c, g, k);\n a[b + 1 + 1 * f] = a[b + 2 + 3 * f] = y(g, k, h);\n a[b + 2 + 1 * f] = a[b + 3 + 3 * f] = y(k, h, n);\n a[b + 3 + 1 * f] = y(h, n, l);\n },\n function (a, b) {\n const c = a[b + 1 - f];\n const d = a[b + 2 - f];\n const e = a[b + 3 - f];\n const g = a[b + 4 - f];\n const k = a[b + 5 - f];\n const h = a[b + 6 - f];\n const n = a[b + 7 - f];\n a[b + 0 + 0 * f] = y(a[b + 0 - f], c, d);\n a[b + 1 + 0 * f] = a[b + 0 + 1 * f] = y(c, d, e);\n a[b + 2 + 0 * f] = a[b + 1 + 1 * f] = a[b + 0 + 2 * f] = y(d, e, g);\n a[b + 3 + 0 * f] = a[b + 2 + 1 * f] = a[b + 1 + 2 * f] = a[b + 0 + 3 * f] = y(e, g, k);\n a[b + 3 + 1 * f] = a[b + 2 + 2 * f] = a[b + 1 + 3 * f] = y(g, k, h);\n a[b + 3 + 2 * f] = a[b + 2 + 3 * f] = y(k, h, n);\n a[b + 3 + 3 * f] = y(h, n, n);\n },\n function (a, b) {\n const c = a[b + 0 - f];\n const d = a[b + 1 - f];\n const e = a[b + 2 - f];\n const g = a[b + 3 - f];\n const k = a[b + 4 - f];\n const h = a[b + 5 - f];\n const n = a[b + 6 - f];\n const l = a[b + 7 - f];\n a[b + 0 + 0 * f] = c + d + 1 >> 1;\n a[b + 1 + 0 * f] = a[b\n + 0 + 2 * f] = d + e + 1 >> 1;\n a[b + 2 + 0 * f] = a[b + 1 + 2 * f] = e + g + 1 >> 1;\n a[b + 3 + 0 * f] = a[b + 2 + 2 * f] = g + k + 1 >> 1;\n a[b + 0 + 1 * f] = y(c, d, e);\n a[b + 1 + 1 * f] = a[b + 0 + 3 * f] = y(d, e, g);\n a[b + 2 + 1 * f] = a[b + 1 + 3 * f] = y(e, g, k);\n a[b + 3 + 1 * f] = a[b + 2 + 3 * f] = y(g, k, h);\n a[b + 3 + 2 * f] = y(k, h, n);\n a[b + 3 + 3 * f] = y(h, n, l);\n },\n function (a, b) {\n const c = a[b - 1 + 0 * f];\n const d = a[b - 1 + 1 * f];\n const e = a[b - 1 + 2 * f];\n const g = a[b - 1 + 3 * f];\n const k = a[b - 1 - f];\n const h = a[b + 0 - f];\n const n = a[b + 1 - f];\n const l = a[b + 2 - f];\n a[b + 0 + 0 * f] = a[b + 2 + 1 * f] = c + k + 1 >> 1;\n a[b + 0 + 1 * f] = a[b + 2 + 2 * f] = d + c + 1 >> 1;\n a[b + 0 + 2 * f] = a[b + 2 + 3 * f] = e + d + 1 >> 1;\n a[b + 0 + 3 * f] = g + e + 1 >> 1;\n a[b + 3 + 0 * f] = y(h, n, l);\n a[b + 2 + 0 * f] = y(k, h, n);\n a[b\n + 1 + 0 * f] = a[b + 3 + 1 * f] = y(c, k, h);\n a[b + 1 + 1 * f] = a[b + 3 + 2 * f] = y(d, c, k);\n a[b + 1 + 2 * f] = a[b + 3 + 3 * f] = y(e, d, c);\n a[b + 1 + 3 * f] = y(g, e, d);\n },\n function (a, b) {\n const c = a[b - 1 + 0 * f];\n const d = a[b - 1 + 1 * f];\n const e = a[b - 1 + 2 * f];\n const g = a[b - 1 + 3 * f];\n a[b + 0 + 0 * f] = c + d + 1 >> 1;\n a[b + 2 + 0 * f] = a[b + 0 + 1 * f] = d + e + 1 >> 1;\n a[b + 2 + 1 * f] = a[b + 0 + 2 * f] = e + g + 1 >> 1;\n a[b + 1 + 0 * f] = y(c, d, e);\n a[b + 3 + 0 * f] = a[b + 1 + 1 * f] = y(d, e, g);\n a[b + 3 + 1 * f] = a[b + 1 + 2 * f] = y(e, g, g);\n a[b + 3 + 2 * f] = a[b + 2 + 2 * f] = a[b + 0 + 3 * f] = a[b + 1 + 3 * f] = a[b + 2 + 3 * f] = a[b + 3 + 3 * f] = g;\n },\n ];\n var Vf = [function (a, b) {\n let c = 16;\n let d;\n for (d = 0; d < 16; ++d) c += a[b - 1 + d * f] + a[b + d - f];\n Yb(c >> 5, a, b);\n }, function (a,\n b) {\n Dc(a, b, 16);\n }, function (a, b) {\n let c;\n for (c = 0; c < 16; ++c) N(a, b + c * f, a, b - f, 16);\n }, function (a, b) {\n let c;\n for (c = 16; c > 0; --c) jd(a, b + 0, a[b - 1], 16), b += f;\n }, function (a, b) {\n let c = 8;\n let d;\n for (d = 0; d < 16; ++d) c += a[b - 1 + d * f];\n Yb(c >> 4, a, b);\n }, function (a, b) {\n let c = 8;\n let d;\n for (d = 0; d < 16; ++d) c += a[b + d - f];\n Yb(c >> 4, a, b);\n }, function (a, b) {\n Yb(128, a, b);\n }];\n var je = [function (a, b) {\n let c = 8;\n let d;\n for (d = 0; d < 8; ++d) c += a[b + d - f] + a[b - 1 + d * f];\n Zb(1 * (c >> 4), a, b);\n }, function (a, b) {\n Dc(a, b, 8);\n }, function (a, b) {\n let c;\n for (c = 0; c < 8; ++c) N(a, b + c * f, a, b - f, 8);\n }, function (a, b) {\n let c;\n for (c = 0; c < 8; ++c) {\n jd(a,\n b + 0, a[b - 1], 8), b += f;\n }\n }, function (a, b) {\n let c = 4;\n let d;\n for (d = 0; d < 8; ++d) c += a[b - 1 + d * f];\n Zb(1 * (c >> 3), a, b);\n }, function (a, b) {\n let c = 4;\n let d;\n for (d = 0; d < 8; ++d) c += a[b + d - f];\n Zb(1 * (c >> 3), a, b);\n }, function (a, b) {\n Zb(128, a, b);\n }];\n let mc; let Pc; let Qc; let Rc; let Sd; let Td; let Ud; let Vd; let Wd; let Xd; let Yd; let Zd; let $d; let ae; let be; let ce; var Pd = 31;\n var uc = [0, 2, 8];\n var Od = 3;\n var Of = 1;\n var ie = [0 + 0 * f, 4 + 0 * f, 8 + 0 * f, 12 + 0 * f, 0 + 4 * f, 4 + 4 * f, 8 + 4 * f, 12 + 4 * f, 0 + 8 * f, 4 + 8 * f, 8 + 8 * f, 12 + 8 * f, 0 + 12 * f, 4 + 12 * f, 8 + 12 * f, 12 + 12 * f];\n var Ic = [4, 5, 6, 7, 8, 9, 10, 10, 11, 12, 13, 14, 15, 16, 17, 17, 18, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 25, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 37, 38,\n 39, 40, 41, 42, 43, 44, 45, 46, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 91, 93, 95, 96, 98, 100, 101, 102, 104, 106, 108, 110, 112, 114, 116, 118, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 143, 145, 148, 151, 154, 157,\n ];\n var Jc = [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96,\n 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 119, 122, 125, 128, 131, 134, 137, 140, 143, 146, 149, 152, 155, 158, 161, 164, 167, 170, 173, 177, 181, 185, 189, 193, 197, 201, 205, 209, 213, 217, 221, 225, 229, 234, 239, 245, 249, 254, 259, 264, 269, 274, 279, 284,\n ];\n var Sf = [-$b, 1, -1, 2, -2, 3, 4, 6, -3, 5, -4, -5, -6, 7, -7, 8, -8, -9];\n var Ff = [\n [\n [\n [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128],\n [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128],\n [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128],\n ],\n [\n [253, 136, 254, 255, 228, 219, 128, 128, 128, 128, 128],\n [189, 129, 242, 255, 227, 213, 255, 219, 128, 128,\n 128,\n ],\n [106, 126, 227, 252, 214, 209, 255, 255, 128, 128, 128],\n ],\n [\n [1, 98, 248, 255, 236, 226, 255, 255, 128, 128, 128],\n [181, 133, 238, 254, 221, 234, 255, 154, 128, 128, 128],\n [78, 134, 202, 247, 198, 180, 255, 219, 128, 128, 128],\n ],\n [\n [1, 185, 249, 255, 243, 255, 128, 128, 128, 128, 128],\n [184, 150, 247, 255, 236, 224, 128, 128, 128, 128, 128],\n [77, 110, 216, 255, 236, 230, 128, 128, 128, 128, 128],\n ],\n [\n [1, 101, 251, 255, 241, 255, 128, 128, 128, 128, 128],\n [170, 139, 241, 252, 236, 209, 255, 255, 128, 128, 128],\n [37, 116, 196, 243, 228, 255, 255, 255, 128, 128, 128],\n ],\n [\n [1, 204, 254, 255, 245, 255, 128, 128, 128, 128,\n 128,\n ],\n [207, 160, 250, 255, 238, 128, 128, 128, 128, 128, 128],\n [102, 103, 231, 255, 211, 171, 128, 128, 128, 128, 128],\n ],\n [\n [1, 152, 252, 255, 240, 255, 128, 128, 128, 128, 128],\n [177, 135, 243, 255, 234, 225, 128, 128, 128, 128, 128],\n [80, 129, 211, 255, 194, 224, 128, 128, 128, 128, 128],\n ],\n [\n [1, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n [246, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n [255, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128],\n ],\n ],\n [\n [\n [198, 35, 237, 223, 193, 187, 162, 160, 145, 155, 62],\n [131, 45, 198, 221, 172, 176, 220, 157, 252, 221, 1],\n [68, 47, 146, 208, 149, 167, 221, 162, 255, 223, 128],\n ],\n [\n [1, 149, 241, 255, 221, 224, 255, 255, 128, 128, 128],\n [184, 141, 234, 253, 222, 220, 255, 199, 128, 128, 128],\n [81, 99, 181, 242, 176, 190, 249, 202, 255, 255, 128],\n ],\n [\n [1, 129, 232, 253, 214, 197, 242, 196, 255, 255, 128],\n [99, 121, 210, 250, 201, 198, 255, 202, 128, 128, 128],\n [23, 91, 163, 242, 170, 187, 247, 210, 255, 255, 128],\n ],\n [\n [1, 200, 246, 255, 234, 255, 128, 128, 128, 128, 128],\n [109, 178, 241, 255, 231, 245, 255, 255, 128, 128, 128],\n [44, 130, 201, 253, 205, 192, 255, 255, 128, 128, 128],\n ],\n [\n [1, 132, 239, 251, 219, 209, 255, 165, 128, 128, 128],\n [94, 136, 225, 251, 218, 190, 255, 255, 128, 128, 128],\n [22,\n 100, 174, 245, 186, 161, 255, 199, 128, 128, 128,\n ],\n ],\n [\n [1, 182, 249, 255, 232, 235, 128, 128, 128, 128, 128],\n [124, 143, 241, 255, 227, 234, 128, 128, 128, 128, 128],\n [35, 77, 181, 251, 193, 211, 255, 205, 128, 128, 128],\n ],\n [\n [1, 157, 247, 255, 236, 231, 255, 255, 128, 128, 128],\n [121, 141, 235, 255, 225, 227, 255, 255, 128, 128, 128],\n [45, 99, 188, 251, 195, 217, 255, 224, 128, 128, 128],\n ],\n [\n [1, 1, 251, 255, 213, 255, 128, 128, 128, 128, 128],\n [203, 1, 248, 255, 255, 128, 128, 128, 128, 128, 128],\n [137, 1, 177, 255, 224, 255, 128, 128, 128, 128, 128],\n ],\n ],\n [\n [\n [253, 9, 248, 251, 207, 208, 255, 192, 128, 128, 128],\n [175, 13,\n 224, 243, 193, 185, 249, 198, 255, 255, 128,\n ],\n [73, 17, 171, 221, 161, 179, 236, 167, 255, 234, 128],\n ],\n [\n [1, 95, 247, 253, 212, 183, 255, 255, 128, 128, 128],\n [239, 90, 244, 250, 211, 209, 255, 255, 128, 128, 128],\n [155, 77, 195, 248, 188, 195, 255, 255, 128, 128, 128],\n ],\n [\n [1, 24, 239, 251, 218, 219, 255, 205, 128, 128, 128],\n [201, 51, 219, 255, 196, 186, 128, 128, 128, 128, 128],\n [69, 46, 190, 239, 201, 218, 255, 228, 128, 128, 128],\n ],\n [\n [1, 191, 251, 255, 255, 128, 128, 128, 128, 128, 128],\n [223, 165, 249, 255, 213, 255, 128, 128, 128, 128, 128],\n [141, 124, 248, 255, 255, 128, 128, 128, 128, 128, 128],\n ],\n [\n [1, 16, 248, 255,\n 255, 128, 128, 128, 128, 128, 128,\n ],\n [190, 36, 230, 255, 236, 255, 128, 128, 128, 128, 128],\n [149, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n ],\n [\n [1, 226, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n [247, 192, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n [240, 128, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n ],\n [\n [1, 134, 252, 255, 255, 128, 128, 128, 128, 128, 128],\n [213, 62, 250, 255, 255, 128, 128, 128, 128, 128, 128],\n [55, 93, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n ],\n [\n [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128],\n [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128],\n [128, 128, 128, 128,\n 128, 128, 128, 128, 128, 128, 128,\n ],\n ],\n ],\n [\n [\n [202, 24, 213, 235, 186, 191, 220, 160, 240, 175, 255],\n [126, 38, 182, 232, 169, 184, 228, 174, 255, 187, 128],\n [61, 46, 138, 219, 151, 178, 240, 170, 255, 216, 128],\n ],\n [\n [1, 112, 230, 250, 199, 191, 247, 159, 255, 255, 128],\n [166, 109, 228, 252, 211, 215, 255, 174, 128, 128, 128],\n [39, 77, 162, 232, 172, 180, 245, 178, 255, 255, 128],\n ],\n [\n [1, 52, 220, 246, 198, 199, 249, 220, 255, 255, 128],\n [124, 74, 191, 243, 183, 193, 250, 221, 255, 255, 128],\n [24, 71, 130, 219, 154, 170, 243, 182, 255, 255, 128],\n ],\n [\n [1, 182, 225, 249, 219, 240, 255, 224, 128, 128, 128],\n [149, 150, 226, 252, 216,\n 205, 255, 171, 128, 128, 128,\n ],\n [28, 108, 170, 242, 183, 194, 254, 223, 255, 255, 128],\n ],\n [\n [1, 81, 230, 252, 204, 203, 255, 192, 128, 128, 128],\n [123, 102, 209, 247, 188, 196, 255, 233, 128, 128, 128],\n [20, 95, 153, 243, 164, 173, 255, 203, 128, 128, 128],\n ],\n [\n [1, 222, 248, 255, 216, 213, 128, 128, 128, 128, 128],\n [168, 175, 246, 252, 235, 205, 255, 255, 128, 128, 128],\n [47, 116, 215, 255, 211, 212, 255, 255, 128, 128, 128],\n ],\n [\n [1, 121, 236, 253, 212, 214, 255, 255, 128, 128, 128],\n [141, 84, 213, 252, 201, 202, 255, 219, 128, 128, 128],\n [42, 80, 160, 240, 162, 185, 255, 205, 128, 128, 128],\n ],\n [\n [1, 1, 255, 128, 128, 128, 128,\n 128, 128, 128, 128,\n ],\n [244, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n [238, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n ],\n ],\n ];\n var Rf = [\n [\n [231, 120, 48, 89, 115, 113, 120, 152, 112],\n [152, 179, 64, 126, 170, 118, 46, 70, 95],\n [175, 69, 143, 80, 85, 82, 72, 155, 103],\n [56, 58, 10, 171, 218, 189, 17, 13, 152],\n [114, 26, 17, 163, 44, 195, 21, 10, 173],\n [121, 24, 80, 195, 26, 62, 44, 64, 85],\n [144, 71, 10, 38, 171, 213, 144, 34, 26],\n [170, 46, 55, 19, 136, 160, 33, 206, 71],\n [63, 20, 8, 114, 114, 208, 12, 9, 226],\n [81, 40, 11, 96, 182, 84, 29, 16, 36],\n ],\n [\n [134, 183, 89, 137, 98, 101, 106, 165, 148],\n [72, 187, 100, 130, 157, 111,\n 32, 75, 80,\n ],\n [66, 102, 167, 99, 74, 62, 40, 234, 128],\n [41, 53, 9, 178, 241, 141, 26, 8, 107],\n [74, 43, 26, 146, 73, 166, 49, 23, 157],\n [65, 38, 105, 160, 51, 52, 31, 115, 128],\n [104, 79, 12, 27, 217, 255, 87, 17, 7],\n [87, 68, 71, 44, 114, 51, 15, 186, 23],\n [47, 41, 14, 110, 182, 183, 21, 17, 194],\n [66, 45, 25, 102, 197, 189, 23, 18, 22],\n ],\n [\n [88, 88, 147, 150, 42, 46, 45, 196, 205],\n [43, 97, 183, 117, 85, 38, 35, 179, 61],\n [39, 53, 200, 87, 26, 21, 43, 232, 171],\n [56, 34, 51, 104, 114, 102, 29, 93, 77],\n [39, 28, 85, 171, 58, 165, 90, 98, 64],\n [34, 22, 116, 206, 23, 34, 43, 166, 73],\n [107, 54, 32, 26, 51, 1, 81, 43, 31],\n [68, 25, 106, 22,\n 64, 171, 36, 225, 114,\n ],\n [34, 19, 21, 102, 132, 188, 16, 76, 124],\n [62, 18, 78, 95, 85, 57, 50, 48, 51],\n ],\n [\n [193, 101, 35, 159, 215, 111, 89, 46, 111],\n [60, 148, 31, 172, 219, 228, 21, 18, 111],\n [112, 113, 77, 85, 179, 255, 38, 120, 114],\n [40, 42, 1, 196, 245, 209, 10, 25, 109],\n [88, 43, 29, 140, 166, 213, 37, 43, 154],\n [61, 63, 30, 155, 67, 45, 68, 1, 209],\n [100, 80, 8, 43, 154, 1, 51, 26, 71],\n [142, 78, 78, 16, 255, 128, 34, 197, 171],\n [41, 40, 5, 102, 211, 183, 4, 1, 221],\n [51, 50, 17, 168, 209, 192, 23, 25, 82],\n ],\n [\n [138, 31, 36, 171, 27, 166, 38, 44, 229],\n [67, 87, 58, 169, 82, 115, 26, 59, 179],\n [63, 59, 90, 180, 59, 166, 93, 73,\n 154,\n ],\n [40, 40, 21, 116, 143, 209, 34, 39, 175],\n [47, 15, 16, 183, 34, 223, 49, 45, 183],\n [46, 17, 33, 183, 6, 98, 15, 32, 183],\n [57, 46, 22, 24, 128, 1, 54, 17, 37],\n [65, 32, 73, 115, 28, 128, 23, 128, 205],\n [40, 3, 9, 115, 51, 192, 18, 6, 223],\n [87, 37, 9, 115, 59, 77, 64, 21, 47],\n ],\n [\n [104, 55, 44, 218, 9, 54, 53, 130, 226],\n [64, 90, 70, 205, 40, 41, 23, 26, 57],\n [54, 57, 112, 184, 5, 41, 38, 166, 213],\n [30, 34, 26, 133, 152, 116, 10, 32, 134],\n [39, 19, 53, 221, 26, 114, 32, 73, 255],\n [31, 9, 65, 234, 2, 15, 1, 118, 73],\n [75, 32, 12, 51, 192, 255, 160, 43, 51],\n [88, 31, 35, 67, 102, 85, 55, 186, 85],\n [56, 21, 23, 111, 59, 205, 45, 37, 192],\n [55, 38, 70, 124, 73, 102, 1, 34, 98],\n ],\n [\n [125, 98, 42, 88, 104, 85, 117, 175, 82],\n [95, 84, 53, 89, 128, 100, 113, 101, 45],\n [75, 79, 123, 47, 51, 128, 81, 171, 1],\n [57, 17, 5, 71, 102, 57, 53, 41, 49],\n [38, 33, 13, 121, 57, 73, 26, 1, 85],\n [41, 10, 67, 138, 77, 110, 90, 47, 114],\n [115, 21, 2, 10, 102, 255, 166, 23, 6],\n [101, 29, 16, 10, 85, 128, 101, 196, 26],\n [57, 18, 10, 102, 102, 213, 34, 20, 43],\n [117, 20, 15, 36, 163, 128, 68, 1, 26],\n ],\n [\n [102, 61, 71, 37, 34, 53, 31, 243, 192],\n [69, 60, 71, 38, 73, 119, 28, 222, 37],\n [68, 45, 128, 34, 1, 47, 11, 245, 171],\n [62, 17, 19, 70, 146, 85, 55, 62, 70],\n [37, 43, 37, 154, 100, 163, 85, 160,\n 1,\n ],\n [63, 9, 92, 136, 28, 64, 32, 201, 85],\n [75, 15, 9, 9, 64, 255, 184, 119, 16],\n [86, 6, 28, 5, 64, 255, 25, 248, 1],\n [56, 8, 17, 132, 137, 255, 55, 116, 128],\n [58, 15, 20, 82, 135, 57, 26, 121, 40],\n ],\n [\n [164, 50, 31, 137, 154, 133, 25, 35, 218],\n [51, 103, 44, 131, 131, 123, 31, 6, 158],\n [86, 40, 64, 135, 148, 224, 45, 183, 128],\n [22, 26, 17, 131, 240, 154, 14, 1, 209],\n [45, 16, 21, 91, 64, 222, 7, 1, 197],\n [56, 21, 39, 155, 60, 138, 23, 102, 213],\n [83, 12, 13, 54, 192, 255, 68, 47, 28],\n [85, 26, 85, 85, 128, 128, 32, 146, 171],\n [18, 11, 7, 63, 144, 171, 4, 4, 246],\n [35, 27, 10, 146, 174, 171, 12, 26, 128],\n ],\n [\n [190, 80, 35, 99, 180, 80,\n 126, 54, 45,\n ],\n [85, 126, 47, 87, 176, 51, 41, 20, 32],\n [101, 75, 128, 139, 118, 146, 116, 128, 85],\n [56, 41, 15, 176, 236, 85, 37, 9, 62],\n [71, 30, 17, 119, 118, 255, 17, 18, 138],\n [101, 38, 60, 138, 55, 70, 43, 26, 142],\n [146, 36, 19, 30, 171, 255, 97, 27, 20],\n [138, 45, 61, 62, 219, 1, 81, 188, 64],\n [32, 41, 20, 117, 151, 142, 20, 21, 163],\n [112, 19, 12, 61, 195, 128, 48, 4, 24],\n ],\n ];\n var If = [\n [\n [\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n ],\n [\n [176, 246, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [223, 241,\n 252, 255, 255, 255, 255, 255, 255, 255, 255,\n ],\n [249, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n ],\n [\n [255, 244, 252, 255, 255, 255, 255, 255, 255, 255, 255],\n [234, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n ],\n [\n [255, 246, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [239, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n ],\n [\n [255, 248, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [251, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n ],\n [\n [255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [251, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n ],\n [\n [255, 254, 253, 255, 254, 255, 255, 255, 255, 255, 255],\n [250, 255, 254, 255, 254, 255, 255, 255, 255, 255, 255],\n [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n ],\n [\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n ],\n ],\n [\n [\n [217, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [225, 252, 241, 253, 255, 255, 254, 255,\n 255, 255, 255,\n ],\n [234, 250, 241, 250, 253, 255, 253, 254, 255, 255, 255],\n ],\n [\n [255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [223, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [238, 253, 254, 254, 255, 255, 255, 255, 255, 255, 255],\n ],\n [\n [255, 248, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [249, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n ],\n [\n [255, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [247, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n ],\n [\n [255, 253, 254, 255, 255,\n 255, 255, 255, 255, 255, 255,\n ],\n [252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n ],\n [\n [255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n ],\n [\n [255, 254, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n [250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n ],\n [\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255,\n 255, 255, 255, 255, 255, 255, 255, 255,\n ],\n ],\n ],\n [\n [\n [186, 251, 250, 255, 255, 255, 255, 255, 255, 255, 255],\n [234, 251, 244, 254, 255, 255, 255, 255, 255, 255, 255],\n [251, 251, 243, 253, 254, 255, 254, 255, 255, 255, 255],\n ],\n [\n [255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [236, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [251, 253, 253, 254, 254, 255, 255, 255, 255, 255, 255],\n ],\n [\n [255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [254, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n ],\n [\n [255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [254, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n ],\n [\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n ],\n [\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n ],\n [\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255,\n 255, 255,\n ],\n ],\n [\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n ],\n ],\n [\n [\n [248, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [250, 254, 252, 254, 255, 255, 255, 255, 255, 255, 255],\n [248, 254, 249, 253, 255, 255, 255, 255, 255, 255, 255],\n ],\n [\n [255, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n [246, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n [252, 254, 251, 254, 254, 255, 255, 255, 255, 255, 255],\n ],\n [\n [255, 254, 252, 255, 255, 255, 255, 255, 255, 255, 255],\n [248, 254, 253, 255, 255, 255,\n 255, 255, 255, 255, 255,\n ],\n [253, 255, 254, 254, 255, 255, 255, 255, 255, 255, 255],\n ],\n [\n [255, 251, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [245, 251, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [253, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n ],\n [\n [255, 251, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n [252, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n ],\n [\n [255, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [249, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n ],\n [\n [255, 255, 253,\n 255, 255, 255, 255, 255, 255, 255, 255,\n ],\n [250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n ],\n [\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n ],\n ],\n ];\n this.WebPGetDecoderVersion = this.Ld = function () {\n return 512;\n };\n var Nc = [0, 1, 2, 3, 6, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 0];\n var Jf = [\n [173, 148, 140, 0],\n [176, 155, 140, 135, 0],\n [180, 157, 141, 134, 130, 0],\n [254, 254, 243, 230, 196, 177, 153, 140, 133, 130, 129, 0],\n ];\n var Kf = [0, 1, 4, 8, 5, 2, 3, 6,\n 9, 12, 13, 10, 7, 11, 14, 15,\n ];\n var Tf = md([Kc, Lc], '');\n U(4, x);\n var vc = [\n [0, 0, 0, 0],\n [1, 0, 0, 0],\n [0, 1, 0, 0],\n [1, 1, 0, 0],\n [0, 0, 1, 0],\n [1, 0, 1, 0],\n [0, 1, 1, 0],\n [1, 1, 1, 0],\n [0, 0, 0, 1],\n [1, 0, 0, 1],\n [0, 1, 0, 1],\n [1, 1, 0, 1],\n [0, 0, 1, 1],\n [1, 0, 1, 1],\n [0, 1, 1, 1],\n [1, 1, 1, 1],\n ];\n var Lf = 134480385;\n var ea = 16;\n var J = -227;\n var dd = 482;\n var Ce = [Wc, function (a) {\n return a;\n }, function (a, b, c) {\n return b[c + 0];\n }, function (a, b, c) {\n return b[c + 1];\n }, function (a, b, c) {\n return b[c - 1];\n }, function (a, b, c) {\n return ka(ka(a, b[c + 1]), b[c + 0]);\n }, function (a, b, c) {\n return ka(a, b[c - 1]);\n }, function (a, b, c) {\n return ka(a, b[c + 0]);\n }, function (a,\n b, c) {\n return ka(b[c - 1], b[c + 0]);\n }, function (a, b, c) {\n return ka(b[c + 0], b[c + 1]);\n }, function (a, b, c) {\n return ka(ka(a, b[c - 1]), ka(b[c + 0], b[c + 1]));\n }, function (a, b, c) {\n return Math.abs((a >> 24 & 255) - (b[c - 1] >> 24 & 255)) - Math.abs((b[c + 0] >> 24 & 255) - (b[c - 1] >> 24 & 255)) + (Math.abs((a >> 16 & 255) - (b[c - 1] >> 16 & 255)) - Math.abs((b[c + 0] >> 16 & 255) - (b[c - 1] >> 16 & 255))) + (Math.abs((a >> 8 & 255) - (b[c - 1] >> 8 & 255)) - Math.abs((b[c + 0] >> 8 & 255) - (b[c - 1] >> 8 & 255))) + (Math.abs((a & 255) - (b[c - 1] & 255)) - Math.abs((b[c + 0] & 255) - (b[c - 1] & 255))) <= 0 ? b[c + 0] : a;\n }, function (a, b, c) {\n return ($a((a\n >> 24 & 255) + (b[c + 0] >> 24 & 255) - (b[c - 1] >> 24 & 255)) << 24 | $a((a >> 16 & 255) + (b[c + 0] >> 16 & 255) - (b[c - 1] >> 16 & 255)) << 16 | $a((a >> 8 & 255) + (b[c + 0] >> 8 & 255) - (b[c - 1] >> 8 & 255)) << 8 | $a((a & 255) + (b[c + 0] & 255) - (b[c - 1] & 255))) >>> 0;\n }, function (a, b, c) {\n const d = b[c - 1];\n a = ka(a, b[c + 0]);\n return (yb(a >> 24 & 255, d >> 24 & 255) << 24 | yb(a >> 16 & 255, d >> 16 & 255) << 16 | yb(a >> 8 & 255, d >> 8 & 255) << 8 | yb(a >> 0 & 255, d >> 0 & 255)) >>> 0;\n }, Wc, Wc];\n var Xf = {\n Cc: x,\n Bc: x,\n Kc: x,\n };\n var $c = 16;\n var Me = 16;\n var kg = 16;\n var mg = [2, 3, 7];\n var lg = [3, 3, 11];\n var Zf = 0;\n var $f = 1;\n var ag = 2;\n var bg = 3;\n var cg = 4;\n var hg = [Ba + Ge, Ba, Ba, Ba, 40];\n var Ke = 19;\n var ig = [17, 18, 0, 1, 2, 3, 4, 5, 16,\n 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\n ];\n var He = 120;\n var dg = [24, 7, 23, 25, 40, 6, 39, 41, 22, 26, 38, 42, 56, 5, 55, 57, 21, 27, 54, 58, 37, 43, 72, 4, 71, 73, 20, 28, 53, 59, 70, 74, 36, 44, 88, 69, 75, 52, 60, 3, 87, 89, 19, 29, 86, 90, 35, 45, 68, 76, 85, 91, 51, 61, 104, 2, 103, 105, 18, 30, 102, 106, 34, 46, 84, 92, 67, 77, 101, 107, 50, 62, 120, 1, 119, 121, 83, 93, 17, 31, 100, 108, 66, 78, 118, 122, 33, 47, 117, 123, 49, 63, 99, 109, 82, 94, 0, 116, 124, 65, 79, 16, 32, 98, 110, 48, 115, 125, 81, 95, 64, 114, 126, 97, 111, 80, 113, 127, 96, 112];\n var Jb = 1 << ea - 1;\n var Za = U(256, 0);\n var xb = U(256, 0);\n var vb = U(256, la);\n var wb = U(256, la);\n var ia = U(dd - J, x);\n var Hb = U(dd\n - J, x);\n var Xe = 0;\n var V = Array(Cc);\n var vg = [function (a, b, c, d, e, f, k, h, n, l, m, t, q) {\n Ca(a, b, c, d, e, f, k, h, n, l, m, t, q, hc, 3);\n }, Se, function (a, b, c, d, e, f, k, h, n, l, m, t, q) {\n Ca(a, b, c, d, e, f, k, h, n, l, m, t, q, Vc, 3);\n }, Te, Ue, Ve, function (a, b, c, d, e, f, k, h, n, l, m, t, q) {\n Ca(a, b, c, d, e, f, k, h, n, l, m, t, q, le, 2);\n }, Se, Te, Ue, Ve];\n this.Hd = function (a, b, c, d) {\n return lb(Qa, a, b, c, d);\n };\n this.Id = function (a, b, c, d) {\n return lb(jb, a, b, c, d);\n };\n this.Jd = function (a, b, c, d) {\n return lb(kb, a, b, c, d);\n };\n this.Ed = function (a, b, c, d) {\n return lb(Ab, a, b, c, d);\n };\n this.Fd = function (a, b, c, d) {\n return lb(Zc,\n a, b, c, d);\n };\n this.Gd = function (a, b, c, d) {\n return lb(Pa, a, b, c, d);\n };\n this.WebPDecode = this.Dd = function (a, b, c) {\n const d = M(df);\n let e = 'VP8StatusCode';\n if (c == p) return ta;\n e = hd(a, [0], [b], c.input);\n if (e != L) return e == Z ? W : e;\n d.j = c.j;\n d.Qa = c.Qa;\n return e = cf(a, 0, [b], d);\n };\n};\n" - }, - { - "id": 11, - "identifier": "F:\\tweb\\node_modules\\iobuffer\\lib-esm\\text-encoding-polyfill.js", - "name": "./node_modules/iobuffer/lib-esm/text-encoding-polyfill.js", - "index": 7, - "index2": 1, - "size": 7028, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\iobuffer\\lib-esm\\utf8.browser.js", - "issuerId": null, - "issuerName": "./node_modules/iobuffer/lib-esm/utf8.browser.js", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "name": "./node_modules/fast-png/lib-esm/index.js", - "profile": { - "factory": 2180, - "building": 1082 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "name": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "profile": { - "factory": 21, - "building": 92, - "dependencies": 43 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\iobuffer\\lib-esm\\IOBuffer.js", - "name": "./node_modules/iobuffer/lib-esm/IOBuffer.js", - "profile": { - "factory": 48, - "building": 7 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\iobuffer\\lib-esm\\utf8.browser.js", - "name": "./node_modules/iobuffer/lib-esm/utf8.browser.js", - "profile": { - "factory": 6, - "building": 16 - } - } - ], - "profile": { - "factory": 51, - "building": 5 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 20, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js 1f5c27d337cdd358fe6548a5eda250ca", - "module": "./node_modules/fast-png/lib-esm/index.js + 7 modules", - "moduleName": "./node_modules/fast-png/lib-esm/index.js + 7 modules", - "type": "harmony side effect evaluation", - "userRequest": "./text-encoding-polyfill", - "loc": "1:0-34" - } - ], - "usedExports": false, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 6, - "source": "\"use strict\";\r\n/*\r\n * Copyright 2017 Sam Thorogood. All rights reserved.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\r\n * use this file except in compliance with the License. You may obtain a copy of\r\n * the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\r\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\r\n * License for the specific language governing permissions and limitations under\r\n * the License.\r\n */\r\n(function (scope) {\r\n 'use strict';\r\n // fail early\r\n if (scope['TextEncoder'] && scope['TextDecoder']) {\r\n return false;\r\n }\r\n /**\r\n * @constructor\r\n * @param {string=} utfLabel\r\n */\r\n function FastTextEncoder(utfLabel = 'utf-8') {\r\n if (utfLabel !== 'utf-8') {\r\n throw new RangeError(`Failed to construct 'TextEncoder': The encoding label provided ('${utfLabel}') is invalid.`);\r\n }\r\n }\r\n Object.defineProperty(FastTextEncoder.prototype, 'encoding', {\r\n value: 'utf-8',\r\n });\r\n /**\r\n * @param {string} string\r\n * @param {{stream: boolean}=} options\r\n * @return {!Uint8Array}\r\n */\r\n FastTextEncoder.prototype.encode = function (string, options = { stream: false }) {\r\n if (options.stream) {\r\n throw new Error(`Failed to encode: the 'stream' option is unsupported.`);\r\n }\r\n let pos = 0;\r\n const len = string.length;\r\n const out = [];\r\n let at = 0; // output position\r\n let tlen = Math.max(32, len + (len >> 1) + 7); // 1.5x size\r\n let target = new Uint8Array((tlen >> 3) << 3); // ... but at 8 byte offset\r\n while (pos < len) {\r\n let value = string.charCodeAt(pos++);\r\n if (value >= 0xd800 && value <= 0xdbff) {\r\n // high surrogate\r\n if (pos < len) {\r\n const extra = string.charCodeAt(pos);\r\n if ((extra & 0xfc00) === 0xdc00) {\r\n ++pos;\r\n value = ((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000;\r\n }\r\n }\r\n if (value >= 0xd800 && value <= 0xdbff) {\r\n continue; // drop lone surrogate\r\n }\r\n }\r\n // expand the buffer if we couldn't write 4 bytes\r\n if (at + 4 > target.length) {\r\n tlen += 8; // minimum extra\r\n tlen *= 1.0 + (pos / string.length) * 2; // take 2x the remaining\r\n tlen = (tlen >> 3) << 3; // 8 byte offset\r\n const update = new Uint8Array(tlen);\r\n update.set(target);\r\n target = update;\r\n }\r\n if ((value & 0xffffff80) === 0) {\r\n // 1-byte\r\n target[at++] = value; // ASCII\r\n continue;\r\n }\r\n else if ((value & 0xfffff800) === 0) {\r\n // 2-byte\r\n target[at++] = ((value >> 6) & 0x1f) | 0xc0;\r\n }\r\n else if ((value & 0xffff0000) === 0) {\r\n // 3-byte\r\n target[at++] = ((value >> 12) & 0x0f) | 0xe0;\r\n target[at++] = ((value >> 6) & 0x3f) | 0x80;\r\n }\r\n else if ((value & 0xffe00000) === 0) {\r\n // 4-byte\r\n target[at++] = ((value >> 18) & 0x07) | 0xf0;\r\n target[at++] = ((value >> 12) & 0x3f) | 0x80;\r\n target[at++] = ((value >> 6) & 0x3f) | 0x80;\r\n }\r\n else {\r\n // FIXME: do we care\r\n continue;\r\n }\r\n target[at++] = (value & 0x3f) | 0x80;\r\n }\r\n return target.slice(0, at);\r\n };\r\n /**\r\n * @constructor\r\n * @param {string=} utfLabel\r\n * @param {{fatal: boolean}=} options\r\n */\r\n function FastTextDecoder(utfLabel = 'utf-8', options = { fatal: false }) {\r\n if (utfLabel !== 'utf-8') {\r\n throw new RangeError(`Failed to construct 'TextDecoder': The encoding label provided ('${utfLabel}') is invalid.`);\r\n }\r\n if (options.fatal) {\r\n throw new Error(`Failed to construct 'TextDecoder': the 'fatal' option is unsupported.`);\r\n }\r\n }\r\n Object.defineProperty(FastTextDecoder.prototype, 'encoding', {\r\n value: 'utf-8',\r\n });\r\n Object.defineProperty(FastTextDecoder.prototype, 'fatal', { value: false });\r\n Object.defineProperty(FastTextDecoder.prototype, 'ignoreBOM', {\r\n value: false,\r\n });\r\n /**\r\n * @param {(!ArrayBuffer|!ArrayBufferView)} buffer\r\n * @param {{stream: boolean}=} options\r\n */\r\n FastTextDecoder.prototype.decode = function (buffer, options = { stream: false }) {\r\n if (options['stream']) {\r\n throw new Error(`Failed to decode: the 'stream' option is unsupported.`);\r\n }\r\n const bytes = new Uint8Array(buffer);\r\n let pos = 0;\r\n const len = bytes.length;\r\n const out = [];\r\n while (pos < len) {\r\n const byte1 = bytes[pos++];\r\n if (byte1 === 0) {\r\n break; // NULL\r\n }\r\n if ((byte1 & 0x80) === 0) {\r\n // 1-byte\r\n out.push(byte1);\r\n }\r\n else if ((byte1 & 0xe0) === 0xc0) {\r\n // 2-byte\r\n const byte2 = bytes[pos++] & 0x3f;\r\n out.push(((byte1 & 0x1f) << 6) | byte2);\r\n }\r\n else if ((byte1 & 0xf0) === 0xe0) {\r\n const byte2 = bytes[pos++] & 0x3f;\r\n const byte3 = bytes[pos++] & 0x3f;\r\n out.push(((byte1 & 0x1f) << 12) | (byte2 << 6) | byte3);\r\n }\r\n else if ((byte1 & 0xf8) === 0xf0) {\r\n const byte2 = bytes[pos++] & 0x3f;\r\n const byte3 = bytes[pos++] & 0x3f;\r\n const byte4 = bytes[pos++] & 0x3f;\r\n // this can be > 0xffff, so possibly generate surrogates\r\n let codepoint = ((byte1 & 0x07) << 0x12) | (byte2 << 0x0c) | (byte3 << 0x06) | byte4;\r\n if (codepoint > 0xffff) {\r\n // codepoint &= ~0x10000;\r\n codepoint -= 0x10000;\r\n out.push(((codepoint >>> 10) & 0x3ff) | 0xd800);\r\n codepoint = 0xdc00 | (codepoint & 0x3ff);\r\n }\r\n out.push(codepoint);\r\n }\r\n else {\r\n // FIXME: we're ignoring this\r\n }\r\n }\r\n return String.fromCharCode.apply(null, out);\r\n };\r\n scope['TextEncoder'] = FastTextEncoder;\r\n scope['TextDecoder'] = FastTextDecoder;\r\n})(typeof window !== 'undefined'\r\n ? window\r\n : typeof self !== 'undefined'\r\n ? self\r\n : this);\r\n//# sourceMappingURL=text-encoding-polyfill.js.map" - }, - { - "id": 12, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\deflate.js", - "name": "./node_modules/pako/lib/deflate.js", - "index": 10, - "index2": 12, - "size": 11074, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\pako\\index.js", - "issuerId": 1, - "issuerName": "./node_modules/pako/index.js", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "name": "./node_modules/fast-png/lib-esm/index.js", - "profile": { - "factory": 2180, - "building": 1082 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "name": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "profile": { - "factory": 21, - "building": 92, - "dependencies": 43 - } - }, - { - "id": 1, - "identifier": "F:\\tweb\\node_modules\\pako\\index.js", - "name": "./node_modules/pako/index.js", - "profile": { - "factory": 48, - "building": 7 - } - } - ], - "profile": { - "factory": 11, - "building": 13, - "dependencies": 8 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 1, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\index.js", - "module": "./node_modules/pako/index.js", - "moduleName": "./node_modules/pako/index.js", - "type": "cjs require", - "userRequest": "./lib/deflate", - "loc": "6:16-40" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 5, - "source": "'use strict';\n\n\nvar zlib_deflate = require('./zlib/deflate');\nvar utils = require('./utils/common');\nvar strings = require('./utils/strings');\nvar msg = require('./zlib/messages');\nvar ZStream = require('./zlib/zstream');\n\nvar toString = Object.prototype.toString;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nvar Z_NO_FLUSH = 0;\nvar Z_FINISH = 4;\n\nvar Z_OK = 0;\nvar Z_STREAM_END = 1;\nvar Z_SYNC_FLUSH = 2;\n\nvar Z_DEFAULT_COMPRESSION = -1;\n\nvar Z_DEFAULT_STRATEGY = 0;\n\nvar Z_DEFLATED = 8;\n\n/* ===========================================================================*/\n\n\n/**\n * class Deflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[deflate]],\n * [[deflateRaw]] and [[gzip]].\n **/\n\n/* internal\n * Deflate.chunks -> Array\n *\n * Chunks of output data, if [[Deflate#onData]] not overridden.\n **/\n\n/**\n * Deflate.result -> Uint8Array|Array\n *\n * Compressed result, generated by default [[Deflate#onData]]\n * and [[Deflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Deflate#push]] with `Z_FINISH` / `true` param) or if you\n * push a chunk with explicit flush (call [[Deflate#push]] with\n * `Z_SYNC_FLUSH` param).\n **/\n\n/**\n * Deflate.err -> Number\n *\n * Error code after deflate finished. 0 (Z_OK) on success.\n * You will not need it in real life, because deflate errors\n * are possible only on wrong options or bad `onData` / `onEnd`\n * custom handlers.\n **/\n\n/**\n * Deflate.msg -> String\n *\n * Error message, if [[Deflate.err]] != 0\n **/\n\n\n/**\n * new Deflate(options)\n * - options (Object): zlib deflate options.\n *\n * Creates new deflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `level`\n * - `windowBits`\n * - `memLevel`\n * - `strategy`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw deflate\n * - `gzip` (Boolean) - create gzip wrapper\n * - `to` (String) - if equal to 'string', then result will be \"binary string\"\n * (each char code [0..255])\n * - `header` (Object) - custom header for gzip\n * - `text` (Boolean) - true if compressed data believed to be text\n * - `time` (Number) - modification time, unix timestamp\n * - `os` (Number) - operation system code\n * - `extra` (Array) - array of bytes with extra data (max 65536)\n * - `name` (String) - file name (binary string)\n * - `comment` (String) - comment (binary string)\n * - `hcrc` (Boolean) - true if header crc should be added\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])\n * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * var deflate = new pako.Deflate({ level: 3});\n *\n * deflate.push(chunk1, false);\n * deflate.push(chunk2, true); // true -> last chunk\n *\n * if (deflate.err) { throw new Error(deflate.err); }\n *\n * console.log(deflate.result);\n * ```\n **/\nfunction Deflate(options) {\n if (!(this instanceof Deflate)) return new Deflate(options);\n\n this.options = utils.assign({\n level: Z_DEFAULT_COMPRESSION,\n method: Z_DEFLATED,\n chunkSize: 16384,\n windowBits: 15,\n memLevel: 8,\n strategy: Z_DEFAULT_STRATEGY,\n to: ''\n }, options || {});\n\n var opt = this.options;\n\n if (opt.raw && (opt.windowBits > 0)) {\n opt.windowBits = -opt.windowBits;\n }\n\n else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) {\n opt.windowBits += 16;\n }\n\n this.err = 0; // error code, if happens (0 = Z_OK)\n this.msg = ''; // error message\n this.ended = false; // used to avoid multiple onEnd() calls\n this.chunks = []; // chunks of compressed data\n\n this.strm = new ZStream();\n this.strm.avail_out = 0;\n\n var status = zlib_deflate.deflateInit2(\n this.strm,\n opt.level,\n opt.method,\n opt.windowBits,\n opt.memLevel,\n opt.strategy\n );\n\n if (status !== Z_OK) {\n throw new Error(msg[status]);\n }\n\n if (opt.header) {\n zlib_deflate.deflateSetHeader(this.strm, opt.header);\n }\n\n if (opt.dictionary) {\n var dict;\n // Convert data if needed\n if (typeof opt.dictionary === 'string') {\n // If we need to compress text, change encoding to utf8.\n dict = strings.string2buf(opt.dictionary);\n } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {\n dict = new Uint8Array(opt.dictionary);\n } else {\n dict = opt.dictionary;\n }\n\n status = zlib_deflate.deflateSetDictionary(this.strm, dict);\n\n if (status !== Z_OK) {\n throw new Error(msg[status]);\n }\n\n this._dict_set = true;\n }\n}\n\n/**\n * Deflate#push(data[, mode]) -> Boolean\n * - data (Uint8Array|Array|ArrayBuffer|String): input data. Strings will be\n * converted to utf8 byte sequence.\n * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.\n *\n * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with\n * new compressed chunks. Returns `true` on success. The last data block must have\n * mode Z_FINISH (or `true`). That will flush internal pending buffers and call\n * [[Deflate#onEnd]]. For interim explicit flushes (without ending the stream) you\n * can use mode Z_SYNC_FLUSH, keeping the compression context.\n *\n * On fail call [[Deflate#onEnd]] with error code and return false.\n *\n * We strongly recommend to use `Uint8Array` on input for best speed (output\n * array format is detected automatically). Also, don't skip last param and always\n * use the same type in your code (boolean or number). That will improve JS speed.\n *\n * For regular `Array`-s make sure all elements are [0..255].\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true); // push last chunk\n * ```\n **/\nDeflate.prototype.push = function (data, mode) {\n var strm = this.strm;\n var chunkSize = this.options.chunkSize;\n var status, _mode;\n\n if (this.ended) { return false; }\n\n _mode = (mode === ~~mode) ? mode : ((mode === true) ? Z_FINISH : Z_NO_FLUSH);\n\n // Convert data if needed\n if (typeof data === 'string') {\n // If we need to compress text, change encoding to utf8.\n strm.input = strings.string2buf(data);\n } else if (toString.call(data) === '[object ArrayBuffer]') {\n strm.input = new Uint8Array(data);\n } else {\n strm.input = data;\n }\n\n strm.next_in = 0;\n strm.avail_in = strm.input.length;\n\n do {\n if (strm.avail_out === 0) {\n strm.output = new utils.Buf8(chunkSize);\n strm.next_out = 0;\n strm.avail_out = chunkSize;\n }\n status = zlib_deflate.deflate(strm, _mode); /* no bad return value */\n\n if (status !== Z_STREAM_END && status !== Z_OK) {\n this.onEnd(status);\n this.ended = true;\n return false;\n }\n if (strm.avail_out === 0 || (strm.avail_in === 0 && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH))) {\n if (this.options.to === 'string') {\n this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out)));\n } else {\n this.onData(utils.shrinkBuf(strm.output, strm.next_out));\n }\n }\n } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END);\n\n // Finalize on the last chunk.\n if (_mode === Z_FINISH) {\n status = zlib_deflate.deflateEnd(this.strm);\n this.onEnd(status);\n this.ended = true;\n return status === Z_OK;\n }\n\n // callback interim results if Z_SYNC_FLUSH.\n if (_mode === Z_SYNC_FLUSH) {\n this.onEnd(Z_OK);\n strm.avail_out = 0;\n return true;\n }\n\n return true;\n};\n\n\n/**\n * Deflate#onData(chunk) -> Void\n * - chunk (Uint8Array|Array|String): output data. Type of array depends\n * on js engine support. When string output requested, each chunk\n * will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nDeflate.prototype.onData = function (chunk) {\n this.chunks.push(chunk);\n};\n\n\n/**\n * Deflate#onEnd(status) -> Void\n * - status (Number): deflate status. 0 (Z_OK) on success,\n * other if not.\n *\n * Called once after you tell deflate that the input stream is\n * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)\n * or if an error happened. By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nDeflate.prototype.onEnd = function (status) {\n // On success - join\n if (status === Z_OK) {\n if (this.options.to === 'string') {\n this.result = this.chunks.join('');\n } else {\n this.result = utils.flattenChunks(this.chunks);\n }\n }\n this.chunks = [];\n this.err = status;\n this.msg = this.strm.msg;\n};\n\n\n/**\n * deflate(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * Compress `data` with deflate algorithm and `options`.\n *\n * Supported options are:\n *\n * - level\n * - windowBits\n * - memLevel\n * - strategy\n * - dictionary\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n * negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be \"binary string\"\n * (each char code [0..255])\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , data = Uint8Array([1,2,3,4,5,6,7,8,9]);\n *\n * console.log(pako.deflate(data));\n * ```\n **/\nfunction deflate(input, options) {\n var deflator = new Deflate(options);\n\n deflator.push(input, true);\n\n // That will never happens, if you don't cheat with options :)\n if (deflator.err) { throw deflator.msg || msg[deflator.err]; }\n\n return deflator.result;\n}\n\n\n/**\n * deflateRaw(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction deflateRaw(input, options) {\n options = options || {};\n options.raw = true;\n return deflate(input, options);\n}\n\n\n/**\n * gzip(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but create gzip wrapper instead of\n * deflate one.\n **/\nfunction gzip(input, options) {\n options = options || {};\n options.gzip = true;\n return deflate(input, options);\n}\n\n\nexports.Deflate = Deflate;\nexports.deflate = deflate;\nexports.deflateRaw = deflateRaw;\nexports.gzip = gzip;\n" - }, - { - "id": 13, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\deflate.js", - "name": "./node_modules/pako/lib/zlib/deflate.js", - "index": 11, - "index2": 9, - "size": 61184, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\pako\\lib\\deflate.js", - "issuerId": 12, - "issuerName": "./node_modules/pako/lib/deflate.js", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "name": "./node_modules/fast-png/lib-esm/index.js", - "profile": { - "factory": 2180, - "building": 1082 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "name": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "profile": { - "factory": 21, - "building": 92, - "dependencies": 43 - } - }, - { - "id": 1, - "identifier": "F:\\tweb\\node_modules\\pako\\index.js", - "name": "./node_modules/pako/index.js", - "profile": { - "factory": 48, - "building": 7 - } - }, - { - "id": 12, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\deflate.js", - "name": "./node_modules/pako/lib/deflate.js", - "profile": { - "factory": 11, - "building": 13, - "dependencies": 8 - } - } - ], - "profile": { - "factory": 16, - "building": 21, - "dependencies": 2 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 12, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\lib\\deflate.js", - "module": "./node_modules/pako/lib/deflate.js", - "moduleName": "./node_modules/pako/lib/deflate.js", - "type": "cjs require", - "userRequest": "./zlib/deflate", - "loc": "4:19-44" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 6, - "source": "'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils = require('../utils/common');\nvar trees = require('./trees');\nvar adler32 = require('./adler32');\nvar crc32 = require('./crc32');\nvar msg = require('./messages');\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n/* Allowed flush values; see deflate() and inflate() below for details */\nvar Z_NO_FLUSH = 0;\nvar Z_PARTIAL_FLUSH = 1;\n//var Z_SYNC_FLUSH = 2;\nvar Z_FULL_FLUSH = 3;\nvar Z_FINISH = 4;\nvar Z_BLOCK = 5;\n//var Z_TREES = 6;\n\n\n/* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\nvar Z_OK = 0;\nvar Z_STREAM_END = 1;\n//var Z_NEED_DICT = 2;\n//var Z_ERRNO = -1;\nvar Z_STREAM_ERROR = -2;\nvar Z_DATA_ERROR = -3;\n//var Z_MEM_ERROR = -4;\nvar Z_BUF_ERROR = -5;\n//var Z_VERSION_ERROR = -6;\n\n\n/* compression levels */\n//var Z_NO_COMPRESSION = 0;\n//var Z_BEST_SPEED = 1;\n//var Z_BEST_COMPRESSION = 9;\nvar Z_DEFAULT_COMPRESSION = -1;\n\n\nvar Z_FILTERED = 1;\nvar Z_HUFFMAN_ONLY = 2;\nvar Z_RLE = 3;\nvar Z_FIXED = 4;\nvar Z_DEFAULT_STRATEGY = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\n//var Z_BINARY = 0;\n//var Z_TEXT = 1;\n//var Z_ASCII = 1; // = Z_TEXT\nvar Z_UNKNOWN = 2;\n\n\n/* The deflate compression method */\nvar Z_DEFLATED = 8;\n\n/*============================================================================*/\n\n\nvar MAX_MEM_LEVEL = 9;\n/* Maximum value for memLevel in deflateInit2 */\nvar MAX_WBITS = 15;\n/* 32K LZ77 window */\nvar DEF_MEM_LEVEL = 8;\n\n\nvar LENGTH_CODES = 29;\n/* number of length codes, not counting the special END_BLOCK code */\nvar LITERALS = 256;\n/* number of literal bytes 0..255 */\nvar L_CODES = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\nvar D_CODES = 30;\n/* number of distance codes */\nvar BL_CODES = 19;\n/* number of codes used to transfer the bit lengths */\nvar HEAP_SIZE = 2 * L_CODES + 1;\n/* maximum heap size */\nvar MAX_BITS = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nvar MIN_MATCH = 3;\nvar MAX_MATCH = 258;\nvar MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nvar PRESET_DICT = 0x20;\n\nvar INIT_STATE = 42;\nvar EXTRA_STATE = 69;\nvar NAME_STATE = 73;\nvar COMMENT_STATE = 91;\nvar HCRC_STATE = 103;\nvar BUSY_STATE = 113;\nvar FINISH_STATE = 666;\n\nvar BS_NEED_MORE = 1; /* block not completed, need more input or more output */\nvar BS_BLOCK_DONE = 2; /* block flush performed */\nvar BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */\nvar BS_FINISH_DONE = 4; /* finish done, accept no more input or output */\n\nvar OS_CODE = 0x03; // Unix :) . Don't detect, use this default.\n\nfunction err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}\n\nfunction rank(f) {\n return ((f) << 1) - ((f) > 4 ? 9 : 0);\n}\n\nfunction zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }\n\n\n/* =========================================================================\n * Flush as much pending output as possible. All deflate() output goes\n * through this function so some applications may wish to modify it\n * to avoid allocating a large strm->output buffer and copying into it.\n * (See also read_buf()).\n */\nfunction flush_pending(strm) {\n var s = strm.state;\n\n //_tr_flush_bits(s);\n var len = s.pending;\n if (len > strm.avail_out) {\n len = strm.avail_out;\n }\n if (len === 0) { return; }\n\n utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out);\n strm.next_out += len;\n s.pending_out += len;\n strm.total_out += len;\n strm.avail_out -= len;\n s.pending -= len;\n if (s.pending === 0) {\n s.pending_out = 0;\n }\n}\n\n\nfunction flush_block_only(s, last) {\n trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last);\n s.block_start = s.strstart;\n flush_pending(s.strm);\n}\n\n\nfunction put_byte(s, b) {\n s.pending_buf[s.pending++] = b;\n}\n\n\n/* =========================================================================\n * Put a short in the pending buffer. The 16-bit value is put in MSB order.\n * IN assertion: the stream state is correct and there is enough room in\n * pending_buf.\n */\nfunction putShortMSB(s, b) {\n// put_byte(s, (Byte)(b >> 8));\n// put_byte(s, (Byte)(b & 0xff));\n s.pending_buf[s.pending++] = (b >>> 8) & 0xff;\n s.pending_buf[s.pending++] = b & 0xff;\n}\n\n\n/* ===========================================================================\n * Read a new buffer from the current input stream, update the adler32\n * and total number of bytes read. All deflate() input goes through\n * this function so some applications may wish to modify it to avoid\n * allocating a large strm->input buffer and copying from it.\n * (See also flush_pending()).\n */\nfunction read_buf(strm, buf, start, size) {\n var len = strm.avail_in;\n\n if (len > size) { len = size; }\n if (len === 0) { return 0; }\n\n strm.avail_in -= len;\n\n // zmemcpy(buf, strm->next_in, len);\n utils.arraySet(buf, strm.input, strm.next_in, len, start);\n if (strm.state.wrap === 1) {\n strm.adler = adler32(strm.adler, buf, len, start);\n }\n\n else if (strm.state.wrap === 2) {\n strm.adler = crc32(strm.adler, buf, len, start);\n }\n\n strm.next_in += len;\n strm.total_in += len;\n\n return len;\n}\n\n\n/* ===========================================================================\n * Set match_start to the longest match starting at the given string and\n * return its length. Matches shorter or equal to prev_length are discarded,\n * in which case the result is equal to prev_length and match_start is\n * garbage.\n * IN assertions: cur_match is the head of the hash chain for the current\n * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1\n * OUT assertion: the match length is not greater than s->lookahead.\n */\nfunction longest_match(s, cur_match) {\n var chain_length = s.max_chain_length; /* max hash chain length */\n var scan = s.strstart; /* current string */\n var match; /* matched string */\n var len; /* length of current match */\n var best_len = s.prev_length; /* best match length so far */\n var nice_match = s.nice_match; /* stop if match long enough */\n var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ?\n s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/;\n\n var _win = s.window; // shortcut\n\n var wmask = s.w_mask;\n var prev = s.prev;\n\n /* Stop when cur_match becomes <= limit. To simplify the code,\n * we prevent matches with the string of window index 0.\n */\n\n var strend = s.strstart + MAX_MATCH;\n var scan_end1 = _win[scan + best_len - 1];\n var scan_end = _win[scan + best_len];\n\n /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.\n * It is easy to get rid of this optimization if necessary.\n */\n // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, \"Code too clever\");\n\n /* Do not waste too much time if we already have a good match: */\n if (s.prev_length >= s.good_match) {\n chain_length >>= 2;\n }\n /* Do not look for matches beyond the end of the input. This is necessary\n * to make deflate deterministic.\n */\n if (nice_match > s.lookahead) { nice_match = s.lookahead; }\n\n // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, \"need lookahead\");\n\n do {\n // Assert(cur_match < s->strstart, \"no future\");\n match = cur_match;\n\n /* Skip to next match if the match length cannot increase\n * or if the match length is less than 2. Note that the checks below\n * for insufficient lookahead only occur occasionally for performance\n * reasons. Therefore uninitialized memory will be accessed, and\n * conditional jumps will be made that depend on those values.\n * However the length of the match is limited to the lookahead, so\n * the output of deflate is not affected by the uninitialized values.\n */\n\n if (_win[match + best_len] !== scan_end ||\n _win[match + best_len - 1] !== scan_end1 ||\n _win[match] !== _win[scan] ||\n _win[++match] !== _win[scan + 1]) {\n continue;\n }\n\n /* The check at best_len-1 can be removed because it will be made\n * again later. (This heuristic is not always a win.)\n * It is not necessary to compare scan[2] and match[2] since they\n * are always equal when the other bytes match, given that\n * the hash keys are equal and that HASH_BITS >= 8.\n */\n scan += 2;\n match++;\n // Assert(*scan == *match, \"match[2]?\");\n\n /* We check for insufficient lookahead only every 8th comparison;\n * the 256th check will be made at strstart+258.\n */\n do {\n /*jshint noempty:false*/\n } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n scan < strend);\n\n // Assert(scan <= s->window+(unsigned)(s->window_size-1), \"wild scan\");\n\n len = MAX_MATCH - (strend - scan);\n scan = strend - MAX_MATCH;\n\n if (len > best_len) {\n s.match_start = cur_match;\n best_len = len;\n if (len >= nice_match) {\n break;\n }\n scan_end1 = _win[scan + best_len - 1];\n scan_end = _win[scan + best_len];\n }\n } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0);\n\n if (best_len <= s.lookahead) {\n return best_len;\n }\n return s.lookahead;\n}\n\n\n/* ===========================================================================\n * Fill the window when the lookahead becomes insufficient.\n * Updates strstart and lookahead.\n *\n * IN assertion: lookahead < MIN_LOOKAHEAD\n * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n * At least one byte has been read, or avail_in == 0; reads are\n * performed for at least two bytes (required for the zip translate_eol\n * option -- not supported here).\n */\nfunction fill_window(s) {\n var _w_size = s.w_size;\n var p, n, m, more, str;\n\n //Assert(s->lookahead < MIN_LOOKAHEAD, \"already enough lookahead\");\n\n do {\n more = s.window_size - s.lookahead - s.strstart;\n\n // JS ints have 32 bit, block below not needed\n /* Deal with !@#$% 64K limit: */\n //if (sizeof(int) <= 2) {\n // if (more == 0 && s->strstart == 0 && s->lookahead == 0) {\n // more = wsize;\n //\n // } else if (more == (unsigned)(-1)) {\n // /* Very unlikely, but possible on 16 bit machine if\n // * strstart == 0 && lookahead == 1 (input done a byte at time)\n // */\n // more--;\n // }\n //}\n\n\n /* If the window is almost full and there is insufficient lookahead,\n * move the upper half to the lower one to make room in the upper half.\n */\n if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) {\n\n utils.arraySet(s.window, s.window, _w_size, _w_size, 0);\n s.match_start -= _w_size;\n s.strstart -= _w_size;\n /* we now have strstart >= MAX_DIST */\n s.block_start -= _w_size;\n\n /* Slide the hash table (could be avoided with 32 bit values\n at the expense of memory usage). We slide even when level == 0\n to keep the hash table consistent if we switch back to level > 0\n later. (Using level 0 permanently is not an optimal usage of\n zlib, so we don't care about this pathological case.)\n */\n\n n = s.hash_size;\n p = n;\n do {\n m = s.head[--p];\n s.head[p] = (m >= _w_size ? m - _w_size : 0);\n } while (--n);\n\n n = _w_size;\n p = n;\n do {\n m = s.prev[--p];\n s.prev[p] = (m >= _w_size ? m - _w_size : 0);\n /* If n is not on any hash chain, prev[n] is garbage but\n * its value will never be used.\n */\n } while (--n);\n\n more += _w_size;\n }\n if (s.strm.avail_in === 0) {\n break;\n }\n\n /* If there was no sliding:\n * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n * more == window_size - lookahead - strstart\n * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n * => more >= window_size - 2*WSIZE + 2\n * In the BIG_MEM or MMAP case (not yet supported),\n * window_size == input_size + MIN_LOOKAHEAD &&\n * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n * Otherwise, window_size == 2*WSIZE so more >= 2.\n * If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n */\n //Assert(more >= 2, \"more < 2\");\n n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more);\n s.lookahead += n;\n\n /* Initialize the hash value now that we have some input: */\n if (s.lookahead + s.insert >= MIN_MATCH) {\n str = s.strstart - s.insert;\n s.ins_h = s.window[str];\n\n /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask;\n//#if MIN_MATCH != 3\n// Call update_hash() MIN_MATCH-3 more times\n//#endif\n while (s.insert) {\n /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask;\n\n s.prev[str & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = str;\n str++;\n s.insert--;\n if (s.lookahead + s.insert < MIN_MATCH) {\n break;\n }\n }\n }\n /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,\n * but this is not important since only literal bytes will be emitted.\n */\n\n } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0);\n\n /* If the WIN_INIT bytes after the end of the current data have never been\n * written, then zero those bytes in order to avoid memory check reports of\n * the use of uninitialized (or uninitialised as Julian writes) bytes by\n * the longest match routines. Update the high water mark for the next\n * time through here. WIN_INIT is set to MAX_MATCH since the longest match\n * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.\n */\n// if (s.high_water < s.window_size) {\n// var curr = s.strstart + s.lookahead;\n// var init = 0;\n//\n// if (s.high_water < curr) {\n// /* Previous high water mark below current data -- zero WIN_INIT\n// * bytes or up to end of window, whichever is less.\n// */\n// init = s.window_size - curr;\n// if (init > WIN_INIT)\n// init = WIN_INIT;\n// zmemzero(s->window + curr, (unsigned)init);\n// s->high_water = curr + init;\n// }\n// else if (s->high_water < (ulg)curr + WIN_INIT) {\n// /* High water mark at or above current data, but below current data\n// * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up\n// * to end of window, whichever is less.\n// */\n// init = (ulg)curr + WIN_INIT - s->high_water;\n// if (init > s->window_size - s->high_water)\n// init = s->window_size - s->high_water;\n// zmemzero(s->window + s->high_water, (unsigned)init);\n// s->high_water += init;\n// }\n// }\n//\n// Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,\n// \"not enough room for search\");\n}\n\n/* ===========================================================================\n * Copy without compression as much as possible from the input stream, return\n * the current block state.\n * This function does not insert new strings in the dictionary since\n * uncompressible data is probably not useful. This function is used\n * only for the level=0 compression option.\n * NOTE: this function should be optimized to avoid extra copying from\n * window to pending_buf.\n */\nfunction deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}\n\n/* ===========================================================================\n * Compress as much as possible from the input stream, return the current\n * block state.\n * This function does not perform lazy evaluation of matches and inserts\n * new strings in the dictionary only for unmatched strings or for short\n * matches. It is used only for the fast compression options.\n */\nfunction deflate_fast(s, flush) {\n var hash_head; /* head of the hash chain */\n var bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) {\n break; /* flush the current block */\n }\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0/*NIL*/;\n if (s.lookahead >= MIN_MATCH) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n * At this point we have always match_length < MIN_MATCH\n */\n if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n }\n if (s.match_length >= MIN_MATCH) {\n // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only\n\n /*** _tr_tally_dist(s, s.strstart - s.match_start,\n s.match_length - MIN_MATCH, bflush); ***/\n bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH);\n\n s.lookahead -= s.match_length;\n\n /* Insert new strings in the hash table only if the match length\n * is not too large. This saves time but degrades compression.\n */\n if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) {\n s.match_length--; /* string at strstart already in table */\n do {\n s.strstart++;\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n /* strstart never exceeds WSIZE-MAX_MATCH, so there are\n * always MIN_MATCH bytes ahead.\n */\n } while (--s.match_length !== 0);\n s.strstart++;\n } else\n {\n s.strstart += s.match_length;\n s.match_length = 0;\n s.ins_h = s.window[s.strstart];\n /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask;\n\n//#if MIN_MATCH != 3\n// Call UPDATE_HASH() MIN_MATCH-3 more times\n//#endif\n /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not\n * matter since it will be recomputed at next deflate call.\n */\n }\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s.window[s.strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1);\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n}\n\n/* ===========================================================================\n * Same as above, but achieves better compression. We use a lazy\n * evaluation for matches: a match is finally adopted only if there is\n * no better match at the next window position.\n */\nfunction deflate_slow(s, flush) {\n var hash_head; /* head of hash chain */\n var bflush; /* set if current block must be flushed */\n\n var max_insert;\n\n /* Process the input block. */\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) { break; } /* flush the current block */\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0/*NIL*/;\n if (s.lookahead >= MIN_MATCH) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n */\n s.prev_length = s.match_length;\n s.prev_match = s.match_start;\n s.match_length = MIN_MATCH - 1;\n\n if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match &&\n s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n\n if (s.match_length <= 5 &&\n (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) {\n\n /* If prev_match is also MIN_MATCH, match_start is garbage\n * but we will ignore the current match anyway.\n */\n s.match_length = MIN_MATCH - 1;\n }\n }\n /* If there was a match at the previous step and the current\n * match is not better, output the previous match:\n */\n if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) {\n max_insert = s.strstart + s.lookahead - MIN_MATCH;\n /* Do not insert strings in hash table beyond this. */\n\n //check_match(s, s.strstart-1, s.prev_match, s.prev_length);\n\n /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,\n s.prev_length - MIN_MATCH, bflush);***/\n bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH);\n /* Insert in hash table all strings up to the end of the match.\n * strstart-1 and strstart are already inserted. If there is not\n * enough lookahead, the last two strings are not inserted in\n * the hash table.\n */\n s.lookahead -= s.prev_length - 1;\n s.prev_length -= 2;\n do {\n if (++s.strstart <= max_insert) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n } while (--s.prev_length !== 0);\n s.match_available = 0;\n s.match_length = MIN_MATCH - 1;\n s.strstart++;\n\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n } else if (s.match_available) {\n /* If there was no match at the previous position, output a\n * single literal. If there was a match but the current match\n * is longer, truncate the previous match to a single literal.\n */\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);\n\n if (bflush) {\n /*** FLUSH_BLOCK_ONLY(s, 0) ***/\n flush_block_only(s, false);\n /***/\n }\n s.strstart++;\n s.lookahead--;\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n } else {\n /* There is no previous match to compare with, wait for\n * the next step to decide.\n */\n s.match_available = 1;\n s.strstart++;\n s.lookahead--;\n }\n }\n //Assert (flush != Z_NO_FLUSH, \"no flush?\");\n if (s.match_available) {\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);\n\n s.match_available = 0;\n }\n s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_BLOCK_DONE;\n}\n\n\n/* ===========================================================================\n * For Z_RLE, simply look for runs of bytes, generate matches only of distance\n * one. Do not maintain a hash table. (It will be regenerated if this run of\n * deflate switches away from Z_RLE.)\n */\nfunction deflate_rle(s, flush) {\n var bflush; /* set if current block must be flushed */\n var prev; /* byte at distance one to match */\n var scan, strend; /* scan goes up to strend for length of run */\n\n var _win = s.window;\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the longest run, plus one for the unrolled loop.\n */\n if (s.lookahead <= MAX_MATCH) {\n fill_window(s);\n if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) { break; } /* flush the current block */\n }\n\n /* See how many times the previous byte repeats */\n s.match_length = 0;\n if (s.lookahead >= MIN_MATCH && s.strstart > 0) {\n scan = s.strstart - 1;\n prev = _win[scan];\n if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) {\n strend = s.strstart + MAX_MATCH;\n do {\n /*jshint noempty:false*/\n } while (prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n scan < strend);\n s.match_length = MAX_MATCH - (strend - scan);\n if (s.match_length > s.lookahead) {\n s.match_length = s.lookahead;\n }\n }\n //Assert(scan <= s->window+(uInt)(s->window_size-1), \"wild scan\");\n }\n\n /* Emit match if have run of MIN_MATCH or longer, else emit literal */\n if (s.match_length >= MIN_MATCH) {\n //check_match(s, s.strstart, s.strstart - 1, s.match_length);\n\n /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/\n bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH);\n\n s.lookahead -= s.match_length;\n s.strstart += s.match_length;\n s.match_length = 0;\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n}\n\n/* ===========================================================================\n * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table.\n * (It will be regenerated if this run of deflate switches away from Huffman.)\n */\nfunction deflate_huff(s, flush) {\n var bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we have a literal to write. */\n if (s.lookahead === 0) {\n fill_window(s);\n if (s.lookahead === 0) {\n if (flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n break; /* flush the current block */\n }\n }\n\n /* Output a literal byte */\n s.match_length = 0;\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n s.lookahead--;\n s.strstart++;\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n}\n\n/* Values for max_lazy_match, good_match and max_chain_length, depending on\n * the desired pack level (0..9). The values given below have been tuned to\n * exclude worst case performance for pathological files. Better values may be\n * found for specific files.\n */\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n this.good_length = good_length;\n this.max_lazy = max_lazy;\n this.nice_length = nice_length;\n this.max_chain = max_chain;\n this.func = func;\n}\n\nvar configuration_table;\n\nconfiguration_table = [\n /* good lazy nice chain */\n new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */\n new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */\n new Config(4, 5, 16, 8, deflate_fast), /* 2 */\n new Config(4, 6, 32, 32, deflate_fast), /* 3 */\n\n new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */\n new Config(8, 16, 32, 32, deflate_slow), /* 5 */\n new Config(8, 16, 128, 128, deflate_slow), /* 6 */\n new Config(8, 32, 128, 256, deflate_slow), /* 7 */\n new Config(32, 128, 258, 1024, deflate_slow), /* 8 */\n new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */\n];\n\n\n/* ===========================================================================\n * Initialize the \"longest match\" routines for a new zlib stream\n */\nfunction lm_init(s) {\n s.window_size = 2 * s.w_size;\n\n /*** CLEAR_HASH(s); ***/\n zero(s.head); // Fill with NIL (= 0);\n\n /* Set the default configuration parameters:\n */\n s.max_lazy_match = configuration_table[s.level].max_lazy;\n s.good_match = configuration_table[s.level].good_length;\n s.nice_match = configuration_table[s.level].nice_length;\n s.max_chain_length = configuration_table[s.level].max_chain;\n\n s.strstart = 0;\n s.block_start = 0;\n s.lookahead = 0;\n s.insert = 0;\n s.match_length = s.prev_length = MIN_MATCH - 1;\n s.match_available = 0;\n s.ins_h = 0;\n}\n\n\nfunction DeflateState() {\n this.strm = null; /* pointer back to this zlib stream */\n this.status = 0; /* as the name implies */\n this.pending_buf = null; /* output still pending */\n this.pending_buf_size = 0; /* size of pending_buf */\n this.pending_out = 0; /* next pending byte to output to the stream */\n this.pending = 0; /* nb of bytes in the pending buffer */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n this.gzhead = null; /* gzip header information to write */\n this.gzindex = 0; /* where in extra, name, or comment */\n this.method = Z_DEFLATED; /* can only be DEFLATED */\n this.last_flush = -1; /* value of flush param for previous deflate call */\n\n this.w_size = 0; /* LZ77 window size (32K by default) */\n this.w_bits = 0; /* log2(w_size) (8..16) */\n this.w_mask = 0; /* w_size - 1 */\n\n this.window = null;\n /* Sliding window. Input bytes are read into the second half of the window,\n * and move to the first half later to keep a dictionary of at least wSize\n * bytes. With this organization, matches are limited to a distance of\n * wSize-MAX_MATCH bytes, but this ensures that IO is always\n * performed with a length multiple of the block size.\n */\n\n this.window_size = 0;\n /* Actual size of window: 2*wSize, except when the user input buffer\n * is directly used as sliding window.\n */\n\n this.prev = null;\n /* Link to older string with same hash index. To limit the size of this\n * array to 64K, this link is maintained only for the last 32K strings.\n * An index in this array is thus a window index modulo 32K.\n */\n\n this.head = null; /* Heads of the hash chains or NIL. */\n\n this.ins_h = 0; /* hash index of string to be inserted */\n this.hash_size = 0; /* number of elements in hash table */\n this.hash_bits = 0; /* log2(hash_size) */\n this.hash_mask = 0; /* hash_size-1 */\n\n this.hash_shift = 0;\n /* Number of bits by which ins_h must be shifted at each input\n * step. It must be such that after MIN_MATCH steps, the oldest\n * byte no longer takes part in the hash key, that is:\n * hash_shift * MIN_MATCH >= hash_bits\n */\n\n this.block_start = 0;\n /* Window position at the beginning of the current output block. Gets\n * negative when the window is moved backwards.\n */\n\n this.match_length = 0; /* length of best match */\n this.prev_match = 0; /* previous match */\n this.match_available = 0; /* set if previous match exists */\n this.strstart = 0; /* start of string to insert */\n this.match_start = 0; /* start of matching string */\n this.lookahead = 0; /* number of valid bytes ahead in window */\n\n this.prev_length = 0;\n /* Length of the best match at previous step. Matches not greater than this\n * are discarded. This is used in the lazy match evaluation.\n */\n\n this.max_chain_length = 0;\n /* To speed up deflation, hash chains are never searched beyond this\n * length. A higher limit improves compression ratio but degrades the\n * speed.\n */\n\n this.max_lazy_match = 0;\n /* Attempt to find a better match only when the current match is strictly\n * smaller than this value. This mechanism is used only for compression\n * levels >= 4.\n */\n // That's alias to max_lazy_match, don't use directly\n //this.max_insert_length = 0;\n /* Insert new strings in the hash table only if the match length is not\n * greater than this length. This saves time but degrades compression.\n * max_insert_length is used only for compression levels <= 3.\n */\n\n this.level = 0; /* compression level (1..9) */\n this.strategy = 0; /* favor or force Huffman coding*/\n\n this.good_match = 0;\n /* Use a faster search when the previous match is longer than this */\n\n this.nice_match = 0; /* Stop searching when current match exceeds this */\n\n /* used by trees.c: */\n\n /* Didn't use ct_data typedef below to suppress compiler warning */\n\n // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */\n // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */\n // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */\n\n // Use flat array of DOUBLE size, with interleaved fata,\n // because JS does not support effective\n this.dyn_ltree = new utils.Buf16(HEAP_SIZE * 2);\n this.dyn_dtree = new utils.Buf16((2 * D_CODES + 1) * 2);\n this.bl_tree = new utils.Buf16((2 * BL_CODES + 1) * 2);\n zero(this.dyn_ltree);\n zero(this.dyn_dtree);\n zero(this.bl_tree);\n\n this.l_desc = null; /* desc. for literal tree */\n this.d_desc = null; /* desc. for distance tree */\n this.bl_desc = null; /* desc. for bit length tree */\n\n //ush bl_count[MAX_BITS+1];\n this.bl_count = new utils.Buf16(MAX_BITS + 1);\n /* number of codes at each bit length for an optimal tree */\n\n //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */\n this.heap = new utils.Buf16(2 * L_CODES + 1); /* heap used to build the Huffman trees */\n zero(this.heap);\n\n this.heap_len = 0; /* number of elements in the heap */\n this.heap_max = 0; /* element of largest frequency */\n /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n * The same heap array is used to build all trees.\n */\n\n this.depth = new utils.Buf16(2 * L_CODES + 1); //uch depth[2*L_CODES+1];\n zero(this.depth);\n /* Depth of each subtree used as tie breaker for trees of equal frequency\n */\n\n this.l_buf = 0; /* buffer index for literals or lengths */\n\n this.lit_bufsize = 0;\n /* Size of match buffer for literals/lengths. There are 4 reasons for\n * limiting lit_bufsize to 64K:\n * - frequencies can be kept in 16 bit counters\n * - if compression is not successful for the first block, all input\n * data is still in the window so we can still emit a stored block even\n * when input comes from standard input. (This can also be done for\n * all blocks if lit_bufsize is not greater than 32K.)\n * - if compression is not successful for a file smaller than 64K, we can\n * even emit a stored file instead of a stored block (saving 5 bytes).\n * This is applicable only for zip (not gzip or zlib).\n * - creating new Huffman trees less frequently may not provide fast\n * adaptation to changes in the input data statistics. (Take for\n * example a binary file with poorly compressible code followed by\n * a highly compressible string table.) Smaller buffer sizes give\n * fast adaptation but have of course the overhead of transmitting\n * trees more frequently.\n * - I can't count above 4\n */\n\n this.last_lit = 0; /* running index in l_buf */\n\n this.d_buf = 0;\n /* Buffer index for distances. To simplify the code, d_buf and l_buf have\n * the same number of elements. To use different lengths, an extra flag\n * array would be necessary.\n */\n\n this.opt_len = 0; /* bit length of current block with optimal trees */\n this.static_len = 0; /* bit length of current block with static trees */\n this.matches = 0; /* number of string matches in current block */\n this.insert = 0; /* bytes at end of window left to insert */\n\n\n this.bi_buf = 0;\n /* Output buffer. bits are inserted starting at the bottom (least\n * significant bits).\n */\n this.bi_valid = 0;\n /* Number of valid bits in bi_buf. All bits above the last valid bit\n * are always zero.\n */\n\n // Used for window memory init. We safely ignore it for JS. That makes\n // sense only for pointers and memory check tools.\n //this.high_water = 0;\n /* High water mark offset in window for initialized bytes -- bytes above\n * this are set to zero in order to avoid memory check warnings when\n * longest match routines access bytes past the input. This is then\n * updated to the new high water mark.\n */\n}\n\n\nfunction deflateResetKeep(strm) {\n var s;\n\n if (!strm || !strm.state) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n strm.total_in = strm.total_out = 0;\n strm.data_type = Z_UNKNOWN;\n\n s = strm.state;\n s.pending = 0;\n s.pending_out = 0;\n\n if (s.wrap < 0) {\n s.wrap = -s.wrap;\n /* was made negative by deflate(..., Z_FINISH); */\n }\n s.status = (s.wrap ? INIT_STATE : BUSY_STATE);\n strm.adler = (s.wrap === 2) ?\n 0 // crc32(0, Z_NULL, 0)\n :\n 1; // adler32(0, Z_NULL, 0)\n s.last_flush = Z_NO_FLUSH;\n trees._tr_init(s);\n return Z_OK;\n}\n\n\nfunction deflateReset(strm) {\n var ret = deflateResetKeep(strm);\n if (ret === Z_OK) {\n lm_init(strm.state);\n }\n return ret;\n}\n\n\nfunction deflateSetHeader(strm, head) {\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; }\n strm.state.gzhead = head;\n return Z_OK;\n}\n\n\nfunction deflateInit2(strm, level, method, windowBits, memLevel, strategy) {\n if (!strm) { // === Z_NULL\n return Z_STREAM_ERROR;\n }\n var wrap = 1;\n\n if (level === Z_DEFAULT_COMPRESSION) {\n level = 6;\n }\n\n if (windowBits < 0) { /* suppress zlib wrapper */\n wrap = 0;\n windowBits = -windowBits;\n }\n\n else if (windowBits > 15) {\n wrap = 2; /* write gzip wrapper instead */\n windowBits -= 16;\n }\n\n\n if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED ||\n windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||\n strategy < 0 || strategy > Z_FIXED) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n\n if (windowBits === 8) {\n windowBits = 9;\n }\n /* until 256-byte window bug fixed */\n\n var s = new DeflateState();\n\n strm.state = s;\n s.strm = strm;\n\n s.wrap = wrap;\n s.gzhead = null;\n s.w_bits = windowBits;\n s.w_size = 1 << s.w_bits;\n s.w_mask = s.w_size - 1;\n\n s.hash_bits = memLevel + 7;\n s.hash_size = 1 << s.hash_bits;\n s.hash_mask = s.hash_size - 1;\n s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n s.window = new utils.Buf8(s.w_size * 2);\n s.head = new utils.Buf16(s.hash_size);\n s.prev = new utils.Buf16(s.w_size);\n\n // Don't need mem init magic for JS.\n //s.high_water = 0; /* nothing written to s->window yet */\n\n s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */\n\n s.pending_buf_size = s.lit_bufsize * 4;\n\n //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);\n //s->pending_buf = (uchf *) overlay;\n s.pending_buf = new utils.Buf8(s.pending_buf_size);\n\n // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`)\n //s->d_buf = overlay + s->lit_bufsize/sizeof(ush);\n s.d_buf = 1 * s.lit_bufsize;\n\n //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize;\n s.l_buf = (1 + 2) * s.lit_bufsize;\n\n s.level = level;\n s.strategy = strategy;\n s.method = method;\n\n return deflateReset(strm);\n}\n\nfunction deflateInit(strm, level) {\n return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY);\n}\n\n\nfunction deflate(strm, flush) {\n var old_flush, s;\n var beg, val; // for gzip header write only\n\n if (!strm || !strm.state ||\n flush > Z_BLOCK || flush < 0) {\n return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR;\n }\n\n s = strm.state;\n\n if (!strm.output ||\n (!strm.input && strm.avail_in !== 0) ||\n (s.status === FINISH_STATE && flush !== Z_FINISH)) {\n return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR);\n }\n\n s.strm = strm; /* just in case */\n old_flush = s.last_flush;\n s.last_flush = flush;\n\n /* Write the header */\n if (s.status === INIT_STATE) {\n\n if (s.wrap === 2) { // GZIP header\n strm.adler = 0; //crc32(0L, Z_NULL, 0);\n put_byte(s, 31);\n put_byte(s, 139);\n put_byte(s, 8);\n if (!s.gzhead) { // s->gzhead == Z_NULL\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, s.level === 9 ? 2 :\n (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n 4 : 0));\n put_byte(s, OS_CODE);\n s.status = BUSY_STATE;\n }\n else {\n put_byte(s, (s.gzhead.text ? 1 : 0) +\n (s.gzhead.hcrc ? 2 : 0) +\n (!s.gzhead.extra ? 0 : 4) +\n (!s.gzhead.name ? 0 : 8) +\n (!s.gzhead.comment ? 0 : 16)\n );\n put_byte(s, s.gzhead.time & 0xff);\n put_byte(s, (s.gzhead.time >> 8) & 0xff);\n put_byte(s, (s.gzhead.time >> 16) & 0xff);\n put_byte(s, (s.gzhead.time >> 24) & 0xff);\n put_byte(s, s.level === 9 ? 2 :\n (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n 4 : 0));\n put_byte(s, s.gzhead.os & 0xff);\n if (s.gzhead.extra && s.gzhead.extra.length) {\n put_byte(s, s.gzhead.extra.length & 0xff);\n put_byte(s, (s.gzhead.extra.length >> 8) & 0xff);\n }\n if (s.gzhead.hcrc) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0);\n }\n s.gzindex = 0;\n s.status = EXTRA_STATE;\n }\n }\n else // DEFLATE header\n {\n var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8;\n var level_flags = -1;\n\n if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) {\n level_flags = 0;\n } else if (s.level < 6) {\n level_flags = 1;\n } else if (s.level === 6) {\n level_flags = 2;\n } else {\n level_flags = 3;\n }\n header |= (level_flags << 6);\n if (s.strstart !== 0) { header |= PRESET_DICT; }\n header += 31 - (header % 31);\n\n s.status = BUSY_STATE;\n putShortMSB(s, header);\n\n /* Save the adler32 of the preset dictionary: */\n if (s.strstart !== 0) {\n putShortMSB(s, strm.adler >>> 16);\n putShortMSB(s, strm.adler & 0xffff);\n }\n strm.adler = 1; // adler32(0L, Z_NULL, 0);\n }\n }\n\n//#ifdef GZIP\n if (s.status === EXTRA_STATE) {\n if (s.gzhead.extra/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n\n while (s.gzindex < (s.gzhead.extra.length & 0xffff)) {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n break;\n }\n }\n put_byte(s, s.gzhead.extra[s.gzindex] & 0xff);\n s.gzindex++;\n }\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (s.gzindex === s.gzhead.extra.length) {\n s.gzindex = 0;\n s.status = NAME_STATE;\n }\n }\n else {\n s.status = NAME_STATE;\n }\n }\n if (s.status === NAME_STATE) {\n if (s.gzhead.name/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n //int val;\n\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n // JS specific: little magic to add zero terminator to end of string\n if (s.gzindex < s.gzhead.name.length) {\n val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff;\n } else {\n val = 0;\n }\n put_byte(s, val);\n } while (val !== 0);\n\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (val === 0) {\n s.gzindex = 0;\n s.status = COMMENT_STATE;\n }\n }\n else {\n s.status = COMMENT_STATE;\n }\n }\n if (s.status === COMMENT_STATE) {\n if (s.gzhead.comment/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n //int val;\n\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n // JS specific: little magic to add zero terminator to end of string\n if (s.gzindex < s.gzhead.comment.length) {\n val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff;\n } else {\n val = 0;\n }\n put_byte(s, val);\n } while (val !== 0);\n\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (val === 0) {\n s.status = HCRC_STATE;\n }\n }\n else {\n s.status = HCRC_STATE;\n }\n }\n if (s.status === HCRC_STATE) {\n if (s.gzhead.hcrc) {\n if (s.pending + 2 > s.pending_buf_size) {\n flush_pending(strm);\n }\n if (s.pending + 2 <= s.pending_buf_size) {\n put_byte(s, strm.adler & 0xff);\n put_byte(s, (strm.adler >> 8) & 0xff);\n strm.adler = 0; //crc32(0L, Z_NULL, 0);\n s.status = BUSY_STATE;\n }\n }\n else {\n s.status = BUSY_STATE;\n }\n }\n//#endif\n\n /* Flush as much pending output as possible */\n if (s.pending !== 0) {\n flush_pending(strm);\n if (strm.avail_out === 0) {\n /* Since avail_out is 0, deflate will be called again with\n * more output space, but possibly with both pending and\n * avail_in equal to zero. There won't be anything to do,\n * but this is not an error situation so make sure we\n * return OK instead of BUF_ERROR at next call of deflate:\n */\n s.last_flush = -1;\n return Z_OK;\n }\n\n /* Make sure there is something to do and avoid duplicate consecutive\n * flushes. For repeated and useless calls with Z_FINISH, we keep\n * returning Z_STREAM_END instead of Z_BUF_ERROR.\n */\n } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) &&\n flush !== Z_FINISH) {\n return err(strm, Z_BUF_ERROR);\n }\n\n /* User must not provide more input after the first FINISH: */\n if (s.status === FINISH_STATE && strm.avail_in !== 0) {\n return err(strm, Z_BUF_ERROR);\n }\n\n /* Start a new block or continue the current one.\n */\n if (strm.avail_in !== 0 || s.lookahead !== 0 ||\n (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) {\n var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) :\n (s.strategy === Z_RLE ? deflate_rle(s, flush) :\n configuration_table[s.level].func(s, flush));\n\n if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) {\n s.status = FINISH_STATE;\n }\n if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) {\n if (strm.avail_out === 0) {\n s.last_flush = -1;\n /* avoid BUF_ERROR next call, see above */\n }\n return Z_OK;\n /* If flush != Z_NO_FLUSH && avail_out == 0, the next call\n * of deflate should use the same flush parameter to make sure\n * that the flush is complete. So we don't have to output an\n * empty block here, this will be done at next call. This also\n * ensures that for a very small output buffer, we emit at most\n * one empty block.\n */\n }\n if (bstate === BS_BLOCK_DONE) {\n if (flush === Z_PARTIAL_FLUSH) {\n trees._tr_align(s);\n }\n else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */\n\n trees._tr_stored_block(s, 0, 0, false);\n /* For a full flush, this empty block will be recognized\n * as a special marker by inflate_sync().\n */\n if (flush === Z_FULL_FLUSH) {\n /*** CLEAR_HASH(s); ***/ /* forget history */\n zero(s.head); // Fill with NIL (= 0);\n\n if (s.lookahead === 0) {\n s.strstart = 0;\n s.block_start = 0;\n s.insert = 0;\n }\n }\n }\n flush_pending(strm);\n if (strm.avail_out === 0) {\n s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */\n return Z_OK;\n }\n }\n }\n //Assert(strm->avail_out > 0, \"bug2\");\n //if (strm.avail_out <= 0) { throw new Error(\"bug2\");}\n\n if (flush !== Z_FINISH) { return Z_OK; }\n if (s.wrap <= 0) { return Z_STREAM_END; }\n\n /* Write the trailer */\n if (s.wrap === 2) {\n put_byte(s, strm.adler & 0xff);\n put_byte(s, (strm.adler >> 8) & 0xff);\n put_byte(s, (strm.adler >> 16) & 0xff);\n put_byte(s, (strm.adler >> 24) & 0xff);\n put_byte(s, strm.total_in & 0xff);\n put_byte(s, (strm.total_in >> 8) & 0xff);\n put_byte(s, (strm.total_in >> 16) & 0xff);\n put_byte(s, (strm.total_in >> 24) & 0xff);\n }\n else\n {\n putShortMSB(s, strm.adler >>> 16);\n putShortMSB(s, strm.adler & 0xffff);\n }\n\n flush_pending(strm);\n /* If avail_out is zero, the application will call deflate again\n * to flush the rest.\n */\n if (s.wrap > 0) { s.wrap = -s.wrap; }\n /* write the trailer only once! */\n return s.pending !== 0 ? Z_OK : Z_STREAM_END;\n}\n\nfunction deflateEnd(strm) {\n var status;\n\n if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {\n return Z_STREAM_ERROR;\n }\n\n status = strm.state.status;\n if (status !== INIT_STATE &&\n status !== EXTRA_STATE &&\n status !== NAME_STATE &&\n status !== COMMENT_STATE &&\n status !== HCRC_STATE &&\n status !== BUSY_STATE &&\n status !== FINISH_STATE\n ) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n strm.state = null;\n\n return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK;\n}\n\n\n/* =========================================================================\n * Initializes the compression dictionary from the given byte\n * sequence without producing any compressed output.\n */\nfunction deflateSetDictionary(strm, dictionary) {\n var dictLength = dictionary.length;\n\n var s;\n var str, n;\n var wrap;\n var avail;\n var next;\n var input;\n var tmpDict;\n\n if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {\n return Z_STREAM_ERROR;\n }\n\n s = strm.state;\n wrap = s.wrap;\n\n if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) {\n return Z_STREAM_ERROR;\n }\n\n /* when using zlib wrappers, compute Adler-32 for provided dictionary */\n if (wrap === 1) {\n /* adler32(strm->adler, dictionary, dictLength); */\n strm.adler = adler32(strm.adler, dictionary, dictLength, 0);\n }\n\n s.wrap = 0; /* avoid computing Adler-32 in read_buf */\n\n /* if dictionary would fill window, just replace the history */\n if (dictLength >= s.w_size) {\n if (wrap === 0) { /* already empty otherwise */\n /*** CLEAR_HASH(s); ***/\n zero(s.head); // Fill with NIL (= 0);\n s.strstart = 0;\n s.block_start = 0;\n s.insert = 0;\n }\n /* use the tail */\n // dictionary = dictionary.slice(dictLength - s.w_size);\n tmpDict = new utils.Buf8(s.w_size);\n utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0);\n dictionary = tmpDict;\n dictLength = s.w_size;\n }\n /* insert dictionary into window and hash */\n avail = strm.avail_in;\n next = strm.next_in;\n input = strm.input;\n strm.avail_in = dictLength;\n strm.next_in = 0;\n strm.input = dictionary;\n fill_window(s);\n while (s.lookahead >= MIN_MATCH) {\n str = s.strstart;\n n = s.lookahead - (MIN_MATCH - 1);\n do {\n /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask;\n\n s.prev[str & s.w_mask] = s.head[s.ins_h];\n\n s.head[s.ins_h] = str;\n str++;\n } while (--n);\n s.strstart = str;\n s.lookahead = MIN_MATCH - 1;\n fill_window(s);\n }\n s.strstart += s.lookahead;\n s.block_start = s.strstart;\n s.insert = s.lookahead;\n s.lookahead = 0;\n s.match_length = s.prev_length = MIN_MATCH - 1;\n s.match_available = 0;\n strm.next_in = next;\n strm.input = input;\n strm.avail_in = avail;\n s.wrap = wrap;\n return Z_OK;\n}\n\n\nexports.deflateInit = deflateInit;\nexports.deflateInit2 = deflateInit2;\nexports.deflateReset = deflateReset;\nexports.deflateResetKeep = deflateResetKeep;\nexports.deflateSetHeader = deflateSetHeader;\nexports.deflate = deflate;\nexports.deflateEnd = deflateEnd;\nexports.deflateSetDictionary = deflateSetDictionary;\nexports.deflateInfo = 'pako deflate (from Nodeca project)';\n\n/* Not implemented\nexports.deflateBound = deflateBound;\nexports.deflateCopy = deflateCopy;\nexports.deflateParams = deflateParams;\nexports.deflatePending = deflatePending;\nexports.deflatePrime = deflatePrime;\nexports.deflateTune = deflateTune;\n*/\n" - }, - { - "id": 14, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\trees.js", - "name": "./node_modules/pako/lib/zlib/trees.js", - "index": 12, - "index2": 5, - "size": 39879, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\deflate.js", - "issuerId": 13, - "issuerName": "./node_modules/pako/lib/zlib/deflate.js", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "name": "./node_modules/fast-png/lib-esm/index.js", - "profile": { - "factory": 2180, - "building": 1082 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "name": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "profile": { - "factory": 21, - "building": 92, - "dependencies": 43 - } - }, - { - "id": 1, - "identifier": "F:\\tweb\\node_modules\\pako\\index.js", - "name": "./node_modules/pako/index.js", - "profile": { - "factory": 48, - "building": 7 - } - }, - { - "id": 12, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\deflate.js", - "name": "./node_modules/pako/lib/deflate.js", - "profile": { - "factory": 11, - "building": 13, - "dependencies": 8 - } - }, - { - "id": 13, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\deflate.js", - "name": "./node_modules/pako/lib/zlib/deflate.js", - "profile": { - "factory": 16, - "building": 21, - "dependencies": 2 - } - } - ], - "profile": { - "factory": 40, - "building": 27, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 13, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\deflate.js", - "module": "./node_modules/pako/lib/zlib/deflate.js", - "moduleName": "./node_modules/pako/lib/zlib/deflate.js", - "type": "cjs require", - "userRequest": "./trees", - "loc": "23:14-32" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 7, - "source": "'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n/* eslint-disable space-unary-ops */\n\nvar utils = require('../utils/common');\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n//var Z_FILTERED = 1;\n//var Z_HUFFMAN_ONLY = 2;\n//var Z_RLE = 3;\nvar Z_FIXED = 4;\n//var Z_DEFAULT_STRATEGY = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\nvar Z_BINARY = 0;\nvar Z_TEXT = 1;\n//var Z_ASCII = 1; // = Z_TEXT\nvar Z_UNKNOWN = 2;\n\n/*============================================================================*/\n\n\nfunction zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }\n\n// From zutil.h\n\nvar STORED_BLOCK = 0;\nvar STATIC_TREES = 1;\nvar DYN_TREES = 2;\n/* The three kinds of block type */\n\nvar MIN_MATCH = 3;\nvar MAX_MATCH = 258;\n/* The minimum and maximum match lengths */\n\n// From deflate.h\n/* ===========================================================================\n * Internal compression state.\n */\n\nvar LENGTH_CODES = 29;\n/* number of length codes, not counting the special END_BLOCK code */\n\nvar LITERALS = 256;\n/* number of literal bytes 0..255 */\n\nvar L_CODES = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\n\nvar D_CODES = 30;\n/* number of distance codes */\n\nvar BL_CODES = 19;\n/* number of codes used to transfer the bit lengths */\n\nvar HEAP_SIZE = 2 * L_CODES + 1;\n/* maximum heap size */\n\nvar MAX_BITS = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nvar Buf_size = 16;\n/* size of bit buffer in bi_buf */\n\n\n/* ===========================================================================\n * Constants\n */\n\nvar MAX_BL_BITS = 7;\n/* Bit length codes must not exceed MAX_BL_BITS bits */\n\nvar END_BLOCK = 256;\n/* end of block literal code */\n\nvar REP_3_6 = 16;\n/* repeat previous bit length 3-6 times (2 bits of repeat count) */\n\nvar REPZ_3_10 = 17;\n/* repeat a zero length 3-10 times (3 bits of repeat count) */\n\nvar REPZ_11_138 = 18;\n/* repeat a zero length 11-138 times (7 bits of repeat count) */\n\n/* eslint-disable comma-spacing,array-bracket-spacing */\nvar extra_lbits = /* extra bits for each length code */\n [0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];\n\nvar extra_dbits = /* extra bits for each distance code */\n [0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];\n\nvar extra_blbits = /* extra bits for each bit length code */\n [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];\n\nvar bl_order =\n [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];\n/* eslint-enable comma-spacing,array-bracket-spacing */\n\n/* The lengths of the bit length codes are sent in order of decreasing\n * probability, to avoid transmitting the lengths for unused bit length codes.\n */\n\n/* ===========================================================================\n * Local data. These are initialized only once.\n */\n\n// We pre-fill arrays with 0 to avoid uninitialized gaps\n\nvar DIST_CODE_LEN = 512; /* see definition of array dist_code below */\n\n// !!!! Use flat array instead of structure, Freq = i*2, Len = i*2+1\nvar static_ltree = new Array((L_CODES + 2) * 2);\nzero(static_ltree);\n/* The static literal tree. Since the bit lengths are imposed, there is no\n * need for the L_CODES extra codes used during heap construction. However\n * The codes 286 and 287 are needed to build a canonical tree (see _tr_init\n * below).\n */\n\nvar static_dtree = new Array(D_CODES * 2);\nzero(static_dtree);\n/* The static distance tree. (Actually a trivial tree since all codes use\n * 5 bits.)\n */\n\nvar _dist_code = new Array(DIST_CODE_LEN);\nzero(_dist_code);\n/* Distance codes. The first 256 values correspond to the distances\n * 3 .. 258, the last 256 values correspond to the top 8 bits of\n * the 15 bit distances.\n */\n\nvar _length_code = new Array(MAX_MATCH - MIN_MATCH + 1);\nzero(_length_code);\n/* length code for each normalized match length (0 == MIN_MATCH) */\n\nvar base_length = new Array(LENGTH_CODES);\nzero(base_length);\n/* First normalized length for each code (0 = MIN_MATCH) */\n\nvar base_dist = new Array(D_CODES);\nzero(base_dist);\n/* First normalized distance for each code (0 = distance of 1) */\n\n\nfunction StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) {\n\n this.static_tree = static_tree; /* static tree or NULL */\n this.extra_bits = extra_bits; /* extra bits for each code or NULL */\n this.extra_base = extra_base; /* base index for extra_bits */\n this.elems = elems; /* max number of elements in the tree */\n this.max_length = max_length; /* max bit length for the codes */\n\n // show if `static_tree` has data or dummy - needed for monomorphic objects\n this.has_stree = static_tree && static_tree.length;\n}\n\n\nvar static_l_desc;\nvar static_d_desc;\nvar static_bl_desc;\n\n\nfunction TreeDesc(dyn_tree, stat_desc) {\n this.dyn_tree = dyn_tree; /* the dynamic tree */\n this.max_code = 0; /* largest code with non zero frequency */\n this.stat_desc = stat_desc; /* the corresponding static tree */\n}\n\n\n\nfunction d_code(dist) {\n return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)];\n}\n\n\n/* ===========================================================================\n * Output a short LSB first on the stream.\n * IN assertion: there is enough room in pendingBuf.\n */\nfunction put_short(s, w) {\n// put_byte(s, (uch)((w) & 0xff));\n// put_byte(s, (uch)((ush)(w) >> 8));\n s.pending_buf[s.pending++] = (w) & 0xff;\n s.pending_buf[s.pending++] = (w >>> 8) & 0xff;\n}\n\n\n/* ===========================================================================\n * Send a value on a given number of bits.\n * IN assertion: length <= 16 and value fits in length bits.\n */\nfunction send_bits(s, value, length) {\n if (s.bi_valid > (Buf_size - length)) {\n s.bi_buf |= (value << s.bi_valid) & 0xffff;\n put_short(s, s.bi_buf);\n s.bi_buf = value >> (Buf_size - s.bi_valid);\n s.bi_valid += length - Buf_size;\n } else {\n s.bi_buf |= (value << s.bi_valid) & 0xffff;\n s.bi_valid += length;\n }\n}\n\n\nfunction send_code(s, c, tree) {\n send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/);\n}\n\n\n/* ===========================================================================\n * Reverse the first len bits of a code, using straightforward code (a faster\n * method would use a table)\n * IN assertion: 1 <= len <= 15\n */\nfunction bi_reverse(code, len) {\n var res = 0;\n do {\n res |= code & 1;\n code >>>= 1;\n res <<= 1;\n } while (--len > 0);\n return res >>> 1;\n}\n\n\n/* ===========================================================================\n * Flush the bit buffer, keeping at most 7 bits in it.\n */\nfunction bi_flush(s) {\n if (s.bi_valid === 16) {\n put_short(s, s.bi_buf);\n s.bi_buf = 0;\n s.bi_valid = 0;\n\n } else if (s.bi_valid >= 8) {\n s.pending_buf[s.pending++] = s.bi_buf & 0xff;\n s.bi_buf >>= 8;\n s.bi_valid -= 8;\n }\n}\n\n\n/* ===========================================================================\n * Compute the optimal bit lengths for a tree and update the total bit length\n * for the current block.\n * IN assertion: the fields freq and dad are set, heap[heap_max] and\n * above are the tree nodes sorted by increasing frequency.\n * OUT assertions: the field len is set to the optimal bit length, the\n * array bl_count contains the frequencies for each bit length.\n * The length opt_len is updated; static_len is also updated if stree is\n * not null.\n */\nfunction gen_bitlen(s, desc)\n// deflate_state *s;\n// tree_desc *desc; /* the tree descriptor */\n{\n var tree = desc.dyn_tree;\n var max_code = desc.max_code;\n var stree = desc.stat_desc.static_tree;\n var has_stree = desc.stat_desc.has_stree;\n var extra = desc.stat_desc.extra_bits;\n var base = desc.stat_desc.extra_base;\n var max_length = desc.stat_desc.max_length;\n var h; /* heap index */\n var n, m; /* iterate over the tree elements */\n var bits; /* bit length */\n var xbits; /* extra bits */\n var f; /* frequency */\n var overflow = 0; /* number of elements with bit length too large */\n\n for (bits = 0; bits <= MAX_BITS; bits++) {\n s.bl_count[bits] = 0;\n }\n\n /* In a first pass, compute the optimal bit lengths (which may\n * overflow in the case of the bit length tree).\n */\n tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */\n\n for (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n n = s.heap[h];\n bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1;\n if (bits > max_length) {\n bits = max_length;\n overflow++;\n }\n tree[n * 2 + 1]/*.Len*/ = bits;\n /* We overwrite tree[n].Dad which is no longer needed */\n\n if (n > max_code) { continue; } /* not a leaf node */\n\n s.bl_count[bits]++;\n xbits = 0;\n if (n >= base) {\n xbits = extra[n - base];\n }\n f = tree[n * 2]/*.Freq*/;\n s.opt_len += f * (bits + xbits);\n if (has_stree) {\n s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits);\n }\n }\n if (overflow === 0) { return; }\n\n // Trace((stderr,\"\\nbit length overflow\\n\"));\n /* This happens for example on obj2 and pic of the Calgary corpus */\n\n /* Find the first bit length which could increase: */\n do {\n bits = max_length - 1;\n while (s.bl_count[bits] === 0) { bits--; }\n s.bl_count[bits]--; /* move one leaf down the tree */\n s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */\n s.bl_count[max_length]--;\n /* The brother of the overflow item also moves one step up,\n * but this does not affect bl_count[max_length]\n */\n overflow -= 2;\n } while (overflow > 0);\n\n /* Now recompute all bit lengths, scanning in increasing frequency.\n * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all\n * lengths instead of fixing only the wrong ones. This idea is taken\n * from 'ar' written by Haruhiko Okumura.)\n */\n for (bits = max_length; bits !== 0; bits--) {\n n = s.bl_count[bits];\n while (n !== 0) {\n m = s.heap[--h];\n if (m > max_code) { continue; }\n if (tree[m * 2 + 1]/*.Len*/ !== bits) {\n // Trace((stderr,\"code %d bits %d->%d\\n\", m, tree[m].Len, bits));\n s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/;\n tree[m * 2 + 1]/*.Len*/ = bits;\n }\n n--;\n }\n }\n}\n\n\n/* ===========================================================================\n * Generate the codes for a given tree and bit counts (which need not be\n * optimal).\n * IN assertion: the array bl_count contains the bit length statistics for\n * the given tree and the field len is set for all tree elements.\n * OUT assertion: the field code is set for all tree elements of non\n * zero code length.\n */\nfunction gen_codes(tree, max_code, bl_count)\n// ct_data *tree; /* the tree to decorate */\n// int max_code; /* largest code with non zero frequency */\n// ushf *bl_count; /* number of codes at each bit length */\n{\n var next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */\n var code = 0; /* running code value */\n var bits; /* bit index */\n var n; /* code index */\n\n /* The distribution counts are first used to generate the code values\n * without bit reversal.\n */\n for (bits = 1; bits <= MAX_BITS; bits++) {\n next_code[bits] = code = (code + bl_count[bits - 1]) << 1;\n }\n /* Check that the bit counts in bl_count are consistent. The last code\n * must be all ones.\n */\n //Assert (code + bl_count[MAX_BITS]-1 == (1< length code (0..28) */\n length = 0;\n for (code = 0; code < LENGTH_CODES - 1; code++) {\n base_length[code] = length;\n for (n = 0; n < (1 << extra_lbits[code]); n++) {\n _length_code[length++] = code;\n }\n }\n //Assert (length == 256, \"tr_static_init: length != 256\");\n /* Note that the length 255 (match length 258) can be represented\n * in two different ways: code 284 + 5 bits or code 285, so we\n * overwrite length_code[255] to use the best encoding:\n */\n _length_code[length - 1] = code;\n\n /* Initialize the mapping dist (0..32K) -> dist code (0..29) */\n dist = 0;\n for (code = 0; code < 16; code++) {\n base_dist[code] = dist;\n for (n = 0; n < (1 << extra_dbits[code]); n++) {\n _dist_code[dist++] = code;\n }\n }\n //Assert (dist == 256, \"tr_static_init: dist != 256\");\n dist >>= 7; /* from now on, all distances are divided by 128 */\n for (; code < D_CODES; code++) {\n base_dist[code] = dist << 7;\n for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) {\n _dist_code[256 + dist++] = code;\n }\n }\n //Assert (dist == 256, \"tr_static_init: 256+dist != 512\");\n\n /* Construct the codes of the static literal tree */\n for (bits = 0; bits <= MAX_BITS; bits++) {\n bl_count[bits] = 0;\n }\n\n n = 0;\n while (n <= 143) {\n static_ltree[n * 2 + 1]/*.Len*/ = 8;\n n++;\n bl_count[8]++;\n }\n while (n <= 255) {\n static_ltree[n * 2 + 1]/*.Len*/ = 9;\n n++;\n bl_count[9]++;\n }\n while (n <= 279) {\n static_ltree[n * 2 + 1]/*.Len*/ = 7;\n n++;\n bl_count[7]++;\n }\n while (n <= 287) {\n static_ltree[n * 2 + 1]/*.Len*/ = 8;\n n++;\n bl_count[8]++;\n }\n /* Codes 286 and 287 do not exist, but we must include them in the\n * tree construction to get a canonical Huffman tree (longest code\n * all ones)\n */\n gen_codes(static_ltree, L_CODES + 1, bl_count);\n\n /* The static distance tree is trivial: */\n for (n = 0; n < D_CODES; n++) {\n static_dtree[n * 2 + 1]/*.Len*/ = 5;\n static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5);\n }\n\n // Now data ready and we can init static trees\n static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS);\n static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n //static_init_done = true;\n}\n\n\n/* ===========================================================================\n * Initialize a new block.\n */\nfunction init_block(s) {\n var n; /* iterates over tree elements */\n\n /* Initialize the trees. */\n for (n = 0; n < L_CODES; n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; }\n for (n = 0; n < D_CODES; n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; }\n for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; }\n\n s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1;\n s.opt_len = s.static_len = 0;\n s.last_lit = s.matches = 0;\n}\n\n\n/* ===========================================================================\n * Flush the bit buffer and align the output on a byte boundary\n */\nfunction bi_windup(s)\n{\n if (s.bi_valid > 8) {\n put_short(s, s.bi_buf);\n } else if (s.bi_valid > 0) {\n //put_byte(s, (Byte)s->bi_buf);\n s.pending_buf[s.pending++] = s.bi_buf;\n }\n s.bi_buf = 0;\n s.bi_valid = 0;\n}\n\n/* ===========================================================================\n * Copy a stored block, storing first the length and its\n * one's complement if requested.\n */\nfunction copy_block(s, buf, len, header)\n//DeflateState *s;\n//charf *buf; /* the input data */\n//unsigned len; /* its length */\n//int header; /* true if block header must be written */\n{\n bi_windup(s); /* align on byte boundary */\n\n if (header) {\n put_short(s, len);\n put_short(s, ~len);\n }\n// while (len--) {\n// put_byte(s, *buf++);\n// }\n utils.arraySet(s.pending_buf, s.window, buf, len, s.pending);\n s.pending += len;\n}\n\n/* ===========================================================================\n * Compares to subtrees, using the tree depth as tie breaker when\n * the subtrees have equal frequency. This minimizes the worst case length.\n */\nfunction smaller(tree, n, m, depth) {\n var _n2 = n * 2;\n var _m2 = m * 2;\n return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ ||\n (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m]));\n}\n\n/* ===========================================================================\n * Restore the heap property by moving down the tree starting at node k,\n * exchanging a node with the smallest of its two sons if necessary, stopping\n * when the heap property is re-established (each father smaller than its\n * two sons).\n */\nfunction pqdownheap(s, tree, k)\n// deflate_state *s;\n// ct_data *tree; /* the tree to restore */\n// int k; /* node to move down */\n{\n var v = s.heap[k];\n var j = k << 1; /* left son of k */\n while (j <= s.heap_len) {\n /* Set j to the smallest of the two sons: */\n if (j < s.heap_len &&\n smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {\n j++;\n }\n /* Exit if v is smaller than both sons */\n if (smaller(tree, v, s.heap[j], s.depth)) { break; }\n\n /* Exchange v with the smallest son */\n s.heap[k] = s.heap[j];\n k = j;\n\n /* And continue down the tree, setting j to the left son of k */\n j <<= 1;\n }\n s.heap[k] = v;\n}\n\n\n// inlined manually\n// var SMALLEST = 1;\n\n/* ===========================================================================\n * Send the block data compressed using the given Huffman trees\n */\nfunction compress_block(s, ltree, dtree)\n// deflate_state *s;\n// const ct_data *ltree; /* literal tree */\n// const ct_data *dtree; /* distance tree */\n{\n var dist; /* distance of matched string */\n var lc; /* match length or unmatched char (if dist == 0) */\n var lx = 0; /* running index in l_buf */\n var code; /* the code to send */\n var extra; /* number of extra bits to send */\n\n if (s.last_lit !== 0) {\n do {\n dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]);\n lc = s.pending_buf[s.l_buf + lx];\n lx++;\n\n if (dist === 0) {\n send_code(s, lc, ltree); /* send a literal byte */\n //Tracecv(isgraph(lc), (stderr,\" '%c' \", lc));\n } else {\n /* Here, lc is the match length - MIN_MATCH */\n code = _length_code[lc];\n send_code(s, code + LITERALS + 1, ltree); /* send the length code */\n extra = extra_lbits[code];\n if (extra !== 0) {\n lc -= base_length[code];\n send_bits(s, lc, extra); /* send the extra length bits */\n }\n dist--; /* dist is now the match distance - 1 */\n code = d_code(dist);\n //Assert (code < D_CODES, \"bad d_code\");\n\n send_code(s, code, dtree); /* send the distance code */\n extra = extra_dbits[code];\n if (extra !== 0) {\n dist -= base_dist[code];\n send_bits(s, dist, extra); /* send the extra distance bits */\n }\n } /* literal or match pair ? */\n\n /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */\n //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx,\n // \"pendingBuf overflow\");\n\n } while (lx < s.last_lit);\n }\n\n send_code(s, END_BLOCK, ltree);\n}\n\n\n/* ===========================================================================\n * Construct one Huffman tree and assigns the code bit strings and lengths.\n * Update the total bit length for the current block.\n * IN assertion: the field freq is set for all tree elements.\n * OUT assertions: the fields len and code are set to the optimal bit length\n * and corresponding code. The length opt_len is updated; static_len is\n * also updated if stree is not null. The field max_code is set.\n */\nfunction build_tree(s, desc)\n// deflate_state *s;\n// tree_desc *desc; /* the tree descriptor */\n{\n var tree = desc.dyn_tree;\n var stree = desc.stat_desc.static_tree;\n var has_stree = desc.stat_desc.has_stree;\n var elems = desc.stat_desc.elems;\n var n, m; /* iterate over heap elements */\n var max_code = -1; /* largest code with non zero frequency */\n var node; /* new node being created */\n\n /* Construct the initial heap, with least frequent element in\n * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].\n * heap[0] is not used.\n */\n s.heap_len = 0;\n s.heap_max = HEAP_SIZE;\n\n for (n = 0; n < elems; n++) {\n if (tree[n * 2]/*.Freq*/ !== 0) {\n s.heap[++s.heap_len] = max_code = n;\n s.depth[n] = 0;\n\n } else {\n tree[n * 2 + 1]/*.Len*/ = 0;\n }\n }\n\n /* The pkzip format requires that at least one distance code exists,\n * and that at least one bit should be sent even if there is only one\n * possible code. So to avoid special checks later on we force at least\n * two codes of non zero frequency.\n */\n while (s.heap_len < 2) {\n node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0);\n tree[node * 2]/*.Freq*/ = 1;\n s.depth[node] = 0;\n s.opt_len--;\n\n if (has_stree) {\n s.static_len -= stree[node * 2 + 1]/*.Len*/;\n }\n /* node is 0 or 1 so it does not have extra bits */\n }\n desc.max_code = max_code;\n\n /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,\n * establish sub-heaps of increasing lengths:\n */\n for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); }\n\n /* Construct the Huffman tree by repeatedly combining the least two\n * frequent nodes.\n */\n node = elems; /* next internal node of the tree */\n do {\n //pqremove(s, tree, n); /* n = node of least frequency */\n /*** pqremove ***/\n n = s.heap[1/*SMALLEST*/];\n s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--];\n pqdownheap(s, tree, 1/*SMALLEST*/);\n /***/\n\n m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */\n\n s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */\n s.heap[--s.heap_max] = m;\n\n /* Create a new node father of n and m */\n tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/;\n s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1;\n tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node;\n\n /* and insert the new node in the heap */\n s.heap[1/*SMALLEST*/] = node++;\n pqdownheap(s, tree, 1/*SMALLEST*/);\n\n } while (s.heap_len >= 2);\n\n s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/];\n\n /* At this point, the fields freq and dad are set. We can now\n * generate the bit lengths.\n */\n gen_bitlen(s, desc);\n\n /* The field len is now set, we can generate the bit codes */\n gen_codes(tree, max_code, s.bl_count);\n}\n\n\n/* ===========================================================================\n * Scan a literal or distance tree to determine the frequencies of the codes\n * in the bit length tree.\n */\nfunction scan_tree(s, tree, max_code)\n// deflate_state *s;\n// ct_data *tree; /* the tree to be scanned */\n// int max_code; /* and its largest code of non zero frequency */\n{\n var n; /* iterates over all tree elements */\n var prevlen = -1; /* last emitted length */\n var curlen; /* length of current code */\n\n var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n var count = 0; /* repeat count of the current code */\n var max_count = 7; /* max repeat count */\n var min_count = 4; /* min repeat count */\n\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n }\n tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n if (++count < max_count && curlen === nextlen) {\n continue;\n\n } else if (count < min_count) {\n s.bl_tree[curlen * 2]/*.Freq*/ += count;\n\n } else if (curlen !== 0) {\n\n if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; }\n s.bl_tree[REP_3_6 * 2]/*.Freq*/++;\n\n } else if (count <= 10) {\n s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++;\n\n } else {\n s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++;\n }\n\n count = 0;\n prevlen = curlen;\n\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n\n } else if (curlen === nextlen) {\n max_count = 6;\n min_count = 3;\n\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n}\n\n\n/* ===========================================================================\n * Send a literal or distance tree in compressed form, using the codes in\n * bl_tree.\n */\nfunction send_tree(s, tree, max_code)\n// deflate_state *s;\n// ct_data *tree; /* the tree to be scanned */\n// int max_code; /* and its largest code of non zero frequency */\n{\n var n; /* iterates over all tree elements */\n var prevlen = -1; /* last emitted length */\n var curlen; /* length of current code */\n\n var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n var count = 0; /* repeat count of the current code */\n var max_count = 7; /* max repeat count */\n var min_count = 4; /* min repeat count */\n\n /* tree[max_code+1].Len = -1; */ /* guard already set */\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n }\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n if (++count < max_count && curlen === nextlen) {\n continue;\n\n } else if (count < min_count) {\n do { send_code(s, curlen, s.bl_tree); } while (--count !== 0);\n\n } else if (curlen !== 0) {\n if (curlen !== prevlen) {\n send_code(s, curlen, s.bl_tree);\n count--;\n }\n //Assert(count >= 3 && count <= 6, \" 3_6?\");\n send_code(s, REP_3_6, s.bl_tree);\n send_bits(s, count - 3, 2);\n\n } else if (count <= 10) {\n send_code(s, REPZ_3_10, s.bl_tree);\n send_bits(s, count - 3, 3);\n\n } else {\n send_code(s, REPZ_11_138, s.bl_tree);\n send_bits(s, count - 11, 7);\n }\n\n count = 0;\n prevlen = curlen;\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n\n } else if (curlen === nextlen) {\n max_count = 6;\n min_count = 3;\n\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n}\n\n\n/* ===========================================================================\n * Construct the Huffman tree for the bit lengths and return the index in\n * bl_order of the last bit length code to send.\n */\nfunction build_bl_tree(s) {\n var max_blindex; /* index of last bit length code of non zero freq */\n\n /* Determine the bit length frequencies for literal and distance trees */\n scan_tree(s, s.dyn_ltree, s.l_desc.max_code);\n scan_tree(s, s.dyn_dtree, s.d_desc.max_code);\n\n /* Build the bit length tree: */\n build_tree(s, s.bl_desc);\n /* opt_len now includes the length of the tree representations, except\n * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.\n */\n\n /* Determine the number of bit length codes to send. The pkzip format\n * requires that at least 4 bit length codes be sent. (appnote.txt says\n * 3 but the actual value used is 4.)\n */\n for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) {\n break;\n }\n }\n /* Update opt_len to include the bit length tree and counts */\n s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n //Tracev((stderr, \"\\ndyn trees: dyn %ld, stat %ld\",\n // s->opt_len, s->static_len));\n\n return max_blindex;\n}\n\n\n/* ===========================================================================\n * Send the header for a block using dynamic Huffman trees: the counts, the\n * lengths of the bit length codes, the literal tree and the distance tree.\n * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n */\nfunction send_all_trees(s, lcodes, dcodes, blcodes)\n// deflate_state *s;\n// int lcodes, dcodes, blcodes; /* number of codes for each tree */\n{\n var rank; /* index in bl_order */\n\n //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, \"not enough codes\");\n //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,\n // \"too many codes\");\n //Tracev((stderr, \"\\nbl counts: \"));\n send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */\n send_bits(s, dcodes - 1, 5);\n send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */\n for (rank = 0; rank < blcodes; rank++) {\n //Tracev((stderr, \"\\nbl code %2d \", bl_order[rank]));\n send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3);\n }\n //Tracev((stderr, \"\\nbl tree: sent %ld\", s->bits_sent));\n\n send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */\n //Tracev((stderr, \"\\nlit tree: sent %ld\", s->bits_sent));\n\n send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */\n //Tracev((stderr, \"\\ndist tree: sent %ld\", s->bits_sent));\n}\n\n\n/* ===========================================================================\n * Check if the data type is TEXT or BINARY, using the following algorithm:\n * - TEXT if the two conditions below are satisfied:\n * a) There are no non-portable control characters belonging to the\n * \"black list\" (0..6, 14..25, 28..31).\n * b) There is at least one printable character belonging to the\n * \"white list\" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255).\n * - BINARY otherwise.\n * - The following partially-portable control characters form a\n * \"gray list\" that is ignored in this detection algorithm:\n * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}).\n * IN assertion: the fields Freq of dyn_ltree are set.\n */\nfunction detect_data_type(s) {\n /* black_mask is the bit mask of black-listed bytes\n * set bits 0..6, 14..25, and 28..31\n * 0xf3ffc07f = binary 11110011111111111100000001111111\n */\n var black_mask = 0xf3ffc07f;\n var n;\n\n /* Check for non-textual (\"black-listed\") bytes. */\n for (n = 0; n <= 31; n++, black_mask >>>= 1) {\n if ((black_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) {\n return Z_BINARY;\n }\n }\n\n /* Check for textual (\"white-listed\") bytes. */\n if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 ||\n s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) {\n return Z_TEXT;\n }\n for (n = 32; n < LITERALS; n++) {\n if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) {\n return Z_TEXT;\n }\n }\n\n /* There are no \"black-listed\" or \"white-listed\" bytes:\n * this stream either is empty or has tolerated (\"gray-listed\") bytes only.\n */\n return Z_BINARY;\n}\n\n\nvar static_init_done = false;\n\n/* ===========================================================================\n * Initialize the tree data structures for a new zlib stream.\n */\nfunction _tr_init(s)\n{\n\n if (!static_init_done) {\n tr_static_init();\n static_init_done = true;\n }\n\n s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc);\n s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc);\n s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc);\n\n s.bi_buf = 0;\n s.bi_valid = 0;\n\n /* Initialize the first block of the first file: */\n init_block(s);\n}\n\n\n/* ===========================================================================\n * Send a stored block\n */\nfunction _tr_stored_block(s, buf, stored_len, last)\n//DeflateState *s;\n//charf *buf; /* input block */\n//ulg stored_len; /* length of input block */\n//int last; /* one if this is the last block for a file */\n{\n send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); /* send block type */\n copy_block(s, buf, stored_len, true); /* with header */\n}\n\n\n/* ===========================================================================\n * Send one empty static block to give enough lookahead for inflate.\n * This takes 10 bits, of which 7 may remain in the bit buffer.\n */\nfunction _tr_align(s) {\n send_bits(s, STATIC_TREES << 1, 3);\n send_code(s, END_BLOCK, static_ltree);\n bi_flush(s);\n}\n\n\n/* ===========================================================================\n * Determine the best encoding for the current block: dynamic trees, static\n * trees or store, and output the encoded block to the zip file.\n */\nfunction _tr_flush_block(s, buf, stored_len, last)\n//DeflateState *s;\n//charf *buf; /* input block, or NULL if too old */\n//ulg stored_len; /* length of input block */\n//int last; /* one if this is the last block for a file */\n{\n var opt_lenb, static_lenb; /* opt_len and static_len in bytes */\n var max_blindex = 0; /* index of last bit length code of non zero freq */\n\n /* Build the Huffman trees unless a stored block is forced */\n if (s.level > 0) {\n\n /* Check if the file is binary or text */\n if (s.strm.data_type === Z_UNKNOWN) {\n s.strm.data_type = detect_data_type(s);\n }\n\n /* Construct the literal and distance trees */\n build_tree(s, s.l_desc);\n // Tracev((stderr, \"\\nlit data: dyn %ld, stat %ld\", s->opt_len,\n // s->static_len));\n\n build_tree(s, s.d_desc);\n // Tracev((stderr, \"\\ndist data: dyn %ld, stat %ld\", s->opt_len,\n // s->static_len));\n /* At this point, opt_len and static_len are the total bit lengths of\n * the compressed block data, excluding the tree representations.\n */\n\n /* Build the bit length tree for the above two trees, and get the index\n * in bl_order of the last bit length code to send.\n */\n max_blindex = build_bl_tree(s);\n\n /* Determine the best encoding. Compute the block lengths in bytes. */\n opt_lenb = (s.opt_len + 3 + 7) >>> 3;\n static_lenb = (s.static_len + 3 + 7) >>> 3;\n\n // Tracev((stderr, \"\\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u \",\n // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,\n // s->last_lit));\n\n if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; }\n\n } else {\n // Assert(buf != (char*)0, \"lost buf\");\n opt_lenb = static_lenb = stored_len + 5; /* force a stored block */\n }\n\n if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) {\n /* 4: two words for the lengths */\n\n /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n * Otherwise we can't have processed more than WSIZE input bytes since\n * the last block flush, because compression would have been\n * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n * transform a block into a stored block.\n */\n _tr_stored_block(s, buf, stored_len, last);\n\n } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) {\n\n send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3);\n compress_block(s, static_ltree, static_dtree);\n\n } else {\n send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3);\n send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1);\n compress_block(s, s.dyn_ltree, s.dyn_dtree);\n }\n // Assert (s->compressed_len == s->bits_sent, \"bad compressed size\");\n /* The above check is made mod 2^32, for files larger than 512 MB\n * and uLong implemented on 32 bits.\n */\n init_block(s);\n\n if (last) {\n bi_windup(s);\n }\n // Tracev((stderr,\"\\ncomprlen %lu(%lu) \", s->compressed_len>>3,\n // s->compressed_len-7*last));\n}\n\n/* ===========================================================================\n * Save the match info and tally the frequency counts. Return true if\n * the current block must be flushed.\n */\nfunction _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}\n\nexports._tr_init = _tr_init;\nexports._tr_stored_block = _tr_stored_block;\nexports._tr_flush_block = _tr_flush_block;\nexports._tr_tally = _tr_tally;\nexports._tr_align = _tr_align;\n" - }, - { - "id": 15, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\inflate.js", - "name": "./node_modules/pako/lib/inflate.js", - "index": 18, - "index2": 18, - "size": 12412, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\pako\\index.js", - "issuerId": 1, - "issuerName": "./node_modules/pako/index.js", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "name": "./node_modules/fast-png/lib-esm/index.js", - "profile": { - "factory": 2180, - "building": 1082 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "name": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "profile": { - "factory": 21, - "building": 92, - "dependencies": 43 - } - }, - { - "id": 1, - "identifier": "F:\\tweb\\node_modules\\pako\\index.js", - "name": "./node_modules/pako/index.js", - "profile": { - "factory": 48, - "building": 7 - } - } - ], - "profile": { - "factory": 11, - "building": 13, - "dependencies": 8 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 1, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\index.js", - "module": "./node_modules/pako/index.js", - "moduleName": "./node_modules/pako/index.js", - "type": "cjs require", - "userRequest": "./lib/inflate", - "loc": "7:16-40" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 5, - "source": "'use strict';\n\n\nvar zlib_inflate = require('./zlib/inflate');\nvar utils = require('./utils/common');\nvar strings = require('./utils/strings');\nvar c = require('./zlib/constants');\nvar msg = require('./zlib/messages');\nvar ZStream = require('./zlib/zstream');\nvar GZheader = require('./zlib/gzheader');\n\nvar toString = Object.prototype.toString;\n\n/**\n * class Inflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[inflate]]\n * and [[inflateRaw]].\n **/\n\n/* internal\n * inflate.chunks -> Array\n *\n * Chunks of output data, if [[Inflate#onData]] not overridden.\n **/\n\n/**\n * Inflate.result -> Uint8Array|Array|String\n *\n * Uncompressed result, generated by default [[Inflate#onData]]\n * and [[Inflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Inflate#push]] with `Z_FINISH` / `true` param) or if you\n * push a chunk with explicit flush (call [[Inflate#push]] with\n * `Z_SYNC_FLUSH` param).\n **/\n\n/**\n * Inflate.err -> Number\n *\n * Error code after inflate finished. 0 (Z_OK) on success.\n * Should be checked if broken data possible.\n **/\n\n/**\n * Inflate.msg -> String\n *\n * Error message, if [[Inflate.err]] != 0\n **/\n\n\n/**\n * new Inflate(options)\n * - options (Object): zlib inflate options.\n *\n * Creates new inflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `windowBits`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw inflate\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n * By default, when no options set, autodetect deflate/gzip data format via\n * wrapper header.\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])\n * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * var inflate = new pako.Inflate({ level: 3});\n *\n * inflate.push(chunk1, false);\n * inflate.push(chunk2, true); // true -> last chunk\n *\n * if (inflate.err) { throw new Error(inflate.err); }\n *\n * console.log(inflate.result);\n * ```\n **/\nfunction Inflate(options) {\n if (!(this instanceof Inflate)) return new Inflate(options);\n\n this.options = utils.assign({\n chunkSize: 16384,\n windowBits: 0,\n to: ''\n }, options || {});\n\n var opt = this.options;\n\n // Force window size for `raw` data, if not set directly,\n // because we have no header for autodetect.\n if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) {\n opt.windowBits = -opt.windowBits;\n if (opt.windowBits === 0) { opt.windowBits = -15; }\n }\n\n // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate\n if ((opt.windowBits >= 0) && (opt.windowBits < 16) &&\n !(options && options.windowBits)) {\n opt.windowBits += 32;\n }\n\n // Gzip header has no info about windows size, we can do autodetect only\n // for deflate. So, if window size not set, force it to max when gzip possible\n if ((opt.windowBits > 15) && (opt.windowBits < 48)) {\n // bit 3 (16) -> gzipped data\n // bit 4 (32) -> autodetect gzip/deflate\n if ((opt.windowBits & 15) === 0) {\n opt.windowBits |= 15;\n }\n }\n\n this.err = 0; // error code, if happens (0 = Z_OK)\n this.msg = ''; // error message\n this.ended = false; // used to avoid multiple onEnd() calls\n this.chunks = []; // chunks of compressed data\n\n this.strm = new ZStream();\n this.strm.avail_out = 0;\n\n var status = zlib_inflate.inflateInit2(\n this.strm,\n opt.windowBits\n );\n\n if (status !== c.Z_OK) {\n throw new Error(msg[status]);\n }\n\n this.header = new GZheader();\n\n zlib_inflate.inflateGetHeader(this.strm, this.header);\n\n // Setup dictionary\n if (opt.dictionary) {\n // Convert data if needed\n if (typeof opt.dictionary === 'string') {\n opt.dictionary = strings.string2buf(opt.dictionary);\n } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {\n opt.dictionary = new Uint8Array(opt.dictionary);\n }\n if (opt.raw) { //In raw mode we need to set the dictionary early\n status = zlib_inflate.inflateSetDictionary(this.strm, opt.dictionary);\n if (status !== c.Z_OK) {\n throw new Error(msg[status]);\n }\n }\n }\n}\n\n/**\n * Inflate#push(data[, mode]) -> Boolean\n * - data (Uint8Array|Array|ArrayBuffer|String): input data\n * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.\n *\n * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with\n * new output chunks. Returns `true` on success. The last data block must have\n * mode Z_FINISH (or `true`). That will flush internal pending buffers and call\n * [[Inflate#onEnd]]. For interim explicit flushes (without ending the stream) you\n * can use mode Z_SYNC_FLUSH, keeping the decompression context.\n *\n * On fail call [[Inflate#onEnd]] with error code and return false.\n *\n * We strongly recommend to use `Uint8Array` on input for best speed (output\n * format is detected automatically). Also, don't skip last param and always\n * use the same type in your code (boolean or number). That will improve JS speed.\n *\n * For regular `Array`-s make sure all elements are [0..255].\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true); // push last chunk\n * ```\n **/\nInflate.prototype.push = function (data, mode) {\n var strm = this.strm;\n var chunkSize = this.options.chunkSize;\n var dictionary = this.options.dictionary;\n var status, _mode;\n var next_out_utf8, tail, utf8str;\n\n // Flag to properly process Z_BUF_ERROR on testing inflate call\n // when we check that all output data was flushed.\n var allowBufError = false;\n\n if (this.ended) { return false; }\n _mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH);\n\n // Convert data if needed\n if (typeof data === 'string') {\n // Only binary strings can be decompressed on practice\n strm.input = strings.binstring2buf(data);\n } else if (toString.call(data) === '[object ArrayBuffer]') {\n strm.input = new Uint8Array(data);\n } else {\n strm.input = data;\n }\n\n strm.next_in = 0;\n strm.avail_in = strm.input.length;\n\n do {\n if (strm.avail_out === 0) {\n strm.output = new utils.Buf8(chunkSize);\n strm.next_out = 0;\n strm.avail_out = chunkSize;\n }\n\n status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH); /* no bad return value */\n\n if (status === c.Z_NEED_DICT && dictionary) {\n status = zlib_inflate.inflateSetDictionary(this.strm, dictionary);\n }\n\n if (status === c.Z_BUF_ERROR && allowBufError === true) {\n status = c.Z_OK;\n allowBufError = false;\n }\n\n if (status !== c.Z_STREAM_END && status !== c.Z_OK) {\n this.onEnd(status);\n this.ended = true;\n return false;\n }\n\n if (strm.next_out) {\n if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH))) {\n\n if (this.options.to === 'string') {\n\n next_out_utf8 = strings.utf8border(strm.output, strm.next_out);\n\n tail = strm.next_out - next_out_utf8;\n utf8str = strings.buf2string(strm.output, next_out_utf8);\n\n // move tail\n strm.next_out = tail;\n strm.avail_out = chunkSize - tail;\n if (tail) { utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); }\n\n this.onData(utf8str);\n\n } else {\n this.onData(utils.shrinkBuf(strm.output, strm.next_out));\n }\n }\n }\n\n // When no more input data, we should check that internal inflate buffers\n // are flushed. The only way to do it when avail_out = 0 - run one more\n // inflate pass. But if output data not exists, inflate return Z_BUF_ERROR.\n // Here we set flag to process this error properly.\n //\n // NOTE. Deflate does not return error in this case and does not needs such\n // logic.\n if (strm.avail_in === 0 && strm.avail_out === 0) {\n allowBufError = true;\n }\n\n } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c.Z_STREAM_END);\n\n if (status === c.Z_STREAM_END) {\n _mode = c.Z_FINISH;\n }\n\n // Finalize on the last chunk.\n if (_mode === c.Z_FINISH) {\n status = zlib_inflate.inflateEnd(this.strm);\n this.onEnd(status);\n this.ended = true;\n return status === c.Z_OK;\n }\n\n // callback interim results if Z_SYNC_FLUSH.\n if (_mode === c.Z_SYNC_FLUSH) {\n this.onEnd(c.Z_OK);\n strm.avail_out = 0;\n return true;\n }\n\n return true;\n};\n\n\n/**\n * Inflate#onData(chunk) -> Void\n * - chunk (Uint8Array|Array|String): output data. Type of array depends\n * on js engine support. When string output requested, each chunk\n * will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nInflate.prototype.onData = function (chunk) {\n this.chunks.push(chunk);\n};\n\n\n/**\n * Inflate#onEnd(status) -> Void\n * - status (Number): inflate status. 0 (Z_OK) on success,\n * other if not.\n *\n * Called either after you tell inflate that the input stream is\n * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)\n * or if an error happened. By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nInflate.prototype.onEnd = function (status) {\n // On success - join\n if (status === c.Z_OK) {\n if (this.options.to === 'string') {\n // Glue & convert here, until we teach pako to send\n // utf8 aligned strings to onData\n this.result = this.chunks.join('');\n } else {\n this.result = utils.flattenChunks(this.chunks);\n }\n }\n this.chunks = [];\n this.err = status;\n this.msg = this.strm.msg;\n};\n\n\n/**\n * inflate(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Decompress `data` with inflate/ungzip and `options`. Autodetect\n * format via wrapper header by default. That's why we don't provide\n * separate `ungzip` method.\n *\n * Supported options are:\n *\n * - windowBits\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n * negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , input = pako.deflate([1,2,3,4,5,6,7,8,9])\n * , output;\n *\n * try {\n * output = pako.inflate(input);\n * } catch (err)\n * console.log(err);\n * }\n * ```\n **/\nfunction inflate(input, options) {\n var inflator = new Inflate(options);\n\n inflator.push(input, true);\n\n // That will never happens, if you don't cheat with options :)\n if (inflator.err) { throw inflator.msg || msg[inflator.err]; }\n\n return inflator.result;\n}\n\n\n/**\n * inflateRaw(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * The same as [[inflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction inflateRaw(input, options) {\n options = options || {};\n options.raw = true;\n return inflate(input, options);\n}\n\n\n/**\n * ungzip(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Just shortcut to [[inflate]], because it autodetects format\n * by header.content. Done for convenience.\n **/\n\n\nexports.Inflate = Inflate;\nexports.inflate = inflate;\nexports.inflateRaw = inflateRaw;\nexports.ungzip = inflate;\n" - }, - { - "id": 16, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\inflate.js", - "name": "./node_modules/pako/lib/zlib/inflate.js", - "index": 19, - "index2": 15, - "size": 50284, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\pako\\lib\\inflate.js", - "issuerId": 15, - "issuerName": "./node_modules/pako/lib/inflate.js", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "name": "./node_modules/fast-png/lib-esm/index.js", - "profile": { - "factory": 2180, - "building": 1082 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "name": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "profile": { - "factory": 21, - "building": 92, - "dependencies": 43 - } - }, - { - "id": 1, - "identifier": "F:\\tweb\\node_modules\\pako\\index.js", - "name": "./node_modules/pako/index.js", - "profile": { - "factory": 48, - "building": 7 - } - }, - { - "id": 15, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\inflate.js", - "name": "./node_modules/pako/lib/inflate.js", - "profile": { - "factory": 11, - "building": 13, - "dependencies": 8 - } - } - ], - "profile": { - "factory": 9, - "building": 47, - "dependencies": 9 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 15, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\lib\\inflate.js", - "module": "./node_modules/pako/lib/inflate.js", - "moduleName": "./node_modules/pako/lib/inflate.js", - "type": "cjs require", - "userRequest": "./zlib/inflate", - "loc": "4:19-44" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 6, - "source": "'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils = require('../utils/common');\nvar adler32 = require('./adler32');\nvar crc32 = require('./crc32');\nvar inflate_fast = require('./inffast');\nvar inflate_table = require('./inftrees');\n\nvar CODES = 0;\nvar LENS = 1;\nvar DISTS = 2;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n/* Allowed flush values; see deflate() and inflate() below for details */\n//var Z_NO_FLUSH = 0;\n//var Z_PARTIAL_FLUSH = 1;\n//var Z_SYNC_FLUSH = 2;\n//var Z_FULL_FLUSH = 3;\nvar Z_FINISH = 4;\nvar Z_BLOCK = 5;\nvar Z_TREES = 6;\n\n\n/* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\nvar Z_OK = 0;\nvar Z_STREAM_END = 1;\nvar Z_NEED_DICT = 2;\n//var Z_ERRNO = -1;\nvar Z_STREAM_ERROR = -2;\nvar Z_DATA_ERROR = -3;\nvar Z_MEM_ERROR = -4;\nvar Z_BUF_ERROR = -5;\n//var Z_VERSION_ERROR = -6;\n\n/* The deflate compression method */\nvar Z_DEFLATED = 8;\n\n\n/* STATES ====================================================================*/\n/* ===========================================================================*/\n\n\nvar HEAD = 1; /* i: waiting for magic header */\nvar FLAGS = 2; /* i: waiting for method and flags (gzip) */\nvar TIME = 3; /* i: waiting for modification time (gzip) */\nvar OS = 4; /* i: waiting for extra flags and operating system (gzip) */\nvar EXLEN = 5; /* i: waiting for extra length (gzip) */\nvar EXTRA = 6; /* i: waiting for extra bytes (gzip) */\nvar NAME = 7; /* i: waiting for end of file name (gzip) */\nvar COMMENT = 8; /* i: waiting for end of comment (gzip) */\nvar HCRC = 9; /* i: waiting for header crc (gzip) */\nvar DICTID = 10; /* i: waiting for dictionary check value */\nvar DICT = 11; /* waiting for inflateSetDictionary() call */\nvar TYPE = 12; /* i: waiting for type bits, including last-flag bit */\nvar TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */\nvar STORED = 14; /* i: waiting for stored size (length and complement) */\nvar COPY_ = 15; /* i/o: same as COPY below, but only first time in */\nvar COPY = 16; /* i/o: waiting for input or output to copy stored block */\nvar TABLE = 17; /* i: waiting for dynamic block table lengths */\nvar LENLENS = 18; /* i: waiting for code length code lengths */\nvar CODELENS = 19; /* i: waiting for length/lit and distance code lengths */\nvar LEN_ = 20; /* i: same as LEN below, but only first time in */\nvar LEN = 21; /* i: waiting for length/lit/eob code */\nvar LENEXT = 22; /* i: waiting for length extra bits */\nvar DIST = 23; /* i: waiting for distance code */\nvar DISTEXT = 24; /* i: waiting for distance extra bits */\nvar MATCH = 25; /* o: waiting for output space to copy string */\nvar LIT = 26; /* o: waiting for output space to write literal */\nvar CHECK = 27; /* i: waiting for 32-bit check value */\nvar LENGTH = 28; /* i: waiting for 32-bit length (gzip) */\nvar DONE = 29; /* finished check, done -- remain here until reset */\nvar BAD = 30; /* got a data error -- remain here until reset */\nvar MEM = 31; /* got an inflate() memory error -- remain here until reset */\nvar SYNC = 32; /* looking for synchronization bytes to restart inflate() */\n\n/* ===========================================================================*/\n\n\n\nvar ENOUGH_LENS = 852;\nvar ENOUGH_DISTS = 592;\n//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nvar MAX_WBITS = 15;\n/* 32K LZ77 window */\nvar DEF_WBITS = MAX_WBITS;\n\n\nfunction zswap32(q) {\n return (((q >>> 24) & 0xff) +\n ((q >>> 8) & 0xff00) +\n ((q & 0xff00) << 8) +\n ((q & 0xff) << 24));\n}\n\n\nfunction InflateState() {\n this.mode = 0; /* current inflate mode */\n this.last = false; /* true if processing last block */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n this.havedict = false; /* true if dictionary provided */\n this.flags = 0; /* gzip header method and flags (0 if zlib) */\n this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */\n this.check = 0; /* protected copy of check value */\n this.total = 0; /* protected copy of output count */\n // TODO: may be {}\n this.head = null; /* where to save gzip header information */\n\n /* sliding window */\n this.wbits = 0; /* log base 2 of requested window size */\n this.wsize = 0; /* window size or zero if not using window */\n this.whave = 0; /* valid bytes in the window */\n this.wnext = 0; /* window write index */\n this.window = null; /* allocated sliding window, if needed */\n\n /* bit accumulator */\n this.hold = 0; /* input bit accumulator */\n this.bits = 0; /* number of bits in \"in\" */\n\n /* for string and stored block copying */\n this.length = 0; /* literal or length of data to copy */\n this.offset = 0; /* distance back to copy string from */\n\n /* for table and code decoding */\n this.extra = 0; /* extra bits needed */\n\n /* fixed and dynamic code tables */\n this.lencode = null; /* starting table for length/literal codes */\n this.distcode = null; /* starting table for distance codes */\n this.lenbits = 0; /* index bits for lencode */\n this.distbits = 0; /* index bits for distcode */\n\n /* dynamic table building */\n this.ncode = 0; /* number of code length code lengths */\n this.nlen = 0; /* number of length code lengths */\n this.ndist = 0; /* number of distance code lengths */\n this.have = 0; /* number of code lengths in lens[] */\n this.next = null; /* next available space in codes[] */\n\n this.lens = new utils.Buf16(320); /* temporary storage for code lengths */\n this.work = new utils.Buf16(288); /* work area for code table building */\n\n /*\n because we don't have pointers in js, we use lencode and distcode directly\n as buffers so we don't need codes\n */\n //this.codes = new utils.Buf32(ENOUGH); /* space for code tables */\n this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */\n this.distdyn = null; /* dynamic table for distance codes (JS specific) */\n this.sane = 0; /* if false, allow invalid distance too far */\n this.back = 0; /* bits back of last unprocessed length/lit */\n this.was = 0; /* initial length of match */\n}\n\nfunction inflateResetKeep(strm) {\n var state;\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n strm.total_in = strm.total_out = state.total = 0;\n strm.msg = ''; /*Z_NULL*/\n if (state.wrap) { /* to support ill-conceived Java test suite */\n strm.adler = state.wrap & 1;\n }\n state.mode = HEAD;\n state.last = 0;\n state.havedict = 0;\n state.dmax = 32768;\n state.head = null/*Z_NULL*/;\n state.hold = 0;\n state.bits = 0;\n //state.lencode = state.distcode = state.next = state.codes;\n state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS);\n state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS);\n\n state.sane = 1;\n state.back = -1;\n //Tracev((stderr, \"inflate: reset\\n\"));\n return Z_OK;\n}\n\nfunction inflateReset(strm) {\n var state;\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n state.wsize = 0;\n state.whave = 0;\n state.wnext = 0;\n return inflateResetKeep(strm);\n\n}\n\nfunction inflateReset2(strm, windowBits) {\n var wrap;\n var state;\n\n /* get the state */\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n\n /* extract wrap request from windowBits parameter */\n if (windowBits < 0) {\n wrap = 0;\n windowBits = -windowBits;\n }\n else {\n wrap = (windowBits >> 4) + 1;\n if (windowBits < 48) {\n windowBits &= 15;\n }\n }\n\n /* set number of window bits, free window if different */\n if (windowBits && (windowBits < 8 || windowBits > 15)) {\n return Z_STREAM_ERROR;\n }\n if (state.window !== null && state.wbits !== windowBits) {\n state.window = null;\n }\n\n /* update state and reset the rest of it */\n state.wrap = wrap;\n state.wbits = windowBits;\n return inflateReset(strm);\n}\n\nfunction inflateInit2(strm, windowBits) {\n var ret;\n var state;\n\n if (!strm) { return Z_STREAM_ERROR; }\n //strm.msg = Z_NULL; /* in case we return an error */\n\n state = new InflateState();\n\n //if (state === Z_NULL) return Z_MEM_ERROR;\n //Tracev((stderr, \"inflate: allocated\\n\"));\n strm.state = state;\n state.window = null/*Z_NULL*/;\n ret = inflateReset2(strm, windowBits);\n if (ret !== Z_OK) {\n strm.state = null/*Z_NULL*/;\n }\n return ret;\n}\n\nfunction inflateInit(strm) {\n return inflateInit2(strm, DEF_WBITS);\n}\n\n\n/*\n Return state with length and distance decoding tables and index sizes set to\n fixed code decoding. Normally this returns fixed tables from inffixed.h.\n If BUILDFIXED is defined, then instead this routine builds the tables the\n first time it's called, and returns those tables the first time and\n thereafter. This reduces the size of the code by about 2K bytes, in\n exchange for a little execution time. However, BUILDFIXED should not be\n used for threaded applications, since the rewriting of the tables and virgin\n may not be thread-safe.\n */\nvar virgin = true;\n\nvar lenfix, distfix; // We have no pointers in JS, so keep tables separate\n\nfunction fixedtables(state) {\n /* build fixed huffman tables if first call (may not be thread safe) */\n if (virgin) {\n var sym;\n\n lenfix = new utils.Buf32(512);\n distfix = new utils.Buf32(32);\n\n /* literal/length table */\n sym = 0;\n while (sym < 144) { state.lens[sym++] = 8; }\n while (sym < 256) { state.lens[sym++] = 9; }\n while (sym < 280) { state.lens[sym++] = 7; }\n while (sym < 288) { state.lens[sym++] = 8; }\n\n inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 });\n\n /* distance table */\n sym = 0;\n while (sym < 32) { state.lens[sym++] = 5; }\n\n inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 });\n\n /* do this just once */\n virgin = false;\n }\n\n state.lencode = lenfix;\n state.lenbits = 9;\n state.distcode = distfix;\n state.distbits = 5;\n}\n\n\n/*\n Update the window with the last wsize (normally 32K) bytes written before\n returning. If window does not exist yet, create it. This is only called\n when a window is already in use, or when output has been written during this\n inflate call, but the end of the deflate stream has not been reached yet.\n It is also called to create a window for dictionary data when a dictionary\n is loaded.\n\n Providing output buffers larger than 32K to inflate() should provide a speed\n advantage, since only the last 32K of output is copied to the sliding window\n upon return from inflate(), and since all distances after the first 32K of\n output will fall in the output data, making match copies simpler and faster.\n The advantage may be dependent on the size of the processor's data caches.\n */\nfunction updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}\n\nfunction inflate(strm, flush) {\n var state;\n var input, output; // input/output buffers\n var next; /* next input INDEX */\n var put; /* next output INDEX */\n var have, left; /* available input and output */\n var hold; /* bit buffer */\n var bits; /* bits in bit buffer */\n var _in, _out; /* save starting available input and output */\n var copy; /* number of stored or match bytes to copy */\n var from; /* where to copy match bytes from */\n var from_source;\n var here = 0; /* current decoding table entry */\n var here_bits, here_op, here_val; // paked \"here\" denormalized (JS specific)\n //var last; /* parent table entry */\n var last_bits, last_op, last_val; // paked \"last\" denormalized (JS specific)\n var len; /* length to copy for repeats, bits to drop */\n var ret; /* return code */\n var hbuf = new utils.Buf8(4); /* buffer for gzip header crc calculation */\n var opts;\n\n var n; // temporary var for NEED_BITS\n\n var order = /* permutation of code lengths */\n [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ];\n\n\n if (!strm || !strm.state || !strm.output ||\n (!strm.input && strm.avail_in !== 0)) {\n return Z_STREAM_ERROR;\n }\n\n state = strm.state;\n if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */\n\n\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n _in = have;\n _out = left;\n ret = Z_OK;\n\n inf_leave: // goto emulation\n for (;;) {\n switch (state.mode) {\n case HEAD:\n if (state.wrap === 0) {\n state.mode = TYPEDO;\n break;\n }\n //=== NEEDBITS(16);\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */\n state.check = 0/*crc32(0L, Z_NULL, 0)*/;\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = FLAGS;\n break;\n }\n state.flags = 0; /* expect zlib header */\n if (state.head) {\n state.head.done = false;\n }\n if (!(state.wrap & 1) || /* check if zlib header allowed */\n (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) {\n strm.msg = 'incorrect header check';\n state.mode = BAD;\n break;\n }\n if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n len = (hold & 0x0f)/*BITS(4)*/ + 8;\n if (state.wbits === 0) {\n state.wbits = len;\n }\n else if (len > state.wbits) {\n strm.msg = 'invalid window size';\n state.mode = BAD;\n break;\n }\n state.dmax = 1 << len;\n //Tracev((stderr, \"inflate: zlib header ok\\n\"));\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = hold & 0x200 ? DICTID : TYPE;\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n break;\n case FLAGS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.flags = hold;\n if ((state.flags & 0xff) !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n if (state.flags & 0xe000) {\n strm.msg = 'unknown header flags set';\n state.mode = BAD;\n break;\n }\n if (state.head) {\n state.head.text = ((hold >> 8) & 1);\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = TIME;\n /* falls through */\n case TIME:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.time = hold;\n }\n if (state.flags & 0x0200) {\n //=== CRC4(state.check, hold)\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n hbuf[2] = (hold >>> 16) & 0xff;\n hbuf[3] = (hold >>> 24) & 0xff;\n state.check = crc32(state.check, hbuf, 4, 0);\n //===\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = OS;\n /* falls through */\n case OS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.xflags = (hold & 0xff);\n state.head.os = (hold >> 8);\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = EXLEN;\n /* falls through */\n case EXLEN:\n if (state.flags & 0x0400) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length = hold;\n if (state.head) {\n state.head.extra_len = hold;\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n else if (state.head) {\n state.head.extra = null/*Z_NULL*/;\n }\n state.mode = EXTRA;\n /* falls through */\n case EXTRA:\n if (state.flags & 0x0400) {\n copy = state.length;\n if (copy > have) { copy = have; }\n if (copy) {\n if (state.head) {\n len = state.head.extra_len - state.length;\n if (!state.head.extra) {\n // Use untyped array for more convenient processing later\n state.head.extra = new Array(state.head.extra_len);\n }\n utils.arraySet(\n state.head.extra,\n input,\n next,\n // extra field is limited to 65536 bytes\n // - no need for additional size check\n copy,\n /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/\n len\n );\n //zmemcpy(state.head.extra + len, next,\n // len + copy > state.head.extra_max ?\n // state.head.extra_max - len : copy);\n }\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n state.length -= copy;\n }\n if (state.length) { break inf_leave; }\n }\n state.length = 0;\n state.mode = NAME;\n /* falls through */\n case NAME:\n if (state.flags & 0x0800) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n // TODO: 2 or 1 bytes?\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.name_max*/)) {\n state.head.name += String.fromCharCode(len);\n }\n } while (len && copy < have);\n\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.name = null;\n }\n state.length = 0;\n state.mode = COMMENT;\n /* falls through */\n case COMMENT:\n if (state.flags & 0x1000) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.comm_max*/)) {\n state.head.comment += String.fromCharCode(len);\n }\n } while (len && copy < have);\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.comment = null;\n }\n state.mode = HCRC;\n /* falls through */\n case HCRC:\n if (state.flags & 0x0200) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (hold !== (state.check & 0xffff)) {\n strm.msg = 'header crc mismatch';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n if (state.head) {\n state.head.hcrc = ((state.flags >> 9) & 1);\n state.head.done = true;\n }\n strm.adler = state.check = 0;\n state.mode = TYPE;\n break;\n case DICTID:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n strm.adler = state.check = zswap32(hold);\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = DICT;\n /* falls through */\n case DICT:\n if (state.havedict === 0) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n return Z_NEED_DICT;\n }\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = TYPE;\n /* falls through */\n case TYPE:\n if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case TYPEDO:\n if (state.last) {\n //--- BYTEBITS() ---//\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n state.mode = CHECK;\n break;\n }\n //=== NEEDBITS(3); */\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.last = (hold & 0x01)/*BITS(1)*/;\n //--- DROPBITS(1) ---//\n hold >>>= 1;\n bits -= 1;\n //---//\n\n switch ((hold & 0x03)/*BITS(2)*/) {\n case 0: /* stored block */\n //Tracev((stderr, \"inflate: stored block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = STORED;\n break;\n case 1: /* fixed block */\n fixedtables(state);\n //Tracev((stderr, \"inflate: fixed codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = LEN_; /* decode codes */\n if (flush === Z_TREES) {\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break inf_leave;\n }\n break;\n case 2: /* dynamic block */\n //Tracev((stderr, \"inflate: dynamic codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = TABLE;\n break;\n case 3:\n strm.msg = 'invalid block type';\n state.mode = BAD;\n }\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break;\n case STORED:\n //--- BYTEBITS() ---// /* go to byte boundary */\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) {\n strm.msg = 'invalid stored block lengths';\n state.mode = BAD;\n break;\n }\n state.length = hold & 0xffff;\n //Tracev((stderr, \"inflate: stored length %u\\n\",\n // state.length));\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = COPY_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case COPY_:\n state.mode = COPY;\n /* falls through */\n case COPY:\n copy = state.length;\n if (copy) {\n if (copy > have) { copy = have; }\n if (copy > left) { copy = left; }\n if (copy === 0) { break inf_leave; }\n //--- zmemcpy(put, next, copy); ---\n utils.arraySet(output, input, next, copy, put);\n //---//\n have -= copy;\n next += copy;\n left -= copy;\n put += copy;\n state.length -= copy;\n break;\n }\n //Tracev((stderr, \"inflate: stored end\\n\"));\n state.mode = TYPE;\n break;\n case TABLE:\n //=== NEEDBITS(14); */\n while (bits < 14) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4;\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n//#ifndef PKZIP_BUG_WORKAROUND\n if (state.nlen > 286 || state.ndist > 30) {\n strm.msg = 'too many length or distance symbols';\n state.mode = BAD;\n break;\n }\n//#endif\n //Tracev((stderr, \"inflate: table sizes ok\\n\"));\n state.have = 0;\n state.mode = LENLENS;\n /* falls through */\n case LENLENS:\n while (state.have < state.ncode) {\n //=== NEEDBITS(3);\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.lens[order[state.have++]] = (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n while (state.have < 19) {\n state.lens[order[state.have++]] = 0;\n }\n // We have separate tables & no pointers. 2 commented lines below not needed.\n //state.next = state.codes;\n //state.lencode = state.next;\n // Switch to use dynamic table\n state.lencode = state.lendyn;\n state.lenbits = 7;\n\n opts = { bits: state.lenbits };\n ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts);\n state.lenbits = opts.bits;\n\n if (ret) {\n strm.msg = 'invalid code lengths set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, \"inflate: code lengths ok\\n\"));\n state.have = 0;\n state.mode = CODELENS;\n /* falls through */\n case CODELENS:\n while (state.have < state.nlen + state.ndist) {\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_val < 16) {\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.lens[state.have++] = here_val;\n }\n else {\n if (here_val === 16) {\n //=== NEEDBITS(here.bits + 2);\n n = here_bits + 2;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n if (state.have === 0) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n len = state.lens[state.have - 1];\n copy = 3 + (hold & 0x03);//BITS(2);\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n }\n else if (here_val === 17) {\n //=== NEEDBITS(here.bits + 3);\n n = here_bits + 3;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 3 + (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n else {\n //=== NEEDBITS(here.bits + 7);\n n = here_bits + 7;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 11 + (hold & 0x7f);//BITS(7);\n //--- DROPBITS(7) ---//\n hold >>>= 7;\n bits -= 7;\n //---//\n }\n if (state.have + copy > state.nlen + state.ndist) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n while (copy--) {\n state.lens[state.have++] = len;\n }\n }\n }\n\n /* handle error breaks in while */\n if (state.mode === BAD) { break; }\n\n /* check for end-of-block code (better have one) */\n if (state.lens[256] === 0) {\n strm.msg = 'invalid code -- missing end-of-block';\n state.mode = BAD;\n break;\n }\n\n /* build code tables -- note: do not change the lenbits or distbits\n values here (9 and 6) without reading the comments in inftrees.h\n concerning the ENOUGH constants, which depend on those values */\n state.lenbits = 9;\n\n opts = { bits: state.lenbits };\n ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.lenbits = opts.bits;\n // state.lencode = state.next;\n\n if (ret) {\n strm.msg = 'invalid literal/lengths set';\n state.mode = BAD;\n break;\n }\n\n state.distbits = 6;\n //state.distcode.copy(state.codes);\n // Switch to use dynamic table\n state.distcode = state.distdyn;\n opts = { bits: state.distbits };\n ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.distbits = opts.bits;\n // state.distcode = state.next;\n\n if (ret) {\n strm.msg = 'invalid distances set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, 'inflate: codes ok\\n'));\n state.mode = LEN_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case LEN_:\n state.mode = LEN;\n /* falls through */\n case LEN:\n if (have >= 6 && left >= 258) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n inflate_fast(strm, _out);\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n if (state.mode === TYPE) {\n state.back = -1;\n }\n break;\n }\n state.back = 0;\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if (here_bits <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_op && (here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.lencode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n state.length = here_val;\n if (here_op === 0) {\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n state.mode = LIT;\n break;\n }\n if (here_op & 32) {\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.back = -1;\n state.mode = TYPE;\n break;\n }\n if (here_op & 64) {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD;\n break;\n }\n state.extra = here_op & 15;\n state.mode = LENEXT;\n /* falls through */\n case LENEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", state.length));\n state.was = state.length;\n state.mode = DIST;\n /* falls through */\n case DIST:\n for (;;) {\n here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if ((here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.distcode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n if (here_op & 64) {\n strm.msg = 'invalid distance code';\n state.mode = BAD;\n break;\n }\n state.offset = here_val;\n state.extra = (here_op) & 15;\n state.mode = DISTEXT;\n /* falls through */\n case DISTEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n//#ifdef INFLATE_STRICT\n if (state.offset > state.dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n//#endif\n //Tracevv((stderr, \"inflate: distance %u\\n\", state.offset));\n state.mode = MATCH;\n /* falls through */\n case MATCH:\n if (left === 0) { break inf_leave; }\n copy = _out - left;\n if (state.offset > copy) { /* copy from window */\n copy = state.offset - copy;\n if (copy > state.whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n// Trace((stderr, \"inflate.c too far\\n\"));\n// copy -= state.whave;\n// if (copy > state.length) { copy = state.length; }\n// if (copy > left) { copy = left; }\n// left -= copy;\n// state.length -= copy;\n// do {\n// output[put++] = 0;\n// } while (--copy);\n// if (state.length === 0) { state.mode = LEN; }\n// break;\n//#endif\n }\n if (copy > state.wnext) {\n copy -= state.wnext;\n from = state.wsize - copy;\n }\n else {\n from = state.wnext - copy;\n }\n if (copy > state.length) { copy = state.length; }\n from_source = state.window;\n }\n else { /* copy from output */\n from_source = output;\n from = put - state.offset;\n copy = state.length;\n }\n if (copy > left) { copy = left; }\n left -= copy;\n state.length -= copy;\n do {\n output[put++] = from_source[from++];\n } while (--copy);\n if (state.length === 0) { state.mode = LEN; }\n break;\n case LIT:\n if (left === 0) { break inf_leave; }\n output[put++] = state.length;\n left--;\n state.mode = LEN;\n break;\n case CHECK:\n if (state.wrap) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n // Use '|' instead of '+' to make sure that result is signed\n hold |= input[next++] << bits;\n bits += 8;\n }\n //===//\n _out -= left;\n strm.total_out += _out;\n state.total += _out;\n if (_out) {\n strm.adler = state.check =\n /*UPDATE(state.check, put - _out, _out);*/\n (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out));\n\n }\n _out = left;\n // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too\n if ((state.flags ? hold : zswap32(hold)) !== state.check) {\n strm.msg = 'incorrect data check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: check matches trailer\\n\"));\n }\n state.mode = LENGTH;\n /* falls through */\n case LENGTH:\n if (state.wrap && state.flags) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (hold !== (state.total & 0xffffffff)) {\n strm.msg = 'incorrect length check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: length matches trailer\\n\"));\n }\n state.mode = DONE;\n /* falls through */\n case DONE:\n ret = Z_STREAM_END;\n break inf_leave;\n case BAD:\n ret = Z_DATA_ERROR;\n break inf_leave;\n case MEM:\n return Z_MEM_ERROR;\n case SYNC:\n /* falls through */\n default:\n return Z_STREAM_ERROR;\n }\n }\n\n // inf_leave <- here is real place for \"goto inf_leave\", emulated via \"break inf_leave\"\n\n /*\n Return from inflate(), updating the total counts and the check value.\n If there was no progress during the inflate() call, return a buffer\n error. Call updatewindow() to create and/or update the window state.\n Note: a memory error from inflate() is non-recoverable.\n */\n\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n\n if (state.wsize || (_out !== strm.avail_out && state.mode < BAD &&\n (state.mode < CHECK || flush !== Z_FINISH))) {\n if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) {\n state.mode = MEM;\n return Z_MEM_ERROR;\n }\n }\n _in -= strm.avail_in;\n _out -= strm.avail_out;\n strm.total_in += _in;\n strm.total_out += _out;\n state.total += _out;\n if (state.wrap && _out) {\n strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/\n (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out));\n }\n strm.data_type = state.bits + (state.last ? 64 : 0) +\n (state.mode === TYPE ? 128 : 0) +\n (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);\n if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) {\n ret = Z_BUF_ERROR;\n }\n return ret;\n}\n\nfunction inflateEnd(strm) {\n\n if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) {\n return Z_STREAM_ERROR;\n }\n\n var state = strm.state;\n if (state.window) {\n state.window = null;\n }\n strm.state = null;\n return Z_OK;\n}\n\nfunction inflateGetHeader(strm, head) {\n var state;\n\n /* check state */\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; }\n\n /* save header structure */\n state.head = head;\n head.done = false;\n return Z_OK;\n}\n\nfunction inflateSetDictionary(strm, dictionary) {\n var dictLength = dictionary.length;\n\n var state;\n var dictid;\n var ret;\n\n /* check state */\n if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR; }\n state = strm.state;\n\n if (state.wrap !== 0 && state.mode !== DICT) {\n return Z_STREAM_ERROR;\n }\n\n /* check for correct dictionary identifier */\n if (state.mode === DICT) {\n dictid = 1; /* adler32(0, null, 0)*/\n /* dictid = adler32(dictid, dictionary, dictLength); */\n dictid = adler32(dictid, dictionary, dictLength, 0);\n if (dictid !== state.check) {\n return Z_DATA_ERROR;\n }\n }\n /* copy dictionary to window using updatewindow(), which will amend the\n existing dictionary if appropriate */\n ret = updatewindow(strm, dictionary, dictLength, dictLength);\n if (ret) {\n state.mode = MEM;\n return Z_MEM_ERROR;\n }\n state.havedict = 1;\n // Tracev((stderr, \"inflate: dictionary set\\n\"));\n return Z_OK;\n}\n\nexports.inflateReset = inflateReset;\nexports.inflateReset2 = inflateReset2;\nexports.inflateResetKeep = inflateResetKeep;\nexports.inflateInit = inflateInit;\nexports.inflateInit2 = inflateInit2;\nexports.inflate = inflate;\nexports.inflateEnd = inflateEnd;\nexports.inflateGetHeader = inflateGetHeader;\nexports.inflateSetDictionary = inflateSetDictionary;\nexports.inflateInfo = 'pako inflate (from Nodeca project)';\n\n/* Not implemented\nexports.inflateCopy = inflateCopy;\nexports.inflateGetDictionary = inflateGetDictionary;\nexports.inflateMark = inflateMark;\nexports.inflatePrime = inflatePrime;\nexports.inflateSync = inflateSync;\nexports.inflateSyncPoint = inflateSyncPoint;\nexports.inflateUndermine = inflateUndermine;\n*/\n" - }, - { - "id": 17, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\inffast.js", - "name": "./node_modules/pako/lib/zlib/inffast.js", - "index": 20, - "index2": 13, - "size": 12668, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\inflate.js", - "issuerId": 16, - "issuerName": "./node_modules/pako/lib/zlib/inflate.js", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "name": "./node_modules/fast-png/lib-esm/index.js", - "profile": { - "factory": 2180, - "building": 1082 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "name": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "profile": { - "factory": 21, - "building": 92, - "dependencies": 43 - } - }, - { - "id": 1, - "identifier": "F:\\tweb\\node_modules\\pako\\index.js", - "name": "./node_modules/pako/index.js", - "profile": { - "factory": 48, - "building": 7 - } - }, - { - "id": 15, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\inflate.js", - "name": "./node_modules/pako/lib/inflate.js", - "profile": { - "factory": 11, - "building": 13, - "dependencies": 8 - } - }, - { - "id": 16, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\inflate.js", - "name": "./node_modules/pako/lib/zlib/inflate.js", - "profile": { - "factory": 9, - "building": 47, - "dependencies": 9 - } - } - ], - "profile": { - "factory": 9, - "building": 12, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 16, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\inflate.js", - "module": "./node_modules/pako/lib/zlib/inflate.js", - "moduleName": "./node_modules/pako/lib/zlib/inflate.js", - "type": "cjs require", - "userRequest": "./inffast", - "loc": "25:20-40" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 7, - "source": "'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// See state defs from inflate.js\nvar BAD = 30; /* got a data error -- remain here until reset */\nvar TYPE = 12; /* i: waiting for type bits, including last-flag bit */\n\n/*\n Decode literal, length, and distance codes and write out the resulting\n literal and match bytes until either not enough input or output is\n available, an end-of-block is encountered, or a data error is encountered.\n When large enough input and output buffers are supplied to inflate(), for\n example, a 16K input buffer and a 64K output buffer, more than 95% of the\n inflate execution time is spent in this routine.\n\n Entry assumptions:\n\n state.mode === LEN\n strm.avail_in >= 6\n strm.avail_out >= 258\n start >= strm.avail_out\n state.bits < 8\n\n On return, state.mode is one of:\n\n LEN -- ran out of enough output space or enough available input\n TYPE -- reached end of block code, inflate() to interpret next block\n BAD -- error in block data\n\n Notes:\n\n - The maximum input bits used by a length/distance pair is 15 bits for the\n length code, 5 bits for the length extra, 15 bits for the distance code,\n and 13 bits for the distance extra. This totals 48 bits, or six bytes.\n Therefore if strm.avail_in >= 6, then there is enough input to avoid\n checking for available input while decoding.\n\n - The maximum bytes that a single length/distance pair can output is 258\n bytes, which is the maximum length that can be coded. inflate_fast()\n requires strm.avail_out >= 258 for each loop to avoid checking for\n output space.\n */\nmodule.exports = function inflate_fast(strm, start) {\n var state;\n var _in; /* local strm.input */\n var last; /* have enough input while in < last */\n var _out; /* local strm.output */\n var beg; /* inflate()'s initial strm.output */\n var end; /* while out < end, enough space available */\n//#ifdef INFLATE_STRICT\n var dmax; /* maximum distance from zlib header */\n//#endif\n var wsize; /* window size or zero if not using window */\n var whave; /* valid bytes in the window */\n var wnext; /* window write index */\n // Use `s_window` instead `window`, avoid conflict with instrumentation tools\n var s_window; /* allocated sliding window, if wsize != 0 */\n var hold; /* local strm.hold */\n var bits; /* local strm.bits */\n var lcode; /* local strm.lencode */\n var dcode; /* local strm.distcode */\n var lmask; /* mask for first level of length codes */\n var dmask; /* mask for first level of distance codes */\n var here; /* retrieved table entry */\n var op; /* code bits, operation, extra bits, or */\n /* window position, window bytes to copy */\n var len; /* match length, unused bytes */\n var dist; /* match distance */\n var from; /* where to copy match from */\n var from_source;\n\n\n var input, output; // JS specific, because we have no pointers\n\n /* copy state to local variables */\n state = strm.state;\n //here = state.here;\n _in = strm.next_in;\n input = strm.input;\n last = _in + (strm.avail_in - 5);\n _out = strm.next_out;\n output = strm.output;\n beg = _out - (start - strm.avail_out);\n end = _out + (strm.avail_out - 257);\n//#ifdef INFLATE_STRICT\n dmax = state.dmax;\n//#endif\n wsize = state.wsize;\n whave = state.whave;\n wnext = state.wnext;\n s_window = state.window;\n hold = state.hold;\n bits = state.bits;\n lcode = state.lencode;\n dcode = state.distcode;\n lmask = (1 << state.lenbits) - 1;\n dmask = (1 << state.distbits) - 1;\n\n\n /* decode literals and length/distances until end-of-block or not enough\n input data or output space */\n\n top:\n do {\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n\n here = lcode[hold & lmask];\n\n dolen:\n for (;;) { // Goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n if (op === 0) { /* literal */\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n output[_out++] = here & 0xffff/*here.val*/;\n }\n else if (op & 16) { /* length base */\n len = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (op) {\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n len += hold & ((1 << op) - 1);\n hold >>>= op;\n bits -= op;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", len));\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n here = dcode[hold & dmask];\n\n dodist:\n for (;;) { // goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n\n if (op & 16) { /* distance base */\n dist = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n }\n dist += hold & ((1 << op) - 1);\n//#ifdef INFLATE_STRICT\n if (dist > dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break top;\n }\n//#endif\n hold >>>= op;\n bits -= op;\n //Tracevv((stderr, \"inflate: distance %u\\n\", dist));\n op = _out - beg; /* max distance in output */\n if (dist > op) { /* see if copy from window */\n op = dist - op; /* distance back in window */\n if (op > whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break top;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n// if (len <= op - whave) {\n// do {\n// output[_out++] = 0;\n// } while (--len);\n// continue top;\n// }\n// len -= op - whave;\n// do {\n// output[_out++] = 0;\n// } while (--op > whave);\n// if (op === 0) {\n// from = _out - dist;\n// do {\n// output[_out++] = output[from++];\n// } while (--len);\n// continue top;\n// }\n//#endif\n }\n from = 0; // window index\n from_source = s_window;\n if (wnext === 0) { /* very common case */\n from += wsize - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n else if (wnext < op) { /* wrap around window */\n from += wsize + wnext - op;\n op -= wnext;\n if (op < len) { /* some from end of window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = 0;\n if (wnext < len) { /* some from start of window */\n op = wnext;\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n }\n else { /* contiguous in window */\n from += wnext - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n while (len > 2) {\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n len -= 3;\n }\n if (len) {\n output[_out++] = from_source[from++];\n if (len > 1) {\n output[_out++] = from_source[from++];\n }\n }\n }\n else {\n from = _out - dist; /* copy direct from output */\n do { /* minimum length is three */\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n len -= 3;\n } while (len > 2);\n if (len) {\n output[_out++] = output[from++];\n if (len > 1) {\n output[_out++] = output[from++];\n }\n }\n }\n }\n else if ((op & 64) === 0) { /* 2nd level distance code */\n here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dodist;\n }\n else {\n strm.msg = 'invalid distance code';\n state.mode = BAD;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n }\n else if ((op & 64) === 0) { /* 2nd level length code */\n here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dolen;\n }\n else if (op & 32) { /* end-of-block */\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.mode = TYPE;\n break top;\n }\n else {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n } while (_in < last && _out < end);\n\n /* return unused bytes (on entry, bits < 8, so in won't go too far back) */\n len = bits >> 3;\n _in -= len;\n bits -= len << 3;\n hold &= (1 << bits) - 1;\n\n /* update state and return */\n strm.next_in = _in;\n strm.next_out = _out;\n strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last));\n strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end));\n state.hold = hold;\n state.bits = bits;\n return;\n};\n" - }, - { - "id": 18, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\inftrees.js", - "name": "./node_modules/pako/lib/zlib/inftrees.js", - "index": 21, - "index2": 14, - "size": 12500, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\inflate.js", - "issuerId": 16, - "issuerName": "./node_modules/pako/lib/zlib/inflate.js", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "name": "./node_modules/fast-png/lib-esm/index.js", - "profile": { - "factory": 2180, - "building": 1082 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "name": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "profile": { - "factory": 21, - "building": 92, - "dependencies": 43 - } - }, - { - "id": 1, - "identifier": "F:\\tweb\\node_modules\\pako\\index.js", - "name": "./node_modules/pako/index.js", - "profile": { - "factory": 48, - "building": 7 - } - }, - { - "id": 15, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\inflate.js", - "name": "./node_modules/pako/lib/inflate.js", - "profile": { - "factory": 11, - "building": 13, - "dependencies": 8 - } - }, - { - "id": 16, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\inflate.js", - "name": "./node_modules/pako/lib/zlib/inflate.js", - "profile": { - "factory": 9, - "building": 47, - "dependencies": 9 - } - } - ], - "profile": { - "factory": 9, - "building": 12, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 16, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\inflate.js", - "module": "./node_modules/pako/lib/zlib/inflate.js", - "moduleName": "./node_modules/pako/lib/zlib/inflate.js", - "type": "cjs require", - "userRequest": "./inftrees", - "loc": "26:20-41" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 7, - "source": "'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils = require('../utils/common');\n\nvar MAXBITS = 15;\nvar ENOUGH_LENS = 852;\nvar ENOUGH_DISTS = 592;\n//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nvar CODES = 0;\nvar LENS = 1;\nvar DISTS = 2;\n\nvar lbase = [ /* Length codes 257..285 base */\n 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,\n 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0\n];\n\nvar lext = [ /* Length codes 257..285 extra */\n 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,\n 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78\n];\n\nvar dbase = [ /* Distance codes 0..29 base */\n 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,\n 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,\n 8193, 12289, 16385, 24577, 0, 0\n];\n\nvar dext = [ /* Distance codes 0..29 extra */\n 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,\n 23, 23, 24, 24, 25, 25, 26, 26, 27, 27,\n 28, 28, 29, 29, 64, 64\n];\n\nmodule.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts)\n{\n var bits = opts.bits;\n //here = opts.here; /* table entry for duplication */\n\n var len = 0; /* a code's length in bits */\n var sym = 0; /* index of code symbols */\n var min = 0, max = 0; /* minimum and maximum code lengths */\n var root = 0; /* number of index bits for root table */\n var curr = 0; /* number of index bits for current table */\n var drop = 0; /* code bits to drop for sub-table */\n var left = 0; /* number of prefix codes available */\n var used = 0; /* code entries in table used */\n var huff = 0; /* Huffman code */\n var incr; /* for incrementing code, index */\n var fill; /* index for replicating entries */\n var low; /* low bits for current root entry */\n var mask; /* mask for low root bits */\n var next; /* next available space in table */\n var base = null; /* base value table to use */\n var base_index = 0;\n// var shoextra; /* extra bits table to use */\n var end; /* use base and extra for symbol > end */\n var count = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */\n var offs = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */\n var extra = null;\n var extra_index = 0;\n\n var here_bits, here_op, here_val;\n\n /*\n Process a set of code lengths to create a canonical Huffman code. The\n code lengths are lens[0..codes-1]. Each length corresponds to the\n symbols 0..codes-1. The Huffman code is generated by first sorting the\n symbols by length from short to long, and retaining the symbol order\n for codes with equal lengths. Then the code starts with all zero bits\n for the first code of the shortest length, and the codes are integer\n increments for the same length, and zeros are appended as the length\n increases. For the deflate format, these bits are stored backwards\n from their more natural integer increment ordering, and so when the\n decoding tables are built in the large loop below, the integer codes\n are incremented backwards.\n\n This routine assumes, but does not check, that all of the entries in\n lens[] are in the range 0..MAXBITS. The caller must assure this.\n 1..MAXBITS is interpreted as that code length. zero means that that\n symbol does not occur in this code.\n\n The codes are sorted by computing a count of codes for each length,\n creating from that a table of starting indices for each length in the\n sorted table, and then entering the symbols in order in the sorted\n table. The sorted table is work[], with that space being provided by\n the caller.\n\n The length counts are used for other purposes as well, i.e. finding\n the minimum and maximum length codes, determining if there are any\n codes at all, checking for a valid set of lengths, and looking ahead\n at length counts to determine sub-table sizes when building the\n decoding tables.\n */\n\n /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */\n for (len = 0; len <= MAXBITS; len++) {\n count[len] = 0;\n }\n for (sym = 0; sym < codes; sym++) {\n count[lens[lens_index + sym]]++;\n }\n\n /* bound code lengths, force root to be within code lengths */\n root = bits;\n for (max = MAXBITS; max >= 1; max--) {\n if (count[max] !== 0) { break; }\n }\n if (root > max) {\n root = max;\n }\n if (max === 0) { /* no symbols to code at all */\n //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */\n //table.bits[opts.table_index] = 1; //here.bits = (var char)1;\n //table.val[opts.table_index++] = 0; //here.val = (var short)0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n\n //table.op[opts.table_index] = 64;\n //table.bits[opts.table_index] = 1;\n //table.val[opts.table_index++] = 0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n opts.bits = 1;\n return 0; /* no symbols, but wait for decoding to report error */\n }\n for (min = 1; min < max; min++) {\n if (count[min] !== 0) { break; }\n }\n if (root < min) {\n root = min;\n }\n\n /* check for an over-subscribed or incomplete set of lengths */\n left = 1;\n for (len = 1; len <= MAXBITS; len++) {\n left <<= 1;\n left -= count[len];\n if (left < 0) {\n return -1;\n } /* over-subscribed */\n }\n if (left > 0 && (type === CODES || max !== 1)) {\n return -1; /* incomplete set */\n }\n\n /* generate offsets into symbol table for each length for sorting */\n offs[1] = 0;\n for (len = 1; len < MAXBITS; len++) {\n offs[len + 1] = offs[len] + count[len];\n }\n\n /* sort symbols by length, by symbol order within each length */\n for (sym = 0; sym < codes; sym++) {\n if (lens[lens_index + sym] !== 0) {\n work[offs[lens[lens_index + sym]]++] = sym;\n }\n }\n\n /*\n Create and fill in decoding tables. In this loop, the table being\n filled is at next and has curr index bits. The code being used is huff\n with length len. That code is converted to an index by dropping drop\n bits off of the bottom. For codes where len is less than drop + curr,\n those top drop + curr - len bits are incremented through all values to\n fill the table with replicated entries.\n\n root is the number of index bits for the root table. When len exceeds\n root, sub-tables are created pointed to by the root entry with an index\n of the low root bits of huff. This is saved in low to check for when a\n new sub-table should be started. drop is zero when the root table is\n being filled, and drop is root when sub-tables are being filled.\n\n When a new sub-table is needed, it is necessary to look ahead in the\n code lengths to determine what size sub-table is needed. The length\n counts are used for this, and so count[] is decremented as codes are\n entered in the tables.\n\n used keeps track of how many table entries have been allocated from the\n provided *table space. It is checked for LENS and DIST tables against\n the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in\n the initial root table size constants. See the comments in inftrees.h\n for more information.\n\n sym increments through all symbols, and the loop terminates when\n all codes of length max, i.e. all codes, have been processed. This\n routine permits incomplete codes, so another loop after this one fills\n in the rest of the decoding tables with invalid code markers.\n */\n\n /* set up for code type */\n // poor man optimization - use if-else instead of switch,\n // to avoid deopts in old v8\n if (type === CODES) {\n base = extra = work; /* dummy value--not used */\n end = 19;\n\n } else if (type === LENS) {\n base = lbase;\n base_index -= 257;\n extra = lext;\n extra_index -= 257;\n end = 256;\n\n } else { /* DISTS */\n base = dbase;\n extra = dext;\n end = -1;\n }\n\n /* initialize opts for loop */\n huff = 0; /* starting code */\n sym = 0; /* starting code symbol */\n len = min; /* starting code length */\n next = table_index; /* current table to fill in */\n curr = root; /* current table index bits */\n drop = 0; /* current bits to drop from code for index */\n low = -1; /* trigger new sub-table when len > root */\n used = 1 << root; /* use root table entries */\n mask = used - 1; /* mask for comparing low */\n\n /* check available table space */\n if ((type === LENS && used > ENOUGH_LENS) ||\n (type === DISTS && used > ENOUGH_DISTS)) {\n return 1;\n }\n\n /* process all codes and make table entries */\n for (;;) {\n /* create table entry */\n here_bits = len - drop;\n if (work[sym] < end) {\n here_op = 0;\n here_val = work[sym];\n }\n else if (work[sym] > end) {\n here_op = extra[extra_index + work[sym]];\n here_val = base[base_index + work[sym]];\n }\n else {\n here_op = 32 + 64; /* end of block */\n here_val = 0;\n }\n\n /* replicate for those indices with low len bits equal to huff */\n incr = 1 << (len - drop);\n fill = 1 << curr;\n min = fill; /* save offset to next table */\n do {\n fill -= incr;\n table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0;\n } while (fill !== 0);\n\n /* backwards increment the len-bit code huff */\n incr = 1 << (len - 1);\n while (huff & incr) {\n incr >>= 1;\n }\n if (incr !== 0) {\n huff &= incr - 1;\n huff += incr;\n } else {\n huff = 0;\n }\n\n /* go to next symbol, update count, len */\n sym++;\n if (--count[len] === 0) {\n if (len === max) { break; }\n len = lens[lens_index + work[sym]];\n }\n\n /* create new sub-table if needed */\n if (len > root && (huff & mask) !== low) {\n /* if first time, transition to sub-tables */\n if (drop === 0) {\n drop = root;\n }\n\n /* increment past last table */\n next += min; /* here min is 1 << curr */\n\n /* determine length of next table */\n curr = len - drop;\n left = 1 << curr;\n while (curr + drop < max) {\n left -= count[curr + drop];\n if (left <= 0) { break; }\n curr++;\n left <<= 1;\n }\n\n /* check for enough space */\n used += 1 << curr;\n if ((type === LENS && used > ENOUGH_LENS) ||\n (type === DISTS && used > ENOUGH_DISTS)) {\n return 1;\n }\n\n /* point entry in root table to sub-table */\n low = huff & mask;\n /*table.op[low] = curr;\n table.bits[low] = root;\n table.val[low] = next - opts.table_index;*/\n table[low] = (root << 24) | (curr << 16) | (next - table_index) |0;\n }\n }\n\n /* fill in remaining table entry if code is incomplete (guaranteed to have\n at most one remaining entry, since if the code is incomplete, the\n maximum code length that was allowed to get this far is one bit) */\n if (huff !== 0) {\n //table.op[next + huff] = 64; /* invalid code marker */\n //table.bits[next + huff] = len - drop;\n //table.val[next + huff] = 0;\n table[next + huff] = ((len - drop) << 24) | (64 << 16) |0;\n }\n\n /* set return parameters */\n //opts.table_index += used;\n opts.bits = root;\n return 0;\n};\n" - }, - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\zlib\\gzheader.js", - "name": "./node_modules/pako/lib/zlib/gzheader.js", - "index": 23, - "index2": 17, - "size": 2240, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\pako\\lib\\inflate.js", - "issuerId": 15, - "issuerName": "./node_modules/pako/lib/inflate.js", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "name": "./node_modules/fast-png/lib-esm/index.js", - "profile": { - "factory": 2180, - "building": 1082 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "name": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "profile": { - "factory": 21, - "building": 92, - "dependencies": 43 - } - }, - { - "id": 1, - "identifier": "F:\\tweb\\node_modules\\pako\\index.js", - "name": "./node_modules/pako/index.js", - "profile": { - "factory": 48, - "building": 7 - } - }, - { - "id": 15, - "identifier": "F:\\tweb\\node_modules\\pako\\lib\\inflate.js", - "name": "./node_modules/pako/lib/inflate.js", - "profile": { - "factory": 11, - "building": 13, - "dependencies": 8 - } - } - ], - "profile": { - "factory": 9, - "building": 47, - "dependencies": 9 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 15, - "moduleIdentifier": "F:\\tweb\\node_modules\\pako\\lib\\inflate.js", - "module": "./node_modules/pako/lib/inflate.js", - "moduleName": "./node_modules/pako/lib/inflate.js", - "type": "cjs require", - "userRequest": "./zlib/gzheader", - "loc": "10:19-45" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 6, - "source": "'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction GZheader() {\n /* true if compressed data believed to be text */\n this.text = 0;\n /* modification time */\n this.time = 0;\n /* extra flags (not used when writing a gzip file) */\n this.xflags = 0;\n /* operating system */\n this.os = 0;\n /* pointer to extra field or Z_NULL if none */\n this.extra = null;\n /* extra field length (valid if extra != Z_NULL) */\n this.extra_len = 0; // Actually, we don't need it in JS,\n // but leave for few code modifications\n\n //\n // Setup limits is not necessary because in js we should not preallocate memory\n // for inflate use constant limit in 65536 bytes\n //\n\n /* space at extra (only when reading header) */\n // this.extra_max = 0;\n /* pointer to zero-terminated file name or Z_NULL */\n this.name = '';\n /* space at name (only when reading header) */\n // this.name_max = 0;\n /* pointer to zero-terminated comment or Z_NULL */\n this.comment = '';\n /* space at comment (only when reading header) */\n // this.comm_max = 0;\n /* true if there was or will be a header crc */\n this.hcrc = 0;\n /* true when done reading gzip header (not used when writing a gzip file) */\n this.done = false;\n}\n\nmodule.exports = GZheader;\n" - }, - { - "id": 20, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js 1f5c27d337cdd358fe6548a5eda250ca", - "name": "./node_modules/fast-png/lib-esm/index.js + 7 modules", - "index": 3, - "index2": 25, - "size": 33920, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": null, - "issuerId": null, - "issuerName": null, - "issuerPath": null, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 9, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "module": "./src/lib/webp/webp.ts", - "moduleName": "./src/lib/webp/webp.ts", - "type": "cjs require", - "userRequest": "fast-png", - "loc": "5:19-38" - } - ], - "usedExports": true, - "providedExports": [ - "ResolutionUnitSpecifier", - "decode", - "encode" - ], - "optimizationBailout": [ - "ModuleConcatenation bailout: Cannot concat with ./node_modules/pako/index.js (<- Module is not an ECMAScript module)" - ], - "depth": 2, - "modules": [ - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "name": "./node_modules/fast-png/lib-esm/index.js", - "index": 3, - "index2": 25, - "size": 435, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "issuerId": 9, - "issuerName": "./src/lib/webp/webp.ts", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - } - ], - "profile": { - "factory": 2180, - "building": 1082 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 9, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "module": "./src/lib/webp/webp.ts", - "moduleName": "./src/lib/webp/webp.ts", - "type": "cjs require", - "userRequest": "fast-png", - "loc": "5:19-38" - } - ], - "usedExports": true, - "providedExports": [ - "ResolutionUnitSpecifier", - "decode", - "encode" - ], - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./src/lib/webp/webp.ts (referenced with cjs require)" - ], - "depth": 2, - "source": "import PNGDecoder from './PNGDecoder';\r\nimport PNGEncoder from './PNGEncoder';\r\nexport * from './types';\r\nfunction decodePNG(data, options) {\r\n const decoder = new PNGDecoder(data, options);\r\n return decoder.decode();\r\n}\r\nfunction encodePNG(png, options) {\r\n const encoder = new PNGEncoder(png, options);\r\n return encoder.encode();\r\n}\r\nexport { decodePNG as decode, encodePNG as encode };\r\n//# sourceMappingURL=index.js.map" - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "name": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "index": 4, - "index2": 22, - "size": 12767, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [], - "issuer": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "issuerId": null, - "issuerName": "./node_modules/fast-png/lib-esm/index.js", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "name": "./node_modules/fast-png/lib-esm/index.js", - "profile": { - "factory": 2180, - "building": 1082 - } - } - ], - "profile": { - "factory": 21, - "building": 92, - "dependencies": 43 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "module": "./node_modules/fast-png/lib-esm/index.js", - "moduleName": "./node_modules/fast-png/lib-esm/index.js", - "type": "harmony side effect evaluation", - "userRequest": "./PNGDecoder", - "loc": "1:0-38" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "module": "./node_modules/fast-png/lib-esm/index.js", - "moduleName": "./node_modules/fast-png/lib-esm/index.js", - "type": "harmony import specifier", - "userRequest": "./PNGDecoder", - "loc": "5:24-34" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 3, - "source": "import { IOBuffer } from 'iobuffer';\r\nimport { Inflate as Inflator } from 'pako';\r\nimport { pngSignature, crc } from './common';\r\nimport { ColorType, CompressionMethod, FilterMethod, InterlaceMethod, } from './internalTypes';\r\nconst empty = new Uint8Array(0);\r\nconst NULL = '\\0';\r\nconst uint16 = new Uint16Array([0x00ff]);\r\nconst uint8 = new Uint8Array(uint16.buffer);\r\nconst osIsLittleEndian = uint8[0] === 0xff;\r\nexport default class PNGDecoder extends IOBuffer {\r\n constructor(data, options = {}) {\r\n super(data);\r\n const { checkCrc = false } = options;\r\n this._checkCrc = checkCrc;\r\n this._inflator = new Inflator();\r\n this._png = {\r\n width: -1,\r\n height: -1,\r\n channels: -1,\r\n data: new Uint8Array(0),\r\n depth: 1,\r\n text: {},\r\n };\r\n this._end = false;\r\n this._hasPalette = false;\r\n this._palette = [];\r\n this._compressionMethod = CompressionMethod.UNKNOWN;\r\n this._filterMethod = FilterMethod.UNKNOWN;\r\n this._interlaceMethod = InterlaceMethod.UNKNOWN;\r\n this._colorType = -1;\r\n // PNG is always big endian\r\n // https://www.w3.org/TR/PNG/#7Integers-and-byte-order\r\n this.setBigEndian();\r\n }\r\n decode() {\r\n this.decodeSignature();\r\n while (!this._end) {\r\n this.decodeChunk();\r\n }\r\n this.decodeImage();\r\n return this._png;\r\n }\r\n // https://www.w3.org/TR/PNG/#5PNG-file-signature\r\n decodeSignature() {\r\n for (let i = 0; i < pngSignature.length; i++) {\r\n if (this.readUint8() !== pngSignature[i]) {\r\n throw new Error(`wrong PNG signature. Byte at ${i} should be ${pngSignature[i]}.`);\r\n }\r\n }\r\n }\r\n // https://www.w3.org/TR/PNG/#5Chunk-layout\r\n decodeChunk() {\r\n const length = this.readUint32();\r\n const type = this.readChars(4);\r\n const offset = this.offset;\r\n switch (type) {\r\n // 11.2 Critical chunks\r\n case 'IHDR': // 11.2.2 IHDR Image header\r\n this.decodeIHDR();\r\n break;\r\n case 'PLTE': // 11.2.3 PLTE Palette\r\n this.decodePLTE(length);\r\n break;\r\n case 'IDAT': // 11.2.4 IDAT Image data\r\n this.decodeIDAT(length);\r\n break;\r\n case 'IEND': // 11.2.5 IEND Image trailer\r\n this._end = true;\r\n break;\r\n // 11.3 Ancillary chunks\r\n case 'tRNS': // 11.3.2.1 tRNS Transparency\r\n this.decodetRNS(length);\r\n break;\r\n case 'tEXt': // 11.3.4.3 tEXt Textual data\r\n this.decodetEXt(length);\r\n break;\r\n case 'pHYs': // 11.3.5.3 pHYs Physical pixel dimensions\r\n this.decodepHYs();\r\n break;\r\n default:\r\n this.skip(length);\r\n break;\r\n }\r\n if (this.offset - offset !== length) {\r\n throw new Error(`Length mismatch while decoding chunk ${type}`);\r\n }\r\n if (this._checkCrc) {\r\n const expectedCrc = this.readUint32();\r\n const crcLength = length + 4; // includes type\r\n const actualCrc = crc(new Uint8Array(this.buffer, this.byteOffset + this.offset - crcLength - 4, crcLength), crcLength); // \"- 4\" because we already advanced by reading the CRC\r\n if (actualCrc !== expectedCrc) {\r\n throw new Error(`CRC mismatch for chunk ${type}. Expected ${expectedCrc}, found ${actualCrc}`);\r\n }\r\n }\r\n else {\r\n this.skip(4);\r\n }\r\n }\r\n // https://www.w3.org/TR/PNG/#11IHDR\r\n decodeIHDR() {\r\n const image = this._png;\r\n image.width = this.readUint32();\r\n image.height = this.readUint32();\r\n image.depth = checkBitDepth(this.readUint8());\r\n const colorType = this.readUint8();\r\n this._colorType = colorType;\r\n let channels;\r\n switch (colorType) {\r\n case ColorType.GREYSCALE:\r\n channels = 1;\r\n break;\r\n case ColorType.TRUECOLOUR:\r\n channels = 3;\r\n break;\r\n case ColorType.INDEXED_COLOUR:\r\n channels = 1;\r\n break;\r\n case ColorType.GREYSCALE_ALPHA:\r\n channels = 2;\r\n break;\r\n case ColorType.TRUECOLOUR_ALPHA:\r\n channels = 4;\r\n break;\r\n default:\r\n throw new Error(`Unknown color type: ${colorType}`);\r\n }\r\n this._png.channels = channels;\r\n this._compressionMethod = this.readUint8();\r\n if (this._compressionMethod !== CompressionMethod.DEFLATE) {\r\n throw new Error(`Unsupported compression method: ${this._compressionMethod}`);\r\n }\r\n this._filterMethod = this.readUint8();\r\n this._interlaceMethod = this.readUint8();\r\n }\r\n // https://www.w3.org/TR/PNG/#11PLTE\r\n decodePLTE(length) {\r\n if (length % 3 !== 0) {\r\n throw new RangeError(`PLTE field length must be a multiple of 3. Got ${length}`);\r\n }\r\n const l = length / 3;\r\n this._hasPalette = true;\r\n const palette = [];\r\n this._palette = palette;\r\n for (let i = 0; i < l; i++) {\r\n palette.push([this.readUint8(), this.readUint8(), this.readUint8()]);\r\n }\r\n }\r\n // https://www.w3.org/TR/PNG/#11IDAT\r\n decodeIDAT(length) {\r\n this._inflator.push(new Uint8Array(this.buffer, this.offset + this.byteOffset, length), false);\r\n this.skip(length);\r\n }\r\n // https://www.w3.org/TR/PNG/#11tRNS\r\n decodetRNS(length) {\r\n // TODO: support other color types.\r\n if (this._colorType === 3) {\r\n if (length > this._palette.length) {\r\n throw new Error(`tRNS chunk contains more alpha values than there are palette colors (${length} vs ${this._palette.length})`);\r\n }\r\n let i = 0;\r\n for (; i < length; i++) {\r\n const alpha = this.readByte();\r\n this._palette[i].push(alpha);\r\n }\r\n for (; i < this._palette.length; i++) {\r\n this._palette[i].push(255);\r\n }\r\n }\r\n }\r\n // https://www.w3.org/TR/PNG/#11tEXt\r\n decodetEXt(length) {\r\n let keyword = '';\r\n let char;\r\n while ((char = this.readChar()) !== NULL) {\r\n keyword += char;\r\n }\r\n this._png.text[keyword] = this.readChars(length - keyword.length - 1);\r\n }\r\n // https://www.w3.org/TR/PNG/#11pHYs\r\n decodepHYs() {\r\n const ppuX = this.readUint32();\r\n const ppuY = this.readUint32();\r\n const unitSpecifier = this.readByte();\r\n this._png.resolution = { x: ppuX, y: ppuY, unit: unitSpecifier };\r\n }\r\n decodeImage() {\r\n this._inflator.push(empty, true);\r\n if (this._inflator.err) {\r\n throw new Error(`Error while decompressing the data: ${this._inflator.err}`);\r\n }\r\n const data = this._inflator.result;\r\n if (this._filterMethod !== FilterMethod.ADAPTIVE) {\r\n throw new Error(`Filter method ${this._filterMethod} not supported`);\r\n }\r\n if (this._interlaceMethod === InterlaceMethod.NO_INTERLACE) {\r\n this.decodeInterlaceNull(data);\r\n }\r\n else {\r\n throw new Error(`Interlace method ${this._interlaceMethod} not supported`);\r\n }\r\n }\r\n decodeInterlaceNull(data) {\r\n const height = this._png.height;\r\n const bytesPerPixel = (this._png.channels * this._png.depth) / 8;\r\n const bytesPerLine = this._png.width * bytesPerPixel;\r\n const newData = new Uint8Array(this._png.height * bytesPerLine);\r\n let prevLine = empty;\r\n let offset = 0;\r\n let currentLine;\r\n let newLine;\r\n for (let i = 0; i < height; i++) {\r\n currentLine = data.subarray(offset + 1, offset + 1 + bytesPerLine);\r\n newLine = newData.subarray(i * bytesPerLine, (i + 1) * bytesPerLine);\r\n switch (data[offset]) {\r\n case 0:\r\n unfilterNone(currentLine, newLine, bytesPerLine);\r\n break;\r\n case 1:\r\n unfilterSub(currentLine, newLine, bytesPerLine, bytesPerPixel);\r\n break;\r\n case 2:\r\n unfilterUp(currentLine, newLine, prevLine, bytesPerLine);\r\n break;\r\n case 3:\r\n unfilterAverage(currentLine, newLine, prevLine, bytesPerLine, bytesPerPixel);\r\n break;\r\n case 4:\r\n unfilterPaeth(currentLine, newLine, prevLine, bytesPerLine, bytesPerPixel);\r\n break;\r\n default:\r\n throw new Error(`Unsupported filter: ${data[offset]}`);\r\n }\r\n prevLine = newLine;\r\n offset += bytesPerLine + 1;\r\n }\r\n if (this._hasPalette) {\r\n this._png.palette = this._palette;\r\n }\r\n if (this._png.depth === 16) {\r\n const uint16Data = new Uint16Array(newData.buffer);\r\n if (osIsLittleEndian) {\r\n for (let k = 0; k < uint16Data.length; k++) {\r\n // PNG is always big endian. Swap the bytes.\r\n uint16Data[k] = swap16(uint16Data[k]);\r\n }\r\n }\r\n this._png.data = uint16Data;\r\n }\r\n else {\r\n this._png.data = newData;\r\n }\r\n }\r\n}\r\nfunction unfilterNone(currentLine, newLine, bytesPerLine) {\r\n for (let i = 0; i < bytesPerLine; i++) {\r\n newLine[i] = currentLine[i];\r\n }\r\n}\r\nfunction unfilterSub(currentLine, newLine, bytesPerLine, bytesPerPixel) {\r\n let i = 0;\r\n for (; i < bytesPerPixel; i++) {\r\n // just copy first bytes\r\n newLine[i] = currentLine[i];\r\n }\r\n for (; i < bytesPerLine; i++) {\r\n newLine[i] = (currentLine[i] + newLine[i - bytesPerPixel]) & 0xff;\r\n }\r\n}\r\nfunction unfilterUp(currentLine, newLine, prevLine, bytesPerLine) {\r\n let i = 0;\r\n if (prevLine.length === 0) {\r\n // just copy bytes for first line\r\n for (; i < bytesPerLine; i++) {\r\n newLine[i] = currentLine[i];\r\n }\r\n }\r\n else {\r\n for (; i < bytesPerLine; i++) {\r\n newLine[i] = (currentLine[i] + prevLine[i]) & 0xff;\r\n }\r\n }\r\n}\r\nfunction unfilterAverage(currentLine, newLine, prevLine, bytesPerLine, bytesPerPixel) {\r\n let i = 0;\r\n if (prevLine.length === 0) {\r\n for (; i < bytesPerPixel; i++) {\r\n newLine[i] = currentLine[i];\r\n }\r\n for (; i < bytesPerLine; i++) {\r\n newLine[i] = (currentLine[i] + (newLine[i - bytesPerPixel] >> 1)) & 0xff;\r\n }\r\n }\r\n else {\r\n for (; i < bytesPerPixel; i++) {\r\n newLine[i] = (currentLine[i] + (prevLine[i] >> 1)) & 0xff;\r\n }\r\n for (; i < bytesPerLine; i++) {\r\n newLine[i] =\r\n (currentLine[i] + ((newLine[i - bytesPerPixel] + prevLine[i]) >> 1)) &\r\n 0xff;\r\n }\r\n }\r\n}\r\nfunction unfilterPaeth(currentLine, newLine, prevLine, bytesPerLine, bytesPerPixel) {\r\n let i = 0;\r\n if (prevLine.length === 0) {\r\n for (; i < bytesPerPixel; i++) {\r\n newLine[i] = currentLine[i];\r\n }\r\n for (; i < bytesPerLine; i++) {\r\n newLine[i] = (currentLine[i] + newLine[i - bytesPerPixel]) & 0xff;\r\n }\r\n }\r\n else {\r\n for (; i < bytesPerPixel; i++) {\r\n newLine[i] = (currentLine[i] + prevLine[i]) & 0xff;\r\n }\r\n for (; i < bytesPerLine; i++) {\r\n newLine[i] =\r\n (currentLine[i] +\r\n paethPredictor(newLine[i - bytesPerPixel], prevLine[i], prevLine[i - bytesPerPixel])) &\r\n 0xff;\r\n }\r\n }\r\n}\r\nfunction paethPredictor(a, b, c) {\r\n const p = a + b - c;\r\n const pa = Math.abs(p - a);\r\n const pb = Math.abs(p - b);\r\n const pc = Math.abs(p - c);\r\n if (pa <= pb && pa <= pc)\r\n return a;\r\n else if (pb <= pc)\r\n return b;\r\n else\r\n return c;\r\n}\r\nfunction swap16(val) {\r\n return ((val & 0xff) << 8) | ((val >> 8) & 0xff);\r\n}\r\nfunction checkBitDepth(value) {\r\n if (value !== 1 &&\r\n value !== 2 &&\r\n value !== 4 &&\r\n value !== 8 &&\r\n value !== 16) {\r\n throw new Error(`invalid bit depth: ${value}`);\r\n }\r\n return value;\r\n}\r\n//# sourceMappingURL=PNGDecoder.js.map" - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGEncoder.js", - "name": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "index": 26, - "index2": 23, - "size": 4983, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [], - "issuer": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "issuerId": null, - "issuerName": "./node_modules/fast-png/lib-esm/index.js", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "name": "./node_modules/fast-png/lib-esm/index.js", - "profile": { - "factory": 2180, - "building": 1082 - } - } - ], - "profile": { - "factory": 21, - "building": 92, - "dependencies": 43 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "module": "./node_modules/fast-png/lib-esm/index.js", - "moduleName": "./node_modules/fast-png/lib-esm/index.js", - "type": "harmony side effect evaluation", - "userRequest": "./PNGEncoder", - "loc": "2:0-38" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "module": "./node_modules/fast-png/lib-esm/index.js", - "moduleName": "./node_modules/fast-png/lib-esm/index.js", - "type": "harmony import specifier", - "userRequest": "./PNGEncoder", - "loc": "9:24-34" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 3, - "source": "import { IOBuffer } from 'iobuffer';\r\nimport { deflate } from 'pako';\r\nimport { pngSignature, crc } from './common';\r\nimport { ColorType, CompressionMethod, FilterMethod, InterlaceMethod, } from './internalTypes';\r\nconst defaultZlibOptions = {\r\n level: 3,\r\n};\r\nexport default class PNGEncoder extends IOBuffer {\r\n constructor(data, options = {}) {\r\n super();\r\n this._colorType = ColorType.UNKNOWN;\r\n this._zlibOptions = Object.assign({}, defaultZlibOptions, options.zlib);\r\n this._png = this._checkData(data);\r\n this.setBigEndian();\r\n }\r\n encode() {\r\n this.encodeSignature();\r\n this.encodeIHDR();\r\n this.encodeData();\r\n this.encodeIEND();\r\n return this.toArray();\r\n }\r\n // https://www.w3.org/TR/PNG/#5PNG-file-signature\r\n encodeSignature() {\r\n this.writeBytes(pngSignature);\r\n }\r\n // https://www.w3.org/TR/PNG/#11IHDR\r\n encodeIHDR() {\r\n this.writeUint32(13);\r\n this.writeChars('IHDR');\r\n this.writeUint32(this._png.width);\r\n this.writeUint32(this._png.height);\r\n this.writeByte(this._png.depth);\r\n this.writeByte(this._colorType);\r\n this.writeByte(CompressionMethod.DEFLATE);\r\n this.writeByte(FilterMethod.ADAPTIVE);\r\n this.writeByte(InterlaceMethod.NO_INTERLACE);\r\n this.writeCrc(17);\r\n }\r\n // https://www.w3.org/TR/PNG/#11IEND\r\n encodeIEND() {\r\n this.writeUint32(0);\r\n this.writeChars('IEND');\r\n this.writeCrc(4);\r\n }\r\n // https://www.w3.org/TR/PNG/#11IDAT\r\n encodeIDAT(data) {\r\n this.writeUint32(data.length);\r\n this.writeChars('IDAT');\r\n this.writeBytes(data);\r\n this.writeCrc(data.length + 4);\r\n }\r\n encodeData() {\r\n const { width, height, channels, depth, data } = this._png;\r\n const slotsPerLine = channels * width;\r\n const newData = new IOBuffer().setBigEndian();\r\n let offset = 0;\r\n for (let i = 0; i < height; i++) {\r\n newData.writeByte(0); // no filter\r\n /* istanbul ignore else */\r\n if (depth === 8) {\r\n offset = writeDataBytes(data, newData, slotsPerLine, offset);\r\n }\r\n else if (depth === 16) {\r\n offset = writeDataUint16(data, newData, slotsPerLine, offset);\r\n }\r\n else {\r\n throw new Error('unreachable');\r\n }\r\n }\r\n const buffer = newData.toArray();\r\n const compressed = deflate(buffer, this._zlibOptions);\r\n this.encodeIDAT(compressed);\r\n }\r\n _checkData(data) {\r\n const { colorType, channels, depth } = getColorType(data);\r\n const png = {\r\n width: checkInteger(data.width, 'width'),\r\n height: checkInteger(data.height, 'height'),\r\n channels: channels,\r\n data: data.data,\r\n depth: depth,\r\n text: {},\r\n };\r\n this._colorType = colorType;\r\n const expectedSize = png.width * png.height * channels;\r\n if (png.data.length !== expectedSize) {\r\n throw new RangeError(`wrong data size. Found ${png.data.length}, expected ${expectedSize}`);\r\n }\r\n return png;\r\n }\r\n writeCrc(length) {\r\n this.writeUint32(crc(new Uint8Array(this.buffer, this.byteOffset + this.offset - length, length), length));\r\n }\r\n}\r\nfunction checkInteger(value, name) {\r\n if (Number.isInteger(value) && value > 0) {\r\n return value;\r\n }\r\n throw new TypeError(`${name} must be a positive integer`);\r\n}\r\nfunction getColorType(data) {\r\n const { channels = 4, depth = 8 } = data;\r\n if (channels !== 4 && channels !== 3 && channels !== 2 && channels !== 1) {\r\n throw new RangeError(`unsupported number of channels: ${channels}`);\r\n }\r\n if (depth !== 8 && depth !== 16) {\r\n throw new RangeError(`unsupported bit depth: ${depth}`);\r\n }\r\n const returnValue = { channels, depth, colorType: ColorType.UNKNOWN };\r\n switch (channels) {\r\n case 4:\r\n returnValue.colorType = ColorType.TRUECOLOUR_ALPHA;\r\n break;\r\n case 3:\r\n returnValue.colorType = ColorType.TRUECOLOUR;\r\n break;\r\n case 1:\r\n returnValue.colorType = ColorType.GREYSCALE;\r\n break;\r\n case 2:\r\n returnValue.colorType = ColorType.GREYSCALE_ALPHA;\r\n break;\r\n default:\r\n throw new Error(`unsupported number of channels: ${channels}`);\r\n }\r\n return returnValue;\r\n}\r\nfunction writeDataBytes(data, newData, slotsPerLine, offset) {\r\n for (let j = 0; j < slotsPerLine; j++) {\r\n newData.writeByte(data[offset++]);\r\n }\r\n return offset;\r\n}\r\nfunction writeDataUint16(data, newData, slotsPerLine, offset) {\r\n for (let j = 0; j < slotsPerLine; j++) {\r\n newData.writeUint16(data[offset++]);\r\n }\r\n return offset;\r\n}\r\n//# sourceMappingURL=PNGEncoder.js.map" - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\types.js", - "name": "./node_modules/fast-png/lib-esm/types.js", - "index": 27, - "index2": 24, - "size": 419, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [], - "issuer": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "issuerId": null, - "issuerName": "./node_modules/fast-png/lib-esm/index.js", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "name": "./node_modules/fast-png/lib-esm/index.js", - "profile": { - "factory": 2180, - "building": 1082 - } - } - ], - "profile": { - "factory": 21, - "building": 92, - "dependencies": 43 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "module": "./node_modules/fast-png/lib-esm/index.js", - "moduleName": "./node_modules/fast-png/lib-esm/index.js", - "type": "harmony side effect evaluation", - "userRequest": "./types", - "loc": "3:0-24" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "module": "./node_modules/fast-png/lib-esm/index.js", - "moduleName": "./node_modules/fast-png/lib-esm/index.js", - "type": "harmony export imported specifier", - "userRequest": "./types", - "loc": "3:0-24" - } - ], - "usedExports": [ - "ResolutionUnitSpecifier" - ], - "providedExports": [ - "ResolutionUnitSpecifier" - ], - "optimizationBailout": [], - "depth": 3, - "source": "export var ResolutionUnitSpecifier;\r\n(function (ResolutionUnitSpecifier) {\r\n /**\r\n * Unit is unknown\r\n */\r\n ResolutionUnitSpecifier[ResolutionUnitSpecifier[\"UNKNOWN\"] = 0] = \"UNKNOWN\";\r\n /**\r\n * Unit is the metre\r\n */\r\n ResolutionUnitSpecifier[ResolutionUnitSpecifier[\"METRE\"] = 1] = \"METRE\";\r\n})(ResolutionUnitSpecifier || (ResolutionUnitSpecifier = {}));\r\n//# sourceMappingURL=types.js.map" - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\iobuffer\\lib-esm\\IOBuffer.js", - "name": "./node_modules/iobuffer/lib-esm/IOBuffer.js", - "index": 5, - "index2": 3, - "size": 13016, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [], - "issuer": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "issuerId": null, - "issuerName": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "name": "./node_modules/fast-png/lib-esm/index.js", - "profile": { - "factory": 2180, - "building": 1082 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "name": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "profile": { - "factory": 21, - "building": 92, - "dependencies": 43 - } - } - ], - "profile": { - "factory": 48, - "building": 7 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "type": "harmony side effect evaluation", - "userRequest": "iobuffer", - "loc": "1:0-36" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGEncoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "type": "harmony side effect evaluation", - "userRequest": "iobuffer", - "loc": "1:0-36" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGEncoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "type": "harmony import specifier", - "userRequest": "iobuffer", - "loc": "8:40-48" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "type": "harmony import specifier", - "userRequest": "iobuffer", - "loc": "10:40-48" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGEncoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "type": "harmony import specifier", - "userRequest": "iobuffer", - "loc": "56:28-36" - } - ], - "usedExports": [ - "IOBuffer" - ], - "providedExports": [ - "IOBuffer" - ], - "optimizationBailout": [], - "depth": 4, - "source": "import { decode, encode } from './utf8';\r\nconst defaultByteLength = 1024 * 8;\r\nexport class IOBuffer {\r\n /**\r\n * @param data - The data to construct the IOBuffer with.\r\n * If data is a number, it will be the new buffer's length
              \r\n * If data is `undefined`, the buffer will be initialized with a default length of 8Kb
              \r\n * If data is an ArrayBuffer, SharedArrayBuffer, an ArrayBufferView (Typed Array), an IOBuffer instance,\r\n * or a Node.js Buffer, a view will be created over the underlying ArrayBuffer.\r\n * @param options\r\n */\r\n constructor(data = defaultByteLength, options = {}) {\r\n let dataIsGiven = false;\r\n if (typeof data === 'number') {\r\n data = new ArrayBuffer(data);\r\n }\r\n else {\r\n dataIsGiven = true;\r\n this.lastWrittenByte = data.byteLength;\r\n }\r\n const offset = options.offset ? options.offset >>> 0 : 0;\r\n const byteLength = data.byteLength - offset;\r\n let dvOffset = offset;\r\n if (ArrayBuffer.isView(data) || data instanceof IOBuffer) {\r\n if (data.byteLength !== data.buffer.byteLength) {\r\n dvOffset = data.byteOffset + offset;\r\n }\r\n data = data.buffer;\r\n }\r\n if (dataIsGiven) {\r\n this.lastWrittenByte = byteLength;\r\n }\r\n else {\r\n this.lastWrittenByte = 0;\r\n }\r\n this.buffer = data;\r\n this.length = byteLength;\r\n this.byteLength = byteLength;\r\n this.byteOffset = dvOffset;\r\n this.offset = 0;\r\n this.littleEndian = true;\r\n this._data = new DataView(this.buffer, dvOffset, byteLength);\r\n this._mark = 0;\r\n this._marks = [];\r\n }\r\n /**\r\n * Checks if the memory allocated to the buffer is sufficient to store more\r\n * bytes after the offset.\r\n * @param byteLength - The needed memory in bytes.\r\n * @returns `true` if there is sufficient space and `false` otherwise.\r\n */\r\n available(byteLength = 1) {\r\n return this.offset + byteLength <= this.length;\r\n }\r\n /**\r\n * Check if little-endian mode is used for reading and writing multi-byte\r\n * values.\r\n * @returns `true` if little-endian mode is used, `false` otherwise.\r\n */\r\n isLittleEndian() {\r\n return this.littleEndian;\r\n }\r\n /**\r\n * Set little-endian mode for reading and writing multi-byte values.\r\n */\r\n setLittleEndian() {\r\n this.littleEndian = true;\r\n return this;\r\n }\r\n /**\r\n * Check if big-endian mode is used for reading and writing multi-byte values.\r\n * @returns `true` if big-endian mode is used, `false` otherwise.\r\n */\r\n isBigEndian() {\r\n return !this.littleEndian;\r\n }\r\n /**\r\n * Switches to big-endian mode for reading and writing multi-byte values.\r\n */\r\n setBigEndian() {\r\n this.littleEndian = false;\r\n return this;\r\n }\r\n /**\r\n * Move the pointer n bytes forward.\r\n * @param n - Number of bytes to skip.\r\n */\r\n skip(n = 1) {\r\n this.offset += n;\r\n return this;\r\n }\r\n /**\r\n * Move the pointer to the given offset.\r\n * @param offset\r\n */\r\n seek(offset) {\r\n this.offset = offset;\r\n return this;\r\n }\r\n /**\r\n * Store the current pointer offset.\r\n * @see {@link IOBuffer#reset}\r\n */\r\n mark() {\r\n this._mark = this.offset;\r\n return this;\r\n }\r\n /**\r\n * Move the pointer back to the last pointer offset set by mark.\r\n * @see {@link IOBuffer#mark}\r\n */\r\n reset() {\r\n this.offset = this._mark;\r\n return this;\r\n }\r\n /**\r\n * Push the current pointer offset to the mark stack.\r\n * @see {@link IOBuffer#popMark}\r\n */\r\n pushMark() {\r\n this._marks.push(this.offset);\r\n return this;\r\n }\r\n /**\r\n * Pop the last pointer offset from the mark stack, and set the current\r\n * pointer offset to the popped value.\r\n * @see {@link IOBuffer#pushMark}\r\n */\r\n popMark() {\r\n const offset = this._marks.pop();\r\n if (offset === undefined) {\r\n throw new Error('Mark stack empty');\r\n }\r\n this.seek(offset);\r\n return this;\r\n }\r\n /**\r\n * Move the pointer offset back to 0.\r\n */\r\n rewind() {\r\n this.offset = 0;\r\n return this;\r\n }\r\n /**\r\n * Make sure the buffer has sufficient memory to write a given byteLength at\r\n * the current pointer offset.\r\n * If the buffer's memory is insufficient, this method will create a new\r\n * buffer (a copy) with a length that is twice (byteLength + current offset).\r\n * @param byteLength\r\n */\r\n ensureAvailable(byteLength = 1) {\r\n if (!this.available(byteLength)) {\r\n const lengthNeeded = this.offset + byteLength;\r\n const newLength = lengthNeeded * 2;\r\n const newArray = new Uint8Array(newLength);\r\n newArray.set(new Uint8Array(this.buffer));\r\n this.buffer = newArray.buffer;\r\n this.length = this.byteLength = newLength;\r\n this._data = new DataView(this.buffer);\r\n }\r\n return this;\r\n }\r\n /**\r\n * Read a byte and return false if the byte's value is 0, or true otherwise.\r\n * Moves pointer forward by one byte.\r\n */\r\n readBoolean() {\r\n return this.readUint8() !== 0;\r\n }\r\n /**\r\n * Read a signed 8-bit integer and move pointer forward by 1 byte.\r\n */\r\n readInt8() {\r\n return this._data.getInt8(this.offset++);\r\n }\r\n /**\r\n * Read an unsigned 8-bit integer and move pointer forward by 1 byte.\r\n */\r\n readUint8() {\r\n return this._data.getUint8(this.offset++);\r\n }\r\n /**\r\n * Alias for {@link IOBuffer#readUint8}.\r\n */\r\n readByte() {\r\n return this.readUint8();\r\n }\r\n /**\r\n * Read `n` bytes and move pointer forward by `n` bytes.\r\n */\r\n readBytes(n = 1) {\r\n const bytes = new Uint8Array(n);\r\n for (let i = 0; i < n; i++) {\r\n bytes[i] = this.readByte();\r\n }\r\n return bytes;\r\n }\r\n /**\r\n * Read a 16-bit signed integer and move pointer forward by 2 bytes.\r\n */\r\n readInt16() {\r\n const value = this._data.getInt16(this.offset, this.littleEndian);\r\n this.offset += 2;\r\n return value;\r\n }\r\n /**\r\n * Read a 16-bit unsigned integer and move pointer forward by 2 bytes.\r\n */\r\n readUint16() {\r\n const value = this._data.getUint16(this.offset, this.littleEndian);\r\n this.offset += 2;\r\n return value;\r\n }\r\n /**\r\n * Read a 32-bit signed integer and move pointer forward by 4 bytes.\r\n */\r\n readInt32() {\r\n const value = this._data.getInt32(this.offset, this.littleEndian);\r\n this.offset += 4;\r\n return value;\r\n }\r\n /**\r\n * Read a 32-bit unsigned integer and move pointer forward by 4 bytes.\r\n */\r\n readUint32() {\r\n const value = this._data.getUint32(this.offset, this.littleEndian);\r\n this.offset += 4;\r\n return value;\r\n }\r\n /**\r\n * Read a 32-bit floating number and move pointer forward by 4 bytes.\r\n */\r\n readFloat32() {\r\n const value = this._data.getFloat32(this.offset, this.littleEndian);\r\n this.offset += 4;\r\n return value;\r\n }\r\n /**\r\n * Read a 64-bit floating number and move pointer forward by 8 bytes.\r\n */\r\n readFloat64() {\r\n const value = this._data.getFloat64(this.offset, this.littleEndian);\r\n this.offset += 8;\r\n return value;\r\n }\r\n /**\r\n * Read a 1-byte ASCII character and move pointer forward by 1 byte.\r\n */\r\n readChar() {\r\n return String.fromCharCode(this.readInt8());\r\n }\r\n /**\r\n * Read `n` 1-byte ASCII characters and move pointer forward by `n` bytes.\r\n */\r\n readChars(n = 1) {\r\n let result = '';\r\n for (let i = 0; i < n; i++) {\r\n result += this.readChar();\r\n }\r\n return result;\r\n }\r\n /**\r\n * Read the next `n` bytes, return a UTF-8 decoded string and move pointer\r\n * forward by `n` bytes.\r\n */\r\n readUtf8(n = 1) {\r\n return decode(this.readBytes(n));\r\n }\r\n /**\r\n * Write 0xff if the passed value is truthy, 0x00 otherwise and move pointer\r\n * forward by 1 byte.\r\n */\r\n writeBoolean(value) {\r\n this.writeUint8(value ? 0xff : 0x00);\r\n return this;\r\n }\r\n /**\r\n * Write `value` as an 8-bit signed integer and move pointer forward by 1 byte.\r\n */\r\n writeInt8(value) {\r\n this.ensureAvailable(1);\r\n this._data.setInt8(this.offset++, value);\r\n this._updateLastWrittenByte();\r\n return this;\r\n }\r\n /**\r\n * Write `value` as an 8-bit unsigned integer and move pointer forward by 1\r\n * byte.\r\n */\r\n writeUint8(value) {\r\n this.ensureAvailable(1);\r\n this._data.setUint8(this.offset++, value);\r\n this._updateLastWrittenByte();\r\n return this;\r\n }\r\n /**\r\n * An alias for {@link IOBuffer#writeUint8}.\r\n */\r\n writeByte(value) {\r\n return this.writeUint8(value);\r\n }\r\n /**\r\n * Write all elements of `bytes` as uint8 values and move pointer forward by\r\n * `bytes.length` bytes.\r\n */\r\n writeBytes(bytes) {\r\n this.ensureAvailable(bytes.length);\r\n for (let i = 0; i < bytes.length; i++) {\r\n this._data.setUint8(this.offset++, bytes[i]);\r\n }\r\n this._updateLastWrittenByte();\r\n return this;\r\n }\r\n /**\r\n * Write `value` as a 16-bit signed integer and move pointer forward by 2\r\n * bytes.\r\n */\r\n writeInt16(value) {\r\n this.ensureAvailable(2);\r\n this._data.setInt16(this.offset, value, this.littleEndian);\r\n this.offset += 2;\r\n this._updateLastWrittenByte();\r\n return this;\r\n }\r\n /**\r\n * Write `value` as a 16-bit unsigned integer and move pointer forward by 2\r\n * bytes.\r\n */\r\n writeUint16(value) {\r\n this.ensureAvailable(2);\r\n this._data.setUint16(this.offset, value, this.littleEndian);\r\n this.offset += 2;\r\n this._updateLastWrittenByte();\r\n return this;\r\n }\r\n /**\r\n * Write `value` as a 32-bit signed integer and move pointer forward by 4\r\n * bytes.\r\n */\r\n writeInt32(value) {\r\n this.ensureAvailable(4);\r\n this._data.setInt32(this.offset, value, this.littleEndian);\r\n this.offset += 4;\r\n this._updateLastWrittenByte();\r\n return this;\r\n }\r\n /**\r\n * Write `value` as a 32-bit unsigned integer and move pointer forward by 4\r\n * bytes.\r\n */\r\n writeUint32(value) {\r\n this.ensureAvailable(4);\r\n this._data.setUint32(this.offset, value, this.littleEndian);\r\n this.offset += 4;\r\n this._updateLastWrittenByte();\r\n return this;\r\n }\r\n /**\r\n * Write `value` as a 32-bit floating number and move pointer forward by 4\r\n * bytes.\r\n */\r\n writeFloat32(value) {\r\n this.ensureAvailable(4);\r\n this._data.setFloat32(this.offset, value, this.littleEndian);\r\n this.offset += 4;\r\n this._updateLastWrittenByte();\r\n return this;\r\n }\r\n /**\r\n * Write `value` as a 64-bit floating number and move pointer forward by 8\r\n * bytes.\r\n */\r\n writeFloat64(value) {\r\n this.ensureAvailable(8);\r\n this._data.setFloat64(this.offset, value, this.littleEndian);\r\n this.offset += 8;\r\n this._updateLastWrittenByte();\r\n return this;\r\n }\r\n /**\r\n * Write the charCode of `str`'s first character as an 8-bit unsigned integer\r\n * and move pointer forward by 1 byte.\r\n */\r\n writeChar(str) {\r\n return this.writeUint8(str.charCodeAt(0));\r\n }\r\n /**\r\n * Write the charCodes of all `str`'s characters as 8-bit unsigned integers\r\n * and move pointer forward by `str.length` bytes.\r\n */\r\n writeChars(str) {\r\n for (let i = 0; i < str.length; i++) {\r\n this.writeUint8(str.charCodeAt(i));\r\n }\r\n return this;\r\n }\r\n /**\r\n * UTF-8 encode and write `str` to the current pointer offset and move pointer\r\n * forward according to the encoded length.\r\n */\r\n writeUtf8(str) {\r\n return this.writeBytes(encode(str));\r\n }\r\n /**\r\n * Export a Uint8Array view of the internal buffer.\r\n * The view starts at the byte offset and its length\r\n * is calculated to stop at the last written byte or the original length.\r\n */\r\n toArray() {\r\n return new Uint8Array(this.buffer, this.byteOffset, this.lastWrittenByte);\r\n }\r\n /**\r\n * Update the last written byte offset\r\n * @private\r\n */\r\n _updateLastWrittenByte() {\r\n if (this.offset > this.lastWrittenByte) {\r\n this.lastWrittenByte = this.offset;\r\n }\r\n }\r\n}\r\n//# sourceMappingURL=IOBuffer.js.map" - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\common.js", - "name": "./node_modules/fast-png/lib-esm/common.js", - "index": 24, - "index2": 20, - "size": 700, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [], - "issuer": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "issuerId": null, - "issuerName": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "name": "./node_modules/fast-png/lib-esm/index.js", - "profile": { - "factory": 2180, - "building": 1082 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "name": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "profile": { - "factory": 21, - "building": 92, - "dependencies": 43 - } - } - ], - "profile": { - "factory": 48, - "building": 7 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "type": "harmony side effect evaluation", - "userRequest": "./common", - "loc": "3:0-45" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGEncoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "type": "harmony side effect evaluation", - "userRequest": "./common", - "loc": "3:0-45" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGEncoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "type": "harmony import specifier", - "userRequest": "./common", - "loc": "25:24-36" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "type": "harmony import specifier", - "userRequest": "./common", - "loc": "45:28-40" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "type": "harmony import specifier", - "userRequest": "./common", - "loc": "46:37-49" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "type": "harmony import specifier", - "userRequest": "./common", - "loc": "47:79-91" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "type": "harmony import specifier", - "userRequest": "./common", - "loc": "90:30-33" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGEncoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "type": "harmony import specifier", - "userRequest": "./common", - "loc": "93:25-28" - } - ], - "usedExports": [ - "pngSignature", - "crc" - ], - "providedExports": [ - "pngSignature", - "crc" - ], - "optimizationBailout": [], - "depth": 4, - "source": "export const pngSignature = [137, 80, 78, 71, 13, 10, 26, 10];\r\nconst crcTable = [];\r\nfor (let n = 0; n < 256; n++) {\r\n let c = n;\r\n for (let k = 0; k < 8; k++) {\r\n if (c & 1) {\r\n c = 0xedb88320 ^ (c >>> 1);\r\n }\r\n else {\r\n c = c >>> 1;\r\n }\r\n }\r\n crcTable[n] = c;\r\n}\r\nconst initialCrc = 0xffffffff;\r\nfunction updateCrc(currentCrc, data, length) {\r\n let c = currentCrc;\r\n for (let n = 0; n < length; n++) {\r\n c = crcTable[(c ^ data[n]) & 0xff] ^ (c >>> 8);\r\n }\r\n return c;\r\n}\r\nexport function crc(data, length) {\r\n return (updateCrc(initialCrc, data, length) ^ initialCrc) >>> 0;\r\n}\r\n//# sourceMappingURL=common.js.map" - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\internalTypes.js", - "name": "./node_modules/fast-png/lib-esm/internalTypes.js", - "index": 25, - "index2": 21, - "size": 1297, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [], - "issuer": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "issuerId": null, - "issuerName": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "name": "./node_modules/fast-png/lib-esm/index.js", - "profile": { - "factory": 2180, - "building": 1082 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "name": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "profile": { - "factory": 21, - "building": 92, - "dependencies": 43 - } - } - ], - "profile": { - "factory": 48, - "building": 7 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "type": "harmony side effect evaluation", - "userRequest": "./internalTypes", - "loc": "4:0-95" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGEncoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "type": "harmony side effect evaluation", - "userRequest": "./internalTypes", - "loc": "4:0-95" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGEncoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "type": "harmony import specifier", - "userRequest": "./internalTypes", - "loc": "11:26-35" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "type": "harmony import specifier", - "userRequest": "./internalTypes", - "loc": "27:34-51" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "type": "harmony import specifier", - "userRequest": "./internalTypes", - "loc": "28:29-41" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "type": "harmony import specifier", - "userRequest": "./internalTypes", - "loc": "29:32-47" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGEncoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "type": "harmony import specifier", - "userRequest": "./internalTypes", - "loc": "35:23-40" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGEncoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "type": "harmony import specifier", - "userRequest": "./internalTypes", - "loc": "36:23-35" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGEncoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "type": "harmony import specifier", - "userRequest": "./internalTypes", - "loc": "37:23-38" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "type": "harmony import specifier", - "userRequest": "./internalTypes", - "loc": "109:17-26" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGEncoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "type": "harmony import specifier", - "userRequest": "./internalTypes", - "loc": "110:54-63" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "type": "harmony import specifier", - "userRequest": "./internalTypes", - "loc": "112:17-26" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGEncoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "type": "harmony import specifier", - "userRequest": "./internalTypes", - "loc": "113:36-45" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "type": "harmony import specifier", - "userRequest": "./internalTypes", - "loc": "115:17-26" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGEncoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "type": "harmony import specifier", - "userRequest": "./internalTypes", - "loc": "116:36-45" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "type": "harmony import specifier", - "userRequest": "./internalTypes", - "loc": "118:17-26" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGEncoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "type": "harmony import specifier", - "userRequest": "./internalTypes", - "loc": "119:36-45" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "type": "harmony import specifier", - "userRequest": "./internalTypes", - "loc": "121:17-26" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGEncoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGEncoder.js", - "type": "harmony import specifier", - "userRequest": "./internalTypes", - "loc": "122:36-45" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "type": "harmony import specifier", - "userRequest": "./internalTypes", - "loc": "129:40-57" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "type": "harmony import specifier", - "userRequest": "./internalTypes", - "loc": "192:35-47" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "module": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "moduleName": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "type": "harmony import specifier", - "userRequest": "./internalTypes", - "loc": "195:38-53" - } - ], - "usedExports": [ - "ColorType", - "CompressionMethod", - "FilterMethod", - "InterlaceMethod" - ], - "providedExports": [ - "ColorType", - "CompressionMethod", - "FilterMethod", - "InterlaceMethod" - ], - "optimizationBailout": [], - "depth": 4, - "source": "export var ColorType;\r\n(function (ColorType) {\r\n ColorType[ColorType[\"UNKNOWN\"] = -1] = \"UNKNOWN\";\r\n ColorType[ColorType[\"GREYSCALE\"] = 0] = \"GREYSCALE\";\r\n ColorType[ColorType[\"TRUECOLOUR\"] = 2] = \"TRUECOLOUR\";\r\n ColorType[ColorType[\"INDEXED_COLOUR\"] = 3] = \"INDEXED_COLOUR\";\r\n ColorType[ColorType[\"GREYSCALE_ALPHA\"] = 4] = \"GREYSCALE_ALPHA\";\r\n ColorType[ColorType[\"TRUECOLOUR_ALPHA\"] = 6] = \"TRUECOLOUR_ALPHA\";\r\n})(ColorType || (ColorType = {}));\r\nexport var CompressionMethod;\r\n(function (CompressionMethod) {\r\n CompressionMethod[CompressionMethod[\"UNKNOWN\"] = -1] = \"UNKNOWN\";\r\n CompressionMethod[CompressionMethod[\"DEFLATE\"] = 0] = \"DEFLATE\";\r\n})(CompressionMethod || (CompressionMethod = {}));\r\nexport var FilterMethod;\r\n(function (FilterMethod) {\r\n FilterMethod[FilterMethod[\"UNKNOWN\"] = -1] = \"UNKNOWN\";\r\n FilterMethod[FilterMethod[\"ADAPTIVE\"] = 0] = \"ADAPTIVE\";\r\n})(FilterMethod || (FilterMethod = {}));\r\nexport var InterlaceMethod;\r\n(function (InterlaceMethod) {\r\n InterlaceMethod[InterlaceMethod[\"UNKNOWN\"] = -1] = \"UNKNOWN\";\r\n InterlaceMethod[InterlaceMethod[\"NO_INTERLACE\"] = 0] = \"NO_INTERLACE\";\r\n InterlaceMethod[InterlaceMethod[\"ADAM7\"] = 1] = \"ADAM7\";\r\n})(InterlaceMethod || (InterlaceMethod = {}));\r\n//# sourceMappingURL=internalTypes.js.map" - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\iobuffer\\lib-esm\\utf8.browser.js", - "name": "./node_modules/iobuffer/lib-esm/utf8.browser.js", - "index": 6, - "index2": 2, - "size": 293, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [], - "issuer": "F:\\tweb\\node_modules\\iobuffer\\lib-esm\\IOBuffer.js", - "issuerId": null, - "issuerName": "./node_modules/iobuffer/lib-esm/IOBuffer.js", - "issuerPath": [ - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/webp/webp.worker.ts", - "profile": { - "factory": 4, - "building": 3760 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\webp\\webp.ts", - "name": "./src/lib/webp/webp.ts", - "profile": { - "factory": 2933, - "building": 717 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\index.js", - "name": "./node_modules/fast-png/lib-esm/index.js", - "profile": { - "factory": 2180, - "building": 1082 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\fast-png\\lib-esm\\PNGDecoder.js", - "name": "./node_modules/fast-png/lib-esm/PNGDecoder.js", - "profile": { - "factory": 21, - "building": 92, - "dependencies": 43 - } - }, - { - "id": null, - "identifier": "F:\\tweb\\node_modules\\iobuffer\\lib-esm\\IOBuffer.js", - "name": "./node_modules/iobuffer/lib-esm/IOBuffer.js", - "profile": { - "factory": 48, - "building": 7 - } - } - ], - "profile": { - "factory": 6, - "building": 16 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\iobuffer\\lib-esm\\IOBuffer.js", - "module": "./node_modules/iobuffer/lib-esm/IOBuffer.js", - "moduleName": "./node_modules/iobuffer/lib-esm/IOBuffer.js", - "type": "harmony side effect evaluation", - "userRequest": "./utf8", - "loc": "1:0-40" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\iobuffer\\lib-esm\\IOBuffer.js", - "module": "./node_modules/iobuffer/lib-esm/IOBuffer.js", - "moduleName": "./node_modules/iobuffer/lib-esm/IOBuffer.js", - "type": "harmony import specifier", - "userRequest": "./utf8", - "loc": "267:15-21" - }, - { - "moduleId": null, - "moduleIdentifier": "F:\\tweb\\node_modules\\iobuffer\\lib-esm\\IOBuffer.js", - "module": "./node_modules/iobuffer/lib-esm/IOBuffer.js", - "moduleName": "./node_modules/iobuffer/lib-esm/IOBuffer.js", - "type": "harmony import specifier", - "userRequest": "./utf8", - "loc": "402:31-37" - } - ], - "usedExports": [ - "decode", - "encode" - ], - "providedExports": [ - "decode", - "encode" - ], - "optimizationBailout": [], - "depth": 5, - "source": "import './text-encoding-polyfill';\r\nconst decoder = new TextDecoder('utf-8');\r\nexport function decode(bytes) {\r\n return decoder.decode(bytes);\r\n}\r\nconst encoder = new TextEncoder();\r\nexport function encode(str) {\r\n return encoder.encode(str);\r\n}\r\n//# sourceMappingURL=utf8.browser.js.map" - } - ], - "filteredModules": 0 - } - ], - "filteredModules": 0, - "logging": { - "webpack.buildChunkGraph.visitModules": { - "entries": [], - "filteredEntries": 2, - "debug": false - } - }, - "children": [], - "name": "worker" - }, - { - "errors": [], - "warnings": [], - "publicPath": "", - "outputPath": "F:\\tweb\\public", - "assetsByChunkName": { - "main": "b601bf8645daa9db7023.worker.js" - }, - "assets": [ - { - "name": "b601bf8645daa9db7023.worker.js", - "size": 359740, - "chunks": [ - 0 - ], - "chunkNames": [ - "main" - ], - "info": { - "immutable": true - }, - "emitted": true, - "isOverSizeLimit": true - } - ], - "filteredAssets": 0, - "entrypoints": { - "main": { - "chunks": [ - 0 - ], - "assets": [ - "b601bf8645daa9db7023.worker.js" - ], - "children": {}, - "childAssets": {} - } - }, - "namedChunkGroups": { - "main": { - "chunks": [ - 0 - ], - "assets": [ - "b601bf8645daa9db7023.worker.js" - ], - "children": {}, - "childAssets": {} - } - }, - "chunks": [ - { - "id": 0, - "rendered": true, - "initial": true, - "entry": true, - "size": 632349, - "names": [ - "main" - ], - "files": [ - "b601bf8645daa9db7023.worker.js" - ], - "hash": "d671ed5a0cdc47e25204", - "siblings": [], - "parents": [], - "children": [], - "childrenByOrder": {}, - "modules": [ - { - "id": 0, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\bin_utils.ts", - "name": "./src/lib/bin_utils.ts", - "index": 2, - "index2": 1, - "size": 13166, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\polyfill.ts", - "issuerId": 20, - "issuerName": "./src/lib/polyfill.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 20, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\polyfill.ts", - "name": "./src/lib/polyfill.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - } - ], - "profile": { - "factory": 0, - "building": 323, - "dependencies": 53 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 2, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 7, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 13, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 16, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\filemanager.ts", - "module": "./src/lib/filemanager.ts", - "moduleName": "./src/lib/filemanager.ts", - "type": "cjs require", - "userRequest": "./bin_utils", - "loc": "13:20-42" - }, - { - "moduleId": 20, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 21, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 21, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 25, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\crypto_methods.ts", - "module": "./src/lib/crypto/crypto_methods.ts", - "moduleName": "./src/lib/crypto/crypto_methods.ts", - "type": "cjs require", - "userRequest": "../bin_utils", - "loc": "3:20-43" - }, - { - "moduleId": 26, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\srp.ts", - "module": "./src/lib/crypto/srp.ts", - "moduleName": "./src/lib/crypto/srp.ts", - "type": "cjs require", - "userRequest": "../bin_utils", - "loc": "16:20-43" - }, - { - "moduleId": 27, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 28, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 30, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 31, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 32, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 33, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\cacheStorage.ts", - "module": "./src/lib/cacheStorage.ts", - "moduleName": "./src/lib/cacheStorage.ts", - "type": "cjs require", - "userRequest": "./bin_utils", - "loc": "15:20-42" - } - ], - "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 \r\n * https://github.com/zhukov/webogram/blob/master/LICENSE\r\n */\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.getFileNameByLocation = exports.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 let blob;\r\n const 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 let bb = new BlobBuilder;\r\n blobParts.forEach((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 'application/json'\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\nfunction getFileNameByLocation(location, options) {\r\n const fileName = ''; //(options?.fileName || '').split('.');\r\n const ext = fileName[fileName.length - 1] || '';\r\n switch (location._) {\r\n case 'inputPhotoFileLocation':\r\n case 'inputDocumentFileLocation': {\r\n const thumbPart = location.thumb_size ? '_' + location.thumb_size : '';\r\n return (fileName[0] ? fileName[0] + '_' : '') + location.id + thumbPart + (ext ? '.' + ext : ext);\r\n }\r\n case 'fileLocationToBeDeprecated':\r\n case 'inputPeerPhotoFileLocation':\r\n case 'inputStickerSetThumb':\r\n case 'inputFileLocation': {\r\n return location.volume_id + '_' + location.local_id + (ext ? '.' + ext : ext);\r\n }\r\n default: {\r\n console.error('Unrecognized location:', location);\r\n return '';\r\n }\r\n }\r\n}\r\nexports.getFileNameByLocation = getFileNameByLocation;\r\n" - }, - { - "id": 1, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\logger.ts", - "name": "./src/lib/logger.ts", - "index": 21, - "index2": 15, - "size": 1851, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "issuerId": 19, - "issuerName": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - } - ], - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiManager.ts", - "module": "./src/lib/mtproto/apiManager.ts", - "moduleName": "./src/lib/mtproto/apiManager.ts", - "type": "cjs require", - "userRequest": "../logger", - "loc": "24:17-37" - }, - { - "moduleId": 19, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "module": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "moduleName": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "type": "cjs require", - "userRequest": "../logger", - "loc": "23:17-37" - }, - { - "moduleId": 21, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\networker.ts", - "module": "./src/lib/mtproto/networker.ts", - "moduleName": "./src/lib/mtproto/networker.ts", - "type": "cjs require", - "userRequest": "../logger", - "loc": "26:17-37" - }, - { - "moduleId": 26, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\srp.ts", - "module": "./src/lib/crypto/srp.ts", - "moduleName": "./src/lib/crypto/srp.ts", - "type": "cjs require", - "userRequest": "../logger", - "loc": "19:17-37" - }, - { - "moduleId": 27, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": "../../logger", - "loc": "12:17-40" - }, - { - "moduleId": 30, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\authorizer.ts", - "module": "./src/lib/mtproto/authorizer.ts", - "moduleName": "./src/lib/mtproto/authorizer.ts", - "type": "cjs require", - "userRequest": "../logger", - "loc": "24:17-37" - }, - { - "moduleId": 32, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiFileManager.ts", - "module": "./src/lib/mtproto/apiFileManager.ts", - "moduleName": "./src/lib/mtproto/apiFileManager.ts", - "type": "cjs require", - "userRequest": "../logger", - "loc": "20:17-37" - } - ], - "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.logger = exports.LogLevels = void 0;\r\nvar LogLevels;\r\n(function (LogLevels) {\r\n LogLevels[LogLevels[\"log\"] = 1] = \"log\";\r\n LogLevels[LogLevels[\"warn\"] = 2] = \"warn\";\r\n LogLevels[LogLevels[\"error\"] = 4] = \"error\";\r\n LogLevels[LogLevels[\"debug\"] = 8] = \"debug\";\r\n})(LogLevels = exports.LogLevels || (exports.LogLevels = {}));\r\n;\r\nvar _logTimer = Date.now();\r\nfunction dT() {\r\n return '[' + ((Date.now() - _logTimer) / 1000).toFixed(3) + ']';\r\n}\r\nfunction logger(prefix, level = LogLevels.log | LogLevels.warn | LogLevels.error) {\r\n // @ts-ignore\r\n if (process.env.NODE_ENV == 'production' /* || true */) {\r\n level = LogLevels.error;\r\n }\r\n //level = LogLevels.log | LogLevels.warn | LogLevels.error | LogLevels.debug\r\n function Log(...args) {\r\n return level & LogLevels.log && console.log(dT(), '[' + prefix + ']:', ...args);\r\n }\r\n Log.warn = function (...args) {\r\n return level & LogLevels.warn && console.warn(dT(), '[' + prefix + ']:', ...args);\r\n };\r\n Log.info = function (...args) {\r\n return level & LogLevels.log && console.info(dT(), '[' + prefix + ']:', ...args);\r\n };\r\n Log.error = function (...args) {\r\n return level & LogLevels.error && console.error(dT(), '[' + prefix + ']:', ...args);\r\n };\r\n Log.trace = function (...args) {\r\n return level & LogLevels.log && console.trace(dT(), '[' + prefix + ']:', ...args);\r\n };\r\n /* Log.debug = function(...args: any[]) {\r\n return level & LogLevels.debug && console.log(dT(), '[' + prefix + ']:', ...args);\r\n }; */\r\n Log.debug = function (...args) {\r\n return level & LogLevels.debug && console.debug(dT(), '[' + prefix + ']:', ...args);\r\n };\r\n return Log;\r\n}\r\nexports.logger = logger;\r\n;\r\n" - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\cryptoworker.ts", - "name": "./src/lib/crypto/cryptoworker.ts", - "index": 18, - "index2": 17, - "size": 4865, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "issuerId": 19, - "issuerName": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - } - ], - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 19, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "module": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "moduleName": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "type": "cjs require", - "userRequest": "../crypto/cryptoworker", - "loc": "20:39-72" - }, - { - "moduleId": 21, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\srp.ts", - "module": "./src/lib/crypto/srp.ts", - "moduleName": "./src/lib/crypto/srp.ts", - "type": "cjs require", - "userRequest": "../crypto/cryptoworker", - "loc": "17:39-72" - }, - { - "moduleId": 30, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 31, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 32, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiFileManager.ts", - "module": "./src/lib/mtproto/apiFileManager.ts", - "moduleName": "./src/lib/mtproto/apiFileManager.ts", - "type": "cjs require", - "userRequest": "../crypto/cryptoworker", - "loc": "22: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 'gzipUncompress': utils.gzipUncompress,\r\n });\r\n }),\r\n Promise.resolve().then(() => __importStar(require('./srp'))).then(srp => {\r\n this.utils.computeSRP = srp.computeSRP;\r\n }) /* ,\r\n \r\n import('../bin_utils').then(utils => {\r\n this.utils.unzip = utils.gzipUncompress;\r\n }) */\r\n ]);\r\n return;\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": 3, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\storage.ts", - "name": "./src/lib/storage.ts", - "index": 5, - "index2": 5, - "size": 6067, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "issuerId": 19, - "issuerName": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - } - ], - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 16, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 19, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "module": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "moduleName": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "type": "cjs require", - "userRequest": "../storage", - "loc": "19:34-55" - }, - { - "moduleId": 21, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 29, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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\nconst context_1 = require(\"../helpers/context\");\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\nclass AppStorage {\r\n constructor() {\r\n this.taskID = 0;\r\n this.tasks = {};\r\n //private log = (...args: any[]) => console.log('[SW LS]', ...args);\r\n this.log = (...args) => { };\r\n if (mtproto_config_1.Modes.test) {\r\n this.setPrefix('t_');\r\n }\r\n if (!context_1.isWorker) {\r\n this.configStorage = new ConfigStorage();\r\n }\r\n }\r\n setPrefix(newPrefix) {\r\n if (this.configStorage) {\r\n this.configStorage.keyPrefix = newPrefix;\r\n }\r\n }\r\n noPrefix() {\r\n if (this.configStorage) {\r\n this.configStorage.noPrefix = true;\r\n }\r\n }\r\n finishTask(taskID, result) {\r\n this.log('finishTask:', taskID, result, Object.keys(this.tasks));\r\n if (!this.tasks.hasOwnProperty(taskID)) {\r\n this.log('no such task:', taskID, result);\r\n return;\r\n }\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 (context_1.isWorker) {\r\n const taskID = this.taskID++;\r\n this.tasks[taskID] = resolve;\r\n const task = { useLs: true, task: methodName, taskID, args: _args };\r\n context_1.notifySomeone(task);\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 this.configStorage[methodName].apply(this.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": 4, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto_config.ts", - "name": "./src/lib/mtproto/mtproto_config.ts", - "index": 6, - "index2": 3, - "size": 467, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\storage.ts", - "issuerId": 3, - "issuerName": "./src/lib/storage.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 3, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\storage.ts", - "name": "./src/lib/storage.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - } - ], - "profile": { - "factory": 17, - "building": 19 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 3, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 8, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 21, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 29, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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: false,\r\n ssl: true,\r\n multipleConnections: true\r\n};\r\n" - }, - { - "id": 5, - "identifier": "F:\\tweb\\node_modules\\jsbn\\index.js", - "name": "./node_modules/jsbn/index.js", - "index": 3, - "index2": 0, - "size": 42308, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\polyfill.ts", - "issuerId": 20, - "issuerName": "./src/lib/polyfill.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 20, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\polyfill.ts", - "name": "./src/lib/polyfill.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - } - ], - "profile": { - "factory": 0, - "building": 323, - "dependencies": 53 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 0, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\bin_utils.ts", - "module": "./src/lib/bin_utils.ts", - "moduleName": "./src/lib/bin_utils.ts", - "type": "cjs require", - "userRequest": "jsbn", - "loc": "11:15-30" - }, - { - "moduleId": 13, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 20, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 30, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 2, - "source": "(function(){\n\n // Copyright (c) 2005 Tom Wu\n // All Rights Reserved.\n // See \"LICENSE\" for details.\n\n // Basic JavaScript BN library - subset useful for RSA encryption.\n\n // Bits per digit\n var dbits;\n\n // JavaScript engine analysis\n var canary = 0xdeadbeefcafe;\n var j_lm = ((canary&0xffffff)==0xefcafe);\n\n // (public) Constructor\n function BigInteger(a,b,c) {\n if(a != null)\n if(\"number\" == typeof a) this.fromNumber(a,b,c);\n else if(b == null && \"string\" != typeof a) this.fromString(a,256);\n else this.fromString(a,b);\n }\n\n // return new, unset BigInteger\n function nbi() { return new BigInteger(null); }\n\n // am: Compute w_j += (x*this_i), propagate carries,\n // c is initial carry, returns final carry.\n // c < 3*dvalue, x < 2*dvalue, this_i < dvalue\n // We need to select the fastest one that works in this environment.\n\n // am1: use a single mult and divide to get the high bits,\n // max digit bits should be 26 because\n // max internal value = 2*dvalue^2-2*dvalue (< 2^53)\n function am1(i,x,w,j,c,n) {\n while(--n >= 0) {\n var v = x*this[i++]+w[j]+c;\n c = Math.floor(v/0x4000000);\n w[j++] = v&0x3ffffff;\n }\n return c;\n }\n // am2 avoids a big mult-and-extract completely.\n // Max digit bits should be <= 30 because we do bitwise ops\n // on values up to 2*hdvalue^2-hdvalue-1 (< 2^31)\n function am2(i,x,w,j,c,n) {\n var xl = x&0x7fff, xh = x>>15;\n while(--n >= 0) {\n var l = this[i]&0x7fff;\n var h = this[i++]>>15;\n var m = xh*l+h*xl;\n l = xl*l+((m&0x7fff)<<15)+w[j]+(c&0x3fffffff);\n c = (l>>>30)+(m>>>15)+xh*h+(c>>>30);\n w[j++] = l&0x3fffffff;\n }\n return c;\n }\n // Alternately, set max digit bits to 28 since some\n // browsers slow down when dealing with 32-bit numbers.\n function am3(i,x,w,j,c,n) {\n var xl = x&0x3fff, xh = x>>14;\n while(--n >= 0) {\n var l = this[i]&0x3fff;\n var h = this[i++]>>14;\n var m = xh*l+h*xl;\n l = xl*l+((m&0x3fff)<<14)+w[j]+c;\n c = (l>>28)+(m>>14)+xh*h;\n w[j++] = l&0xfffffff;\n }\n return c;\n }\n var inBrowser = typeof navigator !== \"undefined\";\n if(inBrowser && j_lm && (navigator.appName == \"Microsoft Internet Explorer\")) {\n BigInteger.prototype.am = am2;\n dbits = 30;\n }\n else if(inBrowser && j_lm && (navigator.appName != \"Netscape\")) {\n BigInteger.prototype.am = am1;\n dbits = 26;\n }\n else { // Mozilla/Netscape seems to prefer am3\n BigInteger.prototype.am = am3;\n dbits = 28;\n }\n\n BigInteger.prototype.DB = dbits;\n BigInteger.prototype.DM = ((1<= 0; --i) r[i] = this[i];\n r.t = this.t;\n r.s = this.s;\n }\n\n // (protected) set from integer value x, -DV <= x < DV\n function bnpFromInt(x) {\n this.t = 1;\n this.s = (x<0)?-1:0;\n if(x > 0) this[0] = x;\n else if(x < -1) this[0] = x+this.DV;\n else this.t = 0;\n }\n\n // return bigint initialized to value\n function nbv(i) { var r = nbi(); r.fromInt(i); return r; }\n\n // (protected) set from string and radix\n function bnpFromString(s,b) {\n var k;\n if(b == 16) k = 4;\n else if(b == 8) k = 3;\n else if(b == 256) k = 8; // byte array\n else if(b == 2) k = 1;\n else if(b == 32) k = 5;\n else if(b == 4) k = 2;\n else { this.fromRadix(s,b); return; }\n this.t = 0;\n this.s = 0;\n var i = s.length, mi = false, sh = 0;\n while(--i >= 0) {\n var x = (k==8)?s[i]&0xff:intAt(s,i);\n if(x < 0) {\n if(s.charAt(i) == \"-\") mi = true;\n continue;\n }\n mi = false;\n if(sh == 0)\n this[this.t++] = x;\n else if(sh+k > this.DB) {\n this[this.t-1] |= (x&((1<<(this.DB-sh))-1))<>(this.DB-sh));\n }\n else\n this[this.t-1] |= x<= this.DB) sh -= this.DB;\n }\n if(k == 8 && (s[0]&0x80) != 0) {\n this.s = -1;\n if(sh > 0) this[this.t-1] |= ((1<<(this.DB-sh))-1)< 0 && this[this.t-1] == c) --this.t;\n }\n\n // (public) return string representation in given radix\n function bnToString(b) {\n if(this.s < 0) return \"-\"+this.negate().toString(b);\n var k;\n if(b == 16) k = 4;\n else if(b == 8) k = 3;\n else if(b == 2) k = 1;\n else if(b == 32) k = 5;\n else if(b == 4) k = 2;\n else return this.toRadix(b);\n var km = (1< 0) {\n if(p < this.DB && (d = this[i]>>p) > 0) { m = true; r = int2char(d); }\n while(i >= 0) {\n if(p < k) {\n d = (this[i]&((1<>(p+=this.DB-k);\n }\n else {\n d = (this[i]>>(p-=k))&km;\n if(p <= 0) { p += this.DB; --i; }\n }\n if(d > 0) m = true;\n if(m) r += int2char(d);\n }\n }\n return m?r:\"0\";\n }\n\n // (public) -this\n function bnNegate() { var r = nbi(); BigInteger.ZERO.subTo(this,r); return r; }\n\n // (public) |this|\n function bnAbs() { return (this.s<0)?this.negate():this; }\n\n // (public) return + if this > a, - if this < a, 0 if equal\n function bnCompareTo(a) {\n var r = this.s-a.s;\n if(r != 0) return r;\n var i = this.t;\n r = i-a.t;\n if(r != 0) return (this.s<0)?-r:r;\n while(--i >= 0) if((r=this[i]-a[i]) != 0) return r;\n return 0;\n }\n\n // returns bit length of the integer x\n function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }\n\n // (public) return the number of bits in \"this\"\n function bnBitLength() {\n if(this.t <= 0) return 0;\n return this.DB*(this.t-1)+nbits(this[this.t-1]^(this.s&this.DM));\n }\n\n // (protected) r = this << n*DB\n function bnpDLShiftTo(n,r) {\n var i;\n for(i = this.t-1; i >= 0; --i) r[i+n] = this[i];\n for(i = n-1; i >= 0; --i) r[i] = 0;\n r.t = this.t+n;\n r.s = this.s;\n }\n\n // (protected) r = this >> n*DB\n function bnpDRShiftTo(n,r) {\n for(var i = n; i < this.t; ++i) r[i-n] = this[i];\n r.t = Math.max(this.t-n,0);\n r.s = this.s;\n }\n\n // (protected) r = this << n\n function bnpLShiftTo(n,r) {\n var bs = n%this.DB;\n var cbs = this.DB-bs;\n var bm = (1<= 0; --i) {\n r[i+ds+1] = (this[i]>>cbs)|c;\n c = (this[i]&bm)<= 0; --i) r[i] = 0;\n r[ds] = c;\n r.t = this.t+ds+1;\n r.s = this.s;\n r.clamp();\n }\n\n // (protected) r = this >> n\n function bnpRShiftTo(n,r) {\n r.s = this.s;\n var ds = Math.floor(n/this.DB);\n if(ds >= this.t) { r.t = 0; return; }\n var bs = n%this.DB;\n var cbs = this.DB-bs;\n var bm = (1<>bs;\n for(var i = ds+1; i < this.t; ++i) {\n r[i-ds-1] |= (this[i]&bm)<>bs;\n }\n if(bs > 0) r[this.t-ds-1] |= (this.s&bm)<>= this.DB;\n }\n if(a.t < this.t) {\n c -= a.s;\n while(i < this.t) {\n c += this[i];\n r[i++] = c&this.DM;\n c >>= this.DB;\n }\n c += this.s;\n }\n else {\n c += this.s;\n while(i < a.t) {\n c -= a[i];\n r[i++] = c&this.DM;\n c >>= this.DB;\n }\n c -= a.s;\n }\n r.s = (c<0)?-1:0;\n if(c < -1) r[i++] = this.DV+c;\n else if(c > 0) r[i++] = c;\n r.t = i;\n r.clamp();\n }\n\n // (protected) r = this * a, r != this,a (HAC 14.12)\n // \"this\" should be the larger one if appropriate.\n function bnpMultiplyTo(a,r) {\n var x = this.abs(), y = a.abs();\n var i = x.t;\n r.t = i+y.t;\n while(--i >= 0) r[i] = 0;\n for(i = 0; i < y.t; ++i) r[i+x.t] = x.am(0,y[i],r,i,0,x.t);\n r.s = 0;\n r.clamp();\n if(this.s != a.s) BigInteger.ZERO.subTo(r,r);\n }\n\n // (protected) r = this^2, r != this (HAC 14.16)\n function bnpSquareTo(r) {\n var x = this.abs();\n var i = r.t = 2*x.t;\n while(--i >= 0) r[i] = 0;\n for(i = 0; i < x.t-1; ++i) {\n var c = x.am(i,x[i],r,2*i,0,1);\n if((r[i+x.t]+=x.am(i+1,2*x[i],r,2*i+1,c,x.t-i-1)) >= x.DV) {\n r[i+x.t] -= x.DV;\n r[i+x.t+1] = 1;\n }\n }\n if(r.t > 0) r[r.t-1] += x.am(i,x[i],r,2*i,0,1);\n r.s = 0;\n r.clamp();\n }\n\n // (protected) divide this by m, quotient and remainder to q, r (HAC 14.20)\n // r != q, this != m. q or r may be null.\n function bnpDivRemTo(m,q,r) {\n var pm = m.abs();\n if(pm.t <= 0) return;\n var pt = this.abs();\n if(pt.t < pm.t) {\n if(q != null) q.fromInt(0);\n if(r != null) this.copyTo(r);\n return;\n }\n if(r == null) r = nbi();\n var y = nbi(), ts = this.s, ms = m.s;\n var nsh = this.DB-nbits(pm[pm.t-1]); // normalize modulus\n if(nsh > 0) { pm.lShiftTo(nsh,y); pt.lShiftTo(nsh,r); }\n else { pm.copyTo(y); pt.copyTo(r); }\n var ys = y.t;\n var y0 = y[ys-1];\n if(y0 == 0) return;\n var yt = y0*(1<1)?y[ys-2]>>this.F2:0);\n var d1 = this.FV/yt, d2 = (1<= 0) {\n r[r.t++] = 1;\n r.subTo(t,r);\n }\n BigInteger.ONE.dlShiftTo(ys,t);\n t.subTo(y,y); // \"negative\" y so we can replace sub with am later\n while(y.t < ys) y[y.t++] = 0;\n while(--j >= 0) {\n // Estimate quotient digit\n var qd = (r[--i]==y0)?this.DM:Math.floor(r[i]*d1+(r[i-1]+e)*d2);\n if((r[i]+=y.am(0,qd,r,j,0,ys)) < qd) { // Try it out\n y.dlShiftTo(j,t);\n r.subTo(t,r);\n while(r[i] < --qd) r.subTo(t,r);\n }\n }\n if(q != null) {\n r.drShiftTo(ys,q);\n if(ts != ms) BigInteger.ZERO.subTo(q,q);\n }\n r.t = ys;\n r.clamp();\n if(nsh > 0) r.rShiftTo(nsh,r); // Denormalize remainder\n if(ts < 0) BigInteger.ZERO.subTo(r,r);\n }\n\n // (public) this mod a\n function bnMod(a) {\n var r = nbi();\n this.abs().divRemTo(a,null,r);\n if(this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) a.subTo(r,r);\n return r;\n }\n\n // Modular reduction using \"classic\" algorithm\n function Classic(m) { this.m = m; }\n function cConvert(x) {\n if(x.s < 0 || x.compareTo(this.m) >= 0) return x.mod(this.m);\n else return x;\n }\n function cRevert(x) { return x; }\n function cReduce(x) { x.divRemTo(this.m,null,x); }\n function cMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }\n function cSqrTo(x,r) { x.squareTo(r); this.reduce(r); }\n\n Classic.prototype.convert = cConvert;\n Classic.prototype.revert = cRevert;\n Classic.prototype.reduce = cReduce;\n Classic.prototype.mulTo = cMulTo;\n Classic.prototype.sqrTo = cSqrTo;\n\n // (protected) return \"-1/this % 2^DB\"; useful for Mont. reduction\n // justification:\n // xy == 1 (mod m)\n // xy = 1+km\n // xy(2-xy) = (1+km)(1-km)\n // x[y(2-xy)] = 1-k^2m^2\n // x[y(2-xy)] == 1 (mod m^2)\n // if y is 1/x mod m, then y(2-xy) is 1/x mod m^2\n // should reduce x and y(2-xy) by m^2 at each step to keep size bounded.\n // JS multiply \"overflows\" differently from C/C++, so care is needed here.\n function bnpInvDigit() {\n if(this.t < 1) return 0;\n var x = this[0];\n if((x&1) == 0) return 0;\n var y = x&3; // y == 1/x mod 2^2\n y = (y*(2-(x&0xf)*y))&0xf; // y == 1/x mod 2^4\n y = (y*(2-(x&0xff)*y))&0xff; // y == 1/x mod 2^8\n y = (y*(2-(((x&0xffff)*y)&0xffff)))&0xffff; // y == 1/x mod 2^16\n // last step - calculate inverse mod DV directly;\n // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints\n y = (y*(2-x*y%this.DV))%this.DV; // y == 1/x mod 2^dbits\n // we really want the negative inverse, and -DV < y < DV\n return (y>0)?this.DV-y:-y;\n }\n\n // Montgomery reduction\n function Montgomery(m) {\n this.m = m;\n this.mp = m.invDigit();\n this.mpl = this.mp&0x7fff;\n this.mph = this.mp>>15;\n this.um = (1<<(m.DB-15))-1;\n this.mt2 = 2*m.t;\n }\n\n // xR mod m\n function montConvert(x) {\n var r = nbi();\n x.abs().dlShiftTo(this.m.t,r);\n r.divRemTo(this.m,null,r);\n if(x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) this.m.subTo(r,r);\n return r;\n }\n\n // x/R mod m\n function montRevert(x) {\n var r = nbi();\n x.copyTo(r);\n this.reduce(r);\n return r;\n }\n\n // x = x/R mod m (HAC 14.32)\n function montReduce(x) {\n while(x.t <= this.mt2) // pad x so am has enough room later\n x[x.t++] = 0;\n for(var i = 0; i < this.m.t; ++i) {\n // faster way of calculating u0 = x[i]*mp mod DV\n var j = x[i]&0x7fff;\n var u0 = (j*this.mpl+(((j*this.mph+(x[i]>>15)*this.mpl)&this.um)<<15))&x.DM;\n // use am to combine the multiply-shift-add into one call\n j = i+this.m.t;\n x[j] += this.m.am(0,u0,x,i,0,this.m.t);\n // propagate carry\n while(x[j] >= x.DV) { x[j] -= x.DV; x[++j]++; }\n }\n x.clamp();\n x.drShiftTo(this.m.t,x);\n if(x.compareTo(this.m) >= 0) x.subTo(this.m,x);\n }\n\n // r = \"x^2/R mod m\"; x != r\n function montSqrTo(x,r) { x.squareTo(r); this.reduce(r); }\n\n // r = \"xy/R mod m\"; x,y != r\n function montMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }\n\n Montgomery.prototype.convert = montConvert;\n Montgomery.prototype.revert = montRevert;\n Montgomery.prototype.reduce = montReduce;\n Montgomery.prototype.mulTo = montMulTo;\n Montgomery.prototype.sqrTo = montSqrTo;\n\n // (protected) true iff this is even\n function bnpIsEven() { return ((this.t>0)?(this[0]&1):this.s) == 0; }\n\n // (protected) this^e, e < 2^32, doing sqr and mul with \"r\" (HAC 14.79)\n function bnpExp(e,z) {\n if(e > 0xffffffff || e < 1) return BigInteger.ONE;\n var r = nbi(), r2 = nbi(), g = z.convert(this), i = nbits(e)-1;\n g.copyTo(r);\n while(--i >= 0) {\n z.sqrTo(r,r2);\n if((e&(1< 0) z.mulTo(r2,g,r);\n else { var t = r; r = r2; r2 = t; }\n }\n return z.revert(r);\n }\n\n // (public) this^e % m, 0 <= e < 2^32\n function bnModPowInt(e,m) {\n var z;\n if(e < 256 || m.isEven()) z = new Classic(m); else z = new Montgomery(m);\n return this.exp(e,z);\n }\n\n // protected\n BigInteger.prototype.copyTo = bnpCopyTo;\n BigInteger.prototype.fromInt = bnpFromInt;\n BigInteger.prototype.fromString = bnpFromString;\n BigInteger.prototype.clamp = bnpClamp;\n BigInteger.prototype.dlShiftTo = bnpDLShiftTo;\n BigInteger.prototype.drShiftTo = bnpDRShiftTo;\n BigInteger.prototype.lShiftTo = bnpLShiftTo;\n BigInteger.prototype.rShiftTo = bnpRShiftTo;\n BigInteger.prototype.subTo = bnpSubTo;\n BigInteger.prototype.multiplyTo = bnpMultiplyTo;\n BigInteger.prototype.squareTo = bnpSquareTo;\n BigInteger.prototype.divRemTo = bnpDivRemTo;\n BigInteger.prototype.invDigit = bnpInvDigit;\n BigInteger.prototype.isEven = bnpIsEven;\n BigInteger.prototype.exp = bnpExp;\n\n // public\n BigInteger.prototype.toString = bnToString;\n BigInteger.prototype.negate = bnNegate;\n BigInteger.prototype.abs = bnAbs;\n BigInteger.prototype.compareTo = bnCompareTo;\n BigInteger.prototype.bitLength = bnBitLength;\n BigInteger.prototype.mod = bnMod;\n BigInteger.prototype.modPowInt = bnModPowInt;\n\n // \"constants\"\n BigInteger.ZERO = nbv(0);\n BigInteger.ONE = nbv(1);\n\n // Copyright (c) 2005-2009 Tom Wu\n // All Rights Reserved.\n // See \"LICENSE\" for details.\n\n // Extended JavaScript BN functions, required for RSA private ops.\n\n // Version 1.1: new BigInteger(\"0\", 10) returns \"proper\" zero\n // Version 1.2: square() API, isProbablePrime fix\n\n // (public)\n function bnClone() { var r = nbi(); this.copyTo(r); return r; }\n\n // (public) return value as integer\n function bnIntValue() {\n if(this.s < 0) {\n if(this.t == 1) return this[0]-this.DV;\n else if(this.t == 0) return -1;\n }\n else if(this.t == 1) return this[0];\n else if(this.t == 0) return 0;\n // assumes 16 < DB < 32\n return ((this[1]&((1<<(32-this.DB))-1))<>24; }\n\n // (public) return value as short (assumes DB>=16)\n function bnShortValue() { return (this.t==0)?this.s:(this[0]<<16)>>16; }\n\n // (protected) return x s.t. r^x < DV\n function bnpChunkSize(r) { return Math.floor(Math.LN2*this.DB/Math.log(r)); }\n\n // (public) 0 if this == 0, 1 if this > 0\n function bnSigNum() {\n if(this.s < 0) return -1;\n else if(this.t <= 0 || (this.t == 1 && this[0] <= 0)) return 0;\n else return 1;\n }\n\n // (protected) convert to radix string\n function bnpToRadix(b) {\n if(b == null) b = 10;\n if(this.signum() == 0 || b < 2 || b > 36) return \"0\";\n var cs = this.chunkSize(b);\n var a = Math.pow(b,cs);\n var d = nbv(a), y = nbi(), z = nbi(), r = \"\";\n this.divRemTo(d,y,z);\n while(y.signum() > 0) {\n r = (a+z.intValue()).toString(b).substr(1) + r;\n y.divRemTo(d,y,z);\n }\n return z.intValue().toString(b) + r;\n }\n\n // (protected) convert from radix string\n function bnpFromRadix(s,b) {\n this.fromInt(0);\n if(b == null) b = 10;\n var cs = this.chunkSize(b);\n var d = Math.pow(b,cs), mi = false, j = 0, w = 0;\n for(var i = 0; i < s.length; ++i) {\n var x = intAt(s,i);\n if(x < 0) {\n if(s.charAt(i) == \"-\" && this.signum() == 0) mi = true;\n continue;\n }\n w = b*w+x;\n if(++j >= cs) {\n this.dMultiply(d);\n this.dAddOffset(w,0);\n j = 0;\n w = 0;\n }\n }\n if(j > 0) {\n this.dMultiply(Math.pow(b,j));\n this.dAddOffset(w,0);\n }\n if(mi) BigInteger.ZERO.subTo(this,this);\n }\n\n // (protected) alternate constructor\n function bnpFromNumber(a,b,c) {\n if(\"number\" == typeof b) {\n // new BigInteger(int,int,RNG)\n if(a < 2) this.fromInt(1);\n else {\n this.fromNumber(a,c);\n if(!this.testBit(a-1)) // force MSB set\n this.bitwiseTo(BigInteger.ONE.shiftLeft(a-1),op_or,this);\n if(this.isEven()) this.dAddOffset(1,0); // force odd\n while(!this.isProbablePrime(b)) {\n this.dAddOffset(2,0);\n if(this.bitLength() > a) this.subTo(BigInteger.ONE.shiftLeft(a-1),this);\n }\n }\n }\n else {\n // new BigInteger(int,RNG)\n var x = new Array(), t = a&7;\n x.length = (a>>3)+1;\n b.nextBytes(x);\n if(t > 0) x[0] &= ((1< 0) {\n if(p < this.DB && (d = this[i]>>p) != (this.s&this.DM)>>p)\n r[k++] = d|(this.s<<(this.DB-p));\n while(i >= 0) {\n if(p < 8) {\n d = (this[i]&((1<>(p+=this.DB-8);\n }\n else {\n d = (this[i]>>(p-=8))&0xff;\n if(p <= 0) { p += this.DB; --i; }\n }\n if((d&0x80) != 0) d |= -256;\n if(k == 0 && (this.s&0x80) != (d&0x80)) ++k;\n if(k > 0 || d != this.s) r[k++] = d;\n }\n }\n return r;\n }\n\n function bnEquals(a) { return(this.compareTo(a)==0); }\n function bnMin(a) { return(this.compareTo(a)<0)?this:a; }\n function bnMax(a) { return(this.compareTo(a)>0)?this:a; }\n\n // (protected) r = this op a (bitwise)\n function bnpBitwiseTo(a,op,r) {\n var i, f, m = Math.min(a.t,this.t);\n for(i = 0; i < m; ++i) r[i] = op(this[i],a[i]);\n if(a.t < this.t) {\n f = a.s&this.DM;\n for(i = m; i < this.t; ++i) r[i] = op(this[i],f);\n r.t = this.t;\n }\n else {\n f = this.s&this.DM;\n for(i = m; i < a.t; ++i) r[i] = op(f,a[i]);\n r.t = a.t;\n }\n r.s = op(this.s,a.s);\n r.clamp();\n }\n\n // (public) this & a\n function op_and(x,y) { return x&y; }\n function bnAnd(a) { var r = nbi(); this.bitwiseTo(a,op_and,r); return r; }\n\n // (public) this | a\n function op_or(x,y) { return x|y; }\n function bnOr(a) { var r = nbi(); this.bitwiseTo(a,op_or,r); return r; }\n\n // (public) this ^ a\n function op_xor(x,y) { return x^y; }\n function bnXor(a) { var r = nbi(); this.bitwiseTo(a,op_xor,r); return r; }\n\n // (public) this & ~a\n function op_andnot(x,y) { return x&~y; }\n function bnAndNot(a) { var r = nbi(); this.bitwiseTo(a,op_andnot,r); return r; }\n\n // (public) ~this\n function bnNot() {\n var r = nbi();\n for(var i = 0; i < this.t; ++i) r[i] = this.DM&~this[i];\n r.t = this.t;\n r.s = ~this.s;\n return r;\n }\n\n // (public) this << n\n function bnShiftLeft(n) {\n var r = nbi();\n if(n < 0) this.rShiftTo(-n,r); else this.lShiftTo(n,r);\n return r;\n }\n\n // (public) this >> n\n function bnShiftRight(n) {\n var r = nbi();\n if(n < 0) this.lShiftTo(-n,r); else this.rShiftTo(n,r);\n return r;\n }\n\n // return index of lowest 1-bit in x, x < 2^31\n function lbit(x) {\n if(x == 0) return -1;\n var r = 0;\n if((x&0xffff) == 0) { x >>= 16; r += 16; }\n if((x&0xff) == 0) { x >>= 8; r += 8; }\n if((x&0xf) == 0) { x >>= 4; r += 4; }\n if((x&3) == 0) { x >>= 2; r += 2; }\n if((x&1) == 0) ++r;\n return r;\n }\n\n // (public) returns index of lowest 1-bit (or -1 if none)\n function bnGetLowestSetBit() {\n for(var i = 0; i < this.t; ++i)\n if(this[i] != 0) return i*this.DB+lbit(this[i]);\n if(this.s < 0) return this.t*this.DB;\n return -1;\n }\n\n // return number of 1 bits in x\n function cbit(x) {\n var r = 0;\n while(x != 0) { x &= x-1; ++r; }\n return r;\n }\n\n // (public) return number of set bits\n function bnBitCount() {\n var r = 0, x = this.s&this.DM;\n for(var i = 0; i < this.t; ++i) r += cbit(this[i]^x);\n return r;\n }\n\n // (public) true iff nth bit is set\n function bnTestBit(n) {\n var j = Math.floor(n/this.DB);\n if(j >= this.t) return(this.s!=0);\n return((this[j]&(1<<(n%this.DB)))!=0);\n }\n\n // (protected) this op (1<>= this.DB;\n }\n if(a.t < this.t) {\n c += a.s;\n while(i < this.t) {\n c += this[i];\n r[i++] = c&this.DM;\n c >>= this.DB;\n }\n c += this.s;\n }\n else {\n c += this.s;\n while(i < a.t) {\n c += a[i];\n r[i++] = c&this.DM;\n c >>= this.DB;\n }\n c += a.s;\n }\n r.s = (c<0)?-1:0;\n if(c > 0) r[i++] = c;\n else if(c < -1) r[i++] = this.DV+c;\n r.t = i;\n r.clamp();\n }\n\n // (public) this + a\n function bnAdd(a) { var r = nbi(); this.addTo(a,r); return r; }\n\n // (public) this - a\n function bnSubtract(a) { var r = nbi(); this.subTo(a,r); return r; }\n\n // (public) this * a\n function bnMultiply(a) { var r = nbi(); this.multiplyTo(a,r); return r; }\n\n // (public) this^2\n function bnSquare() { var r = nbi(); this.squareTo(r); return r; }\n\n // (public) this / a\n function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }\n\n // (public) this % a\n function bnRemainder(a) { var r = nbi(); this.divRemTo(a,null,r); return r; }\n\n // (public) [this/a,this%a]\n function bnDivideAndRemainder(a) {\n var q = nbi(), r = nbi();\n this.divRemTo(a,q,r);\n return new Array(q,r);\n }\n\n // (protected) this *= n, this >= 0, 1 < n < DV\n function bnpDMultiply(n) {\n this[this.t] = this.am(0,n-1,this,0,0,this.t);\n ++this.t;\n this.clamp();\n }\n\n // (protected) this += n << w words, this >= 0\n function bnpDAddOffset(n,w) {\n if(n == 0) return;\n while(this.t <= w) this[this.t++] = 0;\n this[w] += n;\n while(this[w] >= this.DV) {\n this[w] -= this.DV;\n if(++w >= this.t) this[this.t++] = 0;\n ++this[w];\n }\n }\n\n // A \"null\" reducer\n function NullExp() {}\n function nNop(x) { return x; }\n function nMulTo(x,y,r) { x.multiplyTo(y,r); }\n function nSqrTo(x,r) { x.squareTo(r); }\n\n NullExp.prototype.convert = nNop;\n NullExp.prototype.revert = nNop;\n NullExp.prototype.mulTo = nMulTo;\n NullExp.prototype.sqrTo = nSqrTo;\n\n // (public) this^e\n function bnPow(e) { return this.exp(e,new NullExp()); }\n\n // (protected) r = lower n words of \"this * a\", a.t <= n\n // \"this\" should be the larger one if appropriate.\n function bnpMultiplyLowerTo(a,n,r) {\n var i = Math.min(this.t+a.t,n);\n r.s = 0; // assumes a,this >= 0\n r.t = i;\n while(i > 0) r[--i] = 0;\n var j;\n for(j = r.t-this.t; i < j; ++i) r[i+this.t] = this.am(0,a[i],r,i,0,this.t);\n for(j = Math.min(a.t,n); i < j; ++i) this.am(0,a[i],r,i,0,n-i);\n r.clamp();\n }\n\n // (protected) r = \"this * a\" without lower n words, n > 0\n // \"this\" should be the larger one if appropriate.\n function bnpMultiplyUpperTo(a,n,r) {\n --n;\n var i = r.t = this.t+a.t-n;\n r.s = 0; // assumes a,this >= 0\n while(--i >= 0) r[i] = 0;\n for(i = Math.max(n-this.t,0); i < a.t; ++i)\n r[this.t+i-n] = this.am(n-i,a[i],r,0,0,this.t+i-n);\n r.clamp();\n r.drShiftTo(1,r);\n }\n\n // Barrett modular reduction\n function Barrett(m) {\n // setup Barrett\n this.r2 = nbi();\n this.q3 = nbi();\n BigInteger.ONE.dlShiftTo(2*m.t,this.r2);\n this.mu = this.r2.divide(m);\n this.m = m;\n }\n\n function barrettConvert(x) {\n if(x.s < 0 || x.t > 2*this.m.t) return x.mod(this.m);\n else if(x.compareTo(this.m) < 0) return x;\n else { var r = nbi(); x.copyTo(r); this.reduce(r); return r; }\n }\n\n function barrettRevert(x) { return x; }\n\n // x = x mod m (HAC 14.42)\n function barrettReduce(x) {\n x.drShiftTo(this.m.t-1,this.r2);\n if(x.t > this.m.t+1) { x.t = this.m.t+1; x.clamp(); }\n this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);\n this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);\n while(x.compareTo(this.r2) < 0) x.dAddOffset(1,this.m.t+1);\n x.subTo(this.r2,x);\n while(x.compareTo(this.m) >= 0) x.subTo(this.m,x);\n }\n\n // r = x^2 mod m; x != r\n function barrettSqrTo(x,r) { x.squareTo(r); this.reduce(r); }\n\n // r = x*y mod m; x,y != r\n function barrettMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }\n\n Barrett.prototype.convert = barrettConvert;\n Barrett.prototype.revert = barrettRevert;\n Barrett.prototype.reduce = barrettReduce;\n Barrett.prototype.mulTo = barrettMulTo;\n Barrett.prototype.sqrTo = barrettSqrTo;\n\n // (public) this^e % m (HAC 14.85)\n function bnModPow(e,m) {\n var i = e.bitLength(), k, r = nbv(1), z;\n if(i <= 0) return r;\n else if(i < 18) k = 1;\n else if(i < 48) k = 3;\n else if(i < 144) k = 4;\n else if(i < 768) k = 5;\n else k = 6;\n if(i < 8)\n z = new Classic(m);\n else if(m.isEven())\n z = new Barrett(m);\n else\n z = new Montgomery(m);\n\n // precomputation\n var g = new Array(), n = 3, k1 = k-1, km = (1< 1) {\n var g2 = nbi();\n z.sqrTo(g[1],g2);\n while(n <= km) {\n g[n] = nbi();\n z.mulTo(g2,g[n-2],g[n]);\n n += 2;\n }\n }\n\n var j = e.t-1, w, is1 = true, r2 = nbi(), t;\n i = nbits(e[j])-1;\n while(j >= 0) {\n if(i >= k1) w = (e[j]>>(i-k1))&km;\n else {\n w = (e[j]&((1<<(i+1))-1))<<(k1-i);\n if(j > 0) w |= e[j-1]>>(this.DB+i-k1);\n }\n\n n = k;\n while((w&1) == 0) { w >>= 1; --n; }\n if((i -= n) < 0) { i += this.DB; --j; }\n if(is1) { // ret == 1, don't bother squaring or multiplying it\n g[w].copyTo(r);\n is1 = false;\n }\n else {\n while(n > 1) { z.sqrTo(r,r2); z.sqrTo(r2,r); n -= 2; }\n if(n > 0) z.sqrTo(r,r2); else { t = r; r = r2; r2 = t; }\n z.mulTo(r2,g[w],r);\n }\n\n while(j >= 0 && (e[j]&(1< 0) {\n x.rShiftTo(g,x);\n y.rShiftTo(g,y);\n }\n while(x.signum() > 0) {\n if((i = x.getLowestSetBit()) > 0) x.rShiftTo(i,x);\n if((i = y.getLowestSetBit()) > 0) y.rShiftTo(i,y);\n if(x.compareTo(y) >= 0) {\n x.subTo(y,x);\n x.rShiftTo(1,x);\n }\n else {\n y.subTo(x,y);\n y.rShiftTo(1,y);\n }\n }\n if(g > 0) y.lShiftTo(g,y);\n return y;\n }\n\n // (protected) this % n, n < 2^26\n function bnpModInt(n) {\n if(n <= 0) return 0;\n var d = this.DV%n, r = (this.s<0)?n-1:0;\n if(this.t > 0)\n if(d == 0) r = this[0]%n;\n else for(var i = this.t-1; i >= 0; --i) r = (d*r+this[i])%n;\n return r;\n }\n\n // (public) 1/this % m (HAC 14.61)\n function bnModInverse(m) {\n var ac = m.isEven();\n if((this.isEven() && ac) || m.signum() == 0) return BigInteger.ZERO;\n var u = m.clone(), v = this.clone();\n var a = nbv(1), b = nbv(0), c = nbv(0), d = nbv(1);\n while(u.signum() != 0) {\n while(u.isEven()) {\n u.rShiftTo(1,u);\n if(ac) {\n if(!a.isEven() || !b.isEven()) { a.addTo(this,a); b.subTo(m,b); }\n a.rShiftTo(1,a);\n }\n else if(!b.isEven()) b.subTo(m,b);\n b.rShiftTo(1,b);\n }\n while(v.isEven()) {\n v.rShiftTo(1,v);\n if(ac) {\n if(!c.isEven() || !d.isEven()) { c.addTo(this,c); d.subTo(m,d); }\n c.rShiftTo(1,c);\n }\n else if(!d.isEven()) d.subTo(m,d);\n d.rShiftTo(1,d);\n }\n if(u.compareTo(v) >= 0) {\n u.subTo(v,u);\n if(ac) a.subTo(c,a);\n b.subTo(d,b);\n }\n else {\n v.subTo(u,v);\n if(ac) c.subTo(a,c);\n d.subTo(b,d);\n }\n }\n if(v.compareTo(BigInteger.ONE) != 0) return BigInteger.ZERO;\n if(d.compareTo(m) >= 0) return d.subtract(m);\n if(d.signum() < 0) d.addTo(m,d); else return d;\n if(d.signum() < 0) return d.add(m); else return d;\n }\n\n var lowprimes = [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997];\n var lplim = (1<<26)/lowprimes[lowprimes.length-1];\n\n // (public) test primality with certainty >= 1-.5^t\n function bnIsProbablePrime(t) {\n var i, x = this.abs();\n if(x.t == 1 && x[0] <= lowprimes[lowprimes.length-1]) {\n for(i = 0; i < lowprimes.length; ++i)\n if(x[0] == lowprimes[i]) return true;\n return false;\n }\n if(x.isEven()) return false;\n i = 1;\n while(i < lowprimes.length) {\n var m = lowprimes[i], j = i+1;\n while(j < lowprimes.length && m < lplim) m *= lowprimes[j++];\n m = x.modInt(m);\n while(i < j) if(m%lowprimes[i++] == 0) return false;\n }\n return x.millerRabin(t);\n }\n\n // (protected) true if probably prime (HAC 4.24, Miller-Rabin)\n function bnpMillerRabin(t) {\n var n1 = this.subtract(BigInteger.ONE);\n var k = n1.getLowestSetBit();\n if(k <= 0) return false;\n var r = n1.shiftRight(k);\n t = (t+1)>>1;\n if(t > lowprimes.length) t = lowprimes.length;\n var a = nbi();\n for(var i = 0; i < t; ++i) {\n //Pick bases at random, instead of starting at 2\n a.fromInt(lowprimes[Math.floor(Math.random()*lowprimes.length)]);\n var y = a.modPow(r,this);\n if(y.compareTo(BigInteger.ONE) != 0 && y.compareTo(n1) != 0) {\n var j = 1;\n while(j++ < k && y.compareTo(n1) != 0) {\n y = y.modPowInt(2,this);\n if(y.compareTo(BigInteger.ONE) == 0) return false;\n }\n if(y.compareTo(n1) != 0) return false;\n }\n }\n return true;\n }\n\n // protected\n BigInteger.prototype.chunkSize = bnpChunkSize;\n BigInteger.prototype.toRadix = bnpToRadix;\n BigInteger.prototype.fromRadix = bnpFromRadix;\n BigInteger.prototype.fromNumber = bnpFromNumber;\n BigInteger.prototype.bitwiseTo = bnpBitwiseTo;\n BigInteger.prototype.changeBit = bnpChangeBit;\n BigInteger.prototype.addTo = bnpAddTo;\n BigInteger.prototype.dMultiply = bnpDMultiply;\n BigInteger.prototype.dAddOffset = bnpDAddOffset;\n BigInteger.prototype.multiplyLowerTo = bnpMultiplyLowerTo;\n BigInteger.prototype.multiplyUpperTo = bnpMultiplyUpperTo;\n BigInteger.prototype.modInt = bnpModInt;\n BigInteger.prototype.millerRabin = bnpMillerRabin;\n\n // public\n BigInteger.prototype.clone = bnClone;\n BigInteger.prototype.intValue = bnIntValue;\n BigInteger.prototype.byteValue = bnByteValue;\n BigInteger.prototype.shortValue = bnShortValue;\n BigInteger.prototype.signum = bnSigNum;\n BigInteger.prototype.toByteArray = bnToByteArray;\n BigInteger.prototype.equals = bnEquals;\n BigInteger.prototype.min = bnMin;\n BigInteger.prototype.max = bnMax;\n BigInteger.prototype.and = bnAnd;\n BigInteger.prototype.or = bnOr;\n BigInteger.prototype.xor = bnXor;\n BigInteger.prototype.andNot = bnAndNot;\n BigInteger.prototype.not = bnNot;\n BigInteger.prototype.shiftLeft = bnShiftLeft;\n BigInteger.prototype.shiftRight = bnShiftRight;\n BigInteger.prototype.getLowestSetBit = bnGetLowestSetBit;\n BigInteger.prototype.bitCount = bnBitCount;\n BigInteger.prototype.testBit = bnTestBit;\n BigInteger.prototype.setBit = bnSetBit;\n BigInteger.prototype.clearBit = bnClearBit;\n BigInteger.prototype.flipBit = bnFlipBit;\n BigInteger.prototype.add = bnAdd;\n BigInteger.prototype.subtract = bnSubtract;\n BigInteger.prototype.multiply = bnMultiply;\n BigInteger.prototype.divide = bnDivide;\n BigInteger.prototype.remainder = bnRemainder;\n BigInteger.prototype.divideAndRemainder = bnDivideAndRemainder;\n BigInteger.prototype.modPow = bnModPow;\n BigInteger.prototype.modInverse = bnModInverse;\n BigInteger.prototype.pow = bnPow;\n BigInteger.prototype.gcd = bnGCD;\n BigInteger.prototype.isProbablePrime = bnIsProbablePrime;\n\n // JSBN-specific extension\n BigInteger.prototype.square = bnSquare;\n\n // Expose the Barrett function\n BigInteger.prototype.Barrett = Barrett\n\n // BigInteger interfaces not implemented in jsbn:\n\n // BigInteger(int signum, byte[] magnitude)\n // double doubleValue()\n // float floatValue()\n // int hashCode()\n // long longValue()\n // static BigInteger valueOf(long val)\n\n // Random number generator - requires a PRNG backend, e.g. prng4.js\n\n // For best results, put code like\n // \n // in your main HTML document.\n\n var rng_state;\n var rng_pool;\n var rng_pptr;\n\n // Mix in a 32-bit integer into the pool\n function rng_seed_int(x) {\n rng_pool[rng_pptr++] ^= x & 255;\n rng_pool[rng_pptr++] ^= (x >> 8) & 255;\n rng_pool[rng_pptr++] ^= (x >> 16) & 255;\n rng_pool[rng_pptr++] ^= (x >> 24) & 255;\n if(rng_pptr >= rng_psize) rng_pptr -= rng_psize;\n }\n\n // Mix in the current time (w/milliseconds) into the pool\n function rng_seed_time() {\n rng_seed_int(new Date().getTime());\n }\n\n // Initialize the pool with junk if needed.\n if(rng_pool == null) {\n rng_pool = new Array();\n rng_pptr = 0;\n var t;\n if(typeof window !== \"undefined\" && window.crypto) {\n if (window.crypto.getRandomValues) {\n // Use webcrypto if available\n var ua = new Uint8Array(32);\n window.crypto.getRandomValues(ua);\n for(t = 0; t < 32; ++t)\n rng_pool[rng_pptr++] = ua[t];\n }\n else if(navigator.appName == \"Netscape\" && navigator.appVersion < \"5\") {\n // Extract entropy (256 bits) from NS4 RNG if available\n var z = window.crypto.random(32);\n for(t = 0; t < z.length; ++t)\n rng_pool[rng_pptr++] = z.charCodeAt(t) & 255;\n }\n }\n while(rng_pptr < rng_psize) { // extract some randomness from Math.random()\n t = Math.floor(65536 * Math.random());\n rng_pool[rng_pptr++] = t >>> 8;\n rng_pool[rng_pptr++] = t & 255;\n }\n rng_pptr = 0;\n rng_seed_time();\n //rng_seed_int(window.screenX);\n //rng_seed_int(window.screenY);\n }\n\n function rng_get_byte() {\n if(rng_state == null) {\n rng_seed_time();\n rng_state = prng_newstate();\n rng_state.init(rng_pool);\n for(rng_pptr = 0; rng_pptr < rng_pool.length; ++rng_pptr)\n rng_pool[rng_pptr] = 0;\n rng_pptr = 0;\n //rng_pool = null;\n }\n // TODO: allow reseeding after first request\n return rng_state.next();\n }\n\n function rng_get_bytes(ba) {\n var i;\n for(i = 0; i < ba.length; ++i) ba[i] = rng_get_byte();\n }\n\n function SecureRandom() {}\n\n SecureRandom.prototype.nextBytes = rng_get_bytes;\n\n // prng4.js - uses Arcfour as a PRNG\n\n function Arcfour() {\n this.i = 0;\n this.j = 0;\n this.S = new Array();\n }\n\n // Initialize arcfour context from key, an array of ints, each from [0..255]\n function ARC4init(key) {\n var i, j, t;\n for(i = 0; i < 256; ++i)\n this.S[i] = i;\n j = 0;\n for(i = 0; i < 256; ++i) {\n j = (j + this.S[i] + key[i % key.length]) & 255;\n t = this.S[i];\n this.S[i] = this.S[j];\n this.S[j] = t;\n }\n this.i = 0;\n this.j = 0;\n }\n\n function ARC4next() {\n var t;\n this.i = (this.i + 1) & 255;\n this.j = (this.j + this.S[this.i]) & 255;\n t = this.S[this.i];\n this.S[this.i] = this.S[this.j];\n this.S[this.j] = t;\n return this.S[(t + this.S[this.i]) & 255];\n }\n\n Arcfour.prototype.init = ARC4init;\n Arcfour.prototype.next = ARC4next;\n\n // Plug in your RNG constructor here\n function prng_newstate() {\n return new Arcfour();\n }\n\n // Pool size must be a multiple of 4 and greater than 32.\n // An array of bytes the size of the pool will be passed to init()\n var rng_psize = 256;\n\n if (typeof exports !== 'undefined') {\n exports = module.exports = {\n default: BigInteger,\n BigInteger: BigInteger,\n SecureRandom: SecureRandom,\n };\n } else {\n this.jsbn = {\n BigInteger: BigInteger,\n SecureRandom: SecureRandom\n };\n }\n\n}).call(this);\n" - }, - { - "id": 6, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\networkerFactory.ts", - "name": "./src/lib/mtproto/networkerFactory.ts", - "index": 8, - "index2": 25, - "size": 698, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "issuerId": 19, - "issuerName": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - } - ], - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 19, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "module": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "moduleName": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "type": "cjs require", - "userRequest": "./networkerFactory", - "loc": "21:43-72" - }, - { - "moduleId": 21, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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('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": 7, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\tl_utils.ts", - "name": "./src/lib/mtproto/tl_utils.ts", - "index": 10, - "index2": 13, - "size": 25294, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\authorizer.ts", - "issuerId": 30, - "issuerName": "./src/lib/mtproto/authorizer.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiManager.ts", - "name": "./src/lib/mtproto/apiManager.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - }, - { - "id": 30, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\authorizer.ts", - "name": "./src/lib/mtproto/authorizer.ts", - "profile": { - "factory": 1707, - "building": 782, - "dependencies": 1 - } - } - ], - "profile": { - "factory": 790, - "building": 652, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 21, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 30, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 31, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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 \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\"\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\"\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": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\dcConfigurator.ts", - "name": "./src/lib/mtproto/dcConfigurator.ts", - "index": 23, - "index2": 23, - "size": 3537, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/mtproto/apiManager.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiManager.ts", - "name": "./src/lib/mtproto/apiManager.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - } - ], - "profile": { - "factory": 1707, - "building": 782, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 21, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 30, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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, transportType = 'websocket') {\r\n const servers = upload && (transportType != 'websocket' || mtproto_config_1.Modes.multipleConnections)\r\n ? this.chosenUploadServers[transportType]\r\n : this.chosenServers[transportType];\r\n if (!(dcID in servers)) {\r\n servers[dcID] = [];\r\n }\r\n const transports = servers[dcID];\r\n if (!transports.length || (upload && transports.length < 1)) {\r\n let transport;\r\n if (transportType == 'websocket') {\r\n const subdomain = this.sslSubdomains[dcID - 1];\r\n const path = mtproto_config_1.Modes.test ? 'apiws_test' : 'apiws';\r\n const chosenServer = 'wss://' + subdomain + '.web.telegram.org/' + path;\r\n transport = new websocket_1.default(dcID, chosenServer);\r\n }\r\n else if (mtproto_config_1.Modes.ssl || !mtproto_config_1.Modes.http || transportType == 'https') {\r\n const subdomain = this.sslSubdomains[dcID - 1] + (upload ? '-1' : '');\r\n const path = mtproto_config_1.Modes.test ? 'apiw_test1' : 'apiw1';\r\n const chosenServer = 'https://' + subdomain + '.web.telegram.org/' + path;\r\n transport = new http_1.default(dcID, chosenServer);\r\n }\r\n else {\r\n for (let dcOption of this.dcOptions) {\r\n if (dcOption.id == dcID) {\r\n const chosenServer = 'http://' + dcOption.host + (dcOption.port != 80 ? ':' + dcOption.port : '') + '/apiw1';\r\n transport = new http_1.default(dcID, chosenServer);\r\n break;\r\n }\r\n }\r\n }\r\n if (!transport) {\r\n console.error('No chosenServer!', dcID);\r\n return null;\r\n }\r\n transports.push(transport);\r\n return transport;\r\n }\r\n return transports[0];\r\n }\r\n}\r\nexports.DcConfigurator = DcConfigurator;\r\nexports.default = new DcConfigurator();\r\n" - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\transports\\http.ts", - "name": "./src/lib/mtproto/transports/http.ts", - "index": 27, - "index2": 22, - "size": 1204, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/mtproto/apiManager.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiManager.ts", - "name": "./src/lib/mtproto/apiManager.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - } - ], - "profile": { - "factory": 1707, - "building": 782, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 8, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 21, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiManager.ts", - "name": "./src/lib/mtproto/apiManager.ts", - "index": 4, - "index2": 29, - "size": 15242, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "issuerId": 19, - "issuerName": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - } - ], - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 19, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "module": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "moduleName": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "type": "cjs require", - "userRequest": "./apiManager", - "loc": "18:37-60" - }, - { - "moduleId": 32, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiFileManager.ts", - "module": "./src/lib/mtproto/apiFileManager.ts", - "moduleName": "./src/lib/mtproto/apiFileManager.ts", - "type": "cjs require", - "userRequest": "./apiManager", - "loc": "19: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 logger_1 = require(\"../logger\");\r\n///////////////////////\r\n//////////////////////////////////////\r\n///////////////////////////////////////////////\r\n//////////\r\n//console.error('apiManager included!');\r\n// TODO: если запрос словил флуд, нужно сохранять его параметры и возвращать тот же промис на новый такой же запрос, например - загрузка истории\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 = logger_1.logger('API');\r\n /* AppStorage.get('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 const upload = (options.fileUpload || options.fileDownload)\r\n && (dcConfigurator_1.default.chooseServer(dcID, true) instanceof http_1.default || mtproto_config_1.Modes.multipleConnections);\r\n const 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 const getKey = dcID + '-' + +upload;\r\n if (this.gettingNetworkers[getKey]) {\r\n return this.gettingNetworkers[getKey];\r\n }\r\n const ak = 'dc' + dcID + '_auth_key';\r\n const akID = 'dc' + dcID + '_auth_keyID';\r\n const ss = 'dc' + dcID + '_server_salt';\r\n return this.gettingNetworkers[getKey] = storage_1.default.get([ak, akID, ss])\r\n .then(([authKeyHex, authKeyIDHex, serverSaltHex]) => __awaiter(this, void 0, void 0, function* () {\r\n /* if(authKeyHex && !authKeyIDHex && serverSaltHex) {\r\n this.log.warn('Updating to new version (+akID)');\r\n await AppStorage.remove(ak, akID, ss);\r\n authKeyHex = serverSaltHex = '';\r\n } */\r\n let networker;\r\n if (authKeyHex && authKeyHex.length == 512) {\r\n if (!serverSaltHex || serverSaltHex.length != 16) {\r\n serverSaltHex = 'AAAAAAAAAAAAAAAA';\r\n }\r\n const authKey = bin_utils_1.bytesFromHex(authKeyHex);\r\n const authKeyID = new Uint8Array(bin_utils_1.bytesFromHex(authKeyIDHex));\r\n const serverSalt = bin_utils_1.bytesFromHex(serverSaltHex);\r\n networker = networkerFactory_1.default.getNetworker(dcID, authKey, authKeyID, serverSalt, options);\r\n }\r\n else {\r\n try { // if no saved state\r\n const auth = yield authorizer_1.default.auth(dcID);\r\n const 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 networker = 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 delete this.gettingNetworkers[getKey];\r\n throw error;\r\n }\r\n }\r\n delete this.gettingNetworkers[getKey];\r\n return cache[dcID] = networker;\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 /* (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}\r\nexports.ApiManager = ApiManager;\r\nexports.default = new ApiManager();\r\n" - }, - { - "id": 11, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\helpers\\context.ts", - "name": "./src/helpers/context.ts", - "index": 7, - "index2": 4, - "size": 1471, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\storage.ts", - "issuerId": 3, - "issuerName": "./src/lib/storage.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 3, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\storage.ts", - "name": "./src/lib/storage.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - } - ], - "profile": { - "factory": 17, - "building": 19 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 3, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\storage.ts", - "module": "./src/lib/storage.ts", - "moduleName": "./src/lib/storage.ts", - "type": "cjs require", - "userRequest": "../helpers/context", - "loc": "4:18-47" - }, - { - "moduleId": 32, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiFileManager.ts", - "module": "./src/lib/mtproto/apiFileManager.ts", - "moduleName": "./src/lib/mtproto/apiFileManager.ts", - "type": "cjs require", - "userRequest": "../../helpers/context", - "loc": "23:18-50" - } - ], - "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.notifyAll = exports.notifySomeone = exports.isWorker = exports.isServiceWorker = exports.isWebWorker = void 0;\r\nexports.isWebWorker = typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope;\r\nexports.isServiceWorker = typeof ServiceWorkerGlobalScope !== 'undefined' && self instanceof ServiceWorkerGlobalScope;\r\nexports.isWorker = exports.isWebWorker || exports.isServiceWorker;\r\n// в SW может быть сразу две переменных TRUE, поэтому проверяю по последней\r\nconst notifyServiceWorker = (all, ...args) => {\r\n self\r\n .clients\r\n .matchAll({ includeUncontrolled: false, type: 'window' })\r\n .then((listeners) => {\r\n if (!listeners.length) {\r\n //console.trace('no listeners?', self, listeners);\r\n return;\r\n }\r\n listeners.slice(all ? 0 : -1).forEach(listener => {\r\n // @ts-ignore\r\n listener.postMessage(...args);\r\n });\r\n });\r\n};\r\nconst notifyWorker = (...args) => {\r\n // @ts-ignore\r\n self.postMessage(...args);\r\n};\r\nconst empty = () => { };\r\nexports.notifySomeone = exports.isServiceWorker ? notifyServiceWorker.bind(null, false) : (exports.isWebWorker ? notifyWorker : empty);\r\nexports.notifyAll = exports.isServiceWorker ? notifyServiceWorker.bind(null, true) : (exports.isWebWorker ? notifyWorker : empty);\r\n" - }, - { - "id": 12, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\schema.ts", - "name": "./src/lib/mtproto/schema.ts", - "index": 11, - "index2": 6, - "size": 259059, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\networker.ts", - "issuerId": 21, - "issuerName": "./src/lib/mtproto/networker.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 6, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\networkerFactory.ts", - "name": "./src/lib/mtproto/networkerFactory.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - }, - { - "id": 21, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\networker.ts", - "name": "./src/lib/mtproto/networker.ts", - "profile": { - "factory": 1509, - "building": 662, - "dependencies": 242 - } - } - ], - "profile": { - "factory": 243, - "building": 931 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 7, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 21, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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\" }], \"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\" }], \"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\" }], \"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\" }], \"type\": \"MsgResendReq\" }, { \"id\": 2249243371, \"predicate\": \"msg_resend_ans_req\", \"params\": [{ \"name\": \"msg_ids\", \"type\": \"Vector\" }], \"type\": \"MsgResendReq\" }, { \"id\": 3664378706, \"predicate\": \"msgs_state_req\", \"params\": [{ \"name\": \"msg_ids\", \"type\": \"Vector\" }], \"type\": \"MsgsStateReq\" }, { \"id\": \"81704317\", \"predicate\": \"msgs_state_info\", \"params\": [{ \"name\": \"req_msg_id\", \"type\": \"long\" }, { \"name\": \"info\", \"type\": \"bytes\" }], \"type\": \"MsgsStateInfo\" }, { \"id\": 2361446705, \"predicate\": \"msgs_all_info\", \"params\": [{ \"name\": \"msg_ids\", \"type\": \"Vector\" }, { \"name\": \"info\", \"type\": \"bytes\" }], \"type\": \"MsgsAllInfo\" }, { \"id\": \"661470918\", \"predicate\": \"msg_detailed_info\", \"params\": [{ \"name\": \"msg_id\", \"type\": \"long\" }, { \"name\": \"answer_msg_id\", \"type\": \"long\" }, { \"name\": \"bytes\", \"type\": \"int\" }, { \"name\": \"status\", \"type\": \"int\" }], \"type\": \"MsgDetailedInfo\" }, { \"id\": 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\" }, { \"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\" }, { \"name\": \"stickers\", \"type\": \"flags.0?Vector\" }, { \"name\": \"ttl_seconds\", \"type\": \"flags.1?int\" }], \"type\": \"InputMedia\" }, { \"id\": 598418386, \"predicate\": \"inputMediaDocument\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"id\", \"type\": \"InputDocument\" }, { \"name\": \"ttl_seconds\", \"type\": \"flags.0?int\" }], \"type\": \"InputMedia\" }, { \"id\": 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\" }, { \"name\": \"solution\", \"type\": \"flags.1?string\" }, { \"name\": \"solution_entities\", \"type\": \"flags.1?Vector\" }], \"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\" }, { \"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\" }, { \"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\" }, { \"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\" }, { \"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\" }, { \"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\" }, { \"name\": \"views\", \"type\": \"flags.10?int\" }, { \"name\": \"edit_date\", \"type\": \"flags.15?int\" }, { \"name\": \"post_author\", \"type\": \"flags.16?string\" }, { \"name\": \"grouped_id\", \"type\": \"flags.17?long\" }, { \"name\": \"restriction_reason\", \"type\": \"flags.22?Vector\" }], \"type\": \"Message\" }, { \"id\": 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\" }], \"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\" }], \"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\" }, { \"name\": \"credentials\", \"type\": \"SecureCredentialsEncrypted\" }], \"type\": \"MessageAction\" }, { \"id\": 3646710100, \"predicate\": \"messageActionSecureValuesSent\", \"params\": [{ \"name\": \"types\", \"type\": \"Vector\" }], \"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\" }, { \"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\" }, { \"name\": \"saved_count\", \"type\": \"int\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"type\": \"contacts.Contacts\" }, { \"id\": 2010127419, \"predicate\": \"contacts.importedContacts\", \"params\": [{ \"name\": \"imported\", \"type\": \"Vector\" }, { \"name\": \"popular_invites\", \"type\": \"Vector\" }, { \"name\": \"retry_contacts\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"type\": \"contacts.ImportedContacts\" }, { \"id\": 471043349, \"predicate\": \"contacts.blocked\", \"params\": [{ \"name\": \"blocked\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"type\": \"contacts.Blocked\" }, { \"id\": 2416444065, \"predicate\": \"contacts.blockedSlice\", \"params\": [{ \"name\": \"count\", \"type\": \"int\" }, { \"name\": \"blocked\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"type\": \"contacts.Blocked\" }, { \"id\": 364538944, \"predicate\": \"messages.dialogs\", \"params\": [{ \"name\": \"dialogs\", \"type\": \"Vector\" }, { \"name\": \"messages\", \"type\": \"Vector\" }, { \"name\": \"chats\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"type\": \"messages.Dialogs\" }, { \"id\": 1910543603, \"predicate\": \"messages.dialogsSlice\", \"params\": [{ \"name\": \"count\", \"type\": \"int\" }, { \"name\": \"dialogs\", \"type\": \"Vector\" }, { \"name\": \"messages\", \"type\": \"Vector\" }, { \"name\": \"chats\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"type\": \"messages.Dialogs\" }, { \"id\": 4041467286, \"predicate\": \"messages.dialogsNotModified\", \"params\": [{ \"name\": \"count\", \"type\": \"int\" }], \"type\": \"messages.Dialogs\" }, { \"id\": 2356252295, \"predicate\": \"messages.messages\", \"params\": [{ \"name\": \"messages\", \"type\": \"Vector\" }, { \"name\": \"chats\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"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\" }, { \"name\": \"chats\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"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\" }, { \"name\": \"chats\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"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\" }], \"type\": \"messages.Chats\" }, { \"id\": 2631405892, \"predicate\": \"messages.chatsSlice\", \"params\": [{ \"name\": \"count\", \"type\": \"int\" }, { \"name\": \"chats\", \"type\": \"Vector\" }], \"type\": \"messages.Chats\" }, { \"id\": 3856126364, \"predicate\": \"messages.chatFull\", \"params\": [{ \"name\": \"full_chat\", \"type\": \"ChatFull\" }, { \"name\": \"chats\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"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\" }, { \"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\" }], \"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\" }], \"type\": \"Update\" }, { \"id\": 3996854058, \"predicate\": \"updatePrivacy\", \"params\": [{ \"name\": \"key\", \"type\": \"PrivacyKey\" }, { \"name\": \"rules\", \"type\": \"Vector\" }], \"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\" }, { \"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\" }, { \"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\" }], \"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\" }], \"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\" }], \"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\" }, { \"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\" }], \"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\" }], \"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\" }], \"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\" }], \"type\": \"Update\" }, { \"id\": 889491791, \"predicate\": \"updateDialogFilters\", \"params\": [], \"type\": \"Update\" }, { \"id\": 643940105, \"predicate\": \"updatePhoneCallSignalingData\", \"params\": [{ \"name\": \"phone_call_id\", \"type\": \"long\" }, { \"name\": \"data\", \"type\": \"bytes\" }], \"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\" }, { \"name\": \"new_encrypted_messages\", \"type\": \"Vector\" }, { \"name\": \"other_updates\", \"type\": \"Vector\" }, { \"name\": \"chats\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }, { \"name\": \"state\", \"type\": \"updates.State\" }], \"type\": \"updates.Difference\" }, { \"id\": 2835028353, \"predicate\": \"updates.differenceSlice\", \"params\": [{ \"name\": \"new_messages\", \"type\": \"Vector\" }, { \"name\": \"new_encrypted_messages\", \"type\": \"Vector\" }, { \"name\": \"other_updates\", \"type\": \"Vector\" }, { \"name\": \"chats\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }, { \"name\": \"intermediate_state\", \"type\": \"updates.State\" }], \"type\": \"updates.Difference\" }, { \"id\": 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\" }], \"type\": \"Updates\" }, { \"id\": 377562760, \"predicate\": \"updateShortChatMessage\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"out\", \"type\": \"flags.1?true\" }, { \"name\": \"mentioned\", \"type\": \"flags.4?true\" }, { \"name\": \"media_unread\", \"type\": \"flags.5?true\" }, { \"name\": \"silent\", \"type\": \"flags.13?true\" }, { \"name\": \"id\", \"type\": \"int\" }, { \"name\": \"from_id\", \"type\": \"int\" }, { \"name\": \"chat_id\", \"type\": \"int\" }, { \"name\": \"message\", \"type\": \"string\" }, { \"name\": \"pts\", \"type\": \"int\" }, { \"name\": \"pts_count\", \"type\": \"int\" }, { \"name\": \"date\", \"type\": \"int\" }, { \"name\": \"fwd_from\", \"type\": \"flags.2?MessageFwdHeader\" }, { \"name\": \"via_bot_id\", \"type\": \"flags.11?int\" }, { \"name\": \"reply_to_msg_id\", \"type\": \"flags.3?int\" }, { \"name\": \"entities\", \"type\": \"flags.7?Vector\" }], \"type\": \"Updates\" }, { \"id\": 2027216577, \"predicate\": \"updateShort\", \"params\": [{ \"name\": \"update\", \"type\": \"Update\" }, { \"name\": \"date\", \"type\": \"int\" }], \"type\": \"Updates\" }, { \"id\": 1918567619, \"predicate\": \"updatesCombined\", \"params\": [{ \"name\": \"updates\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }, { \"name\": \"chats\", \"type\": \"Vector\" }, { \"name\": \"date\", \"type\": \"int\" }, { \"name\": \"seq_start\", \"type\": \"int\" }, { \"name\": \"seq\", \"type\": \"int\" }], \"type\": \"Updates\" }, { \"id\": 1957577280, \"predicate\": \"updates\", \"params\": [{ \"name\": \"updates\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }, { \"name\": \"chats\", \"type\": \"Vector\" }, { \"name\": \"date\", \"type\": \"int\" }, { \"name\": \"seq\", \"type\": \"int\" }], \"type\": \"Updates\" }, { \"id\": 301019932, \"predicate\": \"updateShortSentMessage\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"out\", \"type\": \"flags.1?true\" }, { \"name\": \"id\", \"type\": \"int\" }, { \"name\": \"pts\", \"type\": \"int\" }, { \"name\": \"pts_count\", \"type\": \"int\" }, { \"name\": \"date\", \"type\": \"int\" }, { \"name\": \"media\", \"type\": \"flags.9?MessageMedia\" }, { \"name\": \"entities\", \"type\": \"flags.7?Vector\" }], \"type\": \"Updates\" }, { \"id\": 2378853029, \"predicate\": \"photos.photos\", \"params\": [{ \"name\": \"photos\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"type\": \"photos.Photos\" }, { \"id\": 352657236, \"predicate\": \"photos.photosSlice\", \"params\": [{ \"name\": \"count\", \"type\": \"int\" }, { \"name\": \"photos\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"type\": \"photos.Photos\" }, { \"id\": 539045032, \"predicate\": \"photos.photo\", \"params\": [{ \"name\": \"photo\", \"type\": \"Photo\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"type\": \"photos.Photo\" }, { \"id\": 157948117, \"predicate\": \"upload.file\", \"params\": [{ \"name\": \"type\", \"type\": \"storage.FileType\" }, { \"name\": \"mtime\", \"type\": \"int\" }, { \"name\": \"bytes\", \"type\": \"bytes\" }], \"type\": \"upload.File\" }, { \"id\": 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\" }], \"type\": \"upload.File\" }, { \"id\": 414687501, \"predicate\": \"dcOption\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"ipv6\", \"type\": \"flags.0?true\" }, { \"name\": \"media_only\", \"type\": \"flags.1?true\" }, { \"name\": \"tcpo_only\", \"type\": \"flags.2?true\" }, { \"name\": \"cdn\", \"type\": \"flags.3?true\" }, { \"name\": \"static\", \"type\": \"flags.4?true\" }, { \"name\": \"id\", \"type\": \"int\" }, { \"name\": \"ip_address\", \"type\": \"string\" }, { \"name\": \"port\", \"type\": \"int\" }, { \"name\": \"secret\", \"type\": \"flags.10?bytes\" }], \"type\": \"DcOption\" }, { \"id\": 856375399, \"predicate\": \"config\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"phonecalls_enabled\", \"type\": \"flags.1?true\" }, { \"name\": \"default_p2p_contacts\", \"type\": \"flags.3?true\" }, { \"name\": \"preload_featured_stickers\", \"type\": \"flags.4?true\" }, { \"name\": \"ignore_phone_entities\", \"type\": \"flags.5?true\" }, { \"name\": \"revoke_pm_inbox\", \"type\": \"flags.6?true\" }, { \"name\": \"blocked_mode\", \"type\": \"flags.8?true\" }, { \"name\": \"pfs_enabled\", \"type\": \"flags.13?true\" }, { \"name\": \"date\", \"type\": \"int\" }, { \"name\": \"expires\", \"type\": \"int\" }, { \"name\": \"test_mode\", \"type\": \"Bool\" }, { \"name\": \"this_dc\", \"type\": \"int\" }, { \"name\": \"dc_options\", \"type\": \"Vector\" }, { \"name\": \"dc_txt_domain_name\", \"type\": \"string\" }, { \"name\": \"chat_size_max\", \"type\": \"int\" }, { \"name\": \"megagroup_size_max\", \"type\": \"int\" }, { \"name\": \"forwarded_count_max\", \"type\": \"int\" }, { \"name\": \"online_update_period_ms\", \"type\": \"int\" }, { \"name\": \"offline_blur_timeout_ms\", \"type\": \"int\" }, { \"name\": \"offline_idle_timeout_ms\", \"type\": \"int\" }, { \"name\": \"online_cloud_timeout_ms\", \"type\": \"int\" }, { \"name\": \"notify_cloud_delay_ms\", \"type\": \"int\" }, { \"name\": \"notify_default_delay_ms\", \"type\": \"int\" }, { \"name\": \"push_chat_period_ms\", \"type\": \"int\" }, { \"name\": \"push_chat_limit\", \"type\": \"int\" }, { \"name\": \"saved_gifs_limit\", \"type\": \"int\" }, { \"name\": \"edit_time_limit\", \"type\": \"int\" }, { \"name\": \"revoke_time_limit\", \"type\": \"int\" }, { \"name\": \"revoke_pm_time_limit\", \"type\": \"int\" }, { \"name\": \"rating_e_decay\", \"type\": \"int\" }, { \"name\": \"stickers_recent_limit\", \"type\": \"int\" }, { \"name\": \"stickers_faved_limit\", \"type\": \"int\" }, { \"name\": \"channels_read_media_period\", \"type\": \"int\" }, { \"name\": \"tmp_sessions\", \"type\": \"flags.0?int\" }, { \"name\": \"pinned_dialogs_count_max\", \"type\": \"int\" }, { \"name\": \"pinned_infolder_count_max\", \"type\": \"int\" }, { \"name\": \"call_receive_timeout_ms\", \"type\": \"int\" }, { \"name\": \"call_ring_timeout_ms\", \"type\": \"int\" }, { \"name\": \"call_connect_timeout_ms\", \"type\": \"int\" }, { \"name\": \"call_packet_timeout_ms\", \"type\": \"int\" }, { \"name\": \"me_url_prefix\", \"type\": \"string\" }, { \"name\": \"autoupdate_url_prefix\", \"type\": \"flags.7?string\" }, { \"name\": \"gif_search_username\", \"type\": \"flags.9?string\" }, { \"name\": \"venue_search_username\", \"type\": \"flags.10?string\" }, { \"name\": \"img_search_username\", \"type\": \"flags.11?string\" }, { \"name\": \"static_maps_provider\", \"type\": \"flags.12?string\" }, { \"name\": \"caption_length_max\", \"type\": \"int\" }, { \"name\": \"message_length_max\", \"type\": \"int\" }, { \"name\": \"webfile_dc_id\", \"type\": \"int\" }, { \"name\": \"suggested_lang_code\", \"type\": \"flags.2?string\" }, { \"name\": \"lang_pack_version\", \"type\": \"flags.2?int\" }, { \"name\": \"base_lang_pack_version\", \"type\": \"flags.2?int\" }], \"type\": \"Config\" }, { \"id\": 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\" }, { \"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\": 512177195, \"predicate\": \"document\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"id\", \"type\": \"long\" }, { \"name\": \"access_hash\", \"type\": \"long\" }, { \"name\": \"file_reference\", \"type\": \"bytes\" }, { \"name\": \"date\", \"type\": \"int\" }, { \"name\": \"mime_type\", \"type\": \"string\" }, { \"name\": \"size\", \"type\": \"int\" }, { \"name\": \"thumbs\", \"type\": \"flags.0?Vector\" }, { \"name\": \"video_thumbs\", \"type\": \"flags.1?Vector\" }, { \"name\": \"dc_id\", \"type\": \"int\" }, { \"name\": \"attributes\", \"type\": \"Vector\" }], \"type\": \"Document\" }, { \"id\": 398898678, \"predicate\": \"help.support\", \"params\": [{ \"name\": \"phone_number\", \"type\": \"string\" }, { \"name\": \"user\", \"type\": \"User\" }], \"type\": \"help.Support\" }, { \"id\": 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\" }, { \"name\": \"results\", \"type\": \"Vector\" }, { \"name\": \"chats\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"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\" }], \"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\" }], \"type\": \"InputPrivacyRule\" }, { \"id\": 1283572154, \"predicate\": \"inputPrivacyValueAllowChatParticipants\", \"params\": [{ \"name\": \"chats\", \"type\": \"Vector\" }], \"type\": \"InputPrivacyRule\" }, { \"id\": 3626197935, \"predicate\": \"inputPrivacyValueDisallowChatParticipants\", \"params\": [{ \"name\": \"chats\", \"type\": \"Vector\" }], \"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\" }], \"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\" }], \"type\": \"PrivacyRule\" }, { \"id\": 415136107, \"predicate\": \"privacyValueAllowChatParticipants\", \"params\": [{ \"name\": \"chats\", \"type\": \"Vector\" }], \"type\": \"PrivacyRule\" }, { \"id\": 2897086096, \"predicate\": \"privacyValueDisallowChatParticipants\", \"params\": [{ \"name\": \"chats\", \"type\": \"Vector\" }], \"type\": \"PrivacyRule\" }, { \"id\": 1352683077, \"predicate\": \"account.privacyRules\", \"params\": [{ \"name\": \"rules\", \"type\": \"Vector\" }, { \"name\": \"chats\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"type\": \"account.PrivacyRules\" }, { \"id\": 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\" }], \"type\": \"messages.Stickers\" }, { \"id\": 313694676, \"predicate\": \"stickerPack\", \"params\": [{ \"name\": \"emoticon\", \"type\": \"string\" }, { \"name\": \"documents\", \"type\": \"Vector\" }], \"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\" }], \"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\" }], \"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\" }], \"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\" }], \"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\" }, { \"name\": \"documents\", \"type\": \"Vector\" }], \"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\" }], \"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\" }], \"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\" }], \"type\": \"ReplyMarkup\" }, { \"id\": 1218642516, \"predicate\": \"replyInlineMarkup\", \"params\": [{ \"name\": \"rows\", \"type\": \"Vector\" }], \"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\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"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\" }, { \"name\": \"chats\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"type\": \"updates.ChannelDifference\" }, { \"id\": 543450958, \"predicate\": \"updates.channelDifference\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"final\", \"type\": \"flags.0?true\" }, { \"name\": \"pts\", \"type\": \"int\" }, { \"name\": \"timeout\", \"type\": \"flags.1?int\" }, { \"name\": \"new_messages\", \"type\": \"Vector\" }, { \"name\": \"other_updates\", \"type\": \"Vector\" }, { \"name\": \"chats\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"type\": \"updates.ChannelDifference\" }, { \"id\": 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\" }], \"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\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"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\" }], \"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\" }, { \"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\" }], \"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\" }], \"type\": \"messages.SavedGifs\" }, { \"id\": 864077702, \"predicate\": \"inputBotInlineMessageMediaAuto\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"message\", \"type\": \"string\" }, { \"name\": \"entities\", \"type\": \"flags.1?Vector\" }, { \"name\": \"reply_markup\", \"type\": \"flags.2?ReplyMarkup\" }], \"type\": \"InputBotInlineMessage\" }, { \"id\": 1036876423, \"predicate\": \"inputBotInlineMessageText\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"no_webpage\", \"type\": \"flags.0?true\" }, { \"name\": \"message\", \"type\": \"string\" }, { \"name\": \"entities\", \"type\": \"flags.1?Vector\" }, { \"name\": \"reply_markup\", \"type\": \"flags.2?ReplyMarkup\" }], \"type\": \"InputBotInlineMessage\" }, { \"id\": 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\" }, { \"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\" }, { \"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\" }, { \"name\": \"cache_time\", \"type\": \"int\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"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\" }, { \"name\": \"messages\", \"type\": \"Vector\" }, { \"name\": \"chats\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }, { \"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\" }], \"type\": \"TopPeerCategoryPeers\" }, { \"id\": 3727060725, \"predicate\": \"contacts.topPeersNotModified\", \"params\": [], \"type\": \"contacts.TopPeers\" }, { \"id\": 1891070632, \"predicate\": \"contacts.topPeers\", \"params\": [{ \"name\": \"categories\", \"type\": \"Vector\" }, { \"name\": \"chats\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"type\": \"contacts.TopPeers\" }, { \"id\": 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\" }, { \"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\" }, { \"name\": \"unread\", \"type\": \"Vector\" }], \"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\" }, { \"name\": \"stickers\", \"type\": \"Vector\" }, { \"name\": \"dates\", \"type\": \"Vector\" }], \"type\": \"messages.RecentStickers\" }, { \"id\": 1338747336, \"predicate\": \"messages.archivedStickers\", \"params\": [{ \"name\": \"count\", \"type\": \"int\" }, { \"name\": \"sets\", \"type\": \"Vector\" }], \"type\": \"messages.ArchivedStickers\" }, { \"id\": 946083368, \"predicate\": \"messages.stickerSetInstallResultSuccess\", \"params\": [], \"type\": \"messages.StickerSetInstallResult\" }, { \"id\": 904138920, \"predicate\": \"messages.stickerSetInstallResultArchive\", \"params\": [{ \"name\": \"sets\", \"type\": \"Vector\" }], \"type\": \"messages.StickerSetInstallResult\" }, { \"id\": 1678812626, \"predicate\": \"stickerSetCovered\", \"params\": [{ \"name\": \"set\", \"type\": \"StickerSet\" }, { \"name\": \"cover\", \"type\": \"Document\" }], \"type\": \"StickerSetCovered\" }, { \"id\": 872932635, \"predicate\": \"stickerSetMultiCovered\", \"params\": [{ \"name\": \"set\", \"type\": \"StickerSet\" }, { \"name\": \"covers\", \"type\": \"Vector\" }], \"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\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"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\" }], \"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\" }], \"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\" }, { \"name\": \"caption\", \"type\": \"PageCaption\" }], \"type\": \"PageBlock\" }, { \"id\": 1705048653, \"predicate\": \"pageBlockCollage\", \"params\": [{ \"name\": \"items\", \"type\": \"Vector\" }, { \"name\": \"caption\", \"type\": \"PageCaption\" }], \"type\": \"PageBlock\" }, { \"id\": 52401552, \"predicate\": \"pageBlockSlideshow\", \"params\": [{ \"name\": \"items\", \"type\": \"Vector\" }, { \"name\": \"caption\", \"type\": \"PageCaption\" }], \"type\": \"PageBlock\" }, { \"id\": 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\" }], \"type\": \"PageBlock\" }, { \"id\": 2592793057, \"predicate\": \"pageBlockOrderedList\", \"params\": [{ \"name\": \"items\", \"type\": \"Vector\" }], \"type\": \"PageBlock\" }, { \"id\": 1987480557, \"predicate\": \"pageBlockDetails\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"open\", \"type\": \"flags.0?true\" }, { \"name\": \"blocks\", \"type\": \"Vector\" }, { \"name\": \"title\", \"type\": \"RichText\" }], \"type\": \"PageBlock\" }, { \"id\": 370236054, \"predicate\": \"pageBlockRelatedArticles\", \"params\": [{ \"name\": \"title\", \"type\": \"RichText\" }, { \"name\": \"articles\", \"type\": \"Vector\" }], \"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\" }], \"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\" }], \"type\": \"WebDocument\" }, { \"id\": 4190682310, \"predicate\": \"webDocumentNoProxy\", \"params\": [{ \"name\": \"url\", \"type\": \"string\" }, { \"name\": \"size\", \"type\": \"int\" }, { \"name\": \"mime_type\", \"type\": \"string\" }, { \"name\": \"attributes\", \"type\": \"Vector\" }], \"type\": \"WebDocument\" }, { \"id\": 2616017741, \"predicate\": \"inputWebDocument\", \"params\": [{ \"name\": \"url\", \"type\": \"string\" }, { \"name\": \"size\", \"type\": \"int\" }, { \"name\": \"mime_type\", \"type\": \"string\" }, { \"name\": \"attributes\", \"type\": \"Vector\" }], \"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\" }], \"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\" }], \"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\" }], \"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\" }], \"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\" }, { \"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\" }], \"type\": \"PhoneCallProtocol\" }, { \"id\": 3968000320, \"predicate\": \"phone.phoneCall\", \"params\": [{ \"name\": \"phone_call\", \"type\": \"PhoneCall\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"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\" }], \"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\" }], \"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\" }, { \"name\": \"chats\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"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\" }, { \"name\": \"stickers\", \"type\": \"Vector\" }], \"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\" }, { \"name\": \"chats\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"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\" }], \"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\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"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\" }], \"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\" }, { \"name\": \"files\", \"type\": \"flags.4?Vector\" }, { \"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\" }, { \"name\": \"files\", \"type\": \"flags.4?Vector\" }, { \"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\" }, { \"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\" }, { \"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\" }, { \"name\": \"values\", \"type\": \"Vector\" }, { \"name\": \"errors\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }, { \"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\" }], \"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\" }], \"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\" }], \"type\": \"JSONValue\" }, { \"id\": 2579616925, \"predicate\": \"jsonObject\", \"params\": [{ \"name\": \"value\", \"type\": \"Vector\" }], \"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\" }], \"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\" }], \"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\" }], \"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\" }, { \"name\": \"photos\", \"type\": \"Vector\" }, { \"name\": \"documents\", \"type\": \"Vector\" }, { \"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\" }, { \"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\" }, { \"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\" }, { \"name\": \"total_voters\", \"type\": \"flags.2?int\" }, { \"name\": \"recent_voters\", \"type\": \"flags.3?Vector\" }, { \"name\": \"solution\", \"type\": \"flags.4?string\" }, { \"name\": \"solution_entities\", \"type\": \"flags.4?Vector\" }], \"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\" }], \"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\" }], \"type\": \"EmojiKeyword\" }, { \"id\": 594408994, \"predicate\": \"emojiKeywordDeleted\", \"params\": [{ \"name\": \"keyword\", \"type\": \"string\" }, { \"name\": \"emoticons\", \"type\": \"Vector\" }], \"type\": \"EmojiKeyword\" }, { \"id\": 1556570557, \"predicate\": \"emojiKeywordsDifference\", \"params\": [{ \"name\": \"lang_code\", \"type\": \"string\" }, { \"name\": \"from_version\", \"type\": \"int\" }, { \"name\": \"version\", \"type\": \"int\" }, { \"name\": \"keywords\", \"type\": \"Vector\" }], \"type\": \"EmojiKeywordsDifference\" }, { \"id\": 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\" }], \"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\" }, { \"name\": \"chats\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"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\" }, { \"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\" }, { \"name\": \"date\", \"type\": \"int\" }], \"type\": \"MessageUserVote\" }, { \"id\": 136574537, \"predicate\": \"messages.votesList\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"count\", \"type\": \"int\" }, { \"name\": \"votes\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }, { \"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\" }], \"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\" }, { \"name\": \"include_peers\", \"type\": \"Vector\" }, { \"name\": \"exclude_peers\", \"type\": \"Vector\" }], \"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\" }], \"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\" }, { \"name\": \"users\", \"type\": \"Vector\" }, { \"name\": \"psa_type\", \"type\": \"flags.1?string\" }, { \"name\": \"psa_message\", \"type\": \"flags.2?string\" }], \"type\": \"help.PromoData\" }, { \"id\": 1130084743, \"predicate\": \"videoSize\", \"params\": [{ \"name\": \"type\", \"type\": \"string\" }, { \"name\": \"location\", \"type\": \"FileLocation\" }, { \"name\": \"w\", \"type\": \"int\" }, { \"name\": \"h\", \"type\": \"int\" }, { \"name\": \"size\", \"type\": \"int\" }], \"type\": \"VideoSize\" }], \"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\" }, { \"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\" }], \"type\": \"Bool\" }, { \"id\": 2981369111, \"method\": \"auth.exportLoginToken\", \"params\": [{ \"name\": \"api_id\", \"type\": \"int\" }, { \"name\": \"api_hash\", \"type\": \"string\" }, { \"name\": \"except_ids\", \"type\": \"Vector\" }], \"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\" }], \"type\": \"Bool\" }, { \"id\": 813089983, \"method\": \"account.unregisterDevice\", \"params\": [{ \"name\": \"token_type\", \"type\": \"int\" }, { \"name\": \"token\", \"type\": \"string\" }, { \"name\": \"other_uids\", \"type\": \"Vector\" }], \"type\": \"Bool\" }, { \"id\": 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\" }], \"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\" }, { \"id\": 1936088002, \"method\": \"account.getSecureValue\", \"params\": [{ \"name\": \"types\", \"type\": \"Vector\" }], \"type\": \"Vector\" }, { \"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\" }], \"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\" }, { \"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\" }], \"type\": \"Vector\" }, { \"id\": 227648840, \"method\": \"users.getUsers\", \"params\": [{ \"name\": \"id\", \"type\": \"Vector\" }], \"type\": \"Vector\" }, { \"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\" }], \"type\": \"Bool\" }, { \"id\": 749357634, \"method\": \"contacts.getContactIDs\", \"params\": [{ \"name\": \"hash\", \"type\": \"int\" }], \"type\": \"Vector\" }, { \"id\": 3299038190, \"method\": \"contacts.getStatuses\", \"params\": [], \"type\": \"Vector\" }, { \"id\": 3223553183, \"method\": \"contacts.getContacts\", \"params\": [{ \"name\": \"hash\", \"type\": \"int\" }], \"type\": \"contacts.Contacts\" }, { \"id\": 746589157, \"method\": \"contacts.importContacts\", \"params\": [{ \"name\": \"contacts\", \"type\": \"Vector\" }], \"type\": \"contacts.ImportedContacts\" }, { \"id\": 157945344, \"method\": \"contacts.deleteContacts\", \"params\": [{ \"name\": \"id\", \"type\": \"Vector\" }], \"type\": \"Updates\" }, { \"id\": 269745566, \"method\": \"contacts.deleteByPhones\", \"params\": [{ \"name\": \"phones\", \"type\": \"Vector\" }], \"type\": \"Bool\" }, { \"id\": 858475004, \"method\": \"contacts.block\", \"params\": [{ \"name\": \"id\", \"type\": \"InputUser\" }], \"type\": \"Bool\" }, { \"id\": 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\" }, { \"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\" }], \"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\" }], \"type\": \"messages.AffectedMessages\" }, { \"id\": 94983360, \"method\": \"messages.receivedMessages\", \"params\": [{ \"name\": \"max_id\", \"type\": \"int\" }], \"type\": \"Vector\" }, { \"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\" }, { \"name\": \"schedule_date\", \"type\": \"flags.10?int\" }], \"type\": \"Updates\" }, { \"id\": 881978281, \"method\": \"messages.sendMedia\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"silent\", \"type\": \"flags.5?true\" }, { \"name\": \"background\", \"type\": \"flags.6?true\" }, { \"name\": \"clear_draft\", \"type\": \"flags.7?true\" }, { \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"reply_to_msg_id\", \"type\": \"flags.0?int\" }, { \"name\": \"media\", \"type\": \"InputMedia\" }, { \"name\": \"message\", \"type\": \"string\" }, { \"name\": \"random_id\", \"type\": \"long\" }, { \"name\": \"reply_markup\", \"type\": \"flags.2?ReplyMarkup\" }, { \"name\": \"entities\", \"type\": \"flags.3?Vector\" }, { \"name\": \"schedule_date\", \"type\": \"flags.10?int\" }], \"type\": \"Updates\" }, { \"id\": 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\" }, { \"name\": \"random_id\", \"type\": \"Vector\" }, { \"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\" }, { \"name\": \"reason\", \"type\": \"ReportReason\" }], \"type\": \"Bool\" }, { \"id\": 1013621127, \"method\": \"messages.getChats\", \"params\": [{ \"name\": \"id\", \"type\": \"Vector\" }], \"type\": \"messages.Chats\" }, { \"id\": 998448230, \"method\": \"messages.getFullChat\", \"params\": [{ \"name\": \"chat_id\", \"type\": \"int\" }], \"type\": \"messages.ChatFull\" }, { \"id\": 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\" }, { \"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\" }, { \"id\": 1259113487, \"method\": \"messages.reportEncryptedSpam\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputEncryptedChat\" }], \"type\": \"Bool\" }, { \"id\": 916930423, \"method\": \"messages.readMessageContents\", \"params\": [{ \"name\": \"id\", \"type\": \"Vector\" }], \"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\" }], \"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\" }, { \"name\": \"increment\", \"type\": \"Bool\" }], \"type\": \"Vector\" }, { \"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\" }], \"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\" }, { \"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\" }, { \"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\" }], \"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\" }], \"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\" }], \"type\": \"Bool\" }, { \"id\": 1782549861, \"method\": \"messages.getAllDrafts\", \"params\": [], \"type\": \"Updates\" }, { \"id\": 766298703, \"method\": \"messages.getFeaturedStickers\", \"params\": [{ \"name\": \"hash\", \"type\": \"int\" }], \"type\": \"messages.FeaturedStickers\" }, { \"id\": 1527873830, \"method\": \"messages.readFeaturedStickers\", \"params\": [{ \"name\": \"id\", \"type\": \"Vector\" }], \"type\": \"Bool\" }, { \"id\": 1587647177, \"method\": \"messages.getRecentStickers\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"attached\", \"type\": \"flags.0?true\" }, { \"name\": \"hash\", \"type\": \"int\" }], \"type\": \"messages.RecentStickers\" }, { \"id\": 958863608, \"method\": \"messages.saveRecentSticker\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"attached\", \"type\": \"flags.0?true\" }, { \"name\": \"id\", \"type\": \"InputDocument\" }, { \"name\": \"unsave\", \"type\": \"Bool\" }], \"type\": \"Bool\" }, { \"id\": 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\" }, { \"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\" }], \"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\" }], \"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\" }], \"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\" }, { \"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\" }, { \"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\" }, { \"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\" }], \"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\" }], \"type\": \"Vector\" }, { \"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\" }], \"type\": \"Vector\" }, { \"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\" }], \"type\": \"messages.Messages\" }, { \"id\": 3174597898, \"method\": \"messages.sendScheduledMessages\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"id\", \"type\": \"Vector\" }], \"type\": \"Updates\" }, { \"id\": 1504586518, \"method\": \"messages.deleteScheduledMessages\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"id\", \"type\": \"Vector\" }], \"type\": \"Updates\" }, { \"id\": 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\" }], \"type\": \"Bool\" }, { \"id\": 4053719405, \"method\": \"messages.getDialogFilters\", \"params\": [], \"type\": \"Vector\" }, { \"id\": 2728186924, \"method\": \"messages.getSuggestedDialogFilters\", \"params\": [], \"type\": \"Vector\" }, { \"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\" }], \"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\" }], \"type\": \"Vector\" }, { \"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\" }, { \"id\": 1302676017, \"method\": \"upload.getCdnFileHashes\", \"params\": [{ \"name\": \"file_token\", \"type\": \"bytes\" }, { \"name\": \"offset\", \"type\": \"int\" }], \"type\": \"Vector\" }, { \"id\": 3338819889, \"method\": \"upload.getFileHashes\", \"params\": [{ \"name\": \"location\", \"type\": \"InputFileLocation\" }, { \"name\": \"offset\", \"type\": \"int\" }], \"type\": \"Vector\" }, { \"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\" }], \"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\" }], \"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\" }], \"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\" }], \"type\": \"Bool\" }, { \"id\": 2911672867, \"method\": \"channels.getMessages\", \"params\": [{ \"name\": \"channel\", \"type\": \"InputChannel\" }, { \"name\": \"id\", \"type\": \"Vector\" }], \"type\": \"messages.Messages\" }, { \"id\": 306054633, \"method\": \"channels.getParticipants\", \"params\": [{ \"name\": \"channel\", \"type\": \"InputChannel\" }, { \"name\": \"filter\", \"type\": \"ChannelParticipantsFilter\" }, { \"name\": \"offset\", \"type\": \"int\" }, { \"name\": \"limit\", \"type\": \"int\" }, { \"name\": \"hash\", \"type\": \"int\" }], \"type\": \"channels.ChannelParticipants\" }, { \"id\": 1416484774, \"method\": \"channels.getParticipant\", \"params\": [{ \"name\": \"channel\", \"type\": \"InputChannel\" }, { \"name\": \"user_id\", \"type\": \"InputUser\" }], \"type\": \"channels.ChannelParticipant\" }, { \"id\": 176122811, \"method\": \"channels.getChannels\", \"params\": [{ \"name\": \"id\", \"type\": \"Vector\" }], \"type\": \"messages.Chats\" }, { \"id\": 141781513, \"method\": \"channels.getFullChannel\", \"params\": [{ \"name\": \"channel\", \"type\": \"InputChannel\" }], \"type\": \"messages.ChatFull\" }, { \"id\": 1029681423, \"method\": \"channels.createChannel\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"broadcast\", \"type\": \"flags.0?true\" }, { \"name\": \"megagroup\", \"type\": \"flags.1?true\" }, { \"name\": \"title\", \"type\": \"string\" }, { \"name\": \"about\", \"type\": \"string\" }, { \"name\": \"geo_point\", \"type\": \"flags.2?InputGeoPoint\" }, { \"name\": \"address\", \"type\": \"flags.2?string\" }], \"type\": \"Updates\" }, { \"id\": 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\" }], \"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\" }, { \"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\" }], \"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\" }], \"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\" }], \"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\": 4286223235, \"method\": \"phone.sendSignalingData\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPhoneCall\" }, { \"name\": \"data\", \"type\": \"bytes\" }], \"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\" }], \"type\": \"Vector\" }, { \"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\" }, { \"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\" }], \"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\": 114 };\r\n" - }, - { - "id": 13, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\crypto_utils.ts", - "name": "./src/lib/crypto/crypto_utils.ts", - "index": 12, - "index2": 12, - "size": 9796, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\cryptoworker.ts", - "issuerId": 2, - "issuerName": "./src/lib/crypto/cryptoworker.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\cryptoworker.ts", - "name": "./src/lib/crypto/cryptoworker.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - } - ], - "profile": { - "factory": 1524, - "building": 711, - "dependencies": 1293 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 2, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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 leemon_1 = require(\"leemon\"); //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 = leemon_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 = typeof (bytes) === 'string' ? bytes : bin_utils_1.bytesToWordss(bytes);\r\n let hash = sha256_1.default(words);\r\n //console.log(dT(), 'SHA-256 hash finish', hash);\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(dT(), 'RSA encrypt start', publicKey, bytes);\r\n bytes = bin_utils_1.addPadding(bytes, 255);\r\n var N = leemon_1.str2bigInt(publicKey.modulus, 16);\r\n var E = leemon_1.str2bigInt(publicKey.exponent, 16);\r\n var X = leemon_1.str2bigInt(bin_utils_1.bytesToHex(bytes), 16);\r\n var encryptedBigInt = leemon_1.powMod(X, E, N);\r\n var encryptedBytes = bin_utils_1.bytesFromHex(leemon_1.bigInt2str(encryptedBigInt, 16));\r\n //console.log(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(dT(), 'PQ start', pqBytes, what.toString(16), what.bitLength())\r\n try {\r\n //console.time('PQ leemon');\r\n result = pqPrimeLeemon(leemon_1.str2bigInt(what.toString(16), 16, Math.ceil(64 / leemon_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(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 / leemon_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 leemon_1.copyInt_(x, bin_utils_1.nextRandomInt(1000000000) + 1);\r\n leemon_1.copy_(y, x);\r\n lim = 1 << (i + 18);\r\n for (j = 1; j < lim; j++) {\r\n ++it;\r\n leemon_1.copy_(a, x);\r\n leemon_1.copy_(b, x);\r\n leemon_1.copyInt_(c, q);\r\n while (!leemon_1.isZero(b)) {\r\n if (b[0] & 1) {\r\n leemon_1.add_(c, a);\r\n if (leemon_1.greater(c, what)) {\r\n leemon_1.sub_(c, what);\r\n }\r\n }\r\n leemon_1.add_(a, a);\r\n if (leemon_1.greater(a, what)) {\r\n leemon_1.sub_(a, what);\r\n }\r\n leemon_1.rightShift_(b, 1);\r\n }\r\n leemon_1.copy_(x, c);\r\n if (leemon_1.greater(x, y)) {\r\n leemon_1.copy_(z, x);\r\n leemon_1.sub_(z, y);\r\n }\r\n else {\r\n leemon_1.copy_(z, y);\r\n leemon_1.sub_(z, x);\r\n }\r\n leemon_1.eGCD_(z, what, g, a, b);\r\n if (!leemon_1.equalsInt(g, 1)) {\r\n break;\r\n }\r\n if ((j & (j - 1)) == 0) {\r\n leemon_1.copy_(y, x);\r\n }\r\n }\r\n if (leemon_1.greater(g, leemon_1.one)) {\r\n break;\r\n }\r\n }\r\n leemon_1.divide_(what, g, x, y);\r\n if (leemon_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 = leemon_1.str2bigInt(bin_utils_1.bytesToHex(x), 16);\r\n var yBigInt = leemon_1.str2bigInt(bin_utils_1.bytesToHex(y), 16);\r\n var mBigInt = leemon_1.str2bigInt(bin_utils_1.bytesToHex(m), 16);\r\n var resBigInt = leemon_1.powMod(xBigInt, yBigInt, mBigInt);\r\n return bin_utils_1.bytesFromHex(leemon_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": 14, - "identifier": "F:\\tweb\\node_modules\\@cryptography\\aes\\dist\\es\\aes.js", - "name": "./node_modules/@cryptography/aes/dist/es/aes.js", - "index": 15, - "index2": 9, - "size": 11143, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\crypto_utils.ts", - "issuerId": 13, - "issuerName": "./src/lib/crypto/crypto_utils.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\cryptoworker.ts", - "name": "./src/lib/crypto/cryptoworker.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - }, - { - "id": 13, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\crypto_utils.ts", - "name": "./src/lib/crypto/crypto_utils.ts", - "profile": { - "factory": 1524, - "building": 711, - "dependencies": 1293 - } - } - ], - "profile": { - "factory": 1827, - "building": 56 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 13, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 27, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 15, - "identifier": "F:\\tweb\\node_modules\\leemon\\es\\index.js", - "name": "./node_modules/leemon/es/index.js", - "index": 17, - "index2": 11, - "size": 57067, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\crypto_utils.ts", - "issuerId": 13, - "issuerName": "./src/lib/crypto/crypto_utils.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\cryptoworker.ts", - "name": "./src/lib/crypto/cryptoworker.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - }, - { - "id": 13, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\crypto_utils.ts", - "name": "./src/lib/crypto/crypto_utils.ts", - "profile": { - "factory": 1524, - "building": 711, - "dependencies": 1293 - } - } - ], - "profile": { - "factory": 1827, - "building": 56 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 13, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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", - "loc": "21:17-34" - }, - { - "moduleId": 26, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\srp.ts", - "module": "./src/lib/crypto/srp.ts", - "moduleName": "./src/lib/crypto/srp.ts", - "type": "cjs require", - "userRequest": "leemon", - "loc": "18:17-34" - } - ], - "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/crypto/srp.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=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. n64 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 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 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= 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< 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=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 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 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": 16, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\timeManager.ts", - "name": "./src/lib/mtproto/timeManager.ts", - "index": 22, - "index2": 18, - "size": 1900, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\authorizer.ts", - "issuerId": 30, - "issuerName": "./src/lib/mtproto/authorizer.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiManager.ts", - "name": "./src/lib/mtproto/apiManager.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - }, - { - "id": 30, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\authorizer.ts", - "name": "./src/lib/mtproto/authorizer.ts", - "profile": { - "factory": 1707, - "building": 782, - "dependencies": 1 - } - } - ], - "profile": { - "factory": 790, - "building": 652, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 21, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 30, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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(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": 17, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\transports\\transport.ts", - "name": "./src/lib/mtproto/transports/transport.ts", - "index": 25, - "index2": 19, - "size": 224, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\transports\\http.ts", - "issuerId": 9, - "issuerName": "./src/lib/mtproto/transports/http.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiManager.ts", - "name": "./src/lib/mtproto/apiManager.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\transports\\http.ts", - "name": "./src/lib/mtproto/transports/http.ts", - "profile": { - "factory": 1707, - "building": 782, - "dependencies": 1 - } - } - ], - "profile": { - "factory": 112, - "building": 937 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 9, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 27, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 18, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\filemanager.ts", - "name": "./src/lib/filemanager.ts", - "index": 33, - "index2": 30, - "size": 2616, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiFileManager.ts", - "issuerId": 32, - "issuerName": "./src/lib/mtproto/apiFileManager.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 32, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiFileManager.ts", - "name": "./src/lib/mtproto/apiFileManager.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - } - ], - "profile": { - "factory": 1392, - "building": 680, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 32, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiFileManager.ts", - "module": "./src/lib/mtproto/apiFileManager.ts", - "moduleName": "./src/lib/mtproto/apiFileManager.ts", - "type": "cjs require", - "userRequest": "../filemanager", - "loc": "18:38-63" - }, - { - "moduleId": 33, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\cacheStorage.ts", - "module": "./src/lib/cacheStorage.ts", - "moduleName": "./src/lib/cacheStorage.ts", - "type": "cjs require", - "userRequest": "./filemanager", - "loc": "16:38-62" - } - ], - "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\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.FileManager = void 0;\r\nconst bin_utils_1 = require(\"./bin_utils\");\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 write(fileWriter, bytes) {\r\n 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 return fileWriter.write(bytes);\r\n }\r\n }\r\n getFakeFileWriter(mimeType, saveFileCallback) {\r\n const blobParts = [];\r\n const fakeFileWriter = {\r\n write: (part) => __awaiter(this, void 0, void 0, function* () {\r\n if (!this.blobSupported) {\r\n throw false;\r\n }\r\n blobParts.push(part);\r\n }),\r\n truncate: () => {\r\n blobParts.length = 0;\r\n },\r\n finalize: (saveToStorage = true) => {\r\n const blob = bin_utils_1.blobConstruct(blobParts, mimeType);\r\n if (saveToStorage && saveFileCallback) {\r\n saveFileCallback(blob);\r\n }\r\n return blob;\r\n }\r\n };\r\n return fakeFileWriter;\r\n }\r\n}\r\nexports.FileManager = FileManager;\r\nexports.default = new FileManager();\r\n" - }, - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "index": 0, - "index2": 35, - "size": 5840, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": null, - "issuerId": null, - "issuerName": null, - "issuerPath": null, - "profile": { - "factory": 7, - "building": 1686 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": null, - "moduleIdentifier": null, - "module": null, - "moduleName": null, - "type": "single entry", - "userRequest": "!!F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "loc": "main" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 0, - "source": "\"use strict\";\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nvar __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// just to include\r\nconst polyfill_1 = require(\"../polyfill\");\r\npolyfill_1.secureRandom;\r\nconst apiManager_1 = __importDefault(require(\"./apiManager\"));\r\nconst storage_1 = __importDefault(require(\"../storage\"));\r\nconst cryptoworker_1 = __importDefault(require(\"../crypto/cryptoworker\"));\r\nconst networkerFactory_1 = __importDefault(require(\"./networkerFactory\"));\r\nconst apiFileManager_1 = __importDefault(require(\"./apiFileManager\"));\r\nconst logger_1 = require(\"../logger\");\r\nconst log = logger_1.logger('DW', logger_1.LogLevels.error);\r\nconst ctx = self;\r\n//console.error('INCLUDE !!!', new Error().stack);\r\n/* function isObject(object: any) {\r\n return typeof(object) === 'object' && object !== null;\r\n} */\r\n/* function fillTransfer(transfer: any, obj: any) {\r\n if(!obj) return;\r\n \r\n if(obj instanceof ArrayBuffer) {\r\n transfer.add(obj);\r\n } else if(obj.buffer && obj.buffer instanceof ArrayBuffer) {\r\n transfer.add(obj.buffer);\r\n } else if(isObject(obj)) {\r\n for(var i in obj) {\r\n fillTransfer(transfer, obj[i]);\r\n }\r\n } else if(Array.isArray(obj)) {\r\n obj.forEach(value => {\r\n fillTransfer(transfer, value);\r\n });\r\n }\r\n} */\r\nfunction respond(...args) {\r\n // отключил для всего потому что не успел пофиксить transfer detached\r\n //if(isSafari(self)/* || true */) {\r\n // @ts-ignore\r\n ctx.postMessage(...args);\r\n /* } else {\r\n var transfer = new Set();\r\n fillTransfer(transfer, arguments);\r\n \r\n //console.log('reply', transfer, [...transfer]);\r\n ctx.postMessage(...arguments, [...transfer]);\r\n //console.log('reply', transfer, [...transfer]);\r\n } */\r\n}\r\nnetworkerFactory_1.default.setUpdatesProcessor((obj, bool) => {\r\n respond({ update: { obj, bool } });\r\n});\r\nctx.addEventListener('message', (e) => __awaiter(void 0, void 0, void 0, function* () {\r\n try {\r\n const task = e.data;\r\n const taskID = task.taskID;\r\n log.debug('got message:', taskID, task);\r\n //debugger;\r\n if (task.useLs) {\r\n storage_1.default.finishTask(task.taskID, task.args);\r\n return;\r\n }\r\n else if (task.type == 'convertWebp') {\r\n const { fileName, bytes } = task.payload;\r\n const deferred = apiFileManager_1.default.webpConvertPromises[fileName];\r\n if (deferred) {\r\n deferred.resolve(bytes);\r\n delete apiFileManager_1.default.webpConvertPromises[fileName];\r\n }\r\n return;\r\n }\r\n else if (task.type == 'requestFilePart') {\r\n const task = e.data;\r\n const responseTask = {\r\n type: task.type,\r\n id: task.id,\r\n payload: null\r\n };\r\n try {\r\n const res = yield apiFileManager_1.default.requestFilePart(...task.payload);\r\n responseTask.payload = res;\r\n }\r\n catch (err) {\r\n }\r\n respond(responseTask);\r\n return;\r\n }\r\n switch (task.task) {\r\n case 'computeSRP':\r\n case 'gzipUncompress':\r\n // @ts-ignore\r\n return cryptoworker_1.default[task.task].apply(cryptoworker_1.default, task.args).then(result => {\r\n respond({ taskID: taskID, result: result });\r\n });\r\n case 'cancelDownload':\r\n case 'uploadFile':\r\n case 'downloadFile': {\r\n try {\r\n // @ts-ignore\r\n let result = apiFileManager_1.default[task.task].apply(apiFileManager_1.default, task.args);\r\n if (result instanceof Promise) {\r\n /* (result as ReturnType).notify = (progress: {done: number, total: number, offset: number}) => {\r\n notify({progress: {fileName, ...progress}});\r\n }; */\r\n result = yield result;\r\n }\r\n respond({ taskID: taskID, result: result });\r\n }\r\n catch (err) {\r\n respond({ taskID: taskID, error: err });\r\n }\r\n }\r\n default: {\r\n try {\r\n // @ts-ignore\r\n let result = apiManager_1.default[task.task].apply(apiManager_1.default, task.args);\r\n if (result instanceof Promise) {\r\n result = yield result;\r\n }\r\n respond({ taskID: taskID, result: result });\r\n }\r\n catch (err) {\r\n respond({ taskID: taskID, error: err });\r\n }\r\n //throw new Error('Unknown task: ' + task.task);\r\n }\r\n }\r\n }\r\n catch (err) {\r\n }\r\n}));\r\nctx.postMessage('ready');\r\n" - }, - { - "id": 20, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\polyfill.ts", - "name": "./src/lib/polyfill.ts", - "index": 1, - "index2": 2, - "size": 1829, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "issuerId": 19, - "issuerName": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - } - ], - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 19, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "module": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "moduleName": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "type": "cjs require", - "userRequest": "../polyfill", - "loc": "16:19-41" - } - ], - "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.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\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 const sec_num = parseInt(this + '', 10);\r\n const 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)\r\n leadZero = true;\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 (hours ? /* ('0' + hours).slice(-2) */ hours + ':' : '') + minutes + ':' + seconds;\r\n};\r\n" - }, - { - "id": 21, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\networker.ts", - "name": "./src/lib/mtproto/networker.ts", - "index": 9, - "index2": 24, - "size": 46109, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\networkerFactory.ts", - "issuerId": 6, - "issuerName": "./src/lib/mtproto/networkerFactory.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 6, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\networkerFactory.ts", - "name": "./src/lib/mtproto/networkerFactory.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - } - ], - "profile": { - "factory": 1509, - "building": 662, - "dependencies": 242 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 6, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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 logger_1 = require(\"../logger\");\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.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 = logger_1.logger('NET-' + dcID + (this.upload ? '-U' : ''));\r\n this.log('constructor' /* , this.authKey, this.authKeyID, this.serverSalt */);\r\n /* // Test resend after bad_server_salt\r\n if(this.dcID == 1 && this.upload) {\r\n this.serverSalt[0] = 0;\r\n } */\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 = */ 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, params, options);\r\n }\r\n return this.pushMessage(message, options);\r\n }\r\n checkLongPoll() {\r\n const 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 storage_1.default.get('dc').then((baseDcID) => {\r\n if (isClean && (baseDcID != this.dcID ||\r\n this.upload ||\r\n (this.sleepAfter && Date.now() > this.sleepAfter))) {\r\n //console.warn(dT(), 'Send long-poll for DC is delayed', this.dcID, this.sleepAfter);\r\n return;\r\n }\r\n this.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 // тут можно сделать таймаут и выводить дисконнект\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 const value = delay ? Date.now() + delay : 0;\r\n const sentMessage = this.sentMessages[messageID];\r\n if (sentMessage.container) {\r\n for (let i = 0, length = sentMessage.inner.length; i < 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 const authKey = this.authKeyUint8;\r\n const x = isOut ? 0 : 8;\r\n const msgKeyLargePlain = bin_utils_2.bufferConcat(authKey.subarray(88 + x, 88 + x + 32), dataWithPadding);\r\n const msgKeyLarge = yield cryptoworker_1.default.sha256Hash(msgKeyLargePlain);\r\n const 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.log.debug('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.log.debug('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.log.debug('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 = 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 let notEmpty = false;\r\n // this.log('clean start', this.dcID/*, this.sentMessages*/)\r\n Object.keys(this.sentMessages).forEach((msgID) => {\r\n const message = this.sentMessages[msgID];\r\n // this.log('clean iter', msgID, message)\r\n if (message.notContentRelated && this.pendingMessages[msgID] === undefined) {\r\n // this.log('clean notContentRelated', msgID)\r\n delete this.sentMessages[msgID];\r\n }\r\n else if (message.container) {\r\n for (let i = 0; i < message.inner.length; i++) {\r\n if (this.sentMessages[message.inner[i]] !== undefined) {\r\n // this.log('clean failed, found', msgID, message.inner[i], this.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 this.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 /**\r\n * только для сокета, возможно это будет неправильно работать, но в тесте сработало правильно\r\n */\r\n resend() {\r\n for (let id in this.sentMessages) {\r\n const msg = this.sentMessages[id];\r\n if (msg.body) {\r\n this.pushResend(id);\r\n }\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.log.debug('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 /* // simulate disconnect\r\n try {\r\n this.log('networker state:', this);\r\n // @ts-ignore\r\n this.transport.ws.close(1000);\r\n } catch(err) {\r\n this.log.error('transport', this.transport, err);\r\n } */\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.debug('new_session_created', message);\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.log.debug('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.log.debug('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.log.debug('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": 22, - "identifier": "F:\\tweb\\node_modules\\@cryptography\\sha1\\dist\\index.js", - "name": "./node_modules/@cryptography/sha1/dist/index.js", - "index": 13, - "index2": 7, - "size": 6225, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\crypto_utils.ts", - "issuerId": 13, - "issuerName": "./src/lib/crypto/crypto_utils.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\cryptoworker.ts", - "name": "./src/lib/crypto/cryptoworker.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - }, - { - "id": 13, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\crypto_utils.ts", - "name": "./src/lib/crypto/crypto_utils.ts", - "profile": { - "factory": 1524, - "building": 711, - "dependencies": 1293 - } - } - ], - "profile": { - "factory": 1827, - "building": 56 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 13, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 23, - "identifier": "F:\\tweb\\node_modules\\@cryptography\\sha256\\dist\\es\\sha256.js", - "name": "./node_modules/@cryptography/sha256/dist/es/sha256.js", - "index": 14, - "index2": 8, - "size": 8334, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\crypto_utils.ts", - "issuerId": 13, - "issuerName": "./src/lib/crypto/crypto_utils.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\cryptoworker.ts", - "name": "./src/lib/crypto/cryptoworker.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - }, - { - "id": 13, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\crypto_utils.ts", - "name": "./src/lib/crypto/crypto_utils.ts", - "profile": { - "factory": 1524, - "building": 711, - "dependencies": 1293 - } - } - ], - "profile": { - "factory": 1827, - "building": 56 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 13, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 24, - "identifier": "F:\\tweb\\node_modules\\pako\\dist\\pako_inflate.min.js", - "name": "./node_modules/pako/dist/pako_inflate.min.js", - "index": 16, - "index2": 10, - "size": 22682, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\crypto_utils.ts", - "issuerId": 13, - "issuerName": "./src/lib/crypto/crypto_utils.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\cryptoworker.ts", - "name": "./src/lib/crypto/cryptoworker.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - }, - { - "id": 13, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\crypto_utils.ts", - "name": "./src/lib/crypto/crypto_utils.ts", - "profile": { - "factory": 1524, - "building": 711, - "dependencies": 1293 - } - } - ], - "profile": { - "factory": 1827, - "building": 56 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 13, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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>>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>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>>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>>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<>>=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,b-=v),b<15&&(h+=E[n++]<>>=v=g>>>24,b-=v,!(16&(v=g>>>16&255))){if(0==(64&v)){g=w[(65535&g)+(h&(1<>>=v,b-=v,(v=r-o)>3,h&=(1<<(b-=p<<3))-1,e.next_in=n,e.next_out=r,e.avail_in=n>>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=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>>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<>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++]<>>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++]<>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++]<>>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>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++]<>>=7&d,d-=7&d,i.mode=27;break}for(;d<3;){if(0===s)break e;s--,l+=n[r++]<>>=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++]<>>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>>=5,d-=5,i.ndist=1+(31&l),l>>>=5,d-=5,i.ncode=4+(15&l),l>>>=4,d-=4,286>>=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>>16&255,_=65535&Z,!((w=Z>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<>>=w,d-=w,i.lens[i.have++]=_;else{if(16===_){for(E=w+2;d>>=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>>=w)),l>>>=3,d-=3}else{for(E=w+7;d>>=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<>>16&255,_=65535&Z,!((w=Z>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<>g)])>>>16&255,_=65535&Z,!(g+(w=Z>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<>>=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>>=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<>>16&255,_=65535&Z,!((w=Z>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<>g)])>>>16&255,_=65535&Z,!(g+(w=Z>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<>>=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>>=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(fh?(m=O[C+o[g]],w=A[z+o[g]]):(m=96,w=0),f=1<<_-S,v=l=1<>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 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('gzipUncompress', bytes, toString);\r\n }\r\n computeSRP(password, state) {\r\n return this.performTaskWorker('computeSRP', password, state);\r\n }\r\n}\r\nexports.default = CryptoWorkerMethods;\r\n" - }, - { - "id": 26, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\srp.ts", - "name": "./src/lib/crypto/srp.ts", - "index": 20, - "index2": 16, - "size": 10060, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\cryptoworker.ts", - "issuerId": 2, - "issuerName": "./src/lib/crypto/cryptoworker.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\cryptoworker.ts", - "name": "./src/lib/crypto/cryptoworker.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - } - ], - "profile": { - "factory": 1524, - "building": 711, - "dependencies": 1293 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 2, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\cryptoworker.ts", - "module": "./src/lib/crypto/cryptoworker.ts", - "moduleName": "./src/lib/crypto/cryptoworker.ts", - "type": "cjs require", - "userRequest": "./srp", - "loc": "52:54-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.computeSRP = exports.makePasswordHash = void 0;\r\nconst bin_utils_1 = require(\"../bin_utils\");\r\nconst cryptoworker_1 = __importDefault(require(\"../crypto/cryptoworker\"));\r\nconst leemon_1 = require(\"leemon\");\r\nconst logger_1 = require(\"../logger\");\r\nconst log = logger_1.logger('SRP', logger_1.LogLevels.error);\r\nfunction makePasswordHash(password, client_salt, server_salt) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n let clientSaltString = '';\r\n for (let i = 0; i < client_salt.length; i++)\r\n clientSaltString += String.fromCharCode(client_salt[i]);\r\n let buffer = yield cryptoworker_1.default.sha256Hash(clientSaltString + password + clientSaltString);\r\n //log('encoded 1', bytesToHex(new Uint8Array(buffer)));\r\n buffer = bin_utils_1.bufferConcats(server_salt, buffer, server_salt);\r\n buffer = yield cryptoworker_1.default.sha256Hash(buffer);\r\n //log('encoded 2', buffer, bytesToHex(new Uint8Array(buffer)));\r\n let hash = yield cryptoworker_1.default.pbkdf2(new Uint8Array(buffer), client_salt, 100000);\r\n //log('encoded 3', hash, bytesToHex(new Uint8Array(hash)));\r\n hash = bin_utils_1.bufferConcats(server_salt, hash, server_salt);\r\n buffer = yield cryptoworker_1.default.sha256Hash(hash);\r\n //log('got password hash:', buffer, bytesToHex(new Uint8Array(buffer)));\r\n return buffer;\r\n });\r\n}\r\nexports.makePasswordHash = makePasswordHash;\r\nfunction computeSRP(password, state) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n //console.log('computeCheck:', password, state);\r\n let algo = state.current_algo;\r\n let p = leemon_1.str2bigInt(bin_utils_1.bytesToHex(algo.p), 16);\r\n let B = leemon_1.str2bigInt(bin_utils_1.bytesToHex(state.srp_B), 16);\r\n let g = leemon_1.int2bigInt(algo.g, 32, 256);\r\n log('p', leemon_1.bigInt2str(p, 16));\r\n log('B', leemon_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 makePasswordHash(password, new Uint8Array(algo.salt1), new Uint8Array(algo.salt2));\r\n let x = leemon_1.str2bigInt(bin_utils_1.bytesToHex(new Uint8Array(pw_hash)), 16);\r\n log('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(leemon_1.bigInt2str(p, 16)), 256);\r\n let gForHash = padArray(bin_utils_1.bytesFromHex(leemon_1.bigInt2str(g, 16)), 256); // like uint8array\r\n let b_for_hash = padArray(bin_utils_1.bytesFromHex(leemon_1.bigInt2str(B, 16)), 256);\r\n log(bin_utils_1.bytesToHex(pForHash));\r\n log(bin_utils_1.bytesToHex(gForHash));\r\n log(bin_utils_1.bytesToHex(b_for_hash));\r\n let g_x = leemon_1.powMod(g, x, p);\r\n log('g_x', leemon_1.bigInt2str(g_x, 16));\r\n let k = yield cryptoworker_1.default.sha256Hash(bin_utils_1.bufferConcat(pForHash, gForHash));\r\n k = leemon_1.str2bigInt(bin_utils_1.bytesToHex(new Uint8Array(k)), 16);\r\n log('k', leemon_1.bigInt2str(k, 16));\r\n // kg_x = (k * g_x) % p\r\n let kg_x = leemon_1.mod(leemon_1.mult(k, g_x), p);\r\n // good\r\n log('kg_x', leemon_1.bigInt2str(kg_x, 16));\r\n let is_good_mod_exp_first = (modexp, prime) => {\r\n let diff = leemon_1.sub(prime, modexp);\r\n let min_diff_bits_count = 2048 - 64;\r\n let max_mod_exp_size = 256;\r\n if (leemon_1.negative(diff) ||\r\n leemon_1.bitSize(diff) < min_diff_bits_count ||\r\n leemon_1.bitSize(modexp) < min_diff_bits_count ||\r\n Math.floor((leemon_1.bitSize(modexp) + 7) / 8) > max_mod_exp_size)\r\n return false;\r\n return true;\r\n };\r\n var flipper = (arr) => {\r\n let out = new Uint8Array(arr.length);\r\n for (let i = 0; i < arr.length; i += 4) {\r\n out[i] = arr[i + 3];\r\n out[i + 1] = arr[i + 2];\r\n out[i + 2] = arr[i + 1];\r\n out[i + 3] = arr[i];\r\n }\r\n return out;\r\n };\r\n let generate_and_check_random = () => __awaiter(this, void 0, void 0, function* () {\r\n while (true) {\r\n const a = leemon_1.str2bigInt(bin_utils_1.bytesToHex(flipper(state.secure_random)), 16);\r\n //const a = str2bigInt('9153faef8f2bb6da91f6e5bc96bc00860a530a572a0f45aac0842b4602d711f8bda8d59fb53705e4ae3e31a3c4f0681955425f224297b8e9efd898fec22046debb7ba8a0bcf2be1ada7b100424ea318fdcef6ccfe6d7ab7d978c0eb76a807d4ab200eb767a22de0d828bc53f42c5a35c2df6e6ceeef9a3487aae8e9ef2271f2f6742e83b8211161fb1a0e037491ab2c2c73ad63c8bd1d739de1b523fe8d461270cedcf240de8da75f31be4933576532955041dc5770c18d3e75d0b357df9da4a5c8726d4fced87d15752400883dc57fa1937ac17608c5446c4774dcd123676d683ce3a1ab9f7e020ca52faafc99969822717c8e07ea383d5fb1a007ba0d170cb', 16);\r\n //console.log('ITERATION');\r\n log('g a p', leemon_1.bigInt2str(g, 16), leemon_1.bigInt2str(a, 16), leemon_1.bigInt2str(p, 16));\r\n const A = leemon_1.powMod(g, a, p);\r\n log('A MODPOW', leemon_1.bigInt2str(A, 16));\r\n if (is_good_mod_exp_first(A, p)) {\r\n const a_for_hash = bin_utils_1.bytesFromHex(leemon_1.bigInt2str(A, 16));\r\n const s = yield cryptoworker_1.default.sha256Hash(bin_utils_1.bufferConcat(new Uint8Array(a_for_hash), new Uint8Array(b_for_hash)));\r\n const u = leemon_1.str2bigInt(bin_utils_1.bytesToHex(new Uint8Array(s)), 16);\r\n if (!leemon_1.isZero(u) && !leemon_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 log('a', leemon_1.bigInt2str(a, 16));\r\n log('a_for_hash', bin_utils_1.bytesToHex(a_for_hash));\r\n log('u', leemon_1.bigInt2str(u, 16));\r\n // g_b = (B - kg_x) % p\r\n /* log('B - kg_x', bigInt2str(sub(B, kg_x), 16));\r\n log('subtract', bigInt2str(B, 16), bigInt2str(kg_x, 16));\r\n log('B - kg_x', bigInt2str(sub(B, kg_x), 16)); */\r\n let g_b;\r\n if (!leemon_1.greater(B, kg_x)) {\r\n log('negative');\r\n g_b = leemon_1.add(B, p);\r\n }\r\n else\r\n g_b = B;\r\n g_b = leemon_1.mod(leemon_1.sub(g_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 log('g_b', leemon_1.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 = leemon_1.mult(u, x);\r\n log('u and x multiply', leemon_1.bigInt2str(u, 16), leemon_1.bigInt2str(x, 16), leemon_1.bigInt2str(ux, 16));\r\n let a_ux = leemon_1.add(a, ux);\r\n let S = leemon_1.powMod(g_b, a_ux, p);\r\n let K = yield cryptoworker_1.default.sha256Hash(padArray(bin_utils_1.bytesFromHex(leemon_1.bigInt2str(S, 16)), 256));\r\n log('K', bin_utils_1.bytesToHex(K), new Uint32Array(new Uint8Array(K).buffer));\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 = 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 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\nexports.computeSRP = computeSRP;\r\n" - }, - { - "id": 27, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\transports\\websocket.ts", - "name": "./src/lib/mtproto/transports/websocket.ts", - "index": 24, - "index2": 21, - "size": 8815, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\dcConfigurator.ts", - "issuerId": 8, - "issuerName": "./src/lib/mtproto/dcConfigurator.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiManager.ts", - "name": "./src/lib/mtproto/apiManager.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\dcConfigurator.ts", - "name": "./src/lib/mtproto/dcConfigurator.ts", - "profile": { - "factory": 1707, - "building": 782, - "dependencies": 1 - } - } - ], - "profile": { - "factory": 863, - "building": 41, - "dependencies": 1062 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 8, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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 logger_1 = require(\"../../logger\");\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(codec.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.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.addEventListener('open', this.handleOpen);\r\n this.ws.addEventListener('close', this.handleClose);\r\n this.ws.addEventListener('message', this.handleMessage);\r\n };\r\n this.handleOpen = () => {\r\n this.log('opened');\r\n this.log.debug('sending init packet');\r\n this.ws.send(this.obfuscation.init(this.codec));\r\n //setTimeout(() => {\r\n this.connected = true;\r\n this.releasePending();\r\n //}, 3e3);\r\n };\r\n this.handleClose = (event) => {\r\n this.log('closed', event, this.pending);\r\n this.connected = false;\r\n //this.pending.length = 0;\r\n /* if(this.networker) {\r\n this.networker.resend();\r\n this.networker.cleanupSent();\r\n } */\r\n this.log('trying to reconnect...');\r\n this.connect();\r\n for (let pending of this.pending) {\r\n if (pending.bodySent) {\r\n pending.bodySent = false;\r\n }\r\n }\r\n if (this.networker) {\r\n this.ws.addEventListener('open', () => {\r\n this.networker.resend();\r\n this.networker.cleanupSent();\r\n }, { once: true });\r\n }\r\n };\r\n this.handleMessage = (event) => {\r\n this.log.debug('<-', '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.log.debug('redirecting to networker');\r\n return this.networker.parseResponse(data).then(response => {\r\n this.log.debug('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.debug('no pending for res:', data.hex);\r\n }\r\n pending.resolve(data);\r\n };\r\n this.send = (body) => {\r\n this.log.debug('-> body length to pending:', body.length);\r\n //return;\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 = logger_1.logger(`WS-${dcID}`, logger_1.LogLevels.log /* | LogLevels.error | LogLevels.debug */);\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 //this.log.error('Pending length:', this.pending.length);\r\n const length = this.pending.length;\r\n for (let i = length - 1; i >= 0; --i) {\r\n const pending = this.pending[i];\r\n const { body, bodySent } = pending;\r\n if (body && !bodySent) {\r\n const toEncode = this.codec.encodePacket(body);\r\n //this.log('send before obf:', /* body.hex, nonce.hex, */ toEncode.hex);\r\n const enc = this.obfuscation.encode(toEncode);\r\n //this.log('send after obf:', enc.hex);\r\n this.log.debug('-> 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 else {\r\n pending.bodySent = true;\r\n }\r\n //delete pending.body;\r\n }\r\n }\r\n }\r\n}\r\nexports.default = Socket;\r\n" - }, - { - "id": 28, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\transports\\intermediate.ts", - "name": "./src/lib/mtproto/transports/intermediate.ts", - "index": 26, - "index2": 20, - "size": 1671, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\transports\\websocket.ts", - "issuerId": 27, - "issuerName": "./src/lib/mtproto/transports/websocket.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiManager.ts", - "name": "./src/lib/mtproto/apiManager.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\dcConfigurator.ts", - "name": "./src/lib/mtproto/dcConfigurator.ts", - "profile": { - "factory": 1707, - "building": 782, - "dependencies": 1 - } - }, - { - "id": 27, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\transports\\websocket.ts", - "name": "./src/lib/mtproto/transports/websocket.ts", - "profile": { - "factory": 863, - "building": 41, - "dependencies": 1062 - } - } - ], - "profile": { - "factory": 1062, - "building": 17, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 27, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 29, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.ts", - "name": "./src/lib/mtproto/mtproto.ts", - "index": 28, - "index2": 26, - "size": 2926, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/mtproto/apiManager.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiManager.ts", - "name": "./src/lib/mtproto/apiManager.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - } - ], - "profile": { - "factory": 1707, - "building": 782, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 30, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\authorizer.ts", - "name": "./src/lib/mtproto/authorizer.ts", - "index": 29, - "index2": 28, - "size": 23081, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/mtproto/apiManager.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiManager.ts", - "name": "./src/lib/mtproto/apiManager.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - } - ], - "profile": { - "factory": 1707, - "building": 782, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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\nconst logger_1 = require(\"../logger\");\r\nclass Authorizer {\r\n constructor() {\r\n this.cached = {};\r\n this.log = logger_1.logger(`AUTHORIZER` /* , LogLevels.error | LogLevels.log */);\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 this.log('mtpSendPlainRequest: creating requestPromise');\r\n return transport.send(resultArray).then(result => {\r\n this.log('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 this.log.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 this.log.error('msg_id == 0', msg_id);\r\n let msg_len = deserializer.fetchInt('msg_len');\r\n if (!msg_len)\r\n this.log.error('no msg_len', msg_len);\r\n return deserializer;\r\n }\r\n catch (e) {\r\n this.log.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 this.log('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 this.log.error('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 this.log.error(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 this.log('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 this.log('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 this.log.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 this.log('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 this.log('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 this.log('Send req_DH_params FAIL!', error);\r\n throw error;\r\n }\r\n var response = deserializer.fetchObject('Server_DH_Params', 'RESPONSE');\r\n this.log('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 this.log.error('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 this.log('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 this.log('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 this.log('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 this.log('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 this.log('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 this.log('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 this.log('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 this.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": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\rsaKeysManager.ts", - "name": "./src/lib/mtproto/rsaKeysManager.ts", - "index": 30, - "index2": 27, - "size": 9548, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\authorizer.ts", - "issuerId": 30, - "issuerName": "./src/lib/mtproto/authorizer.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiManager.ts", - "name": "./src/lib/mtproto/apiManager.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - }, - { - "id": 30, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\authorizer.ts", - "name": "./src/lib/mtproto/authorizer.ts", - "profile": { - "factory": 1707, - "building": 782, - "dependencies": 1 - } - } - ], - "profile": { - "factory": 790, - "building": 652, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 30, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 32, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiFileManager.ts", - "name": "./src/lib/mtproto/apiFileManager.ts", - "index": 31, - "index2": 34, - "size": 19189, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "issuerId": 19, - "issuerName": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - } - ], - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 19, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "module": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "moduleName": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "type": "cjs require", - "userRequest": "./apiFileManager", - "loc": "22:41-68" - } - ], - "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.ApiFileManager = void 0;\r\nconst bin_utils_1 = require(\"../bin_utils\");\r\nconst cacheStorage_1 = __importDefault(require(\"../cacheStorage\"));\r\nconst filemanager_1 = __importDefault(require(\"../filemanager\"));\r\nconst apiManager_1 = __importDefault(require(\"./apiManager\"));\r\nconst logger_1 = require(\"../logger\");\r\nconst userAgent_1 = require(\"../../helpers/userAgent\");\r\nconst cryptoworker_1 = __importDefault(require(\"../crypto/cryptoworker\"));\r\nconst context_1 = require(\"../../helpers/context\");\r\nconst cancellablePromise_1 = require(\"../../helpers/cancellablePromise\");\r\nconst MAX_FILE_SAVE_SIZE = 20e6;\r\nclass ApiFileManager {\r\n constructor() {\r\n this.cachedDownloadPromises = {};\r\n this.uploadPromises = {};\r\n this.downloadPulls = {};\r\n this.downloadActives = {};\r\n this.webpConvertPromises = {};\r\n this.log = logger_1.logger('AFM', logger_1.LogLevels.error);\r\n this.uncompressTGS = (bytes, fileName) => {\r\n //this.log('uncompressTGS', bytes, bytes.slice().buffer);\r\n // slice нужен потому что в uint8array - 5053 length, в arraybuffer - 5084\r\n return cryptoworker_1.default.gzipUncompress(bytes.slice().buffer, true);\r\n };\r\n this.convertWebp = (bytes, fileName) => {\r\n const convertPromise = cancellablePromise_1.deferredPromise();\r\n const task = { type: 'convertWebp', payload: { fileName, bytes } };\r\n context_1.notifySomeone(task);\r\n return this.webpConvertPromises[fileName] = convertPromise;\r\n };\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 const downloadPull = this.downloadPulls[dcID];\r\n const promise = new Promise((resolve, reject) => {\r\n downloadPull.push({ cb, deferred: { resolve, reject }, activeDelta });\r\n });\r\n setTimeout(() => {\r\n this.downloadCheck(dcID);\r\n }, 0);\r\n return promise;\r\n }\r\n downloadCheck(dcID) {\r\n const downloadPull = this.downloadPulls[dcID];\r\n //const downloadLimit = dcID == 'upload' ? 11 : 5;\r\n //const downloadLimit = 24;\r\n const downloadLimit = dcID == 'upload' ? 11 : 48;\r\n if (this.downloadActives[dcID] >= downloadLimit || !downloadPull || !downloadPull.length) {\r\n return false;\r\n }\r\n const data = downloadPull.shift();\r\n const 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 getFileStorage() {\r\n return cacheStorage_1.default;\r\n }\r\n cancelDownload(fileName) {\r\n const promise = this.cachedDownloadPromises[fileName] || this.uploadPromises[fileName];\r\n if (promise && !promise.isRejected && !promise.isFulfilled) {\r\n promise.cancel();\r\n return true;\r\n }\r\n return false;\r\n }\r\n requestFilePart(dcID, location, offset, limit, checkCancel) {\r\n //const delta = limit / 1024 / 256;\r\n const delta = limit / 1024 / 128;\r\n return this.downloadRequest(dcID, () => __awaiter(this, void 0, void 0, function* () {\r\n checkCancel && checkCancel();\r\n return apiManager_1.default.invokeApi('upload.getFile', {\r\n location,\r\n offset,\r\n limit\r\n }, {\r\n dcID,\r\n fileDownload: true /* ,\r\n singleInRequest: 'safari' in window */\r\n });\r\n }), delta);\r\n }\r\n convertBlobToBytes(blob) {\r\n return blob.arrayBuffer().then(buffer => new Uint8Array(buffer));\r\n }\r\n getLimitPart(size) {\r\n let bytes;\r\n bytes = 512;\r\n /* if(size < 1e6 || !size) bytes = 512;\r\n else if(size < 3e6) bytes = 256;\r\n else bytes = 128; */\r\n return bytes * 1024;\r\n }\r\n downloadFile(options) {\r\n var _a;\r\n if (!filemanager_1.default.isAvailable()) {\r\n return Promise.reject({ type: 'BROWSER_BLOB_NOT_SUPPORTED' });\r\n }\r\n let size = (_a = options.size) !== null && _a !== void 0 ? _a : 0;\r\n let { dcID, location } = options;\r\n let process;\r\n if (options.mimeType == 'image/webp' && userAgent_1.isSafari) {\r\n process = this.convertWebp;\r\n options.mimeType = 'image/png';\r\n }\r\n else if (options.mimeType == 'application/x-tgsticker') {\r\n process = this.uncompressTGS;\r\n options.mimeType = 'application/json';\r\n }\r\n const fileName = bin_utils_1.getFileNameByLocation(location, { fileName: options.fileName });\r\n const cachedPromise = this.cachedDownloadPromises[fileName];\r\n const fileStorage = this.getFileStorage();\r\n this.log('downloadFile', fileName, size, location, options.mimeType, process);\r\n if (cachedPromise) {\r\n if (options.processPart) {\r\n return cachedPromise.then((blob) => {\r\n return this.convertBlobToBytes(blob).then(bytes => {\r\n options.processPart(bytes);\r\n return blob;\r\n });\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(options);\r\n }).catch(() => {\r\n return this.downloadFile(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 const deferred = cancellablePromise_1.deferredPromise();\r\n const mimeType = options.mimeType || 'image/jpeg';\r\n let canceled = false;\r\n let resolved = false;\r\n let cacheFileWriter;\r\n let errorHandler = (error) => {\r\n deferred.reject(error);\r\n errorHandler = () => { };\r\n if (cacheFileWriter && (!error || error.type != 'DOWNLOAD_CANCELED')) {\r\n cacheFileWriter.truncate();\r\n }\r\n };\r\n fileStorage.getFile(fileName).then((blob) => __awaiter(this, void 0, void 0, function* () {\r\n //this.log('maybe cached', fileName);\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 (options.processPart) {\r\n //FileManager.copy(blob, toFileEntry).then(deferred.resolve, errorHandler);\r\n yield this.convertBlobToBytes(blob).then(bytes => {\r\n options.processPart(bytes);\r\n });\r\n }\r\n deferred.resolve(blob);\r\n })).catch(() => {\r\n //this.log('not cached', fileName);\r\n const fileWriterPromise = fileStorage.getFileWriter(fileName, mimeType);\r\n fileWriterPromise.then((fileWriter) => {\r\n cacheFileWriter = fileWriter;\r\n const limit = options.limitPart || this.getLimitPart(size);\r\n let offset;\r\n let startOffset = 0;\r\n let writeFilePromise = Promise.resolve(), writeFileDeferred;\r\n const maxRequests = options.processPart ? 5 : 5;\r\n /* if(fileWriter.length) {\r\n startOffset = fileWriter.length;\r\n \r\n if(startOffset >= size) {\r\n if(toFileEntry) {\r\n deferred.resolve();\r\n } else {\r\n deferred.resolve(fileWriter.finalize());\r\n }\r\n \r\n return;\r\n }\r\n \r\n fileWriter.seek(startOffset);\r\n deferred.notify({done: startOffset, total: size});\r\n \r\n /////this.log('deferred notify 1:', {done: startOffset, total: size});\r\n } */\r\n const processDownloaded = (bytes, offset) => __awaiter(this, void 0, void 0, function* () {\r\n if (options.processPart) {\r\n yield options.processPart(bytes, offset, delayed);\r\n }\r\n if (process) {\r\n //const perf = performance.now();\r\n const processed = yield process(bytes, fileName);\r\n //this.log('downloadFile process downloaded time', performance.now() - perf, mimeType, process);\r\n return processed;\r\n }\r\n return bytes;\r\n });\r\n const delayed = [];\r\n offset = startOffset;\r\n do {\r\n ////this.log('offset:', startOffset);\r\n writeFileDeferred = cancellablePromise_1.deferredPromise();\r\n delayed.push({ offset, writeFilePromise, writeFileDeferred });\r\n writeFilePromise = writeFileDeferred;\r\n offset += limit;\r\n } while (offset < size);\r\n // для потокового видео нужно скачать первый и последний чанки\r\n /* if(options.processPart && delayed.length > 2) {\r\n const last = delayed.splice(delayed.length - 1, 1)[0];\r\n delayed.splice(1, 0, last);\r\n } */\r\n // @ts-ignore\r\n //deferred.queue = delayed;\r\n let done = 0;\r\n const superpuper = () => __awaiter(this, void 0, void 0, function* () {\r\n //if(!delayed.length) return;\r\n const { offset, writeFilePromise, writeFileDeferred } = delayed.shift();\r\n try {\r\n const result = yield this.requestFilePart(dcID, location, offset, limit, checkCancel);\r\n const bytes = result.bytes;\r\n if (delayed.length) {\r\n superpuper();\r\n }\r\n this.log('downloadFile requestFilePart result:', fileName, result);\r\n const isFinal = offset + limit >= size || !bytes.byteLength;\r\n if (bytes.byteLength) {\r\n //done += limit;\r\n done += bytes.byteLength;\r\n //if(!isFinal) {\r\n ////this.log('deferred notify 2:', {done: offset + limit, total: size}, deferred);\r\n deferred.notify({ done, offset, total: size });\r\n //}\r\n const processedResult = yield processDownloaded(bytes, offset);\r\n checkCancel();\r\n yield writeFilePromise;\r\n checkCancel();\r\n yield filemanager_1.default.write(fileWriter, processedResult);\r\n }\r\n writeFileDeferred.resolve();\r\n if (isFinal) {\r\n resolved = true;\r\n if (options.processPart) {\r\n deferred.resolve();\r\n }\r\n else {\r\n deferred.resolve(fileWriter.finalize(size < MAX_FILE_SAVE_SIZE));\r\n }\r\n }\r\n }\r\n catch (err) {\r\n errorHandler(err);\r\n }\r\n });\r\n for (let i = 0, length = Math.min(maxRequests, delayed.length); i < length; ++i) {\r\n superpuper();\r\n }\r\n });\r\n });\r\n const checkCancel = () => {\r\n if (canceled) {\r\n throw new Error('canceled');\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 }\r\n };\r\n deferred.notify = (progress) => {\r\n context_1.notifyAll({ progress: Object.assign({ fileName }, progress) });\r\n };\r\n this.cachedDownloadPromises[fileName] = deferred;\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 return this.getFileStorage().deleteFile(fileName);\r\n }\r\n uploadFile({ file, fileName }) {\r\n const fileSize = file.size, isBigFile = fileSize >= 10485760;\r\n let 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 const totalParts = Math.ceil(fileSize / partSize);\r\n const fileID = [bin_utils_1.nextRandomInt(0xFFFFFFFF), bin_utils_1.nextRandomInt(0xFFFFFFFF)];\r\n let _part = 0;\r\n const resultInputFile = {\r\n _: isBigFile ? 'inputFileBig' : 'inputFile',\r\n id: fileID,\r\n parts: totalParts,\r\n name: fileName,\r\n md5_checksum: ''\r\n };\r\n const deferredHelper = {\r\n notify: (details) => { }\r\n };\r\n const 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 const method = isBigFile ? 'upload.saveBigFilePart' : 'upload.saveFilePart';\r\n for (let offset = 0; offset < fileSize; offset += partSize) {\r\n const part = _part++; // 0, 1\r\n this.downloadRequest('upload', () => {\r\n return new Promise((uploadResolve, uploadReject) => {\r\n const reader = new FileReader();\r\n const 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 uploadReject();\r\n return;\r\n }\r\n //////this.log('Starting to upload file, isBig:', isBigFile, fileID, part, e.target.result);\r\n apiManager_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 deferred.notify({ done: doneParts * partSize, total: fileSize });\r\n if (doneParts >= totalParts) {\r\n deferred.resolve(resultInputFile);\r\n resolved = true;\r\n }\r\n }, errorHandler);\r\n };\r\n reader.readAsArrayBuffer(blob);\r\n });\r\n }, activeDelta).catch(errorHandler);\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 deferred.notify = (progress) => {\r\n context_1.notifyAll({ progress: Object.assign({ fileName }, progress) });\r\n };\r\n deferred.finally(() => {\r\n delete this.uploadPromises[fileName];\r\n });\r\n return this.uploadPromises[fileName] = deferred;\r\n }\r\n}\r\nexports.ApiFileManager = ApiFileManager;\r\nconst apiFileManager = new ApiFileManager();\r\n// @ts-ignore\r\nif (process.env.NODE_ENV != 'production') {\r\n self.apiFileManager = apiFileManager;\r\n}\r\nexports.default = apiFileManager;\r\n" - }, - { - "id": 33, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\cacheStorage.ts", - "name": "./src/lib/cacheStorage.ts", - "index": 32, - "index2": 31, - "size": 3835, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiFileManager.ts", - "issuerId": 32, - "issuerName": "./src/lib/mtproto/apiFileManager.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 32, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiFileManager.ts", - "name": "./src/lib/mtproto/apiFileManager.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - } - ], - "profile": { - "factory": 1392, - "building": 680, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 32, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiFileManager.ts", - "module": "./src/lib/mtproto/apiFileManager.ts", - "moduleName": "./src/lib/mtproto/apiFileManager.ts", - "type": "cjs require", - "userRequest": "../cacheStorage", - "loc": "17:39-65" - } - ], - "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 bin_utils_1 = require(\"./bin_utils\");\r\nconst filemanager_1 = __importDefault(require(\"./filemanager\"));\r\n//import { logger } from './polyfill';\r\nclass CacheStorageController {\r\n //private log: ReturnType = logger('CS');\r\n constructor() {\r\n this.dbName = 'cachedFiles';\r\n this.openDatabase();\r\n }\r\n openDatabase() {\r\n if (this.openDbPromise) {\r\n return this.openDbPromise;\r\n }\r\n return this.openDbPromise = caches.open(this.dbName);\r\n }\r\n deleteFile(fileName) {\r\n return this.timeoutOperation((cache) => __awaiter(this, void 0, void 0, function* () {\r\n const deleted = yield cache.delete('/' + fileName);\r\n }));\r\n }\r\n saveFile(fileName, blob) {\r\n //return Promise.resolve(blobConstruct([blob]));\r\n if (!(blob instanceof Blob)) {\r\n blob = bin_utils_1.blobConstruct(blob);\r\n }\r\n return this.timeoutOperation((cache) => __awaiter(this, void 0, void 0, function* () {\r\n yield cache.put('/' + fileName, new Response(blob));\r\n return blob;\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.timeoutOperation((cache) => __awaiter(this, void 0, void 0, function* () {\r\n const response = yield cache.match('/' + fileName);\r\n if (!response || !cache) {\r\n //console.warn('getFile:', response, fileName);\r\n throw 'No response???';\r\n }\r\n return response.blob();\r\n }));\r\n }\r\n timeoutOperation(callback) {\r\n return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {\r\n let rejected = false;\r\n const timeout = setTimeout(() => {\r\n reject();\r\n //console.warn('CACHESTORAGE TIMEOUT');\r\n rejected = true;\r\n }, 5e3);\r\n try {\r\n const cache = yield this.openDatabase();\r\n if (!cache) {\r\n throw 'no cache?';\r\n }\r\n const res = yield callback(cache);\r\n if (rejected)\r\n return;\r\n resolve(res);\r\n }\r\n catch (err) {\r\n reject(err);\r\n }\r\n clearTimeout(timeout);\r\n }));\r\n }\r\n getFileWriter(fileName, mimeType) {\r\n const fakeWriter = filemanager_1.default.getFakeFileWriter(mimeType, (blob) => {\r\n return this.saveFile(fileName, blob);\r\n });\r\n return Promise.resolve(fakeWriter);\r\n }\r\n}\r\nconst cacheStorage = new CacheStorageController();\r\n/* // @ts-ignore\r\nif(process.env.NODE_ENV != 'production') {\r\n (window as any).cacheStorage = cacheStorage;\r\n} */\r\nexports.default = cacheStorage;\r\n" - }, - { - "id": 34, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\helpers\\userAgent.ts", - "name": "./src/helpers/userAgent.ts", - "index": 34, - "index2": 32, - "size": 1248, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiFileManager.ts", - "issuerId": 32, - "issuerName": "./src/lib/mtproto/apiFileManager.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 32, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiFileManager.ts", - "name": "./src/lib/mtproto/apiFileManager.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - } - ], - "profile": { - "factory": 1392, - "building": 680, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 32, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiFileManager.ts", - "module": "./src/lib/mtproto/apiFileManager.ts", - "moduleName": "./src/lib/mtproto/apiFileManager.ts", - "type": "cjs require", - "userRequest": "../../helpers/userAgent", - "loc": "21:20-54" - } - ], - "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.isSafari = exports.isAppleMobile = exports.isAndroid = exports.isApple = exports.userAgent = void 0;\r\nexports.userAgent = navigator ? navigator.userAgent : null;\r\nexports.isApple = navigator.userAgent.search(/OS X|iPhone|iPad|iOS/i) != -1;\r\nexports.isAndroid = navigator.userAgent.toLowerCase().indexOf('android') != -1;\r\n/**\r\n * Returns true when run in WebKit derived browsers.\r\n * This is used as a workaround for a memory leak in Safari caused by using Transferable objects to\r\n * transfer data between WebWorkers and the main thread.\r\n * https://github.com/mapbox/mapbox-gl-js/issues/8771\r\n *\r\n * This should be removed once the underlying Safari issue is fixed.\r\n */\r\nconst ctx = typeof (window) !== 'undefined' ? window : self;\r\n// https://stackoverflow.com/a/58065241\r\nexports.isAppleMobile = (/iPad|iPhone|iPod/.test(navigator.platform) ||\r\n (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1)) &&\r\n !ctx.MSStream;\r\nexports.isSafari = !!('safari' in ctx) || !!(exports.userAgent && (/\\b(iPad|iPhone|iPod)\\b/.test(exports.userAgent) || (!!exports.userAgent.match('Safari') && !exports.userAgent.match('Chrome')))) /* || true */;\r\n" - }, - { - "id": 35, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\helpers\\cancellablePromise.ts", - "name": "./src/helpers/cancellablePromise.ts", - "index": 35, - "index2": 33, - "size": 1438, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiFileManager.ts", - "issuerId": 32, - "issuerName": "./src/lib/mtproto/apiFileManager.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 32, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiFileManager.ts", - "name": "./src/lib/mtproto/apiFileManager.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - } - ], - "profile": { - "factory": 1392, - "building": 680, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 32, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiFileManager.ts", - "module": "./src/lib/mtproto/apiFileManager.ts", - "moduleName": "./src/lib/mtproto/apiFileManager.ts", - "type": "cjs require", - "userRequest": "../../helpers/cancellablePromise", - "loc": "24:29-72" - } - ], - "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 = void 0;\r\nfunction deferredPromise() {\r\n let deferredHelper = {\r\n isFulfilled: false,\r\n isRejected: false,\r\n notify: () => { },\r\n notifyAll: (...args) => {\r\n deferredHelper.lastNotify = args;\r\n deferredHelper.listeners.forEach((callback) => callback(...args));\r\n },\r\n lastNotify: undefined,\r\n listeners: [],\r\n addNotifyListener: (callback) => {\r\n if (deferredHelper.lastNotify) {\r\n callback(...deferredHelper.lastNotify);\r\n }\r\n deferredHelper.listeners.push(callback);\r\n }\r\n };\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 deferred.finally(() => {\r\n deferred.notify = null;\r\n deferred.listeners.length = 0;\r\n deferred.lastNotify = null;\r\n });\r\n Object.assign(deferred, deferredHelper);\r\n return deferred;\r\n}\r\nexports.deferredPromise = deferredPromise;\r\n" - } - ], - "filteredModules": 0, - "origins": [ - { - "module": "", - "moduleIdentifier": "", - "moduleName": "", - "loc": "main", - "request": "!!F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "reasons": [] - } - ] - } - ], - "modules": [ - { - "id": 0, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\bin_utils.ts", - "name": "./src/lib/bin_utils.ts", - "index": 2, - "index2": 1, - "size": 13166, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\polyfill.ts", - "issuerId": 20, - "issuerName": "./src/lib/polyfill.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 20, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\polyfill.ts", - "name": "./src/lib/polyfill.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - } - ], - "profile": { - "factory": 0, - "building": 323, - "dependencies": 53 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 2, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 7, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 13, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 16, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\filemanager.ts", - "module": "./src/lib/filemanager.ts", - "moduleName": "./src/lib/filemanager.ts", - "type": "cjs require", - "userRequest": "./bin_utils", - "loc": "13:20-42" - }, - { - "moduleId": 20, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 21, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 21, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 25, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\crypto_methods.ts", - "module": "./src/lib/crypto/crypto_methods.ts", - "moduleName": "./src/lib/crypto/crypto_methods.ts", - "type": "cjs require", - "userRequest": "../bin_utils", - "loc": "3:20-43" - }, - { - "moduleId": 26, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\srp.ts", - "module": "./src/lib/crypto/srp.ts", - "moduleName": "./src/lib/crypto/srp.ts", - "type": "cjs require", - "userRequest": "../bin_utils", - "loc": "16:20-43" - }, - { - "moduleId": 27, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 28, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 30, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 31, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 32, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 33, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\cacheStorage.ts", - "module": "./src/lib/cacheStorage.ts", - "moduleName": "./src/lib/cacheStorage.ts", - "type": "cjs require", - "userRequest": "./bin_utils", - "loc": "15:20-42" - } - ], - "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 \r\n * https://github.com/zhukov/webogram/blob/master/LICENSE\r\n */\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.getFileNameByLocation = exports.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 let blob;\r\n const 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 let bb = new BlobBuilder;\r\n blobParts.forEach((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 'application/json'\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\nfunction getFileNameByLocation(location, options) {\r\n const fileName = ''; //(options?.fileName || '').split('.');\r\n const ext = fileName[fileName.length - 1] || '';\r\n switch (location._) {\r\n case 'inputPhotoFileLocation':\r\n case 'inputDocumentFileLocation': {\r\n const thumbPart = location.thumb_size ? '_' + location.thumb_size : '';\r\n return (fileName[0] ? fileName[0] + '_' : '') + location.id + thumbPart + (ext ? '.' + ext : ext);\r\n }\r\n case 'fileLocationToBeDeprecated':\r\n case 'inputPeerPhotoFileLocation':\r\n case 'inputStickerSetThumb':\r\n case 'inputFileLocation': {\r\n return location.volume_id + '_' + location.local_id + (ext ? '.' + ext : ext);\r\n }\r\n default: {\r\n console.error('Unrecognized location:', location);\r\n return '';\r\n }\r\n }\r\n}\r\nexports.getFileNameByLocation = getFileNameByLocation;\r\n" - }, - { - "id": 1, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\logger.ts", - "name": "./src/lib/logger.ts", - "index": 21, - "index2": 15, - "size": 1851, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "issuerId": 19, - "issuerName": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - } - ], - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiManager.ts", - "module": "./src/lib/mtproto/apiManager.ts", - "moduleName": "./src/lib/mtproto/apiManager.ts", - "type": "cjs require", - "userRequest": "../logger", - "loc": "24:17-37" - }, - { - "moduleId": 19, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "module": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "moduleName": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "type": "cjs require", - "userRequest": "../logger", - "loc": "23:17-37" - }, - { - "moduleId": 21, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\networker.ts", - "module": "./src/lib/mtproto/networker.ts", - "moduleName": "./src/lib/mtproto/networker.ts", - "type": "cjs require", - "userRequest": "../logger", - "loc": "26:17-37" - }, - { - "moduleId": 26, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\srp.ts", - "module": "./src/lib/crypto/srp.ts", - "moduleName": "./src/lib/crypto/srp.ts", - "type": "cjs require", - "userRequest": "../logger", - "loc": "19:17-37" - }, - { - "moduleId": 27, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": "../../logger", - "loc": "12:17-40" - }, - { - "moduleId": 30, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\authorizer.ts", - "module": "./src/lib/mtproto/authorizer.ts", - "moduleName": "./src/lib/mtproto/authorizer.ts", - "type": "cjs require", - "userRequest": "../logger", - "loc": "24:17-37" - }, - { - "moduleId": 32, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiFileManager.ts", - "module": "./src/lib/mtproto/apiFileManager.ts", - "moduleName": "./src/lib/mtproto/apiFileManager.ts", - "type": "cjs require", - "userRequest": "../logger", - "loc": "20:17-37" - } - ], - "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.logger = exports.LogLevels = void 0;\r\nvar LogLevels;\r\n(function (LogLevels) {\r\n LogLevels[LogLevels[\"log\"] = 1] = \"log\";\r\n LogLevels[LogLevels[\"warn\"] = 2] = \"warn\";\r\n LogLevels[LogLevels[\"error\"] = 4] = \"error\";\r\n LogLevels[LogLevels[\"debug\"] = 8] = \"debug\";\r\n})(LogLevels = exports.LogLevels || (exports.LogLevels = {}));\r\n;\r\nvar _logTimer = Date.now();\r\nfunction dT() {\r\n return '[' + ((Date.now() - _logTimer) / 1000).toFixed(3) + ']';\r\n}\r\nfunction logger(prefix, level = LogLevels.log | LogLevels.warn | LogLevels.error) {\r\n // @ts-ignore\r\n if (process.env.NODE_ENV == 'production' /* || true */) {\r\n level = LogLevels.error;\r\n }\r\n //level = LogLevels.log | LogLevels.warn | LogLevels.error | LogLevels.debug\r\n function Log(...args) {\r\n return level & LogLevels.log && console.log(dT(), '[' + prefix + ']:', ...args);\r\n }\r\n Log.warn = function (...args) {\r\n return level & LogLevels.warn && console.warn(dT(), '[' + prefix + ']:', ...args);\r\n };\r\n Log.info = function (...args) {\r\n return level & LogLevels.log && console.info(dT(), '[' + prefix + ']:', ...args);\r\n };\r\n Log.error = function (...args) {\r\n return level & LogLevels.error && console.error(dT(), '[' + prefix + ']:', ...args);\r\n };\r\n Log.trace = function (...args) {\r\n return level & LogLevels.log && console.trace(dT(), '[' + prefix + ']:', ...args);\r\n };\r\n /* Log.debug = function(...args: any[]) {\r\n return level & LogLevels.debug && console.log(dT(), '[' + prefix + ']:', ...args);\r\n }; */\r\n Log.debug = function (...args) {\r\n return level & LogLevels.debug && console.debug(dT(), '[' + prefix + ']:', ...args);\r\n };\r\n return Log;\r\n}\r\nexports.logger = logger;\r\n;\r\n" - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\cryptoworker.ts", - "name": "./src/lib/crypto/cryptoworker.ts", - "index": 18, - "index2": 17, - "size": 4865, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "issuerId": 19, - "issuerName": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - } - ], - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 19, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "module": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "moduleName": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "type": "cjs require", - "userRequest": "../crypto/cryptoworker", - "loc": "20:39-72" - }, - { - "moduleId": 21, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\srp.ts", - "module": "./src/lib/crypto/srp.ts", - "moduleName": "./src/lib/crypto/srp.ts", - "type": "cjs require", - "userRequest": "../crypto/cryptoworker", - "loc": "17:39-72" - }, - { - "moduleId": 30, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 31, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 32, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiFileManager.ts", - "module": "./src/lib/mtproto/apiFileManager.ts", - "moduleName": "./src/lib/mtproto/apiFileManager.ts", - "type": "cjs require", - "userRequest": "../crypto/cryptoworker", - "loc": "22: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 'gzipUncompress': utils.gzipUncompress,\r\n });\r\n }),\r\n Promise.resolve().then(() => __importStar(require('./srp'))).then(srp => {\r\n this.utils.computeSRP = srp.computeSRP;\r\n }) /* ,\r\n \r\n import('../bin_utils').then(utils => {\r\n this.utils.unzip = utils.gzipUncompress;\r\n }) */\r\n ]);\r\n return;\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": 3, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\storage.ts", - "name": "./src/lib/storage.ts", - "index": 5, - "index2": 5, - "size": 6067, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "issuerId": 19, - "issuerName": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - } - ], - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 16, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 19, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "module": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "moduleName": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "type": "cjs require", - "userRequest": "../storage", - "loc": "19:34-55" - }, - { - "moduleId": 21, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 29, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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\nconst context_1 = require(\"../helpers/context\");\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\nclass AppStorage {\r\n constructor() {\r\n this.taskID = 0;\r\n this.tasks = {};\r\n //private log = (...args: any[]) => console.log('[SW LS]', ...args);\r\n this.log = (...args) => { };\r\n if (mtproto_config_1.Modes.test) {\r\n this.setPrefix('t_');\r\n }\r\n if (!context_1.isWorker) {\r\n this.configStorage = new ConfigStorage();\r\n }\r\n }\r\n setPrefix(newPrefix) {\r\n if (this.configStorage) {\r\n this.configStorage.keyPrefix = newPrefix;\r\n }\r\n }\r\n noPrefix() {\r\n if (this.configStorage) {\r\n this.configStorage.noPrefix = true;\r\n }\r\n }\r\n finishTask(taskID, result) {\r\n this.log('finishTask:', taskID, result, Object.keys(this.tasks));\r\n if (!this.tasks.hasOwnProperty(taskID)) {\r\n this.log('no such task:', taskID, result);\r\n return;\r\n }\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 (context_1.isWorker) {\r\n const taskID = this.taskID++;\r\n this.tasks[taskID] = resolve;\r\n const task = { useLs: true, task: methodName, taskID, args: _args };\r\n context_1.notifySomeone(task);\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 this.configStorage[methodName].apply(this.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": 4, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto_config.ts", - "name": "./src/lib/mtproto/mtproto_config.ts", - "index": 6, - "index2": 3, - "size": 467, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\storage.ts", - "issuerId": 3, - "issuerName": "./src/lib/storage.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 3, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\storage.ts", - "name": "./src/lib/storage.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - } - ], - "profile": { - "factory": 17, - "building": 19 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 3, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 8, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 21, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 29, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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: false,\r\n ssl: true,\r\n multipleConnections: true\r\n};\r\n" - }, - { - "id": 5, - "identifier": "F:\\tweb\\node_modules\\jsbn\\index.js", - "name": "./node_modules/jsbn/index.js", - "index": 3, - "index2": 0, - "size": 42308, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\polyfill.ts", - "issuerId": 20, - "issuerName": "./src/lib/polyfill.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 20, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\polyfill.ts", - "name": "./src/lib/polyfill.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - } - ], - "profile": { - "factory": 0, - "building": 323, - "dependencies": 53 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 0, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\bin_utils.ts", - "module": "./src/lib/bin_utils.ts", - "moduleName": "./src/lib/bin_utils.ts", - "type": "cjs require", - "userRequest": "jsbn", - "loc": "11:15-30" - }, - { - "moduleId": 13, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 20, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 30, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 2, - "source": "(function(){\n\n // Copyright (c) 2005 Tom Wu\n // All Rights Reserved.\n // See \"LICENSE\" for details.\n\n // Basic JavaScript BN library - subset useful for RSA encryption.\n\n // Bits per digit\n var dbits;\n\n // JavaScript engine analysis\n var canary = 0xdeadbeefcafe;\n var j_lm = ((canary&0xffffff)==0xefcafe);\n\n // (public) Constructor\n function BigInteger(a,b,c) {\n if(a != null)\n if(\"number\" == typeof a) this.fromNumber(a,b,c);\n else if(b == null && \"string\" != typeof a) this.fromString(a,256);\n else this.fromString(a,b);\n }\n\n // return new, unset BigInteger\n function nbi() { return new BigInteger(null); }\n\n // am: Compute w_j += (x*this_i), propagate carries,\n // c is initial carry, returns final carry.\n // c < 3*dvalue, x < 2*dvalue, this_i < dvalue\n // We need to select the fastest one that works in this environment.\n\n // am1: use a single mult and divide to get the high bits,\n // max digit bits should be 26 because\n // max internal value = 2*dvalue^2-2*dvalue (< 2^53)\n function am1(i,x,w,j,c,n) {\n while(--n >= 0) {\n var v = x*this[i++]+w[j]+c;\n c = Math.floor(v/0x4000000);\n w[j++] = v&0x3ffffff;\n }\n return c;\n }\n // am2 avoids a big mult-and-extract completely.\n // Max digit bits should be <= 30 because we do bitwise ops\n // on values up to 2*hdvalue^2-hdvalue-1 (< 2^31)\n function am2(i,x,w,j,c,n) {\n var xl = x&0x7fff, xh = x>>15;\n while(--n >= 0) {\n var l = this[i]&0x7fff;\n var h = this[i++]>>15;\n var m = xh*l+h*xl;\n l = xl*l+((m&0x7fff)<<15)+w[j]+(c&0x3fffffff);\n c = (l>>>30)+(m>>>15)+xh*h+(c>>>30);\n w[j++] = l&0x3fffffff;\n }\n return c;\n }\n // Alternately, set max digit bits to 28 since some\n // browsers slow down when dealing with 32-bit numbers.\n function am3(i,x,w,j,c,n) {\n var xl = x&0x3fff, xh = x>>14;\n while(--n >= 0) {\n var l = this[i]&0x3fff;\n var h = this[i++]>>14;\n var m = xh*l+h*xl;\n l = xl*l+((m&0x3fff)<<14)+w[j]+c;\n c = (l>>28)+(m>>14)+xh*h;\n w[j++] = l&0xfffffff;\n }\n return c;\n }\n var inBrowser = typeof navigator !== \"undefined\";\n if(inBrowser && j_lm && (navigator.appName == \"Microsoft Internet Explorer\")) {\n BigInteger.prototype.am = am2;\n dbits = 30;\n }\n else if(inBrowser && j_lm && (navigator.appName != \"Netscape\")) {\n BigInteger.prototype.am = am1;\n dbits = 26;\n }\n else { // Mozilla/Netscape seems to prefer am3\n BigInteger.prototype.am = am3;\n dbits = 28;\n }\n\n BigInteger.prototype.DB = dbits;\n BigInteger.prototype.DM = ((1<= 0; --i) r[i] = this[i];\n r.t = this.t;\n r.s = this.s;\n }\n\n // (protected) set from integer value x, -DV <= x < DV\n function bnpFromInt(x) {\n this.t = 1;\n this.s = (x<0)?-1:0;\n if(x > 0) this[0] = x;\n else if(x < -1) this[0] = x+this.DV;\n else this.t = 0;\n }\n\n // return bigint initialized to value\n function nbv(i) { var r = nbi(); r.fromInt(i); return r; }\n\n // (protected) set from string and radix\n function bnpFromString(s,b) {\n var k;\n if(b == 16) k = 4;\n else if(b == 8) k = 3;\n else if(b == 256) k = 8; // byte array\n else if(b == 2) k = 1;\n else if(b == 32) k = 5;\n else if(b == 4) k = 2;\n else { this.fromRadix(s,b); return; }\n this.t = 0;\n this.s = 0;\n var i = s.length, mi = false, sh = 0;\n while(--i >= 0) {\n var x = (k==8)?s[i]&0xff:intAt(s,i);\n if(x < 0) {\n if(s.charAt(i) == \"-\") mi = true;\n continue;\n }\n mi = false;\n if(sh == 0)\n this[this.t++] = x;\n else if(sh+k > this.DB) {\n this[this.t-1] |= (x&((1<<(this.DB-sh))-1))<>(this.DB-sh));\n }\n else\n this[this.t-1] |= x<= this.DB) sh -= this.DB;\n }\n if(k == 8 && (s[0]&0x80) != 0) {\n this.s = -1;\n if(sh > 0) this[this.t-1] |= ((1<<(this.DB-sh))-1)< 0 && this[this.t-1] == c) --this.t;\n }\n\n // (public) return string representation in given radix\n function bnToString(b) {\n if(this.s < 0) return \"-\"+this.negate().toString(b);\n var k;\n if(b == 16) k = 4;\n else if(b == 8) k = 3;\n else if(b == 2) k = 1;\n else if(b == 32) k = 5;\n else if(b == 4) k = 2;\n else return this.toRadix(b);\n var km = (1< 0) {\n if(p < this.DB && (d = this[i]>>p) > 0) { m = true; r = int2char(d); }\n while(i >= 0) {\n if(p < k) {\n d = (this[i]&((1<>(p+=this.DB-k);\n }\n else {\n d = (this[i]>>(p-=k))&km;\n if(p <= 0) { p += this.DB; --i; }\n }\n if(d > 0) m = true;\n if(m) r += int2char(d);\n }\n }\n return m?r:\"0\";\n }\n\n // (public) -this\n function bnNegate() { var r = nbi(); BigInteger.ZERO.subTo(this,r); return r; }\n\n // (public) |this|\n function bnAbs() { return (this.s<0)?this.negate():this; }\n\n // (public) return + if this > a, - if this < a, 0 if equal\n function bnCompareTo(a) {\n var r = this.s-a.s;\n if(r != 0) return r;\n var i = this.t;\n r = i-a.t;\n if(r != 0) return (this.s<0)?-r:r;\n while(--i >= 0) if((r=this[i]-a[i]) != 0) return r;\n return 0;\n }\n\n // returns bit length of the integer x\n function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }\n\n // (public) return the number of bits in \"this\"\n function bnBitLength() {\n if(this.t <= 0) return 0;\n return this.DB*(this.t-1)+nbits(this[this.t-1]^(this.s&this.DM));\n }\n\n // (protected) r = this << n*DB\n function bnpDLShiftTo(n,r) {\n var i;\n for(i = this.t-1; i >= 0; --i) r[i+n] = this[i];\n for(i = n-1; i >= 0; --i) r[i] = 0;\n r.t = this.t+n;\n r.s = this.s;\n }\n\n // (protected) r = this >> n*DB\n function bnpDRShiftTo(n,r) {\n for(var i = n; i < this.t; ++i) r[i-n] = this[i];\n r.t = Math.max(this.t-n,0);\n r.s = this.s;\n }\n\n // (protected) r = this << n\n function bnpLShiftTo(n,r) {\n var bs = n%this.DB;\n var cbs = this.DB-bs;\n var bm = (1<= 0; --i) {\n r[i+ds+1] = (this[i]>>cbs)|c;\n c = (this[i]&bm)<= 0; --i) r[i] = 0;\n r[ds] = c;\n r.t = this.t+ds+1;\n r.s = this.s;\n r.clamp();\n }\n\n // (protected) r = this >> n\n function bnpRShiftTo(n,r) {\n r.s = this.s;\n var ds = Math.floor(n/this.DB);\n if(ds >= this.t) { r.t = 0; return; }\n var bs = n%this.DB;\n var cbs = this.DB-bs;\n var bm = (1<>bs;\n for(var i = ds+1; i < this.t; ++i) {\n r[i-ds-1] |= (this[i]&bm)<>bs;\n }\n if(bs > 0) r[this.t-ds-1] |= (this.s&bm)<>= this.DB;\n }\n if(a.t < this.t) {\n c -= a.s;\n while(i < this.t) {\n c += this[i];\n r[i++] = c&this.DM;\n c >>= this.DB;\n }\n c += this.s;\n }\n else {\n c += this.s;\n while(i < a.t) {\n c -= a[i];\n r[i++] = c&this.DM;\n c >>= this.DB;\n }\n c -= a.s;\n }\n r.s = (c<0)?-1:0;\n if(c < -1) r[i++] = this.DV+c;\n else if(c > 0) r[i++] = c;\n r.t = i;\n r.clamp();\n }\n\n // (protected) r = this * a, r != this,a (HAC 14.12)\n // \"this\" should be the larger one if appropriate.\n function bnpMultiplyTo(a,r) {\n var x = this.abs(), y = a.abs();\n var i = x.t;\n r.t = i+y.t;\n while(--i >= 0) r[i] = 0;\n for(i = 0; i < y.t; ++i) r[i+x.t] = x.am(0,y[i],r,i,0,x.t);\n r.s = 0;\n r.clamp();\n if(this.s != a.s) BigInteger.ZERO.subTo(r,r);\n }\n\n // (protected) r = this^2, r != this (HAC 14.16)\n function bnpSquareTo(r) {\n var x = this.abs();\n var i = r.t = 2*x.t;\n while(--i >= 0) r[i] = 0;\n for(i = 0; i < x.t-1; ++i) {\n var c = x.am(i,x[i],r,2*i,0,1);\n if((r[i+x.t]+=x.am(i+1,2*x[i],r,2*i+1,c,x.t-i-1)) >= x.DV) {\n r[i+x.t] -= x.DV;\n r[i+x.t+1] = 1;\n }\n }\n if(r.t > 0) r[r.t-1] += x.am(i,x[i],r,2*i,0,1);\n r.s = 0;\n r.clamp();\n }\n\n // (protected) divide this by m, quotient and remainder to q, r (HAC 14.20)\n // r != q, this != m. q or r may be null.\n function bnpDivRemTo(m,q,r) {\n var pm = m.abs();\n if(pm.t <= 0) return;\n var pt = this.abs();\n if(pt.t < pm.t) {\n if(q != null) q.fromInt(0);\n if(r != null) this.copyTo(r);\n return;\n }\n if(r == null) r = nbi();\n var y = nbi(), ts = this.s, ms = m.s;\n var nsh = this.DB-nbits(pm[pm.t-1]); // normalize modulus\n if(nsh > 0) { pm.lShiftTo(nsh,y); pt.lShiftTo(nsh,r); }\n else { pm.copyTo(y); pt.copyTo(r); }\n var ys = y.t;\n var y0 = y[ys-1];\n if(y0 == 0) return;\n var yt = y0*(1<1)?y[ys-2]>>this.F2:0);\n var d1 = this.FV/yt, d2 = (1<= 0) {\n r[r.t++] = 1;\n r.subTo(t,r);\n }\n BigInteger.ONE.dlShiftTo(ys,t);\n t.subTo(y,y); // \"negative\" y so we can replace sub with am later\n while(y.t < ys) y[y.t++] = 0;\n while(--j >= 0) {\n // Estimate quotient digit\n var qd = (r[--i]==y0)?this.DM:Math.floor(r[i]*d1+(r[i-1]+e)*d2);\n if((r[i]+=y.am(0,qd,r,j,0,ys)) < qd) { // Try it out\n y.dlShiftTo(j,t);\n r.subTo(t,r);\n while(r[i] < --qd) r.subTo(t,r);\n }\n }\n if(q != null) {\n r.drShiftTo(ys,q);\n if(ts != ms) BigInteger.ZERO.subTo(q,q);\n }\n r.t = ys;\n r.clamp();\n if(nsh > 0) r.rShiftTo(nsh,r); // Denormalize remainder\n if(ts < 0) BigInteger.ZERO.subTo(r,r);\n }\n\n // (public) this mod a\n function bnMod(a) {\n var r = nbi();\n this.abs().divRemTo(a,null,r);\n if(this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) a.subTo(r,r);\n return r;\n }\n\n // Modular reduction using \"classic\" algorithm\n function Classic(m) { this.m = m; }\n function cConvert(x) {\n if(x.s < 0 || x.compareTo(this.m) >= 0) return x.mod(this.m);\n else return x;\n }\n function cRevert(x) { return x; }\n function cReduce(x) { x.divRemTo(this.m,null,x); }\n function cMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }\n function cSqrTo(x,r) { x.squareTo(r); this.reduce(r); }\n\n Classic.prototype.convert = cConvert;\n Classic.prototype.revert = cRevert;\n Classic.prototype.reduce = cReduce;\n Classic.prototype.mulTo = cMulTo;\n Classic.prototype.sqrTo = cSqrTo;\n\n // (protected) return \"-1/this % 2^DB\"; useful for Mont. reduction\n // justification:\n // xy == 1 (mod m)\n // xy = 1+km\n // xy(2-xy) = (1+km)(1-km)\n // x[y(2-xy)] = 1-k^2m^2\n // x[y(2-xy)] == 1 (mod m^2)\n // if y is 1/x mod m, then y(2-xy) is 1/x mod m^2\n // should reduce x and y(2-xy) by m^2 at each step to keep size bounded.\n // JS multiply \"overflows\" differently from C/C++, so care is needed here.\n function bnpInvDigit() {\n if(this.t < 1) return 0;\n var x = this[0];\n if((x&1) == 0) return 0;\n var y = x&3; // y == 1/x mod 2^2\n y = (y*(2-(x&0xf)*y))&0xf; // y == 1/x mod 2^4\n y = (y*(2-(x&0xff)*y))&0xff; // y == 1/x mod 2^8\n y = (y*(2-(((x&0xffff)*y)&0xffff)))&0xffff; // y == 1/x mod 2^16\n // last step - calculate inverse mod DV directly;\n // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints\n y = (y*(2-x*y%this.DV))%this.DV; // y == 1/x mod 2^dbits\n // we really want the negative inverse, and -DV < y < DV\n return (y>0)?this.DV-y:-y;\n }\n\n // Montgomery reduction\n function Montgomery(m) {\n this.m = m;\n this.mp = m.invDigit();\n this.mpl = this.mp&0x7fff;\n this.mph = this.mp>>15;\n this.um = (1<<(m.DB-15))-1;\n this.mt2 = 2*m.t;\n }\n\n // xR mod m\n function montConvert(x) {\n var r = nbi();\n x.abs().dlShiftTo(this.m.t,r);\n r.divRemTo(this.m,null,r);\n if(x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) this.m.subTo(r,r);\n return r;\n }\n\n // x/R mod m\n function montRevert(x) {\n var r = nbi();\n x.copyTo(r);\n this.reduce(r);\n return r;\n }\n\n // x = x/R mod m (HAC 14.32)\n function montReduce(x) {\n while(x.t <= this.mt2) // pad x so am has enough room later\n x[x.t++] = 0;\n for(var i = 0; i < this.m.t; ++i) {\n // faster way of calculating u0 = x[i]*mp mod DV\n var j = x[i]&0x7fff;\n var u0 = (j*this.mpl+(((j*this.mph+(x[i]>>15)*this.mpl)&this.um)<<15))&x.DM;\n // use am to combine the multiply-shift-add into one call\n j = i+this.m.t;\n x[j] += this.m.am(0,u0,x,i,0,this.m.t);\n // propagate carry\n while(x[j] >= x.DV) { x[j] -= x.DV; x[++j]++; }\n }\n x.clamp();\n x.drShiftTo(this.m.t,x);\n if(x.compareTo(this.m) >= 0) x.subTo(this.m,x);\n }\n\n // r = \"x^2/R mod m\"; x != r\n function montSqrTo(x,r) { x.squareTo(r); this.reduce(r); }\n\n // r = \"xy/R mod m\"; x,y != r\n function montMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }\n\n Montgomery.prototype.convert = montConvert;\n Montgomery.prototype.revert = montRevert;\n Montgomery.prototype.reduce = montReduce;\n Montgomery.prototype.mulTo = montMulTo;\n Montgomery.prototype.sqrTo = montSqrTo;\n\n // (protected) true iff this is even\n function bnpIsEven() { return ((this.t>0)?(this[0]&1):this.s) == 0; }\n\n // (protected) this^e, e < 2^32, doing sqr and mul with \"r\" (HAC 14.79)\n function bnpExp(e,z) {\n if(e > 0xffffffff || e < 1) return BigInteger.ONE;\n var r = nbi(), r2 = nbi(), g = z.convert(this), i = nbits(e)-1;\n g.copyTo(r);\n while(--i >= 0) {\n z.sqrTo(r,r2);\n if((e&(1< 0) z.mulTo(r2,g,r);\n else { var t = r; r = r2; r2 = t; }\n }\n return z.revert(r);\n }\n\n // (public) this^e % m, 0 <= e < 2^32\n function bnModPowInt(e,m) {\n var z;\n if(e < 256 || m.isEven()) z = new Classic(m); else z = new Montgomery(m);\n return this.exp(e,z);\n }\n\n // protected\n BigInteger.prototype.copyTo = bnpCopyTo;\n BigInteger.prototype.fromInt = bnpFromInt;\n BigInteger.prototype.fromString = bnpFromString;\n BigInteger.prototype.clamp = bnpClamp;\n BigInteger.prototype.dlShiftTo = bnpDLShiftTo;\n BigInteger.prototype.drShiftTo = bnpDRShiftTo;\n BigInteger.prototype.lShiftTo = bnpLShiftTo;\n BigInteger.prototype.rShiftTo = bnpRShiftTo;\n BigInteger.prototype.subTo = bnpSubTo;\n BigInteger.prototype.multiplyTo = bnpMultiplyTo;\n BigInteger.prototype.squareTo = bnpSquareTo;\n BigInteger.prototype.divRemTo = bnpDivRemTo;\n BigInteger.prototype.invDigit = bnpInvDigit;\n BigInteger.prototype.isEven = bnpIsEven;\n BigInteger.prototype.exp = bnpExp;\n\n // public\n BigInteger.prototype.toString = bnToString;\n BigInteger.prototype.negate = bnNegate;\n BigInteger.prototype.abs = bnAbs;\n BigInteger.prototype.compareTo = bnCompareTo;\n BigInteger.prototype.bitLength = bnBitLength;\n BigInteger.prototype.mod = bnMod;\n BigInteger.prototype.modPowInt = bnModPowInt;\n\n // \"constants\"\n BigInteger.ZERO = nbv(0);\n BigInteger.ONE = nbv(1);\n\n // Copyright (c) 2005-2009 Tom Wu\n // All Rights Reserved.\n // See \"LICENSE\" for details.\n\n // Extended JavaScript BN functions, required for RSA private ops.\n\n // Version 1.1: new BigInteger(\"0\", 10) returns \"proper\" zero\n // Version 1.2: square() API, isProbablePrime fix\n\n // (public)\n function bnClone() { var r = nbi(); this.copyTo(r); return r; }\n\n // (public) return value as integer\n function bnIntValue() {\n if(this.s < 0) {\n if(this.t == 1) return this[0]-this.DV;\n else if(this.t == 0) return -1;\n }\n else if(this.t == 1) return this[0];\n else if(this.t == 0) return 0;\n // assumes 16 < DB < 32\n return ((this[1]&((1<<(32-this.DB))-1))<>24; }\n\n // (public) return value as short (assumes DB>=16)\n function bnShortValue() { return (this.t==0)?this.s:(this[0]<<16)>>16; }\n\n // (protected) return x s.t. r^x < DV\n function bnpChunkSize(r) { return Math.floor(Math.LN2*this.DB/Math.log(r)); }\n\n // (public) 0 if this == 0, 1 if this > 0\n function bnSigNum() {\n if(this.s < 0) return -1;\n else if(this.t <= 0 || (this.t == 1 && this[0] <= 0)) return 0;\n else return 1;\n }\n\n // (protected) convert to radix string\n function bnpToRadix(b) {\n if(b == null) b = 10;\n if(this.signum() == 0 || b < 2 || b > 36) return \"0\";\n var cs = this.chunkSize(b);\n var a = Math.pow(b,cs);\n var d = nbv(a), y = nbi(), z = nbi(), r = \"\";\n this.divRemTo(d,y,z);\n while(y.signum() > 0) {\n r = (a+z.intValue()).toString(b).substr(1) + r;\n y.divRemTo(d,y,z);\n }\n return z.intValue().toString(b) + r;\n }\n\n // (protected) convert from radix string\n function bnpFromRadix(s,b) {\n this.fromInt(0);\n if(b == null) b = 10;\n var cs = this.chunkSize(b);\n var d = Math.pow(b,cs), mi = false, j = 0, w = 0;\n for(var i = 0; i < s.length; ++i) {\n var x = intAt(s,i);\n if(x < 0) {\n if(s.charAt(i) == \"-\" && this.signum() == 0) mi = true;\n continue;\n }\n w = b*w+x;\n if(++j >= cs) {\n this.dMultiply(d);\n this.dAddOffset(w,0);\n j = 0;\n w = 0;\n }\n }\n if(j > 0) {\n this.dMultiply(Math.pow(b,j));\n this.dAddOffset(w,0);\n }\n if(mi) BigInteger.ZERO.subTo(this,this);\n }\n\n // (protected) alternate constructor\n function bnpFromNumber(a,b,c) {\n if(\"number\" == typeof b) {\n // new BigInteger(int,int,RNG)\n if(a < 2) this.fromInt(1);\n else {\n this.fromNumber(a,c);\n if(!this.testBit(a-1)) // force MSB set\n this.bitwiseTo(BigInteger.ONE.shiftLeft(a-1),op_or,this);\n if(this.isEven()) this.dAddOffset(1,0); // force odd\n while(!this.isProbablePrime(b)) {\n this.dAddOffset(2,0);\n if(this.bitLength() > a) this.subTo(BigInteger.ONE.shiftLeft(a-1),this);\n }\n }\n }\n else {\n // new BigInteger(int,RNG)\n var x = new Array(), t = a&7;\n x.length = (a>>3)+1;\n b.nextBytes(x);\n if(t > 0) x[0] &= ((1< 0) {\n if(p < this.DB && (d = this[i]>>p) != (this.s&this.DM)>>p)\n r[k++] = d|(this.s<<(this.DB-p));\n while(i >= 0) {\n if(p < 8) {\n d = (this[i]&((1<>(p+=this.DB-8);\n }\n else {\n d = (this[i]>>(p-=8))&0xff;\n if(p <= 0) { p += this.DB; --i; }\n }\n if((d&0x80) != 0) d |= -256;\n if(k == 0 && (this.s&0x80) != (d&0x80)) ++k;\n if(k > 0 || d != this.s) r[k++] = d;\n }\n }\n return r;\n }\n\n function bnEquals(a) { return(this.compareTo(a)==0); }\n function bnMin(a) { return(this.compareTo(a)<0)?this:a; }\n function bnMax(a) { return(this.compareTo(a)>0)?this:a; }\n\n // (protected) r = this op a (bitwise)\n function bnpBitwiseTo(a,op,r) {\n var i, f, m = Math.min(a.t,this.t);\n for(i = 0; i < m; ++i) r[i] = op(this[i],a[i]);\n if(a.t < this.t) {\n f = a.s&this.DM;\n for(i = m; i < this.t; ++i) r[i] = op(this[i],f);\n r.t = this.t;\n }\n else {\n f = this.s&this.DM;\n for(i = m; i < a.t; ++i) r[i] = op(f,a[i]);\n r.t = a.t;\n }\n r.s = op(this.s,a.s);\n r.clamp();\n }\n\n // (public) this & a\n function op_and(x,y) { return x&y; }\n function bnAnd(a) { var r = nbi(); this.bitwiseTo(a,op_and,r); return r; }\n\n // (public) this | a\n function op_or(x,y) { return x|y; }\n function bnOr(a) { var r = nbi(); this.bitwiseTo(a,op_or,r); return r; }\n\n // (public) this ^ a\n function op_xor(x,y) { return x^y; }\n function bnXor(a) { var r = nbi(); this.bitwiseTo(a,op_xor,r); return r; }\n\n // (public) this & ~a\n function op_andnot(x,y) { return x&~y; }\n function bnAndNot(a) { var r = nbi(); this.bitwiseTo(a,op_andnot,r); return r; }\n\n // (public) ~this\n function bnNot() {\n var r = nbi();\n for(var i = 0; i < this.t; ++i) r[i] = this.DM&~this[i];\n r.t = this.t;\n r.s = ~this.s;\n return r;\n }\n\n // (public) this << n\n function bnShiftLeft(n) {\n var r = nbi();\n if(n < 0) this.rShiftTo(-n,r); else this.lShiftTo(n,r);\n return r;\n }\n\n // (public) this >> n\n function bnShiftRight(n) {\n var r = nbi();\n if(n < 0) this.lShiftTo(-n,r); else this.rShiftTo(n,r);\n return r;\n }\n\n // return index of lowest 1-bit in x, x < 2^31\n function lbit(x) {\n if(x == 0) return -1;\n var r = 0;\n if((x&0xffff) == 0) { x >>= 16; r += 16; }\n if((x&0xff) == 0) { x >>= 8; r += 8; }\n if((x&0xf) == 0) { x >>= 4; r += 4; }\n if((x&3) == 0) { x >>= 2; r += 2; }\n if((x&1) == 0) ++r;\n return r;\n }\n\n // (public) returns index of lowest 1-bit (or -1 if none)\n function bnGetLowestSetBit() {\n for(var i = 0; i < this.t; ++i)\n if(this[i] != 0) return i*this.DB+lbit(this[i]);\n if(this.s < 0) return this.t*this.DB;\n return -1;\n }\n\n // return number of 1 bits in x\n function cbit(x) {\n var r = 0;\n while(x != 0) { x &= x-1; ++r; }\n return r;\n }\n\n // (public) return number of set bits\n function bnBitCount() {\n var r = 0, x = this.s&this.DM;\n for(var i = 0; i < this.t; ++i) r += cbit(this[i]^x);\n return r;\n }\n\n // (public) true iff nth bit is set\n function bnTestBit(n) {\n var j = Math.floor(n/this.DB);\n if(j >= this.t) return(this.s!=0);\n return((this[j]&(1<<(n%this.DB)))!=0);\n }\n\n // (protected) this op (1<>= this.DB;\n }\n if(a.t < this.t) {\n c += a.s;\n while(i < this.t) {\n c += this[i];\n r[i++] = c&this.DM;\n c >>= this.DB;\n }\n c += this.s;\n }\n else {\n c += this.s;\n while(i < a.t) {\n c += a[i];\n r[i++] = c&this.DM;\n c >>= this.DB;\n }\n c += a.s;\n }\n r.s = (c<0)?-1:0;\n if(c > 0) r[i++] = c;\n else if(c < -1) r[i++] = this.DV+c;\n r.t = i;\n r.clamp();\n }\n\n // (public) this + a\n function bnAdd(a) { var r = nbi(); this.addTo(a,r); return r; }\n\n // (public) this - a\n function bnSubtract(a) { var r = nbi(); this.subTo(a,r); return r; }\n\n // (public) this * a\n function bnMultiply(a) { var r = nbi(); this.multiplyTo(a,r); return r; }\n\n // (public) this^2\n function bnSquare() { var r = nbi(); this.squareTo(r); return r; }\n\n // (public) this / a\n function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }\n\n // (public) this % a\n function bnRemainder(a) { var r = nbi(); this.divRemTo(a,null,r); return r; }\n\n // (public) [this/a,this%a]\n function bnDivideAndRemainder(a) {\n var q = nbi(), r = nbi();\n this.divRemTo(a,q,r);\n return new Array(q,r);\n }\n\n // (protected) this *= n, this >= 0, 1 < n < DV\n function bnpDMultiply(n) {\n this[this.t] = this.am(0,n-1,this,0,0,this.t);\n ++this.t;\n this.clamp();\n }\n\n // (protected) this += n << w words, this >= 0\n function bnpDAddOffset(n,w) {\n if(n == 0) return;\n while(this.t <= w) this[this.t++] = 0;\n this[w] += n;\n while(this[w] >= this.DV) {\n this[w] -= this.DV;\n if(++w >= this.t) this[this.t++] = 0;\n ++this[w];\n }\n }\n\n // A \"null\" reducer\n function NullExp() {}\n function nNop(x) { return x; }\n function nMulTo(x,y,r) { x.multiplyTo(y,r); }\n function nSqrTo(x,r) { x.squareTo(r); }\n\n NullExp.prototype.convert = nNop;\n NullExp.prototype.revert = nNop;\n NullExp.prototype.mulTo = nMulTo;\n NullExp.prototype.sqrTo = nSqrTo;\n\n // (public) this^e\n function bnPow(e) { return this.exp(e,new NullExp()); }\n\n // (protected) r = lower n words of \"this * a\", a.t <= n\n // \"this\" should be the larger one if appropriate.\n function bnpMultiplyLowerTo(a,n,r) {\n var i = Math.min(this.t+a.t,n);\n r.s = 0; // assumes a,this >= 0\n r.t = i;\n while(i > 0) r[--i] = 0;\n var j;\n for(j = r.t-this.t; i < j; ++i) r[i+this.t] = this.am(0,a[i],r,i,0,this.t);\n for(j = Math.min(a.t,n); i < j; ++i) this.am(0,a[i],r,i,0,n-i);\n r.clamp();\n }\n\n // (protected) r = \"this * a\" without lower n words, n > 0\n // \"this\" should be the larger one if appropriate.\n function bnpMultiplyUpperTo(a,n,r) {\n --n;\n var i = r.t = this.t+a.t-n;\n r.s = 0; // assumes a,this >= 0\n while(--i >= 0) r[i] = 0;\n for(i = Math.max(n-this.t,0); i < a.t; ++i)\n r[this.t+i-n] = this.am(n-i,a[i],r,0,0,this.t+i-n);\n r.clamp();\n r.drShiftTo(1,r);\n }\n\n // Barrett modular reduction\n function Barrett(m) {\n // setup Barrett\n this.r2 = nbi();\n this.q3 = nbi();\n BigInteger.ONE.dlShiftTo(2*m.t,this.r2);\n this.mu = this.r2.divide(m);\n this.m = m;\n }\n\n function barrettConvert(x) {\n if(x.s < 0 || x.t > 2*this.m.t) return x.mod(this.m);\n else if(x.compareTo(this.m) < 0) return x;\n else { var r = nbi(); x.copyTo(r); this.reduce(r); return r; }\n }\n\n function barrettRevert(x) { return x; }\n\n // x = x mod m (HAC 14.42)\n function barrettReduce(x) {\n x.drShiftTo(this.m.t-1,this.r2);\n if(x.t > this.m.t+1) { x.t = this.m.t+1; x.clamp(); }\n this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);\n this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);\n while(x.compareTo(this.r2) < 0) x.dAddOffset(1,this.m.t+1);\n x.subTo(this.r2,x);\n while(x.compareTo(this.m) >= 0) x.subTo(this.m,x);\n }\n\n // r = x^2 mod m; x != r\n function barrettSqrTo(x,r) { x.squareTo(r); this.reduce(r); }\n\n // r = x*y mod m; x,y != r\n function barrettMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }\n\n Barrett.prototype.convert = barrettConvert;\n Barrett.prototype.revert = barrettRevert;\n Barrett.prototype.reduce = barrettReduce;\n Barrett.prototype.mulTo = barrettMulTo;\n Barrett.prototype.sqrTo = barrettSqrTo;\n\n // (public) this^e % m (HAC 14.85)\n function bnModPow(e,m) {\n var i = e.bitLength(), k, r = nbv(1), z;\n if(i <= 0) return r;\n else if(i < 18) k = 1;\n else if(i < 48) k = 3;\n else if(i < 144) k = 4;\n else if(i < 768) k = 5;\n else k = 6;\n if(i < 8)\n z = new Classic(m);\n else if(m.isEven())\n z = new Barrett(m);\n else\n z = new Montgomery(m);\n\n // precomputation\n var g = new Array(), n = 3, k1 = k-1, km = (1< 1) {\n var g2 = nbi();\n z.sqrTo(g[1],g2);\n while(n <= km) {\n g[n] = nbi();\n z.mulTo(g2,g[n-2],g[n]);\n n += 2;\n }\n }\n\n var j = e.t-1, w, is1 = true, r2 = nbi(), t;\n i = nbits(e[j])-1;\n while(j >= 0) {\n if(i >= k1) w = (e[j]>>(i-k1))&km;\n else {\n w = (e[j]&((1<<(i+1))-1))<<(k1-i);\n if(j > 0) w |= e[j-1]>>(this.DB+i-k1);\n }\n\n n = k;\n while((w&1) == 0) { w >>= 1; --n; }\n if((i -= n) < 0) { i += this.DB; --j; }\n if(is1) { // ret == 1, don't bother squaring or multiplying it\n g[w].copyTo(r);\n is1 = false;\n }\n else {\n while(n > 1) { z.sqrTo(r,r2); z.sqrTo(r2,r); n -= 2; }\n if(n > 0) z.sqrTo(r,r2); else { t = r; r = r2; r2 = t; }\n z.mulTo(r2,g[w],r);\n }\n\n while(j >= 0 && (e[j]&(1< 0) {\n x.rShiftTo(g,x);\n y.rShiftTo(g,y);\n }\n while(x.signum() > 0) {\n if((i = x.getLowestSetBit()) > 0) x.rShiftTo(i,x);\n if((i = y.getLowestSetBit()) > 0) y.rShiftTo(i,y);\n if(x.compareTo(y) >= 0) {\n x.subTo(y,x);\n x.rShiftTo(1,x);\n }\n else {\n y.subTo(x,y);\n y.rShiftTo(1,y);\n }\n }\n if(g > 0) y.lShiftTo(g,y);\n return y;\n }\n\n // (protected) this % n, n < 2^26\n function bnpModInt(n) {\n if(n <= 0) return 0;\n var d = this.DV%n, r = (this.s<0)?n-1:0;\n if(this.t > 0)\n if(d == 0) r = this[0]%n;\n else for(var i = this.t-1; i >= 0; --i) r = (d*r+this[i])%n;\n return r;\n }\n\n // (public) 1/this % m (HAC 14.61)\n function bnModInverse(m) {\n var ac = m.isEven();\n if((this.isEven() && ac) || m.signum() == 0) return BigInteger.ZERO;\n var u = m.clone(), v = this.clone();\n var a = nbv(1), b = nbv(0), c = nbv(0), d = nbv(1);\n while(u.signum() != 0) {\n while(u.isEven()) {\n u.rShiftTo(1,u);\n if(ac) {\n if(!a.isEven() || !b.isEven()) { a.addTo(this,a); b.subTo(m,b); }\n a.rShiftTo(1,a);\n }\n else if(!b.isEven()) b.subTo(m,b);\n b.rShiftTo(1,b);\n }\n while(v.isEven()) {\n v.rShiftTo(1,v);\n if(ac) {\n if(!c.isEven() || !d.isEven()) { c.addTo(this,c); d.subTo(m,d); }\n c.rShiftTo(1,c);\n }\n else if(!d.isEven()) d.subTo(m,d);\n d.rShiftTo(1,d);\n }\n if(u.compareTo(v) >= 0) {\n u.subTo(v,u);\n if(ac) a.subTo(c,a);\n b.subTo(d,b);\n }\n else {\n v.subTo(u,v);\n if(ac) c.subTo(a,c);\n d.subTo(b,d);\n }\n }\n if(v.compareTo(BigInteger.ONE) != 0) return BigInteger.ZERO;\n if(d.compareTo(m) >= 0) return d.subtract(m);\n if(d.signum() < 0) d.addTo(m,d); else return d;\n if(d.signum() < 0) return d.add(m); else return d;\n }\n\n var lowprimes = [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997];\n var lplim = (1<<26)/lowprimes[lowprimes.length-1];\n\n // (public) test primality with certainty >= 1-.5^t\n function bnIsProbablePrime(t) {\n var i, x = this.abs();\n if(x.t == 1 && x[0] <= lowprimes[lowprimes.length-1]) {\n for(i = 0; i < lowprimes.length; ++i)\n if(x[0] == lowprimes[i]) return true;\n return false;\n }\n if(x.isEven()) return false;\n i = 1;\n while(i < lowprimes.length) {\n var m = lowprimes[i], j = i+1;\n while(j < lowprimes.length && m < lplim) m *= lowprimes[j++];\n m = x.modInt(m);\n while(i < j) if(m%lowprimes[i++] == 0) return false;\n }\n return x.millerRabin(t);\n }\n\n // (protected) true if probably prime (HAC 4.24, Miller-Rabin)\n function bnpMillerRabin(t) {\n var n1 = this.subtract(BigInteger.ONE);\n var k = n1.getLowestSetBit();\n if(k <= 0) return false;\n var r = n1.shiftRight(k);\n t = (t+1)>>1;\n if(t > lowprimes.length) t = lowprimes.length;\n var a = nbi();\n for(var i = 0; i < t; ++i) {\n //Pick bases at random, instead of starting at 2\n a.fromInt(lowprimes[Math.floor(Math.random()*lowprimes.length)]);\n var y = a.modPow(r,this);\n if(y.compareTo(BigInteger.ONE) != 0 && y.compareTo(n1) != 0) {\n var j = 1;\n while(j++ < k && y.compareTo(n1) != 0) {\n y = y.modPowInt(2,this);\n if(y.compareTo(BigInteger.ONE) == 0) return false;\n }\n if(y.compareTo(n1) != 0) return false;\n }\n }\n return true;\n }\n\n // protected\n BigInteger.prototype.chunkSize = bnpChunkSize;\n BigInteger.prototype.toRadix = bnpToRadix;\n BigInteger.prototype.fromRadix = bnpFromRadix;\n BigInteger.prototype.fromNumber = bnpFromNumber;\n BigInteger.prototype.bitwiseTo = bnpBitwiseTo;\n BigInteger.prototype.changeBit = bnpChangeBit;\n BigInteger.prototype.addTo = bnpAddTo;\n BigInteger.prototype.dMultiply = bnpDMultiply;\n BigInteger.prototype.dAddOffset = bnpDAddOffset;\n BigInteger.prototype.multiplyLowerTo = bnpMultiplyLowerTo;\n BigInteger.prototype.multiplyUpperTo = bnpMultiplyUpperTo;\n BigInteger.prototype.modInt = bnpModInt;\n BigInteger.prototype.millerRabin = bnpMillerRabin;\n\n // public\n BigInteger.prototype.clone = bnClone;\n BigInteger.prototype.intValue = bnIntValue;\n BigInteger.prototype.byteValue = bnByteValue;\n BigInteger.prototype.shortValue = bnShortValue;\n BigInteger.prototype.signum = bnSigNum;\n BigInteger.prototype.toByteArray = bnToByteArray;\n BigInteger.prototype.equals = bnEquals;\n BigInteger.prototype.min = bnMin;\n BigInteger.prototype.max = bnMax;\n BigInteger.prototype.and = bnAnd;\n BigInteger.prototype.or = bnOr;\n BigInteger.prototype.xor = bnXor;\n BigInteger.prototype.andNot = bnAndNot;\n BigInteger.prototype.not = bnNot;\n BigInteger.prototype.shiftLeft = bnShiftLeft;\n BigInteger.prototype.shiftRight = bnShiftRight;\n BigInteger.prototype.getLowestSetBit = bnGetLowestSetBit;\n BigInteger.prototype.bitCount = bnBitCount;\n BigInteger.prototype.testBit = bnTestBit;\n BigInteger.prototype.setBit = bnSetBit;\n BigInteger.prototype.clearBit = bnClearBit;\n BigInteger.prototype.flipBit = bnFlipBit;\n BigInteger.prototype.add = bnAdd;\n BigInteger.prototype.subtract = bnSubtract;\n BigInteger.prototype.multiply = bnMultiply;\n BigInteger.prototype.divide = bnDivide;\n BigInteger.prototype.remainder = bnRemainder;\n BigInteger.prototype.divideAndRemainder = bnDivideAndRemainder;\n BigInteger.prototype.modPow = bnModPow;\n BigInteger.prototype.modInverse = bnModInverse;\n BigInteger.prototype.pow = bnPow;\n BigInteger.prototype.gcd = bnGCD;\n BigInteger.prototype.isProbablePrime = bnIsProbablePrime;\n\n // JSBN-specific extension\n BigInteger.prototype.square = bnSquare;\n\n // Expose the Barrett function\n BigInteger.prototype.Barrett = Barrett\n\n // BigInteger interfaces not implemented in jsbn:\n\n // BigInteger(int signum, byte[] magnitude)\n // double doubleValue()\n // float floatValue()\n // int hashCode()\n // long longValue()\n // static BigInteger valueOf(long val)\n\n // Random number generator - requires a PRNG backend, e.g. prng4.js\n\n // For best results, put code like\n // \n // in your main HTML document.\n\n var rng_state;\n var rng_pool;\n var rng_pptr;\n\n // Mix in a 32-bit integer into the pool\n function rng_seed_int(x) {\n rng_pool[rng_pptr++] ^= x & 255;\n rng_pool[rng_pptr++] ^= (x >> 8) & 255;\n rng_pool[rng_pptr++] ^= (x >> 16) & 255;\n rng_pool[rng_pptr++] ^= (x >> 24) & 255;\n if(rng_pptr >= rng_psize) rng_pptr -= rng_psize;\n }\n\n // Mix in the current time (w/milliseconds) into the pool\n function rng_seed_time() {\n rng_seed_int(new Date().getTime());\n }\n\n // Initialize the pool with junk if needed.\n if(rng_pool == null) {\n rng_pool = new Array();\n rng_pptr = 0;\n var t;\n if(typeof window !== \"undefined\" && window.crypto) {\n if (window.crypto.getRandomValues) {\n // Use webcrypto if available\n var ua = new Uint8Array(32);\n window.crypto.getRandomValues(ua);\n for(t = 0; t < 32; ++t)\n rng_pool[rng_pptr++] = ua[t];\n }\n else if(navigator.appName == \"Netscape\" && navigator.appVersion < \"5\") {\n // Extract entropy (256 bits) from NS4 RNG if available\n var z = window.crypto.random(32);\n for(t = 0; t < z.length; ++t)\n rng_pool[rng_pptr++] = z.charCodeAt(t) & 255;\n }\n }\n while(rng_pptr < rng_psize) { // extract some randomness from Math.random()\n t = Math.floor(65536 * Math.random());\n rng_pool[rng_pptr++] = t >>> 8;\n rng_pool[rng_pptr++] = t & 255;\n }\n rng_pptr = 0;\n rng_seed_time();\n //rng_seed_int(window.screenX);\n //rng_seed_int(window.screenY);\n }\n\n function rng_get_byte() {\n if(rng_state == null) {\n rng_seed_time();\n rng_state = prng_newstate();\n rng_state.init(rng_pool);\n for(rng_pptr = 0; rng_pptr < rng_pool.length; ++rng_pptr)\n rng_pool[rng_pptr] = 0;\n rng_pptr = 0;\n //rng_pool = null;\n }\n // TODO: allow reseeding after first request\n return rng_state.next();\n }\n\n function rng_get_bytes(ba) {\n var i;\n for(i = 0; i < ba.length; ++i) ba[i] = rng_get_byte();\n }\n\n function SecureRandom() {}\n\n SecureRandom.prototype.nextBytes = rng_get_bytes;\n\n // prng4.js - uses Arcfour as a PRNG\n\n function Arcfour() {\n this.i = 0;\n this.j = 0;\n this.S = new Array();\n }\n\n // Initialize arcfour context from key, an array of ints, each from [0..255]\n function ARC4init(key) {\n var i, j, t;\n for(i = 0; i < 256; ++i)\n this.S[i] = i;\n j = 0;\n for(i = 0; i < 256; ++i) {\n j = (j + this.S[i] + key[i % key.length]) & 255;\n t = this.S[i];\n this.S[i] = this.S[j];\n this.S[j] = t;\n }\n this.i = 0;\n this.j = 0;\n }\n\n function ARC4next() {\n var t;\n this.i = (this.i + 1) & 255;\n this.j = (this.j + this.S[this.i]) & 255;\n t = this.S[this.i];\n this.S[this.i] = this.S[this.j];\n this.S[this.j] = t;\n return this.S[(t + this.S[this.i]) & 255];\n }\n\n Arcfour.prototype.init = ARC4init;\n Arcfour.prototype.next = ARC4next;\n\n // Plug in your RNG constructor here\n function prng_newstate() {\n return new Arcfour();\n }\n\n // Pool size must be a multiple of 4 and greater than 32.\n // An array of bytes the size of the pool will be passed to init()\n var rng_psize = 256;\n\n if (typeof exports !== 'undefined') {\n exports = module.exports = {\n default: BigInteger,\n BigInteger: BigInteger,\n SecureRandom: SecureRandom,\n };\n } else {\n this.jsbn = {\n BigInteger: BigInteger,\n SecureRandom: SecureRandom\n };\n }\n\n}).call(this);\n" - }, - { - "id": 6, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\networkerFactory.ts", - "name": "./src/lib/mtproto/networkerFactory.ts", - "index": 8, - "index2": 25, - "size": 698, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "issuerId": 19, - "issuerName": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - } - ], - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 19, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "module": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "moduleName": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "type": "cjs require", - "userRequest": "./networkerFactory", - "loc": "21:43-72" - }, - { - "moduleId": 21, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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('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": 7, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\tl_utils.ts", - "name": "./src/lib/mtproto/tl_utils.ts", - "index": 10, - "index2": 13, - "size": 25294, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\authorizer.ts", - "issuerId": 30, - "issuerName": "./src/lib/mtproto/authorizer.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiManager.ts", - "name": "./src/lib/mtproto/apiManager.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - }, - { - "id": 30, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\authorizer.ts", - "name": "./src/lib/mtproto/authorizer.ts", - "profile": { - "factory": 1707, - "building": 782, - "dependencies": 1 - } - } - ], - "profile": { - "factory": 790, - "building": 652, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 21, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 30, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 31, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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 \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\"\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\"\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": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\dcConfigurator.ts", - "name": "./src/lib/mtproto/dcConfigurator.ts", - "index": 23, - "index2": 23, - "size": 3537, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/mtproto/apiManager.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiManager.ts", - "name": "./src/lib/mtproto/apiManager.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - } - ], - "profile": { - "factory": 1707, - "building": 782, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 21, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 30, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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, transportType = 'websocket') {\r\n const servers = upload && (transportType != 'websocket' || mtproto_config_1.Modes.multipleConnections)\r\n ? this.chosenUploadServers[transportType]\r\n : this.chosenServers[transportType];\r\n if (!(dcID in servers)) {\r\n servers[dcID] = [];\r\n }\r\n const transports = servers[dcID];\r\n if (!transports.length || (upload && transports.length < 1)) {\r\n let transport;\r\n if (transportType == 'websocket') {\r\n const subdomain = this.sslSubdomains[dcID - 1];\r\n const path = mtproto_config_1.Modes.test ? 'apiws_test' : 'apiws';\r\n const chosenServer = 'wss://' + subdomain + '.web.telegram.org/' + path;\r\n transport = new websocket_1.default(dcID, chosenServer);\r\n }\r\n else if (mtproto_config_1.Modes.ssl || !mtproto_config_1.Modes.http || transportType == 'https') {\r\n const subdomain = this.sslSubdomains[dcID - 1] + (upload ? '-1' : '');\r\n const path = mtproto_config_1.Modes.test ? 'apiw_test1' : 'apiw1';\r\n const chosenServer = 'https://' + subdomain + '.web.telegram.org/' + path;\r\n transport = new http_1.default(dcID, chosenServer);\r\n }\r\n else {\r\n for (let dcOption of this.dcOptions) {\r\n if (dcOption.id == dcID) {\r\n const chosenServer = 'http://' + dcOption.host + (dcOption.port != 80 ? ':' + dcOption.port : '') + '/apiw1';\r\n transport = new http_1.default(dcID, chosenServer);\r\n break;\r\n }\r\n }\r\n }\r\n if (!transport) {\r\n console.error('No chosenServer!', dcID);\r\n return null;\r\n }\r\n transports.push(transport);\r\n return transport;\r\n }\r\n return transports[0];\r\n }\r\n}\r\nexports.DcConfigurator = DcConfigurator;\r\nexports.default = new DcConfigurator();\r\n" - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\transports\\http.ts", - "name": "./src/lib/mtproto/transports/http.ts", - "index": 27, - "index2": 22, - "size": 1204, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/mtproto/apiManager.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiManager.ts", - "name": "./src/lib/mtproto/apiManager.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - } - ], - "profile": { - "factory": 1707, - "building": 782, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 8, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 21, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiManager.ts", - "name": "./src/lib/mtproto/apiManager.ts", - "index": 4, - "index2": 29, - "size": 15242, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "issuerId": 19, - "issuerName": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - } - ], - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 19, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "module": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "moduleName": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "type": "cjs require", - "userRequest": "./apiManager", - "loc": "18:37-60" - }, - { - "moduleId": 32, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiFileManager.ts", - "module": "./src/lib/mtproto/apiFileManager.ts", - "moduleName": "./src/lib/mtproto/apiFileManager.ts", - "type": "cjs require", - "userRequest": "./apiManager", - "loc": "19: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 logger_1 = require(\"../logger\");\r\n///////////////////////\r\n//////////////////////////////////////\r\n///////////////////////////////////////////////\r\n//////////\r\n//console.error('apiManager included!');\r\n// TODO: если запрос словил флуд, нужно сохранять его параметры и возвращать тот же промис на новый такой же запрос, например - загрузка истории\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 = logger_1.logger('API');\r\n /* AppStorage.get('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 const upload = (options.fileUpload || options.fileDownload)\r\n && (dcConfigurator_1.default.chooseServer(dcID, true) instanceof http_1.default || mtproto_config_1.Modes.multipleConnections);\r\n const 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 const getKey = dcID + '-' + +upload;\r\n if (this.gettingNetworkers[getKey]) {\r\n return this.gettingNetworkers[getKey];\r\n }\r\n const ak = 'dc' + dcID + '_auth_key';\r\n const akID = 'dc' + dcID + '_auth_keyID';\r\n const ss = 'dc' + dcID + '_server_salt';\r\n return this.gettingNetworkers[getKey] = storage_1.default.get([ak, akID, ss])\r\n .then(([authKeyHex, authKeyIDHex, serverSaltHex]) => __awaiter(this, void 0, void 0, function* () {\r\n /* if(authKeyHex && !authKeyIDHex && serverSaltHex) {\r\n this.log.warn('Updating to new version (+akID)');\r\n await AppStorage.remove(ak, akID, ss);\r\n authKeyHex = serverSaltHex = '';\r\n } */\r\n let networker;\r\n if (authKeyHex && authKeyHex.length == 512) {\r\n if (!serverSaltHex || serverSaltHex.length != 16) {\r\n serverSaltHex = 'AAAAAAAAAAAAAAAA';\r\n }\r\n const authKey = bin_utils_1.bytesFromHex(authKeyHex);\r\n const authKeyID = new Uint8Array(bin_utils_1.bytesFromHex(authKeyIDHex));\r\n const serverSalt = bin_utils_1.bytesFromHex(serverSaltHex);\r\n networker = networkerFactory_1.default.getNetworker(dcID, authKey, authKeyID, serverSalt, options);\r\n }\r\n else {\r\n try { // if no saved state\r\n const auth = yield authorizer_1.default.auth(dcID);\r\n const 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 networker = 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 delete this.gettingNetworkers[getKey];\r\n throw error;\r\n }\r\n }\r\n delete this.gettingNetworkers[getKey];\r\n return cache[dcID] = networker;\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 /* (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}\r\nexports.ApiManager = ApiManager;\r\nexports.default = new ApiManager();\r\n" - }, - { - "id": 11, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\helpers\\context.ts", - "name": "./src/helpers/context.ts", - "index": 7, - "index2": 4, - "size": 1471, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\storage.ts", - "issuerId": 3, - "issuerName": "./src/lib/storage.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 3, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\storage.ts", - "name": "./src/lib/storage.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - } - ], - "profile": { - "factory": 17, - "building": 19 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 3, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\storage.ts", - "module": "./src/lib/storage.ts", - "moduleName": "./src/lib/storage.ts", - "type": "cjs require", - "userRequest": "../helpers/context", - "loc": "4:18-47" - }, - { - "moduleId": 32, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiFileManager.ts", - "module": "./src/lib/mtproto/apiFileManager.ts", - "moduleName": "./src/lib/mtproto/apiFileManager.ts", - "type": "cjs require", - "userRequest": "../../helpers/context", - "loc": "23:18-50" - } - ], - "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.notifyAll = exports.notifySomeone = exports.isWorker = exports.isServiceWorker = exports.isWebWorker = void 0;\r\nexports.isWebWorker = typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope;\r\nexports.isServiceWorker = typeof ServiceWorkerGlobalScope !== 'undefined' && self instanceof ServiceWorkerGlobalScope;\r\nexports.isWorker = exports.isWebWorker || exports.isServiceWorker;\r\n// в SW может быть сразу две переменных TRUE, поэтому проверяю по последней\r\nconst notifyServiceWorker = (all, ...args) => {\r\n self\r\n .clients\r\n .matchAll({ includeUncontrolled: false, type: 'window' })\r\n .then((listeners) => {\r\n if (!listeners.length) {\r\n //console.trace('no listeners?', self, listeners);\r\n return;\r\n }\r\n listeners.slice(all ? 0 : -1).forEach(listener => {\r\n // @ts-ignore\r\n listener.postMessage(...args);\r\n });\r\n });\r\n};\r\nconst notifyWorker = (...args) => {\r\n // @ts-ignore\r\n self.postMessage(...args);\r\n};\r\nconst empty = () => { };\r\nexports.notifySomeone = exports.isServiceWorker ? notifyServiceWorker.bind(null, false) : (exports.isWebWorker ? notifyWorker : empty);\r\nexports.notifyAll = exports.isServiceWorker ? notifyServiceWorker.bind(null, true) : (exports.isWebWorker ? notifyWorker : empty);\r\n" - }, - { - "id": 12, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\schema.ts", - "name": "./src/lib/mtproto/schema.ts", - "index": 11, - "index2": 6, - "size": 259059, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\networker.ts", - "issuerId": 21, - "issuerName": "./src/lib/mtproto/networker.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 6, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\networkerFactory.ts", - "name": "./src/lib/mtproto/networkerFactory.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - }, - { - "id": 21, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\networker.ts", - "name": "./src/lib/mtproto/networker.ts", - "profile": { - "factory": 1509, - "building": 662, - "dependencies": 242 - } - } - ], - "profile": { - "factory": 243, - "building": 931 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 7, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 21, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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\" }], \"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\" }], \"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\" }], \"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\" }], \"type\": \"MsgResendReq\" }, { \"id\": 2249243371, \"predicate\": \"msg_resend_ans_req\", \"params\": [{ \"name\": \"msg_ids\", \"type\": \"Vector\" }], \"type\": \"MsgResendReq\" }, { \"id\": 3664378706, \"predicate\": \"msgs_state_req\", \"params\": [{ \"name\": \"msg_ids\", \"type\": \"Vector\" }], \"type\": \"MsgsStateReq\" }, { \"id\": \"81704317\", \"predicate\": \"msgs_state_info\", \"params\": [{ \"name\": \"req_msg_id\", \"type\": \"long\" }, { \"name\": \"info\", \"type\": \"bytes\" }], \"type\": \"MsgsStateInfo\" }, { \"id\": 2361446705, \"predicate\": \"msgs_all_info\", \"params\": [{ \"name\": \"msg_ids\", \"type\": \"Vector\" }, { \"name\": \"info\", \"type\": \"bytes\" }], \"type\": \"MsgsAllInfo\" }, { \"id\": \"661470918\", \"predicate\": \"msg_detailed_info\", \"params\": [{ \"name\": \"msg_id\", \"type\": \"long\" }, { \"name\": \"answer_msg_id\", \"type\": \"long\" }, { \"name\": \"bytes\", \"type\": \"int\" }, { \"name\": \"status\", \"type\": \"int\" }], \"type\": \"MsgDetailedInfo\" }, { \"id\": 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\" }, { \"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\" }, { \"name\": \"stickers\", \"type\": \"flags.0?Vector\" }, { \"name\": \"ttl_seconds\", \"type\": \"flags.1?int\" }], \"type\": \"InputMedia\" }, { \"id\": 598418386, \"predicate\": \"inputMediaDocument\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"id\", \"type\": \"InputDocument\" }, { \"name\": \"ttl_seconds\", \"type\": \"flags.0?int\" }], \"type\": \"InputMedia\" }, { \"id\": 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\" }, { \"name\": \"solution\", \"type\": \"flags.1?string\" }, { \"name\": \"solution_entities\", \"type\": \"flags.1?Vector\" }], \"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\" }, { \"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\" }, { \"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\" }, { \"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\" }, { \"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\" }, { \"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\" }, { \"name\": \"views\", \"type\": \"flags.10?int\" }, { \"name\": \"edit_date\", \"type\": \"flags.15?int\" }, { \"name\": \"post_author\", \"type\": \"flags.16?string\" }, { \"name\": \"grouped_id\", \"type\": \"flags.17?long\" }, { \"name\": \"restriction_reason\", \"type\": \"flags.22?Vector\" }], \"type\": \"Message\" }, { \"id\": 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\" }], \"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\" }], \"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\" }, { \"name\": \"credentials\", \"type\": \"SecureCredentialsEncrypted\" }], \"type\": \"MessageAction\" }, { \"id\": 3646710100, \"predicate\": \"messageActionSecureValuesSent\", \"params\": [{ \"name\": \"types\", \"type\": \"Vector\" }], \"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\" }, { \"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\" }, { \"name\": \"saved_count\", \"type\": \"int\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"type\": \"contacts.Contacts\" }, { \"id\": 2010127419, \"predicate\": \"contacts.importedContacts\", \"params\": [{ \"name\": \"imported\", \"type\": \"Vector\" }, { \"name\": \"popular_invites\", \"type\": \"Vector\" }, { \"name\": \"retry_contacts\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"type\": \"contacts.ImportedContacts\" }, { \"id\": 471043349, \"predicate\": \"contacts.blocked\", \"params\": [{ \"name\": \"blocked\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"type\": \"contacts.Blocked\" }, { \"id\": 2416444065, \"predicate\": \"contacts.blockedSlice\", \"params\": [{ \"name\": \"count\", \"type\": \"int\" }, { \"name\": \"blocked\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"type\": \"contacts.Blocked\" }, { \"id\": 364538944, \"predicate\": \"messages.dialogs\", \"params\": [{ \"name\": \"dialogs\", \"type\": \"Vector\" }, { \"name\": \"messages\", \"type\": \"Vector\" }, { \"name\": \"chats\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"type\": \"messages.Dialogs\" }, { \"id\": 1910543603, \"predicate\": \"messages.dialogsSlice\", \"params\": [{ \"name\": \"count\", \"type\": \"int\" }, { \"name\": \"dialogs\", \"type\": \"Vector\" }, { \"name\": \"messages\", \"type\": \"Vector\" }, { \"name\": \"chats\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"type\": \"messages.Dialogs\" }, { \"id\": 4041467286, \"predicate\": \"messages.dialogsNotModified\", \"params\": [{ \"name\": \"count\", \"type\": \"int\" }], \"type\": \"messages.Dialogs\" }, { \"id\": 2356252295, \"predicate\": \"messages.messages\", \"params\": [{ \"name\": \"messages\", \"type\": \"Vector\" }, { \"name\": \"chats\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"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\" }, { \"name\": \"chats\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"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\" }, { \"name\": \"chats\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"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\" }], \"type\": \"messages.Chats\" }, { \"id\": 2631405892, \"predicate\": \"messages.chatsSlice\", \"params\": [{ \"name\": \"count\", \"type\": \"int\" }, { \"name\": \"chats\", \"type\": \"Vector\" }], \"type\": \"messages.Chats\" }, { \"id\": 3856126364, \"predicate\": \"messages.chatFull\", \"params\": [{ \"name\": \"full_chat\", \"type\": \"ChatFull\" }, { \"name\": \"chats\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"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\" }, { \"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\" }], \"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\" }], \"type\": \"Update\" }, { \"id\": 3996854058, \"predicate\": \"updatePrivacy\", \"params\": [{ \"name\": \"key\", \"type\": \"PrivacyKey\" }, { \"name\": \"rules\", \"type\": \"Vector\" }], \"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\" }, { \"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\" }, { \"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\" }], \"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\" }], \"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\" }], \"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\" }, { \"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\" }], \"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\" }], \"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\" }], \"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\" }], \"type\": \"Update\" }, { \"id\": 889491791, \"predicate\": \"updateDialogFilters\", \"params\": [], \"type\": \"Update\" }, { \"id\": 643940105, \"predicate\": \"updatePhoneCallSignalingData\", \"params\": [{ \"name\": \"phone_call_id\", \"type\": \"long\" }, { \"name\": \"data\", \"type\": \"bytes\" }], \"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\" }, { \"name\": \"new_encrypted_messages\", \"type\": \"Vector\" }, { \"name\": \"other_updates\", \"type\": \"Vector\" }, { \"name\": \"chats\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }, { \"name\": \"state\", \"type\": \"updates.State\" }], \"type\": \"updates.Difference\" }, { \"id\": 2835028353, \"predicate\": \"updates.differenceSlice\", \"params\": [{ \"name\": \"new_messages\", \"type\": \"Vector\" }, { \"name\": \"new_encrypted_messages\", \"type\": \"Vector\" }, { \"name\": \"other_updates\", \"type\": \"Vector\" }, { \"name\": \"chats\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }, { \"name\": \"intermediate_state\", \"type\": \"updates.State\" }], \"type\": \"updates.Difference\" }, { \"id\": 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\" }], \"type\": \"Updates\" }, { \"id\": 377562760, \"predicate\": \"updateShortChatMessage\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"out\", \"type\": \"flags.1?true\" }, { \"name\": \"mentioned\", \"type\": \"flags.4?true\" }, { \"name\": \"media_unread\", \"type\": \"flags.5?true\" }, { \"name\": \"silent\", \"type\": \"flags.13?true\" }, { \"name\": \"id\", \"type\": \"int\" }, { \"name\": \"from_id\", \"type\": \"int\" }, { \"name\": \"chat_id\", \"type\": \"int\" }, { \"name\": \"message\", \"type\": \"string\" }, { \"name\": \"pts\", \"type\": \"int\" }, { \"name\": \"pts_count\", \"type\": \"int\" }, { \"name\": \"date\", \"type\": \"int\" }, { \"name\": \"fwd_from\", \"type\": \"flags.2?MessageFwdHeader\" }, { \"name\": \"via_bot_id\", \"type\": \"flags.11?int\" }, { \"name\": \"reply_to_msg_id\", \"type\": \"flags.3?int\" }, { \"name\": \"entities\", \"type\": \"flags.7?Vector\" }], \"type\": \"Updates\" }, { \"id\": 2027216577, \"predicate\": \"updateShort\", \"params\": [{ \"name\": \"update\", \"type\": \"Update\" }, { \"name\": \"date\", \"type\": \"int\" }], \"type\": \"Updates\" }, { \"id\": 1918567619, \"predicate\": \"updatesCombined\", \"params\": [{ \"name\": \"updates\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }, { \"name\": \"chats\", \"type\": \"Vector\" }, { \"name\": \"date\", \"type\": \"int\" }, { \"name\": \"seq_start\", \"type\": \"int\" }, { \"name\": \"seq\", \"type\": \"int\" }], \"type\": \"Updates\" }, { \"id\": 1957577280, \"predicate\": \"updates\", \"params\": [{ \"name\": \"updates\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }, { \"name\": \"chats\", \"type\": \"Vector\" }, { \"name\": \"date\", \"type\": \"int\" }, { \"name\": \"seq\", \"type\": \"int\" }], \"type\": \"Updates\" }, { \"id\": 301019932, \"predicate\": \"updateShortSentMessage\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"out\", \"type\": \"flags.1?true\" }, { \"name\": \"id\", \"type\": \"int\" }, { \"name\": \"pts\", \"type\": \"int\" }, { \"name\": \"pts_count\", \"type\": \"int\" }, { \"name\": \"date\", \"type\": \"int\" }, { \"name\": \"media\", \"type\": \"flags.9?MessageMedia\" }, { \"name\": \"entities\", \"type\": \"flags.7?Vector\" }], \"type\": \"Updates\" }, { \"id\": 2378853029, \"predicate\": \"photos.photos\", \"params\": [{ \"name\": \"photos\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"type\": \"photos.Photos\" }, { \"id\": 352657236, \"predicate\": \"photos.photosSlice\", \"params\": [{ \"name\": \"count\", \"type\": \"int\" }, { \"name\": \"photos\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"type\": \"photos.Photos\" }, { \"id\": 539045032, \"predicate\": \"photos.photo\", \"params\": [{ \"name\": \"photo\", \"type\": \"Photo\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"type\": \"photos.Photo\" }, { \"id\": 157948117, \"predicate\": \"upload.file\", \"params\": [{ \"name\": \"type\", \"type\": \"storage.FileType\" }, { \"name\": \"mtime\", \"type\": \"int\" }, { \"name\": \"bytes\", \"type\": \"bytes\" }], \"type\": \"upload.File\" }, { \"id\": 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\" }], \"type\": \"upload.File\" }, { \"id\": 414687501, \"predicate\": \"dcOption\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"ipv6\", \"type\": \"flags.0?true\" }, { \"name\": \"media_only\", \"type\": \"flags.1?true\" }, { \"name\": \"tcpo_only\", \"type\": \"flags.2?true\" }, { \"name\": \"cdn\", \"type\": \"flags.3?true\" }, { \"name\": \"static\", \"type\": \"flags.4?true\" }, { \"name\": \"id\", \"type\": \"int\" }, { \"name\": \"ip_address\", \"type\": \"string\" }, { \"name\": \"port\", \"type\": \"int\" }, { \"name\": \"secret\", \"type\": \"flags.10?bytes\" }], \"type\": \"DcOption\" }, { \"id\": 856375399, \"predicate\": \"config\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"phonecalls_enabled\", \"type\": \"flags.1?true\" }, { \"name\": \"default_p2p_contacts\", \"type\": \"flags.3?true\" }, { \"name\": \"preload_featured_stickers\", \"type\": \"flags.4?true\" }, { \"name\": \"ignore_phone_entities\", \"type\": \"flags.5?true\" }, { \"name\": \"revoke_pm_inbox\", \"type\": \"flags.6?true\" }, { \"name\": \"blocked_mode\", \"type\": \"flags.8?true\" }, { \"name\": \"pfs_enabled\", \"type\": \"flags.13?true\" }, { \"name\": \"date\", \"type\": \"int\" }, { \"name\": \"expires\", \"type\": \"int\" }, { \"name\": \"test_mode\", \"type\": \"Bool\" }, { \"name\": \"this_dc\", \"type\": \"int\" }, { \"name\": \"dc_options\", \"type\": \"Vector\" }, { \"name\": \"dc_txt_domain_name\", \"type\": \"string\" }, { \"name\": \"chat_size_max\", \"type\": \"int\" }, { \"name\": \"megagroup_size_max\", \"type\": \"int\" }, { \"name\": \"forwarded_count_max\", \"type\": \"int\" }, { \"name\": \"online_update_period_ms\", \"type\": \"int\" }, { \"name\": \"offline_blur_timeout_ms\", \"type\": \"int\" }, { \"name\": \"offline_idle_timeout_ms\", \"type\": \"int\" }, { \"name\": \"online_cloud_timeout_ms\", \"type\": \"int\" }, { \"name\": \"notify_cloud_delay_ms\", \"type\": \"int\" }, { \"name\": \"notify_default_delay_ms\", \"type\": \"int\" }, { \"name\": \"push_chat_period_ms\", \"type\": \"int\" }, { \"name\": \"push_chat_limit\", \"type\": \"int\" }, { \"name\": \"saved_gifs_limit\", \"type\": \"int\" }, { \"name\": \"edit_time_limit\", \"type\": \"int\" }, { \"name\": \"revoke_time_limit\", \"type\": \"int\" }, { \"name\": \"revoke_pm_time_limit\", \"type\": \"int\" }, { \"name\": \"rating_e_decay\", \"type\": \"int\" }, { \"name\": \"stickers_recent_limit\", \"type\": \"int\" }, { \"name\": \"stickers_faved_limit\", \"type\": \"int\" }, { \"name\": \"channels_read_media_period\", \"type\": \"int\" }, { \"name\": \"tmp_sessions\", \"type\": \"flags.0?int\" }, { \"name\": \"pinned_dialogs_count_max\", \"type\": \"int\" }, { \"name\": \"pinned_infolder_count_max\", \"type\": \"int\" }, { \"name\": \"call_receive_timeout_ms\", \"type\": \"int\" }, { \"name\": \"call_ring_timeout_ms\", \"type\": \"int\" }, { \"name\": \"call_connect_timeout_ms\", \"type\": \"int\" }, { \"name\": \"call_packet_timeout_ms\", \"type\": \"int\" }, { \"name\": \"me_url_prefix\", \"type\": \"string\" }, { \"name\": \"autoupdate_url_prefix\", \"type\": \"flags.7?string\" }, { \"name\": \"gif_search_username\", \"type\": \"flags.9?string\" }, { \"name\": \"venue_search_username\", \"type\": \"flags.10?string\" }, { \"name\": \"img_search_username\", \"type\": \"flags.11?string\" }, { \"name\": \"static_maps_provider\", \"type\": \"flags.12?string\" }, { \"name\": \"caption_length_max\", \"type\": \"int\" }, { \"name\": \"message_length_max\", \"type\": \"int\" }, { \"name\": \"webfile_dc_id\", \"type\": \"int\" }, { \"name\": \"suggested_lang_code\", \"type\": \"flags.2?string\" }, { \"name\": \"lang_pack_version\", \"type\": \"flags.2?int\" }, { \"name\": \"base_lang_pack_version\", \"type\": \"flags.2?int\" }], \"type\": \"Config\" }, { \"id\": 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\" }, { \"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\": 512177195, \"predicate\": \"document\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"id\", \"type\": \"long\" }, { \"name\": \"access_hash\", \"type\": \"long\" }, { \"name\": \"file_reference\", \"type\": \"bytes\" }, { \"name\": \"date\", \"type\": \"int\" }, { \"name\": \"mime_type\", \"type\": \"string\" }, { \"name\": \"size\", \"type\": \"int\" }, { \"name\": \"thumbs\", \"type\": \"flags.0?Vector\" }, { \"name\": \"video_thumbs\", \"type\": \"flags.1?Vector\" }, { \"name\": \"dc_id\", \"type\": \"int\" }, { \"name\": \"attributes\", \"type\": \"Vector\" }], \"type\": \"Document\" }, { \"id\": 398898678, \"predicate\": \"help.support\", \"params\": [{ \"name\": \"phone_number\", \"type\": \"string\" }, { \"name\": \"user\", \"type\": \"User\" }], \"type\": \"help.Support\" }, { \"id\": 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\" }, { \"name\": \"results\", \"type\": \"Vector\" }, { \"name\": \"chats\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"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\" }], \"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\" }], \"type\": \"InputPrivacyRule\" }, { \"id\": 1283572154, \"predicate\": \"inputPrivacyValueAllowChatParticipants\", \"params\": [{ \"name\": \"chats\", \"type\": \"Vector\" }], \"type\": \"InputPrivacyRule\" }, { \"id\": 3626197935, \"predicate\": \"inputPrivacyValueDisallowChatParticipants\", \"params\": [{ \"name\": \"chats\", \"type\": \"Vector\" }], \"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\" }], \"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\" }], \"type\": \"PrivacyRule\" }, { \"id\": 415136107, \"predicate\": \"privacyValueAllowChatParticipants\", \"params\": [{ \"name\": \"chats\", \"type\": \"Vector\" }], \"type\": \"PrivacyRule\" }, { \"id\": 2897086096, \"predicate\": \"privacyValueDisallowChatParticipants\", \"params\": [{ \"name\": \"chats\", \"type\": \"Vector\" }], \"type\": \"PrivacyRule\" }, { \"id\": 1352683077, \"predicate\": \"account.privacyRules\", \"params\": [{ \"name\": \"rules\", \"type\": \"Vector\" }, { \"name\": \"chats\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"type\": \"account.PrivacyRules\" }, { \"id\": 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\" }], \"type\": \"messages.Stickers\" }, { \"id\": 313694676, \"predicate\": \"stickerPack\", \"params\": [{ \"name\": \"emoticon\", \"type\": \"string\" }, { \"name\": \"documents\", \"type\": \"Vector\" }], \"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\" }], \"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\" }], \"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\" }], \"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\" }], \"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\" }, { \"name\": \"documents\", \"type\": \"Vector\" }], \"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\" }], \"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\" }], \"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\" }], \"type\": \"ReplyMarkup\" }, { \"id\": 1218642516, \"predicate\": \"replyInlineMarkup\", \"params\": [{ \"name\": \"rows\", \"type\": \"Vector\" }], \"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\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"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\" }, { \"name\": \"chats\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"type\": \"updates.ChannelDifference\" }, { \"id\": 543450958, \"predicate\": \"updates.channelDifference\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"final\", \"type\": \"flags.0?true\" }, { \"name\": \"pts\", \"type\": \"int\" }, { \"name\": \"timeout\", \"type\": \"flags.1?int\" }, { \"name\": \"new_messages\", \"type\": \"Vector\" }, { \"name\": \"other_updates\", \"type\": \"Vector\" }, { \"name\": \"chats\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"type\": \"updates.ChannelDifference\" }, { \"id\": 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\" }], \"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\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"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\" }], \"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\" }, { \"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\" }], \"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\" }], \"type\": \"messages.SavedGifs\" }, { \"id\": 864077702, \"predicate\": \"inputBotInlineMessageMediaAuto\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"message\", \"type\": \"string\" }, { \"name\": \"entities\", \"type\": \"flags.1?Vector\" }, { \"name\": \"reply_markup\", \"type\": \"flags.2?ReplyMarkup\" }], \"type\": \"InputBotInlineMessage\" }, { \"id\": 1036876423, \"predicate\": \"inputBotInlineMessageText\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"no_webpage\", \"type\": \"flags.0?true\" }, { \"name\": \"message\", \"type\": \"string\" }, { \"name\": \"entities\", \"type\": \"flags.1?Vector\" }, { \"name\": \"reply_markup\", \"type\": \"flags.2?ReplyMarkup\" }], \"type\": \"InputBotInlineMessage\" }, { \"id\": 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\" }, { \"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\" }, { \"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\" }, { \"name\": \"cache_time\", \"type\": \"int\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"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\" }, { \"name\": \"messages\", \"type\": \"Vector\" }, { \"name\": \"chats\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }, { \"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\" }], \"type\": \"TopPeerCategoryPeers\" }, { \"id\": 3727060725, \"predicate\": \"contacts.topPeersNotModified\", \"params\": [], \"type\": \"contacts.TopPeers\" }, { \"id\": 1891070632, \"predicate\": \"contacts.topPeers\", \"params\": [{ \"name\": \"categories\", \"type\": \"Vector\" }, { \"name\": \"chats\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"type\": \"contacts.TopPeers\" }, { \"id\": 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\" }, { \"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\" }, { \"name\": \"unread\", \"type\": \"Vector\" }], \"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\" }, { \"name\": \"stickers\", \"type\": \"Vector\" }, { \"name\": \"dates\", \"type\": \"Vector\" }], \"type\": \"messages.RecentStickers\" }, { \"id\": 1338747336, \"predicate\": \"messages.archivedStickers\", \"params\": [{ \"name\": \"count\", \"type\": \"int\" }, { \"name\": \"sets\", \"type\": \"Vector\" }], \"type\": \"messages.ArchivedStickers\" }, { \"id\": 946083368, \"predicate\": \"messages.stickerSetInstallResultSuccess\", \"params\": [], \"type\": \"messages.StickerSetInstallResult\" }, { \"id\": 904138920, \"predicate\": \"messages.stickerSetInstallResultArchive\", \"params\": [{ \"name\": \"sets\", \"type\": \"Vector\" }], \"type\": \"messages.StickerSetInstallResult\" }, { \"id\": 1678812626, \"predicate\": \"stickerSetCovered\", \"params\": [{ \"name\": \"set\", \"type\": \"StickerSet\" }, { \"name\": \"cover\", \"type\": \"Document\" }], \"type\": \"StickerSetCovered\" }, { \"id\": 872932635, \"predicate\": \"stickerSetMultiCovered\", \"params\": [{ \"name\": \"set\", \"type\": \"StickerSet\" }, { \"name\": \"covers\", \"type\": \"Vector\" }], \"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\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"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\" }], \"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\" }], \"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\" }, { \"name\": \"caption\", \"type\": \"PageCaption\" }], \"type\": \"PageBlock\" }, { \"id\": 1705048653, \"predicate\": \"pageBlockCollage\", \"params\": [{ \"name\": \"items\", \"type\": \"Vector\" }, { \"name\": \"caption\", \"type\": \"PageCaption\" }], \"type\": \"PageBlock\" }, { \"id\": 52401552, \"predicate\": \"pageBlockSlideshow\", \"params\": [{ \"name\": \"items\", \"type\": \"Vector\" }, { \"name\": \"caption\", \"type\": \"PageCaption\" }], \"type\": \"PageBlock\" }, { \"id\": 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\" }], \"type\": \"PageBlock\" }, { \"id\": 2592793057, \"predicate\": \"pageBlockOrderedList\", \"params\": [{ \"name\": \"items\", \"type\": \"Vector\" }], \"type\": \"PageBlock\" }, { \"id\": 1987480557, \"predicate\": \"pageBlockDetails\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"open\", \"type\": \"flags.0?true\" }, { \"name\": \"blocks\", \"type\": \"Vector\" }, { \"name\": \"title\", \"type\": \"RichText\" }], \"type\": \"PageBlock\" }, { \"id\": 370236054, \"predicate\": \"pageBlockRelatedArticles\", \"params\": [{ \"name\": \"title\", \"type\": \"RichText\" }, { \"name\": \"articles\", \"type\": \"Vector\" }], \"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\" }], \"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\" }], \"type\": \"WebDocument\" }, { \"id\": 4190682310, \"predicate\": \"webDocumentNoProxy\", \"params\": [{ \"name\": \"url\", \"type\": \"string\" }, { \"name\": \"size\", \"type\": \"int\" }, { \"name\": \"mime_type\", \"type\": \"string\" }, { \"name\": \"attributes\", \"type\": \"Vector\" }], \"type\": \"WebDocument\" }, { \"id\": 2616017741, \"predicate\": \"inputWebDocument\", \"params\": [{ \"name\": \"url\", \"type\": \"string\" }, { \"name\": \"size\", \"type\": \"int\" }, { \"name\": \"mime_type\", \"type\": \"string\" }, { \"name\": \"attributes\", \"type\": \"Vector\" }], \"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\" }], \"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\" }], \"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\" }], \"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\" }], \"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\" }, { \"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\" }], \"type\": \"PhoneCallProtocol\" }, { \"id\": 3968000320, \"predicate\": \"phone.phoneCall\", \"params\": [{ \"name\": \"phone_call\", \"type\": \"PhoneCall\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"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\" }], \"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\" }], \"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\" }, { \"name\": \"chats\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"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\" }, { \"name\": \"stickers\", \"type\": \"Vector\" }], \"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\" }, { \"name\": \"chats\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"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\" }], \"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\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"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\" }], \"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\" }, { \"name\": \"files\", \"type\": \"flags.4?Vector\" }, { \"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\" }, { \"name\": \"files\", \"type\": \"flags.4?Vector\" }, { \"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\" }, { \"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\" }, { \"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\" }, { \"name\": \"values\", \"type\": \"Vector\" }, { \"name\": \"errors\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }, { \"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\" }], \"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\" }], \"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\" }], \"type\": \"JSONValue\" }, { \"id\": 2579616925, \"predicate\": \"jsonObject\", \"params\": [{ \"name\": \"value\", \"type\": \"Vector\" }], \"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\" }], \"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\" }], \"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\" }], \"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\" }, { \"name\": \"photos\", \"type\": \"Vector\" }, { \"name\": \"documents\", \"type\": \"Vector\" }, { \"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\" }, { \"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\" }, { \"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\" }, { \"name\": \"total_voters\", \"type\": \"flags.2?int\" }, { \"name\": \"recent_voters\", \"type\": \"flags.3?Vector\" }, { \"name\": \"solution\", \"type\": \"flags.4?string\" }, { \"name\": \"solution_entities\", \"type\": \"flags.4?Vector\" }], \"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\" }], \"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\" }], \"type\": \"EmojiKeyword\" }, { \"id\": 594408994, \"predicate\": \"emojiKeywordDeleted\", \"params\": [{ \"name\": \"keyword\", \"type\": \"string\" }, { \"name\": \"emoticons\", \"type\": \"Vector\" }], \"type\": \"EmojiKeyword\" }, { \"id\": 1556570557, \"predicate\": \"emojiKeywordsDifference\", \"params\": [{ \"name\": \"lang_code\", \"type\": \"string\" }, { \"name\": \"from_version\", \"type\": \"int\" }, { \"name\": \"version\", \"type\": \"int\" }, { \"name\": \"keywords\", \"type\": \"Vector\" }], \"type\": \"EmojiKeywordsDifference\" }, { \"id\": 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\" }], \"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\" }, { \"name\": \"chats\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }], \"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\" }, { \"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\" }, { \"name\": \"date\", \"type\": \"int\" }], \"type\": \"MessageUserVote\" }, { \"id\": 136574537, \"predicate\": \"messages.votesList\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"count\", \"type\": \"int\" }, { \"name\": \"votes\", \"type\": \"Vector\" }, { \"name\": \"users\", \"type\": \"Vector\" }, { \"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\" }], \"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\" }, { \"name\": \"include_peers\", \"type\": \"Vector\" }, { \"name\": \"exclude_peers\", \"type\": \"Vector\" }], \"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\" }], \"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\" }, { \"name\": \"users\", \"type\": \"Vector\" }, { \"name\": \"psa_type\", \"type\": \"flags.1?string\" }, { \"name\": \"psa_message\", \"type\": \"flags.2?string\" }], \"type\": \"help.PromoData\" }, { \"id\": 1130084743, \"predicate\": \"videoSize\", \"params\": [{ \"name\": \"type\", \"type\": \"string\" }, { \"name\": \"location\", \"type\": \"FileLocation\" }, { \"name\": \"w\", \"type\": \"int\" }, { \"name\": \"h\", \"type\": \"int\" }, { \"name\": \"size\", \"type\": \"int\" }], \"type\": \"VideoSize\" }], \"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\" }, { \"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\" }], \"type\": \"Bool\" }, { \"id\": 2981369111, \"method\": \"auth.exportLoginToken\", \"params\": [{ \"name\": \"api_id\", \"type\": \"int\" }, { \"name\": \"api_hash\", \"type\": \"string\" }, { \"name\": \"except_ids\", \"type\": \"Vector\" }], \"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\" }], \"type\": \"Bool\" }, { \"id\": 813089983, \"method\": \"account.unregisterDevice\", \"params\": [{ \"name\": \"token_type\", \"type\": \"int\" }, { \"name\": \"token\", \"type\": \"string\" }, { \"name\": \"other_uids\", \"type\": \"Vector\" }], \"type\": \"Bool\" }, { \"id\": 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\" }], \"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\" }, { \"id\": 1936088002, \"method\": \"account.getSecureValue\", \"params\": [{ \"name\": \"types\", \"type\": \"Vector\" }], \"type\": \"Vector\" }, { \"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\" }], \"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\" }, { \"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\" }], \"type\": \"Vector\" }, { \"id\": 227648840, \"method\": \"users.getUsers\", \"params\": [{ \"name\": \"id\", \"type\": \"Vector\" }], \"type\": \"Vector\" }, { \"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\" }], \"type\": \"Bool\" }, { \"id\": 749357634, \"method\": \"contacts.getContactIDs\", \"params\": [{ \"name\": \"hash\", \"type\": \"int\" }], \"type\": \"Vector\" }, { \"id\": 3299038190, \"method\": \"contacts.getStatuses\", \"params\": [], \"type\": \"Vector\" }, { \"id\": 3223553183, \"method\": \"contacts.getContacts\", \"params\": [{ \"name\": \"hash\", \"type\": \"int\" }], \"type\": \"contacts.Contacts\" }, { \"id\": 746589157, \"method\": \"contacts.importContacts\", \"params\": [{ \"name\": \"contacts\", \"type\": \"Vector\" }], \"type\": \"contacts.ImportedContacts\" }, { \"id\": 157945344, \"method\": \"contacts.deleteContacts\", \"params\": [{ \"name\": \"id\", \"type\": \"Vector\" }], \"type\": \"Updates\" }, { \"id\": 269745566, \"method\": \"contacts.deleteByPhones\", \"params\": [{ \"name\": \"phones\", \"type\": \"Vector\" }], \"type\": \"Bool\" }, { \"id\": 858475004, \"method\": \"contacts.block\", \"params\": [{ \"name\": \"id\", \"type\": \"InputUser\" }], \"type\": \"Bool\" }, { \"id\": 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\" }, { \"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\" }], \"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\" }], \"type\": \"messages.AffectedMessages\" }, { \"id\": 94983360, \"method\": \"messages.receivedMessages\", \"params\": [{ \"name\": \"max_id\", \"type\": \"int\" }], \"type\": \"Vector\" }, { \"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\" }, { \"name\": \"schedule_date\", \"type\": \"flags.10?int\" }], \"type\": \"Updates\" }, { \"id\": 881978281, \"method\": \"messages.sendMedia\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"silent\", \"type\": \"flags.5?true\" }, { \"name\": \"background\", \"type\": \"flags.6?true\" }, { \"name\": \"clear_draft\", \"type\": \"flags.7?true\" }, { \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"reply_to_msg_id\", \"type\": \"flags.0?int\" }, { \"name\": \"media\", \"type\": \"InputMedia\" }, { \"name\": \"message\", \"type\": \"string\" }, { \"name\": \"random_id\", \"type\": \"long\" }, { \"name\": \"reply_markup\", \"type\": \"flags.2?ReplyMarkup\" }, { \"name\": \"entities\", \"type\": \"flags.3?Vector\" }, { \"name\": \"schedule_date\", \"type\": \"flags.10?int\" }], \"type\": \"Updates\" }, { \"id\": 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\" }, { \"name\": \"random_id\", \"type\": \"Vector\" }, { \"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\" }, { \"name\": \"reason\", \"type\": \"ReportReason\" }], \"type\": \"Bool\" }, { \"id\": 1013621127, \"method\": \"messages.getChats\", \"params\": [{ \"name\": \"id\", \"type\": \"Vector\" }], \"type\": \"messages.Chats\" }, { \"id\": 998448230, \"method\": \"messages.getFullChat\", \"params\": [{ \"name\": \"chat_id\", \"type\": \"int\" }], \"type\": \"messages.ChatFull\" }, { \"id\": 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\" }, { \"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\" }, { \"id\": 1259113487, \"method\": \"messages.reportEncryptedSpam\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputEncryptedChat\" }], \"type\": \"Bool\" }, { \"id\": 916930423, \"method\": \"messages.readMessageContents\", \"params\": [{ \"name\": \"id\", \"type\": \"Vector\" }], \"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\" }], \"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\" }, { \"name\": \"increment\", \"type\": \"Bool\" }], \"type\": \"Vector\" }, { \"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\" }], \"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\" }, { \"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\" }, { \"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\" }], \"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\" }], \"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\" }], \"type\": \"Bool\" }, { \"id\": 1782549861, \"method\": \"messages.getAllDrafts\", \"params\": [], \"type\": \"Updates\" }, { \"id\": 766298703, \"method\": \"messages.getFeaturedStickers\", \"params\": [{ \"name\": \"hash\", \"type\": \"int\" }], \"type\": \"messages.FeaturedStickers\" }, { \"id\": 1527873830, \"method\": \"messages.readFeaturedStickers\", \"params\": [{ \"name\": \"id\", \"type\": \"Vector\" }], \"type\": \"Bool\" }, { \"id\": 1587647177, \"method\": \"messages.getRecentStickers\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"attached\", \"type\": \"flags.0?true\" }, { \"name\": \"hash\", \"type\": \"int\" }], \"type\": \"messages.RecentStickers\" }, { \"id\": 958863608, \"method\": \"messages.saveRecentSticker\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"attached\", \"type\": \"flags.0?true\" }, { \"name\": \"id\", \"type\": \"InputDocument\" }, { \"name\": \"unsave\", \"type\": \"Bool\" }], \"type\": \"Bool\" }, { \"id\": 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\" }, { \"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\" }], \"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\" }], \"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\" }], \"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\" }, { \"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\" }, { \"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\" }, { \"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\" }], \"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\" }], \"type\": \"Vector\" }, { \"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\" }], \"type\": \"Vector\" }, { \"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\" }], \"type\": \"messages.Messages\" }, { \"id\": 3174597898, \"method\": \"messages.sendScheduledMessages\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"id\", \"type\": \"Vector\" }], \"type\": \"Updates\" }, { \"id\": 1504586518, \"method\": \"messages.deleteScheduledMessages\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"id\", \"type\": \"Vector\" }], \"type\": \"Updates\" }, { \"id\": 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\" }], \"type\": \"Bool\" }, { \"id\": 4053719405, \"method\": \"messages.getDialogFilters\", \"params\": [], \"type\": \"Vector\" }, { \"id\": 2728186924, \"method\": \"messages.getSuggestedDialogFilters\", \"params\": [], \"type\": \"Vector\" }, { \"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\" }], \"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\" }], \"type\": \"Vector\" }, { \"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\" }, { \"id\": 1302676017, \"method\": \"upload.getCdnFileHashes\", \"params\": [{ \"name\": \"file_token\", \"type\": \"bytes\" }, { \"name\": \"offset\", \"type\": \"int\" }], \"type\": \"Vector\" }, { \"id\": 3338819889, \"method\": \"upload.getFileHashes\", \"params\": [{ \"name\": \"location\", \"type\": \"InputFileLocation\" }, { \"name\": \"offset\", \"type\": \"int\" }], \"type\": \"Vector\" }, { \"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\" }], \"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\" }], \"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\" }], \"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\" }], \"type\": \"Bool\" }, { \"id\": 2911672867, \"method\": \"channels.getMessages\", \"params\": [{ \"name\": \"channel\", \"type\": \"InputChannel\" }, { \"name\": \"id\", \"type\": \"Vector\" }], \"type\": \"messages.Messages\" }, { \"id\": 306054633, \"method\": \"channels.getParticipants\", \"params\": [{ \"name\": \"channel\", \"type\": \"InputChannel\" }, { \"name\": \"filter\", \"type\": \"ChannelParticipantsFilter\" }, { \"name\": \"offset\", \"type\": \"int\" }, { \"name\": \"limit\", \"type\": \"int\" }, { \"name\": \"hash\", \"type\": \"int\" }], \"type\": \"channels.ChannelParticipants\" }, { \"id\": 1416484774, \"method\": \"channels.getParticipant\", \"params\": [{ \"name\": \"channel\", \"type\": \"InputChannel\" }, { \"name\": \"user_id\", \"type\": \"InputUser\" }], \"type\": \"channels.ChannelParticipant\" }, { \"id\": 176122811, \"method\": \"channels.getChannels\", \"params\": [{ \"name\": \"id\", \"type\": \"Vector\" }], \"type\": \"messages.Chats\" }, { \"id\": 141781513, \"method\": \"channels.getFullChannel\", \"params\": [{ \"name\": \"channel\", \"type\": \"InputChannel\" }], \"type\": \"messages.ChatFull\" }, { \"id\": 1029681423, \"method\": \"channels.createChannel\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"broadcast\", \"type\": \"flags.0?true\" }, { \"name\": \"megagroup\", \"type\": \"flags.1?true\" }, { \"name\": \"title\", \"type\": \"string\" }, { \"name\": \"about\", \"type\": \"string\" }, { \"name\": \"geo_point\", \"type\": \"flags.2?InputGeoPoint\" }, { \"name\": \"address\", \"type\": \"flags.2?string\" }], \"type\": \"Updates\" }, { \"id\": 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\" }], \"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\" }, { \"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\" }], \"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\" }], \"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\" }], \"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\": 4286223235, \"method\": \"phone.sendSignalingData\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPhoneCall\" }, { \"name\": \"data\", \"type\": \"bytes\" }], \"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\" }], \"type\": \"Vector\" }, { \"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\" }, { \"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\" }], \"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\": 114 };\r\n" - }, - { - "id": 13, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\crypto_utils.ts", - "name": "./src/lib/crypto/crypto_utils.ts", - "index": 12, - "index2": 12, - "size": 9796, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\cryptoworker.ts", - "issuerId": 2, - "issuerName": "./src/lib/crypto/cryptoworker.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\cryptoworker.ts", - "name": "./src/lib/crypto/cryptoworker.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - } - ], - "profile": { - "factory": 1524, - "building": 711, - "dependencies": 1293 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 2, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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 leemon_1 = require(\"leemon\"); //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 = leemon_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 = typeof (bytes) === 'string' ? bytes : bin_utils_1.bytesToWordss(bytes);\r\n let hash = sha256_1.default(words);\r\n //console.log(dT(), 'SHA-256 hash finish', hash);\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(dT(), 'RSA encrypt start', publicKey, bytes);\r\n bytes = bin_utils_1.addPadding(bytes, 255);\r\n var N = leemon_1.str2bigInt(publicKey.modulus, 16);\r\n var E = leemon_1.str2bigInt(publicKey.exponent, 16);\r\n var X = leemon_1.str2bigInt(bin_utils_1.bytesToHex(bytes), 16);\r\n var encryptedBigInt = leemon_1.powMod(X, E, N);\r\n var encryptedBytes = bin_utils_1.bytesFromHex(leemon_1.bigInt2str(encryptedBigInt, 16));\r\n //console.log(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(dT(), 'PQ start', pqBytes, what.toString(16), what.bitLength())\r\n try {\r\n //console.time('PQ leemon');\r\n result = pqPrimeLeemon(leemon_1.str2bigInt(what.toString(16), 16, Math.ceil(64 / leemon_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(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 / leemon_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 leemon_1.copyInt_(x, bin_utils_1.nextRandomInt(1000000000) + 1);\r\n leemon_1.copy_(y, x);\r\n lim = 1 << (i + 18);\r\n for (j = 1; j < lim; j++) {\r\n ++it;\r\n leemon_1.copy_(a, x);\r\n leemon_1.copy_(b, x);\r\n leemon_1.copyInt_(c, q);\r\n while (!leemon_1.isZero(b)) {\r\n if (b[0] & 1) {\r\n leemon_1.add_(c, a);\r\n if (leemon_1.greater(c, what)) {\r\n leemon_1.sub_(c, what);\r\n }\r\n }\r\n leemon_1.add_(a, a);\r\n if (leemon_1.greater(a, what)) {\r\n leemon_1.sub_(a, what);\r\n }\r\n leemon_1.rightShift_(b, 1);\r\n }\r\n leemon_1.copy_(x, c);\r\n if (leemon_1.greater(x, y)) {\r\n leemon_1.copy_(z, x);\r\n leemon_1.sub_(z, y);\r\n }\r\n else {\r\n leemon_1.copy_(z, y);\r\n leemon_1.sub_(z, x);\r\n }\r\n leemon_1.eGCD_(z, what, g, a, b);\r\n if (!leemon_1.equalsInt(g, 1)) {\r\n break;\r\n }\r\n if ((j & (j - 1)) == 0) {\r\n leemon_1.copy_(y, x);\r\n }\r\n }\r\n if (leemon_1.greater(g, leemon_1.one)) {\r\n break;\r\n }\r\n }\r\n leemon_1.divide_(what, g, x, y);\r\n if (leemon_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 = leemon_1.str2bigInt(bin_utils_1.bytesToHex(x), 16);\r\n var yBigInt = leemon_1.str2bigInt(bin_utils_1.bytesToHex(y), 16);\r\n var mBigInt = leemon_1.str2bigInt(bin_utils_1.bytesToHex(m), 16);\r\n var resBigInt = leemon_1.powMod(xBigInt, yBigInt, mBigInt);\r\n return bin_utils_1.bytesFromHex(leemon_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": 14, - "identifier": "F:\\tweb\\node_modules\\@cryptography\\aes\\dist\\es\\aes.js", - "name": "./node_modules/@cryptography/aes/dist/es/aes.js", - "index": 15, - "index2": 9, - "size": 11143, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\crypto_utils.ts", - "issuerId": 13, - "issuerName": "./src/lib/crypto/crypto_utils.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\cryptoworker.ts", - "name": "./src/lib/crypto/cryptoworker.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - }, - { - "id": 13, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\crypto_utils.ts", - "name": "./src/lib/crypto/crypto_utils.ts", - "profile": { - "factory": 1524, - "building": 711, - "dependencies": 1293 - } - } - ], - "profile": { - "factory": 1827, - "building": 56 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 13, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 27, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 15, - "identifier": "F:\\tweb\\node_modules\\leemon\\es\\index.js", - "name": "./node_modules/leemon/es/index.js", - "index": 17, - "index2": 11, - "size": 57067, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\crypto_utils.ts", - "issuerId": 13, - "issuerName": "./src/lib/crypto/crypto_utils.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\cryptoworker.ts", - "name": "./src/lib/crypto/cryptoworker.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - }, - { - "id": 13, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\crypto_utils.ts", - "name": "./src/lib/crypto/crypto_utils.ts", - "profile": { - "factory": 1524, - "building": 711, - "dependencies": 1293 - } - } - ], - "profile": { - "factory": 1827, - "building": 56 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 13, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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", - "loc": "21:17-34" - }, - { - "moduleId": 26, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\srp.ts", - "module": "./src/lib/crypto/srp.ts", - "moduleName": "./src/lib/crypto/srp.ts", - "type": "cjs require", - "userRequest": "leemon", - "loc": "18:17-34" - } - ], - "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/crypto/srp.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=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. n64 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 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 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= 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< 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=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 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 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": 16, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\timeManager.ts", - "name": "./src/lib/mtproto/timeManager.ts", - "index": 22, - "index2": 18, - "size": 1900, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\authorizer.ts", - "issuerId": 30, - "issuerName": "./src/lib/mtproto/authorizer.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiManager.ts", - "name": "./src/lib/mtproto/apiManager.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - }, - { - "id": 30, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\authorizer.ts", - "name": "./src/lib/mtproto/authorizer.ts", - "profile": { - "factory": 1707, - "building": 782, - "dependencies": 1 - } - } - ], - "profile": { - "factory": 790, - "building": 652, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 21, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 30, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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(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": 17, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\transports\\transport.ts", - "name": "./src/lib/mtproto/transports/transport.ts", - "index": 25, - "index2": 19, - "size": 224, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\transports\\http.ts", - "issuerId": 9, - "issuerName": "./src/lib/mtproto/transports/http.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiManager.ts", - "name": "./src/lib/mtproto/apiManager.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - }, - { - "id": 9, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\transports\\http.ts", - "name": "./src/lib/mtproto/transports/http.ts", - "profile": { - "factory": 1707, - "building": 782, - "dependencies": 1 - } - } - ], - "profile": { - "factory": 112, - "building": 937 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 9, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 27, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 18, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\filemanager.ts", - "name": "./src/lib/filemanager.ts", - "index": 33, - "index2": 30, - "size": 2616, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiFileManager.ts", - "issuerId": 32, - "issuerName": "./src/lib/mtproto/apiFileManager.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 32, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiFileManager.ts", - "name": "./src/lib/mtproto/apiFileManager.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - } - ], - "profile": { - "factory": 1392, - "building": 680, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 32, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiFileManager.ts", - "module": "./src/lib/mtproto/apiFileManager.ts", - "moduleName": "./src/lib/mtproto/apiFileManager.ts", - "type": "cjs require", - "userRequest": "../filemanager", - "loc": "18:38-63" - }, - { - "moduleId": 33, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\cacheStorage.ts", - "module": "./src/lib/cacheStorage.ts", - "moduleName": "./src/lib/cacheStorage.ts", - "type": "cjs require", - "userRequest": "./filemanager", - "loc": "16:38-62" - } - ], - "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\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.FileManager = void 0;\r\nconst bin_utils_1 = require(\"./bin_utils\");\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 write(fileWriter, bytes) {\r\n 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 return fileWriter.write(bytes);\r\n }\r\n }\r\n getFakeFileWriter(mimeType, saveFileCallback) {\r\n const blobParts = [];\r\n const fakeFileWriter = {\r\n write: (part) => __awaiter(this, void 0, void 0, function* () {\r\n if (!this.blobSupported) {\r\n throw false;\r\n }\r\n blobParts.push(part);\r\n }),\r\n truncate: () => {\r\n blobParts.length = 0;\r\n },\r\n finalize: (saveToStorage = true) => {\r\n const blob = bin_utils_1.blobConstruct(blobParts, mimeType);\r\n if (saveToStorage && saveFileCallback) {\r\n saveFileCallback(blob);\r\n }\r\n return blob;\r\n }\r\n };\r\n return fakeFileWriter;\r\n }\r\n}\r\nexports.FileManager = FileManager;\r\nexports.default = new FileManager();\r\n" - }, - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "index": 0, - "index2": 35, - "size": 5840, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": null, - "issuerId": null, - "issuerName": null, - "issuerPath": null, - "profile": { - "factory": 7, - "building": 1686 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": null, - "moduleIdentifier": null, - "module": null, - "moduleName": null, - "type": "single entry", - "userRequest": "!!F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "loc": "main" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 0, - "source": "\"use strict\";\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nvar __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// just to include\r\nconst polyfill_1 = require(\"../polyfill\");\r\npolyfill_1.secureRandom;\r\nconst apiManager_1 = __importDefault(require(\"./apiManager\"));\r\nconst storage_1 = __importDefault(require(\"../storage\"));\r\nconst cryptoworker_1 = __importDefault(require(\"../crypto/cryptoworker\"));\r\nconst networkerFactory_1 = __importDefault(require(\"./networkerFactory\"));\r\nconst apiFileManager_1 = __importDefault(require(\"./apiFileManager\"));\r\nconst logger_1 = require(\"../logger\");\r\nconst log = logger_1.logger('DW', logger_1.LogLevels.error);\r\nconst ctx = self;\r\n//console.error('INCLUDE !!!', new Error().stack);\r\n/* function isObject(object: any) {\r\n return typeof(object) === 'object' && object !== null;\r\n} */\r\n/* function fillTransfer(transfer: any, obj: any) {\r\n if(!obj) return;\r\n \r\n if(obj instanceof ArrayBuffer) {\r\n transfer.add(obj);\r\n } else if(obj.buffer && obj.buffer instanceof ArrayBuffer) {\r\n transfer.add(obj.buffer);\r\n } else if(isObject(obj)) {\r\n for(var i in obj) {\r\n fillTransfer(transfer, obj[i]);\r\n }\r\n } else if(Array.isArray(obj)) {\r\n obj.forEach(value => {\r\n fillTransfer(transfer, value);\r\n });\r\n }\r\n} */\r\nfunction respond(...args) {\r\n // отключил для всего потому что не успел пофиксить transfer detached\r\n //if(isSafari(self)/* || true */) {\r\n // @ts-ignore\r\n ctx.postMessage(...args);\r\n /* } else {\r\n var transfer = new Set();\r\n fillTransfer(transfer, arguments);\r\n \r\n //console.log('reply', transfer, [...transfer]);\r\n ctx.postMessage(...arguments, [...transfer]);\r\n //console.log('reply', transfer, [...transfer]);\r\n } */\r\n}\r\nnetworkerFactory_1.default.setUpdatesProcessor((obj, bool) => {\r\n respond({ update: { obj, bool } });\r\n});\r\nctx.addEventListener('message', (e) => __awaiter(void 0, void 0, void 0, function* () {\r\n try {\r\n const task = e.data;\r\n const taskID = task.taskID;\r\n log.debug('got message:', taskID, task);\r\n //debugger;\r\n if (task.useLs) {\r\n storage_1.default.finishTask(task.taskID, task.args);\r\n return;\r\n }\r\n else if (task.type == 'convertWebp') {\r\n const { fileName, bytes } = task.payload;\r\n const deferred = apiFileManager_1.default.webpConvertPromises[fileName];\r\n if (deferred) {\r\n deferred.resolve(bytes);\r\n delete apiFileManager_1.default.webpConvertPromises[fileName];\r\n }\r\n return;\r\n }\r\n else if (task.type == 'requestFilePart') {\r\n const task = e.data;\r\n const responseTask = {\r\n type: task.type,\r\n id: task.id,\r\n payload: null\r\n };\r\n try {\r\n const res = yield apiFileManager_1.default.requestFilePart(...task.payload);\r\n responseTask.payload = res;\r\n }\r\n catch (err) {\r\n }\r\n respond(responseTask);\r\n return;\r\n }\r\n switch (task.task) {\r\n case 'computeSRP':\r\n case 'gzipUncompress':\r\n // @ts-ignore\r\n return cryptoworker_1.default[task.task].apply(cryptoworker_1.default, task.args).then(result => {\r\n respond({ taskID: taskID, result: result });\r\n });\r\n case 'cancelDownload':\r\n case 'uploadFile':\r\n case 'downloadFile': {\r\n try {\r\n // @ts-ignore\r\n let result = apiFileManager_1.default[task.task].apply(apiFileManager_1.default, task.args);\r\n if (result instanceof Promise) {\r\n /* (result as ReturnType).notify = (progress: {done: number, total: number, offset: number}) => {\r\n notify({progress: {fileName, ...progress}});\r\n }; */\r\n result = yield result;\r\n }\r\n respond({ taskID: taskID, result: result });\r\n }\r\n catch (err) {\r\n respond({ taskID: taskID, error: err });\r\n }\r\n }\r\n default: {\r\n try {\r\n // @ts-ignore\r\n let result = apiManager_1.default[task.task].apply(apiManager_1.default, task.args);\r\n if (result instanceof Promise) {\r\n result = yield result;\r\n }\r\n respond({ taskID: taskID, result: result });\r\n }\r\n catch (err) {\r\n respond({ taskID: taskID, error: err });\r\n }\r\n //throw new Error('Unknown task: ' + task.task);\r\n }\r\n }\r\n }\r\n catch (err) {\r\n }\r\n}));\r\nctx.postMessage('ready');\r\n" - }, - { - "id": 20, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\polyfill.ts", - "name": "./src/lib/polyfill.ts", - "index": 1, - "index2": 2, - "size": 1829, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "issuerId": 19, - "issuerName": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - } - ], - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 19, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "module": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "moduleName": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "type": "cjs require", - "userRequest": "../polyfill", - "loc": "16:19-41" - } - ], - "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.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\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 const sec_num = parseInt(this + '', 10);\r\n const 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)\r\n leadZero = true;\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 (hours ? /* ('0' + hours).slice(-2) */ hours + ':' : '') + minutes + ':' + seconds;\r\n};\r\n" - }, - { - "id": 21, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\networker.ts", - "name": "./src/lib/mtproto/networker.ts", - "index": 9, - "index2": 24, - "size": 46109, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\networkerFactory.ts", - "issuerId": 6, - "issuerName": "./src/lib/mtproto/networkerFactory.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 6, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\networkerFactory.ts", - "name": "./src/lib/mtproto/networkerFactory.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - } - ], - "profile": { - "factory": 1509, - "building": 662, - "dependencies": 242 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 6, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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 logger_1 = require(\"../logger\");\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.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 = logger_1.logger('NET-' + dcID + (this.upload ? '-U' : ''));\r\n this.log('constructor' /* , this.authKey, this.authKeyID, this.serverSalt */);\r\n /* // Test resend after bad_server_salt\r\n if(this.dcID == 1 && this.upload) {\r\n this.serverSalt[0] = 0;\r\n } */\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 = */ 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, params, options);\r\n }\r\n return this.pushMessage(message, options);\r\n }\r\n checkLongPoll() {\r\n const 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 storage_1.default.get('dc').then((baseDcID) => {\r\n if (isClean && (baseDcID != this.dcID ||\r\n this.upload ||\r\n (this.sleepAfter && Date.now() > this.sleepAfter))) {\r\n //console.warn(dT(), 'Send long-poll for DC is delayed', this.dcID, this.sleepAfter);\r\n return;\r\n }\r\n this.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 // тут можно сделать таймаут и выводить дисконнект\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 const value = delay ? Date.now() + delay : 0;\r\n const sentMessage = this.sentMessages[messageID];\r\n if (sentMessage.container) {\r\n for (let i = 0, length = sentMessage.inner.length; i < 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 const authKey = this.authKeyUint8;\r\n const x = isOut ? 0 : 8;\r\n const msgKeyLargePlain = bin_utils_2.bufferConcat(authKey.subarray(88 + x, 88 + x + 32), dataWithPadding);\r\n const msgKeyLarge = yield cryptoworker_1.default.sha256Hash(msgKeyLargePlain);\r\n const 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.log.debug('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.log.debug('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.log.debug('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 = 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 let notEmpty = false;\r\n // this.log('clean start', this.dcID/*, this.sentMessages*/)\r\n Object.keys(this.sentMessages).forEach((msgID) => {\r\n const message = this.sentMessages[msgID];\r\n // this.log('clean iter', msgID, message)\r\n if (message.notContentRelated && this.pendingMessages[msgID] === undefined) {\r\n // this.log('clean notContentRelated', msgID)\r\n delete this.sentMessages[msgID];\r\n }\r\n else if (message.container) {\r\n for (let i = 0; i < message.inner.length; i++) {\r\n if (this.sentMessages[message.inner[i]] !== undefined) {\r\n // this.log('clean failed, found', msgID, message.inner[i], this.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 this.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 /**\r\n * только для сокета, возможно это будет неправильно работать, но в тесте сработало правильно\r\n */\r\n resend() {\r\n for (let id in this.sentMessages) {\r\n const msg = this.sentMessages[id];\r\n if (msg.body) {\r\n this.pushResend(id);\r\n }\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.log.debug('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 /* // simulate disconnect\r\n try {\r\n this.log('networker state:', this);\r\n // @ts-ignore\r\n this.transport.ws.close(1000);\r\n } catch(err) {\r\n this.log.error('transport', this.transport, err);\r\n } */\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.debug('new_session_created', message);\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.log.debug('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.log.debug('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.log.debug('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": 22, - "identifier": "F:\\tweb\\node_modules\\@cryptography\\sha1\\dist\\index.js", - "name": "./node_modules/@cryptography/sha1/dist/index.js", - "index": 13, - "index2": 7, - "size": 6225, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\crypto_utils.ts", - "issuerId": 13, - "issuerName": "./src/lib/crypto/crypto_utils.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\cryptoworker.ts", - "name": "./src/lib/crypto/cryptoworker.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - }, - { - "id": 13, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\crypto_utils.ts", - "name": "./src/lib/crypto/crypto_utils.ts", - "profile": { - "factory": 1524, - "building": 711, - "dependencies": 1293 - } - } - ], - "profile": { - "factory": 1827, - "building": 56 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 13, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 23, - "identifier": "F:\\tweb\\node_modules\\@cryptography\\sha256\\dist\\es\\sha256.js", - "name": "./node_modules/@cryptography/sha256/dist/es/sha256.js", - "index": 14, - "index2": 8, - "size": 8334, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\crypto_utils.ts", - "issuerId": 13, - "issuerName": "./src/lib/crypto/crypto_utils.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\cryptoworker.ts", - "name": "./src/lib/crypto/cryptoworker.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - }, - { - "id": 13, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\crypto_utils.ts", - "name": "./src/lib/crypto/crypto_utils.ts", - "profile": { - "factory": 1524, - "building": 711, - "dependencies": 1293 - } - } - ], - "profile": { - "factory": 1827, - "building": 56 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 13, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 24, - "identifier": "F:\\tweb\\node_modules\\pako\\dist\\pako_inflate.min.js", - "name": "./node_modules/pako/dist/pako_inflate.min.js", - "index": 16, - "index2": 10, - "size": 22682, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\crypto_utils.ts", - "issuerId": 13, - "issuerName": "./src/lib/crypto/crypto_utils.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\cryptoworker.ts", - "name": "./src/lib/crypto/cryptoworker.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - }, - { - "id": 13, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\crypto_utils.ts", - "name": "./src/lib/crypto/crypto_utils.ts", - "profile": { - "factory": 1524, - "building": 711, - "dependencies": 1293 - } - } - ], - "profile": { - "factory": 1827, - "building": 56 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 13, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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>>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>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>>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>>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<>>=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,b-=v),b<15&&(h+=E[n++]<>>=v=g>>>24,b-=v,!(16&(v=g>>>16&255))){if(0==(64&v)){g=w[(65535&g)+(h&(1<>>=v,b-=v,(v=r-o)>3,h&=(1<<(b-=p<<3))-1,e.next_in=n,e.next_out=r,e.avail_in=n>>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=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>>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<>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++]<>>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++]<>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++]<>>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>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++]<>>=7&d,d-=7&d,i.mode=27;break}for(;d<3;){if(0===s)break e;s--,l+=n[r++]<>>=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++]<>>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>>=5,d-=5,i.ndist=1+(31&l),l>>>=5,d-=5,i.ncode=4+(15&l),l>>>=4,d-=4,286>>=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>>16&255,_=65535&Z,!((w=Z>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<>>=w,d-=w,i.lens[i.have++]=_;else{if(16===_){for(E=w+2;d>>=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>>=w)),l>>>=3,d-=3}else{for(E=w+7;d>>=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<>>16&255,_=65535&Z,!((w=Z>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<>g)])>>>16&255,_=65535&Z,!(g+(w=Z>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<>>=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>>=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<>>16&255,_=65535&Z,!((w=Z>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<>g)])>>>16&255,_=65535&Z,!(g+(w=Z>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<>>=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>>=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(fh?(m=O[C+o[g]],w=A[z+o[g]]):(m=96,w=0),f=1<<_-S,v=l=1<>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 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('gzipUncompress', bytes, toString);\r\n }\r\n computeSRP(password, state) {\r\n return this.performTaskWorker('computeSRP', password, state);\r\n }\r\n}\r\nexports.default = CryptoWorkerMethods;\r\n" - }, - { - "id": 26, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\srp.ts", - "name": "./src/lib/crypto/srp.ts", - "index": 20, - "index2": 16, - "size": 10060, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\cryptoworker.ts", - "issuerId": 2, - "issuerName": "./src/lib/crypto/cryptoworker.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 2, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\cryptoworker.ts", - "name": "./src/lib/crypto/cryptoworker.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - } - ], - "profile": { - "factory": 1524, - "building": 711, - "dependencies": 1293 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 2, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\crypto\\cryptoworker.ts", - "module": "./src/lib/crypto/cryptoworker.ts", - "moduleName": "./src/lib/crypto/cryptoworker.ts", - "type": "cjs require", - "userRequest": "./srp", - "loc": "52:54-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.computeSRP = exports.makePasswordHash = void 0;\r\nconst bin_utils_1 = require(\"../bin_utils\");\r\nconst cryptoworker_1 = __importDefault(require(\"../crypto/cryptoworker\"));\r\nconst leemon_1 = require(\"leemon\");\r\nconst logger_1 = require(\"../logger\");\r\nconst log = logger_1.logger('SRP', logger_1.LogLevels.error);\r\nfunction makePasswordHash(password, client_salt, server_salt) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n let clientSaltString = '';\r\n for (let i = 0; i < client_salt.length; i++)\r\n clientSaltString += String.fromCharCode(client_salt[i]);\r\n let buffer = yield cryptoworker_1.default.sha256Hash(clientSaltString + password + clientSaltString);\r\n //log('encoded 1', bytesToHex(new Uint8Array(buffer)));\r\n buffer = bin_utils_1.bufferConcats(server_salt, buffer, server_salt);\r\n buffer = yield cryptoworker_1.default.sha256Hash(buffer);\r\n //log('encoded 2', buffer, bytesToHex(new Uint8Array(buffer)));\r\n let hash = yield cryptoworker_1.default.pbkdf2(new Uint8Array(buffer), client_salt, 100000);\r\n //log('encoded 3', hash, bytesToHex(new Uint8Array(hash)));\r\n hash = bin_utils_1.bufferConcats(server_salt, hash, server_salt);\r\n buffer = yield cryptoworker_1.default.sha256Hash(hash);\r\n //log('got password hash:', buffer, bytesToHex(new Uint8Array(buffer)));\r\n return buffer;\r\n });\r\n}\r\nexports.makePasswordHash = makePasswordHash;\r\nfunction computeSRP(password, state) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n //console.log('computeCheck:', password, state);\r\n let algo = state.current_algo;\r\n let p = leemon_1.str2bigInt(bin_utils_1.bytesToHex(algo.p), 16);\r\n let B = leemon_1.str2bigInt(bin_utils_1.bytesToHex(state.srp_B), 16);\r\n let g = leemon_1.int2bigInt(algo.g, 32, 256);\r\n log('p', leemon_1.bigInt2str(p, 16));\r\n log('B', leemon_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 makePasswordHash(password, new Uint8Array(algo.salt1), new Uint8Array(algo.salt2));\r\n let x = leemon_1.str2bigInt(bin_utils_1.bytesToHex(new Uint8Array(pw_hash)), 16);\r\n log('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(leemon_1.bigInt2str(p, 16)), 256);\r\n let gForHash = padArray(bin_utils_1.bytesFromHex(leemon_1.bigInt2str(g, 16)), 256); // like uint8array\r\n let b_for_hash = padArray(bin_utils_1.bytesFromHex(leemon_1.bigInt2str(B, 16)), 256);\r\n log(bin_utils_1.bytesToHex(pForHash));\r\n log(bin_utils_1.bytesToHex(gForHash));\r\n log(bin_utils_1.bytesToHex(b_for_hash));\r\n let g_x = leemon_1.powMod(g, x, p);\r\n log('g_x', leemon_1.bigInt2str(g_x, 16));\r\n let k = yield cryptoworker_1.default.sha256Hash(bin_utils_1.bufferConcat(pForHash, gForHash));\r\n k = leemon_1.str2bigInt(bin_utils_1.bytesToHex(new Uint8Array(k)), 16);\r\n log('k', leemon_1.bigInt2str(k, 16));\r\n // kg_x = (k * g_x) % p\r\n let kg_x = leemon_1.mod(leemon_1.mult(k, g_x), p);\r\n // good\r\n log('kg_x', leemon_1.bigInt2str(kg_x, 16));\r\n let is_good_mod_exp_first = (modexp, prime) => {\r\n let diff = leemon_1.sub(prime, modexp);\r\n let min_diff_bits_count = 2048 - 64;\r\n let max_mod_exp_size = 256;\r\n if (leemon_1.negative(diff) ||\r\n leemon_1.bitSize(diff) < min_diff_bits_count ||\r\n leemon_1.bitSize(modexp) < min_diff_bits_count ||\r\n Math.floor((leemon_1.bitSize(modexp) + 7) / 8) > max_mod_exp_size)\r\n return false;\r\n return true;\r\n };\r\n var flipper = (arr) => {\r\n let out = new Uint8Array(arr.length);\r\n for (let i = 0; i < arr.length; i += 4) {\r\n out[i] = arr[i + 3];\r\n out[i + 1] = arr[i + 2];\r\n out[i + 2] = arr[i + 1];\r\n out[i + 3] = arr[i];\r\n }\r\n return out;\r\n };\r\n let generate_and_check_random = () => __awaiter(this, void 0, void 0, function* () {\r\n while (true) {\r\n const a = leemon_1.str2bigInt(bin_utils_1.bytesToHex(flipper(state.secure_random)), 16);\r\n //const a = str2bigInt('9153faef8f2bb6da91f6e5bc96bc00860a530a572a0f45aac0842b4602d711f8bda8d59fb53705e4ae3e31a3c4f0681955425f224297b8e9efd898fec22046debb7ba8a0bcf2be1ada7b100424ea318fdcef6ccfe6d7ab7d978c0eb76a807d4ab200eb767a22de0d828bc53f42c5a35c2df6e6ceeef9a3487aae8e9ef2271f2f6742e83b8211161fb1a0e037491ab2c2c73ad63c8bd1d739de1b523fe8d461270cedcf240de8da75f31be4933576532955041dc5770c18d3e75d0b357df9da4a5c8726d4fced87d15752400883dc57fa1937ac17608c5446c4774dcd123676d683ce3a1ab9f7e020ca52faafc99969822717c8e07ea383d5fb1a007ba0d170cb', 16);\r\n //console.log('ITERATION');\r\n log('g a p', leemon_1.bigInt2str(g, 16), leemon_1.bigInt2str(a, 16), leemon_1.bigInt2str(p, 16));\r\n const A = leemon_1.powMod(g, a, p);\r\n log('A MODPOW', leemon_1.bigInt2str(A, 16));\r\n if (is_good_mod_exp_first(A, p)) {\r\n const a_for_hash = bin_utils_1.bytesFromHex(leemon_1.bigInt2str(A, 16));\r\n const s = yield cryptoworker_1.default.sha256Hash(bin_utils_1.bufferConcat(new Uint8Array(a_for_hash), new Uint8Array(b_for_hash)));\r\n const u = leemon_1.str2bigInt(bin_utils_1.bytesToHex(new Uint8Array(s)), 16);\r\n if (!leemon_1.isZero(u) && !leemon_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 log('a', leemon_1.bigInt2str(a, 16));\r\n log('a_for_hash', bin_utils_1.bytesToHex(a_for_hash));\r\n log('u', leemon_1.bigInt2str(u, 16));\r\n // g_b = (B - kg_x) % p\r\n /* log('B - kg_x', bigInt2str(sub(B, kg_x), 16));\r\n log('subtract', bigInt2str(B, 16), bigInt2str(kg_x, 16));\r\n log('B - kg_x', bigInt2str(sub(B, kg_x), 16)); */\r\n let g_b;\r\n if (!leemon_1.greater(B, kg_x)) {\r\n log('negative');\r\n g_b = leemon_1.add(B, p);\r\n }\r\n else\r\n g_b = B;\r\n g_b = leemon_1.mod(leemon_1.sub(g_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 log('g_b', leemon_1.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 = leemon_1.mult(u, x);\r\n log('u and x multiply', leemon_1.bigInt2str(u, 16), leemon_1.bigInt2str(x, 16), leemon_1.bigInt2str(ux, 16));\r\n let a_ux = leemon_1.add(a, ux);\r\n let S = leemon_1.powMod(g_b, a_ux, p);\r\n let K = yield cryptoworker_1.default.sha256Hash(padArray(bin_utils_1.bytesFromHex(leemon_1.bigInt2str(S, 16)), 256));\r\n log('K', bin_utils_1.bytesToHex(K), new Uint32Array(new Uint8Array(K).buffer));\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 = 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 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\nexports.computeSRP = computeSRP;\r\n" - }, - { - "id": 27, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\transports\\websocket.ts", - "name": "./src/lib/mtproto/transports/websocket.ts", - "index": 24, - "index2": 21, - "size": 8815, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\dcConfigurator.ts", - "issuerId": 8, - "issuerName": "./src/lib/mtproto/dcConfigurator.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiManager.ts", - "name": "./src/lib/mtproto/apiManager.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\dcConfigurator.ts", - "name": "./src/lib/mtproto/dcConfigurator.ts", - "profile": { - "factory": 1707, - "building": 782, - "dependencies": 1 - } - } - ], - "profile": { - "factory": 863, - "building": 41, - "dependencies": 1062 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 8, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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 logger_1 = require(\"../../logger\");\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(codec.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.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.addEventListener('open', this.handleOpen);\r\n this.ws.addEventListener('close', this.handleClose);\r\n this.ws.addEventListener('message', this.handleMessage);\r\n };\r\n this.handleOpen = () => {\r\n this.log('opened');\r\n this.log.debug('sending init packet');\r\n this.ws.send(this.obfuscation.init(this.codec));\r\n //setTimeout(() => {\r\n this.connected = true;\r\n this.releasePending();\r\n //}, 3e3);\r\n };\r\n this.handleClose = (event) => {\r\n this.log('closed', event, this.pending);\r\n this.connected = false;\r\n //this.pending.length = 0;\r\n /* if(this.networker) {\r\n this.networker.resend();\r\n this.networker.cleanupSent();\r\n } */\r\n this.log('trying to reconnect...');\r\n this.connect();\r\n for (let pending of this.pending) {\r\n if (pending.bodySent) {\r\n pending.bodySent = false;\r\n }\r\n }\r\n if (this.networker) {\r\n this.ws.addEventListener('open', () => {\r\n this.networker.resend();\r\n this.networker.cleanupSent();\r\n }, { once: true });\r\n }\r\n };\r\n this.handleMessage = (event) => {\r\n this.log.debug('<-', '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.log.debug('redirecting to networker');\r\n return this.networker.parseResponse(data).then(response => {\r\n this.log.debug('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.debug('no pending for res:', data.hex);\r\n }\r\n pending.resolve(data);\r\n };\r\n this.send = (body) => {\r\n this.log.debug('-> body length to pending:', body.length);\r\n //return;\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 = logger_1.logger(`WS-${dcID}`, logger_1.LogLevels.log /* | LogLevels.error | LogLevels.debug */);\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 //this.log.error('Pending length:', this.pending.length);\r\n const length = this.pending.length;\r\n for (let i = length - 1; i >= 0; --i) {\r\n const pending = this.pending[i];\r\n const { body, bodySent } = pending;\r\n if (body && !bodySent) {\r\n const toEncode = this.codec.encodePacket(body);\r\n //this.log('send before obf:', /* body.hex, nonce.hex, */ toEncode.hex);\r\n const enc = this.obfuscation.encode(toEncode);\r\n //this.log('send after obf:', enc.hex);\r\n this.log.debug('-> 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 else {\r\n pending.bodySent = true;\r\n }\r\n //delete pending.body;\r\n }\r\n }\r\n }\r\n}\r\nexports.default = Socket;\r\n" - }, - { - "id": 28, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\transports\\intermediate.ts", - "name": "./src/lib/mtproto/transports/intermediate.ts", - "index": 26, - "index2": 20, - "size": 1671, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\transports\\websocket.ts", - "issuerId": 27, - "issuerName": "./src/lib/mtproto/transports/websocket.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiManager.ts", - "name": "./src/lib/mtproto/apiManager.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - }, - { - "id": 8, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\dcConfigurator.ts", - "name": "./src/lib/mtproto/dcConfigurator.ts", - "profile": { - "factory": 1707, - "building": 782, - "dependencies": 1 - } - }, - { - "id": 27, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\transports\\websocket.ts", - "name": "./src/lib/mtproto/transports/websocket.ts", - "profile": { - "factory": 863, - "building": 41, - "dependencies": 1062 - } - } - ], - "profile": { - "factory": 1062, - "building": 17, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 27, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 29, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.ts", - "name": "./src/lib/mtproto/mtproto.ts", - "index": 28, - "index2": 26, - "size": 2926, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/mtproto/apiManager.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiManager.ts", - "name": "./src/lib/mtproto/apiManager.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - } - ], - "profile": { - "factory": 1707, - "building": 782, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 30, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\authorizer.ts", - "name": "./src/lib/mtproto/authorizer.ts", - "index": 29, - "index2": 28, - "size": 23081, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiManager.ts", - "issuerId": 10, - "issuerName": "./src/lib/mtproto/apiManager.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiManager.ts", - "name": "./src/lib/mtproto/apiManager.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - } - ], - "profile": { - "factory": 1707, - "building": 782, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 10, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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\nconst logger_1 = require(\"../logger\");\r\nclass Authorizer {\r\n constructor() {\r\n this.cached = {};\r\n this.log = logger_1.logger(`AUTHORIZER` /* , LogLevels.error | LogLevels.log */);\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 this.log('mtpSendPlainRequest: creating requestPromise');\r\n return transport.send(resultArray).then(result => {\r\n this.log('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 this.log.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 this.log.error('msg_id == 0', msg_id);\r\n let msg_len = deserializer.fetchInt('msg_len');\r\n if (!msg_len)\r\n this.log.error('no msg_len', msg_len);\r\n return deserializer;\r\n }\r\n catch (e) {\r\n this.log.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 this.log('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 this.log.error('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 this.log.error(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 this.log('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 this.log('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 this.log.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 this.log('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 this.log('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 this.log('Send req_DH_params FAIL!', error);\r\n throw error;\r\n }\r\n var response = deserializer.fetchObject('Server_DH_Params', 'RESPONSE');\r\n this.log('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 this.log.error('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 this.log('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 this.log('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 this.log('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 this.log('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 this.log('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 this.log('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 this.log('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 this.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": 31, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\rsaKeysManager.ts", - "name": "./src/lib/mtproto/rsaKeysManager.ts", - "index": 30, - "index2": 27, - "size": 9548, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\authorizer.ts", - "issuerId": 30, - "issuerName": "./src/lib/mtproto/authorizer.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 10, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiManager.ts", - "name": "./src/lib/mtproto/apiManager.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - }, - { - "id": 30, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\authorizer.ts", - "name": "./src/lib/mtproto/authorizer.ts", - "profile": { - "factory": 1707, - "building": 782, - "dependencies": 1 - } - } - ], - "profile": { - "factory": 790, - "building": 652, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 30, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\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": 32, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiFileManager.ts", - "name": "./src/lib/mtproto/apiFileManager.ts", - "index": 31, - "index2": 34, - "size": 19189, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "issuerId": 19, - "issuerName": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - } - ], - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 19, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "module": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "moduleName": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "type": "cjs require", - "userRequest": "./apiFileManager", - "loc": "22:41-68" - } - ], - "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.ApiFileManager = void 0;\r\nconst bin_utils_1 = require(\"../bin_utils\");\r\nconst cacheStorage_1 = __importDefault(require(\"../cacheStorage\"));\r\nconst filemanager_1 = __importDefault(require(\"../filemanager\"));\r\nconst apiManager_1 = __importDefault(require(\"./apiManager\"));\r\nconst logger_1 = require(\"../logger\");\r\nconst userAgent_1 = require(\"../../helpers/userAgent\");\r\nconst cryptoworker_1 = __importDefault(require(\"../crypto/cryptoworker\"));\r\nconst context_1 = require(\"../../helpers/context\");\r\nconst cancellablePromise_1 = require(\"../../helpers/cancellablePromise\");\r\nconst MAX_FILE_SAVE_SIZE = 20e6;\r\nclass ApiFileManager {\r\n constructor() {\r\n this.cachedDownloadPromises = {};\r\n this.uploadPromises = {};\r\n this.downloadPulls = {};\r\n this.downloadActives = {};\r\n this.webpConvertPromises = {};\r\n this.log = logger_1.logger('AFM', logger_1.LogLevels.error);\r\n this.uncompressTGS = (bytes, fileName) => {\r\n //this.log('uncompressTGS', bytes, bytes.slice().buffer);\r\n // slice нужен потому что в uint8array - 5053 length, в arraybuffer - 5084\r\n return cryptoworker_1.default.gzipUncompress(bytes.slice().buffer, true);\r\n };\r\n this.convertWebp = (bytes, fileName) => {\r\n const convertPromise = cancellablePromise_1.deferredPromise();\r\n const task = { type: 'convertWebp', payload: { fileName, bytes } };\r\n context_1.notifySomeone(task);\r\n return this.webpConvertPromises[fileName] = convertPromise;\r\n };\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 const downloadPull = this.downloadPulls[dcID];\r\n const promise = new Promise((resolve, reject) => {\r\n downloadPull.push({ cb, deferred: { resolve, reject }, activeDelta });\r\n });\r\n setTimeout(() => {\r\n this.downloadCheck(dcID);\r\n }, 0);\r\n return promise;\r\n }\r\n downloadCheck(dcID) {\r\n const downloadPull = this.downloadPulls[dcID];\r\n //const downloadLimit = dcID == 'upload' ? 11 : 5;\r\n //const downloadLimit = 24;\r\n const downloadLimit = dcID == 'upload' ? 11 : 48;\r\n if (this.downloadActives[dcID] >= downloadLimit || !downloadPull || !downloadPull.length) {\r\n return false;\r\n }\r\n const data = downloadPull.shift();\r\n const 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 getFileStorage() {\r\n return cacheStorage_1.default;\r\n }\r\n cancelDownload(fileName) {\r\n const promise = this.cachedDownloadPromises[fileName] || this.uploadPromises[fileName];\r\n if (promise && !promise.isRejected && !promise.isFulfilled) {\r\n promise.cancel();\r\n return true;\r\n }\r\n return false;\r\n }\r\n requestFilePart(dcID, location, offset, limit, checkCancel) {\r\n //const delta = limit / 1024 / 256;\r\n const delta = limit / 1024 / 128;\r\n return this.downloadRequest(dcID, () => __awaiter(this, void 0, void 0, function* () {\r\n checkCancel && checkCancel();\r\n return apiManager_1.default.invokeApi('upload.getFile', {\r\n location,\r\n offset,\r\n limit\r\n }, {\r\n dcID,\r\n fileDownload: true /* ,\r\n singleInRequest: 'safari' in window */\r\n });\r\n }), delta);\r\n }\r\n convertBlobToBytes(blob) {\r\n return blob.arrayBuffer().then(buffer => new Uint8Array(buffer));\r\n }\r\n getLimitPart(size) {\r\n let bytes;\r\n bytes = 512;\r\n /* if(size < 1e6 || !size) bytes = 512;\r\n else if(size < 3e6) bytes = 256;\r\n else bytes = 128; */\r\n return bytes * 1024;\r\n }\r\n downloadFile(options) {\r\n var _a;\r\n if (!filemanager_1.default.isAvailable()) {\r\n return Promise.reject({ type: 'BROWSER_BLOB_NOT_SUPPORTED' });\r\n }\r\n let size = (_a = options.size) !== null && _a !== void 0 ? _a : 0;\r\n let { dcID, location } = options;\r\n let process;\r\n if (options.mimeType == 'image/webp' && userAgent_1.isSafari) {\r\n process = this.convertWebp;\r\n options.mimeType = 'image/png';\r\n }\r\n else if (options.mimeType == 'application/x-tgsticker') {\r\n process = this.uncompressTGS;\r\n options.mimeType = 'application/json';\r\n }\r\n const fileName = bin_utils_1.getFileNameByLocation(location, { fileName: options.fileName });\r\n const cachedPromise = this.cachedDownloadPromises[fileName];\r\n const fileStorage = this.getFileStorage();\r\n this.log('downloadFile', fileName, size, location, options.mimeType, process);\r\n if (cachedPromise) {\r\n if (options.processPart) {\r\n return cachedPromise.then((blob) => {\r\n return this.convertBlobToBytes(blob).then(bytes => {\r\n options.processPart(bytes);\r\n return blob;\r\n });\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(options);\r\n }).catch(() => {\r\n return this.downloadFile(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 const deferred = cancellablePromise_1.deferredPromise();\r\n const mimeType = options.mimeType || 'image/jpeg';\r\n let canceled = false;\r\n let resolved = false;\r\n let cacheFileWriter;\r\n let errorHandler = (error) => {\r\n deferred.reject(error);\r\n errorHandler = () => { };\r\n if (cacheFileWriter && (!error || error.type != 'DOWNLOAD_CANCELED')) {\r\n cacheFileWriter.truncate();\r\n }\r\n };\r\n fileStorage.getFile(fileName).then((blob) => __awaiter(this, void 0, void 0, function* () {\r\n //this.log('maybe cached', fileName);\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 (options.processPart) {\r\n //FileManager.copy(blob, toFileEntry).then(deferred.resolve, errorHandler);\r\n yield this.convertBlobToBytes(blob).then(bytes => {\r\n options.processPart(bytes);\r\n });\r\n }\r\n deferred.resolve(blob);\r\n })).catch(() => {\r\n //this.log('not cached', fileName);\r\n const fileWriterPromise = fileStorage.getFileWriter(fileName, mimeType);\r\n fileWriterPromise.then((fileWriter) => {\r\n cacheFileWriter = fileWriter;\r\n const limit = options.limitPart || this.getLimitPart(size);\r\n let offset;\r\n let startOffset = 0;\r\n let writeFilePromise = Promise.resolve(), writeFileDeferred;\r\n const maxRequests = options.processPart ? 5 : 5;\r\n /* if(fileWriter.length) {\r\n startOffset = fileWriter.length;\r\n \r\n if(startOffset >= size) {\r\n if(toFileEntry) {\r\n deferred.resolve();\r\n } else {\r\n deferred.resolve(fileWriter.finalize());\r\n }\r\n \r\n return;\r\n }\r\n \r\n fileWriter.seek(startOffset);\r\n deferred.notify({done: startOffset, total: size});\r\n \r\n /////this.log('deferred notify 1:', {done: startOffset, total: size});\r\n } */\r\n const processDownloaded = (bytes, offset) => __awaiter(this, void 0, void 0, function* () {\r\n if (options.processPart) {\r\n yield options.processPart(bytes, offset, delayed);\r\n }\r\n if (process) {\r\n //const perf = performance.now();\r\n const processed = yield process(bytes, fileName);\r\n //this.log('downloadFile process downloaded time', performance.now() - perf, mimeType, process);\r\n return processed;\r\n }\r\n return bytes;\r\n });\r\n const delayed = [];\r\n offset = startOffset;\r\n do {\r\n ////this.log('offset:', startOffset);\r\n writeFileDeferred = cancellablePromise_1.deferredPromise();\r\n delayed.push({ offset, writeFilePromise, writeFileDeferred });\r\n writeFilePromise = writeFileDeferred;\r\n offset += limit;\r\n } while (offset < size);\r\n // для потокового видео нужно скачать первый и последний чанки\r\n /* if(options.processPart && delayed.length > 2) {\r\n const last = delayed.splice(delayed.length - 1, 1)[0];\r\n delayed.splice(1, 0, last);\r\n } */\r\n // @ts-ignore\r\n //deferred.queue = delayed;\r\n let done = 0;\r\n const superpuper = () => __awaiter(this, void 0, void 0, function* () {\r\n //if(!delayed.length) return;\r\n const { offset, writeFilePromise, writeFileDeferred } = delayed.shift();\r\n try {\r\n const result = yield this.requestFilePart(dcID, location, offset, limit, checkCancel);\r\n const bytes = result.bytes;\r\n if (delayed.length) {\r\n superpuper();\r\n }\r\n this.log('downloadFile requestFilePart result:', fileName, result);\r\n const isFinal = offset + limit >= size || !bytes.byteLength;\r\n if (bytes.byteLength) {\r\n //done += limit;\r\n done += bytes.byteLength;\r\n //if(!isFinal) {\r\n ////this.log('deferred notify 2:', {done: offset + limit, total: size}, deferred);\r\n deferred.notify({ done, offset, total: size });\r\n //}\r\n const processedResult = yield processDownloaded(bytes, offset);\r\n checkCancel();\r\n yield writeFilePromise;\r\n checkCancel();\r\n yield filemanager_1.default.write(fileWriter, processedResult);\r\n }\r\n writeFileDeferred.resolve();\r\n if (isFinal) {\r\n resolved = true;\r\n if (options.processPart) {\r\n deferred.resolve();\r\n }\r\n else {\r\n deferred.resolve(fileWriter.finalize(size < MAX_FILE_SAVE_SIZE));\r\n }\r\n }\r\n }\r\n catch (err) {\r\n errorHandler(err);\r\n }\r\n });\r\n for (let i = 0, length = Math.min(maxRequests, delayed.length); i < length; ++i) {\r\n superpuper();\r\n }\r\n });\r\n });\r\n const checkCancel = () => {\r\n if (canceled) {\r\n throw new Error('canceled');\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 }\r\n };\r\n deferred.notify = (progress) => {\r\n context_1.notifyAll({ progress: Object.assign({ fileName }, progress) });\r\n };\r\n this.cachedDownloadPromises[fileName] = deferred;\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 return this.getFileStorage().deleteFile(fileName);\r\n }\r\n uploadFile({ file, fileName }) {\r\n const fileSize = file.size, isBigFile = fileSize >= 10485760;\r\n let 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 const totalParts = Math.ceil(fileSize / partSize);\r\n const fileID = [bin_utils_1.nextRandomInt(0xFFFFFFFF), bin_utils_1.nextRandomInt(0xFFFFFFFF)];\r\n let _part = 0;\r\n const resultInputFile = {\r\n _: isBigFile ? 'inputFileBig' : 'inputFile',\r\n id: fileID,\r\n parts: totalParts,\r\n name: fileName,\r\n md5_checksum: ''\r\n };\r\n const deferredHelper = {\r\n notify: (details) => { }\r\n };\r\n const 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 const method = isBigFile ? 'upload.saveBigFilePart' : 'upload.saveFilePart';\r\n for (let offset = 0; offset < fileSize; offset += partSize) {\r\n const part = _part++; // 0, 1\r\n this.downloadRequest('upload', () => {\r\n return new Promise((uploadResolve, uploadReject) => {\r\n const reader = new FileReader();\r\n const 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 uploadReject();\r\n return;\r\n }\r\n //////this.log('Starting to upload file, isBig:', isBigFile, fileID, part, e.target.result);\r\n apiManager_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 deferred.notify({ done: doneParts * partSize, total: fileSize });\r\n if (doneParts >= totalParts) {\r\n deferred.resolve(resultInputFile);\r\n resolved = true;\r\n }\r\n }, errorHandler);\r\n };\r\n reader.readAsArrayBuffer(blob);\r\n });\r\n }, activeDelta).catch(errorHandler);\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 deferred.notify = (progress) => {\r\n context_1.notifyAll({ progress: Object.assign({ fileName }, progress) });\r\n };\r\n deferred.finally(() => {\r\n delete this.uploadPromises[fileName];\r\n });\r\n return this.uploadPromises[fileName] = deferred;\r\n }\r\n}\r\nexports.ApiFileManager = ApiFileManager;\r\nconst apiFileManager = new ApiFileManager();\r\n// @ts-ignore\r\nif (process.env.NODE_ENV != 'production') {\r\n self.apiFileManager = apiFileManager;\r\n}\r\nexports.default = apiFileManager;\r\n" - }, - { - "id": 33, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\cacheStorage.ts", - "name": "./src/lib/cacheStorage.ts", - "index": 32, - "index2": 31, - "size": 3835, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiFileManager.ts", - "issuerId": 32, - "issuerName": "./src/lib/mtproto/apiFileManager.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 32, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiFileManager.ts", - "name": "./src/lib/mtproto/apiFileManager.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - } - ], - "profile": { - "factory": 1392, - "building": 680, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 32, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiFileManager.ts", - "module": "./src/lib/mtproto/apiFileManager.ts", - "moduleName": "./src/lib/mtproto/apiFileManager.ts", - "type": "cjs require", - "userRequest": "../cacheStorage", - "loc": "17:39-65" - } - ], - "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 bin_utils_1 = require(\"./bin_utils\");\r\nconst filemanager_1 = __importDefault(require(\"./filemanager\"));\r\n//import { logger } from './polyfill';\r\nclass CacheStorageController {\r\n //private log: ReturnType = logger('CS');\r\n constructor() {\r\n this.dbName = 'cachedFiles';\r\n this.openDatabase();\r\n }\r\n openDatabase() {\r\n if (this.openDbPromise) {\r\n return this.openDbPromise;\r\n }\r\n return this.openDbPromise = caches.open(this.dbName);\r\n }\r\n deleteFile(fileName) {\r\n return this.timeoutOperation((cache) => __awaiter(this, void 0, void 0, function* () {\r\n const deleted = yield cache.delete('/' + fileName);\r\n }));\r\n }\r\n saveFile(fileName, blob) {\r\n //return Promise.resolve(blobConstruct([blob]));\r\n if (!(blob instanceof Blob)) {\r\n blob = bin_utils_1.blobConstruct(blob);\r\n }\r\n return this.timeoutOperation((cache) => __awaiter(this, void 0, void 0, function* () {\r\n yield cache.put('/' + fileName, new Response(blob));\r\n return blob;\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.timeoutOperation((cache) => __awaiter(this, void 0, void 0, function* () {\r\n const response = yield cache.match('/' + fileName);\r\n if (!response || !cache) {\r\n //console.warn('getFile:', response, fileName);\r\n throw 'No response???';\r\n }\r\n return response.blob();\r\n }));\r\n }\r\n timeoutOperation(callback) {\r\n return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {\r\n let rejected = false;\r\n const timeout = setTimeout(() => {\r\n reject();\r\n //console.warn('CACHESTORAGE TIMEOUT');\r\n rejected = true;\r\n }, 5e3);\r\n try {\r\n const cache = yield this.openDatabase();\r\n if (!cache) {\r\n throw 'no cache?';\r\n }\r\n const res = yield callback(cache);\r\n if (rejected)\r\n return;\r\n resolve(res);\r\n }\r\n catch (err) {\r\n reject(err);\r\n }\r\n clearTimeout(timeout);\r\n }));\r\n }\r\n getFileWriter(fileName, mimeType) {\r\n const fakeWriter = filemanager_1.default.getFakeFileWriter(mimeType, (blob) => {\r\n return this.saveFile(fileName, blob);\r\n });\r\n return Promise.resolve(fakeWriter);\r\n }\r\n}\r\nconst cacheStorage = new CacheStorageController();\r\n/* // @ts-ignore\r\nif(process.env.NODE_ENV != 'production') {\r\n (window as any).cacheStorage = cacheStorage;\r\n} */\r\nexports.default = cacheStorage;\r\n" - }, - { - "id": 34, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\helpers\\userAgent.ts", - "name": "./src/helpers/userAgent.ts", - "index": 34, - "index2": 32, - "size": 1248, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiFileManager.ts", - "issuerId": 32, - "issuerName": "./src/lib/mtproto/apiFileManager.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 32, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiFileManager.ts", - "name": "./src/lib/mtproto/apiFileManager.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - } - ], - "profile": { - "factory": 1392, - "building": 680, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 32, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiFileManager.ts", - "module": "./src/lib/mtproto/apiFileManager.ts", - "moduleName": "./src/lib/mtproto/apiFileManager.ts", - "type": "cjs require", - "userRequest": "../../helpers/userAgent", - "loc": "21:20-54" - } - ], - "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.isSafari = exports.isAppleMobile = exports.isAndroid = exports.isApple = exports.userAgent = void 0;\r\nexports.userAgent = navigator ? navigator.userAgent : null;\r\nexports.isApple = navigator.userAgent.search(/OS X|iPhone|iPad|iOS/i) != -1;\r\nexports.isAndroid = navigator.userAgent.toLowerCase().indexOf('android') != -1;\r\n/**\r\n * Returns true when run in WebKit derived browsers.\r\n * This is used as a workaround for a memory leak in Safari caused by using Transferable objects to\r\n * transfer data between WebWorkers and the main thread.\r\n * https://github.com/mapbox/mapbox-gl-js/issues/8771\r\n *\r\n * This should be removed once the underlying Safari issue is fixed.\r\n */\r\nconst ctx = typeof (window) !== 'undefined' ? window : self;\r\n// https://stackoverflow.com/a/58065241\r\nexports.isAppleMobile = (/iPad|iPhone|iPod/.test(navigator.platform) ||\r\n (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1)) &&\r\n !ctx.MSStream;\r\nexports.isSafari = !!('safari' in ctx) || !!(exports.userAgent && (/\\b(iPad|iPhone|iPod)\\b/.test(exports.userAgent) || (!!exports.userAgent.match('Safari') && !exports.userAgent.match('Chrome')))) /* || true */;\r\n" - }, - { - "id": 35, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\helpers\\cancellablePromise.ts", - "name": "./src/helpers/cancellablePromise.ts", - "index": 35, - "index2": 33, - "size": 1438, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiFileManager.ts", - "issuerId": 32, - "issuerName": "./src/lib/mtproto/apiFileManager.ts", - "issuerPath": [ - { - "id": 19, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.ts", - "name": "./node_modules/ts-loader!./node_modules/ifdef-loader/ifdef-loader.js??ref--5-1!./src/lib/mtproto/mtproto.worker.ts", - "profile": { - "factory": 7, - "building": 1686 - } - }, - { - "id": 32, - "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiFileManager.ts", - "name": "./src/lib/mtproto/apiFileManager.ts", - "profile": { - "factory": 4909, - "building": 701, - "dependencies": 1 - } - } - ], - "profile": { - "factory": 1392, - "building": 680, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 32, - "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!F:\\tweb\\src\\lib\\mtproto\\apiFileManager.ts", - "module": "./src/lib/mtproto/apiFileManager.ts", - "moduleName": "./src/lib/mtproto/apiFileManager.ts", - "type": "cjs require", - "userRequest": "../../helpers/cancellablePromise", - "loc": "24:29-72" - } - ], - "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 = void 0;\r\nfunction deferredPromise() {\r\n let deferredHelper = {\r\n isFulfilled: false,\r\n isRejected: false,\r\n notify: () => { },\r\n notifyAll: (...args) => {\r\n deferredHelper.lastNotify = args;\r\n deferredHelper.listeners.forEach((callback) => callback(...args));\r\n },\r\n lastNotify: undefined,\r\n listeners: [],\r\n addNotifyListener: (callback) => {\r\n if (deferredHelper.lastNotify) {\r\n callback(...deferredHelper.lastNotify);\r\n }\r\n deferredHelper.listeners.push(callback);\r\n }\r\n };\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 deferred.finally(() => {\r\n deferred.notify = null;\r\n deferred.listeners.length = 0;\r\n deferred.lastNotify = null;\r\n });\r\n Object.assign(deferred, deferredHelper);\r\n return deferred;\r\n}\r\nexports.deferredPromise = deferredPromise;\r\n" - } - ], - "filteredModules": 0, - "logging": { - "webpack.buildChunkGraph.visitModules": { - "entries": [], - "filteredEntries": 2, - "debug": false - } - }, - "children": [], - "name": "worker" - } - ] -} diff --git a/tsconfig.json b/tsconfig.json index 95367ae9..fe164d31 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,9 +3,9 @@ /* Basic Options */ // "incremental": true, /* Enable incremental compilation */ //"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ - "target": "es2016", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ + "target": "es2015", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ - "lib": ["es2016", "dom", "ES2018.Promise", "webworker"], /* Specify library files to be included in the compilation. */ + "lib": ["es2015", "dom", "webworker"], /* Specify library files to be included in the compilation. */ "allowJs": true, /* Allow javascript files to be compiled. */ // "checkJs": true, /* Report errors in .js files. */ // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ diff --git a/webpack.common.js b/webpack.common.js index d413e45b..61b126a6 100644 --- a/webpack.common.js +++ b/webpack.common.js @@ -6,7 +6,7 @@ const postcssPresetEnv = require('postcss-preset-env'); const ServiceWorkerWebpackPlugin = require('serviceworker-webpack-plugin'); const fs = require('fs'); -const allowedIPs = ['195.66.140.39', '192.168.31.144', '127.0.0.1', '192.168.31.1', '192.168.31.192', '176.100.18.181', '46.219.250.22', '193.42.119.184', '46.133.168.67', '78.26.144.197', '46.133.225.88', '128.124.170.79']; +const allowedIPs = ['194.58.97.147', '195.66.140.39', '192.168.31.144', '127.0.0.1', '192.168.31.1', '192.168.31.192', '176.100.8.202', '46.219.250.22', '193.42.119.184', '46.133.168.67', '78.26.144.197', '46.133.225.88', '128.124.170.79']; const devMode = process.env.NODE_ENV !== 'production'; const useLocal = false; @@ -59,6 +59,7 @@ module.exports = { { test: /\.ts?$/, use: [ + //{ loader: 'babel-loader', options: require('./babel.config') }, 'ts-loader', { loader: "ifdef-loader", options: opts } ], @@ -93,7 +94,7 @@ module.exports = { contentBase: path.join(__dirname, 'public'), watchContentBase: true, compress: true, - http2: true, + http2: useLocal ? undefined : true, https: useLocal ? undefined : { key: fs.readFileSync(__dirname + '/certs/server-key.pem', 'utf8'), cert: fs.readFileSync(__dirname + '/certs/server-cert.pem', 'utf8') @@ -101,13 +102,13 @@ module.exports = { allowedHosts: useLocal ? undefined : [ 'tweb.enko.club' ], - host: '0.0.0.0', + host: useLocal ? undefined : '0.0.0.0', public: useLocal ? undefined : 'tweb.enko.club', //host: '192.168.0.105', // '0.0.0.0' //host: 'tweb.enko.club', // '0.0.0.0' - port: 443, + port: useLocal ? undefined : 443, overlay: true, - before: function(app, server, compiler) { + before: useLocal ? undefined : function(app, server, compiler) { app.use((req, res, next) => { let IP = ''; if(req.headers['cf-connecting-ip']) { diff --git a/whybundled.txt b/whybundled.txt deleted file mode 100644 index 14c7eecce5fb5a9268f40257517e571af1d02af8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 97110 zcmeHQTTdNHlCG6_T4|-;`2)*ny7y@?%^mm4jE%=5YkRcrw!Hn&8d+d4rj3CHeCr>- zyYXe5AhW8XvNEeOtLhXj1RU@&m637#;*yd7_rL#E{A+>F$15+t*8!XY-V~Sgo2%lQzP~O`iW~aC?@x>G==Tqbb^7_5{$;&5 zr{5pZ_apP~uZj=FExkIYe}6!)ZVZ*vp>#6=rRTIKr}S|`JD|~sogAK@%*m|;^t~p! zz7X$kiOzN6vHj^2{pPxOH%ZF36HtC*Xud8E4R@!;+nodyz9$MrR7fFF;XUiO0C;Co^r>j4;S3lHFg|cZxr8Vp#IiSdqJ9gWqc73 z#(MFV=!adK7X2wuRaM&$iORF$AH?yCg_ml=AY*a855js&w(OiJ1hN8O*&E%`&!36E zP23%hQbEfpP*#<*H$*Mye@}d!4y7qjm5U(DcrwIp56|6Lob^}YoW;ne#zI{YFTaok z9}-8aF%Z1b@KnX3r*m34q!Dw1p;~NA9;^hcQ1za5pW1AH zhLBs?ffVTJjmbr@Rc-f}LvnaC8XuieR_2(b^-ZxxUh< zSxn~FxyJ(zNm&jASC7}GplzE)EN=68y&Lj=hm=*+{6=maW9zY5#A38|dNzxlVs})U zV$s+Yap4_l)|h;VMN^t}aPd_YLBfCElDu7#HPmy?kU0LxnU@v0i^W;(^di&V9NP{@ zSsnzYA(BtT(<9>MB_V5Mn|-lgPWpwX!(lPhSP<`C8(ex!=moi*6R$tS4&;$+p+5x@ ztH!(KpM5?sH+@^tNKDh&GChd=Pzi%wx+X6EW_UU-l{wH1@-&CVe-U+G=v8rxXAgZ7bLZiSzir|Z7zRJZFz*MSghkxRm~%Q zAlZaXePrr-u&`~Kn2%e1@KBX5aP5NlhOFs1y*{F^C&hE3^pgC?nW1_-O8X!oWPaZh z>OuDD#P~$ygYokf+0`~Ql*77+T=qdhI#tN&Uy7S%i|;_OLUKBdQNTt7sW4V0tq^n@f5819(9exl#3)4vG@7+x3qU^(Pg(F4l3 zlwZFfYEFqB;F>UM`f^aDG6gb2Cbf(}Ly=~G9TPhGU@%>~*jB>k139BF?m2yD%Qz&D zc9P&N&Wv7>-pH$;NRy-|_rPdbe58+J!$vMV@tpLA}*FWhT1Er&^4;l&c+dmPV zMY_{IDj zicnJUEe|q5#v#;B_Lsdr7^IpVLpJP^G-|lj_rVjo_qrh(&Wr_&(T^^C5bf`SBy<`q zzC}L3jZDHh(}$uyn4-;cKQg&H;61z(xyr{RbLdL$YQ4Kty4wq3=)5~6s@^Q9K|S_@ z>|FDi0=CZOukrN(mc$&?AYx?s`(iLUS6Y#gl=BipNaSuWl%(^?>ev(VJ)jGfDz2Un zV>x!CJBZxOh89f$3E|u!pKS@tLRs01kvoyNKDn9LI968LWu1NS%ln0VpelW6tQKn1 z4``oXo84~e6_WMJ_b%)1gHU9BIC*+YHVDz&Fstr^N$jd`DKo%%kYQFGi$&ZMWFh^f zA_wmGFqsf->w`2t68DieLhK8PK%YAN?pq_rQYm{-;0$1>M2C7_S$`i~!I`mNNFvsW zf)kTT`W%5&dDmn1d#@KdaM#<_(#7rXUN0}H`IASBj+_IM6yy|Qd_DF%Znyj73$)cs zZt*2~_SluTubpLjuUG7^t-22m4wG?Nc^{vsW2%p&otS!n$p%38@H#;H{ZL~ZRee0B zP8IsnkmbG1C`EldroL+M0XmDGi0k4<`stKx{jIV6g6ZROy3B_Vy%q_J^{6hsjim~B z9+{UPiRK&P*g4VK*4=C=a$hxDEupKAAC9F<;>mam=Cff!Ngt0KLdo~UjW5b1xS ztTfI!T+j!q3pr@o@8z{6dx8FWWYzg(?ex|exA!>rbZq*i-jhA(s`c&iwBHMX#Lg8UHX3jp_?cC^B}vD*uh^t_~}C^x35^T?$rJw3V6 zjHL&9^O|@A+zI((uh|vPz&4caf@o2C93!&DT`K52j;ZH~731&vn!6wttOKwLsV^*tT(-nw(EsnTo~EFEFyHUT+se^)!X`Br}xKp?Le?{=A!$G zv1ZxnKE76>(&~vx+a%jWzwmZ-+W;*Q5VGzl&MLvvzVF|J2&lD zvRi9}1vsm{MtjKhF^*TH`XS$W;;igU+jrTyF6+X{Q1DZ)Can@;e@2~Be=|L6Zmvw^ z!#7d(@ygdLf2N7KU(?K5OswUzV%J7LkIjtQjbfkvGNLy0wQ?1x{J#)Up!SK0wj1PG zR_Pq;8TD^qr^@eyCVe1%e@A}@??w$3yDRVf`fercLAX-_@5MWKkIR2iqqlj=fm@qn zDZ}5yJc{q=>$kMS+h+Z%#m^)Mz?~A(*$X2R#G)qZ+ni`(ENwP5%hnlBpVI}*S)*)F8Xk~TA z6Z68A(anUs;4FQ0Y7w64?s>{5Ry7lOw(|5>YacdfTFo$=_pf3MO@Pg>PK5zqTuI2M zmF~nAmcXGnQJ>|8=(%a0N?kj0T1{nH%+h=O< zdUEMibv^9qd{ZxYJ>6y8;wK#!`DRn_vt1+twSy+N%GLrYVicA?x!SIaB+W;x7iNW4hxSA^SDL*8D7qKP4`z?o#>Z2aA5$ z>Mae}9YpYM+@xt+`LBV}W`wb65Jn0PRB0@u+`2z~NXRC~bF0+rKFjY}8(k)-6KQ>^rsuh{AHvUtLEi zk_NKxww^qe5*{ReJ=3w2|0w>OPH(@w%kH{2@sy>wi`7G&`^w}vk@H4g_LlZ*mHbQH zs=7H|^bCoO1X9EuXV>%_oPs&0?}$X*K84l0{+OGB^QYytBg>ACIz0Pl6S*S$i<4y9 zyPI;zf2RL^L4W5x;mYQH0{+LeH+Tcop>E7mh2B3<4xF)FSst4$v^;73ZqN8{$X~R% zb;+)!dm{E3Jj8hitV5nzUV){gPfoq5hQRi4gLZMlU~S9*#qZMO&&zh${i!KO3yYXz zCCwR1MC;w2XgL!SKeVA#M$3qIVtBwZGjz<(Spqy;KHDRARO4W0c&YpK3I})-yBldN16O=vpFe%ep!ay%PRLv+ zW%wLb6{SG#F>BfF6hNMzfB%G{D@231-&sGo3LV`voeZe1qwnS+{iZK=Y2(KWg9Bxn zhje)2xs2km5_r)3D`}oCf@gCSGu&zpOvOa&*zLDBy7kbxWVrec2uYK`R?jyw+WD1iTG`1(dJp)eDGBJ9ojl=1f8SrcPFWyvIj%P_jJ+C z&Kkf`2|o{!TwlBsW*44Q*EMGPTzaq=ES2;)#_ol#ow7FDjV6ApY%R-A4&RmOYozRe zdurs_UCzFYons<}7~RBs$MM%fz29fOB$?#1ZQ6dY*8&>eCJjZEH-*m%TN%75PF?t> z2xEO)CUzKpeFuy4+P?S-9=F@d{5tLDY57ciGhdMvh+p0E=zZHR@njmEe@tatUrUT7 z7{9XN-;Z#8Lyzhkybb!&U!=ZCgCp}ADV7Tv63j3wwdmjT+(c%N5_IRx{u2)gY&RPQ268-d$?thz;M z>X(vtTJHDh59;naaqlWR7?7vijr3tQAE9;7_}A2?@2CTev93^k=W2VGU9%i_cTJbx zYAp-eYM&faO`N_**LQ%WsOcWRw0b=CXx)c_w@j@Y=ZApHQ+6W7=&_w>YCSh@Q-UTB zy|VUvJZn;yb;am#Ol1uj1Kugzt}uV!jLOjqie2hcUD9gyhS|+2BlC8Dh!~gs^pJ6P zd0o1Gr(T)v32xK~flu~*D(vJaYkB%i7U`zpZm!u~2cOIUTG%0!H6OhW%jH)4K8A_K z5$Q}j8u$BiH+vi|GiAFOgD|UHvhvG0Bvb%mBF5O2l=a(M8onvT-U3waGT_V~uPttu zVl+H1?!Ga#TdmItz8!f2UT=8M)v}^@?S|vBTxcD+F?sdzJ93-w@gvithl(StBsxTW zcdEfBY?z*z{2h5^O_N;PI(7Co&miXYAtsOS{3>(2-6l1ykNa!NGm@>9;s~hQ>SAnx zjmiCedz@*L^+2ZQl6%+jncWxt{_nCB^ws1~-m*SbowW;DuWkBBm5_mx)z5^qqQWPq>-@9u^d=l-PGqEhxzCj zU1Se3ZkD~Ojdi}Uw5zk_R(U>#N5F>V7N1R@SP7><2p5@h$_EXL2wPid!+hjHU zo@>)&r?yF75S4{vnzFxlquHi)_;i-%0d`wOoUZsMzVH;X_;oC=j_5Na%aiNVYsvIZ zH?`Xepnb0RL05Ljzl7rdcwK4JS?=!YvW_@y@#`#lN|B$9+l}e#O7+wqV)P4&UHI%Y zBaJ!g1R~$+G$_b8*9VZd+otFyM(X3FjitW*gdwCKC=YTsr|x%O4jL7wT#`3tA5AsK z29JFHba~gF{(`az zr^HixHxsDDTus|6HYeG(s8G(+*H5nIu&I!qabj0Jv)epdflp3LQXOz4!hbs zSEjwAl6$su*KPF40zB&p8DeythFXH@V+>t7m{aJT#EgIBS)bGQ>OGZZJlQ|jI$q4` z+XbyVoV`QZ>0kO9nyQG+_q$_l(wm410j8CN$}2dk`;NHP!JE2Mf)DP_Gh6T0b&b>4 zDY19eY+-XW73Oget%g@FhMyz$d(B|obYmUStTdhXZ83#Ry^qCw%c~PNrY{VY(Zi^? zB1RWrXxXe4m}->e_A}dyF<#YH8dkDX#I&g@2c)oyI2V1tbU^>;Layl_i4pl{+Nf) z$a9W4r)To_f5?3wvFli7sl@F+xU&lKc ztAv;*zZ2Ov<+q#lh^)$swp-JA0!Hl0mPdv$0~mf5xvLBMJf+vy*|J#E%V34|NpK&m z)Du(GBE+-du0NcUIiV>ZddCR&zRI)1?fLS^Agtv%WeQjpWqRZs{P^$H1U~yEw?N7b z1iKWSqALZH#$#qNEsso>5xe^nZj#4M>zH|dOb8(t8WSc`X8D%+_>STDoJtuN z=y_tqRJ@kGrOeRA##H4!$t9IjMF85w9nSM{HVsis%sIt&nQZSQ3YqTCXAZc7Gp3_- zc`PYsI#T0aWS(u84p2S1()(zdyYYC+ z1Edr4k>=Qmc}WpJ?z4G9@`v34-WgId$Lq|LIL2?yp3t7Wru}KQvOM*PWi-4uvDwP% zGU}g5z)>E{>3&2WVtH(-pG!ZH)E-fnr0+(N^ikRHJzjD*SeWdhr#HkC^PFh8FC@IC zpIU~y&3l`R4Es8;)5|X33Oa6Wz^~KKDB5hcx;&G=%Xw8D8H8yR&TGI!R&VRzm;xgNa7n%+SB7f5Dr&4~d(iY1q?`H0xinsH_^G_<%c#C@ zH|8V-kWRjw)c9F`KmIIZz3*u+-rS)YMtXcA5}nYox9jA^pg3?Ojp~Dk1_o!;~~(nIK>w`p%#D$1r^NwjJCHK5ui)D&L!v+`vqRxyd<}c zZ;wcNuc((WY@&F2iAL||SW#8m-msna%QS4UbvGN*+f9vby z9zyPe4bKZNtNdEO^u<_W%zDC9MV`TczSvxm+xWc&ek|;_y?m=IvP=6(P9^I46(Y;- z84KyylHMGwZ(bc+`aW4S{DkZ$CXS1#2RcSS`0C2)y0IF9FD#UXf*6H62wSOqU-{<9)0Abyr%f54}$(bbV**g)76I z+znfeJ?rlx&i_w>2BYG>tLWJob&~)Y<7^{36`+rKwAkh) ze%E52qQY9toSBj)%ZjWv^GSVoy(#8*q}FQA%5dE&94Ss$tASMCk#5$p)NophiAI9d z?vvii-Vdjj_K8;Snqp>sB0|$Nr_?fHQC0mfBd>-i>m9{hz;*A* zdcbPPJ1yt03HwQH3h%``5b3TK&6Sm={Rq1&gnc!v#BM}xoLBzU%AZyquMGVa&z8^C zqRmQFvkSVEfE!#*!3kp6ea=kh$+`^DS!87@Z0b+!^bSn@yI(oE=9xUK4Q`Gt9v8a) z#>IN|zdepMLH(`yW=WYygkFN>jO1hONc(MebNW4)jMciiUrxdB7c5D9b=5?V0$gnofn$nKI>n|+pHUZgSonb zYy@wl;{5Qjb#;QyHPH#o1my9VzFrww2d)R^us#3aICp6BEtJ4ubMetG$E(;RHOI%# z&Bt(@C(vQy2xchGDV{~e9h!|P;__PWO-?NV?tMn}zwM7--1{-R)bfN}oj9t4-j&T|qPso5wkquBRNsvsSjht}bDDt-ih=$lCr!d+JlyB}17%oF z%%>|OK>3)Pgf1^g@?0>Vz9*XYT9?(zv<*;r3w)^>hO6m%Xr!8E;1uKWPK965quI)sGn2bQuc@I6Y$)z^9sY! z$<%PGo$~Rh_((c%OP?~I#^y12;_sa5$#GT!aosWDIb^txjCABeugh;G7`e{RO2kPF z-hE-T>9vV~^Z1nILadrkVZ6$54l+CQ&Wn^|W7!WuA%8bDL(Ct|BP~Nru+ck}#KXqK zH?lh}0%6R0-=zgP)?4~OjrEkWYk8z)ygX|vY2m!veU}zKCwIH(DVE!g^T^EjeHi^L zj5|*=W(MIr@@`^raZ@Sc;afVjiGD5QDshe~kIal05v8#+I5&m3m}@)tH%1aW%hS~RV&ZBnUC0&}h-i-X+E_u1R+az0wJs_Ne`C{m(eQq)^xq1@Ds|e__ z;zv50W>y|%hy&@&Um}hS2Ih$nwl#S0I``hDC%HSVr{0g?i;A}i z$$n?zBjAxaM8$qoYpo}w=EC?7oJB?7$_3eyJm__q?Z!4q1@5MRN7<#1xnm3~A@!Ss zQpd(q&$aq32e2pZvV`TBlU#_etxgEU88`P9B`wpKT0+M2E!v5`=an5`YsuLWNCV@} z{aIy4w0*$ol=9t9srf#h$MDhnjC`cab6cTX&Pl1&TZ?|BsB(?6>6a$^w?^8|bCeK! zpC&n>hpb|k`-(Q5(|pKXzcHEqRnkYyidi*%PHvTOmEM7~rlOzqw9iN2}dwyJPW>%zP~bY1~pVe+@k&iZ=g4=b=0_4(h;Q#kz`8SW;9wsnZl z@V~D-(}#CMEQjq1Og(MkhvG*^Yj?YO}#K_mlLiTav P*8`$#gCy>O(bWG3B-2!@