uawdijnntqw1x1x1
IP : 52.14.145.78
Hostname : axolotl
Kernel : Linux axolotl 4.9.0-13-amd64 #1 SMP Debian 4.9.228-1 (2020-07-05) x86_64
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
OS : Linux
PATH:
/
var
/
www
/
axolotl
/
data
/
www
/
ekb.axolotls.ru
/
bitrix
/
js
/
landing
/
imagecompressor
/
src
/
imagecompressor.js
/
/
import {Type} from 'main.core'; import Compressor from 'compressorjs/src/index'; import allowedSizeProps from './internal/allowed-size-props'; import urlToBlob from './internal/url-to-blob'; import type {ImageCompressorOptions} from './types'; export class ImageCompressor { constructor(file, options: ImageCompressorOptions = {}) { this.file = file; this.options = {quality: 0.8, ...options}; if (this.options.retina) { allowedSizeProps.forEach((prop) => { if (Type.isNumber(this.options[prop])) { this.options[prop] *= 2; } }); } } static compress(file, options: ImageCompressorOptions = {}): Promise<File> { return urlToBlob(file).then((blob) => { const compressor = new ImageCompressor(blob, options); return compressor.compress(); }); } compress(): Promise<File> { return new Promise((resolve, reject) => { void new Compressor( this.file, {...this.options, ...{success: resolve, error: reject}}, ); }); } }
/var/www/axolotl/data/www/ekb.axolotls.ru/bitrix/js/landing/imagecompressor/src/imagecompressor.js