From 55562a56aa16adb115265694d9fccab8aa65d050 Mon Sep 17 00:00:00 2001 From: Ethan O'Brien <77750390+ethanaobrien@users.noreply.github.com> Date: Thu, 11 Aug 2022 12:39:00 -0500 Subject: [PATCH] Version 2.2.3 --- README.md | 10 +- data/emu-main.js | 974 +++----- data/emulator.js | 5107 +----------------------------------------- data/emulator.min.js | 2 +- data/loader.js | 2 +- data/v.json | 8 +- index.html | 1 + 7 files changed, 338 insertions(+), 5766 deletions(-) diff --git a/README.md b/README.md index ab4a0f2..c159300 100644 --- a/README.md +++ b/README.md @@ -41,18 +41,18 @@ Self-hosted **Javascript** emulation for various system.
-### Beta +### Old Cores -The **beta** of the emulator core is now available for *some* systems.
-To use it, please add the following line to your code. +The new cores are now the stable cores, if you want to
+continue using the old cores, add this line to your code ```js -EJS_BETA = true; +EJS_oldCores = true; ```
-**>> When reporting bugs, please specify that you are using the beta version** +**>> When reporting bugs, please specify that you are using the old version**

diff --git a/data/emu-main.js b/data/emu-main.js index 5fb9a00..e1356c6 100644 --- a/data/emu-main.js +++ b/data/emu-main.js @@ -22,7 +22,7 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) { 'saveState': 'Save State (Shift + F2)', 'loadState': 'Load State (Shift + F4)', 'screenRecord': 'Start Screen Recording', - 'netplay': 'Netplay', + //'netplay': 'Netplay', 'gamepad': 'Control Settings', 'cheat': 'Cheats', 'menuBack': 'Go back to previous menu', @@ -60,7 +60,7 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) { 'loadState': '[data-btn="load-state"]', 'screenRecord': '[data-btn="screen-record"]', 'gamepad': '[data-btn="gamepad"]', - 'netplay': '[data-btn="netplay"]', + //'netplay': '[data-btn="netplay"]', 'cheat': '[data-btn="cheat"]' }, 'inputs': { @@ -583,9 +583,7 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) { } }]) && _0x4c97b0(_0x17edbf.prototype, _0x2c1832), _0x4496fc && _0x4c97b0(_0x17edbf, _0x4496fc), _0x566dbe; }(); - var _0x13fb79, _0x569918 = _0x2c1832(108), - _0x4e4ca6 = _0x2c1832.n(_0x569918), - _0x4ad1c6 = _0x2c1832(6), + var _0x13fb79, _0x4ad1c6 = _0x2c1832(6), _0x4704b1 = _0x2c1832(159), _0x3a58c8 = _0x2c1832.n(_0x4704b1), _0x5032e6 = { @@ -600,8 +598,7 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) { 'crt-aperture.glsl': '\n/*\nCRT Shader by EasyMode\nLicense: GPL\n*/\n/*\n#pragma parameter SHARPNESS_IMAGE "Sharpness Image" 1.0 1.0 5.0 1.0\n#pragma parameter SHARPNESS_EDGES "Sharpness Edges" 3.0 1.0 5.0 1.0\n#pragma parameter GLOW_WIDTH "Glow Width" 0.5 0.05 0.65 0.05\n#pragma parameter GLOW_HEIGHT "Glow Height" 0.5 0.05 0.65 0.05\n#pragma parameter GLOW_HALATION "Glow Halation" 0.1 0.0 1.0 0.01\n#pragma parameter GLOW_DIFFUSION "Glow Diffusion" 0.05 0.0 1.0 0.01\n#pragma parameter MASK_COLORS "Mask Colors" 2.0 2.0 3.0 1.0\n#pragma parameter MASK_STRENGTH "Mask Strength" 0.3 0.0 1.0 0.05\n#pragma parameter MASK_SIZE "Mask Size" 1.0 1.0 9.0 1.0\n#pragma parameter SCANLINE_SIZE_MIN "Scanline Size Min." 0.5 0.5 1.5 0.05\n#pragma parameter SCANLINE_SIZE_MAX "Scanline Size Max." 1.5 0.5 1.5 0.05\n#pragma parameter GAMMA_INPUT "Gamma Input" 2.4 1.0 5.0 0.1\n#pragma parameter GAMMA_OUTPUT "Gamma Output" 2.4 1.0 5.0 0.1\n#pragma parameter BRIGHTNESS "Brightness" 1.5 0.0 2.0 0.05\n* */\n\n#define Coord TEX0\n\n#if defined(VERTEX)\n\n#if __VERSION__ >= 130\n#define OUT out\n#define IN in\n#define tex2D texture\n#else\n#define OUT varying \n#define IN attribute \n#define tex2D texture2D\n#endif\n\n#ifdef GL_ES\n#define PRECISION mediump\n#else\n#define PRECISION\n#endif\n\nIN vec4 VertexCoord;\nIN vec4 Color;\nIN vec2 TexCoord;\nOUT vec4 color;\nOUT vec2 Coord;\n\nuniform mat4 MVPMatrix;\nuniform PRECISION int FrameDirection;\nuniform PRECISION int FrameCount;\nuniform PRECISION vec2 OutputSize;\nuniform PRECISION vec2 TextureSize;\nuniform PRECISION vec2 InputSize;\n\nvoid main()\n{\ngl_Position = MVPMatrix * VertexCoord;\ncolor = Color;\nCoord = TexCoord;\n}\n\n#elif defined(FRAGMENT)\n\n#if __VERSION__ >= 130\n#define IN in\n#define tex2D texture\nout vec4 FragColor;\n#else\n#define IN varying\n#define FragColor gl_FragColor\n#define tex2D texture2D\n#endif\n\n#ifdef GL_ES\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n#define PRECISION mediump\n#else\n#define PRECISION\n#endif\n\nuniform PRECISION int FrameDirection;\nuniform PRECISION int FrameCount;\nuniform PRECISION vec2 OutputSize;\nuniform PRECISION vec2 TextureSize;\nuniform PRECISION vec2 InputSize;\nuniform sampler2D Texture;\nIN vec2 Coord;\n\n#ifdef PARAMETER_UNIFORM\nuniform PRECISION float SHARPNESS_IMAGE;\nuniform PRECISION float SHARPNESS_EDGES;\nuniform PRECISION float GLOW_WIDTH;\nuniform PRECISION float GLOW_HEIGHT;\nuniform PRECISION float GLOW_HALATION;\nuniform PRECISION float GLOW_DIFFUSION;\nuniform PRECISION float MASK_COLORS;\nuniform PRECISION float MASK_STRENGTH;\nuniform PRECISION float MASK_SIZE;\nuniform PRECISION float SCANLINE_SIZE_MIN;\nuniform PRECISION float SCANLINE_SIZE_MAX;\nuniform PRECISION float GAMMA_INPUT;\nuniform PRECISION float GAMMA_OUTPUT;\nuniform PRECISION float BRIGHTNESS;\n#else\n#define SHARPNESS_IMAGE 1.0\n#define SHARPNESS_EDGES 3.0\n#define GLOW_WIDTH 0.5\n#define GLOW_HEIGHT 0.5\n#define GLOW_HALATION 0.1\n#define GLOW_DIFFUSION 0.05\n#define MASK_COLORS 2.0\n#define MASK_STRENGTH 0.3\n#define MASK_SIZE 1.0\n#define SCANLINE_SIZE_MIN 0.5\n#define SCANLINE_SIZE_MAX 1.5\n#define GAMMA_INPUT 2.4\n#define GAMMA_OUTPUT 2.4\n#define BRIGHTNESS 1.5\n#endif\n\n#define FIX(c) max(abs(c), 1e-5)\n#define PI 3.141592653589\n#define saturate(c) clamp(c, 0.0, 1.0)\n#define TEX2D(c) pow(tex2D(tex, c).rgb, vec3(GAMMA_INPUT))\n\nmat3 get_color_matrix(sampler2D tex, vec2 co, vec2 dx)\n{\nreturn mat3(TEX2D(co - dx), TEX2D(co), TEX2D(co + dx));\n}\n\nvec3 blur(mat3 m, float dist, float rad)\n{\nvec3 x = vec3(dist - 1.0, dist, dist + 1.0) / rad;\nvec3 w = exp2(x * x * -1.0);\n\nreturn (m[0] * w.x + m[1] * w.y + m[2] * w.z) / (w.x + w.y + w.z);\n}\n\nvec3 filter_gaussian(sampler2D tex, vec2 co, vec2 tex_size)\n{\nvec2 dx = vec2(1.0 / tex_size.x, 0.0);\nvec2 dy = vec2(0.0, 1.0 / tex_size.y);\nvec2 pix_co = co * tex_size;\nvec2 tex_co = (floor(pix_co) + 0.5) / tex_size;\nvec2 dist = (fract(pix_co) - 0.5) * -1.0;\n\nmat3 line0 = get_color_matrix(tex, tex_co - dy, dx);\nmat3 line1 = get_color_matrix(tex, tex_co, dx);\nmat3 line2 = get_color_matrix(tex, tex_co + dy, dx);\nmat3 column = mat3(blur(line0, dist.x, GLOW_WIDTH),\n blur(line1, dist.x, GLOW_WIDTH),\n blur(line2, dist.x, GLOW_WIDTH));\n\nreturn blur(column, dist.y, GLOW_HEIGHT);\n}\n\nvec3 filter_lanczos(sampler2D tex, vec2 co, vec2 tex_size, float sharp)\n{\ntex_size.x *= sharp;\n\nvec2 dx = vec2(1.0 / tex_size.x, 0.0);\nvec2 pix_co = co * tex_size - vec2(0.5, 0.0);\nvec2 tex_co = (floor(pix_co) + vec2(0.5, 0.0)) / tex_size;\nvec2 dist = fract(pix_co);\nvec4 coef = PI * vec4(dist.x + 1.0, dist.x, dist.x - 1.0, dist.x - 2.0);\n\ncoef = FIX(coef);\ncoef = 2.0 * sin(coef) * sin(coef / 2.0) / (coef * coef);\ncoef /= dot(coef, vec4(1.0));\n\nvec4 col1 = vec4(TEX2D(tex_co), 1.0);\nvec4 col2 = vec4(TEX2D(tex_co + dx), 1.0);\n\nreturn (mat4(col1, col1, col2, col2) * coef).rgb;\n}\n\nvec3 get_scanline_weight(float x, vec3 col)\n{\nvec3 beam = mix(vec3(SCANLINE_SIZE_MIN), vec3(SCANLINE_SIZE_MAX), col);\nvec3 x_mul = 2.0 / beam;\nvec3 x_offset = x_mul * 0.5;\n\nreturn smoothstep(0.0, 1.0, 1.0 - abs(x * x_mul - x_offset)) * x_offset;\n}\n\nvec3 get_mask_weight(float x)\n{\nfloat i = mod(floor(x * OutputSize.x * TextureSize.x / (InputSize.x * MASK_SIZE)), MASK_COLORS);\n\nif (i == 0.0) return mix(vec3(1.0, 0.0, 1.0), vec3(1.0, 0.0, 0.0), MASK_COLORS - 2.0);\nelse if (i == 1.0) return vec3(0.0, 1.0, 0.0);\nelse return vec3(0.0, 0.0, 1.0);\n}\n\nvoid main()\n{\nvec3 col_glow = filter_gaussian(Texture, Coord, TextureSize);\nvec3 col_soft = filter_lanczos(Texture, Coord, TextureSize, SHARPNESS_IMAGE);\nvec3 col_sharp = filter_lanczos(Texture, Coord, TextureSize, SHARPNESS_EDGES);\nvec3 col = sqrt(col_sharp * col_soft);\n\ncol *= get_scanline_weight(fract(Coord.y * TextureSize.y), col_soft);\ncol_glow = saturate(col_glow - col);\ncol += col_glow * col_glow * GLOW_HALATION;\ncol = mix(col, col * get_mask_weight(Coord.x) * MASK_COLORS, MASK_STRENGTH);\ncol += col_glow * GLOW_DIFFUSION;\ncol = pow(col * BRIGHTNESS, vec3(1.0 / GAMMA_OUTPUT));\n\nFragColor = vec4(col, 1.0);\n}\n\n#endif\n', 'crt-geom.glsl': '\n/*\nCRT-interlaced\n\nCopyright (C) 2010-2012 cgwg, Themaister and DOLLS\n\nThis program is free software; you can redistribute it and/or modify it\nunder the terms of the GNU General Public License as published by the Free\nSoftware Foundation; either version 2 of the License, or (at your option)\nany later version.\n\n(cgwg gave their consent to have the original version of this shader\ndistributed under the GPL in this message:\n\nhttp://board.byuu.org/viewtopic.php?p=26075#p26075\n\n"Feel free to distribute my shaders under the GPL. After all, the\nbarrel distortion code was taken from the Curvature shader, which is\nunder the GPL."\n)\nThis shader variant is pre-configured with screen curvature\n*/\n/*\n#pragma parameter CRTgamma "CRTGeom Target Gamma" 2.4 0.1 5.0 0.1\n#pragma parameter monitorgamma "CRTGeom Monitor Gamma" 2.2 0.1 5.0 0.1\n#pragma parameter d "CRTGeom Distance" 1.6 0.1 3.0 0.1\n#pragma parameter CURVATURE "CRTGeom Curvature Toggle" 1.0 0.0 1.0 1.0\n#pragma parameter R "CRTGeom Curvature Radius" 2.0 0.1 10.0 0.1\n#pragma parameter cornersize "CRTGeom Corner Size" 0.03 0.001 1.0 0.005\n#pragma parameter cornersmooth "CRTGeom Corner Smoothness" 1000.0 80.0 2000.0 100.0\n#pragma parameter x_tilt "CRTGeom Horizontal Tilt" 0.0 -0.5 0.5 0.05\n#pragma parameter y_tilt "CRTGeom Vertical Tilt" 0.0 -0.5 0.5 0.05\n#pragma parameter overscan_x "CRTGeom Horiz. Overscan %" 100.0 -125.0 125.0 1.0\n#pragma parameter overscan_y "CRTGeom Vert. Overscan %" 100.0 -125.0 125.0 1.0\n#pragma parameter DOTMASK "CRTGeom Dot Mask Toggle" 0.3 0.0 0.3 0.3\n#pragma parameter SHARPER "CRTGeom Sharpness" 1.0 1.0 3.0 1.0\n#pragma parameter scanline_weight "CRTGeom Scanline Weight" 0.3 0.1 0.5 0.05\n*/\n\n#ifndef PARAMETER_UNIFORM\n#define CRTgamma 2.4\n#define monitorgamma 2.2\n#define d 1.6\n#define CURVATURE 1.0\n#define R 2.0\n#define cornersize 0.03\n#define cornersmooth 1000.0\n#define x_tilt 0.0\n#define y_tilt 0.0\n#define overscan_x 100.0\n#define overscan_y 100.0\n#define DOTMASK 0.3\n#define SHARPER 1.0\n#define scanline_weight 0.3\n#endif\n\n#if defined(VERTEX)\n\n#if __VERSION__ >= 130\n#define COMPAT_VARYING out\n#define COMPAT_ATTRIBUTE in\n#define COMPAT_TEXTURE texture\n#else\n#define COMPAT_VARYING varying \n#define COMPAT_ATTRIBUTE attribute \n#define COMPAT_TEXTURE texture2D\n#endif\n\n#ifdef GL_ES\n#define COMPAT_PRECISION mediump\n#else\n#define COMPAT_PRECISION\n#endif\n\nCOMPAT_ATTRIBUTE vec4 VertexCoord;\nCOMPAT_ATTRIBUTE vec4 COLOR;\nCOMPAT_ATTRIBUTE vec4 TexCoord;\nCOMPAT_VARYING vec4 COL0;\nCOMPAT_VARYING vec4 TEX0;\n\nvec4 _oPosition1; \nuniform mat4 MVPMatrix;\nuniform COMPAT_PRECISION int FrameDirection;\nuniform COMPAT_PRECISION int FrameCount;\nuniform COMPAT_PRECISION vec2 OutputSize;\nuniform COMPAT_PRECISION vec2 TextureSize;\nuniform COMPAT_PRECISION vec2 InputSize;\n\nCOMPAT_VARYING vec2 overscan;\nCOMPAT_VARYING vec2 aspect;\nCOMPAT_VARYING vec3 stretch;\nCOMPAT_VARYING vec2 sinangle;\nCOMPAT_VARYING vec2 cosangle;\nCOMPAT_VARYING vec2 one;\nCOMPAT_VARYING float mod_factor;\nCOMPAT_VARYING vec2 ilfac;\n\n#ifdef PARAMETER_UNIFORM\nuniform COMPAT_PRECISION float CRTgamma;\nuniform COMPAT_PRECISION float monitorgamma;\nuniform COMPAT_PRECISION float d;\nuniform COMPAT_PRECISION float CURVATURE;\nuniform COMPAT_PRECISION float R;\nuniform COMPAT_PRECISION float cornersize;\nuniform COMPAT_PRECISION float cornersmooth;\nuniform COMPAT_PRECISION float x_tilt;\nuniform COMPAT_PRECISION float y_tilt;\nuniform COMPAT_PRECISION float overscan_x;\nuniform COMPAT_PRECISION float overscan_y;\nuniform COMPAT_PRECISION float DOTMASK;\nuniform COMPAT_PRECISION float SHARPER;\nuniform COMPAT_PRECISION float scanline_weight;\n#endif\n\n#define FIX(c) max(abs(c), 1e-5);\n\nfloat intersect(vec2 xy)\n{\nfloat A = dot(xy,xy)+d*d;\nfloat B = 2.0*(R*(dot(xy,sinangle)-d*cosangle.x*cosangle.y)-d*d);\nfloat C = d*d + 2.0*R*d*cosangle.x*cosangle.y;\nreturn (-B-sqrt(B*B-4.0*A*C))/(2.0*A);\n}\n\nvec2 bkwtrans(vec2 xy)\n{\nfloat c = intersect(xy);\nvec2 point = vec2(c)*xy;\npoint -= vec2(-R)*sinangle;\npoint /= vec2(R);\nvec2 tang = sinangle/cosangle;\nvec2 poc = point/cosangle;\nfloat A = dot(tang,tang)+1.0;\nfloat B = -2.0*dot(poc,tang);\nfloat C = dot(poc,poc)-1.0;\nfloat a = (-B+sqrt(B*B-4.0*A*C))/(2.0*A);\nvec2 uv = (point-a*sinangle)/cosangle;\nfloat r = R*acos(a);\nreturn uv*r/sin(r/R);\n}\n\nvec2 fwtrans(vec2 uv)\n{\nfloat r = FIX(sqrt(dot(uv,uv)));\nuv *= sin(r/R)/r;\nfloat x = 1.0-cos(r/R);\nfloat D = d/R + x*cosangle.x*cosangle.y+dot(uv,sinangle);\nreturn d*(uv*cosangle-x*sinangle)/D;\n}\n\nvec3 maxscale()\n{\nvec2 c = bkwtrans(-R * sinangle / (1.0 + R/d*cosangle.x*cosangle.y));\nvec2 a = vec2(0.5,0.5)*aspect;\nvec2 lo = vec2(fwtrans(vec2(-a.x,c.y)).x, fwtrans(vec2(c.x,-a.y)).y)/aspect;\nvec2 hi = vec2(fwtrans(vec2(+a.x,c.y)).x, fwtrans(vec2(c.x,+a.y)).y)/aspect;\nreturn vec3((hi+lo)*aspect*0.5,max(hi.x-lo.x,hi.y-lo.y));\n}\n\nvoid main()\n{\n// START of parameters\n\n// gamma of simulated CRT\n// CRTgamma = 1.8;\n// gamma of display monitor (typically 2.2 is correct)\n// monitorgamma = 2.2;\n// overscan (e.g. 1.02 for 2% overscan)\noverscan = vec2(1.00,1.00);\n// aspect ratio\naspect = vec2(1.0, 0.75);\n// lengths are measured in units of (approximately) the width\n// of the monitor simulated distance from viewer to monitor\n// d = 2.0;\n// radius of curvature\n// R = 1.5;\n// tilt angle in radians\n// (behavior might be a bit wrong if both components are\n// nonzero)\nconst vec2 angle = vec2(0.0,0.0);\n// size of curved corners\n// cornersize = 0.03;\n// border smoothness parameter\n// decrease if borders are too aliased\n// cornersmooth = 1000.0;\n\n// END of parameters\n\nvec4 _oColor;\nvec2 _otexCoord;\ngl_Position = VertexCoord.x * MVPMatrix[0] + VertexCoord.y * MVPMatrix[1] + VertexCoord.z * MVPMatrix[2] + VertexCoord.w * MVPMatrix[3];\n_oPosition1 = gl_Position;\n_oColor = COLOR;\n_otexCoord = TexCoord.xy;\nCOL0 = COLOR;\nTEX0.xy = TexCoord.xy;\n\n// Precalculate a bunch of useful values we\'ll need in the fragment\n// shader.\nsinangle = sin(vec2(x_tilt, y_tilt)) + vec2(0.001);//sin(vec2(max(abs(x_tilt), 1e-3), max(abs(y_tilt), 1e-3)));\ncosangle = cos(vec2(x_tilt, y_tilt)) + vec2(0.001);//cos(vec2(max(abs(x_tilt), 1e-3), max(abs(y_tilt), 1e-3)));\nstretch = maxscale();\n\nilfac = vec2(1.0,clamp(floor(InputSize.y/200.0), 1.0, 2.0));\n\n// The size of one texel, in texture-coordinates.\nvec2 sharpTextureSize = vec2(SHARPER * TextureSize.x, TextureSize.y);\none = ilfac / sharpTextureSize;\n\n// Resulting X pixel-coordinate of the pixel we\'re drawing.\nmod_factor = TexCoord.x * TextureSize.x * OutputSize.x / InputSize.x;\n\n}\n\n#elif defined(FRAGMENT)\n\n#if __VERSION__ >= 130\n#define COMPAT_VARYING in\n#define COMPAT_TEXTURE texture\nout vec4 FragColor;\n#else\n#define COMPAT_VARYING varying\n#define FragColor gl_FragColor\n#define COMPAT_TEXTURE texture2D\n#endif\n\n#ifdef GL_ES\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n#define COMPAT_PRECISION mediump\n#else\n#define COMPAT_PRECISION\n#endif\n\nstruct output_dummy {\nvec4 _color;\n};\n\nuniform COMPAT_PRECISION int FrameDirection;\nuniform COMPAT_PRECISION int FrameCount;\nuniform COMPAT_PRECISION vec2 OutputSize;\nuniform COMPAT_PRECISION vec2 TextureSize;\nuniform COMPAT_PRECISION vec2 InputSize;\nuniform sampler2D Texture;\nCOMPAT_VARYING vec4 TEX0;\n\n// Comment the next line to disable interpolation in linear gamma (and\n// gain speed).\n#define LINEAR_PROCESSING\n\n// Enable screen curvature.\n// #define CURVATURE\n\n// Enable 3x oversampling of the beam profile\n#define OVERSAMPLE\n\n// Use the older, purely gaussian beam profile\n//#define USEGAUSSIAN\n\n// Macros.\n#define FIX(c) max(abs(c), 1e-5);\n#define PI 3.141592653589\n\n#ifdef LINEAR_PROCESSING\n# define TEX2D(c) pow(COMPAT_TEXTURE(Texture, (c)), vec4(CRTgamma))\n#else\n# define TEX2D(c) COMPAT_TEXTURE(Texture, (c))\n#endif\n\nCOMPAT_VARYING vec2 one;\nCOMPAT_VARYING float mod_factor;\nCOMPAT_VARYING vec2 ilfac;\nCOMPAT_VARYING vec2 overscan;\nCOMPAT_VARYING vec2 aspect;\nCOMPAT_VARYING vec3 stretch;\nCOMPAT_VARYING vec2 sinangle;\nCOMPAT_VARYING vec2 cosangle;\n\n#ifdef PARAMETER_UNIFORM\nuniform COMPAT_PRECISION float CRTgamma;\nuniform COMPAT_PRECISION float monitorgamma;\nuniform COMPAT_PRECISION float d;\nuniform COMPAT_PRECISION float CURVATURE;\nuniform COMPAT_PRECISION float R;\nuniform COMPAT_PRECISION float cornersize;\nuniform COMPAT_PRECISION float cornersmooth;\nuniform COMPAT_PRECISION float x_tilt;\nuniform COMPAT_PRECISION float y_tilt;\nuniform COMPAT_PRECISION float overscan_x;\nuniform COMPAT_PRECISION float overscan_y;\nuniform COMPAT_PRECISION float DOTMASK;\nuniform COMPAT_PRECISION float SHARPER;\nuniform COMPAT_PRECISION float scanline_weight;\n#endif\n\nfloat intersect(vec2 xy)\n{\nfloat A = dot(xy,xy)+d*d;\nfloat B = 2.0*(R*(dot(xy,sinangle)-d*cosangle.x*cosangle.y)-d*d);\nfloat C = d*d + 2.0*R*d*cosangle.x*cosangle.y;\nreturn (-B-sqrt(B*B-4.0*A*C))/(2.0*A);\n}\n\nvec2 bkwtrans(vec2 xy)\n{\nfloat c = intersect(xy);\nvec2 point = vec2(c)*xy;\npoint -= vec2(-R)*sinangle;\npoint /= vec2(R);\nvec2 tang = sinangle/cosangle;\nvec2 poc = point/cosangle;\nfloat A = dot(tang,tang)+1.0;\nfloat B = -2.0*dot(poc,tang);\nfloat C = dot(poc,poc)-1.0;\nfloat a = (-B+sqrt(B*B-4.0*A*C))/(2.0*A);\nvec2 uv = (point-a*sinangle)/cosangle;\nfloat r = FIX(R*acos(a));\nreturn uv*r/sin(r/R);\n}\n\nvec2 transform(vec2 coord)\n{\ncoord *= TextureSize / InputSize;\ncoord = (coord-vec2(0.5))*aspect*stretch.z+stretch.xy;\nreturn (bkwtrans(coord)/vec2(overscan_x / 100.0, overscan_y / 100.0)/aspect+vec2(0.5)) * InputSize / TextureSize;\n}\n\nfloat corner(vec2 coord)\n{\ncoord *= TextureSize / InputSize;\ncoord = (coord - vec2(0.5)) * vec2(overscan_x / 100.0, overscan_y / 100.0) + vec2(0.5);\ncoord = min(coord, vec2(1.0)-coord) * aspect;\nvec2 cdist = vec2(cornersize);\ncoord = (cdist - min(coord,cdist));\nfloat dist = sqrt(dot(coord,coord));\nreturn clamp((cdist.x-dist)*cornersmooth,0.0, 1.0);\n}\n\n// Calculate the influence of a scanline on the current pixel.\n//\n// \'distance\' is the distance in texture coordinates from the current\n// pixel to the scanline in question.\n// \'color\' is the colour of the scanline at the horizontal location of\n// the current pixel.\nvec4 scanlineWeights(float distance, vec4 color)\n{\n// "wid" controls the width of the scanline beam, for each RGB\n// channel The "weights" lines basically specify the formula\n// that gives you the profile of the beam, i.e. the intensity as\n// a function of distance from the vertical center of the\n// scanline. In this case, it is gaussian if width=2, and\n// becomes nongaussian for larger widths. Ideally this should\n// be normalized so that the integral across the beam is\n// independent of its width. That is, for a narrower beam\n// "weights" should have a higher peak at the center of the\n// scanline than for a wider beam.\n#ifdef USEGAUSSIAN\nvec4 wid = 0.3 + 0.1 * pow(color, vec4(3.0));\nvec4 weights = vec4(distance / wid);\nreturn 0.4 * exp(-weights * weights) / wid;\n#else\nvec4 wid = 2.0 + 2.0 * pow(color, vec4(4.0));\nvec4 weights = vec4(distance / scanline_weight);\nreturn 1.4 * exp(-pow(weights * inversesqrt(0.5 * wid), wid)) / (0.6 + 0.2 * wid);\n#endif\n}\n\nvoid main()\n{\n// Here\'s a helpful diagram to keep in mind while trying to\n// understand the code:\n//\n// | | | | |\n// -------------------------------\n// | | | | |\n// | 01 | 11 | 21 | 31 | <-- current scanline\n// | | @ | | |\n// -------------------------------\n// | | | | |\n// | 02 | 12 | 22 | 32 | <-- next scanline\n// | | | | |\n// -------------------------------\n// | | | | |\n//\n// Each character-cell represents a pixel on the output\n// surface, "@" represents the current pixel (always somewhere\n// in the bottom half of the current scan-line, or the top-half\n// of the next scanline). The grid of lines represents the\n// edges of the texels of the underlying texture.\n\n// Texture coordinates of the texel containing the active pixel.\nvec2 xy = (CURVATURE > 0.5) ? transform(TEX0.xy) : TEX0.xy;\n\nfloat cval = corner(xy);\n\n// Of all the pixels that are mapped onto the texel we are\n// currently rendering, which pixel are we currently rendering?\nvec2 ilvec = vec2(0.0,ilfac.y > 1.5 ? mod(float(FrameCount),2.0) : 0.0);\nvec2 ratio_scale = (xy * TextureSize - vec2(0.5) + ilvec)/ilfac;\n#ifdef OVERSAMPLE\nfloat filter_ = InputSize.y/OutputSize.y;//fwidth(ratio_scale.y);\n#endif\nvec2 uv_ratio = fract(ratio_scale);\n\n// Snap to the center of the underlying texel.\nxy = (floor(ratio_scale)*ilfac + vec2(0.5) - ilvec) / TextureSize;\n\n// Calculate Lanczos scaling coefficients describing the effect\n// of various neighbour texels in a scanline on the current\n// pixel.\nvec4 coeffs = PI * vec4(1.0 + uv_ratio.x, uv_ratio.x, 1.0 - uv_ratio.x, 2.0 - uv_ratio.x);\n\n// Prevent division by zero.\ncoeffs = FIX(coeffs);\n\n// Lanczos2 kernel.\ncoeffs = 2.0 * sin(coeffs) * sin(coeffs / 2.0) / (coeffs * coeffs);\n\n// Normalize.\ncoeffs /= dot(coeffs, vec4(1.0));\n\n// Calculate the effective colour of the current and next\n// scanlines at the horizontal location of the current pixel,\n// using the Lanczos coefficients above.\nvec4 col = clamp(mat4(\n TEX2D(xy + vec2(-one.x, 0.0)),\n TEX2D(xy),\n TEX2D(xy + vec2(one.x, 0.0)),\n TEX2D(xy + vec2(2.0 * one.x, 0.0))) * coeffs,\n 0.0, 1.0);\nvec4 col2 = clamp(mat4(\n TEX2D(xy + vec2(-one.x, one.y)),\n TEX2D(xy + vec2(0.0, one.y)),\n TEX2D(xy + one),\n TEX2D(xy + vec2(2.0 * one.x, one.y))) * coeffs,\n 0.0, 1.0);\n\n#ifndef LINEAR_PROCESSING\ncol = pow(col , vec4(CRTgamma));\ncol2 = pow(col2, vec4(CRTgamma));\n#endif\n\n// Calculate the influence of the current and next scanlines on\n// the current pixel.\nvec4 weights = scanlineWeights(uv_ratio.y, col);\nvec4 weights2 = scanlineWeights(1.0 - uv_ratio.y, col2);\n#ifdef OVERSAMPLE\nuv_ratio.y =uv_ratio.y+1.0/3.0*filter_;\nweights = (weights+scanlineWeights(uv_ratio.y, col))/3.0;\nweights2=(weights2+scanlineWeights(abs(1.0-uv_ratio.y), col2))/3.0;\nuv_ratio.y =uv_ratio.y-2.0/3.0*filter_;\nweights=weights+scanlineWeights(abs(uv_ratio.y), col)/3.0;\nweights2=weights2+scanlineWeights(abs(1.0-uv_ratio.y), col2)/3.0;\n#endif\n\nvec3 mul_res = (col * weights + col2 * weights2).rgb * vec3(cval);\n\n// dot-mask emulation:\n// Output pixels are alternately tinted green and magenta.\nvec3 dotMaskWeights = mix(\nvec3(1.0, 1.0 - DOTMASK, 1.0),\nvec3(1.0 - DOTMASK, 1.0, 1.0 - DOTMASK),\nfloor(mod(mod_factor, 2.0))\n);\n\nmul_res *= dotMaskWeights;\n\n// Convert the image gamma for display on our output device.\nmul_res = pow(mul_res, vec3(1.0 / monitorgamma));\n\n// Color the texel.\noutput_dummy _OUT;\n_OUT._color = vec4(mul_res, 1.0);\nFragColor = _OUT._color;\nreturn;\n} \n#endif\n\n' }, - _0x5bb4c9 = _0x2c1832(0x39), - _0x50f370 = _0x2c1832.n(_0x5bb4c9), + IDBStore = _0x2c1832(0x39), _0x550f17 = _0x2c1832(0xb), _0x5ab74d = { 'addStyleHook': function() { @@ -1155,83 +1152,90 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) { } } var _0x18a437 = window.URL || window.webkitURL; - var _0x394c59 = function(_0x571737) { - var _0x17edbf; - return 0x50 === _0x571737[0x0] && 0x4b === _0x571737[0x1] && 0x3 === _0x571737[0x2] && 0x4 === _0x571737[0x3] ? _0x17edbf = 'zip' : 0x50 === _0x571737[0x0] && 0x4b === _0x571737[0x1] && 0x5 === _0x571737[0x2] && 0x6 === _0x571737[0x3] ? _0x17edbf = 'zip' : 0x50 === _0x571737[0x0] && 0x4b === _0x571737[0x1] && 0x7 === _0x571737[0x2] && 0x8 === _0x571737[0x3] ? _0x17edbf = 'zip' : 0x37 === _0x571737[0x0] && 0x7a === _0x571737[0x1] && 0xbc === _0x571737[0x2] && 0xaf === _0x571737[0x3] && 0x27 === _0x571737[0x4] && 0x1c === _0x571737[0x5] ? _0x17edbf = '7z' : 0x52 === _0x571737[0x0] && 0x61 === _0x571737[0x1] && 0x72 === _0x571737[0x2] && 0x21 === _0x571737[0x3] && 0x1a === _0x571737[0x4] && 0x7 === _0x571737[0x5] && 0x0 == _0x571737[0x6] && (_0x17edbf = 'rar'), _0x17edbf; + var isCompressed = function(data) { //https://www.garykessler.net/library/file_sigs.html + if ((data[0] === 80 && data[1] === 75) && ((data[2] === 3 && data[3] === 4) || (data[2] === 5 && data[3] === 6) || (data[2] === 7 && data[3] === 8))) { + return 'zip'; + } else if (data[0] === 55 && data[1] === 122 && data[2] === 188 && data[3] === 175 && data[4] === 39 && data[5] === 28) { + return '7z'; + } else if ((data[0] === 82 && data[1] === 97 && data[2] === 114 && data[3] === 33 && data[4] === 26 && data[5] === 7) && ((data[6] === 0) || (data[6] === 1 && data[7] == 0))) { + return 'rar'; + } }, - _0xa24f60 = function(_0xbf2b8b) { - var _0x17edbf = 'importScripts("'+_0xbf2b8b+'");', - _0x2c1832 = new Blob([_0x17edbf], { + extractFile = async function(url) { + var fileData = await (await fetch(url)).text(), + _0x2c1832 = new Blob([fileData], { 'type': 'application/javascript' }), _0x501a8e = window.URL.createObjectURL(_0x2c1832); - return new Promise(function(_0x2d8147, _0x1b03b2) { - _0x2d8147(new Worker(_0x501a8e)); - }); + return new Worker(_0x501a8e); }, - _0x41d0bd = function(_0x3a41ff, _0x2b541e) { - var _0x2c1832 = ''; - if ('rar' == _0x2b541e) _0x2c1832 = '\nvar dataToPass = [];\nModule = {\n monitorRunDependencies: function(left) {\n if (left == 0) {\n setTimeout(function() {\n unrar(dataToPass, null);\n }, 100);\n }\n },\n onRuntimeInitialized: function() {\n },\n locateFile: function(file) {\n return \'' .concat(_0x3a41ff+'.mem', '\';\n }\n};\nimportScripts("').concat(_0x3a41ff, '");\nvar unrar = function(data, password) {\n var cb = function(fileName, fileSize, progress) {\n postMessage({"t":4,"current":progress,"total":fileSize, "name": fileName});\n };\n\n var rarContent = readRARContent(data.map(function(d) {\n return {\n name: d.name,\n content: new Uint8Array(d.content)\n }\n }), password, cb)\n var rec = function(entry) {\n if (entry.type === \'file\') {\n postMessage({"t":2,"file":entry.fullFileName,"size":entry.fileSize,"data":entry.fileContent});\n } else if (entry.type === \'dir\') {\n Object.keys(entry.ls).forEach(function(k) {\n rec(entry.ls[k]);\n })\n } else {\n throw "Unknown type";\n }\n }\n rec(rarContent);\n postMessage({"t":1});\n return rarContent;\n};\nonmessage = function(data) {\n dataToPass.push({name: \'test.rar\', content: data.data});\n};\n '); - var _0x22326b = new Blob([_0x2c1832], { - 'type': 'application/javascript' - }), - _0x3635b1 = window.URL.createObjectURL(_0x22326b); - return new Promise(function(_0x2d169f, _0x341b0d) { - _0x2d169f(new Worker(_0x3635b1)); - }); + extractRar = async function(url) { + var fileData = await (await fetch(url)).text(); + var _0x2c1832 = '\nvar dataToPass = [];\nModule = {\n monitorRunDependencies: function(left) {\n if (left == 0) {\n setTimeout(function() {\n unrar(dataToPass, null);\n }, 100);\n }\n },\n onRuntimeInitialized: function() {\n },\n locateFile: function(file) {\n return \''+url+'.mem\';\n }\n};\n'+fileData+'\nvar unrar = function(data, password) {\n var cb = function(fileName, fileSize, progress) {\n postMessage({"t":4,"current":progress,"total":fileSize, "name": fileName});\n };\n\n var rarContent = readRARContent(data.map(function(d) {\n return {\n name: d.name,\n content: new Uint8Array(d.content)\n }\n }), password, cb)\n var rec = function(entry) {\n if (entry.type === \'file\') {\n postMessage({"t":2,"file":entry.fullFileName,"size":entry.fileSize,"data":entry.fileContent});\n } else if (entry.type === \'dir\') {\n Object.keys(entry.ls).forEach(function(k) {\n rec(entry.ls[k]);\n })\n } else {\n throw "Unknown type";\n }\n }\n rec(rarContent);\n postMessage({"t":1});\n return rarContent;\n};\nonmessage = function(data) {\n dataToPass.push({name: \'test.rar\', content: data.data});\n};\n '; + var _0x22326b = new Blob([_0x2c1832], { + 'type': 'application/javascript' + }), + _0x3635b1 = window.URL.createObjectURL(_0x22326b); + return new Worker(_0x3635b1); }, _0x24de8d = null, _0x4e171c = null, _0xa884ea = null, _0x1ffb98 = null; try { - _0x24de8d = new _0x50f370.a({ - 'dbVersion': 0x1, + _0x24de8d = new IDBStore({ + 'dbVersion': 1, 'storePrefix': 'ejs-', 'storeName': 'system', 'keyPath': null, - 'autoIncrement': !0x1, + 'autoIncrement': false, 'onStoreReady': function() { _0x528f2b = true; }, 'onError': function() { _0x528f2b = true; } - }), _0x4e171c = new _0x50f370.a({ - 'dbVersion': 0x1, + }); + _0x4e171c = new IDBStore({ + 'dbVersion': 1, 'storePrefix': 'ejs-', 'storeName': 'roms', 'keyPath': null, - 'autoIncrement': !0x1, + 'autoIncrement': false, 'onStoreReady': function() { _0x547484 = true; }, 'onError': function() { _0x547484 = true; } - }), _0xa884ea = new _0x50f370.a({ - 'dbVersion': 0x1, + }); + _0xa884ea = new IDBStore({ + 'dbVersion': 1, 'storePrefix': 'ejs-', 'storeName': 'bios', 'keyPath': null, - 'autoIncrement': !0x1, + 'autoIncrement': false, 'onStoreReady': function() { _0x5e24fa = true; }, 'onError': function() { _0x5e24fa = true; } - }), _0x1ffb98 = new _0x50f370.a({ - 'dbVersion': 0x1, + }); + _0x1ffb98 = new IDBStore({ + 'dbVersion': 1, 'storePrefix': 'ejs-', 'storeName': 'romsdata', 'keyPath': null, - 'autoIncrement': !0x1, + 'autoIncrement': false, 'onStoreReady': function() {}, 'onError': function() {} }); } catch (_0x4fc9b6) { - _0x528f2b = true, _0x547484 = true, _0x5e24fa = true, console.log(_0x4fc9b6); + _0x528f2b = true; + _0x547484 = true; + _0x5e24fa = true; + console.log(_0x4fc9b6); } _0x1093f4.call(_0xc6823, _0xc6823.elements.container, 'start-game', function(_0x3d9f57) { _0xc6823.started = true, _0xc6823.playing = true, _0x132da7(_0x4d7024.loading.querySelector('.' .concat(_0x4fce24['loading-info'])), true); @@ -1438,7 +1442,6 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) { var _0x55627a = _0xa88a13, _0x1cfda7 = _0x4d7024.loading.querySelector('.' .concat(_0x4fce24.p3)), _0x429d6b = (_0x1bc287.split('.').pop(), _0x29078e[_0x1143c5]), - _0xb0c5d8 = -0x1, _0x567713 = '', _0x567717 = function() { if (_0x55627a.coreVer === 2) { @@ -1456,8 +1459,8 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) { if (typeof _0x55627a.loadStateOnStart == 'string') { fetch(_0x55627a.loadStateOnStart).then(function(response) { response.arrayBuffer().then(function(ab) { - var a = new Uint8Array(ab) - EJS_loadState(a) + var a = new Uint8Array(ab); + EJS_loadState(a); }) }) } @@ -1490,78 +1493,94 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) { } } } - var _0x99321 = function(_0x52e6f3) { - if (_0x52e6f3.data) { - if (0x1 === _0x52e6f3.data.t) { - _0x1cfda7.innerHTML = 'Game Data ready', _0x52e6f3.target.terminate(); - try { - _0x4bd781(), _0x5f3757(_0x55627a), _0x16cf3e(); - !_0x55627a.startName && _0x567713 && (_0x55627a.startName = _0x567713); - var _0x2c1832 = [_0x55627a.startName, - [_0x4d7024.hash, _0x4d7024.hash2, _0x4d7024.hash3].join('') - ]; - 'undefined' != typeof EJS_DEBUG_XX && true === EJS_DEBUG_XX && _0x2c1832.unshift('-v'); - _0x4d7024.Module.callMain(_0x2c1832); - if (_0xc6823.coreVer === 2) { - _0x4d7024.Module.resumeMainLoop(); - _0x4d7024.Module.setCanvasSize(800, 600); - } - _0xbae705.call(_0x55627a, _0x55627a.elements.container, 'start-game'); - } catch (_0x4a1471) { - console.log(_0x4a1471), _0x1cfda7.innerHTML = 'Doesn\'t look like your browser is supported'; - } - try{_0x567717();}catch(e){} - } - if (0x2 === _0x52e6f3.data.t) { - var _0x25aae3 = _0x52e6f3.data.file.split('/'), - _0x1bc287 = _0x25aae3.pop(), - _0x1844e3 = _0x1bc287.split('.').pop(); - _0x1bc287 = _0x1bc287.replace(/\#/g, ''), _0x4d7024._FS.createPath('/', _0x25aae3.join('/'), true, true); - for (var _0x36bace = _0x1e0766[_0x429d6b].length - 0x1; _0x36bace >= 0x0; _0x36bace -= 0x1) _0x1e0766[_0x429d6b][_0x36bace] === _0x1844e3.toLowerCase() && _0x36bace > _0xb0c5d8 && (_0xb0c5d8 = _0x36bace, _0x55627a.startName = ['', _0x25aae3.join('/'), _0x1bc287].join('/'), _0x55627a.startName = _0x55627a.startName.replace(/\/+/, '/')); - _0x1bc287 && (_0x4d7024._FS.createDataFile('/' .concat(_0x25aae3.join('/')), _0x1bc287, _0x52e6f3.data.data, true, !0x1), _0x468801 += _0x52e6f3.data.data.length), _0x567713 = '/' .concat(_0x25aae3.join('/'), '/').concat(_0x1bc287); - } - if (0x4 === _0x52e6f3.data.t && _0x52e6f3.data.total > 0x0) { - var _0x163fc4 = Math.floor(_0x52e6f3.data.current / _0x52e6f3.data.total * 0x64), - _0x5448a3 = _0x52e6f3.data.name || ''; - _0x163fc4 <= 0x64 && _0x163fc4 > 0x0 && (_0x1cfda7.innerHTML = _0xa88a13.localization('Decompress Game Data')+' ' .concat(_0x5448a3, ' ').concat(_0x163fc4, '%')); - } - } - }, - _0x1e67c4 = !0x1; - if (!['arcade', 'mame', 'mame2003', 'fba0.2.97.29'].includes(_0x55627a.system)) { - var _0x20a78c = _0x1844e3.slice ? _0x1844e3.slice(0x0, 0xa) : _0x1844e3.subarray(0x0, 0xa), - _0x1761cf = _0x394c59(_0x20a78c); - '7z' === _0x1761cf ? (_0xa24f60(_0x17edbf).then(function(_0xea623e) { - _0xea623e.onmessage = _0x99321, _0xea623e.postMessage(_0x1844e3); - }), _0x1e67c4 = true) : 'zip' === _0x1761cf ? (_0xa24f60(_0x2c1832).then(function(_0x5a81e4) { - _0x5a81e4.onmessage = _0x99321, _0x5a81e4.postMessage(_0x1844e3); - }), _0x1e67c4 = true) : 'rar' == _0x1761cf && (_0x41d0bd(_0x4ce206, 'rar').then(function(_0x5f204f) { - _0x5f204f.onmessage = _0x99321, _0x5f204f.postMessage(_0x1844e3); - }), _0x1e67c4 = true); - } - if (!_0x1e67c4) { - var _0x1c661d = _0x1bc287.replace(/\#/g, ''); - try { - _0x468801 += _0x1844e3.length, _0x4d7024._FS.createDataFile('/', _0x1c661d, _0x1844e3, true, !0x1); - } catch (_0x210043) { - console.log(_0x210043); + var start = function(startName) { + _0x1cfda7.innerHTML = 'Game Data ready'; + if (!startName) { + _0x1cfda7.innerHTML = 'Invalid Rom'; + return; } - _0x4bd781(), _0x55627a.startName = _0x1c661d, _0x5f3757(_0x55627a), _0x16cf3e(); try { - var _0x4dd87f = [_0x55627a.startName, - [_0x4d7024.hash, _0x4d7024.hash2, _0x4d7024.hash3].join('') - ]; - 'undefined' != typeof EJS_DEBUG_XX && true === EJS_DEBUG_XX && _0x4dd87f.unshift('-v'); - _0x4d7024.Module.callMain(_0x4dd87f); + _0x4bd781(); + _0x5f3757(_0x55627a); + _0x16cf3e(); + var _0x2c1832 = [startName, + [_0x4d7024.hash, _0x4d7024.hash2, _0x4d7024.hash3].join('') + ]; + 'undefined' != typeof EJS_DEBUG_XX && true === EJS_DEBUG_XX && _0x2c1832.unshift('-v'); + _0x4d7024.Module.callMain(_0x2c1832); if (_0xc6823.coreVer === 2) { _0x4d7024.Module.resumeMainLoop(); _0x4d7024.Module.setCanvasSize(800, 600); } _0xbae705.call(_0x55627a, _0x55627a.elements.container, 'start-game'); - } catch (_0x42970c) { - console.log(_0x42970c), _0x1cfda7.innerHTML = 'Doesn\'t look like your browser is supported'; + try{_0x567717();}catch(e){} + } catch (_0x4a1471) { + console.log(_0x4a1471); + _0x1cfda7.innerHTML = 'Doesn\'t look like your browser is supported'; } - try{_0x567717();}catch(e){} + } + var _0x99321 = function(_0x52e6f3) { + if (_0x52e6f3.data) { + if (1 === _0x52e6f3.data.t) { + !_0x55627a.startName && _0x567713 && (_0x55627a.startName = _0x567713); + _0x52e6f3.target.terminate(); + start(_0x55627a.startName); + } + if (2 === _0x52e6f3.data.t) { + var _0x1c661d = _0x52e6f3.data.file.replace(/\#/g, ''); + try { + _0x468801 += _0x52e6f3.data.data.length; + _0x4d7024._FS.createDataFile('/', _0x1c661d, _0x52e6f3.data.data, true, false); + if (_0x1e0766[_0x429d6b].includes(_0x52e6f3.data.file.split('.').pop())) { + _0x55627a.startName = _0x52e6f3.data.file; + } + } catch (_0x210043) { + console.log(_0x210043); + } + } + if (4 === _0x52e6f3.data.t && _0x52e6f3.data.total > 0) { + var _0x163fc4 = Math.floor(_0x52e6f3.data.current / _0x52e6f3.data.total * 100), + _0x5448a3 = _0x52e6f3.data.name || ''; + if (_0x163fc4 <= 100 && _0x163fc4 > 0) { + _0x1cfda7.innerHTML = _0xa88a13.localization('Decompress Game Data')+_0x5448a3+' '+_0x163fc4+'%'; + } + } + } + }, + _0x1e67c4 = false; + if (!['arcade', 'mame', 'mame2003', 'fba0.2.97.29'].includes(_0x55627a.system)) { + var _0x20a78c = _0x1844e3.slice ? _0x1844e3.slice(0, 10) : _0x1844e3.subarray(0, 10), + _0x1761cf = isCompressed(_0x20a78c); + if (_0x1761cf === "7z") { + extractFile(_0x17edbf).then(function(_0xea623e) { + _0xea623e.onmessage = _0x99321; + _0xea623e.postMessage(_0x1844e3); + }) + _0x1e67c4 = true; + } else if (_0x1761cf === 'zip') { + extractFile(_0x2c1832).then(function(_0x5a81e4) { + _0x5a81e4.onmessage = _0x99321; + _0x5a81e4.postMessage(_0x1844e3); + }) + _0x1e67c4 = true; + } else if (_0x1761cf === 'rar') { + extractRar(_0x4ce206).then(function(_0x5f204f) { + _0x5f204f.onmessage = _0x99321; + _0x5f204f.postMessage(_0x1844e3); + }) + _0x1e67c4 = true; + } + } + if (!_0x1e67c4) { + var _0x1c661d = _0x1bc287.replace(/\#/g, ''); + try { + _0x468801 += _0x1844e3.length; + _0x4d7024._FS.createDataFile('/', _0x1c661d, _0x1844e3, true, false); + } catch (_0x210043) { + console.log(_0x210043); + } + _0x55627a.startName = _0x1c661d; + start(_0x55627a.startName); } }, _0x5048db = function() { @@ -1674,35 +1693,47 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) { }, 'responseType': 'arraybuffer' }).then(function(_0x159ae9) { - var _0x39a81f = new Uint8Array(_0x159ae9.data); - ! function(_0xe531f0, _0x1097ca) { - var _0xf6806b = _0x4d7024.loading.querySelector('.' .concat(_0x4fce24.p3)), - _0x59c7c1 = (_0xe531f0.split('.').pop(), function(_0x36004e) { - if (_0x36004e.data) { - if (0x1 === _0x36004e.data.t && (_0x36004e.target.terminate(), _0x5048db()), 0x2 === _0x36004e.data.t) { - var _0x17edbf = _0x36004e.data.file.split('/'), - _0x2c1832 = _0x17edbf.pop(), - _0x2b320e = _0x2c1832.split('.').pop(); - _0x4d7024._FS.createPath('/', _0x17edbf.join('/'), true, true), _0x4d7024._FS.createDataFile('/' + _0x17edbf.join('/'), _0x2c1832, _0x36004e.data.data, true, !0x1), _0x468801 += _0x36004e.data.data.length, ['ips', 'bps', 'ups'].includes(_0x2b320e) && !_0x4d7024.gamePatch && (_0x4d7024.gamePatch = '/' + _0x17edbf.join('/') + '/' + _0x2c1832); - } - if (0x4 === _0x36004e.data.t && _0x36004e.data.total > 0x0) { - var _0x1097ca = Math.floor(_0x36004e.data.current / _0x36004e.data.total * 0x64), - _0x95ac83 = _0x36004e.data.name || ''; - _0x1097ca <= 0x64 && _0x1097ca > 0x0 && (_0xf6806b.innerHTML = _0xa88a13.localization('Decompress Game Patch')+' ' .concat(_0x95ac83, ' ').concat(_0x1097ca, '%')); - } + var _0x1097ca = new Uint8Array(_0x159ae9.data), + _0xe531f0 = _0x179b43.split('.').pop(), + _0xf6806b = _0x4d7024.loading.querySelector('.' .concat(_0x4fce24.p3)), + _0x59c7c1 = function(_0x36004e) { + if (_0x36004e.data) { + if (0x1 === _0x36004e.data.t && (_0x36004e.target.terminate(), _0x5048db()), 0x2 === _0x36004e.data.t) { + var _0x17edbf = _0x36004e.data.file.split('/'), + _0x2c1832 = _0x17edbf.pop(), + _0x2b320e = _0x2c1832.split('.').pop(); + _0x4d7024._FS.createPath('/', _0x17edbf.join('/'), true, true), _0x4d7024._FS.createDataFile('/' + _0x17edbf.join('/'), _0x2c1832, _0x36004e.data.data, true, !0x1), _0x468801 += _0x36004e.data.data.length, ['ips', 'bps', 'ups'].includes(_0x2b320e) && !_0x4d7024.gamePatch && (_0x4d7024.gamePatch = '/' + _0x17edbf.join('/') + '/' + _0x2c1832); } - }), - _0x4c332a = !0x1, - _0x3de3e4 = _0x1097ca.slice ? _0x1097ca.slice(0x0, 0xa) : _0x1097ca.subarray(0x0, 0xa), - _0x17f736 = _0x394c59(_0x3de3e4); - '7z' === _0x17f736 ? (_0xa24f60(_0x17edbf).then(function(_0x20601d) { - _0x20601d.onmessage = _0x59c7c1, _0x20601d.postMessage(_0x1097ca); - }), _0x4c332a = true) : 'zip' === _0x17f736 ? (_0xa24f60(_0x2c1832).then(function(_0x46622d) { - _0x46622d.onmessage = _0x59c7c1, _0x46622d.postMessage(_0x1097ca); - }), _0x4c332a = true) : 'rar' == _0x17f736 && (_0x41d0bd(_0x4ce206, 'rar').then(function(_0x2ecd24) { - _0x2ecd24.onmessage = messageCallBack, _0x2ecd24.postMessage(_0x1097ca); - }), _0x4c332a = true), _0x4c332a || (_0x468801 += _0x1097ca.length, _0x4d7024.gamePatch = '/' .concat(_0xe531f0), _0x4d7024._FS.createDataFile('/', _0xe531f0, _0x1097ca, true, !0x1), _0x5048db()); - }(_0x179b43, _0x39a81f); + if (0x4 === _0x36004e.data.t && _0x36004e.data.total > 0x0) { + var _0x1097ca = Math.floor(_0x36004e.data.current / _0x36004e.data.total * 0x64), + _0x95ac83 = _0x36004e.data.name || ''; + _0x1097ca <= 0x64 && _0x1097ca > 0x0 && (_0xf6806b.innerHTML = _0xa88a13.localization('Decompress Game Patch')+' ' .concat(_0x95ac83, ' ').concat(_0x1097ca, '%')); + } + } + }, + _0x3de3e4 = _0x1097ca.slice ? _0x1097ca.slice(0, 10) : _0x1097ca.subarray(0, 10), + _0x17f736 = isCompressed(_0x3de3e4); + if (_0x17f736 === '7z') { + extractFile(_0x17edbf).then(function(_0x20601d) { + _0x20601d.onmessage = _0x59c7c1; + _0x20601d.postMessage(_0x1097ca); + }) + } else if (_0x17f736 === 'zip') { + extractFile(_0x2c1832).then(function(_0x46622d) { + _0x46622d.onmessage = _0x59c7c1; + _0x46622d.postMessage(_0x1097ca); + }) + } else if (_0x17f736 === 'rar') { + extractRar(_0x4ce206).then(function(_0x2ecd24) { + _0x2ecd24.onmessage = _0x59c7c1; + _0x2ecd24.postMessage(_0x1097ca); + }) + } else { + _0x468801 += _0x1097ca.length; + _0x4d7024.gamePatch = '/'+_0xe531f0; + _0x4d7024._FS.createDataFile('/', _0xe531f0, _0x1097ca, true, false); + _0x5048db(); + } }).catch(function(_0x314293) { renderErrorPage(_0x314293, _0x2c1832, _0xa88a13); }); @@ -1798,29 +1829,48 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) { _0x50119 = _0x4d7024.loading.querySelector('.' .concat(_0x4fce24.p2)), _0x19a43e = (_0x5e7c8b.split('.').pop(), function(_0x1e8643) { if (_0x1e8643.data) { - if (0x1 === _0x1e8643.data.t && (_0x50119.innerHTML = 'BIOS ready', _0x1e8643.target.terminate(), _0x452592()), 0x2 === _0x1e8643.data.t) { + if (1 === _0x1e8643.data.t) { + _0x50119.innerHTML = 'BIOS ready'; + _0x1e8643.target.terminate(); + _0x452592(); + } + if (2 === _0x1e8643.data.t) { var _0x17edbf = _0x1e8643.data.file.split('/'), _0x2c1832 = _0x17edbf.pop(); _0x2c1832.split('.').pop(); - _0x4d7024._FS.createPath('/', _0x17edbf.join('/'), true, true), _0x4d7024._FS.createDataFile('/' + _0x17edbf.join('/'), _0x2c1832, _0x1e8643.data.data, true, !0x1), _0x468801 += _0x1e8643.data.data.length; + _0x4d7024._FS.createPath('/', _0x17edbf.join('/'), true, true); + _0x4d7024._FS.createDataFile('/' + _0x17edbf.join('/'), _0x2c1832, _0x1e8643.data.data, true, false); + _0x468801 += _0x1e8643.data.data.length; } - if (0x4 === _0x1e8643.data.t && _0x1e8643.data.total > 0x0) { + if (4 === _0x1e8643.data.t && _0x1e8643.data.total > 0) { var _0x149f09 = Math.floor(_0x1e8643.data.current / _0x1e8643.data.total * 0x64), _0x5e7c8b = _0x1e8643.data.name || ''; _0x149f09 <= 0x64 && _0x149f09 > 0x0 && (_0x50119.innerHTML = 'Decompress BIOS ' .concat(_0x5e7c8b, ' ').concat(_0x149f09, '%')); } } }), - _0x3a6560 = !0x1, _0x12e229 = _0x3cff36.slice ? _0x3cff36.slice(0x0, 0xa) : _0x3cff36.subarray(0x0, 0xa), - _0x80852b = _0x394c59(_0x12e229); - '7z' === _0x80852b ? (_0xa24f60(_0x17edbf).then(function(_0x1b6a80) { - _0x1b6a80.onmessage = _0x19a43e, _0x1b6a80.postMessage(_0x3cff36); - }), _0x3a6560 = true) : 'zip' !== _0x80852b || ['arcade', 'mame', 'mame2003', 'fba0.2.97.29'].includes(_0x3ea97.system) ? 'rar' === _0x80852b && (_0x41d0bd(_0x4ce206, 'rar').then(function(_0x259be0) { - _0x259be0.onmessage = messageCallBack, _0x259be0.postMessage(_0x3cff36); - }), _0x3a6560 = true) : (_0xa24f60(_0x2c1832).then(function(_0x31c70d) { - _0x31c70d.onmessage = _0x19a43e, _0x31c70d.postMessage(_0x3cff36); - }), _0x3a6560 = true), _0x3a6560 || (_0x468801 += _0x3cff36.length, _0x50119.innerHTML = 'BIOS ready', _0x4d7024._FS.createDataFile('/', _0x5e7c8b, _0x3cff36, true, !0x1), _0x452592()); + _0x80852b = isCompressed(_0x12e229); + if (_0x80852b === '7z') { + extractFile(_0x17edbf).then(function(_0x1b6a80) { + _0x1b6a80.onmessage = _0x19a43e; + _0x1b6a80.postMessage(_0x3cff36); + }); + } else if (_0x80852b === 'rar') { + extractRar(_0x4ce206).then(function(_0x259be0) { + _0x259be0.onmessage = _0x19a43e, _0x259be0.postMessage(_0x3cff36); + }); + } else if (_0x80852b === 'zip' && !['arcade', 'mame', 'mame2003', 'fba0.2.97.29'].includes(_0x3ea97.system)) { + extractFile(_0x2c1832).then(function(_0x31c70d) { + _0x31c70d.onmessage = _0x19a43e; + _0x31c70d.postMessage(_0x3cff36); + }); + } else { + _0x468801 += _0x3cff36.length; + _0x50119.innerHTML = 'BIOS ready'; + _0x4d7024._FS.createDataFile('/', _0x5e7c8b, _0x3cff36, true, false); + _0x452592(); + } }, _0x10b71a = function() { _0x4d7024.loading.querySelector('.' .concat(_0x4fce24.p1)).innerHTML = 'Game Core ready'; @@ -1830,7 +1880,7 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) { _0xdcec2a.setGamepadDialog.call(_0xa88a13); _0xdcec2a.setCacheDialog.call(_0xa88a13); _0xdcec2a.setLoadingDialog.call(_0xa88a13); - _0xdcec2a.setNetplayDialog.call(_0xa88a13); + //_0xdcec2a.setNetplayDialog.call(_0xa88a13); _0xdcec2a.setCheatDialog.call(_0xa88a13); _0xdcec2a.initGamepad.call(_0xa88a13); _0xdcec2a.initKeyboard.call(_0xa88a13); @@ -1975,8 +2025,9 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) { 0x4 === _0x3f49ec.data.t && _0x3f49ec.data.total > 0x0 && (_0x2c1832.innerHTML = _0xa88a13.localization('Decompress Game Core')+' ' .concat(Math.floor(_0x3f49ec.data.current / _0x3f49ec.data.total * 0x64), '%')); } }; - _0xa24f60(_0x17edbf).then(function(_0x48c633) { - _0x48c633.onmessage = _0x21d6a1, _0x48c633.postMessage(_0x18cb26); + extractFile(_0x17edbf).then(function(_0x48c633) { + _0x48c633.onmessage = _0x21d6a1; + _0x48c633.postMessage(_0x18cb26); }); }, _this = this, @@ -2079,7 +2130,7 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) { return; } var _0x124167 = _0x28ee7f.version ? _0x28ee7f.version : 1, - _0x254bc2 = Boolean(_0x28ee7f.netplay), + //_0x254bc2 = Boolean(_0x28ee7f.netplay), _0x5b1dcd = Boolean(_0x28ee7f.state), _0x9a1f1 = Boolean(_0x28ee7f.asmjs), _0x3e4345 = Boolean(_0x28ee7f.wasm); @@ -2177,7 +2228,7 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) { } else _0x3641d6(_0x2458d5, _0x124167); }) : _0x3641d6(_0x2458d5, _0x124167); } - _0x254bc2 || _0x1e2c68.element(_this.elements.buttons.netplay) && _0x132da7(_this.elements.buttons.netplay, true); + //_0x254bc2 || _0x1e2c68.element(_this.elements.buttons.netplay) && _0x132da7(_this.elements.buttons.netplay, true); _0x1e2c68.element(_this.elements.buttons.saveState) && _0x132da7(_this.elements.buttons.saveState, !_0x5b1dcd); _0x1e2c68.element(_this.elements.buttons.loadState) && _0x132da7(_this.elements.buttons.loadState, !_0x5b1dcd); _0x132da7(_0x2593da.contextMenu.querySelectorAll('ul li').item(2), !_0x5b1dcd); @@ -2197,8 +2248,7 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) { } } }, - _0x27f4c4 = _0x4d7024, - _0x4a2390 = _0x2c1832(0xa1); + _0x27f4c4 = _0x4d7024; function _0x3c0613(_0x3eef01) { return function(_0x3d9b1e) { @@ -2659,12 +2709,6 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) { _0x378b5c.disableInput = true; } else _0x378b5c.disableInput = !0x1; }, - 'loadRoomsListTimer': null, - 'loadRoomsList': function() {}, - 'stopLoadRooms': function() { - _0x378b5c.loadRoomsListTimer && clearTimeout(_0x378b5c.loadRoomsListTimer); - }, - 'openRoom': function() {}, 'isPaused': null, 'setVolume': null, 'setVariable': null, @@ -2743,6 +2787,7 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) { 'btn-create-room': _0x449eac({ 'btn-create-room': true }), + /* 'netplay-player-name': _0x449eac({ 'netplay-player-name': true }), @@ -2761,6 +2806,7 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) { 'netplay-room': _0x449eac({ 'netplay-room': true }), + */ 'modal': _0x449eac({ 'modal': true }), @@ -3118,348 +3164,18 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) { }), 'arcade' !== _0xa88a13.system && 'mame' !== _0xa88a13.system && 'mame2003' !== _0xa88a13.system && 'mame2010' !== _0xa88a13.system || (_0x1e2c68.element(_0xa88a13.elements.buttons.cheat) && _0x132da7(_0xa88a13.elements.buttons.cheat, true), _0x378b5c.allowCheat = !0x1), _0x378b5c.setCheat || (_0x132da7(_0xa88a13.elements.buttons.cheat, true), _0x378b5c.allowCheat = !0x1); } }, + /* 'setNetplayDialog': function() { var _0xa88a13 = this, _0x17edbf = this; if (_0x17edbf.elements.dialogs.netplay) { - _0x17edbf.elements.dialogs.netplay.innerHTML = '\n
\n
\n

'+_0x17edbf.localization('Netplay')+'

\n
\n
\n \n\n \n
\n
\n '+_0x17edbf.localization('Quit Room')+'\n '+_0x17edbf.localization('Create a Room')+'\n '+_0x17edbf.localization('Close')+'\n
\n
\n\n \n \n \n \n \n \n \n \n \n \n '), _0x1093f4.call(this, _0x17edbf.elements.dialogs.netplay.querySelector('.' .concat(_0x378b5c.classNames['btn-cancel'])), 'click', function(_0x3d4554) { - return _0x132da7(_0x17edbf.elements.dialogs.netplay, true), _0x378b5c.disableControl(!0x1), _0x378b5c.stopLoadRooms(), _0x3d4554.stopPropagation(), _0x17edbf.elements.container.focus(), !0x1; - }), window.setInterval(function() { - var _0xa88a13 = '', _0x17edbf.elements.widgets.netplay.innerHTML = _0xa88a13; - }, 0x1f4); - var _0x2c1832 = _0x17edbf.elements.dialogs.netplay.querySelector('#modal-9de6c4e9ce2b9361'), - _0x36bde0 = _0x17edbf.elements.dialogs.netplay.querySelector('#modal-85cd7a1c543a484a'), - _0x5289c1 = _0x17edbf.elements.dialogs.netplay.querySelector('#modal-7d8fd50ed642340b'), - _0x325651 = _0x17edbf.elements.dialogs.netplay.querySelector('#modal-5aa765d61d8327de'), - _0x3d0d28 = {}; - _0x378b5c.connection = new _0x4a2390.a(); - var _0x10d51e = _0xa88a13.socketUrl; - if (! _0x10d51e.endsWith('/')) { - _0x10d51e += '/'; - }; - _0x378b5c.connection.socketURL = '/', _0x378b5c.connection.socketURL = _0x10d51e, _0x378b5c.connection.socketMessageEvent = 'emulatorjs-message', _0x378b5c.connection.socketCustomEvent = 'emulatorjs-custom-message'; - var _0xda20e9 = _0x59aa33.info(); - _0x378b5c.connection.extra = { - 'name': _0x378b5c.playerName, - 'game_id': _0x17edbf.config.gameId, - 'browser_name': _0xda20e9.name, - 'room_name': ' ', - 'domain': document.domain - }, _0x378b5c.connection.socketMessageEvent = 'netplay', _0x378b5c.connection.enableFileSharing = true, _0x378b5c.connection.enableLogs = !0x1, _0x378b5c.connection.session = { - 'data': true - }, _0x378b5c.connection.sdpConstraints.mandatory = { - 'OfferToReceiveAudio': !0x1, - 'OfferToReceiveVideo': !0x1 - }, _0x378b5c.connection.onclose = function(_0x4fec07) {}, _0x378b5c.connection.iceServers = [{ - 'urls': 'turn:turn.emulatorjs.com:3478', - 'credential': 'dSnmrtehverella', - 'username': 'ejs' - }, { - 'urls': ['stun:stun.l.google.com:19302', 'stun:stun1.l.google.com:19302', 'stun:stun2.l.google.com:19302', 'stun:stun.l.google.com:19302?transport=udp'] - }], _0x378b5c.connection.maxParticipantsAllowed = 0x4, _0x378b5c.netPlayInitFrame = 0x0; - var _0x1eb137 = 0x0, - _0x52eb7d = !0x1; - Module.postMainLoop = function() { - var _0xa88a13; - if (_0x378b5c.currentFrame = parseInt(_0x378b5c.currentFrameNum(), 0xa), _0x378b5c.connected) - if (_0x1eb137 += 0x1, _0x378b5c.connection.isInitiator) _0x1eb137 >= 0x1 && function() { - for (var _0xa88a13 = [], _0x17edbf = _0x378b5c.currentFrame - 0x1; _0x17edbf < _0x378b5c.currentFrame; _0x17edbf += 0x1) _0x378b5c.inputsData[_0x17edbf] ? _0x378b5c.inputsData[_0x17edbf].forEach(function(_0x2a02da, _0x1b2066) { - _0xa88a13.push('' .concat(_0x2a02da.index, '|').concat(_0x2a02da.key, '|').concat(_0x2a02da.status, '|').concat(_0x2a02da.frame)); - }) : _0xa88a13.push('-1|||' .concat(_0x17edbf)); - _0x378b5c.connection.send(JSON.stringify({ - 'act': 'sync-control', - 'value': _0xa88a13 - })), _0x1eb137 = 0x0, _0x378b5c.currentFrame % 0x64 == 0x0 && Object.keys(_0x378b5c.inputsData).forEach(function(_0x3125e4, _0x31ea67) { - _0x3125e4 < _0x378b5c.currentFrame - 0x32 && (_0x378b5c.inputsData[_0x3125e4] = null, delete _0x378b5c.inputsData[_0x3125e4]); - }); - }(); - else { - if (_0x378b5c.coreOptionData[_0x378b5c.currentFrame]) { - var _0x2c1832 = _0x378b5c.coreOptionData[_0x378b5c.currentFrame].key, - _0x4fd0cc = _0x378b5c.coreOptionData[_0x378b5c.currentFrame].value; - _0x2593da.updateCoreOptions.call(_0x17edbf, _0x2c1832, _0x4fd0cc), delete _0x378b5c.coreOptionData[_0x378b5c.currentFrame]; - } - if (_0x378b5c.currentFrame <= 0x0 || _0x378b5c.inputsData[_0x378b5c.currentFrame]) _0x378b5c.wait = !0x1, _0x378b5c.systemPause(0x0), _0x27f4c4.Module.resumeMainLoop(), _0xa88a13 = _0x378b5c.inputsData[_0x378b5c.currentFrame], _0x378b5c.inputsData[_0x378b5c.currentFrame] = null, delete _0x378b5c.inputsData[_0x378b5c.currentFrame], _0xa88a13 || (_0xa88a13 = []), _0xa88a13.forEach(function(_0x4bb42f, _0x28928a) { - _0x4bb42f.index >= 0x0 && _0x378b5c.simulateInputFn(_0x4bb42f.index, _0x4bb42f.key, _0x4bb42f.status); - }); - else { - _0x378b5c.wait = true, _0x378b5c.systemPause(0x1), _0x27f4c4.Module.pauseMainLoop(); - var _0x3a10d1 = !0x1, - _0x42763c = Object.keys(_0x378b5c.inputsData); - 0x0 == _0x42763c.length && (_0x3a10d1 = true); - for (var _0x58af15 = 0x0; _0x58af15 < _0x42763c.length; _0x58af15 += 0x1) { - if (_0x42763c[_0x58af15] > _0x378b5c.currentFrame) { - console.log('lost', _0x378b5c.currentFrame), _0x3a10d1 = true; - break; - } - } - _0x3a10d1 ? _0x378b5c.wait || (!_0x52eb7d || _0x52eb7d < new Date().valueOf() - 0xbb8) && (_0x378b5c.inputsData = {}, _0x52eb7d = new Date().valueOf(), _0x378b5c.connection.send(JSON.stringify({ - 'act': 'sync-mem', - 'value': _0x378b5c.connection.userid - }), _0x378b5c.roomMaster)) : (_0x378b5c.wait = true, _0x378b5c.systemPause(0x1), _0x27f4c4.Module.pauseMainLoop()); - } - _0x378b5c.currentFrame % 0x64 == 0x0 && Object.keys(_0x378b5c.inputsData).forEach(function(_0x3aa393, _0x3a7829) { - _0x3aa393 < _0x378b5c.currentFrame - 0x32 && (_0x378b5c.inputsData[_0x3aa393] = null, delete _0x378b5c.inputsData[_0x3aa393]); - }); - } - }, _0x378b5c.connection.onopen = function(_0x4b10d6) { - _0x378b5c.connected = true, _0x378b5c.connection.isInitiator && (-0x1 === _0x378b5c.players.indexOf(_0x4b10d6.userid) && (_0x378b5c.players.filter(function(_0x3eafb3, _0xabd7b7) { - return null == _0x3eafb3; - }).length > 0x0 ? _0x378b5c.players.forEach(function(_0xbf0f19, _0xa9d540) { - null != _0xbf0f19 || _0x378b5c.players.includes(_0x4b10d6.userid) || (_0x378b5c.players[_0xa9d540] = _0x4b10d6.userid); - }) : _0x378b5c.players.push(_0x4b10d6.userid)), _0x378b5c.connection.send(JSON.stringify({ - 'act': 'get-players-result', - 'value': _0x378b5c.players, - 'coreOptions': _0x2593da.coreOptionsValues, - 'newuser': _0x4b10d6.userid, - 'master': _0x378b5c.connection.userid - }))), _0x2593da.updateCoreOptionMenuItems.call(_0x17edbf); - }, _0x378b5c.connection.onFileStart = function(_0x50eb3a) { - var _0x2c1832 = _0x50eb3a.name.split('-'); - 'reset' !== _0x2c1832[0x0] && 0x0 != _0x2c1832[0x0] || (_0x378b5c.inputsData = {}, _0x378b5c.disableControl(true)), _0x378b5c.progressHelper[_0x50eb3a.remoteUserId] = {}, _0x378b5c.progressHelper[_0x50eb3a.remoteUserId].max = _0x50eb3a.maxChunks, _0x378b5c.showLoading.call(_0x17edbf), _0x378b5c.connection.isInitiator ? (_0x378b5c.wait = true, _0x378b5c.systemPause(0x1), _0x27f4c4.Module.pauseMainLoop()) : _0x378b5c.inputsData = {}; - }, _0x378b5c.connection.onFileProgress = function(_0x44a04b) { - var _0x17edbf = _0x378b5c.progressHelper[_0x44a04b.remoteUserId]; - _0x17edbf.current = _0x44a04b.currentPosition || _0x44a04b.maxChunks || _0x17edbf.max; - }, _0x378b5c.connection.onFileEnd = function(_0x45d454) { - _0x378b5c.hideLoading.call(_0x17edbf); - var _0x2c1832 = _0x45d454.name.split('-'), - _0x3795d9 = _0x2c1832[0x0] >> 0x0; - 'reset' === _0x2c1832[0x0] ? (_0x3795d9 = 0x0, _0x378b5c.connection.isInitiator ? (_0x378b5c.systemPause(0x0), _0x378b5c.disableControl(!0x1), _0x17edbf.playing = true, _0x27f4c4.Module.resumeMainLoop()) : _0x550f17.a.get(_0x45d454.url, { - 'responseType': 'arraybuffer' - }).then(function(_0x37db4c) { - _0x378b5c.inputsData = {}; - var _0x2c1832 = new Uint8Array(_0x37db4c.data); - _0x378b5c.loadState(_0x2c1832, _0x3795d9), _0x378b5c.wait = !0x1, _0x378b5c.systemPause(0x0), _0x378b5c.disableInput = !0x1, _0x17edbf.playing = true, _0x27f4c4.Module.resumeMainLoop(); - })) : 'game.state' === _0x2c1832[0x1] && (_0x378b5c.connection.isInitiator ? (_0x378b5c.openRoom(_0x17edbf), _0x378b5c.wait = !0x1, _0x378b5c.systemPause(0x0), _0x27f4c4.Module.resumeMainLoop()) : (_0x378b5c.netPlayInitFrame = _0x3795d9, _0x550f17.a.get(_0x45d454.url, { - 'responseType': 'arraybuffer' - }).then(function(_0x4d241b) { - var _0x2c1832 = new Uint8Array(_0x4d241b.data); - _0x378b5c.loadState(_0x2c1832, _0x3795d9), _0x378b5c.wait = !0x1, _0x378b5c.disableInput = !0x1, _0x378b5c.connection.send(JSON.stringify({ - 'act': 'wait-end', - 'value': _0x378b5c.connection.userid - })), _0x378b5c.hideLoading.call(_0x17edbf), _0x17edbf.playing = true, _0x27f4c4.Module.resumeMainLoop(); - }))), _0x378b5c.connection.isInitiator || console.log('recv mem end', _0x378b5c.currentFrame, _0x45d454.name); - }; - var _0x3bdb35 = !0x1; - _0x378b5c.connection.onmessage = function(_0x32e81a) { - var _0x2c1832, _0x2dca58 = _0x32e81a.data || _0x32e81a; - try { - _0x2c1832 = JSON.parse(_0x2dca58); - } catch (_0x3fb9cc) { - _0x2c1832 = null; - } - if (_0x2c1832) { - if ('room-master' === _0x2c1832.act && (_0x378b5c.roomMaster = _0x2c1832.value), _0x2c1832.act, 'short-pause' === _0x2c1832.act && (_0x3bdb35 || (_0x378b5c.systemPause(0x1), _0x27f4c4.Module.pauseMainLoop(), _0x3bdb35 = true, _0x378b5c.wait = true, setTimeout(function() { - _0x378b5c.systemPause(0x0), _0x27f4c4.Module.resumeMainLoop(), _0x378b5c.wait = !0x1, _0x3bdb35 = !0x1; - }, 0x30))), 'sync-control' === _0x2c1832.act) { - var _0xb051c1 = _0x2c1832.value; - _0x17edbf.playing || _0x378b5c.wait; - var _0x2ef644 = _0x378b5c.connection.userid; - _0x378b5c.players.indexOf(_0x2ef644); - _0x378b5c.connection.isInitiator, _0xb051c1.forEach(function(_0x308105, _0x383237) { - var _0x2c1832 = _0x308105.split('|'), - _0x25a5c4 = _0x2c1832[0x0] >> 0x0, - _0x2b3afd = _0x2c1832[0x1] >> 0x0, - _0x4f5761 = _0x2c1832[0x2] >> 0x0, - _0x249303 = _0x2c1832[0x3] >> 0x0, - _0x54e0fd = _0x378b5c.currentFrame; - _0x378b5c.inputsData[_0x249303] || (_0x378b5c.inputsData[_0x249303] = []), -0x1 !== _0x25a5c4 && _0x249303 === _0x54e0fd && _0x378b5c.simulateInputFn(_0x25a5c4, _0x2b3afd, _0x4f5761), _0x378b5c.connection.isInitiator ? _0x25a5c4 >= 0x0 && (_0x378b5c.inputsData[_0x54e0fd] || (_0x378b5c.inputsData[_0x54e0fd] = []), -0x2 != _0x2b3afd && (_0x378b5c.inputsData[_0x54e0fd].push({ - 'index': _0x25a5c4, - 'key': _0x2b3afd, - 'status': _0x4f5761, - 'frame': _0x54e0fd - }), _0x378b5c.simulateInputFn(_0x25a5c4, _0x2b3afd, _0x4f5761)), _0x3bdb35 || _0x54e0fd - 0xa >= _0x249303 && (_0x378b5c.systemPause(0x1), _0x27f4c4.Module.pauseMainLoop(), _0x3bdb35 = true, _0x378b5c.wait = true, setTimeout(function() { - _0x378b5c.systemPause(0x0), _0x27f4c4.Module.resumeMainLoop(), _0x378b5c.wait = !0x1, _0x3bdb35 = !0x1; - }, 0x30))) : ('' !== _0x25a5c4 && _0x378b5c.inputsData[_0x249303].push({ - 'index': _0x25a5c4, - 'key': _0x2b3afd, - 'status': _0x4f5761, - 'frame': _0x249303 - }), _0x378b5c.inputsData[_0x378b5c.currentFrame] && _0x27f4c4.Module.resumeMainLoop(), _0x54e0fd + 0xa <= _0x249303 && _0x249303 > _0x378b5c.netPlayInitFrame + 0x64 && _0x378b5c.connection.send(JSON.stringify({ - 'act': 'short-pause', - 'value': _0x2ef644 - }), _0x378b5c.roomMaster)); - }); - } - if (_0x2c1832.act, _0x2c1832.act, 'update-core-option' === _0x2c1832.act && (_0x378b5c.connection.isInitiator || (_0x378b5c.coreOptionData[_0x2c1832.frame] = { - 'key': _0x2c1832.key, - 'value': _0x2c1832.value - })), 'restart-game' === _0x2c1832.act && (_0x378b5c.inputsData = {}, _0x378b5c.connection.send(JSON.stringify({ - 'act': 'sync-mem', - 'value': _0x378b5c.connection.userid - }), _0x378b5c.roomMaster)), 'pause' === _0x2c1832.act && _0x27f4c4.Module.pauseMainLoop(), 'resume' === _0x2c1832.act && _0x27f4c4.Module.resumeMainLoop(), 'wait' === _0x2c1832.act && (_0x378b5c.wait = true, _0x378b5c.systemPause(0x1), _0x2c1832.value !== _0x378b5c.connection.userid && (_0x378b5c.waitingList[_0x2c1832.value] = 0x1), _0x378b5c.disableControl(true)), 'wait-end' === _0x2c1832.act && (_0x378b5c.waitingList[_0x2c1832.value] && delete _0x378b5c.waitingList[_0x2c1832.value], 0x0 === Object.keys(_0x378b5c.waitingList).length && (_0x378b5c.wait = !0x1, _0x378b5c.systemPause(0x0), _0x378b5c.disableInput = !0x1)), 'sync-mem' === _0x2c1832.act) { - _0x378b5c.wait = true, _0x378b5c.systemPause(0x1); - var _0x2a5bce = _0x2c1832.value; - _0x378b5c.disableControl(true), _0x378b5c.connection.send(JSON.stringify({ - 'act': 'wait', - 'value': _0x2a5bce - })); - for (var _0x8624ae = _0x378b5c.getStateInfo().split('|'), _0x99810a = _0x8624ae[0x0] >> 0x0, _0x96975a = new Uint8Array(_0x99810a), _0x4aea80 = _0x8624ae[0x1] >> 0x0, _0x2d2ba0 = 0x0; _0x2d2ba0 < _0x99810a; _0x2d2ba0 += 0x1) _0x96975a[_0x2d2ba0] = _0x27f4c4.Module.getValue(_0x4aea80 + _0x2d2ba0); - _0x27f4c4._FS.createDataFile('/', 'game.state', _0x96975a, true, true), _0x27f4c4.Module.cwrap('load_state', 'number', ['string', 'number'])('game.state', 0x0), _0x27f4c4.FS.unlink('game.state'), _0x378b5c.inputsData = {}; - var _0x49054f = new File([_0x96975a], '' .concat(0x0, '-game.state'), { - 'type': '', - 'lastModified': new Date() - }); - _0x378b5c.connection.shareFile(_0x49054f, _0x2a5bce); - } - if (_0x2c1832.act, 'get-players-result' === _0x2c1832.act && (_0x378b5c.players = _0x2c1832.value, _0x378b5c.roomMaster = _0x2c1832.master, _0x2c1832.newuser === _0x378b5c.connection.userid)) { - var _0x418ccb = _0x2593da.coreOptionsValues; - _0x2c1832.coreOptions && Object.keys(_0x2c1832.coreOptions).forEach(function(_0x3f4c8f) { - _0x418ccb[_0x3f4c8f] !== _0x2c1832.coreOptions[_0x3f4c8f] && _0x2593da.updateCoreOptions.call(_0x17edbf, _0x3f4c8f, _0x2c1832.coreOptions[_0x3f4c8f]); - }), _0x378b5c.showLoading.call(_0x17edbf), _0x378b5c.disableControl(true), setTimeout(function() { - _0x378b5c.connection.send(JSON.stringify({ - 'act': 'sync-mem', - 'value': _0x378b5c.connection.userid - }), _0x378b5c.roomMaster); - }, 0x1), _0x378b5c.roomMaster && _0x378b5c.connection.peers[_0x378b5c.roomMaster] && (_0x378b5c.connection.extra.room_name = _0x378b5c.connection.peers[_0x378b5c.roomMaster].extra.room_name, _0x378b5c.connection.updateExtraData()), _0x378b5c.connection.peers[_0x378b5c.roomMaster] && (_0x3d0d28 = _0x378b5c.connection.peers[_0x378b5c.roomMaster].extra), _0x378b5c.openRoom(_0x17edbf); - } - } - }, _0x378b5c.connection.onUserStatusChanged = function(_0x4188ba) { - if ('offline' === _0x4188ba.status) { - var _0x17edbf = _0x378b5c.players.indexOf(_0x4188ba.userid); - _0x17edbf >= 0x0 && (_0x378b5c.players[_0x17edbf] = null); - } - _0x4188ba.status; - }, _0x378b5c.connection.onExtraDataUpdated = function(_0x20ce61) { - _0x20ce61.userid === _0x378b5c.connection.userid && (_0x378b5c.connection.extra = _0x20ce61.extra); - }, _0x378b5c.connection.onleave = function(_0x30ebc6) { - if (_0x30ebc6.userid) { - var _0x2c1832 = _0x378b5c.players.indexOf(_0x30ebc6.userid); - _0x2c1832 >= 0x0 && (_0x378b5c.players[_0x2c1832] = null); - } - _0x378b5c.waitingList[_0x30ebc6.userid] && delete _0x378b5c.waitingList[_0x30ebc6.userid], _0x378b5c.connection.isInitiator && 0x0 === Object.keys(_0x378b5c.waitingList).length && _0x378b5c.wait && (_0x378b5c.wait = !0x1, _0x378b5c.systemPause(0x0), _0x378b5c.disableInput = !0x1, _0x378b5c.connection.send(JSON.stringify({ - 'act': 'wait-end', - 'value': _0x378b5c.connection.userid - }))), _0x378b5c.openRoom(_0x17edbf), _0x378b5c.inputsData = {}, _0x378b5c.hideLoading.call(_0x17edbf); - }; - var _0x2fba43 = function() { - try { - _0x378b5c.connection.onbeforeunload(); - } catch (_0xac619d) {} - _0x378b5c.connected = !0x1, _0x378b5c.connection.password = null, _0x378b5c.players = [], _0x378b5c.connection.peersBackup = [], _0x378b5c.waitingList = {}, _0x378b5c.inputsData = {}, _0x378b5c.hideLoading.call(_0x17edbf), _0x132da7(_0x17edbf.elements.buttons.restart, !0x1), _0x132da7(_0x17edbf.elements.buttons.loadState, !0x1), _0x132da7(_0x17edbf.elements.buttons.saveState, !0x1), _0x378b5c.allowCheat && _0x132da7(_0x17edbf.elements.buttons.cheat, !0x1), _0x132da7(_0x2593da.contextMenu.querySelectorAll('ul li').item(0x2), !0x1), _0x132da7(_0x2593da.contextMenu.querySelectorAll('ul li').item(0x3), !0x1), Array.from(_0x17edbf.elements.buttons.play).forEach(function(_0x3d296d) { - _0x132da7(_0x3d296d, !0x1); - }), _0x2593da.updateCoreOptionMenuItems.call(_0x17edbf); - }; - _0x378b5c.connection.close = _0x2fba43, _0x378b5c.connection.disconnect = _0x2fba43, _0x378b5c.connection.leave = _0x2fba43; - var _0x3f9c57, _0x10c0ad = function(_0x42ff74, _0x306f0b, _0x345d4d) { - _0x378b5c.hideLoading.call(_0x17edbf), _0x42ff74 ? (_0x378b5c.stopLoadRooms(), _0x132da7(_0x17edbf.elements.buttons.restart, true), _0x132da7(_0x17edbf.elements.buttons.loadState, true), _0x132da7(_0x17edbf.elements.buttons.saveState, true), _0x378b5c.resetCheat(), _0x132da7(_0x17edbf.elements.buttons.cheat, true), _0x132da7(_0x2593da.contextMenu.querySelectorAll('ul li').item(0x2), true), _0x132da7(_0x2593da.contextMenu.querySelectorAll('ul li').item(0x3), true), Array.from(_0x17edbf.elements.buttons.play).forEach(function(_0x2911fb) { - _0x132da7(_0x2911fb, true); - }), _0x378b5c.connection.socket && _0x378b5c.connection.socket.on('set-isInitiator-true', function(_0x31da46) { - _0x31da46 === _0x378b5c.connection.sessionid && (_0x378b5c.connection.socket.emit('extra-data-updated', _0x378b5c.connection.extra), _0x378b5c.connection.send(JSON.stringify({ - 'act': 'room-master', - 'value': _0x378b5c.connection.userid - })), _0x378b5c.roomMaster = _0x378b5c.connection.userid, _0x378b5c.systemPause(0x0), _0x27f4c4.Module.resumeMainLoop(), _0x2593da.updateCoreOptionMenuItems.call(_0x17edbf), _0x132da7(_0x17edbf.elements.buttons.restart, !0x1), _0x132da7(_0x17edbf.elements.buttons.loadState, !0x1), _0x132da7(_0x17edbf.elements.buttons.saveState, !0x1), Array.from(_0x17edbf.elements.buttons.play).forEach(function(_0x132034) { - _0x132da7(_0x132034, !0x1); - })); - })) : (_0x4d8495.close(), _0x5289c1.querySelector('#modal-7d8fd50ed642340b-content').innerHTML = _0x345d4d, _0x4d8495.show('modal-7d8fd50ed642340b', { - 'closeTrigger': 'data-modal-close' - })); - }, - _0x1e0cdb = function(_0x5b3f13) { - var _0x2c1832 = _0x5b3f13.target.getAttribute('data-id'); - if ('Y' === _0x5b3f13.target.getAttribute('data-password')) _0x4d8495.show('modal-5aa765d61d8327de', { - 'closeTrigger': 'data-modal-close' - }), _0x325651.setAttribute('data-id', _0x2c1832); - else { - _0x378b5c.showLoading.call(_0x17edbf), _0x378b5c.connection.userid = _0x378b5c.connection.token(); - try { - _0x378b5c.connection.join(_0x2c1832, _0x10c0ad); - } catch (_0x2767b9) { - _0x378b5c.hideLoading.call(_0x17edbf), _0x5289c1.querySelector('#modal-7d8fd50ed642340b-content').innerHTML = 'Error', _0x4d8495.show('modal-7d8fd50ed642340b', { - 'closeTrigger': 'data-modal-close' - }); - } - } - return _0x5b3f13.stopPropagation(), !0x1; - }; - _0x378b5c.loadRoomsList = function() { - _0x132da7(_0x17edbf.elements.dialogs.netplay.querySelector('.' .concat(_0x378b5c.classNames['netplay-roomlist'])), !0x1), _0x132da7(_0x17edbf.elements.dialogs.netplay.querySelector('.' .concat(_0x378b5c.classNames['netplay-room'])), true), _0x132da7(_0x17edbf.elements.dialogs.netplay.querySelector('.' .concat(_0x378b5c.classNames['btn-create-room'])), !0x1), _0x132da7(_0x17edbf.elements.dialogs.netplay.querySelector('.' .concat(_0x378b5c.classNames['btn-quit'])), true); - var listUrl = _0x17edbf.listUrl - if (! listUrl.endsWith('/')) { - listUrl += '/'; - }; - var _0x2c1832 = _0x17edbf.elements.dialogs.netplay.querySelector('.' .concat(_0x378b5c.classNames['netplay-roomlist'])).querySelector('tbody'), - _0x5cf2be = [listUrl, 'list?game_id=', _0x17edbf.config.gameId, '&domain=', document.domain].join(''); - _0x550f17.a.get(_0x5cf2be, {}).then(function(_0x37c60b) { - if (_0x37c60b.data) { - var _0x4782da = [], - _0x28e87d = []; - _0x2c1832.querySelectorAll('tr').forEach(function(_0x1e5a22) { - _0x28e87d.push(_0x1e5a22.getAttribute('id')); - }), Object.keys(_0x37c60b.data).forEach(function(_0x47ae0e) { - var _0x4a8f4c = _0x37c60b.data[_0x47ae0e]; - if (_0x4782da.push(_0x47ae0e), _0x28e87d.includes(_0x47ae0e)) { - var _0x2d672f = _0x2c1832.querySelector('tr[id="' .concat(_0x47ae0e, '"]')); - _0x2c1832.removeChild(_0x2d672f); - } - var _0x295f41 = document.createElement('tr'); - _0x295f41.setAttribute('id', _0x47ae0e); - var _0xa2ea61 = _0x4a8f4c.password ? _0x378b5c.icons.lock : '', - _0x5452b6 = _0x4a8f4c.password ? 'Y' : 'N', - _0xb3121d = _0x4a8f4c.current < _0x4a8f4c.max ? 'Join') : '', - _0x5c8146 = _0x4a8f4c.country ? _0x4a8f4c.country : '?'; - _0x295f41.innerHTML = '[' .concat(_0x5c8146, '] ').concat(_0xa2ea61, ' ').concat(_0x4a8f4c.room_name, '').concat(_0x4a8f4c.current, '/').concat(_0x4a8f4c.max, '').concat(_0xb3121d, ''), _0x1093f4.call(_0xa88a13, _0x295f41.querySelector('.' .concat(_0x378b5c.classNames['btn-join-room'])), 'click', _0x1e0cdb), _0x2c1832.appendChild(_0x295f41); - }), _0x2c1832.querySelectorAll('tr').forEach(function(_0x24dcf7) { - _0x4782da.includes(_0x24dcf7.id) || _0x2c1832.removeChild(_0x24dcf7); - }); - } - _0x378b5c.loadRoomsListTimer = setTimeout(_0x378b5c.loadRoomsList, 0x7d0); - }).catch(function(_0x227055) { - console.log('Network Error', _0x227055), _0x378b5c.loadRoomsListTimer = setTimeout(_0x378b5c.loadRoomsList, 0x7d0); - }); - }, _0x378b5c.openRoom = function(_0x10625f) { - _0x378b5c.stopLoadRooms(), _0x132da7(_0x10625f.elements.dialogs.netplay.querySelector('.' .concat(_0x378b5c.classNames['netplay-roomlist'])), true), _0x132da7(_0x10625f.elements.dialogs.netplay.querySelector('.' .concat(_0x378b5c.classNames['netplay-room'])), !0x1), _0x132da7(_0x10625f.elements.dialogs.netplay.querySelector('.' .concat(_0x378b5c.classNames['btn-create-room'])), true), _0x132da7(_0x10625f.elements.dialogs.netplay.querySelector('.' .concat(_0x378b5c.classNames['btn-quit'])), !0x1), _0x378b5c.resetCheat(), _0x132da7(_0x10625f.elements.buttons.cheat, true); - var _0x17edbf = _0x10625f.elements.dialogs.netplay.querySelector('.' .concat(_0x378b5c.classNames['netplay-room'])), - _0x2c1832 = _0x17edbf.querySelector('[data-room-password]'); - null === _0x378b5c.connection.password ? _0x132da7(_0x2c1832, true) : (_0x132da7(_0x2c1832, !0x1), _0x2c1832.querySelector('span').innerText = _0x378b5c.connection.password); - var _0x18c1cb = _0x17edbf.querySelector('tbody'); - _0x18c1cb.innerHTML = '', _0x17edbf.querySelector('strong').innerText = _0x3d0d28.room_name, _0x378b5c.players.forEach(function(_0x938d55, _0xf3d39a) { - var _0x2c1832 = null; - if (_0x938d55 && (_0x378b5c.connection.peers[_0x938d55] ? _0x2c1832 = _0x378b5c.connection.peers[_0x938d55].extra : _0x378b5c.connection.userid === _0x938d55 && (_0x2c1832 = _0x378b5c.connection.extra), _0x2c1832 && _0x2c1832.name)) { - var _0x564064 = document.createElement('tr'); - _0x564064.innerHTML = '' .concat(_0xf3d39a + 0x1, '').concat(_0x2c1832.name, ''), _0x18c1cb.appendChild(_0x564064); - } - }); - }, _0x1093f4.call(this, _0x325651.querySelector('.' .concat(_0x378b5c.classNames['modal__btn-primary'])), 'click', function(_0x9ac969) { - var _0x2c1832 = _0x325651.querySelector('.' .concat(_0x378b5c.classNames['netplay-room-password-input'])).value; - _0x378b5c.showLoading.call(_0x17edbf), _0x378b5c.connection.password = _0x2c1832; - var _0xcf7207 = _0x325651.getAttribute('data-id'); - _0x378b5c.connection.join(_0xcf7207, function(_0x1a0deb, _0x1ef6c8, _0x1ad18e) { - _0x10c0ad(_0x1a0deb, 0x0, _0x1ad18e), _0x1a0deb && _0x325651.classList.remove(_0x449eac({ - 'is-open': true - })); - }), _0x9ac969.stopPropagation(); - }), _0x1093f4.call(this, _0x2c1832.querySelector('.' .concat(_0x378b5c.classNames['modal__btn-primary'])), 'click', function(_0x43f795) { - var _0x17edbf = _0x2c1832.querySelector('.' .concat(_0x378b5c.classNames['netplay-player-name'])).value; - _0x17edbf = _0x17edbf.replace(/<|>/g, ''), _0x2c1832.querySelector('.' .concat(_0x378b5c.classNames.modal__errmsg)).innerHTML = '', _0x17edbf.trim() && (_0x378b5c.playerName = _0x17edbf.trim(), _0x378b5c.connection.extra.name = _0x17edbf.trim(), _0x4d8495.close()), _0x43f795.stopPropagation(); - }), _0x1093f4.call(this, _0x36bde0.querySelector('.' .concat(_0x378b5c.classNames['modal__btn-primary'])), 'click', function(_0x202cf6) { - var _0x2c1832 = _0x36bde0.querySelector('.' .concat(_0x378b5c.classNames['netplay-room-name-input'])).value; - _0x2c1832 = _0x2c1832.replace(/<|>/g, ''); - var _0x3510ed = _0x36bde0.querySelector('select[data-max-players] option:checked').value; - _0x3510ed < 0x2 && (_0x3510ed = 0x2), _0x3510ed > 0x4 && (_0x3510ed = 0x4); - for (var _0x1264b2 = 0x0; _0x1264b2 < _0x3510ed; _0x1264b2++) _0x378b5c.players[_0x1264b2] = null; - _0x378b5c.connection.maxParticipantsAllowed = _0x3510ed; - var _0x140bcf = _0x36bde0.querySelector('.' .concat(_0x378b5c.classNames['netplay-room-password-input'])).value; - _0x36bde0.querySelector('.' .concat(_0x378b5c.classNames.modal__errmsg)).innerHTML = '', _0x2c1832.trim() ? (_0x378b5c.connection.extra.room_name = _0x2c1832.trim(), '' !== _0x140bcf.trim() && (_0x378b5c.connection.password = _0x140bcf.trim()), _0x378b5c.showLoading.call(_0x17edbf), _0x378b5c.connection.open(_0x378b5c.connection.token(), function(_0x3c6c26, _0x203288, _0x210547) { - _0x378b5c.hideLoading.call(_0x17edbf), _0x3c6c26 ? (_0x378b5c.players[0x0] = _0x378b5c.connection.userid, _0x378b5c.roomMaster = _0x378b5c.connection.userid, _0x3f9c57.closeModal(), _0x378b5c.stopLoadRooms(), _0x3d0d28 = _0x378b5c.connection.extra, _0x378b5c.openRoom(_0x17edbf), _0x132da7(_0x2593da.contextMenu.querySelectorAll('ul li').item(0x2), true), _0x132da7(_0x2593da.contextMenu.querySelectorAll('ul li').item(0x3), true)) : _0x36bde0.querySelector('.' .concat(_0x378b5c.classNames.modal__errmsg)).innerHTML = _0x210547; - })) : _0x3f9c57.closeModal(), _0x202cf6.stopPropagation(); - }), _0x1093f4.call(this, _0x17edbf.elements.dialogs.netplay.querySelector('.' .concat(_0x378b5c.classNames['btn-create-room'])), 'click', function(_0x48cb26) { - return _0x3f9c57 = _0x4d8495.show('modal-85cd7a1c543a484a', { - 'closeTrigger': 'data-modal-close', - 'onClose': function() { - _0x17edbf.elements.container.focus(); - } - }), _0x48cb26.stopPropagation(), !0x1; - }), _0x1093f4.call(this, _0x17edbf.elements.dialogs.netplay.querySelector('.' .concat(_0x378b5c.classNames['btn-quit'])), 'click', function(_0x68459d) { - return _0x378b5c.connection.close(), _0x378b5c.stopLoadRooms(), _0x378b5c.loadRoomsList(), _0x378b5c.inputsData = {}, _0x68459d.stopPropagation(), !0x1; + _0x17edbf.elements.dialogs.netplay.innerHTML = '\n
\n
\n

'+_0x17edbf.localization('Netplay')+'

\n
\n
\n \n\n \n
\n
\n '+_0x17edbf.localization('Quit Room')+'\n '+_0x17edbf.localization('Create a Room')+'\n '+_0x17edbf.localization('Close')+'\n
\n
\n\n \n \n \n \n \n \n \n \n \n \n '); + + _0x1093f4.call(this, _0x17edbf.elements.dialogs.netplay.querySelector('.' .concat(_0x378b5c.classNames['btn-cancel'])), 'click', function(_0x3d4554) { + return _0x132da7(_0x17edbf.elements.dialogs.netplay, true), _0x3d4554.stopPropagation(), _0x17edbf.elements.container.focus(), !0x1; }); } - window._0x378b5c = _0x378b5c - }, + },*/ 'initKeyboard': function() { var _0xa88a13 = this, _0x17edbf = this, @@ -3954,72 +3670,66 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) { }, 'setup': function() { var _0xa88a13 = this; - if (this.game) { - if (_0x378b5c.playerName = _0xa88a13.config.playerName, _0x3a8e2f(this.elements.container, this.config.classNames.type, true), this.elements.container.setAttribute('tabindex', '0'), this.color) { - var _0x17edbf = function(_0x175d8e) { - var _0x17edbf = _0x175d8e.toLowerCase(); - if (_0x17edbf && /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/ .test(_0x17edbf)) { - if (0x4 === _0x17edbf.length) { - for (var _0x2c1832 = '#', _0x4c881f = 0x1; _0x4c881f < 0x4; _0x4c881f += 0x1) _0x2c1832 += _0x17edbf.slice(_0x4c881f, _0x4c881f + 0x1).concat(_0x17edbf.slice(_0x4c881f, _0x4c881f + 0x1)); - _0x17edbf = _0x2c1832; - } - for (var _0x5ac4ff = [], _0x324169 = 0x1; _0x324169 < 0x7; _0x324169 += 0x2) _0x5ac4ff.push(parseInt('0x' .concat(_0x17edbf.slice(_0x324169, _0x324169 + 0x2)), 0x10)); - return _0x5ac4ff; + if (!this.game) { + console.warn('No game element found!'); + return; + } + _0x378b5c.playerName = _0xa88a13.config.playerName; + _0x3a8e2f(this.elements.container, this.config.classNames.type, true); + this.elements.container.setAttribute('tabindex', '0'); + if (this.color) { + var _0x17edbf = function(_0x175d8e) { + var _0x17edbf = _0x175d8e.toLowerCase(); + if (_0x17edbf && /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/ .test(_0x17edbf)) { + if (0x4 === _0x17edbf.length) { + for (var _0x2c1832 = '#', _0x4c881f = 0x1; _0x4c881f < 0x4; _0x4c881f += 0x1) _0x2c1832 += _0x17edbf.slice(_0x4c881f, _0x4c881f + 0x1).concat(_0x17edbf.slice(_0x4c881f, _0x4c881f + 0x1)); + _0x17edbf = _0x2c1832; } - return null; - }(this.color); - _0x17edbf && this.elements.container.setAttribute('style', '--ejs-primary-color: ' .concat(_0x17edbf[0x0], ', ').concat(_0x17edbf[0x1], ', ').concat(_0x17edbf[0x2])); - } - if (this.elements.wrapper = _0x428003('div', { - 'class': this.config.classNames.video - }), _0x580edd(this.game, this.elements.wrapper), 'video' !== _0xa88a13.game.tagName.toLocaleLowerCase()) { - var _0x2c1832 = this.config.volume; - Object.defineProperty(_0xa88a13.game, 'volume', { - 'get': function() { - return _0x2c1832; - }, - 'set': function(_0x4cca18) { - _0x2c1832 = _0x4cca18, _0xbae705.call(_0xa88a13, _0xa88a13.game, 'volumechange'); - } - }); - var _0x541fe1 = _0xa88a13.storage.get('muted'); - Object.defineProperty(_0xa88a13.game, 'muted', { - 'get': function() { - return _0x541fe1; - }, - 'set': function(_0x54b6e0) { - var _0x2c1832 = !!_0x1e2c68.boolean(_0x54b6e0) && _0x54b6e0; - _0x541fe1 = _0x2c1832, _0xbae705.call(_0xa88a13, _0xa88a13.game, 'volumechange'); - } - }); - } - window.addEventListener('beforeunload', function(_0x34b11a) { - if (_0xa88a13.started) { - var _0x2c1832 = _0xa88a13.startName.split('/').pop().split('.'), - _0x478412 = _0x2c1832.slice(0x0, _0x2c1832.length - 0x1).join('.'); - _0x27f4c4.FS.syncfs(function(_0x1026f5) {}); - try { - var _0x40d46a = 'srm'; - 'nds' === _0xa88a13.system && (_0x40d46a = 'dsv'), _0x27f4c4.FS.unlink('/data/saves/' .concat(_0x478412, '.').concat(_0x40d46a)); - } catch (_0x2c3bc8) { - console.log('fail to save'); - } - _0x378b5c.saveSavFiles(), _0x27f4c4.FS.syncfs(function(_0x2c4b20) {}); + for (var _0x5ac4ff = [], _0x324169 = 0x1; _0x324169 < 0x7; _0x324169 += 0x2) _0x5ac4ff.push(parseInt('0x' .concat(_0x17edbf.slice(_0x324169, _0x324169 + 0x2)), 0x10)); + return _0x5ac4ff; } - }, true); - } else console.warn('No game element found!'); + return null; + }(this.color); + _0x17edbf && this.elements.container.setAttribute('style', '--ejs-primary-color: ' .concat(_0x17edbf[0x0], ', ').concat(_0x17edbf[0x1], ', ').concat(_0x17edbf[0x2])); + } + this.elements.wrapper = _0x428003('div', { + 'class': this.config.classNames.video + }); + _0x580edd(this.game, this.elements.wrapper); + if ('video' !== _0xa88a13.game.tagName.toLocaleLowerCase()) { + var _0x2c1832 = this.config.volume; + Object.defineProperty(_0xa88a13.game, 'volume', { + 'get': function() { + return _0x2c1832; + }, + 'set': function(_0x4cca18) { + _0x2c1832 = _0x4cca18, _0xbae705.call(_0xa88a13, _0xa88a13.game, 'volumechange'); + } + }); + var _0x541fe1 = _0xa88a13.storage.get('muted'); + Object.defineProperty(_0xa88a13.game, 'muted', { + 'get': function() { + return _0x541fe1; + }, + 'set': function(_0x54b6e0) { + var _0x2c1832 = !!_0x1e2c68.boolean(_0x54b6e0) && _0x54b6e0; + _0x541fe1 = _0x2c1832, _0xbae705.call(_0xa88a13, _0xa88a13.game, 'volumechange'); + } + }); + } + window.addEventListener('beforeunload', function(_0x34b11a) { + if (_0xa88a13.started) { + _0x27f4c4.FS.syncfs(function() {}); + _0x378b5c.saveSavFiles(); + _0x27f4c4.FS.syncfs(function() {}); + } + }, true); }, 'listeners': function() { var _0xa88a13 = this; _0xa88a13.elements.buttons.restart && _0x1093f4.call(_0xa88a13, _0xa88a13.elements.buttons.restart, 'click', function(_0x5cfc51) { - if (_0x378b5c.restartGame(), _0x378b5c.inputsData = {}, _0x378b5c.connected && _0x378b5c.connection.isInitiator) { - for (var _0x17edbf = _0x378b5c.getStateInfo().split('|'), _0x2c1832 = _0x17edbf[0x0] >> 0x0, _0x1036de = (_0x17edbf[0x2], new Uint8Array(_0x2c1832)), _0x532138 = _0x17edbf[0x1] >> 0x0, _0x5a4c27 = 0x0; _0x5a4c27 < _0x2c1832; _0x5a4c27 += 0x1) _0x1036de[_0x5a4c27] = _0x27f4c4.Module.getValue(_0x532138 + _0x5a4c27); - var _0x5a3d1a = new File([_0x1036de], '0-game.state', { - 'type': '', - 'lastModified': new Date() - }); - _0x378b5c.connection.shareFile(_0x5a3d1a), _0x378b5c.inputsData = {}, _0x378b5c.wait = true, _0x378b5c.systemPause(0x1), _0x27f4c4.Module.pauseMainLoop(), _0x378b5c.disableControl(true); - } + _0x378b5c.restartGame(); + _0x378b5c.inputsData = {}; }), _0xa88a13.elements.buttons.screenRecord && _0x1093f4.call(_0xa88a13, _0xa88a13.elements.buttons.screenRecord, 'click', function(_0x5cfc51) { if (! _0xa88a13.recordData) { @@ -4101,21 +3811,15 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) { }), _0xa88a13.elements.buttons.play && Array.from(_0xa88a13.elements.buttons.play).forEach(function(_0x24495b) { _0x1093f4.call(_0xa88a13, _0x24495b, 'click', function(_0x966382) { - _0xa88a13.playing ? (_0xa88a13.playing = !0x1, _0x27f4c4.Module.pauseMainLoop(), _0x378b5c.connected && _0x378b5c.connection.isInitiator && _0x378b5c.connection.send(JSON.stringify({ - 'act': 'pause' - })), _0xbae705.call(_0xa88a13, _0xa88a13.elements.container, 'pause', !0x1, { + _0xa88a13.playing ? (_0xa88a13.playing = !0x1, _0x27f4c4.Module.pauseMainLoop(), _0xbae705.call(_0xa88a13, _0xa88a13.elements.container, 'pause', !0x1, { 'pause': true - })) : (_0xa88a13.playing = true, _0x27f4c4.Module.resumeMainLoop(), _0x378b5c.connected && _0x378b5c.connection.isInitiator && _0x378b5c.connection.send(JSON.stringify({ - 'act': 'resume' - })), _0xbae705.call(_0xa88a13, _0xa88a13.elements.container, 'pause', !0x1, { + })) : (_0xa88a13.playing = true, _0x27f4c4.Module.resumeMainLoop(), _0xbae705.call(_0xa88a13, _0xa88a13.elements.container, 'pause', !0x1, { 'pause': !0x1 })); }); - }), _0xa88a13.elements.buttons.netplay && _0x1093f4.call(_0xa88a13, _0xa88a13.elements.buttons.netplay, 'click', function(_0x2317b9) { - _0x378b5c.disableControl(true), _0x132da7(_0xa88a13.elements.dialogs.netplay, !0x1), _0x378b5c.players.length > 0x0 ? _0x378b5c.openRoom(_0xa88a13) : (_0x378b5c.stopLoadRooms(), _0x378b5c.loadRoomsList()), _0x378b5c.playerName || _0x4d8495.show('modal-9de6c4e9ce2b9361', { - 'closeByEsckey': !0x1 - }); - }), _0xa88a13.elements.buttons.cheat && _0x1093f4.call(_0xa88a13, _0xa88a13.elements.buttons.cheat, 'click', function(_0x44b01a) { + }), /*_0xa88a13.elements.buttons.netplay && _0x1093f4.call(_0xa88a13, _0xa88a13.elements.buttons.netplay, 'click', function(_0x2317b9) { + _0x378b5c.disableControl(true), _0x132da7(_0xa88a13.elements.dialogs.netplay, !0x1); + }), */_0xa88a13.elements.buttons.cheat && _0x1093f4.call(_0xa88a13, _0xa88a13.elements.buttons.cheat, 'click', function(_0x44b01a) { _0x132da7(_0xa88a13.elements.dialogs.cheat, !0x1); }); _0xa88a13.game.stateloadField = _0x428003('input'), _0xa88a13.game.stateloadField.type = 'file', _0xa88a13.game.stateloadField.onchange = function _0x17edbf(_0xcd4599) { @@ -4144,60 +3848,13 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) { }; } _0x378b5c.setVariable = _0x27f4c4.Module.cwrap('set_variable', 'null', ['string', 'string']); + _0x378b5c.simulateInput = _0x27f4c4.Module.cwrap('simulate_input', 'null', ['number', 'number', 'number']); + /* _0x378b5c.simulateInputFn = _0x27f4c4.Module.cwrap('simulate_input', 'null', ['number', 'number', 'number']); - var _0x2c63cc = { - 0: null, - 1: null, - 2: null, - 3: null, - 4: null, - 5: null, - 6: null, - 7: null, - 8: null, - 9: null, - 10: null, - 11: null, - 12: null, - 13: null, - 14: null, - 15: null, - 16: null, - 17: null, - 18: null, - 19: null, - 20: null, - 21: null, - 22: null, - 23: null, - 24: null, - 25: null, - 26: null, - 27: null, - 28: null, - 29: null, - 30: null, - 31: null - }; _0x378b5c.simulateInput = function(_0x249751, _0x480d05, _0x50f784) { - if (_0x378b5c.connected) { - if (_0xa88a13.playing && !_0x378b5c.disableInput) { - var _0x35b9c1 = _0x378b5c.connection.userid, - _0x4d96ad = _0x378b5c.roomMaster === _0x35b9c1, - _0xf1bb97 = _0x378b5c.players.indexOf(_0x35b9c1), - _0x52e1f4 = _0x378b5c.currentFrameNum(); - _0x249751 >> 0x0 == 0x0 && (_0x2c63cc[_0x480d05] !== _0x50f784 && (_0x4d96ad ? (_0x378b5c.inputsData[_0x52e1f4] || (_0x378b5c.inputsData[_0x52e1f4] = []), _0x378b5c.inputsData[_0x52e1f4].push({ - 'index': _0xf1bb97, - 'key': _0x480d05, - 'status': _0x50f784, - 'frame': _0x52e1f4 - }),_0x378b5c.simulateInputFn(_0xf1bb97, _0x480d05, _0x50f784)) : _0x378b5c.connection.send(JSON.stringify({ - 'act': 'sync-control', - 'value': ['' .concat(_0xf1bb97, '|').concat(_0x480d05, '|').concat(_0x50f784, '|').concat(_0x52e1f4)] - }), _0x378b5c.roomMaster)), _0x2c63cc[_0x480d05] = _0x50f784); - } - } else _0x378b5c.disableInput || _0x378b5c.simulateInputFn(_0x249751, _0x480d05, _0x50f784); - }, _0x378b5c.syncInput = _0x378b5c.simulateInput; + _0x378b5c.disableInput || _0x378b5c.simulateInputFn(_0x249751, _0x480d05, _0x50f784); + };*/ + _0x378b5c.syncInput = _0x378b5c.simulateInput; window.simulateInput = _0x378b5c.simulateInput; var _0x762355 = _0x27f4c4.Module.cwrap('shader_enable', 'null', ['number']); _0x378b5c.toggleShader = function(_0x433182) { @@ -4262,25 +3919,12 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) { _0x27f4c4.FS.unlink('game.state'); }, 100) } - if (_0x378b5c.connected && _0x378b5c.connection.isInitiator) { - for (var _0x54607c = _0x378b5c.getStateInfo().split('|'), _0x1ab9c9 = _0x54607c[0x0] >> 0x0, _0xce58ec = (_0x54607c[0x2], new Uint8Array(_0x1ab9c9)), _0x4aff4f = _0x54607c[0x1] >> 0x0, _0x3bfae0 = 0x0; _0x3bfae0 < _0x1ab9c9; _0x3bfae0 += 0x1) _0xce58ec[_0x3bfae0] = _0x27f4c4.Module.getValue(_0x4aff4f + _0x3bfae0); - var _0x227419 = new File([_0xce58ec], '0-game.state', { - 'type': '', - 'lastModified': new Date() - }); - _0x378b5c.connection.shareFile(_0x227419); - _0x378b5c.inputsData = {}; - _0x378b5c.wait = true; - _0x378b5c.systemPause(0x1); - _0x27f4c4.Module.pauseMainLoop(); - _0x378b5c.disableControl(true); - } _0xa88a13.elements.container.focus(); }; _0x27f4c4.Module._set_cheat && (_0x378b5c.setCheat = _0x27f4c4.Module.cwrap('set_cheat', 'number', ['number', 'number', 'string'])); _0x27f4c4.Module._reset_cheat && (_0x378b5c.resetCheat = _0x27f4c4.Module._reset_cheat); _0x378b5c.quickSaveState = async function() { - if (_0xa88a13.started && !_0x378b5c.connected) { + if (_0xa88a13.started) { if (_0xa88a13.statesSupported === false) { _0xa88a13.elements.widgets.stateInfoDiv.innerHTML = 'CANNOT CURRENTLY SAVE STATE'; clearTimeout(_0x378b5c.saveMsgTransitions); @@ -4321,7 +3965,7 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) { }; _0x378b5c.saveMsgTransitions = null; _0x378b5c.quickLoadState = function() { - if (_0xa88a13.started && !_0x378b5c.connected) { + if (_0xa88a13.started) { if (_0xa88a13.statesSupported === false) { _0xa88a13.elements.widgets.stateInfoDiv.innerHTML = 'CANNOT CURRENTLY LOAD STATE'; clearTimeout(_0x378b5c.saveMsgTransitions); @@ -4361,7 +4005,8 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) { _0xa88a13.elements.widgets.stateInfoDiv.innerHTML = ''; }, 1500) } - }, _0x378b5c.changeStateSlot = function(e) { + }; + _0x378b5c.changeStateSlot = function(e) { if (_0x2593da && typeof _0x2593da.getCoreOptionsValues == 'function') { var slot = _0x2593da.getCoreOptionsValues()['save-state-slot']; if (! slot) { @@ -4385,29 +4030,21 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) { _0x378b5c.saveMsgTransitions = setTimeout(function() { _0xa88a13.elements.widgets.stateInfoDiv.innerHTML = ''; }, 1500) - }, window.EJS_loadState = function(_0x4dd6a5) { - _0x378b5c.loadState(_0x4dd6a5, 0x0); - setTimeout(function() { - if (_0x378b5c.connected) { - var _0x17edbf = new File([_0x4dd6a5], '0-game.state', { - 'type': '', - 'lastModified': new Date() - }); - _0x378b5c.connection.shareFile(_0x17edbf), _0x378b5c.inputsData = {}, _0x378b5c.wait = true, _0x378b5c.systemPause(0x1), _0x27f4c4.Module.pauseMainLoop(), _0x378b5c.disableControl(true); - } - }, 0x1e); + }; + window.EJS_loadState = function(_0x4dd6a5) { + _0x378b5c.loadState(_0x4dd6a5, 0); }; var _0x840cf4 = _0x27f4c4.Module.cwrap('cmd_take_screenshot', '', []); _0x378b5c.getScreenData = function() { - return _0x378b5c.toggleShader(0x0), _0x840cf4(), _0x378b5c.toggleShader(0x1), _0x27f4c4.FS.readFile('screenshot.png'); + _0x378b5c.toggleShader(0x0); + _0x840cf4(); + _0x378b5c.toggleShader(0x1); + return _0x27f4c4.FS.readFile('screenshot.png'); }; _0x378b5c.restartGame = _0x27f4c4.Module.cwrap('system_restart', '', []); - _0x378b5c.currentFrameNum = _0x27f4c4.Module.cwrap('get_current_frame_count', '', []); + //_0x378b5c.currentFrameNum = _0x27f4c4.Module.cwrap('get_current_frame_count', '', []); _0x378b5c.saveSavFiles = _0x27f4c4.Module.cwrap('cmd_savefiles', '', []); _0x27f4c4.Module._get_core_options && (_0x378b5c.getGameCoreOptions = _0x27f4c4.Module.cwrap('get_core_options', 'string', [])); - _0x378b5c.systemPause = function(_0x29d94a) { - return !0x1; - }; _0x378b5c.controllers = _0x2593da.storage.get('controllers'); _0x378b5c.controllers || (_0x378b5c.controllers = JSON.parse(JSON.stringify(_0x378b5c.defaultControllers))); } @@ -5030,6 +4667,7 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) { }); return _0xa88a13; }, + /* 'supportNetPlay': function() { if (this.lightgun || this.mouse) return !0x1; var _0xa88a13 = window.RTCPeerConnection || window.webkitPeerConnection00 || window.webkitRTCPeerConnection || window.mozRTCPeerConnection, @@ -5037,7 +4675,7 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) { _0x2c1832 = window.mozRTCSessionDescription || window.RTCSessionDescription; return !!(_0xa88a13 && _0x17edbf && _0x2c1832) && !!(_0xa88a13 && 'createDataChannel' in _0xa88a13.prototype); }, - 'isNetPlay': function() {}, + 'isNetPlay': function() {},*/ 'findElements': function() { try { return this.elements.controls = _0x530042.call(this, this.config.selectors.controls.wrapper), this.elements.buttons = { @@ -5051,7 +4689,7 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) { 'screenRecord': _0x530042.call(this, this.config.selectors.buttons.screenRecord), 'loadState': _0x530042.call(this, this.config.selectors.buttons.loadState), 'gamepad': _0x530042.call(this, this.config.selectors.buttons.gamepad), - 'netplay': _0x530042.call(this, this.config.selectors.buttons.netplay), + //'netplay': _0x530042.call(this, this.config.selectors.buttons.netplay), 'cheat': _0x530042.call(this, this.config.selectors.buttons.cheat) }, this.elements.inputs = { 'volume': _0x530042.call(this, this.config.selectors.inputs.volume) @@ -5192,12 +4830,7 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) { }); var _0x449ec7 = _0x7f9f36.getCoreOptions.call(this); this.listeners.bind(_0xb8fbbd, 'click keyup', function(_0x270d0d) { - _0x1e2c68.keyboardEvent(_0x270d0d) && 0x20 !== _0x270d0d.which || (_0x270d0d.preventDefault(), _0x270d0d.stopPropagation(), _0xb8fbbd.checked = true, Object.keys(_0x7f9f36.normalOptions).includes(_0x57313b) && _0x7f9f36.updateNormalOptions.call(_0x17edbf, _0x57313b, _0x2c1832), Object.keys(_0x449ec7).includes(_0x57313b) && (_0x449ec7[_0x57313b].netplay && _0xdcec2a.connected ? _0xdcec2a.connection.isInitiator && (_0x7f9f36.updateCoreOptions.call(_0x17edbf, _0x57313b, _0x2c1832), _0xdcec2a.connection.send(JSON.stringify({ - 'act': 'update-core-option', - 'key': _0x57313b, - 'value': _0x2c1832, - 'frame': _0xdcec2a.currentFrame - }))) : _0x7f9f36.updateCoreOptions.call(_0x17edbf, _0x57313b, _0x2c1832)), _0x7f9f36.showMenuPanel.call(_0x17edbf, 'home', _0x1e2c68.keyboardEvent(_0x270d0d))); + _0x1e2c68.keyboardEvent(_0x270d0d) && 0x20 !== _0x270d0d.which || (_0x270d0d.preventDefault(), _0x270d0d.stopPropagation(), _0xb8fbbd.checked = true, Object.keys(_0x7f9f36.normalOptions).includes(_0x57313b) && _0x7f9f36.updateNormalOptions.call(_0x17edbf, _0x57313b, _0x2c1832), Object.keys(_0x449ec7).includes(_0x57313b) && _0x7f9f36.updateCoreOptions.call(_0x17edbf, _0x57313b, _0x2c1832)), _0x7f9f36.showMenuPanel.call(_0x17edbf, 'home', _0x1e2c68.keyboardEvent(_0x270d0d)); }, _0x57313b, !0x1), _0x7f9f36.bindMenuItemShortcuts.call(this, _0xb8fbbd, _0x57313b), _0x231912.appendChild(_0xb8fbbd); }, 'updateVolume': function() { @@ -5367,9 +5000,7 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) { 'updateCoreOptionMenuItems': function() { var _0xa88a13 = this.elements.settings.panels.home.querySelector('[role="menu"]'), _0x17edbf = _0x7f9f36.getCoreOptions.call(this); - _0xdcec2a.connected && !_0xdcec2a.connection.isInitiator ? Object.keys(_0x17edbf).forEach(function(_0x480587) { - _0x17edbf[_0x480587].netplay && _0xa88a13.querySelector('[item="' .concat(_0x480587, '"]')).setAttribute('disabled', ''); - }) : Object.keys(_0x17edbf).forEach(function(_0x20e093) { + Object.keys(_0x17edbf).forEach(function(_0x20e093) { _0xa88a13.querySelector('[item="' .concat(_0x20e093, '"]')).removeAttribute('disabled'); }); }, @@ -5552,7 +5183,7 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) { }))).appendChild(_0xa88a13); this.elements.widgets.stateInfo = _0xa88a13; this.elements.widgets.stateInfoDiv = _0x17edbf; - }, + },/* 'setNetplayWidgets': function() { var _0xa88a13 = _0x428003('div', { 'class': _0x449eac({ @@ -5586,7 +5217,7 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) { }))).appendChild(_0x2c1832); this.elements.dialogs.netplay = _0x2c1832; _0x7f9f36.setNetplayWidgets.call(this); - }, + },*/ 'toggleContextMenu': function(_0x24b1f3, _0x4b9d55) { if (_0x350d73(_0x24b1f3.target, _0x449eac({ 'ejs__dialogs': true @@ -5648,7 +5279,13 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) { var gamep = _0xa88a13.gameName } var gamepng = gamep ? '' .concat(gamep, '-screenshot.png') : 'game.png'; - _0x4e4ca6()(new Blob([_0x4e898a]), gamepng); + var a = document.createElement('a'); + a.href = URL.createObjectURL(new Blob([_0x4e898a])); + a.download = gamepng; + a.click(); + setTimeout(function() { + URL.revokeObjectURL(a.src); + }) return false; }) addContextHtml(_0xa88a13.localization('Cache Manage'), true, function(_0x275730) { @@ -5735,7 +5372,7 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) { })); _0x7f9f36.setLoadState.call(this, _0x17edbf, _0x42e40d); _0x7f9f36.setScreenRecord.call(this, _0x17edbf, _0x42e40d); - _0x7f9f36.supportNetPlay.call(this, _0x17edbf) && parseInt(this.config.gameId, 0xa) > 0x0 && _0x7f9f36.setNetplay.call(this, _0x17edbf, _0x42e40d); + //_0x7f9f36.supportNetPlay.call(this, _0x17edbf) && parseInt(this.config.gameId, 0xa) > 0x0 && _0x7f9f36.setNetplay.call(this, _0x17edbf, _0x42e40d); _0x7f9f36.setGamepad.call(this, _0x17edbf, _0x42e40d); _0x7f9f36.setStateInfoBarWidget.call(this, _0x17edbf, _0x42e40d); _0x7f9f36.setCheat.call(this, _0x17edbf, _0x42e40d); @@ -5804,7 +5441,7 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) { 'gamepad': '', 'load-state': '', 'muted': '', - 'netplay': '', + //'netplay': '', 'pause': '', 'play': '', 'restart': '', @@ -6188,7 +5825,6 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) { _0x2c1832 = _0xdcec2a.getScreenData(); if (_0x378b5c.saveLoadDB.call(_0x17edbf, 'save')) { - console.log('a'); return; } var _0x2c1832 = _0x31e271; @@ -6338,7 +5974,7 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) { } return path } - this.version = '2.2.1'; + this.version = '2.2.4'; this.system = ''; this.adUrl = null; this.gameName = null; @@ -6371,6 +6007,7 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) { this.multitap = this.config.multitap; this.cheats = this.config.cheats; this.cheats || (this.cheats = []); + /* var u = function(a, b) { if (typeof b === 'string') { return b; @@ -6382,6 +6019,7 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) { }(this.config.oldNetplayServer, this.config.netplayUrl); this.listUrl = u; this.socketUrl = u; + */ this.mameCore = this.config.mameCore || null; this.color = this.config.color; this.startOnLoad = this.config.startOnLoad || false; diff --git a/data/emulator.js b/data/emulator.js index f4241ea..f84d651 100644 --- a/data/emulator.js +++ b/data/emulator.js @@ -12,11 +12,20 @@ var EJS = function(_0x574f5e) { }; return _0x574f5e[_0x289550].call(_0x4f6398.exports, _0x4f6398, _0x4f6398.exports, _0x1d686b), _0x4f6398.l = true, _0x4f6398.exports; } - window.aba = function() { + window.getUsedModules = function() { return o.sort(function(a, b) { return (a > b) ? 1 : -1; }); } + window.getUnusedModules = function() { + var rv = []; + var q = getUsedModules(); + for (var i=0; i<_0x574f5e.length; i++) { + if (_0x574f5e[i] === null) continue; + if (!q.includes(i)) rv.push(i); + } + return rv; + } if (!typeof Array.isArray == 'function') { var _0x484695 = {}.toString; Array.isArray = function(_0xd04970) { @@ -63,10 +72,10 @@ var EJS = function(_0x574f5e) { return Object.prototype.hasOwnProperty.call(_0x1ed01a, _0x4abf0b); }; _0x1d686b.p = ''; - _0x1d686b.s = 0x18c; + _0x1d686b.s = 161; return _0x1d686b(_0x1d686b.s); -}([function(a) { - a.exports = function(error, element, _this) { +}([function(module) { + module.exports = function(error, element, _this) { console.warn(error) if (error && error.response && error.response.status === 0) { element.innerHTML = ''+_this.localization('CORS Error')+''; @@ -476,18 +485,7 @@ var EJS = function(_0x574f5e) { } } } -}, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, function(_0x25e628, _0x2f1ee1) { - var _0x2fbe1c; - _0x2fbe1c = function() { - return this; - }(); - try { - _0x2fbe1c = _0x2fbe1c || new Function('return this')(); - } catch (_0x36c4d5) { - 'object' == typeof window && (_0x2fbe1c = window); - } - _0x25e628.exports = _0x2fbe1c; -}, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, function(_0x4f4230, _0x181c20) { +}, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, function(_0x4f4230, _0x181c20) { var _0x4b3a38, _0x30dbdf, _0x40240d = _0x4f4230.exports = {}; function _0x508793() { @@ -578,291 +576,7 @@ var EJS = function(_0x574f5e) { }, _0x40240d.umask = function() { return 0x0; }; -}, function(_0x1a44a7, _0x4ac7e9, _0x593123) { - function _0x4b9021(_0x2123d8) { - if (_0x2123d8) return function(_0x1b1adb) { - for (var _0x4ac7e9 in _0x4b9021.prototype) _0x1b1adb[_0x4ac7e9] = _0x4b9021.prototype[_0x4ac7e9]; - return _0x1b1adb; - }(_0x2123d8); - } - _0x1a44a7.exports = _0x4b9021, _0x4b9021.prototype.on = _0x4b9021.prototype.addEventListener = function(_0x29301b, _0x2f1a0e) { - return this._callbacks = this._callbacks || {}, (this._callbacks['$' + _0x29301b] = this._callbacks['$' + _0x29301b] || []).push(_0x2f1a0e), this; - }, _0x4b9021.prototype.once = function(_0x564851, _0x1acab3) { - function _0x34ab1a() { - this.off(_0x564851, _0x34ab1a), _0x1acab3.apply(this, arguments); - } - return _0x34ab1a.fn = _0x1acab3, this.on(_0x564851, _0x34ab1a), this; - }, _0x4b9021.prototype.off = _0x4b9021.prototype.removeListener = _0x4b9021.prototype.removeAllListeners = _0x4b9021.prototype.removeEventListener = function(_0x2d346e, _0x1e1270) { - if (this._callbacks = this._callbacks || {}, 0x0 == arguments.length) return this._callbacks = {}, this; - var _0x593123, _0xcc89ce = this._callbacks['$' + _0x2d346e]; - if (!_0xcc89ce) return this; - if (0x1 == arguments.length) return delete this._callbacks['$' + _0x2d346e], this; - for (var _0x4a034c = 0x0; _0x4a034c < _0xcc89ce.length; _0x4a034c++) - if ((_0x593123 = _0xcc89ce[_0x4a034c]) === _0x1e1270 || _0x593123.fn === _0x1e1270) { - _0xcc89ce.splice(_0x4a034c, 0x1); - break; - } - return this; - }, _0x4b9021.prototype.emit = function(_0x11e87b) { - this._callbacks = this._callbacks || {}; - var _0x4ac7e9 = [].slice.call(arguments, 0x1), - _0x593123 = this._callbacks['$' + _0x11e87b]; - if (_0x593123) - for (var _0x5f39b5 = 0x0, _0x2c676b = (_0x593123 = _0x593123.slice(0x0)).length; _0x5f39b5 < _0x2c676b; ++_0x5f39b5) _0x593123[_0x5f39b5].apply(this, _0x4ac7e9); - return this; - }, _0x4b9021.prototype.listeners = function(_0x13f1ad) { - return this._callbacks = this._callbacks || {}, this._callbacks['$' + _0x13f1ad] || []; - }, _0x4b9021.prototype.hasListeners = function(_0x4d5e81) { - return !!this.listeners(_0x4d5e81).length; - }; -}, function(_0x17fcb0, _0x57a6d9, _0x11917a) { - var _0xb1d7ff, _0x102f83 = _0x11917a(0x17e), - _0x303be9 = _0x11917a(0x97), - _0x377dd5 = _0x11917a(0x180), - _0x3f4757 = _0x11917a(0x181), - _0x4e3990 = _0x11917a(0x182); - 'undefined' != typeof ArrayBuffer && (_0xb1d7ff = _0x11917a(0x183)); - var _0x365139 = 'undefined' != typeof navigator && /Android/i .test(navigator.userAgent), - _0x2576a1 = 'undefined' != typeof navigator && /PhantomJS/i .test(navigator.userAgent), - _0x1a05af = _0x365139 || _0x2576a1; - _0x57a6d9.protocol = 0x3; - var _0xd4e8bf = _0x57a6d9.packets = { - 'open': 0x0, - 'close': 0x1, - 'ping': 0x2, - 'pong': 0x3, - 'message': 0x4, - 'upgrade': 0x5, - 'noop': 0x6 - }, - _0x3fbab8 = _0x102f83(_0xd4e8bf), - _0x101fcb = { - 'type': 'error', - 'data': 'parser error' - }, - _0x471b7a = _0x11917a(0x184); - - function _0x110f9e(_0x44e139, _0x36abb3, _0x30c294) { - for (var _0x572a75 = new Array(_0x44e139.length), _0x479f6f = _0x3f4757(_0x44e139.length, _0x30c294), _0x5799ad = function(_0x156e03, _0x20b63e, _0x2d1c34) { - _0x36abb3(_0x20b63e, function(_0x523791, _0x116ebb) { - _0x572a75[_0x156e03] = _0x116ebb, _0x2d1c34(_0x523791, _0x572a75); - }); - }, _0xfc8ee6 = 0x0; _0xfc8ee6 < _0x44e139.length; _0xfc8ee6++) _0x5799ad(_0xfc8ee6, _0x44e139[_0xfc8ee6], _0x479f6f); - } - _0x57a6d9.encodePacket = function(_0x1142af, _0x5821bf, _0x659af4, _0x1b4b55) { - 'function' == typeof _0x5821bf && (_0x1b4b55 = _0x5821bf, _0x5821bf = !0x1), 'function' == typeof _0x659af4 && (_0x1b4b55 = _0x659af4, _0x659af4 = null); - var _0x60a259 = void 0x0 === _0x1142af.data ? void 0x0 : _0x1142af.data.buffer || _0x1142af.data; - if ('undefined' != typeof ArrayBuffer && _0x60a259 instanceof ArrayBuffer) return function(_0x49eba2, _0x19305a, _0xb2b571) { - if (!_0x19305a) return _0x57a6d9.encodeBase64Packet(_0x49eba2, _0xb2b571); - var _0x1b4b55 = _0x49eba2.data, - _0x217a22 = new Uint8Array(_0x1b4b55), - _0xbb433b = new Uint8Array(0x1 + _0x1b4b55.byteLength); - _0xbb433b[0x0] = _0xd4e8bf[_0x49eba2.type]; - for (var _0x45294d = 0x0; _0x45294d < _0x217a22.length; _0x45294d++) _0xbb433b[_0x45294d + 0x1] = _0x217a22[_0x45294d]; - return _0xb2b571(_0xbb433b.buffer); - }(_0x1142af, _0x5821bf, _0x1b4b55); - if (void 0x0 !== _0x471b7a && _0x60a259 instanceof _0x471b7a) return function(_0x5aef69, _0x127790, _0x36795e) { - if (!_0x127790) return _0x57a6d9.encodeBase64Packet(_0x5aef69, _0x36795e); - if (_0x1a05af) return function(_0x78a5e0, _0x2993f1, _0x49a61d) { - if (!_0x2993f1) return _0x57a6d9.encodeBase64Packet(_0x78a5e0, _0x49a61d); - var _0x1b4b55 = new FileReader(); - return _0x1b4b55.onload = function() { - _0x57a6d9.encodePacket({ - 'type': _0x78a5e0.type, - 'data': _0x1b4b55.result - }, _0x2993f1, true, _0x49a61d); - }, _0x1b4b55.readAsArrayBuffer(_0x78a5e0.data); - }(_0x5aef69, _0x127790, _0x36795e); - var _0x1b4b55 = new Uint8Array(0x1); - _0x1b4b55[0x0] = _0xd4e8bf[_0x5aef69.type]; - var _0x21d91b = new _0x471b7a([_0x1b4b55.buffer, _0x5aef69.data]); - return _0x36795e(_0x21d91b); - }(_0x1142af, _0x5821bf, _0x1b4b55); - if (_0x60a259 && _0x60a259.base64) return function(_0x231991, _0x18922e) { - var _0x659af4 = 'b' + _0x57a6d9.packets[_0x231991.type] + _0x231991.data.data; - return _0x18922e(_0x659af4); - }(_0x1142af, _0x1b4b55); - var _0x23ee8c = _0xd4e8bf[_0x1142af.type]; - return void 0x0 !== _0x1142af.data && (_0x23ee8c += _0x659af4 ? _0x4e3990.encode(String(_0x1142af.data), { - 'strict': !0x1 - }) : String(_0x1142af.data)), _0x1b4b55('' + _0x23ee8c); - }, _0x57a6d9.encodeBase64Packet = function(_0x3151db, _0x19c006) { - var _0x432941, _0x50869a = 'b' + _0x57a6d9.packets[_0x3151db.type]; - if (void 0x0 !== _0x471b7a && _0x3151db.data instanceof _0x471b7a) { - var _0x88eff0 = new FileReader(); - return _0x88eff0.onload = function() { - var _0x3151db = _0x88eff0.result.split(',')[0x1]; - _0x19c006(_0x50869a + _0x3151db); - }, _0x88eff0.readAsDataURL(_0x3151db.data); - } - try { - _0x432941 = String.fromCharCode.apply(null, new Uint8Array(_0x3151db.data)); - } catch (_0xc11f90) { - for (var _0x1ad34e = new Uint8Array(_0x3151db.data), _0x28c923 = new Array(_0x1ad34e.length), _0x31c9f7 = 0x0; _0x31c9f7 < _0x1ad34e.length; _0x31c9f7++) _0x28c923[_0x31c9f7] = _0x1ad34e[_0x31c9f7]; - _0x432941 = String.fromCharCode.apply(null, _0x28c923); - } - return _0x50869a += btoa(_0x432941), _0x19c006(_0x50869a); - }, _0x57a6d9.decodePacket = function(_0x1cb4f7, _0x404d11, _0x5c122a) { - if (void 0x0 === _0x1cb4f7) return _0x101fcb; - if ('string' == typeof _0x1cb4f7) { - if ('b' === _0x1cb4f7.charAt(0x0)) return _0x57a6d9.decodeBase64Packet(_0x1cb4f7.substr(0x1), _0x404d11); - if (_0x5c122a && !0x1 === (_0x1cb4f7 = function(_0x4e7d4f) { - try { - _0x4e7d4f = _0x4e3990.decode(_0x4e7d4f, { - 'strict': !0x1 - }); - } catch (_0x2d4a50) { - return !0x1; - } - return _0x4e7d4f; - }(_0x1cb4f7))) return _0x101fcb; - var _0xa94e1 = _0x1cb4f7.charAt(0x0); - return Number(_0xa94e1) == _0xa94e1 && _0x3fbab8[_0xa94e1] ? _0x1cb4f7.length > 0x1 ? { - 'type': _0x3fbab8[_0xa94e1], - 'data': _0x1cb4f7.substring(0x1) - } : { - 'type': _0x3fbab8[_0xa94e1] - } : _0x101fcb; - } - _0xa94e1 = new Uint8Array(_0x1cb4f7)[0x0]; - var _0x577088 = _0x377dd5(_0x1cb4f7, 0x1); - return _0x471b7a && 'blob' === _0x404d11 && (_0x577088 = new _0x471b7a([_0x577088])), { - 'type': _0x3fbab8[_0xa94e1], - 'data': _0x577088 - }; - }, _0x57a6d9.decodeBase64Packet = function(_0x5eac6f, _0x38a34c) { - var _0x11917a = _0x3fbab8[_0x5eac6f.charAt(0x0)]; - if (!_0xb1d7ff) return { - 'type': _0x11917a, - 'data': { - 'base64': true, - 'data': _0x5eac6f.substr(0x1) - } - }; - var _0x4b45f0 = _0xb1d7ff.decode(_0x5eac6f.substr(0x1)); - return 'blob' === _0x38a34c && _0x471b7a && (_0x4b45f0 = new _0x471b7a([_0x4b45f0])), { - 'type': _0x11917a, - 'data': _0x4b45f0 - }; - }, _0x57a6d9.encodePayload = function(_0x13561c, _0x2ef839, _0x13e7a2) { - 'function' == typeof _0x2ef839 && (_0x13e7a2 = _0x2ef839, _0x2ef839 = null); - var _0x885c27 = _0x303be9(_0x13561c); - if (_0x2ef839 && _0x885c27) return _0x471b7a && !_0x1a05af ? _0x57a6d9.encodePayloadAsBlob(_0x13561c, _0x13e7a2) : _0x57a6d9.encodePayloadAsArrayBuffer(_0x13561c, _0x13e7a2); - if (!_0x13561c.length) return _0x13e7a2('0:'); - _0x110f9e(_0x13561c, function(_0x45d8fb, _0x1a9422) { - _0x57a6d9.encodePacket(_0x45d8fb, !!_0x885c27 && _0x2ef839, !0x1, function(_0x4ca409) { - _0x1a9422(null, function(_0x329351) { - return _0x329351.length + ':' + _0x329351; - }(_0x4ca409)); - }); - }, function(_0x144bad, _0x20c93d) { - return _0x13e7a2(_0x20c93d.join('')); - }); - }, _0x57a6d9.decodePayload = function(_0x1ba2e3, _0x1923ee, _0x4b1529) { - if ('string' != typeof _0x1ba2e3) return _0x57a6d9.decodePayloadAsBinary(_0x1ba2e3, _0x1923ee, _0x4b1529); - var _0xa68d0e; - if ('function' == typeof _0x1923ee && (_0x4b1529 = _0x1923ee, _0x1923ee = null), '' === _0x1ba2e3) return _0x4b1529(_0x101fcb, 0x0, 0x1); - for (var _0x11df48, _0x34a89a, _0x2b42e5 = '', _0xd05e2 = 0x0, _0x23a5c5 = _0x1ba2e3.length; _0xd05e2 < _0x23a5c5; _0xd05e2++) { - var _0x5ed313 = _0x1ba2e3.charAt(_0xd05e2); - if (':' === _0x5ed313) { - if ('' === _0x2b42e5 || _0x2b42e5 != (_0x11df48 = Number(_0x2b42e5))) return _0x4b1529(_0x101fcb, 0x0, 0x1); - if (_0x2b42e5 != (_0x34a89a = _0x1ba2e3.substr(_0xd05e2 + 0x1, _0x11df48)).length) return _0x4b1529(_0x101fcb, 0x0, 0x1); - if (_0x34a89a.length) { - if (_0xa68d0e = _0x57a6d9.decodePacket(_0x34a89a, _0x1923ee, !0x1), _0x101fcb.type === _0xa68d0e.type && _0x101fcb.data === _0xa68d0e.data) return _0x4b1529(_0x101fcb, 0x0, 0x1); - if (!0x1 === _0x4b1529(_0xa68d0e, _0xd05e2 + _0x11df48, _0x23a5c5)) return; - } - _0xd05e2 += _0x11df48, _0x2b42e5 = ''; - } else _0x2b42e5 += _0x5ed313; - } - return '' !== _0x2b42e5 ? _0x4b1529(_0x101fcb, 0x0, 0x1) : void 0x0; - }, _0x57a6d9.encodePayloadAsArrayBuffer = function(_0x2c52b8, _0x55d1cd) { - if (!_0x2c52b8.length) return _0x55d1cd(new ArrayBuffer(0x0)); - _0x110f9e(_0x2c52b8, function(_0x38855b, _0x9369b5) { - _0x57a6d9.encodePacket(_0x38855b, true, true, function(_0x391506) { - return _0x9369b5(null, _0x391506); - }); - }, function(_0x39b4ce, _0x4a29ab) { - var _0x3067ce = _0x4a29ab.reduce(function(_0x29e4a9, _0x3d4915) { - var _0x55d1cd; - return _0x29e4a9 + (_0x55d1cd = 'string' == typeof _0x3d4915 ? _0x3d4915.length : _0x3d4915.byteLength).toString().length + _0x55d1cd + 0x2; - }, 0x0), - _0x3ca7a1 = new Uint8Array(_0x3067ce), - _0x5e2399 = 0x0; - return _0x4a29ab.forEach(function(_0x437d9b) { - var _0x4a29ab = 'string' == typeof _0x437d9b, - _0x55d1cd = _0x437d9b; - if (_0x4a29ab) { - for (var _0x383c62 = new Uint8Array(_0x437d9b.length), _0x45ccda = 0x0; _0x45ccda < _0x437d9b.length; _0x45ccda++) _0x383c62[_0x45ccda] = _0x437d9b.charCodeAt(_0x45ccda); - _0x55d1cd = _0x383c62.buffer; - } - _0x3ca7a1[_0x5e2399++] = _0x4a29ab ? 0x0 : 0x1; - var _0x18ea5e = _0x55d1cd.byteLength.toString(); - for (_0x45ccda = 0x0; _0x45ccda < _0x18ea5e.length; _0x45ccda++) _0x3ca7a1[_0x5e2399++] = parseInt(_0x18ea5e[_0x45ccda]); - _0x3ca7a1[_0x5e2399++] = 0xff; - for (_0x383c62 = new Uint8Array(_0x55d1cd), _0x45ccda = 0x0; _0x45ccda < _0x383c62.length; _0x45ccda++) _0x3ca7a1[_0x5e2399++] = _0x383c62[_0x45ccda]; - }), _0x55d1cd(_0x3ca7a1.buffer); - }); - }, _0x57a6d9.encodePayloadAsBlob = function(_0x2d1881, _0x1f5c21) { - _0x110f9e(_0x2d1881, function(_0x2e98a1, _0xd68984) { - _0x57a6d9.encodePacket(_0x2e98a1, true, true, function(_0x30901a) { - var _0x57a6d9 = new Uint8Array(0x1); - if (_0x57a6d9[0x0] = 0x1, 'string' == typeof _0x30901a) { - for (var _0x3553ea = new Uint8Array(_0x30901a.length), _0x5b0da7 = 0x0; _0x5b0da7 < _0x30901a.length; _0x5b0da7++) _0x3553ea[_0x5b0da7] = _0x30901a.charCodeAt(_0x5b0da7); - _0x30901a = _0x3553ea.buffer, _0x57a6d9[0x0] = 0x0; - } - var _0x51048b = (_0x30901a instanceof ArrayBuffer ? _0x30901a.byteLength : _0x30901a.size).toString(), - _0x39f7ee = new Uint8Array(_0x51048b.length + 0x1); - for (_0x5b0da7 = 0x0; _0x5b0da7 < _0x51048b.length; _0x5b0da7++) _0x39f7ee[_0x5b0da7] = parseInt(_0x51048b[_0x5b0da7]); - if (_0x39f7ee[_0x51048b.length] = 0xff, _0x471b7a) { - var _0x59ca80 = new _0x471b7a([_0x57a6d9.buffer, _0x39f7ee.buffer, _0x30901a]); - _0xd68984(null, _0x59ca80); - } - }); - }, function(_0x3dd244, _0x28a42d) { - return _0x1f5c21(new _0x471b7a(_0x28a42d)); - }); - }, _0x57a6d9.decodePayloadAsBinary = function(_0x1dfa58, _0x57e0fe, _0x4814f7) { - 'function' == typeof _0x57e0fe && (_0x4814f7 = _0x57e0fe, _0x57e0fe = null); - for (var _0x251442 = _0x1dfa58, _0x406d22 = []; _0x251442.byteLength > 0x0;) { - for (var _0x27bd3c = new Uint8Array(_0x251442), _0x1afdb0 = 0x0 === _0x27bd3c[0x0], _0x24891f = '', _0x3e0304 = 0x1; 0xff !== _0x27bd3c[_0x3e0304]; _0x3e0304++) { - if (_0x24891f.length > 0x136) return _0x4814f7(_0x101fcb, 0x0, 0x1); - _0x24891f += _0x27bd3c[_0x3e0304]; - } - _0x251442 = _0x377dd5(_0x251442, 0x2 + _0x24891f.length), _0x24891f = parseInt(_0x24891f); - var _0x2e8958 = _0x377dd5(_0x251442, 0x0, _0x24891f); - if (_0x1afdb0) try { - _0x2e8958 = String.fromCharCode.apply(null, new Uint8Array(_0x2e8958)); - } catch (_0x497c47) { - var _0x25fc6f = new Uint8Array(_0x2e8958); - _0x2e8958 = ''; - for (_0x3e0304 = 0x0; _0x3e0304 < _0x25fc6f.length; _0x3e0304++) _0x2e8958 += String.fromCharCode(_0x25fc6f[_0x3e0304]); - } - _0x406d22.push(_0x2e8958), _0x251442 = _0x377dd5(_0x251442, _0x24891f); - } - var _0x462829 = _0x406d22.length; - _0x406d22.forEach(function(_0x382392, _0x27b9c6) { - _0x4814f7(_0x57a6d9.decodePacket(_0x382392, _0x57e0fe, true), _0x27b9c6, _0x462829); - }); - }; -}, function(_0x4960ba, _0x134516, _0x3caa3d) { - var _0x1f6b2a = _0x3caa3d(0x175), - _0x44cbb8 = _0x3caa3d(0x69), - _0x3bf69e = _0x3caa3d(0x94), - _0x30559c = _0x3caa3d(0x4a)('socket.io-client'); - _0x4960ba.exports = _0x134516 = _0x21cbc3; - var _0x43bfb1 = _0x134516.managers = {}; - - function _0x21cbc3(_0x27e015, _0x5cb5ab) { - 'object' == typeof _0x27e015 && (_0x5cb5ab = _0x27e015, _0x27e015 = void 0x0), _0x5cb5ab = _0x5cb5ab || {}; - var _0x3caa3d, _0x421f2a = _0x1f6b2a(_0x27e015), - _0x5ee311 = _0x421f2a.source, - _0x2cc4d8 = _0x421f2a.id, - _0x534fc0 = _0x421f2a.path, - _0x1f4250 = _0x43bfb1[_0x2cc4d8] && _0x534fc0 in _0x43bfb1[_0x2cc4d8].nsps; - return _0x5cb5ab.forceNew || _0x5cb5ab['force new connection'] || !0x1 === _0x5cb5ab.multiplex || _0x1f4250 ? (_0x30559c('ignoring socket cache for %s', _0x5ee311), _0x3caa3d = _0x3bf69e(_0x5ee311, _0x5cb5ab)) : (_0x43bfb1[_0x2cc4d8] || (_0x30559c('new io instance for %s', _0x5ee311), _0x43bfb1[_0x2cc4d8] = _0x3bf69e(_0x5ee311, _0x5cb5ab)), _0x3caa3d = _0x43bfb1[_0x2cc4d8]), _0x421f2a.query && !_0x5cb5ab.query && (_0x5cb5ab.query = _0x421f2a.query), _0x3caa3d.socket(_0x421f2a.path, _0x5cb5ab); - } - _0x134516.protocol = _0x44cbb8.protocol, _0x134516.connect = _0x21cbc3, _0x134516.Manager = _0x3caa3d(0x94), _0x134516.Socket = _0x3caa3d(0x9a); -}, null, null, null, null, function(_0x2e240f, _0x5b82af, _0x39b24a) { +}, null, null, null, null, null, null, null, function(_0x2e240f, _0x5b82af, _0x39b24a) { var _0xafdfe, _0x133983; ! function(_0xcb4965, _0x3924c5, _0x2b6d6d) { 'use strict'; @@ -1278,372 +992,7 @@ var EJS = function(_0x574f5e) { return _0x2b9783.prototype = _0x28a590, _0x2b9783.version = _0x28a590.version, _0x2b9783; }) ? _0xafdfe.call(_0x5b82af, _0x39b24a, _0x5b82af, _0x2e240f) : _0xafdfe) || (_0x2e240f.exports = _0x133983); }(); -}, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, function(_0x5cc7da, _0xd81f9c, _0x5928dc) { - /*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - */ - !function(){return function t(r,e,n){function i(f,u){if(!e[f]){if(!r[f]){var s="function"==typeof require&&require;if(!u&&s)return s(f,!0);if(o)return o(f,!0);var h=new Error("Cannot find module '"+f+"'");throw h.code="MODULE_NOT_FOUND",h}var a=e[f]={exports:{}};r[f][0].call(a.exports,function(t){return i(r[f][1][t]||t)},a,a.exports,t,r,e,n)}return e[f].exports}for(var o="function"==typeof require&&require,f=0;f0?f-4:f;for(e=0;e>16&255,s[a++]=r>>8&255,s[a++]=255&r;2===u&&(r=i[t.charCodeAt(e)]<<2|i[t.charCodeAt(e+1)]>>4,s[a++]=255&r);1===u&&(r=i[t.charCodeAt(e)]<<10|i[t.charCodeAt(e+1)]<<4|i[t.charCodeAt(e+2)]>>2,s[a++]=r>>8&255,s[a++]=255&r);return s},e.fromByteArray=function(t){for(var r,e=t.length,i=e%3,o=[],f=0,u=e-i;fu?u:f+16383));1===i?(r=t[e-1],o.push(n[r>>2]+n[r<<4&63]+"==")):2===i&&(r=(t[e-2]<<8)+t[e-1],o.push(n[r>>10]+n[r>>4&63]+n[r<<2&63]+"="));return o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,s=f.length;u0)throw new Error("Invalid string. Length must be a multiple of 4");var e=t.indexOf("=");return-1===e&&(e=r),[e,e===r?0:4-e%4]}function a(t,r,e){for(var i,o,f=[],u=r;u>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return f.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],3:[function(t,r,e){(function(r){(function(){"use strict";var r=t("base64-js"),n=t("ieee754");e.Buffer=f,e.SlowBuffer=function(t){+t!=t&&(t=0);return f.alloc(+t)},e.INSPECT_MAX_BYTES=50;var i=2147483647;function o(t){if(t>i)throw new RangeError('The value "'+t+'" is invalid for option "size"');var r=new Uint8Array(t);return r.__proto__=f.prototype,r}function f(t,r,e){if("number"==typeof t){if("string"==typeof r)throw new TypeError('The "string" argument must be of type string. Received type number');return h(t)}return u(t,r,e)}function u(t,r,e){if("string"==typeof t)return function(t,r){"string"==typeof r&&""!==r||(r="utf8");if(!f.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var e=0|p(t,r),n=o(e),i=n.write(t,r);i!==e&&(n=n.slice(0,i));return n}(t,r);if(ArrayBuffer.isView(t))return a(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(z(t,ArrayBuffer)||t&&z(t.buffer,ArrayBuffer))return function(t,r,e){if(r<0||t.byteLength=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|t}function p(t,r){if(f.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||z(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var e=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===e)return 0;for(var i=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":return N(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return P(t).length;default:if(i)return n?-1:N(t).length;r=(""+r).toLowerCase(),i=!0}}function l(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}function y(t,r,e,n,i){if(0===t.length)return-1;if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),D(e=+e)&&(e=i?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(i)return-1;e=t.length-1}else if(e<0){if(!i)return-1;e=0}if("string"==typeof r&&(r=f.from(r,n)),f.isBuffer(r))return 0===r.length?-1:g(t,r,e,n,i);if("number"==typeof r)return r&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):g(t,[r],e,n,i);throw new TypeError("val must be string, number or Buffer")}function g(t,r,e,n,i){var o,f=1,u=t.length,s=r.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||r.length<2)return-1;f=2,u/=2,s/=2,e/=2}function h(t,r){return 1===f?t[r]:t.readUInt16BE(r*f)}if(i){var a=-1;for(o=e;ou&&(e=u-s),o=e;o>=0;o--){for(var c=!0,p=0;pi&&(n=i):n=i;var o=r.length;n>o/2&&(n=o/2);for(var f=0;f>8,i=e%256,o.push(i),o.push(n);return o}(r,t.length-e),t,e,n)}function A(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function B(t,r,e){e=Math.min(t.length,e);for(var n=[],i=r;i239?4:h>223?3:h>191?2:1;if(i+c<=e)switch(c){case 1:h<128&&(a=h);break;case 2:128==(192&(o=t[i+1]))&&(s=(31&h)<<6|63&o)>127&&(a=s);break;case 3:o=t[i+1],f=t[i+2],128==(192&o)&&128==(192&f)&&(s=(15&h)<<12|(63&o)<<6|63&f)>2047&&(s<55296||s>57343)&&(a=s);break;case 4:o=t[i+1],f=t[i+2],u=t[i+3],128==(192&o)&&128==(192&f)&&128==(192&u)&&(s=(15&h)<<18|(63&o)<<12|(63&f)<<6|63&u)>65535&&s<1114112&&(a=s)}null===a?(a=65533,c=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=c}return function(t){var r=t.length;if(r<=U)return String.fromCharCode.apply(String,t);var e="",n=0;for(;nthis.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if((e>>>=0)<=(r>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return I(this,r,e);case"utf8":case"utf-8":return B(this,r,e);case"ascii":return _(this,r,e);case"latin1":case"binary":return T(this,r,e);case"base64":return A(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}.apply(this,arguments)},f.prototype.toLocaleString=f.prototype.toString,f.prototype.equals=function(t){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===f.compare(this,t)},f.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),""},f.prototype.compare=function(t,r,e,n,i){if(z(t,Uint8Array)&&(t=f.from(t,t.offset,t.byteLength)),!f.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===r&&(r=0),void 0===e&&(e=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),r<0||e>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&r>=e)return 0;if(n>=i)return-1;if(r>=e)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),u=(e>>>=0)-(r>>>=0),s=Math.min(o,u),h=this.slice(n,i),a=t.slice(r,e),c=0;c>>=0,isFinite(e)?(e>>>=0,void 0===n&&(n="utf8")):(n=e,e=void 0)}var i=this.length-r;if((void 0===e||e>i)&&(e=i),t.length>0&&(e<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return w(this,t,r,e);case"utf8":case"utf-8":return d(this,t,r,e);case"ascii":return v(this,t,r,e);case"latin1":case"binary":return b(this,t,r,e);case"base64":return m(this,t,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,r,e);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var U=4096;function _(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;in)&&(e=n);for(var i="",o=r;oe)throw new RangeError("Trying to access beyond buffer length")}function L(t,r,e,n,i,o){if(!f.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||rt.length)throw new RangeError("Index out of range")}function R(t,r,e,n,i,o){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function x(t,r,e,i,o){return r=+r,e>>>=0,o||R(t,0,e,4),n.write(t,r,e,i,23,4),e+4}function M(t,r,e,i,o){return r=+r,e>>>=0,o||R(t,0,e,8),n.write(t,r,e,i,52,8),e+8}f.prototype.slice=function(t,r){var e=this.length;(t=~~t)<0?(t+=e)<0&&(t=0):t>e&&(t=e),(r=void 0===r?e:~~r)<0?(r+=e)<0&&(r=0):r>e&&(r=e),r>>=0,r>>>=0,e||C(t,r,this.length);for(var n=this[t],i=1,o=0;++o>>=0,r>>>=0,e||C(t,r,this.length);for(var n=this[t+--r],i=1;r>0&&(i*=256);)n+=this[t+--r]*i;return n},f.prototype.readUInt8=function(t,r){return t>>>=0,r||C(t,1,this.length),this[t]},f.prototype.readUInt16LE=function(t,r){return t>>>=0,r||C(t,2,this.length),this[t]|this[t+1]<<8},f.prototype.readUInt16BE=function(t,r){return t>>>=0,r||C(t,2,this.length),this[t]<<8|this[t+1]},f.prototype.readUInt32LE=function(t,r){return t>>>=0,r||C(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},f.prototype.readUInt32BE=function(t,r){return t>>>=0,r||C(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},f.prototype.readIntLE=function(t,r,e){t>>>=0,r>>>=0,e||C(t,r,this.length);for(var n=this[t],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*r)),n},f.prototype.readIntBE=function(t,r,e){t>>>=0,r>>>=0,e||C(t,r,this.length);for(var n=r,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*r)),o},f.prototype.readInt8=function(t,r){return t>>>=0,r||C(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},f.prototype.readInt16LE=function(t,r){t>>>=0,r||C(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},f.prototype.readInt16BE=function(t,r){t>>>=0,r||C(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},f.prototype.readInt32LE=function(t,r){return t>>>=0,r||C(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},f.prototype.readInt32BE=function(t,r){return t>>>=0,r||C(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},f.prototype.readFloatLE=function(t,r){return t>>>=0,r||C(t,4,this.length),n.read(this,t,!0,23,4)},f.prototype.readFloatBE=function(t,r){return t>>>=0,r||C(t,4,this.length),n.read(this,t,!1,23,4)},f.prototype.readDoubleLE=function(t,r){return t>>>=0,r||C(t,8,this.length),n.read(this,t,!0,52,8)},f.prototype.readDoubleBE=function(t,r){return t>>>=0,r||C(t,8,this.length),n.read(this,t,!1,52,8)},f.prototype.writeUIntLE=function(t,r,e,n){(t=+t,r>>>=0,e>>>=0,n)||L(this,t,r,e,Math.pow(2,8*e)-1,0);var i=1,o=0;for(this[r]=255&t;++o>>=0,e>>>=0,n)||L(this,t,r,e,Math.pow(2,8*e)-1,0);var i=e-1,o=1;for(this[r+i]=255&t;--i>=0&&(o*=256);)this[r+i]=t/o&255;return r+e},f.prototype.writeUInt8=function(t,r,e){return t=+t,r>>>=0,e||L(this,t,r,1,255,0),this[r]=255&t,r+1},f.prototype.writeUInt16LE=function(t,r,e){return t=+t,r>>>=0,e||L(this,t,r,2,65535,0),this[r]=255&t,this[r+1]=t>>>8,r+2},f.prototype.writeUInt16BE=function(t,r,e){return t=+t,r>>>=0,e||L(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=255&t,r+2},f.prototype.writeUInt32LE=function(t,r,e){return t=+t,r>>>=0,e||L(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t,r+4},f.prototype.writeUInt32BE=function(t,r,e){return t=+t,r>>>=0,e||L(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t,r+4},f.prototype.writeIntLE=function(t,r,e,n){if(t=+t,r>>>=0,!n){var i=Math.pow(2,8*e-1);L(this,t,r,e,i-1,-i)}var o=0,f=1,u=0;for(this[r]=255&t;++o>0)-u&255;return r+e},f.prototype.writeIntBE=function(t,r,e,n){if(t=+t,r>>>=0,!n){var i=Math.pow(2,8*e-1);L(this,t,r,e,i-1,-i)}var o=e-1,f=1,u=0;for(this[r+o]=255&t;--o>=0&&(f*=256);)t<0&&0===u&&0!==this[r+o+1]&&(u=1),this[r+o]=(t/f>>0)-u&255;return r+e},f.prototype.writeInt8=function(t,r,e){return t=+t,r>>>=0,e||L(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=255&t,r+1},f.prototype.writeInt16LE=function(t,r,e){return t=+t,r>>>=0,e||L(this,t,r,2,32767,-32768),this[r]=255&t,this[r+1]=t>>>8,r+2},f.prototype.writeInt16BE=function(t,r,e){return t=+t,r>>>=0,e||L(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=255&t,r+2},f.prototype.writeInt32LE=function(t,r,e){return t=+t,r>>>=0,e||L(this,t,r,4,2147483647,-2147483648),this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4},f.prototype.writeInt32BE=function(t,r,e){return t=+t,r>>>=0,e||L(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t,r+4},f.prototype.writeFloatLE=function(t,r,e){return x(this,t,r,!0,e)},f.prototype.writeFloatBE=function(t,r,e){return x(this,t,r,!1,e)},f.prototype.writeDoubleLE=function(t,r,e){return M(this,t,r,!0,e)},f.prototype.writeDoubleBE=function(t,r,e){return M(this,t,r,!1,e)},f.prototype.copy=function(t,r,e,n){if(!f.isBuffer(t))throw new TypeError("argument should be a Buffer");if(e||(e=0),n||0===n||(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-r=0;--o)t[o+r]=this[o+e];else Uint8Array.prototype.set.call(t,this.subarray(e,n),r);return i},f.prototype.fill=function(t,r,e,n){if("string"==typeof t){if("string"==typeof r?(n=r,r=0,e=this.length):"string"==typeof e&&(n=e,e=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!f.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){var i=t.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(t=i)}}else"number"==typeof t&&(t&=255);if(r<0||this.length>>=0,e=void 0===e?this.length:e>>>0,t||(t=0),"number"==typeof t)for(o=r;o55295&&e<57344){if(!i){if(e>56319){(r-=3)>-1&&o.push(239,191,189);continue}if(f+1===n){(r-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(r-=3)>-1&&o.push(239,191,189),i=e;continue}e=65536+(i-55296<<10|e-56320)}else i&&(r-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((r-=1)<0)break;o.push(e)}else if(e<2048){if((r-=2)<0)break;o.push(e>>6|192,63&e|128)}else if(e<65536){if((r-=3)<0)break;o.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return o}function P(t){return r.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(O,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function j(t,r,e,n){for(var i=0;i=r.length||i>=t.length);++i)r[i+e]=t[i];return i}function z(t,r){return t instanceof r||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===r.name}function D(t){return t!=t}}).call(this)}).call(this,t("buffer").Buffer)},{"base64-js":2,buffer:3,ieee754:4}],4:[function(t,r,e){e.read=function(t,r,e,n,i){var o,f,u=8*i-n-1,s=(1<>1,a=-7,c=e?i-1:0,p=e?-1:1,l=t[r+c];for(c+=p,o=l&(1<<-a)-1,l>>=-a,a+=u;a>0;o=256*o+t[r+c],c+=p,a-=8);for(f=o&(1<<-a)-1,o>>=-a,a+=n;a>0;f=256*f+t[r+c],c+=p,a-=8);if(0===o)o=1-h;else{if(o===s)return f?NaN:1/0*(l?-1:1);f+=Math.pow(2,n),o-=h}return(l?-1:1)*f*Math.pow(2,o-n)},e.write=function(t,r,e,n,i,o){var f,u,s,h=8*o-i-1,a=(1<>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,l=n?0:o-1,y=n?1:-1,g=r<0||0===r&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(u=isNaN(r)?1:0,f=a):(f=Math.floor(Math.log(r)/Math.LN2),r*(s=Math.pow(2,-f))<1&&(f--,s*=2),(r+=f+c>=1?p/s:p*Math.pow(2,1-c))*s>=2&&(f++,s/=2),f+c>=a?(u=0,f=a):f+c>=1?(u=(r*s-1)*Math.pow(2,i),f+=c):(u=r*Math.pow(2,c-1)*Math.pow(2,i),f=0));i>=8;t[e+l]=255&u,l+=y,u/=256,i-=8);for(f=f<0;t[e+l]=255&f,l+=y,f/=256,h-=8);t[e+l-y]|=128*g}},{}]},{},[1]); -}, function(_0x419a6c, _0x12e3ba, _0xde43cb) { - _0x419a6c.exports = _0xde43cb(0x4d); -}, function(_0x5ab42d, _0x57fa8d) { - _0x57fa8d.encode = function(_0x1cf897) { - var _0x57fa8d = ''; - for (var _0x1313ec in _0x1cf897) _0x1cf897.hasOwnProperty(_0x1313ec) && (_0x57fa8d.length && (_0x57fa8d += '&'), _0x57fa8d += encodeURIComponent(_0x1313ec) + '=' + encodeURIComponent(_0x1cf897[_0x1313ec])); - return _0x57fa8d; - }, _0x57fa8d.decode = function(_0x549421) { - for (var _0x57fa8d = {}, _0x5519be = _0x549421.split('&'), _0x52ea21 = 0x0, _0x4da549 = _0x5519be.length; _0x52ea21 < _0x4da549; _0x52ea21++) { - var _0x109035 = _0x5519be[_0x52ea21].split('='); - _0x57fa8d[decodeURIComponent(_0x109035[0x0])] = decodeURIComponent(_0x109035[0x1]); - } - return _0x57fa8d; - }; -}, function(_0x116932, _0x5135ae) { - _0x116932.exports = function(_0x3506c9, _0x409dbf) { - var _0x2b8213 = function() {}; - _0x2b8213.prototype = _0x409dbf.prototype, _0x3506c9.prototype = new _0x2b8213(), _0x3506c9.prototype.constructor = _0x3506c9; - }; -}, function(_0x2a3209, _0x1433a1, _0xc63c2a) { - (function(_0x5b1d96) { - function _0x24c86c() { - var _0x2a3209; - try { - _0x2a3209 = _0x1433a1.storage.debug; - } catch (_0x10d35f) {} - return !_0x2a3209 && void 0x0 !== _0x5b1d96 && 'env' in _0x5b1d96 && (_0x2a3209 = _0x5b1d96.env.DEBUG), _0x2a3209; - }(_0x1433a1 = _0x2a3209.exports = _0xc63c2a(0x185)).log = function() { - return 'object' == typeof console && console.log && Function.prototype.apply.call(console.log, console, arguments); - }, _0x1433a1.formatArgs = function(_0x59cd77) { - var _0xc63c2a = this.useColors; - if (_0x59cd77[0x0] = (_0xc63c2a ? '%c' : '') + this.namespace + (_0xc63c2a ? ' %c' : ' ') + _0x59cd77[0x0] + (_0xc63c2a ? '%c ' : ' ') + '+' + _0x1433a1.humanize(this.diff), !_0xc63c2a) return; - var _0x5b1d96 = 'color: ' + this.color; - _0x59cd77.splice(0x1, 0x0, _0x5b1d96, 'color: inherit'); - var _0x239418 = 0x0, - _0x2e6b73 = 0x0; - _0x59cd77[0x0].replace(/%[a-zA-Z%]/g, function(_0x304fe3) { - '%%' !== _0x304fe3 && (_0x239418++, '%c' === _0x304fe3 && (_0x2e6b73 = _0x239418)); - }), _0x59cd77.splice(_0x2e6b73, 0x0, _0x5b1d96); - }, _0x1433a1.save = function(_0x30e46f) { - try { - null == _0x30e46f ? _0x1433a1.storage.removeItem('debug') : _0x1433a1.storage.debug = _0x30e46f; - } catch (_0x4c1aa8) {} - }, _0x1433a1.load = _0x24c86c, _0x1433a1.useColors = function() { - if ('undefined' != typeof window && window.process && 'renderer' === window.process.type) return true; - if ('undefined' != typeof navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) return !0x1; - return 'undefined' != typeof document && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || 'undefined' != typeof window && window.console && (window.console.firebug || window.console.exception && window.console.table) || 'undefined' != typeof navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 0xa) >= 0x1f || 'undefined' != typeof navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); - }, _0x1433a1.storage = 'undefined' != typeof chrome && void 0x0 !== chrome.storage ? chrome.storage.local : function() { - try { - return window.localStorage; - } catch (_0x3e7267) {} - }(), _0x1433a1.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'], _0x1433a1.formatters.j = function(_0x42eda5) { - try { - return JSON.stringify(_0x42eda5); - } catch (_0x264669) { - return '[UnexpectedJSONParseError]: ' + _0x264669.message; - } - }, _0x1433a1.enable(_0x24c86c()); - }.call(this, _0xc63c2a(0x31))); -}, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, function(_0x35f344, _0x3ad3d7) { - var _0x72045c = 0x3e8, - _0xc57066 = 0x3c * _0x72045c, - _0x323d4b = 0x3c * _0xc57066, - _0x38920f = 0x18 * _0x323d4b, - _0x566b42 = 365.25 * _0x38920f; - - function _0x4800bf(_0x2cb263, _0x4c8e79, _0x532290) { - if (!(_0x2cb263 < _0x4c8e79)) return _0x2cb263 < 1.5 * _0x4c8e79 ? Math.floor(_0x2cb263 / _0x4c8e79) + ' ' + _0x532290 : Math.ceil(_0x2cb263 / _0x4c8e79) + ' ' + _0x532290 + 's'; - } - _0x35f344.exports = function(_0xbec06f, _0x53ea0e) { - _0x53ea0e = _0x53ea0e || {}; - var _0x493ae8, _0x53bf8f = typeof _0xbec06f; - if ('string' === _0x53bf8f && _0xbec06f.length > 0x0) return function(_0x270427) { - if ((_0x270427 = String(_0x270427)).length > 0x64) return; - var _0x53ea0e = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i .exec(_0x270427); - if (!_0x53ea0e) return; - var _0x57adda = parseFloat(_0x53ea0e[0x1]); - switch ((_0x53ea0e[0x2] || 'ms').toLowerCase()) { - case 'years': - case 'year': - case 'yrs': - case 'yr': - case 'y': - return _0x57adda * _0x566b42; - case 'days': - case 'day': - case 'd': - return _0x57adda * _0x38920f; - case 'hours': - case 'hour': - case 'hrs': - case 'hr': - case 'h': - return _0x57adda * _0x323d4b; - case 'minutes': - case 'minute': - case 'mins': - case 'min': - case 'm': - return _0x57adda * _0xc57066; - case 'seconds': - case 'second': - case 'secs': - case 'sec': - case 's': - return _0x57adda * _0x72045c; - case 'milliseconds': - case 'millisecond': - case 'msecs': - case 'msec': - case 'ms': - return _0x57adda; - default: - return; - } - }(_0xbec06f); - if ('number' === _0x53bf8f && !0x1 === isNaN(_0xbec06f)) return _0x53ea0e.long ? _0x4800bf(_0x493ae8 = _0xbec06f, _0x38920f, 'day') || _0x4800bf(_0x493ae8, _0x323d4b, 'hour') || _0x4800bf(_0x493ae8, _0xc57066, 'minute') || _0x4800bf(_0x493ae8, _0x72045c, 'second') || _0x493ae8 + ' ms' : function(_0x158258) { - if (_0x158258 >= _0x38920f) return Math.round(_0x158258 / _0x38920f) + 'd'; - if (_0x158258 >= _0x323d4b) return Math.round(_0x158258 / _0x323d4b) + 'h'; - if (_0x158258 >= _0xc57066) return Math.round(_0x158258 / _0xc57066) + 'm'; - if (_0x158258 >= _0x72045c) return Math.round(_0x158258 / _0x72045c) + 's'; - return _0x158258 + 'ms'; - }(_0xbec06f); - throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(_0xbec06f)); - }; -}, function(_0x2c4885, _0x725d2f, _0x21813f) { - var _0x18d304 = _0x21813f(0x177)('socket.io-parser'), - _0x220779 = _0x21813f(0x32), - _0x31f804 = _0x21813f(0x179), - _0x1b7bdd = _0x21813f(0x93); - - function _0x1a1e93() {} - _0x725d2f.protocol = 0x4, _0x725d2f.types = ['CONNECT', 'DISCONNECT', 'EVENT', 'ACK', 'ERROR', 'BINARY_EVENT', 'BINARY_ACK'], _0x725d2f.CONNECT = 0x0, _0x725d2f.DISCONNECT = 0x1, _0x725d2f.EVENT = 0x2, _0x725d2f.ACK = 0x3, _0x725d2f.ERROR = 0x4, _0x725d2f.BINARY_EVENT = 0x5, _0x725d2f.BINARY_ACK = 0x6, _0x725d2f.Encoder = _0x1a1e93, _0x725d2f.Decoder = _0x2f6c3c; - var _0x220ca7 = _0x725d2f.ERROR + '"encode error"'; - - function _0x2313c1(_0x1f6ed6) { - var _0x21813f = '' + _0x1f6ed6.type; - if (_0x725d2f.BINARY_EVENT !== _0x1f6ed6.type && _0x725d2f.BINARY_ACK !== _0x1f6ed6.type || (_0x21813f += _0x1f6ed6.attachments + '-'), _0x1f6ed6.nsp && '/' !== _0x1f6ed6.nsp && (_0x21813f += _0x1f6ed6.nsp + ','), null != _0x1f6ed6.id && (_0x21813f += _0x1f6ed6.id), null != _0x1f6ed6.data) { - var _0x186069 = function(_0x2ffd69) { - try { - return JSON.stringify(_0x2ffd69); - } catch (_0x6d5f6e) { - return !0x1; - } - }(_0x1f6ed6.data); - if (!0x1 === _0x186069) return _0x220ca7; - _0x21813f += _0x186069; - } - return _0x18d304('encoded %j as %s', _0x1f6ed6, _0x21813f), _0x21813f; - } - - function _0x2f6c3c() { - this.reconstructor = null; - } - - function _0x2963cc(_0x2f717e) { - this.reconPack = _0x2f717e, this.buffers = []; - } - - function _0x385ca8(_0x142a32) { - return { - 'type': _0x725d2f.ERROR, - 'data': 'parser error: ' + _0x142a32 - }; - } - _0x1a1e93.prototype.encode = function(_0x4372dd, _0x474c99) { - (_0x18d304('encoding packet %j', _0x4372dd), _0x725d2f.BINARY_EVENT === _0x4372dd.type || _0x725d2f.BINARY_ACK === _0x4372dd.type) ? function(_0x3dca2f, _0x54599a) { - _0x31f804.removeBlobs(_0x3dca2f, function(_0xe9a859) { - var _0x474c99 = _0x31f804.deconstructPacket(_0xe9a859), - _0x3b9ac4 = _0x2313c1(_0x474c99.packet), - _0x515f97 = _0x474c99.buffers; - _0x515f97.unshift(_0x3b9ac4), _0x54599a(_0x515f97); - }); - }(_0x4372dd, _0x474c99) : _0x474c99([_0x2313c1(_0x4372dd)]); - }, _0x220779(_0x2f6c3c.prototype), _0x2f6c3c.prototype.add = function(_0x4207af) { - var _0x21813f; - if ('string' == typeof _0x4207af) _0x21813f = function(_0x2d3f59) { - var _0x21813f = 0x0, - _0x55018d = { - 'type': Number(_0x2d3f59.charAt(0x0)) - }; - if (null == _0x725d2f.types[_0x55018d.type]) return _0x385ca8('unknown packet type ' + _0x55018d.type); - if (_0x725d2f.BINARY_EVENT === _0x55018d.type || _0x725d2f.BINARY_ACK === _0x55018d.type) { - for (var _0x4e40c0 = ''; - '-' !== _0x2d3f59.charAt(++_0x21813f) && (_0x4e40c0 += _0x2d3f59.charAt(_0x21813f), _0x21813f != _0x2d3f59.length);); - if (_0x4e40c0 != Number(_0x4e40c0) || '-' !== _0x2d3f59.charAt(_0x21813f)) throw new Error('Illegal attachments'); - _0x55018d.attachments = Number(_0x4e40c0); - } - if ('/' === _0x2d3f59.charAt(_0x21813f + 0x1)) - for (_0x55018d.nsp = ''; ++_0x21813f;) { - if (',' === (_0x1ef5d6 = _0x2d3f59.charAt(_0x21813f))) break; - if (_0x55018d.nsp += _0x1ef5d6, _0x21813f === _0x2d3f59.length) break; - } else _0x55018d.nsp = '/'; - var _0x335234 = _0x2d3f59.charAt(_0x21813f + 0x1); - if ('' !== _0x335234 && Number(_0x335234) == _0x335234) { - for (_0x55018d.id = ''; ++_0x21813f;) { - var _0x1ef5d6; - if (null == (_0x1ef5d6 = _0x2d3f59.charAt(_0x21813f)) || Number(_0x1ef5d6) != _0x1ef5d6) { - --_0x21813f; - break; - } - if (_0x55018d.id += _0x2d3f59.charAt(_0x21813f), _0x21813f === _0x2d3f59.length) break; - } - _0x55018d.id = Number(_0x55018d.id); - } - if (_0x2d3f59.charAt(++_0x21813f)) { - var _0x49a0f5 = function(_0x55df57) { - try { - return JSON.parse(_0x55df57); - } catch (_0x465994) { - return !0x1; - } - }(_0x2d3f59.substr(_0x21813f)); - if (!(!0x1 !== _0x49a0f5 && (_0x55018d.type === _0x725d2f.ERROR || Array.isArray(_0x49a0f5)))) return _0x385ca8('invalid payload'); - _0x55018d.data = _0x49a0f5; - } - return _0x18d304('decoded %s as %j', _0x2d3f59, _0x55018d), _0x55018d; - }(_0x4207af), _0x725d2f.BINARY_EVENT === _0x21813f.type || _0x725d2f.BINARY_ACK === _0x21813f.type ? (this.reconstructor = new _0x2963cc(_0x21813f), 0x0 === this.reconstructor.reconPack.attachments && this.emit('decoded', _0x21813f)) : this.emit('decoded', _0x21813f); - else { - if (!_0x1b7bdd(_0x4207af) && !_0x4207af.base64) throw new Error('Unknown type: ' + _0x4207af); - if (!this.reconstructor) throw new Error('got binary data when not reconstructing a packet'); - (_0x21813f = this.reconstructor.takeBinaryData(_0x4207af)) && (this.reconstructor = null, this.emit('decoded', _0x21813f)); - } - }, _0x2f6c3c.prototype.destroy = function() { - this.reconstructor && this.reconstructor.finishedReconstruction(); - }, _0x2963cc.prototype.takeBinaryData = function(_0x3fb1e6) { - if (this.buffers.push(_0x3fb1e6), this.buffers.length === this.reconPack.attachments) { - var _0x725d2f = _0x31f804.reconstructPacket(this.reconPack, this.buffers); - return this.finishedReconstruction(), _0x725d2f; - } - return null; - }, _0x2963cc.prototype.finishedReconstruction = function() { - this.reconPack = null, this.buffers = []; - }; -}, function(_0x39d475, _0x2fba83, _0x5f3ec5) { - var _0x1970ae = _0x5f3ec5(0x17c); - _0x39d475.exports = function(_0x2ec49f) { - var _0x2fba83 = _0x2ec49f.xdomain, - _0x5f3ec5 = _0x2ec49f.xscheme, - _0x4e3764 = _0x2ec49f.enablesXDR; - try { - if ('undefined' != typeof XMLHttpRequest && (!_0x2fba83 || _0x1970ae)) return new XMLHttpRequest(); - } catch (_0x30eed8) {} - try { - if ('undefined' != typeof XDomainRequest && !_0x5f3ec5 && _0x4e3764) return new XDomainRequest(); - } catch (_0x95e9b9) {} - if (!_0x2fba83) try { - return new self[(['Active'].concat('Object').join('X'))]('Microsoft.XMLHTTP'); - } catch (_0x3580de) {} - }; -}, function(_0x4ebbc6, _0x5b254e, _0x2a0057) { - var _0x1d963d = _0x2a0057(0x33), - _0x3b2976 = _0x2a0057(0x32); - - function _0xf1098e(_0xf9b6a3) { - this.path = _0xf9b6a3.path, this.hostname = _0xf9b6a3.hostname, this.port = _0xf9b6a3.port, this.secure = _0xf9b6a3.secure, this.query = _0xf9b6a3.query, this.timestampParam = _0xf9b6a3.timestampParam, this.timestampRequests = _0xf9b6a3.timestampRequests, this.readyState = '', this.agent = _0xf9b6a3.agent || !0x1, this.socket = _0xf9b6a3.socket, this.enablesXDR = _0xf9b6a3.enablesXDR, this.pfx = _0xf9b6a3.pfx, this.key = _0xf9b6a3.key, this.passphrase = _0xf9b6a3.passphrase, this.cert = _0xf9b6a3.cert, this.ca = _0xf9b6a3.ca, this.ciphers = _0xf9b6a3.ciphers, this.rejectUnauthorized = _0xf9b6a3.rejectUnauthorized, this.forceNode = _0xf9b6a3.forceNode, this.isReactNative = _0xf9b6a3.isReactNative, this.extraHeaders = _0xf9b6a3.extraHeaders, this.localAddress = _0xf9b6a3.localAddress; - } - _0x4ebbc6.exports = _0xf1098e, _0x3b2976(_0xf1098e.prototype), _0xf1098e.prototype.onError = function(_0x11268a, _0x2588cc) { - var _0x2a0057 = new Error(_0x11268a); - return _0x2a0057.type = 'TransportError', _0x2a0057.description = _0x2588cc, this.emit('error', _0x2a0057), this; - }, _0xf1098e.prototype.open = function() { - return 'closed' !== this.readyState && '' !== this.readyState || (this.readyState = 'opening', this.doOpen()), this; - }, _0xf1098e.prototype.close = function() { - return 'opening' !== this.readyState && 'open' !== this.readyState || (this.doClose(), this.onClose()), this; - }, _0xf1098e.prototype.send = function(_0x236dad) { - if ('open' !== this.readyState) throw new Error('Transport not open'); - this.write(_0x236dad); - }, _0xf1098e.prototype.onOpen = function() { - this.readyState = 'open', this.writable = true, this.emit('open'); - }, _0xf1098e.prototype.onData = function(_0x3cc869) { - var _0x5b254e = _0x1d963d.decodePacket(_0x3cc869, this.socket.binaryType); - this.onPacket(_0x5b254e); - }, _0xf1098e.prototype.onPacket = function(_0x6814c9) { - this.emit('packet', _0x6814c9); - }, _0xf1098e.prototype.onClose = function() { - this.readyState = 'closed', this.emit('close'); - }; -}, function(_0x3c2d7f, _0xde42f6, _0xe9214) { - (function(_0xd366e5) { - var _0x1fff1c, _0x1e3d28, _0x1b3f4a; - _0x1e3d28 = [], void 0x0 === (_0x1b3f4a = 'function' == typeof(_0x1fff1c = function() { - 'use strict'; - - function _0x37c5be(_0x5e536f, _0x567b6b, _0x491390) { - var _0x57044d = new XMLHttpRequest(); - _0x57044d.open('GET', _0x5e536f), _0x57044d.responseType = 'blob', _0x57044d.onload = function() { - _0x2b5ff0(_0x57044d.response, _0x567b6b, _0x491390); - }, _0x57044d.onerror = function() { - console.error('could not download file'); - }, _0x57044d.send(); - } - - function _0x5bc189(_0x1999e8) { - var _0x37c5be = new XMLHttpRequest(); - _0x37c5be.open('HEAD', _0x1999e8, !0x1); - try { - _0x37c5be.send(); - } catch (_0x25e840) {} - return 0xc8 <= _0x37c5be.status && 0x12b >= _0x37c5be.status; - } - - function _0x2834a3(_0x172cc9) { - try { - _0x172cc9.dispatchEvent(new MouseEvent('click')); - } catch (_0x299cf7) { - var _0x37c5be = document.createEvent('MouseEvents'); - _0x37c5be.initMouseEvent('click', true, true, window, 0x0, 0x0, 0x0, 0x50, 0x14, !0x1, !0x1, !0x1, !0x1, 0x0, null), _0x172cc9.dispatchEvent(_0x37c5be); - } - } - var _0xfa1868 = 'object' == typeof window && window.window === window ? window : 'object' == typeof self && self.self === self ? self : 'object' == typeof _0xd366e5 && _0xd366e5.global === _0xd366e5 ? _0xd366e5 : void 0x0, - _0x2b5ff0 = _0xfa1868.saveAs || ('object' != typeof window || window !== _0xfa1868 ? function() {} : 'download' in HTMLAnchorElement.prototype ? function(_0x2613b4, _0x3d781a, _0x2f7130) { - var _0x471704 = _0xfa1868.URL || _0xfa1868.webkitURL, - _0x1abc3a = document.createElement('a'); - _0x3d781a = _0x3d781a || _0x2613b4.name || 'download', _0x1abc3a.download = _0x3d781a, _0x1abc3a.rel = 'noopener', 'string' == typeof _0x2613b4 ? (_0x1abc3a.href = _0x2613b4, _0x1abc3a.origin === location.origin ? _0x2834a3(_0x1abc3a) : _0x5bc189(_0x1abc3a.href) ? _0x37c5be(_0x2613b4, _0x3d781a, _0x2f7130) : _0x2834a3(_0x1abc3a, _0x1abc3a.target = '_blank')) : (_0x1abc3a.href = _0x471704.createObjectURL(_0x2613b4), setTimeout(function() { - _0x471704.revokeObjectURL(_0x1abc3a.href); - }, 0x9c40), setTimeout(function() { - _0x2834a3(_0x1abc3a); - }, 0x0)); - } : 'msSaveOrOpenBlob' in navigator ? function(_0x4a7eab, _0x1faa7e, _0x215f9c) { - if (_0x1faa7e = _0x1faa7e || _0x4a7eab.name || 'download', 'string' != typeof _0x4a7eab) navigator.msSaveOrOpenBlob(function(_0x5a7841, _0x4208a6) { - return void 0x0 === _0x4208a6 ? _0x4208a6 = { - 'autoBom': !0x1 - } : 'object' != typeof _0x4208a6 && (console.warn('Deprecated: Expected third argument to be a object'), _0x4208a6 = { - 'autoBom': !_0x4208a6 - }), _0x4208a6.autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i .test(_0x5a7841.type) ? new Blob(['\ufeff', _0x5a7841], { - 'type': _0x5a7841.type - }) : _0x5a7841; - }(_0x4a7eab, _0x215f9c), _0x1faa7e); - else if (_0x5bc189(_0x4a7eab)) _0x37c5be(_0x4a7eab, _0x1faa7e, _0x215f9c); - else { - var _0x8cf946 = document.createElement('a'); - _0x8cf946.href = _0x4a7eab, _0x8cf946.target = '_blank', setTimeout(function() { - _0x2834a3(_0x8cf946); - }); - } - } : function(_0x42e90d, _0x40b0dc, _0x4aae28, _0x5295d0) { - if ((_0x5295d0 = _0x5295d0 || open('', '_blank')) && (_0x5295d0.document.title = _0x5295d0.document.body.innerText = 'downloading...'), 'string' == typeof _0x42e90d) return _0x37c5be(_0x42e90d, _0x40b0dc, _0x4aae28); - var _0x3eae7e = 'application/octet-stream' === _0x42e90d.type, - _0x39f873 = /constructor/i .test(_0xfa1868.HTMLElement) || _0xfa1868.safari, - _0x2728f0 = /CriOS\/[\d]+/ .test(navigator.userAgent); - if ((_0x2728f0 || _0x3eae7e && _0x39f873) && 'object' == typeof FileReader) { - var _0x25c586 = new FileReader(); - _0x25c586.onloadend = function() { - var _0x42e90d = _0x25c586.result; - _0x42e90d = _0x2728f0 ? _0x42e90d : _0x42e90d.replace(/^data:[^;]*;/, 'data:attachment/file;'), _0x5295d0 ? _0x5295d0.location.href = _0x42e90d : location = _0x42e90d, _0x5295d0 = null; - }, _0x25c586.readAsDataURL(_0x42e90d); - } else { - var _0x3bd26f = _0xfa1868.URL || _0xfa1868.webkitURL, - _0x1f6967 = _0x3bd26f.createObjectURL(_0x42e90d); - _0x5295d0 ? _0x5295d0.location = _0x1f6967 : location.href = _0x1f6967, _0x5295d0 = null, setTimeout(function() { - _0x3bd26f.revokeObjectURL(_0x1f6967); - }, 0x9c40); - } - }); - _0xfa1868.saveAs = _0x2b5ff0.saveAs = _0x2b5ff0, _0x3c2d7f.exports = _0x2b5ff0; - }) ? _0x1fff1c.apply(_0xde42f6, _0x1e3d28) : _0x1fff1c) || (_0x3c2d7f.exports = _0x1b3f4a); - }.call(this, _0xe9214(0x1f))); -}, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, function(_0x5e1357, _0x334b04) { +}, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, function(_0x5e1357, _0x334b04) { _0x5e1357.exports = function(_0x1bfcef) { return _0x1bfcef.webpackPolyfill || (_0x1bfcef.deprecate = function() {}, _0x1bfcef.paths = [], _0x1bfcef.children || (_0x1bfcef.children = []), Object.defineProperty(_0x1bfcef, 'loaded', { 'enumerable': true, @@ -1661,455 +1010,7 @@ var EJS = function(_0x574f5e) { (function(_0x5be4df) { _0xac5f55.exports = _0x5be4df; }.call(this, {})); -}, function(_0x4ec5a7, _0x33ecee) { - var _0x19ca29 = /^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/, - _0x1a949e = ['source', 'protocol', 'authority', 'userInfo', 'user', 'password', 'host', 'port', 'relative', 'path', 'directory', 'file', 'query', 'anchor']; - _0x4ec5a7.exports = function(_0x4856e6) { - var _0x33ecee = _0x4856e6, - _0x38f530 = _0x4856e6.indexOf('['), - _0x355bbb = _0x4856e6.indexOf(']'); - 0x1 != _0x38f530 && -0x1 != _0x355bbb && (_0x4856e6 = _0x4856e6.substring(0x0, _0x38f530) + _0x4856e6.substring(_0x38f530, _0x355bbb).replace(/:/g, ';') + _0x4856e6.substring(_0x355bbb, _0x4856e6.length)); - for (var _0x29b9ed = _0x19ca29.exec(_0x4856e6 || ''), _0x9b13be = {}, _0x53543f = 0xe; _0x53543f--;) _0x9b13be[_0x1a949e[_0x53543f]] = _0x29b9ed[_0x53543f] || ''; - return -0x1 != _0x38f530 && -0x1 != _0x355bbb && (_0x9b13be.source = _0x33ecee, _0x9b13be.host = _0x9b13be.host.substring(0x1, _0x9b13be.host.length - 0x1).replace(/;/g, ':'), _0x9b13be.authority = _0x9b13be.authority.replace('[', '').replace(']', '').replace(/;/g, ':'), _0x9b13be.ipv6uri = true), _0x9b13be; - }; -}, null, function(_0x2c2eeb, _0x56a6e0, _0xc97944) { - (function(_0x40d6b1) { - _0x2c2eeb.exports = function(_0x14674e) { - return _0xc97944 && _0x40d6b1.isBuffer(_0x14674e) || _0x1de14d && (_0x14674e instanceof ArrayBuffer || _0x2019de(_0x14674e)); - }; - var _0xc97944 = 'function' == typeof _0x40d6b1 && 'function' == typeof _0x40d6b1.isBuffer, - _0x1de14d = 'function' == typeof ArrayBuffer, - _0x2019de = function(_0x1dd50b) { - return 'function' == typeof ArrayBuffer.isView ? ArrayBuffer.isView(_0x1dd50b) : _0x1dd50b.buffer instanceof ArrayBuffer; - }; - }.call(this, _0xc97944(0x49).Buffer)); -}, function(_0x567f36, _0x27b732, _0x20e984) { - var _0xb80e1d = _0x20e984(0x17a), - _0x1b1e2c = _0x20e984(0x9a), - _0x1c5609 = _0x20e984(0x32), - _0x3380b3 = _0x20e984(0x69), - _0x32f5b6 = _0x20e984(0x9b), - _0x3c17e8 = _0x20e984(0x9c), - _0x58142b = _0x20e984(0x4a)('socket.io-client:manager'), - _0x4d56eb = _0x20e984(0x99), - _0xe3c717 = _0x20e984(0x18a), - _0xcb2b9b = Object.prototype.hasOwnProperty; - - function _0x2a2bdc(_0x524c38, _0x42f75e) { - if (!(this instanceof _0x2a2bdc)) return new _0x2a2bdc(_0x524c38, _0x42f75e); - _0x524c38 && 'object' == typeof _0x524c38 && (_0x42f75e = _0x524c38, _0x524c38 = void 0x0), (_0x42f75e = _0x42f75e || {}).path = _0x42f75e.path || '/socket.io', this.nsps = {}, this.subs = [], this.opts = _0x42f75e, this.reconnection(!0x1 !== _0x42f75e.reconnection), this.reconnectionAttempts(_0x42f75e.reconnectionAttempts || 0x1 / 0x0), this.reconnectionDelay(_0x42f75e.reconnectionDelay || 0x3e8), this.reconnectionDelayMax(_0x42f75e.reconnectionDelayMax || 0x1388), this.randomizationFactor(_0x42f75e.randomizationFactor || 0.5), this.backoff = new _0xe3c717({ - 'min': this.reconnectionDelay(), - 'max': this.reconnectionDelayMax(), - 'jitter': this.randomizationFactor() - }), this.timeout(null == _0x42f75e.timeout ? 0x4e20 : _0x42f75e.timeout), this.readyState = 'closed', this.uri = _0x524c38, this.connecting = [], this.lastPing = null, this.encoding = !0x1, this.packetBuffer = []; - var _0x20e984 = _0x42f75e.parser || _0x3380b3; - this.encoder = new _0x20e984[('Encoder')](), this.decoder = new _0x20e984.Decoder(), this.autoConnect = !0x1 !== _0x42f75e.autoConnect, this.autoConnect && this.open(); - } - _0x567f36.exports = _0x2a2bdc, _0x2a2bdc.prototype.emitAll = function() { - for (var _0x567f36 in this.emit.apply(this, arguments), this.nsps) _0xcb2b9b.call(this.nsps, _0x567f36) && this.nsps[_0x567f36].emit.apply(this.nsps[_0x567f36], arguments); - }, _0x2a2bdc.prototype.updateSocketIds = function() { - for (var _0x567f36 in this.nsps) _0xcb2b9b.call(this.nsps, _0x567f36) && (this.nsps[_0x567f36].id = this.generateId(_0x567f36)); - }, _0x2a2bdc.prototype.generateId = function(_0x4085a2) { - return ('/' === _0x4085a2 ? '' : _0x4085a2 + '#') + this.engine.id; - }, _0x1c5609(_0x2a2bdc.prototype), _0x2a2bdc.prototype.reconnection = function(_0x2800dc) { - return arguments.length ? (this._reconnection = !!_0x2800dc, this) : this._reconnection; - }, _0x2a2bdc.prototype.reconnectionAttempts = function(_0x2a8b3d) { - return arguments.length ? (this._reconnectionAttempts = _0x2a8b3d, this) : this._reconnectionAttempts; - }, _0x2a2bdc.prototype.reconnectionDelay = function(_0x4c2023) { - return arguments.length ? (this._reconnectionDelay = _0x4c2023, this.backoff && this.backoff.setMin(_0x4c2023), this) : this._reconnectionDelay; - }, _0x2a2bdc.prototype.randomizationFactor = function(_0x5ee6a7) { - return arguments.length ? (this._randomizationFactor = _0x5ee6a7, this.backoff && this.backoff.setJitter(_0x5ee6a7), this) : this._randomizationFactor; - }, _0x2a2bdc.prototype.reconnectionDelayMax = function(_0x33c4cb) { - return arguments.length ? (this._reconnectionDelayMax = _0x33c4cb, this.backoff && this.backoff.setMax(_0x33c4cb), this) : this._reconnectionDelayMax; - }, _0x2a2bdc.prototype.timeout = function(_0x5a7c5d) { - return arguments.length ? (this._timeout = _0x5a7c5d, this) : this._timeout; - }, _0x2a2bdc.prototype.maybeReconnectOnOpen = function() { - !this.reconnecting && this._reconnection && 0x0 === this.backoff.attempts && this.reconnect(); - }, _0x2a2bdc.prototype.open = _0x2a2bdc.prototype.connect = function(_0x2ab01b, _0xa74075) { - if (_0x58142b('readyState %s', this.readyState), ~this.readyState.indexOf('open')) return this; - _0x58142b('opening %s', this.uri), this.engine = _0xb80e1d(this.uri, this.opts); - var _0x20e984 = this.engine, - _0x328b67 = this; - this.readyState = 'opening', this.skipReconnect = !0x1; - var _0x84348b = _0x32f5b6(_0x20e984, 'open', function() { - _0x328b67.onopen(), _0x2ab01b && _0x2ab01b(); - }), - _0x5a5a57 = _0x32f5b6(_0x20e984, 'error', function(_0x1739ea) { - if (_0x58142b('connect_error'), _0x328b67.cleanup(), _0x328b67.readyState = 'closed', _0x328b67.emitAll('connect_error', _0x1739ea), _0x2ab01b) { - var _0x20e984 = new Error('Connection error'); - _0x20e984.data = _0x1739ea, _0x2ab01b(_0x20e984); - } else _0x328b67.maybeReconnectOnOpen(); - }); - if (!0x1 !== this._timeout) { - var _0x11a5a2 = this._timeout; - _0x58142b('connect attempt will timeout after %d', _0x11a5a2); - var _0x3a9e8a = setTimeout(function() { - _0x58142b('connect attempt timed out after %d', _0x11a5a2), _0x84348b.destroy(), _0x20e984.close(), _0x20e984.emit('error', 'timeout'), _0x328b67.emitAll('connect_timeout', _0x11a5a2); - }, _0x11a5a2); - this.subs.push({ - 'destroy': function() { - clearTimeout(_0x3a9e8a); - } - }); - } - return this.subs.push(_0x84348b), this.subs.push(_0x5a5a57), this; - }, _0x2a2bdc.prototype.onopen = function() { - _0x58142b('open'), this.cleanup(), this.readyState = 'open', this.emit('open'); - var _0x567f36 = this.engine; - this.subs.push(_0x32f5b6(_0x567f36, 'data', _0x3c17e8(this, 'ondata'))), this.subs.push(_0x32f5b6(_0x567f36, 'ping', _0x3c17e8(this, 'onping'))), this.subs.push(_0x32f5b6(_0x567f36, 'pong', _0x3c17e8(this, 'onpong'))), this.subs.push(_0x32f5b6(_0x567f36, 'error', _0x3c17e8(this, 'onerror'))), this.subs.push(_0x32f5b6(_0x567f36, 'close', _0x3c17e8(this, 'onclose'))), this.subs.push(_0x32f5b6(this.decoder, 'decoded', _0x3c17e8(this, 'ondecoded'))); - }, _0x2a2bdc.prototype.onping = function() { - this.lastPing = new Date(), this.emitAll('ping'); - }, _0x2a2bdc.prototype.onpong = function() { - this.emitAll('pong', new Date() - this.lastPing); - }, _0x2a2bdc.prototype.ondata = function(_0x5be075) { - this.decoder.add(_0x5be075); - }, _0x2a2bdc.prototype.ondecoded = function(_0xa0af25) { - this.emit('packet', _0xa0af25); - }, _0x2a2bdc.prototype.onerror = function(_0x3a6f82) { - _0x58142b('error', _0x3a6f82), this.emitAll('error', _0x3a6f82); - }, _0x2a2bdc.prototype.socket = function(_0x3a991a, _0x1605c1) { - var _0x20e984 = this.nsps[_0x3a991a]; - if (!_0x20e984) { - _0x20e984 = new _0x1b1e2c(this, _0x3a991a, _0x1605c1), this.nsps[_0x3a991a] = _0x20e984; - var _0x48b44a = this; - _0x20e984.on('connecting', _0x2e85fd), _0x20e984.on('connect', function() { - _0x20e984.id = _0x48b44a.generateId(_0x3a991a); - }), this.autoConnect && _0x2e85fd(); - } - - function _0x2e85fd() { - ~_0x4d56eb(_0x48b44a.connecting, _0x20e984) || _0x48b44a.connecting.push(_0x20e984); - } - return _0x20e984; - }, _0x2a2bdc.prototype.destroy = function(_0x64794) { - var _0x27b732 = _0x4d56eb(this.connecting, _0x64794); - ~_0x27b732 && this.connecting.splice(_0x27b732, 0x1), this.connecting.length || this.close(); - }, _0x2a2bdc.prototype.packet = function(_0x499681) { - _0x58142b('writing packet %j', _0x499681); - var _0x27b732 = this; - _0x499681.query && 0x0 === _0x499681.type && (_0x499681.nsp += '?' + _0x499681.query), _0x27b732.encoding ? _0x27b732.packetBuffer.push(_0x499681) : (_0x27b732.encoding = true, this.encoder.encode(_0x499681, function(_0x3a7336) { - for (var _0x3540d7 = 0x0; _0x3540d7 < _0x3a7336.length; _0x3540d7++) _0x27b732.engine.write(_0x3a7336[_0x3540d7], _0x499681.options); - _0x27b732.encoding = !0x1, _0x27b732.processPacketQueue(); - })); - }, _0x2a2bdc.prototype.processPacketQueue = function() { - if (this.packetBuffer.length > 0x0 && !this.encoding) { - var _0x567f36 = this.packetBuffer.shift(); - this.packet(_0x567f36); - } - }, _0x2a2bdc.prototype.cleanup = function() { - _0x58142b('cleanup'); - for (var _0x567f36 = this.subs.length, _0x27b732 = 0x0; _0x27b732 < _0x567f36; _0x27b732++) { - this.subs.shift().destroy(); - } - this.packetBuffer = [], this.encoding = !0x1, this.lastPing = null, this.decoder.destroy(); - }, _0x2a2bdc.prototype.close = _0x2a2bdc.prototype.disconnect = function() { - _0x58142b('disconnect'), this.skipReconnect = true, this.reconnecting = !0x1, 'opening' === this.readyState && this.cleanup(), this.backoff.reset(), this.readyState = 'closed', this.engine && this.engine.close(); - }, _0x2a2bdc.prototype.onclose = function(_0x3c8adf) { - _0x58142b('onclose'), this.cleanup(), this.backoff.reset(), this.readyState = 'closed', this.emit('close', _0x3c8adf), this._reconnection && !this.skipReconnect && this.reconnect(); - }, _0x2a2bdc.prototype.reconnect = function() { - if (this.reconnecting || this.skipReconnect) return this; - var _0x567f36 = this; - if (this.backoff.attempts >= this._reconnectionAttempts) _0x58142b('reconnect failed'), this.backoff.reset(), this.emitAll('reconnect_failed'), this.reconnecting = !0x1; - else { - var _0x27b732 = this.backoff.duration(); - _0x58142b('will wait %dms before reconnect attempt', _0x27b732), this.reconnecting = true; - var _0x20e984 = setTimeout(function() { - _0x567f36.skipReconnect || (_0x58142b('attempting reconnect'), _0x567f36.emitAll('reconnect_attempt', _0x567f36.backoff.attempts), _0x567f36.emitAll('reconnecting', _0x567f36.backoff.attempts), _0x567f36.skipReconnect || _0x567f36.open(function(_0x4a2bc7) { - _0x4a2bc7 ? (_0x58142b('reconnect attempt error'), _0x567f36.reconnecting = !0x1, _0x567f36.reconnect(), _0x567f36.emitAll('reconnect_error', _0x4a2bc7.data)) : (_0x58142b('reconnect success'), _0x567f36.onreconnect()); - })); - }, _0x27b732); - this.subs.push({ - 'destroy': function() { - clearTimeout(_0x20e984); - } - }); - } - }, _0x2a2bdc.prototype.onreconnect = function() { - var _0x567f36 = this.backoff.attempts; - this.reconnecting = !0x1, this.backoff.reset(), this.updateSocketIds(), this.emitAll('reconnect', _0x567f36); - }; -}, function(_0x34c89e, _0x1cf572, _0x3c5cf2) { - var _0x2e68e3 = _0x3c5cf2(0x6a), - _0x1d6ad9 = _0x3c5cf2(0x17d), - _0x10aef4 = _0x3c5cf2(0x186), - _0x2674ce = _0x3c5cf2(0x187); - _0x1cf572.polling = function(_0x3b8d56) { - var _0x1cf572 = !0x1, - _0x3c5cf2 = !0x1, - _0x1315b3 = !0x1 !== _0x3b8d56.jsonp; - if ('undefined' != typeof location) { - var _0x4c7618 = 'https:' === location.protocol, - _0x322bce = location.port; - _0x322bce || (_0x322bce = _0x4c7618 ? 0x1bb : 0x50), _0x1cf572 = _0x3b8d56.hostname !== location.hostname || _0x322bce !== _0x3b8d56.port, _0x3c5cf2 = _0x3b8d56.secure !== _0x4c7618; - } - if (_0x3b8d56.xdomain = _0x1cf572, _0x3b8d56.xscheme = _0x3c5cf2, 'open' in new _0x2e68e3(_0x3b8d56) && !_0x3b8d56.forceJSONP) return new _0x1d6ad9(_0x3b8d56); - if (!_0x1315b3) throw new Error('JSONP disabled'); - return new _0x10aef4(_0x3b8d56); - }, _0x1cf572.websocket = _0x2674ce; -}, function(_0x490b09, _0x42405d, _0x5b2bc3) { - var _0x3759a8 = _0x5b2bc3(0x6b), - _0x1937bf = _0x5b2bc3(0x4b), - _0x2e6854 = _0x5b2bc3(0x33), - _0x8749f4 = _0x5b2bc3(0x4c), - _0xee4850 = _0x5b2bc3(0x98), - _0x36e392 = _0x5b2bc3(0x4d)('engine.io-client:polling'); - _0x490b09.exports = _0x2f3628; - var _0x1c9df1 = null != new(_0x5b2bc3(0x6a))({ - 'xdomain': !0x1 - }).responseType; - - function _0x2f3628(_0x117864) { - var _0x42405d = _0x117864 && _0x117864.forceBase64; - _0x1c9df1 && !_0x42405d || (this.supportsBinary = !0x1), _0x3759a8.call(this, _0x117864); - } - _0x8749f4(_0x2f3628, _0x3759a8), _0x2f3628.prototype.name = 'polling', _0x2f3628.prototype.doOpen = function() { - this.poll(); - }, _0x2f3628.prototype.pause = function(_0x818e1c) { - var _0x42405d = this; - - function _0x2d73c4() { - _0x36e392('paused'), _0x42405d.readyState = 'paused', _0x818e1c(); - } - if (this.readyState = 'pausing', this.polling || !this.writable) { - var _0x4affdc = 0x0; - this.polling && (_0x36e392('we are currently polling - waiting to pause'), _0x4affdc++, this.once('pollComplete', function() { - _0x36e392('pre-pause polling complete'), --_0x4affdc || _0x2d73c4(); - })), this.writable || (_0x36e392('we are currently writing - waiting to pause'), _0x4affdc++, this.once('drain', function() { - _0x36e392('pre-pause writing complete'), --_0x4affdc || _0x2d73c4(); - })); - } else _0x2d73c4(); - }, _0x2f3628.prototype.poll = function() { - _0x36e392('polling'), this.polling = true, this.doPoll(), this.emit('poll'); - }, _0x2f3628.prototype.onData = function(_0xd2e44e) { - var _0x42405d = this; - _0x36e392('polling got data %s', _0xd2e44e); - _0x2e6854.decodePayload(_0xd2e44e, this.socket.binaryType, function(_0x51173a, _0x321c9d, _0x3add4c) { - if ('opening' === _0x42405d.readyState && _0x42405d.onOpen(), 'close' === _0x51173a.type) return _0x42405d.onClose(), !0x1; - _0x42405d.onPacket(_0x51173a); - }), 'closed' !== this.readyState && (this.polling = !0x1, this.emit('pollComplete'), 'open' === this.readyState ? this.poll() : _0x36e392('ignoring poll - transport state "%s"', this.readyState)); - }, _0x2f3628.prototype.doClose = function() { - var _0x490b09 = this; - - function _0x2e96b3() { - _0x36e392('writing close packet'), _0x490b09.write([{ - 'type': 'close' - }]); - } - 'open' === this.readyState ? (_0x36e392('transport open - closing'), _0x2e96b3()) : (_0x36e392('transport not open - deferring close'), this.once('open', _0x2e96b3)); - }, _0x2f3628.prototype.write = function(_0x383447) { - var _0x42405d = this; - this.writable = !0x1; - var _0x5b2bc3 = function() { - _0x42405d.writable = true, _0x42405d.emit('drain'); - }; - _0x2e6854.encodePayload(_0x383447, this.supportsBinary, function(_0x47aff0) { - _0x42405d.doWrite(_0x47aff0, _0x5b2bc3); - }); - }, _0x2f3628.prototype.uri = function() { - var _0x490b09 = this.query || {}, - _0x42405d = this.secure ? 'https' : 'http', - _0x5b2bc3 = ''; - return !0x1 !== this.timestampRequests && (_0x490b09[this.timestampParam] = _0xee4850()), this.supportsBinary || _0x490b09.sid || (_0x490b09.b64 = 0x1), _0x490b09 = _0x1937bf.encode(_0x490b09), this.port && ('https' === _0x42405d && 0x1bb !== Number(this.port) || 'http' === _0x42405d && 0x50 !== Number(this.port)) && (_0x5b2bc3 = ':' + this.port), _0x490b09.length && (_0x490b09 = '?' + _0x490b09), _0x42405d + '://' + (-0x1 !== this.hostname.indexOf(':') ? '[' + this.hostname + ']' : this.hostname) + _0x5b2bc3 + this.path + _0x490b09; - }; -}, function(_0x4ab1ca, _0x27a37c, _0x25b44a) { - (function(_0x4420c0) { - var _0xdabc15 = Object.prototype.toString, - _0x45ae25 = 'function' == typeof Blob || 'undefined' != typeof Blob && '[object BlobConstructor]' === _0xdabc15.call(Blob), - _0x1f95e5 = 'function' == typeof File || 'undefined' != typeof File && '[object FileConstructor]' === _0xdabc15.call(File); - _0x4ab1ca.exports = function _0x4ab1ca(_0x14b4f9) { - if (!_0x14b4f9 || 'object' != typeof _0x14b4f9) return !0x1; - if (Array.isArray(_0x14b4f9)) { - for (var _0x33e703 = 0x0, _0x25ac30 = _0x14b4f9.length; _0x33e703 < _0x25ac30; _0x33e703++) - if (_0x4ab1ca(_0x14b4f9[_0x33e703])) return true; - return !0x1; - } - if ('function' == typeof _0x4420c0 && _0x4420c0.isBuffer && _0x4420c0.isBuffer(_0x14b4f9) || 'function' == typeof ArrayBuffer && _0x14b4f9 instanceof ArrayBuffer || _0x45ae25 && _0x14b4f9 instanceof Blob || _0x1f95e5 && _0x14b4f9 instanceof File) return true; - if (_0x14b4f9.toJSON && 'function' == typeof _0x14b4f9.toJSON && 0x1 === arguments.length) return _0x4ab1ca(_0x14b4f9.toJSON(), true); - for (var _0x5226c8 in _0x14b4f9) - if (Object.prototype.hasOwnProperty.call(_0x14b4f9, _0x5226c8) && _0x4ab1ca(_0x14b4f9[_0x5226c8])) return true; - return !0x1; - }; - }.call(this, _0x25b44a(0x49).Buffer)); -}, function(_0xa72342, _0x175eee, _0x10fb4c) { - 'use strict'; - var _0x767f92, _0x5df01c = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_' .split(''), - _0x5df0c7 = 0x40, - _0x1db733 = {}, - _0x523155 = 0x0, - _0x4674d7 = 0x0; - - function _0x168e06(_0x2125da) { - var _0x175eee = ''; - do { - _0x175eee = _0x5df01c[_0x2125da % _0x5df0c7] + _0x175eee, _0x2125da = Math.floor(_0x2125da / _0x5df0c7); - } while (_0x2125da > 0x0); - return _0x175eee; - } - - function _0x36a2a0() { - var _0xa72342 = _0x168e06(+new Date()); - return _0xa72342 !== _0x767f92 ? (_0x523155 = 0x0, _0x767f92 = _0xa72342) : _0xa72342 + '.' + _0x168e06(_0x523155++); - } - for (; _0x4674d7 < _0x5df0c7; _0x4674d7++) _0x1db733[_0x5df01c[_0x4674d7]] = _0x4674d7; - _0x36a2a0.encode = _0x168e06, _0x36a2a0.decode = function(_0x2fdfe5) { - var _0x175eee = 0x0; - for (_0x4674d7 = 0x0; _0x4674d7 < _0x2fdfe5.length; _0x4674d7++) _0x175eee = _0x175eee * _0x5df0c7 + _0x1db733[_0x2fdfe5.charAt(_0x4674d7)]; - return _0x175eee; - }, _0xa72342.exports = _0x36a2a0; -}, function(_0x1bc94c, _0x4a7130) { - var _0x1980e6 = [].indexOf; - _0x1bc94c.exports = function(_0x271548, _0x396609) { - if (_0x1980e6) return _0x271548.indexOf(_0x396609); - for (var _0x4efe42 = 0x0; _0x4efe42 < _0x271548.length; ++_0x4efe42) - if (_0x271548[_0x4efe42] === _0x396609) return _0x4efe42; - return -0x1; - }; -}, function(_0x558852, _0x5b8dc2, _0x509289) { - var _0x5efe1b = _0x509289(0x69), - _0x42c7d0 = _0x509289(0x32), - _0x53a800 = _0x509289(0x189), - _0x47048b = _0x509289(0x9b), - _0x1dc99a = _0x509289(0x9c), - _0x4e4e41 = _0x509289(0x4a)('socket.io-client:socket'), - _0x31bb1a = _0x509289(0x4b), - _0x4ca2db = _0x509289(0x97); - _0x558852.exports = _0x2ce65f; - var _0x219899 = { - 'connect': 0x1, - 'connect_error': 0x1, - 'connect_timeout': 0x1, - 'connecting': 0x1, - 'disconnect': 0x1, - 'error': 0x1, - 'reconnect': 0x1, - 'reconnect_attempt': 0x1, - 'reconnect_failed': 0x1, - 'reconnect_error': 0x1, - 'reconnecting': 0x1, - 'ping': 0x1, - 'pong': 0x1 - }, - _0x4cf437 = _0x42c7d0.prototype.emit; - - function _0x2ce65f(_0xcc821f, _0x1ccbf0, _0x9c83f8) { - this.io = _0xcc821f, this.nsp = _0x1ccbf0, this.json = this, this.ids = 0x0, this.acks = {}, this.receiveBuffer = [], this.sendBuffer = [], this.connected = !0x1, this.disconnected = true, this.flags = {}, _0x9c83f8 && _0x9c83f8.query && (this.query = _0x9c83f8.query), this.io.autoConnect && this.open(); - } - _0x42c7d0(_0x2ce65f.prototype), _0x2ce65f.prototype.subEvents = function() { - if (!this.subs) { - var _0x558852 = this.io; - this.subs = [_0x47048b(_0x558852, 'open', _0x1dc99a(this, 'onopen')), _0x47048b(_0x558852, 'packet', _0x1dc99a(this, 'onpacket')), _0x47048b(_0x558852, 'close', _0x1dc99a(this, 'onclose'))]; - } - }, _0x2ce65f.prototype.open = _0x2ce65f.prototype.connect = function() { - return this.connected ? this : (this.subEvents(), this.io.open(), 'open' === this.io.readyState && this.onopen(), this.emit('connecting'), this); - }, _0x2ce65f.prototype.send = function() { - var _0x558852 = _0x53a800(arguments); - return _0x558852.unshift('message'), this.emit.apply(this, _0x558852), this; - }, _0x2ce65f.prototype.emit = function(_0x32e269) { - if (_0x219899.hasOwnProperty(_0x32e269)) return _0x4cf437.apply(this, arguments), this; - var _0x5b8dc2 = _0x53a800(arguments), - _0x509289 = { - 'type': (void 0x0 !== this.flags.binary ? this.flags.binary : _0x4ca2db(_0x5b8dc2)) ? _0x5efe1b.BINARY_EVENT : _0x5efe1b.EVENT, - 'data': _0x5b8dc2, - 'options': {} - }; - return _0x509289.options.compress = !this.flags || !0x1 !== this.flags.compress, 'function' == typeof _0x5b8dc2[_0x5b8dc2.length - 0x1] && (_0x4e4e41('emitting packet with ack id %d', this.ids), this.acks[this.ids] = _0x5b8dc2.pop(), _0x509289.id = this.ids++), this.connected ? this.packet(_0x509289) : this.sendBuffer.push(_0x509289), this.flags = {}, this; - }, _0x2ce65f.prototype.packet = function(_0x4e2e07) { - _0x4e2e07.nsp = this.nsp, this.io.packet(_0x4e2e07); - }, _0x2ce65f.prototype.onopen = function() { - if (_0x4e4e41('transport is open - connecting'), '/' !== this.nsp) - if (this.query) { - var _0x558852 = 'object' == typeof this.query ? _0x31bb1a.encode(this.query) : this.query; - _0x4e4e41('sending connect packet with query %s', _0x558852), this.packet({ - 'type': _0x5efe1b.CONNECT, - 'query': _0x558852 - }); - } else this.packet({ - 'type': _0x5efe1b.CONNECT - }); - }, _0x2ce65f.prototype.onclose = function(_0x16d230) { - _0x4e4e41('close (%s)', _0x16d230), this.connected = !0x1, this.disconnected = true, delete this.id, this.emit('disconnect', _0x16d230); - }, _0x2ce65f.prototype.onpacket = function(_0x42f3b6) { - var _0x5b8dc2 = _0x42f3b6.nsp === this.nsp, - _0x509289 = _0x42f3b6.type === _0x5efe1b.ERROR && '/' === _0x42f3b6.nsp; - if (_0x5b8dc2 || _0x509289) switch (_0x42f3b6.type) { - case _0x5efe1b.CONNECT: - this.onconnect(); - break; - case _0x5efe1b.EVENT: - case _0x5efe1b.BINARY_EVENT: - this.onevent(_0x42f3b6); - break; - case _0x5efe1b.ACK: - case _0x5efe1b.BINARY_ACK: - this.onack(_0x42f3b6); - break; - case _0x5efe1b.DISCONNECT: - this.ondisconnect(); - break; - case _0x5efe1b.ERROR: - this.emit('error', _0x42f3b6.data); - } - }, _0x2ce65f.prototype.onevent = function(_0x14327d) { - var _0x5b8dc2 = _0x14327d.data || []; - _0x4e4e41('emitting event %j', _0x5b8dc2), null != _0x14327d.id && (_0x4e4e41('attaching ack callback to event'), _0x5b8dc2.push(this.ack(_0x14327d.id))), this.connected ? _0x4cf437.apply(this, _0x5b8dc2) : this.receiveBuffer.push(_0x5b8dc2); - }, _0x2ce65f.prototype.ack = function(_0x1a9ab4) { - var _0x5b8dc2 = this, - _0x509289 = !0x1; - return function() { - if (!_0x509289) { - _0x509289 = true; - var _0x2d88d4 = _0x53a800(arguments); - _0x4e4e41('sending ack %j', _0x2d88d4), _0x5b8dc2.packet({ - 'type': _0x4ca2db(_0x2d88d4) ? _0x5efe1b.BINARY_ACK : _0x5efe1b.ACK, - 'id': _0x1a9ab4, - 'data': _0x2d88d4 - }); - } - }; - }, _0x2ce65f.prototype.onack = function(_0x26a99f) { - var _0x5b8dc2 = this.acks[_0x26a99f.id]; - 'function' == typeof _0x5b8dc2 ? (_0x4e4e41('calling ack %s with %j', _0x26a99f.id, _0x26a99f.data), _0x5b8dc2.apply(this, _0x26a99f.data), delete this.acks[_0x26a99f.id]) : _0x4e4e41('bad ack %s', _0x26a99f.id); - }, _0x2ce65f.prototype.onconnect = function() { - this.connected = true, this.disconnected = !0x1, this.emit('connect'), this.emitBuffered(); - }, _0x2ce65f.prototype.emitBuffered = function() { - var _0x558852; - for (_0x558852 = 0x0; _0x558852 < this.receiveBuffer.length; _0x558852++) _0x4cf437.apply(this, this.receiveBuffer[_0x558852]); - for (this.receiveBuffer = [], _0x558852 = 0x0; _0x558852 < this.sendBuffer.length; _0x558852++) this.packet(this.sendBuffer[_0x558852]); - this.sendBuffer = []; - }, _0x2ce65f.prototype.ondisconnect = function() { - _0x4e4e41('server disconnect (%s)', this.nsp), this.destroy(), this.onclose('io server disconnect'); - }, _0x2ce65f.prototype.destroy = function() { - if (this.subs) { - for (var _0x558852 = 0x0; _0x558852 < this.subs.length; _0x558852++) this.subs[_0x558852].destroy(); - this.subs = null; - } - this.io.destroy(this); - }, _0x2ce65f.prototype.close = _0x2ce65f.prototype.disconnect = function() { - return this.connected && (_0x4e4e41('performing disconnect (%s)', this.nsp), this.packet({ - 'type': _0x5efe1b.DISCONNECT - })), this.destroy(), this.connected && this.onclose('io client disconnect'), this; - }, _0x2ce65f.prototype.compress = function(_0x32a2ca) { - return this.flags.compress = _0x32a2ca, this; - }, _0x2ce65f.prototype.binary = function(_0x1bf052) { - return this.flags.binary = _0x1bf052, this; - }; -}, function(_0x3ce01e, _0x37c685) { - _0x3ce01e.exports = function(_0x1e9e79, _0x14fd23, _0x38b021) { - return _0x1e9e79.on(_0x14fd23, _0x38b021), { - 'destroy': function() { - _0x1e9e79.removeListener(_0x14fd23, _0x38b021); - } - }; - }; -}, function(_0x26c200, _0x40b7f6) { - var _0x4c26f8 = [].slice; - _0x26c200.exports = function(_0x47b2d3, _0x44e831) { - if ('string' == typeof _0x44e831 && (_0x44e831 = _0x47b2d3[_0x44e831]), 'function' != typeof _0x44e831) throw new Error('bind() requires a function'); - var _0x34c502 = _0x4c26f8.call(arguments, 0x2); - return function() { - return _0x44e831.apply(_0x47b2d3, _0x34c502.concat(_0x4c26f8.call(arguments))); - }; - }; -}, function(_0xc6a4b0, _0x7437ff, _0x459722) { +}, null, null, null, null, null, null, null, null, null, null, null, null, function(_0xc6a4b0, _0x7437ff, _0x459722) { var _0x4bddd8; ! function() { 'use strict'; @@ -2809,7 +1710,7 @@ var EJS = function(_0x574f5e) { }; }); }, function(_0x58785f, _0x269d2d, _0x36e800) { - (function(_0x514d66, _0x61dde9, _0x179a8a) { + (function(_0x514d66, _0x179a8a) { var _0x1e876b; function _0x37ea03(_0xc47df6) { @@ -2826,7 +1727,7 @@ var EJS = function(_0x574f5e) { _0x149fcb.JS_MD5_NO_WINDOW && (_0x22b8cf = !0x1); var _0x5a9bb1 = !_0x22b8cf && 'object' === ('undefined' == typeof self ? 'undefined' : _0x37ea03(self)), _0x9c7cc0 = !_0x149fcb.JS_MD5_NO_NODE_JS && 'object' === (void 0x0 === _0x514d66 ? 'undefined' : _0x37ea03(_0x514d66)) && _0x514d66.versions && _0x514d66.versions.node; - _0x9c7cc0 ? _0x149fcb = _0x61dde9 : _0x5a9bb1 && (_0x149fcb = self); + _0x9c7cc0 ? _0x149fcb = window : _0x5a9bb1 && (_0x149fcb = self); var _0x178f75 = !_0x149fcb.JS_MD5_NO_COMMON_JS && 'object' === _0x37ea03(_0x179a8a) && _0x179a8a.exports, _0x256e04 = _0x36e800(0x90), _0x3204dd = !_0x149fcb.JS_MD5_NO_ARRAY_BUFFER && 'undefined' != typeof ArrayBuffer, @@ -2944,3971 +1845,5 @@ var EJS = function(_0x574f5e) { return _0x269d2d; }.call(_0x269d2d, _0x36e800, _0x269d2d, _0x179a8a), void 0x0 === _0x1e876b || (_0x179a8a.exports = _0x1e876b))); }(); - }.call(this, _0x36e800(0x31), _0x36e800(0x1f), _0x36e800(0x8f)(_0x58785f))); -}, function(_0x14da87, _0x57407e, _0x2fa590) { - 'use strict'; - (function(_0x227bc8, _0x21b268, _0x521a09) { - var _0x3313ca = _0x2fa590(0x34), - _0x31267b = _0x2fa590.n(_0x3313ca); - - function _0x4ffbab(_0x13a3d0) { - return (_0x4ffbab = 'function' == typeof Symbol && 'symbol' == typeof Symbol.iterator ? function(_0x5f01ef) { - return typeof _0x5f01ef; - } : function(_0x1020c7) { - return _0x1020c7 && 'function' == typeof Symbol && _0x1020c7.constructor === Symbol && _0x1020c7 !== Symbol.prototype ? 'symbol' : typeof _0x1020c7; - })(_0x13a3d0); - } - - function _0x375f8a() { - var _0x227bc8 = this, - _0x57407e = new _0x9828fc(); - _0x227bc8.chunks = {}, _0x227bc8.users = {}, _0x227bc8.readAsArrayBuffer = function(_0x58dfb2, _0x7626c2, _0x4af133) { - var _0x12911b = { - 'file': _0x58dfb2, - 'earlyCallback': function(_0x12782b) { - _0x7626c2(_0x7086f7(_0x12782b, { - 'currentPosition': -0x1 - })); - }, - 'extra': _0x4af133 || { - 'userid': 0x0 - } - }; - _0x58dfb2.extra && Object.keys(_0x58dfb2.extra).length && Object.keys(_0x58dfb2.extra).forEach(function(_0x558fd0) { - _0x12911b.extra[_0x558fd0] = _0x58dfb2.extra[_0x558fd0]; - }), _0x57407e.readAsArrayBuffer(_0x227bc8, _0x12911b); - }, _0x227bc8.getNextChunk = function(_0x37ae5a, _0x7972ae, _0x4c7a43) { - var _0x604a41; - void 0x0 !== _0x37ae5a.currentPosition && (_0x604a41 = _0x37ae5a.currentPosition, _0x37ae5a = _0x37ae5a.uuid); - var _0x476bde = _0x227bc8.chunks[_0x37ae5a]; - if (_0x476bde) { - void 0x0 !== _0x4c7a43 ? (_0x227bc8.users[_0x4c7a43 + ''] || (_0x227bc8.users[_0x4c7a43 + ''] = { - 'fileUUID': _0x37ae5a, - 'userid': _0x4c7a43, - 'currentPosition': -0x1 - }), void 0x0 !== _0x604a41 && (_0x227bc8.users[_0x4c7a43 + ''].currentPosition = _0x604a41), _0x227bc8.users[_0x4c7a43 + ''].currentPosition++, _0x604a41 = _0x227bc8.users[_0x4c7a43 + ''].currentPosition) : (void 0x0 !== _0x604a41 && (_0x227bc8.chunks[_0x37ae5a].currentPosition = _0x604a41), _0x227bc8.chunks[_0x37ae5a].currentPosition++, _0x604a41 = _0x227bc8.chunks[_0x37ae5a].currentPosition); - var _0x24854d = _0x476bde[_0x604a41]; - if (!_0x24854d) return delete _0x227bc8.chunks[_0x37ae5a], void _0x227bc8.convertToArrayBuffer({ - 'chunkMissing': true, - 'currentPosition': _0x604a41, - 'uuid': _0x37ae5a - }, _0x7972ae); - _0x24854d = _0x7086f7(_0x24854d), void 0x0 !== _0x4c7a43 && (_0x24854d.remoteUserId = _0x4c7a43 + ''), _0x24854d.start && _0x227bc8.onBegin(_0x24854d), _0x24854d.end && _0x227bc8.onEnd(_0x24854d), _0x227bc8.onProgress(_0x24854d), _0x227bc8.convertToArrayBuffer(_0x24854d, function(_0x28aba8) { - _0x24854d.currentPosition != _0x24854d.maxChunks ? _0x7972ae(_0x28aba8, !0x1) : _0x7972ae(_0x28aba8, true); - }); - } - }; - var _0x2fa590 = new _0x16cb0d(_0x227bc8); - - function _0x7086f7(_0x5ae569, _0x132129) { - if (null == _0x5ae569 || 'object' != _0x4ffbab(_0x5ae569)) return _0x5ae569; - if (_0x5ae569.constructor != Object && _0x5ae569.constructor != Array) return _0x5ae569; - if (_0x5ae569.constructor == Date || _0x5ae569.constructor == RegExp || _0x5ae569.constructor == Function || _0x5ae569.constructor == String || _0x5ae569.constructor == Number || _0x5ae569.constructor == Boolean) return new _0x5ae569[('constructor')](_0x5ae569); - for (var _0x2fa590 in _0x132129 = _0x132129 || new _0x5ae569[('constructor')](), _0x5ae569) _0x132129[_0x2fa590] = void 0x0 === _0x132129[_0x2fa590] ? _0x7086f7(_0x5ae569[_0x2fa590], null) : _0x132129[_0x2fa590]; - return _0x132129; - } - _0x227bc8.addChunk = function(_0x1d353d, _0x2f8a6d) { - _0x1d353d && _0x2fa590.receive(_0x1d353d, function(_0x3b5f53) { - _0x227bc8.convertToArrayBuffer({ - 'readyForNextChunk': true, - 'currentPosition': _0x3b5f53.currentPosition, - 'uuid': _0x3b5f53.uuid - }, _0x2f8a6d); - }); - }, _0x227bc8.chunkMissing = function(_0x335036) { - delete _0x2fa590.chunks[_0x335036.uuid], delete _0x2fa590.chunksWaiters[_0x335036.uuid]; - }, _0x227bc8.onBegin = function() {}, _0x227bc8.onEnd = function() {}, _0x227bc8.onProgress = function() {}, _0x227bc8.convertToObject = _0x312465.ConvertToObject, _0x227bc8.convertToArrayBuffer = _0x312465.ConvertToArrayBuffer, _0x227bc8.setMultipleUsers = function() {}; - } - - function _0x9828fc() { - this.readAsArrayBuffer = function(_0x4dd34e, _0x4dcd47) { - var _0x2fa590 = _0x4dcd47.earlyCallback; - delete _0x4dcd47.earlyCallback, - function(_0x10728e, _0x4af117) { - _0x4af117 = _0x4af117 || function(_0x1b86cb) { - postMessage(_0x1b86cb); - }; - var _0x2fa590 = _0x10728e.file; - _0x2fa590.uuid || (_0x2fa590.uuid = (0x64 * Math.random()).toString().replace(/\./g, '')); - var _0x21b268 = _0x10728e.chunkSize || 0x3a98; - _0x10728e.extra && _0x10728e.extra.chunkSize && (_0x21b268 = _0x10728e.extra.chunkSize); - var _0x521a09, _0x501fda = 0x0, - _0x58b232 = _0x21b268, - _0x41e8e7 = Math.floor(Math.min(0x5f5e100, _0x58b232) / _0x21b268) * _0x21b268, - _0x24144f = Math.ceil(_0x2fa590.size / _0x21b268); - _0x2fa590.maxChunks = _0x24144f; - var _0x3a1fa3 = 0x0, - _0x36783 = []; - _0x4af117({ - 'currentPosition': _0x3a1fa3, - 'uuid': _0x2fa590.uuid, - 'maxChunks': _0x24144f, - 'size': _0x2fa590.size, - 'name': _0x2fa590.name, - 'type': _0x2fa590.type, - 'lastModifiedDate': (_0x2fa590.lastModifiedDate || new Date()).toString(), - 'start': true - }); - var _0x14ba6c, _0x11a93b = new FileReader(); - _0x11a93b.onloadend = function(_0x5ab3c3) { - _0x5ab3c3.target.readyState == FileReader.DONE && function(_0x1a8ac9, _0x25d2e6, _0x3fea4f) { - _0x521a09 = Math.ceil(_0x25d2e6.byteLength / _0x21b268); - for (var _0x26fcc7 = 0x0; _0x26fcc7 < _0x521a09; _0x26fcc7++) { - var _0x198455 = _0x26fcc7 * _0x21b268; - _0x36783[_0x3a1fa3] = _0x25d2e6.slice(_0x198455, Math.min(_0x198455 + _0x21b268, _0x25d2e6.byteLength)), _0x4af117({ - 'uuid': _0x2fa590.uuid, - 'buffer': _0x36783[_0x3a1fa3], - 'currentPosition': _0x3a1fa3, - 'maxChunks': _0x24144f, - 'size': _0x2fa590.size, - 'name': _0x2fa590.name, - 'lastModifiedDate': (_0x2fa590.lastModifiedDate || new Date()).toString(), - 'type': _0x2fa590.type - }), _0x3a1fa3++; - } - _0x3a1fa3 == _0x24144f && true, _0x3fea4f(); - }(_0x2fa590.name, _0x5ab3c3.target.result, function() { - (++_0x501fda + 0x1) * _0x41e8e7 < _0x2fa590.size ? (_0x14ba6c = _0x2fa590.slice(_0x501fda * _0x41e8e7, (_0x501fda + 0x1) * _0x41e8e7), _0x11a93b.readAsArrayBuffer(_0x14ba6c)) : _0x501fda * _0x41e8e7 < _0x2fa590.size ? (_0x14ba6c = _0x2fa590.slice(_0x501fda * _0x41e8e7, _0x2fa590.size), _0x11a93b.readAsArrayBuffer(_0x14ba6c)) : (_0x2fa590.url = URL.createObjectURL(_0x2fa590), _0x4af117({ - 'currentPosition': _0x3a1fa3, - 'uuid': _0x2fa590.uuid, - 'maxChunks': _0x24144f, - 'size': _0x2fa590.size, - 'name': _0x2fa590.name, - 'lastModifiedDate': (_0x2fa590.lastModifiedDate || new Date()).toString(), - 'url': URL.createObjectURL(_0x2fa590), - 'type': _0x2fa590.type, - 'end': true - })); - }); - }, _0x3a1fa3 += 0x1, _0x14ba6c = _0x2fa590.slice(_0x501fda * _0x41e8e7, (_0x501fda + 0x1) * _0x41e8e7), _0x11a93b.readAsArrayBuffer(_0x14ba6c); - }(_0x4dcd47, function(_0x4a4561) { - _0x4dd34e.chunks[_0x4a4561.uuid] || (_0x4dd34e.chunks[_0x4a4561.uuid] = { - 'currentPosition': -0x1 - }), _0x4dcd47.extra = _0x4dcd47.extra || { - 'userid': 0x0 - }, _0x4a4561.userid = _0x4dcd47.userid || _0x4dcd47.extra.userid || 0x0, _0x4a4561.extra = _0x4dcd47.extra, _0x4dd34e.chunks[_0x4a4561.uuid][_0x4a4561.currentPosition] = _0x4a4561, _0x4a4561.end && _0x2fa590 && (_0x2fa590(_0x4a4561.uuid), _0x2fa590 = null), _0x4a4561.maxChunks > 0xc8 && 0xc8 == _0x4a4561.currentPosition && _0x2fa590 && (_0x2fa590(_0x4a4561.uuid), _0x2fa590 = null); - }); - }; - } - - function _0x2e28ea() { - var _0x227bc8 = this, - _0x57407e = function() {}; - - function _0x35adf9(_0x1e577f, _0x35d31a, _0x142c1a) { - _0x1e577f = _0x1e577f || function() {}; - var _0x9eb682 = document.createElement('input'); - _0x9eb682.type = 'file', _0x35d31a && (_0x9eb682.multiple = true), _0x142c1a && (_0x9eb682.webkitdirectory = true), _0x9eb682.accept = _0x227bc8.accept, _0x9eb682.onclick = function() { - _0x9eb682.clickStarted = true; - }, document.body.onfocus = function() { - setTimeout(function() { - _0x9eb682.clickStarted && (_0x9eb682.clickStarted = !0x1, _0x9eb682.value || _0x57407e()); - }, 0x1f4); - }, _0x9eb682.onchange = function() { - if (_0x35d31a) { - if (!_0x9eb682.files.length) return void console.error('No file selected.'); - var _0x227bc8 = []; - return Array.from(_0x9eb682.files).forEach(function(_0x2af58c) { - _0x2af58c.url = _0x2af58c.webkitRelativePath, _0x227bc8.push(_0x2af58c); - }), void _0x1e577f(_0x227bc8); - } - _0x9eb682.files[0x0] ? (_0x1e577f(_0x9eb682.files[0x0]), _0x9eb682.parentNode.removeChild(_0x9eb682)) : console.error('No file selected.'); - }, _0x9eb682.style.display = 'none', (document.body || document.documentElement).appendChild(_0x9eb682), - function(_0x19672d) { - if ('function' == typeof _0x19672d.click) return void _0x19672d.click(); - if ('function' == typeof _0x19672d.change) return void _0x19672d.change(); - if (void 0x0 !== document.createEvent('Event')) { - if ('function' == typeof(_0x57407e = document.createEvent('Event')).initEvent && 'function' == typeof _0x19672d.dispatchEvent) return _0x57407e.initEvent('click', true, true), void _0x19672d.dispatchEvent(_0x57407e); - } - var _0x57407e = new MouseEvent('click', { - 'view': window, - 'bubbles': true, - 'cancelable': true - }); - _0x19672d.dispatchEvent(_0x57407e); - }(_0x9eb682); - } - _0x227bc8.selectSingleFile = function(_0x4fa940, _0x591d34) { - _0x591d34 && (_0x57407e = _0x591d34), _0x35adf9(_0x4fa940); - }, _0x227bc8.selectMultipleFiles = function(_0x425e11, _0x2ac31d) { - _0x2ac31d && (_0x57407e = _0x2ac31d), _0x35adf9(_0x425e11, true); - }, _0x227bc8.selectDirectory = function(_0x37cf39, _0x415668) { - _0x415668 && (_0x57407e = _0x415668), _0x35adf9(_0x37cf39, true, true); - }, _0x227bc8.accept = '*.*'; - } - - function _0x16cb0d(_0x8e4e9f) { - var _0x57407e = this; - _0x57407e.chunks = {}, _0x57407e.chunksWaiters = {}, _0x57407e.receive = function _0x2fa590(_0x15cb17, _0x5d669f) { - if (_0x15cb17.uuid) { - if (_0x15cb17.start && !_0x57407e.chunks[_0x15cb17.uuid] && (_0x57407e.chunks[_0x15cb17.uuid] = {}, _0x8e4e9f.onBegin && _0x8e4e9f.onBegin(_0x15cb17)), !_0x15cb17.end && _0x15cb17.buffer && (_0x57407e.chunks[_0x15cb17.uuid][_0x15cb17.currentPosition] = _0x15cb17.buffer), _0x15cb17.end) { - var _0x31fb82 = _0x57407e.chunks[_0x15cb17.uuid], - _0x32838f = []; - Object.keys(_0x31fb82).forEach(function(_0x5c3abb, _0x23c1e3) { - _0x32838f.push(_0x31fb82[_0x5c3abb]); - }); - var _0x2545f2 = new Blob(_0x32838f, { - 'type': _0x15cb17.type - }); - (_0x2545f2 = _0x1e6a28(_0x2545f2, _0x15cb17)).url = URL.createObjectURL(_0x2545f2), _0x2545f2.uuid = _0x15cb17.uuid, _0x2545f2.size || console.error('Something went wrong. Blob Size is 0.'), _0x8e4e9f.onEnd && _0x8e4e9f.onEnd(_0x2545f2), delete _0x57407e.chunks[_0x15cb17.uuid], delete _0x57407e.chunksWaiters[_0x15cb17.uuid]; - } - _0x15cb17.buffer && _0x8e4e9f.onProgress && _0x8e4e9f.onProgress(_0x15cb17), _0x15cb17.end || (_0x5d669f(_0x15cb17), _0x57407e.chunksWaiters[_0x15cb17.uuid] = function() { - setTimeout(function _0x8e4e9f() { - _0x15cb17.buffer && _0x57407e.chunks[_0x15cb17.uuid] && (_0x15cb17.currentPosition == _0x15cb17.maxChunks || _0x57407e.chunks[_0x15cb17.uuid][_0x15cb17.currentPosition] || (_0x5d669f(_0x15cb17), setTimeout(_0x8e4e9f, 0x1388))); - }, 0x1388); - }, _0x57407e.chunksWaiters[_0x15cb17.uuid]()); - } else _0x8e4e9f.convertToObject(_0x15cb17, function(_0x2fa56c) { - _0x2fa590(_0x2fa56c); - }); - }; - } - var _0x312465 = { - 'ConvertToArrayBuffer': function(_0x561864, _0x85e2e2) { - _0x4928e6.pack(_0x561864, function(_0xc97573) { - _0x85e2e2(_0xc97573.buffer); - }); - }, - 'ConvertToObject': function(_0xbedec5, _0x48182e) { - _0x4928e6.unpack(_0xbedec5, _0x48182e); - } - }; - - function _0x1e6a28(_0x51381f, _0x26556f) { - if (_0x51381f || (_0x51381f = {}), !_0x26556f) return _0x51381f; - for (var _0x2fa590 in _0x26556f) try { - _0x51381f[_0x2fa590] = _0x26556f[_0x2fa590]; - } catch (_0x1cadcb) {} - return _0x51381f; - } - var _0x37e2da = Uint8Array.BYTES_PER_ELEMENT, - _0x49bb1a = Uint16Array.BYTES_PER_ELEMENT, - _0x4929a3 = Uint32Array.BYTES_PER_ELEMENT, - _0x437498 = { - 'NULL': 0x0, - 'UNDEFINED': 0x1, - 'STRING': 0x2, - 'NUMBER': 0x3, - 'BOOLEAN': 0x4, - 'ARRAY': 0x5, - 'OBJECT': 0x6, - 'INT8ARRAY': 0x7, - 'INT16ARRAY': 0x8, - 'INT32ARRAY': 0x9, - 'UINT8ARRAY': 0xa, - 'UINT16ARRAY': 0xb, - 'UINT32ARRAY': 0xc, - 'FLOAT32ARRAY': 0xd, - 'FLOAT64ARRAY': 0xe, - 'ARRAYBUFFER': 0xf, - 'BLOB': 0x10, - 'FILE': 0x10, - 'BUFFER': 0x11 - }, - _0xb2a130 = [null, null, 'Uint16', 'Float64', 'Uint8', null, null, 'Int8', 'Int16', 'Int32', 'Uint8', 'Uint16', 'Uint32', 'Float32', 'Float64', 'Uint8', 'Uint8', 'Uint8'], - _0x274b69 = function(_0x297fe0) { - var _0x57407e = 0x0, - _0x2fa590 = 0x0, - _0x21b268 = 0x0, - _0x521a09 = new ArrayBuffer(_0x297fe0[0x0].byte_length + _0x297fe0[0x0].header_size), - _0x5e7442 = new DataView(_0x521a09); - for (_0x2fa590 = 0x0; _0x2fa590 < _0x297fe0.length; _0x2fa590++) { - _0x297fe0[_0x2fa590].header_size; - var _0x2227f0 = _0x297fe0[_0x2fa590].type, - _0x37072f = _0x297fe0[_0x2fa590].length, - _0x4841f8 = _0x297fe0[_0x2fa590].value, - _0x4015d6 = _0x297fe0[_0x2fa590].byte_length, - _0x5da52f = _0xb2a130[_0x2227f0], - _0x1b9cc6 = null === _0x5da52f ? 0x0 : window[_0x5da52f + 'Array'].BYTES_PER_ELEMENT; - switch (_0x2227f0 === _0x437498.BUFFER ? _0x5e7442.setUint8(_0x57407e, _0x437498.BLOB, !0x1) : _0x5e7442.setUint8(_0x57407e, _0x2227f0, !0x1), _0x57407e += _0x37e2da, _0x2227f0 !== _0x437498.ARRAY && _0x2227f0 !== _0x437498.OBJECT || (_0x5e7442.setUint16(_0x57407e, _0x37072f, !0x1), _0x57407e += _0x49bb1a), _0x5e7442.setUint32(_0x57407e, _0x4015d6, !0x1), _0x57407e += _0x4929a3, _0x2227f0) { - case _0x437498.NULL: - case _0x437498.UNDEFINED: - break; - case _0x437498.STRING: - for (_0x21b268 = 0x0; _0x21b268 < _0x37072f; _0x21b268++, _0x57407e += _0x1b9cc6) _0x5e7442.setUint16(_0x57407e, _0x4841f8.charCodeAt(_0x21b268), !0x1); - break; - case _0x437498.NUMBER: - case _0x437498.BOOLEAN: - 0x0, _0x5e7442['set' + _0x5da52f](_0x57407e, _0x4841f8, !0x1), _0x57407e += _0x1b9cc6; - break; - case _0x437498.INT8ARRAY: - case _0x437498.INT16ARRAY: - case _0x437498.INT32ARRAY: - case _0x437498.UINT8ARRAY: - case _0x437498.UINT16ARRAY: - case _0x437498.UINT32ARRAY: - case _0x437498.FLOAT32ARRAY: - case _0x437498.FLOAT64ARRAY: - new Uint8Array(_0x5e7442.buffer, _0x57407e, _0x4015d6).set(new Uint8Array(_0x4841f8.buffer)), _0x57407e += _0x4015d6; - break; - case _0x437498.ARRAYBUFFER: - case _0x437498.BUFFER: - new Uint8Array(_0x5e7442.buffer, _0x57407e, _0x4015d6).set(new Uint8Array(_0x4841f8)), _0x57407e += _0x4015d6; - break; - case _0x437498.BLOB: - case _0x437498.ARRAY: - case _0x437498.OBJECT: - break; - default: - throw 'TypeError: Unexpected type found.'; - } - 0x0; - } - return _0x5e7442; - }, - _0x2e9e54 = function _0x57407e(_0x37452e, _0x38040a) { - var _0x521a09, _0x26deb8, _0xfbd54a, _0x3f6107, _0x1535e7, _0x406eb5 = 0x0; - _0x521a09 = _0x37452e.getUint8(_0x38040a, !0x1), _0x38040a += _0x37e2da, _0x521a09 !== _0x437498.ARRAY && _0x521a09 !== _0x437498.OBJECT || (_0x26deb8 = _0x37452e.getUint16(_0x38040a, !0x1), _0x38040a += _0x49bb1a), _0xfbd54a = _0x37452e.getUint32(_0x38040a, !0x1), _0x38040a += _0x4929a3; - var _0x3b56e7 = _0xb2a130[_0x521a09], - _0x5b8ec5 = null === _0x3b56e7 ? 0x0 : window[_0x3b56e7 + 'Array'].BYTES_PER_ELEMENT; - switch (_0x521a09) { - case _0x437498.NULL: - case _0x437498.UNDEFINED: - 0x0, _0x3f6107 = null; - break; - case _0x437498.STRING: - _0x26deb8 = _0xfbd54a / _0x5b8ec5; - var _0x3316fc = []; - for (_0x406eb5 = 0x0; _0x406eb5 < _0x26deb8; _0x406eb5++) { - var _0x35da1f = _0x37452e.getUint16(_0x38040a, !0x1); - _0x38040a += _0x5b8ec5, _0x3316fc.push(String.fromCharCode(_0x35da1f)); - } - _0x3f6107 = _0x3316fc.join(''); - break; - case _0x437498.NUMBER: - _0x3f6107 = _0x37452e.getFloat64(_0x38040a, !0x1), _0x38040a += _0x5b8ec5; - break; - case _0x437498.BOOLEAN: - _0x3f6107 = 0x1 === _0x37452e.getUint8(_0x38040a, !0x1), _0x38040a += _0x5b8ec5; - break; - case _0x437498.INT8ARRAY: - case _0x437498.INT16ARRAY: - case _0x437498.INT32ARRAY: - case _0x437498.UINT8ARRAY: - case _0x437498.UINT16ARRAY: - case _0x437498.UINT32ARRAY: - case _0x437498.FLOAT32ARRAY: - case _0x437498.FLOAT64ARRAY: - case _0x437498.ARRAYBUFFER: - _0x1535e7 = _0x37452e.buffer.slice(_0x38040a, _0x38040a + _0xfbd54a), _0x38040a += _0xfbd54a, _0x3f6107 = _0x521a09 === _0x437498.ARRAYBUFFER ? _0x1535e7 : new window[_0x3b56e7 + ('Array')](_0x1535e7); - break; - case _0x437498.BLOB: - if (window.Blob) { - var _0x2161f5 = _0x57407e(_0x37452e, _0x38040a), - _0x5f11ba = _0x57407e(_0x37452e, _0x2161f5.cursor); - _0x38040a = _0x5f11ba.cursor, _0x3f6107 = new Blob([_0x5f11ba.value], { - 'type': _0x2161f5.value - }); - } else _0x1535e7 = _0x37452e.buffer.slice(_0x38040a, _0x38040a + _0xfbd54a), _0x38040a += _0xfbd54a, _0x3f6107 = new _0x227bc8(_0x1535e7); - break; - case _0x437498.ARRAY: - for (_0x3f6107 = [], _0x406eb5 = 0x0; _0x406eb5 < _0x26deb8; _0x406eb5++) _0x38040a = (_0x1535e7 = _0x57407e(_0x37452e, _0x38040a)).cursor, _0x3f6107.push(_0x1535e7.value); - break; - case _0x437498.OBJECT: - for (_0x3f6107 = {}, _0x406eb5 = 0x0; _0x406eb5 < _0x26deb8; _0x406eb5++) { - var _0x4fee35 = _0x57407e(_0x37452e, _0x38040a), - _0x118c66 = _0x57407e(_0x37452e, _0x4fee35.cursor); - _0x38040a = _0x118c66.cursor, _0x3f6107[_0x4fee35.value] = _0x118c66.value; - } - break; - default: - throw 'TypeError: Type not supported.'; - } - return { - 'value': _0x3f6107, - 'cursor': _0x38040a - }; - }, - _0x3cd888 = function(_0x7f4367, _0x498c64) { - for (var _0x2fa590 = _0x7f4367.length, _0x21b268 = [], _0x521a09 = 0x0, _0x3fb688 = 0x0, _0x48740b = 0x0; _0x48740b < _0x7f4367.length; _0x48740b++) ! function(_0x48a8b8) { - _0x131344(_0x7f4367[_0x48a8b8], function(_0x118c9f) { - if (_0x21b268[_0x48a8b8] = _0x118c9f, _0x3fb688 += _0x118c9f[0x0].header_size + _0x118c9f[0x0].byte_length, ++_0x521a09 === _0x2fa590) { - for (var _0x341601 = [], _0x44bc9f = 0x0; _0x44bc9f < _0x21b268.length; _0x44bc9f++) _0x341601 = _0x341601.concat(_0x21b268[_0x44bc9f]); - _0x498c64(_0x341601, _0x3fb688); - } - }); - }(_0x48740b); - }, - _0x131344 = function(_0x26bbec, _0x41d66e) { - var _0x21b268, _0x521a09, _0xcfca39 = _0x37e2da + _0x4929a3, - _0x1c90b5 = 0x0, - _0x5a7868 = 0x0, - _0x23293e = _0x26bbec; - switch (_0x521a09 = function(_0x54f8b4) { - var _0x41d66e = void 0x0; - if (void 0x0 === _0x54f8b4) _0x41d66e = _0x437498.UNDEFINED; - else if (null === _0x54f8b4) _0x41d66e = _0x437498.NULL; - else { - var _0x21b268 = _0x54f8b4.constructor.name, - _0x521a09 = _0x54f8b4.constructor.toString().match(/\w+/g)[0x1]; - if (void 0x0 !== _0x21b268 && void 0x0 !== _0x437498[_0x21b268.toUpperCase()]) _0x41d66e = _0x437498[_0x21b268.toUpperCase()]; - else if (void 0x0 !== _0x521a09 && void 0x0 !== _0x437498[_0x521a09.toUpperCase()]) _0x41d66e = _0x437498[_0x521a09.toUpperCase()]; - else switch (_0x4ffbab(_0x54f8b4)) { - case 'string': - _0x41d66e = _0x437498.STRING; - break; - case 'number': - _0x41d66e = _0x437498.NUMBER; - break; - case 'boolean': - _0x41d66e = _0x437498.BOOLEAN; - break; - case 'object': - _0x54f8b4 instanceof Array ? _0x41d66e = _0x437498.ARRAY : _0x54f8b4 instanceof Int8Array ? _0x41d66e = _0x437498.INT8ARRAY : _0x54f8b4 instanceof Int16Array ? _0x41d66e = _0x437498.INT16ARRAY : _0x54f8b4 instanceof Int32Array ? _0x41d66e = _0x437498.INT32ARRAY : _0x54f8b4 instanceof Uint8Array ? _0x41d66e = _0x437498.UINT8ARRAY : _0x54f8b4 instanceof Uint16Array ? _0x41d66e = _0x437498.UINT16ARRAY : _0x54f8b4 instanceof Uint32Array ? _0x41d66e = _0x437498.UINT32ARRAY : _0x54f8b4 instanceof Float32Array ? _0x41d66e = _0x437498.FLOAT32ARRAY : _0x54f8b4 instanceof Float64Array ? _0x41d66e = _0x437498.FLOAT64ARRAY : _0x54f8b4 instanceof ArrayBuffer ? _0x41d66e = _0x437498.ARRAYBUFFER : _0x54f8b4 instanceof Blob ? _0x41d66e = _0x437498.BLOB : _0x54f8b4 instanceof _0x227bc8 ? _0x41d66e = _0x437498.BUFFER : _0x54f8b4 instanceof Object && (_0x41d66e = _0x437498.OBJECT); - } - } - return _0x41d66e; - }(_0x26bbec), _0x21b268 = null == _0xb2a130[_0x521a09] ? 0x0 : window[_0xb2a130[_0x521a09] + 'Array'].BYTES_PER_ELEMENT, _0x521a09) { - case _0x437498.UNDEFINED: - case _0x437498.NULL: - break; - case _0x437498.NUMBER: - case _0x437498.BOOLEAN: - _0x1c90b5 = _0x21b268; - break; - case _0x437498.STRING: - _0x1c90b5 += (_0x5a7868 = _0x26bbec.length) * _0x21b268; - break; - case _0x437498.INT8ARRAY: - case _0x437498.INT16ARRAY: - case _0x437498.INT32ARRAY: - case _0x437498.UINT8ARRAY: - case _0x437498.UINT16ARRAY: - case _0x437498.UINT32ARRAY: - case _0x437498.FLOAT32ARRAY: - case _0x437498.FLOAT64ARRAY: - _0x1c90b5 += (_0x5a7868 = _0x26bbec.length) * _0x21b268; - break; - case _0x437498.ARRAY: - return void _0x3cd888(_0x26bbec, function(_0x4ce812, _0x3cc28c) { - _0x41d66e([{ - 'type': _0x521a09, - 'length': _0x26bbec.length, - 'header_size': _0xcfca39 + _0x49bb1a, - 'byte_length': _0x3cc28c, - 'value': null - }].concat(_0x4ce812)); - }); - case _0x437498.OBJECT: - var _0x1eb997 = []; - for (var _0x501244 in _0x26bbec) _0x26bbec.hasOwnProperty(_0x501244) && (_0x1eb997.push(_0x501244), _0x1eb997.push(_0x26bbec[_0x501244]), _0x5a7868++); - return void _0x3cd888(_0x1eb997, function(_0x57eeb8, _0x18e5d9) { - _0x41d66e([{ - 'type': _0x521a09, - 'length': _0x5a7868, - 'header_size': _0xcfca39 + _0x49bb1a, - 'byte_length': _0x18e5d9, - 'value': null - }].concat(_0x57eeb8)); - }); - case _0x437498.ARRAYBUFFER: - _0x1c90b5 += _0x26bbec.byteLength; - break; - case _0x437498.BLOB: - var _0x485cd2 = _0x26bbec.type, - _0x15ca13 = new FileReader(); - return _0x15ca13.onload = function(_0x238bf7) { - _0x3cd888([_0x485cd2, _0x238bf7.target.result], function(_0x2faa2d, _0x5dc863) { - _0x41d66e([{ - 'type': _0x521a09, - 'length': _0x5a7868, - 'header_size': _0xcfca39, - 'byte_length': _0x5dc863, - 'value': null - }].concat(_0x2faa2d)); - }); - }, _0x15ca13.onerror = function(_0x18343b) { - throw 'FileReader Error: ' + _0x18343b; - }, void _0x15ca13.readAsArrayBuffer(_0x26bbec); - case _0x437498.BUFFER: - _0x1c90b5 += _0x26bbec.length; - break; - default: - throw 'TypeError: Type "' + _0x26bbec.constructor.name + '" not supported.'; - } - _0x41d66e([{ - 'type': _0x521a09, - 'length': _0x5a7868, - 'header_size': _0xcfca39, - 'byte_length': _0x1c90b5, - 'value': _0x23293e - }].concat([])); - }, - _0x1913f9 = function(_0xbd3651, _0x26d417) { - var _0x2fa590 = _0xbd3651 instanceof DataView ? _0xbd3651 : new DataView(_0xbd3651); - return _0x2e9e54(_0x2fa590, 0x0).value; - }; - var _0x4928e6 = { - 'pack': function(_0x5aea7d, _0x22db9e) { - try { - 0x0, - _0x131344(_0x5aea7d, function(_0xf0091e) { - _0x22db9e(_0x274b69(_0xf0091e)); - }); - } - catch (_0x5adeaa) { - throw _0x5adeaa; - } - }, - 'unpack': function(_0x458a5d, _0x3c312b) { - try { - 0x0; - var _0x2fa590 = _0x1913f9(_0x458a5d); - 0x0, _0x3c312b(_0x2fa590); - } catch (_0x11220e) { - throw _0x11220e; - } - } - }; - _0x57407e.a = function(_0x1056a5, _0x326931) { - var _0x3a9045; - - function _0x45c30f(_0xa98659, _0x1eb953) { - function _0x535f92(_0x27aced) { - return !_0x27aced.audio && !_0x27aced.video && !_0x27aced.screen && _0x27aced.data; - } - var _0x21b268 = ''; - _0x21b268 += '?userid=' + _0xa98659.userid, _0x21b268 += '&sessionid=' + _0xa98659.sessionid, _0x21b268 += '&msgEvent=' + _0xa98659.socketMessageEvent, _0x21b268 += '&socketCustomEvent=' + _0xa98659.socketCustomEvent, _0x21b268 += '&autoCloseEntireSession=' + !!_0xa98659.autoCloseEntireSession, true === _0xa98659.session.broadcast && (_0x21b268 += '&oneToMany=true'), _0x21b268 += '&maxParticipantsAllowed=' + _0xa98659.maxParticipantsAllowed, _0xa98659.enableScalableBroadcast && (_0x21b268 += '&enableScalableBroadcast=true', _0x21b268 += '&maxRelayLimitPerUser=' + (_0xa98659.maxRelayLimitPerUser || 0x2)), _0x21b268 += '&extra=' + JSON.stringify(_0xa98659.extra || {}), _0xa98659.socketCustomParameters && (_0x21b268 += _0xa98659.socketCustomParameters); - try { - _0x31267b.a.sockets = {}; - } catch (_0x16f64d) {} - if (_0xa98659.socketURL || (_0xa98659.socketURL = '/'), '/' != _0xa98659.socketURL.substr(_0xa98659.socketURL.length - 0x1, 0x1)) throw '"socketURL" MUST end with a slash.'; - _0xa98659.enableLogs && ('/' == _0xa98659.socketURL ? console.info('socket.io url is: ', location.origin + '/') : console.info('socket.io url is: ', _0xa98659.socketURL)); - try { - _0xa98659.socket = _0x31267b()(_0xa98659.socketURL + _0x21b268); - } catch (_0x5463d4) { - _0xa98659.socket = _0x31267b.a.connect(_0xa98659.socketURL + _0x21b268, _0xa98659.socketOptions); - } - var _0x521a09 = _0xa98659.multiPeersHandler; - - function _0x370cbb(_0x2c02cf, _0x6d0458) { - _0xa98659.peersBackup[_0x2c02cf] || (_0xa98659.peersBackup[_0x2c02cf] = { - 'userid': _0x2c02cf, - 'extra': {} - }), _0xa98659.peersBackup[_0x2c02cf].extra = _0x6d0458; - } - _0xa98659.socket.on('extra-data-updated', function(_0x9c9848, _0x58a2b1) { - _0xa98659.peers[_0x9c9848] && (_0xa98659.peers[_0x9c9848].extra = _0x58a2b1, _0xa98659.onExtraDataUpdated({ - 'userid': _0x9c9848, - 'extra': _0x58a2b1 - }), _0x370cbb(_0x9c9848, _0x58a2b1)); - }), _0xa98659.socket.on(_0xa98659.socketMessageEvent, function _0x1eb953(_0x42ad3e) { - if (_0x42ad3e.remoteUserId == _0xa98659.userid) - if (_0xa98659.peers[_0x42ad3e.sender] && _0xa98659.peers[_0x42ad3e.sender].extra != _0x42ad3e.message.extra && (_0xa98659.peers[_0x42ad3e.sender].extra = _0x42ad3e.extra, _0xa98659.onExtraDataUpdated({ - 'userid': _0x42ad3e.sender, - 'extra': _0x42ad3e.extra - }), _0x370cbb(_0x42ad3e.sender, _0x42ad3e.extra)), _0x42ad3e.message.streamSyncNeeded && _0xa98659.peers[_0x42ad3e.sender]) { - var _0x12f90b = _0xa98659.streamEvents[_0x42ad3e.message.streamid]; - if (!_0x12f90b || !_0x12f90b.stream) return; - var _0x7f592a = _0x42ad3e.message.action; - if ('ended' === _0x7f592a || 'inactive' === _0x7f592a || 'stream-removed' === _0x7f592a) return _0xa98659.peersBackup[_0x12f90b.userid] && (_0x12f90b.extra = _0xa98659.peersBackup[_0x12f90b.userid].extra), void _0xa98659.onstreamended(_0x12f90b); - var _0x43403d = 'both' != _0x42ad3e.message.type ? _0x42ad3e.message.type : null; - 'function' == typeof _0x12f90b.stream[_0x7f592a] && _0x12f90b.stream[_0x7f592a](_0x43403d); - } else if ('dropPeerConnection' !== _0x42ad3e.message) { - if (_0x42ad3e.message.allParticipants) return -0x1 === _0x42ad3e.message.allParticipants.indexOf(_0x42ad3e.sender) && _0x42ad3e.message.allParticipants.push(_0x42ad3e.sender), void _0x42ad3e.message.allParticipants.forEach(function(_0x45f777) { - _0x521a09[_0xa98659.peers[_0x45f777] ? 'renegotiatePeer' : 'createNewPeer'](_0x45f777, { - 'localPeerSdpConstraints': { - 'OfferToReceiveAudio': _0xa98659.sdpConstraints.mandatory.OfferToReceiveAudio, - 'OfferToReceiveVideo': _0xa98659.sdpConstraints.mandatory.OfferToReceiveVideo - }, - 'remotePeerSdpConstraints': { - 'OfferToReceiveAudio': _0xa98659.session.oneway ? !!_0xa98659.session.audio : _0xa98659.sdpConstraints.mandatory.OfferToReceiveAudio, - 'OfferToReceiveVideo': _0xa98659.session.oneway ? !!_0xa98659.session.video || !!_0xa98659.session.screen : _0xa98659.sdpConstraints.mandatory.OfferToReceiveVideo - }, - 'isOneWay': !!_0xa98659.session.oneway || 'one-way' === _0xa98659.direction, - 'isDataOnly': _0x535f92(_0xa98659.session) - }); - }); - if (_0x42ad3e.message.newParticipant) { - if (_0x42ad3e.message.newParticipant == _0xa98659.userid) return; - if (_0xa98659.peers[_0x42ad3e.message.newParticipant]) return; - _0x521a09.createNewPeer(_0x42ad3e.message.newParticipant, _0x42ad3e.message.userPreferences || { - 'localPeerSdpConstraints': { - 'OfferToReceiveAudio': _0xa98659.sdpConstraints.mandatory.OfferToReceiveAudio, - 'OfferToReceiveVideo': _0xa98659.sdpConstraints.mandatory.OfferToReceiveVideo - }, - 'remotePeerSdpConstraints': { - 'OfferToReceiveAudio': _0xa98659.session.oneway ? !!_0xa98659.session.audio : _0xa98659.sdpConstraints.mandatory.OfferToReceiveAudio, - 'OfferToReceiveVideo': _0xa98659.session.oneway ? !!_0xa98659.session.video || !!_0xa98659.session.screen : _0xa98659.sdpConstraints.mandatory.OfferToReceiveVideo - }, - 'isOneWay': !!_0xa98659.session.oneway || 'one-way' === _0xa98659.direction, - 'isDataOnly': _0x535f92(_0xa98659.session) - }); - } else if (_0x42ad3e.message.readyForOffer && (_0xa98659.attachStreams.length && (_0xa98659.waitingForLocalMedia = !0x1), _0xa98659.waitingForLocalMedia)) setTimeout(function() { - _0x1eb953(_0x42ad3e); - }, 0x1); - else if (_0x42ad3e.message.newParticipationRequest && _0x42ad3e.sender !== _0xa98659.userid) { - _0xa98659.peers[_0x42ad3e.sender] && _0xa98659.deletePeer(_0x42ad3e.sender); - var _0x8b8a4a = { - 'extra': _0x42ad3e.extra || {}, - 'localPeerSdpConstraints': _0x42ad3e.message.remotePeerSdpConstraints || { - 'OfferToReceiveAudio': _0xa98659.sdpConstraints.mandatory.OfferToReceiveAudio, - 'OfferToReceiveVideo': _0xa98659.sdpConstraints.mandatory.OfferToReceiveVideo - }, - 'remotePeerSdpConstraints': _0x42ad3e.message.localPeerSdpConstraints || { - 'OfferToReceiveAudio': _0xa98659.session.oneway ? !!_0xa98659.session.audio : _0xa98659.sdpConstraints.mandatory.OfferToReceiveAudio, - 'OfferToReceiveVideo': _0xa98659.session.oneway ? !!_0xa98659.session.video || !!_0xa98659.session.screen : _0xa98659.sdpConstraints.mandatory.OfferToReceiveVideo - }, - 'isOneWay': void 0x0 !== _0x42ad3e.message.isOneWay ? _0x42ad3e.message.isOneWay : !!_0xa98659.session.oneway || 'one-way' === _0xa98659.direction, - 'isDataOnly': void 0x0 !== _0x42ad3e.message.isDataOnly ? _0x42ad3e.message.isDataOnly : _0x535f92(_0xa98659.session), - 'dontGetRemoteStream': void 0x0 !== _0x42ad3e.message.isOneWay ? _0x42ad3e.message.isOneWay : !!_0xa98659.session.oneway || 'one-way' === _0xa98659.direction, - 'dontAttachLocalStream': !!_0x42ad3e.message.dontGetRemoteStream, - 'connectionDescription': _0x42ad3e, - 'successCallback': function() {} - }; - _0xa98659.onNewParticipant(_0x42ad3e.sender, _0x8b8a4a); - } else { - if (_0x42ad3e.message.changedUUID && _0xa98659.peers[_0x42ad3e.message.oldUUID] && (_0xa98659.peers[_0x42ad3e.message.newUUID] = _0xa98659.peers[_0x42ad3e.message.oldUUID], delete _0xa98659.peers[_0x42ad3e.message.oldUUID]), _0x42ad3e.message.userLeft) return _0x521a09.onUserLeft(_0x42ad3e.sender), void(_0x42ad3e.message.autoCloseEntireSession && _0xa98659.leave()); - _0x521a09.addNegotiatedMessage(_0x42ad3e.message, _0x42ad3e.sender); - } - } else _0xa98659.deletePeer(_0x42ad3e.sender); - }); - var _0x56cf17 = !0x1; - _0xa98659.socket.resetProps = function() { - _0x56cf17 = !0x1; - }, _0xa98659.socket.on('connect', function() { - _0x56cf17 || (_0x56cf17 = true, _0xa98659.enableLogs && console.info('socket.io connection is opened.'), setTimeout(function() { - _0xa98659.socket.emit('extra-data-updated', _0xa98659.extra); - }, 0x3e8), _0x1eb953 && _0x1eb953(_0xa98659.socket)); - }), _0xa98659.socket.on('disconnect', function() { - _0xa98659.enableLogs && console.warn('socket.io connection is closed'), _0xa98659.close(); - }), _0xa98659.socket.on('user-disconnected', function(_0x54aa18) { - _0x54aa18 !== _0xa98659.userid && (_0xa98659.onUserStatusChanged({ - 'userid': _0x54aa18, - 'status': 'offline', - 'extra': _0xa98659.peers[_0x54aa18] && _0xa98659.peers[_0x54aa18].extra || {} - }), _0xa98659.deletePeer(_0x54aa18)); - }), _0xa98659.socket.on('user-connected', function(_0x5ca80a) { - _0x5ca80a !== _0xa98659.userid && _0xa98659.onUserStatusChanged({ - 'userid': _0x5ca80a, - 'status': 'online', - 'extra': _0xa98659.peers[_0x5ca80a] && _0xa98659.peers[_0x5ca80a].extra || {} - }); - }), _0xa98659.socket.on('closed-entire-session', function(_0x4808cd, _0x427eb3) { - _0xa98659.leave(), _0xa98659.onEntireSessionClosed({ - 'sessionid': _0x4808cd, - 'userid': _0x4808cd, - 'extra': _0x427eb3 - }); - }), _0xa98659.socket.on('userid-already-taken', function(_0x420cd1, _0x1408ae) { - _0xa98659.onUserIdAlreadyTaken(_0x420cd1, _0x1408ae); - }), _0xa98659.socket.on('logs', function(_0x5e50a8) { - _0xa98659.enableLogs && console.debug('server-logs', _0x5e50a8); - }), _0xa98659.socket.on('number-of-broadcast-viewers-updated', function(_0x6c7075) { - _0xa98659.onNumberOfBroadcastViewersUpdated(_0x6c7075); - }), _0xa98659.socket.on('set-isInitiator-true', function(_0x4f8f7b) { - _0x4f8f7b == _0xa98659.sessionid && (_0xa98659.isInitiator = true); - }); - } - - function _0x11ea4f(_0x433d1d) { - var _0x326931 = this, - _0x2fa590 = ['getAllParticipants', 'getLength', 'selectFirst', 'streams', 'send', 'forEach']; - - function _0x2aa4ee() { - _0x433d1d.fbr = new _0x375f8a(), _0x433d1d.fbr.onProgress = function(_0x4fd092) { - _0x433d1d.onFileProgress(_0x4fd092); - }, _0x433d1d.fbr.onBegin = function(_0x4d54b6) { - _0x433d1d.onFileStart(_0x4d54b6); - }, _0x433d1d.fbr.onEnd = function(_0x50bc40) { - _0x433d1d.onFileEnd(_0x50bc40); - }; - } - _0x433d1d.peers = { - 'getLength': function() { - var _0x433d1d = 0x0; - for (var _0x326931 in this) - 0x1 == _0x2fa590.indexOf(_0x326931) && _0x433d1d++; - return _0x433d1d; - }, - 'selectFirst': function() { - var _0x433d1d; - for (var _0x326931 in this) - 0x1 == _0x2fa590.indexOf(_0x326931) && (_0x433d1d = this[_0x326931]); - return _0x433d1d; - }, - 'getAllParticipants': function(_0x3c84ce) { - var _0x326931 = []; - for (var _0x2aa4ee in this) - 0x1 == _0x2fa590.indexOf(_0x2aa4ee) && _0x2aa4ee != _0x3c84ce && _0x326931.push(_0x2aa4ee); - return _0x326931; - }, - 'forEach': function(_0x3602ec) { - this.getAllParticipants().forEach(function(_0x5a1e0f) { - _0x3602ec(_0x433d1d.peers[_0x5a1e0f]); - }); - }, - 'send': function(_0x5ba79e, _0x17c086) { - var _0x521a09 = this; - if (!_0x3b94ab(_0x5ba79e.size) && !_0x3b94ab(_0x5ba79e.type)) { - if (_0x433d1d.enableFileSharing) return void _0x326931.shareFile(_0x5ba79e, _0x17c086); - 'string' != typeof _0x5ba79e && (_0x5ba79e = JSON.stringify(_0x5ba79e)); - } - if ('text' === _0x5ba79e.type || _0x5ba79e instanceof ArrayBuffer || _0x5ba79e instanceof DataView) { - if ('text' === _0x5ba79e.type && (_0x5ba79e = JSON.stringify(_0x5ba79e)), _0x17c086) { - var _0x53f36f = _0x433d1d.peers[_0x17c086]; - if (_0x53f36f) return _0x53f36f.channels.length ? void _0x53f36f.channels.forEach(function(_0x157888) { - _0x157888.send(_0x5ba79e); - }) : (_0x433d1d.peers[_0x17c086].createDataChannel(), _0x433d1d.renegotiate(_0x17c086), void setTimeout(function() { - _0x521a09.send(_0x5ba79e, _0x17c086); - }, 0xbb8)); - } - this.getAllParticipants().forEach(function(_0x20abac) { - if (!_0x521a09[_0x20abac].channels.length) return _0x433d1d.peers[_0x20abac].createDataChannel(), _0x433d1d.renegotiate(_0x20abac), void setTimeout(function() { - _0x521a09[_0x20abac].channels.forEach(function(_0x3e199c) { - _0x3e199c.send(_0x5ba79e); - }); - }, 0xbb8); - _0x521a09[_0x20abac].channels.forEach(function(_0x35ed8c) { - _0x35ed8c.send(_0x5ba79e); - }); - }); - } else _0x21703b.send({ - 'text': _0x5ba79e, - 'channel': this, - 'connection': _0x433d1d, - 'remoteUserId': _0x17c086 - }); - } - }, this.uuid = _0x433d1d.userid, this.getLocalConfig = function(_0x137423, _0x261ef, _0x2d10e4) { - return _0x2d10e4 || (_0x2d10e4 = {}), { - 'streamsToShare': _0x2d10e4.streamsToShare || {}, - 'rtcMultiConnection': _0x433d1d, - 'connectionDescription': _0x2d10e4.connectionDescription, - 'userid': _0x261ef, - 'localPeerSdpConstraints': _0x2d10e4.localPeerSdpConstraints, - 'remotePeerSdpConstraints': _0x2d10e4.remotePeerSdpConstraints, - 'dontGetRemoteStream': !!_0x2d10e4.dontGetRemoteStream, - 'dontAttachLocalStream': !!_0x2d10e4.dontAttachLocalStream, - 'renegotiatingPeer': !!_0x2d10e4.renegotiatingPeer, - 'peerRef': _0x2d10e4.peerRef, - 'channels': _0x2d10e4.channels || [], - 'onLocalSdp': function(_0x44a3ae) { - _0x326931.onNegotiationNeeded(_0x44a3ae, _0x261ef); - }, - 'onLocalCandidate': function(_0x405c4b) { - (_0x405c4b = _0x2b9f47.processCandidates(_0x433d1d, _0x405c4b)) && _0x326931.onNegotiationNeeded(_0x405c4b, _0x261ef); - }, - 'remoteSdp': _0x137423, - 'onDataChannelMessage': function(_0x149155) { - if (!_0x433d1d.fbr && _0x433d1d.enableFileSharing && _0x2aa4ee(), 'string' != typeof _0x149155 && _0x433d1d.enableFileSharing) { - var _0x2d10e4 = this; - _0x149155 instanceof ArrayBuffer || _0x149155 instanceof DataView ? _0x433d1d.fbr.convertToObject(_0x149155, function(_0x2664a9) { - _0x2d10e4.onDataChannelMessage(_0x2664a9); - }) : _0x149155.readyForNextChunk ? _0x433d1d.fbr.getNextChunk(_0x149155, function(_0x1453bf, _0x8de0f1) { - _0x433d1d.peers[_0x261ef].channels.forEach(function(_0x5f29e7) { - _0x5f29e7.send(_0x1453bf); - }); - }, _0x261ef) : _0x149155.chunkMissing ? _0x433d1d.fbr.chunkMissing(_0x149155) : _0x433d1d.fbr.addChunk(_0x149155, function(_0x8e01c9) { - _0x433d1d.peers[_0x261ef].peer.channel.send(_0x8e01c9); - }); - } else _0x326931.onDataChannelMessage(_0x149155, _0x261ef); - }, - 'onDataChannelError': function(_0x300f94) { - _0x326931.onDataChannelError(_0x300f94, _0x261ef); - }, - 'onDataChannelOpened': function(_0x5919e5) { - _0x326931.onDataChannelOpened(_0x5919e5, _0x261ef); - }, - 'onDataChannelClosed': function(_0x37c3b1) { - _0x326931.onDataChannelClosed(_0x37c3b1, _0x261ef); - }, - 'onRemoteStream': function(_0x44e333) { - _0x433d1d.peers[_0x261ef] && _0x433d1d.peers[_0x261ef].streams.push(_0x44e333), _0x326931.onGettingRemoteMedia(_0x44e333, _0x261ef); - }, - 'onRemoteStreamRemoved': function(_0x1e2862) { - _0x326931.onRemovingRemoteMedia(_0x1e2862, _0x261ef); - }, - 'onPeerStateChanged': function(_0x483374) { - _0x326931.onPeerStateChanged(_0x483374), 'new' === _0x483374.iceConnectionState && _0x326931.onNegotiationStarted(_0x261ef, _0x483374), 'connected' === _0x483374.iceConnectionState && _0x326931.onNegotiationCompleted(_0x261ef, _0x483374), -0x1 !== _0x483374.iceConnectionState.search(/closed|failed/gi) && (_0x326931.onUserLeft(_0x261ef), _0x326931.disconnectWith(_0x261ef)); - } - }; - }, this.createNewPeer = function(_0x4f4c1b, _0x54114b) { - if (!(_0x433d1d.maxParticipantsAllowed <= _0x433d1d.getAllParticipants().length)) { - if (_0x54114b = _0x54114b || {}, _0x433d1d.isInitiator && _0x433d1d.session.audio && 'two-way' === _0x433d1d.session.audio && !_0x54114b.streamsToShare && (_0x54114b.isOneWay = !0x1, _0x54114b.isDataOnly = !0x1, _0x54114b.session = _0x433d1d.session), !_0x54114b.isOneWay && !_0x54114b.isDataOnly) return _0x54114b.isOneWay = true, void this.onNegotiationNeeded({ - 'enableMedia': true, - 'userPreferences': _0x54114b - }, _0x4f4c1b); - _0x54114b = _0x433d1d.setUserPreferences(_0x54114b, _0x4f4c1b); - var _0x2aa4ee = this.getLocalConfig(null, _0x4f4c1b, _0x54114b); - _0x433d1d.peers[_0x4f4c1b] = new _0x4c6fdb(_0x2aa4ee); - } - }, this.createAnsweringPeer = function(_0x432071, _0x5d1056, _0x4e2b15) { - _0x4e2b15 = _0x433d1d.setUserPreferences(_0x4e2b15 || {}, _0x5d1056); - var _0x521a09 = this.getLocalConfig(_0x432071, _0x5d1056, _0x4e2b15); - _0x433d1d.peers[_0x5d1056] = new _0x4c6fdb(_0x521a09); - }, this.renegotiatePeer = function(_0xf6c803, _0x597405, _0x29d9b2) { - if (_0x433d1d.peers[_0xf6c803]) { - _0x597405 || (_0x597405 = {}), _0x597405.renegotiatingPeer = true, _0x597405.peerRef = _0x433d1d.peers[_0xf6c803].peer, _0x597405.channels = _0x433d1d.peers[_0xf6c803].channels; - var _0x521a09 = this.getLocalConfig(_0x29d9b2, _0xf6c803, _0x597405); - _0x433d1d.peers[_0xf6c803] = new _0x4c6fdb(_0x521a09); - } else _0x433d1d.enableLogs && console.error('Peer (' + _0xf6c803 + ') does not exist. Renegotiation skipped.'); - }, this.replaceTrack = function(_0x110184, _0x52c3ce, _0x25f6eb) { - if (!_0x433d1d.peers[_0x52c3ce]) throw 'This peer (' + _0x52c3ce + ') does not exist.'; - var _0x521a09 = _0x433d1d.peers[_0x52c3ce].peer; - _0x521a09.getSenders && 'function' == typeof _0x521a09.getSenders && _0x521a09.getSenders().length ? _0x521a09.getSenders().forEach(function(_0x96ed5f) { - _0x25f6eb && 'video' === _0x96ed5f.track.kind && (_0x433d1d.peers[_0x52c3ce].peer.lastVideoTrack = _0x96ed5f.track, _0x96ed5f.replaceTrack(_0x110184)), _0x25f6eb || 'audio' !== _0x96ed5f.track.kind || (_0x433d1d.peers[_0x52c3ce].peer.lastAudioTrack = _0x96ed5f.track, _0x96ed5f.replaceTrack(_0x110184)); - }) : (console.warn('RTPSender.replaceTrack is NOT supported.'), this.renegotiatePeer(_0x52c3ce)); - }, this.onNegotiationNeeded = function(_0x33db7a, _0x5f4a7c) {}, this.addNegotiatedMessage = function(_0x1d484a, _0x448bd9) { - if (_0x1d484a.type && _0x1d484a.sdp) return 'answer' == _0x1d484a.type && _0x433d1d.peers[_0x448bd9] && _0x433d1d.peers[_0x448bd9].addRemoteSdp(_0x1d484a), 'offer' == _0x1d484a.type && (_0x1d484a.renegotiatingPeer ? this.renegotiatePeer(_0x448bd9, null, _0x1d484a) : this.createAnsweringPeer(_0x1d484a, _0x448bd9)), void(_0x433d1d.enableLogs && console.log('Remote peer\x27s sdp:', _0x1d484a.sdp)); - if (_0x1d484a.candidate) return _0x433d1d.peers[_0x448bd9] && _0x433d1d.peers[_0x448bd9].addRemoteCandidate(_0x1d484a), void(_0x433d1d.enableLogs && console.log('Remote peer\'s candidate pairs:', _0x1d484a.candidate)); - if (_0x1d484a.enableMedia) { - _0x433d1d.session = _0x1d484a.userPreferences.session || _0x433d1d.session, _0x433d1d.session.oneway && _0x433d1d.attachStreams.length && (_0x433d1d.attachStreams = []), _0x1d484a.userPreferences.isDataOnly && _0x433d1d.attachStreams.length && (_0x433d1d.attachStreams.length = []); - var _0x521a09 = {}; - _0x433d1d.attachStreams.forEach(function(_0x549219) { - _0x521a09[_0x549219.streamid] = { - 'isAudio': !!_0x549219.isAudio, - 'isVideo': !!_0x549219.isVideo, - 'isScreen': !!_0x549219.isScreen - }; - }), _0x1d484a.userPreferences.streamsToShare = _0x521a09, _0x326931.onNegotiationNeeded({ - 'readyForOffer': true, - 'userPreferences': _0x1d484a.userPreferences - }, _0x448bd9); - } - _0x1d484a.readyForOffer && _0x433d1d.onReadyForOffer(_0x448bd9, _0x1d484a.userPreferences); - }, this.onGettingRemoteMedia = function(_0x1d2a39, _0x50fcf9) {}, this.onRemovingRemoteMedia = function(_0x2c048b, _0x238637) {}, this.onGettingLocalMedia = function(_0x10860a) {}, this.onLocalMediaError = function(_0x33725e, _0x45b7ee) { - _0x433d1d.onMediaError(_0x33725e, _0x45b7ee); - }, this.shareFile = function(_0x458906, _0x775c6c) { - _0x2aa4ee(), _0x433d1d.fbr.readAsArrayBuffer(_0x458906, function(_0x2c744c) { - var _0x2aa4ee = _0x433d1d.getAllParticipants(); - _0x775c6c && (_0x2aa4ee = [_0x775c6c]), _0x2aa4ee.forEach(function(_0x3a9de3) { - _0x433d1d.fbr.getNextChunk(_0x2c744c, function(_0x2b3a4a) { - _0x433d1d.peers[_0x3a9de3].channels.forEach(function(_0x2356aa) { - _0x2356aa.send(_0x2b3a4a); - }); - }, _0x3a9de3); - }); - }, { - 'userid': _0x433d1d.userid, - 'chunkSize': 'Firefox' === DetectRTC.browser.name ? 0x3a98 : _0x433d1d.chunkSize || 0x0 - }); - }; - var _0x521a09 = new _0x342039(_0x433d1d); - this.onDataChannelMessage = function(_0x5f266f, _0x384695) { - _0x521a09.receive(JSON.parse(_0x5f266f), _0x384695, _0x433d1d.peers[_0x384695] ? _0x433d1d.peers[_0x384695].extra : {}); - }, this.onDataChannelClosed = function(_0x5448c4, _0x5c5d37) { - _0x5448c4.userid = _0x5c5d37, _0x5448c4.extra = _0x433d1d.peers[_0x5c5d37] ? _0x433d1d.peers[_0x5c5d37].extra : {}, _0x433d1d.onclose(_0x5448c4); - }, this.onDataChannelError = function(_0x2a9d6, _0x55de25) { - _0x2a9d6.userid = _0x55de25, event.extra = _0x433d1d.peers[_0x55de25] ? _0x433d1d.peers[_0x55de25].extra : {}, _0x433d1d.onerror(_0x2a9d6); - }, this.onDataChannelOpened = function(_0x5d5514, _0x255c92) { - _0x433d1d.peers[_0x255c92].channels.length ? _0x433d1d.peers[_0x255c92].channels = [_0x5d5514] : (_0x433d1d.peers[_0x255c92].channels.push(_0x5d5514), _0x433d1d.onopen({ - 'userid': _0x255c92, - 'extra': _0x433d1d.peers[_0x255c92] ? _0x433d1d.peers[_0x255c92].extra : {}, - 'channel': _0x5d5514 - })); - }, this.onPeerStateChanged = function(_0x463911) { - _0x433d1d.onPeerStateChanged(_0x463911); - }, this.onNegotiationStarted = function(_0x134c39, _0x554768) {}, this.onNegotiationCompleted = function(_0x40ab4e, _0x24f174) {}, this.getRemoteStreams = function(_0x196151) { - return _0x196151 = _0x196151 || _0x433d1d.peers.getAllParticipants()[0x0], _0x433d1d.peers[_0x196151] ? _0x433d1d.peers[_0x196151].streams : []; - }; - } - - function _0x121233(_0x421b61, _0x4c65b9, _0x1382be) { - if ('undefined' != typeof CustomEvent) { - var _0x21b268 = new CustomEvent(_0x4c65b9, { - 'arguments': _0x1382be, - '__exposedProps__': _0x1382be - }); - _0x421b61.dispatchEvent(_0x21b268); - } - } - - function _0x57b754(_0x51d3ee, _0x17d2b8) { - _0x17d2b8.stream && _0x17d2b8.stream && _0x17d2b8.stream.addEventListener && (_0x17d2b8.stream.addEventListener('mute', function(_0x20fbf4) { - (_0x20fbf4 = _0x51d3ee.streamEvents[_0x17d2b8.streamid]).session = { - 'audio': 'audio' === _0x20fbf4.muteType, - 'video': 'video' === _0x20fbf4.muteType - }, _0x51d3ee.onmute(_0x20fbf4); - }, !0x1), _0x17d2b8.stream.addEventListener('unmute', function(_0x5b824c) { - (_0x5b824c = _0x51d3ee.streamEvents[_0x17d2b8.streamid]).session = { - 'audio': 'audio' === _0x5b824c.unmuteType, - 'video': 'video' === _0x5b824c.unmuteType - }, _0x51d3ee.onunmute(_0x5b824c); - }, !0x1)); - } - - function _0x5b8d5d() { - if (window.crypto && window.crypto.getRandomValues && -0x1 === navigator.userAgent.indexOf('Safari')) { - for (var _0x1056a5 = window.crypto.getRandomValues(new Uint32Array(0x3)), _0x326931 = '', _0x2fa590 = 0x0, _0x21b268 = _0x1056a5.length; _0x2fa590 < _0x21b268; _0x2fa590++) _0x326931 += _0x1056a5[_0x2fa590].toString(0x24); - return _0x326931; - } - return (Math.random() * new Date().getTime()).toString(0x24).replace(/\./g, ''); - } - - function _0x412d65(_0x385896, _0x40a9c8, _0x449aca) { - if (_0x449aca.autoCreateMediaElement) { - var _0x21b268 = !0x1; - _0x2cbba5(_0x385896, 'video').length || _0x385896.isVideo || _0x385896.isScreen || (_0x21b268 = true), 'Firefox' === DetectRTC.browser.name && (_0x449aca.session.video || _0x449aca.session.screen) && (_0x21b268 = !0x1); - var _0x521a09 = document.createElement(_0x21b268 ? 'audio' : 'video'); - _0x521a09.srcObject = _0x385896; - try { - _0x521a09.setAttributeNode(document.createAttribute('autoplay')), _0x521a09.setAttributeNode(document.createAttribute('playsinline')), _0x521a09.setAttributeNode(document.createAttribute('controls')); - } catch (_0x1440db) { - _0x521a09.setAttribute('autoplay', true), _0x521a09.setAttribute('playsinline', true), _0x521a09.setAttribute('controls', true); - } - if ('Firefox' === DetectRTC.browser.name) { - var _0x5e279f = 'ended'; - 'oninactive' in _0x521a09 && (_0x5e279f = 'inactive'), _0x521a09.addEventListener(_0x5e279f, function() { - if (currentUserMediaRequest.remove(_0x385896.idInstance), 'local' === _0x385896.type) { - _0x5e279f = 'ended', 'oninactive' in _0x385896 && (_0x5e279f = 'inactive'), _0x25e82e.onSyncNeeded(_0x385896.streamid, _0x5e279f), _0x449aca.attachStreams.forEach(function(_0x30209b, _0x17c711) { - _0x385896.streamid === _0x30209b.streamid && delete _0x449aca.attachStreams[_0x17c711]; - }); - var _0x40a9c8 = []; - _0x449aca.attachStreams.forEach(function(_0x2dbc3e) { - _0x2dbc3e && _0x40a9c8.push(_0x2dbc3e); - }), _0x449aca.attachStreams = _0x40a9c8; - var _0x21b268 = _0x449aca.streamEvents[_0x385896.streamid]; - if (_0x21b268) return void _0x449aca.onstreamended(_0x21b268); - this.parentNode && this.parentNode.removeChild(this); - } - }, !0x1); - } - var _0x2b737d = _0x521a09.play(); - if (void 0x0 !== _0x2b737d) { - var _0x1e20a0 = !0x1; - setTimeout(function() { - _0x1e20a0 || (_0x1e20a0 = true, _0x40a9c8(_0x521a09)); - }, 0x3e8), _0x2b737d.then(function() { - _0x1e20a0 || (_0x1e20a0 = true, _0x40a9c8(_0x521a09)); - }).catch(function(_0x336a06) { - _0x1e20a0 || (_0x1e20a0 = true, _0x40a9c8(_0x521a09)); - }); - } else _0x40a9c8(_0x521a09); - } else _0x40a9c8({}); - } - - function _0x1cbceb(_0x84132f, _0xd43fb8) { - window.removeEventListener(_0x84132f, _0xd43fb8), window.addEventListener(_0x84132f, _0xd43fb8, !0x1); - } - - function _0xf3acd(_0x3d2706) { - var _0x326931 = []; - return _0x3d2706.forEach(function(_0x1e0ee0) { - _0x1e0ee0 && _0x326931.push(_0x1e0ee0); - }), _0x326931; - } - - function _0x5deab2(_0x58c43e) { - return !_0x58c43e.audio && !_0x58c43e.video && !_0x58c43e.screen && _0x58c43e.data; - } - - function _0x3b94ab(_0x3fc589) { - return void 0x0 === _0x3fc589; - }(_0x3a9045 = void 0x0 !== _0x21b268 ? _0x21b268 : null) && 'undefined' == typeof window && void 0x0 !== _0x21b268 && (_0x21b268.navigator = { - 'userAgent': 'Fake/5.0 (FakeOS) AppleWebKit/123 (KHTML, like Gecko) Fake/12.3.4567.89 Fake/123.45', - 'getUserMedia': function() {} - }, _0x21b268.console || (_0x21b268.console = {}), void 0x0 === _0x21b268.console.debug && (_0x21b268.console.debug = _0x21b268.console.info = _0x21b268.console.error = _0x21b268.console.log = _0x21b268.console.log || function() { - console.log(arguments); - }), 'undefined' == typeof document && (_0x3a9045.document = {}, document.createElement = document.captureStream = document.mozCaptureStream = function() { - var _0x1056a5 = { - 'getContext': function() { - return _0x1056a5; - }, - 'play': function() {}, - 'pause': function() {}, - 'drawImage': function() {}, - 'toDataURL': function() { - return ''; - } - }; - return _0x1056a5; - }, document.addEventListener = document.removeEventListener = _0x3a9045.addEventListener = _0x3a9045.removeEventListener = function() {}, _0x3a9045.HTMLVideoElement = _0x3a9045.HTMLMediaElement = function() {}), void 0x0 === _0x31267b.a && (_0x3a9045.io = function() { - return { - 'on': function(_0x5e1368, _0xf87dfc) { - _0xf87dfc = _0xf87dfc || function() {}, 'connect' === _0x5e1368 && _0xf87dfc(); - }, - 'emit': function(_0x20d335, _0x35266d, _0x4a91e0) { - _0x4a91e0 = _0x4a91e0 || function() {}, 'open-room' !== _0x20d335 && 'join-room' !== _0x20d335 || _0x4a91e0(true, _0x35266d.sessionid, null); - } - }; - }), 'undefined' == typeof location && (_0x3a9045.location = { - 'protocol': 'file:', - 'href': '', - 'hash': '', - 'origin': 'self' - }), 'undefined' == typeof screen && (_0x3a9045.screen = { - 'width': 0x0, - 'height': 0x0 - }), 'undefined' == typeof URL && (_0x3a9045.URL = { - 'createObjectURL': function() { - return ''; - }, - 'revokeObjectURL': function() { - return ''; - } - }), _0x3a9045.window = _0x21b268), - function() { - var _0x1056a5 = 'Fake/5.0 (FakeOS) AppleWebKit/123 (KHTML, like Gecko) Fake/12.3.4567.89 Fake/123.45'; - if (_0x3f6d71 = 'object' === (void 0x0 === _0x521a09 ? 'undefined' : _0x4ffbab(_0x521a09)) && 'object' === _0x4ffbab(_0x521a09.versions) && _0x521a09.versions.node && !_0x521a09.browser) { - var _0x326931 = _0x521a09.versions.node.toString().replace('v', ''); - _0x1056a5 = 'Nodejs/' + _0x326931 + ' (NodeOS) AppleWebKit/' + _0x326931 + ' (KHTML, like Gecko) Nodejs/' + _0x326931 + ' Nodejs/' + _0x326931; - }! function(_0x3f410a) { - 'undefined' == typeof window && ('undefined' == typeof window && void 0x0 !== _0x21b268 && (_0x21b268.navigator = { - 'userAgent': _0x1056a5, - 'getUserMedia': function() {} - }, _0x3f410a.window = _0x21b268), 'undefined' == typeof location && (_0x3f410a.location = { - 'protocol': 'file:', - 'href': '', - 'hash': '' - }), 'undefined' == typeof screen && (_0x3f410a.screen = { - 'width': 0x0, - 'height': 0x0 - })); - }(void 0x0 !== _0x21b268 ? _0x21b268 : window); - var _0xd38ed = window.navigator; - void 0x0 !== _0xd38ed ? (void 0x0 !== _0xd38ed.webkitGetUserMedia && (_0xd38ed.getUserMedia = _0xd38ed.webkitGetUserMedia), void 0x0 !== _0xd38ed.mozGetUserMedia && (_0xd38ed.getUserMedia = _0xd38ed.mozGetUserMedia)) : _0xd38ed = { - 'getUserMedia': function() {}, - 'userAgent': _0x1056a5 - }; - var _0x4aed46 = !!/Android|webOS|iPhone|iPad|iPod|BB10|BlackBerry|IEMobile|Opera Mini|Mobile|mobile/i .test(_0xd38ed.userAgent || ''), - _0x4ba312 = !(-0x1 === _0xd38ed.userAgent.indexOf('Edge') || !_0xd38ed.msSaveOrOpenBlob && !_0xd38ed.msSaveBlob), - _0xa57f33 = !!window.opera || _0xd38ed.userAgent.indexOf(' OPR/') >= 0x0, - _0x111853 = void 0x0 !== window.InstallTrigger, - _0x2920ae = /^((?!chrome|android).)*safari/i .test(_0xd38ed.userAgent), - _0x5e24f4 = !!window.chrome && !_0xa57f33, - _0x566860 = 'undefined' != typeof document && !!document.documentMode && !_0x4ba312; - - function _0x8a78df(_0x409296, _0x319fb9) { - var _0x2fa590 = 0x0, - _0x21b268 = !0x1, - _0x521a09 = window.setInterval(function() { - _0x409296() && (window.clearInterval(_0x521a09), _0x319fb9(_0x21b268)), _0x2fa590++ > 0x32 && (window.clearInterval(_0x521a09), _0x319fb9(_0x21b268 = true)); - }, 0xa); - } - var _0x25725b = { - 'Android': function() { - return _0xd38ed.userAgent.match(/Android/i); - }, - 'BlackBerry': function() { - return _0xd38ed.userAgent.match(/BlackBerry|BB10/i); - }, - 'iOS': function() { - return _0xd38ed.userAgent.match(/iPhone|iPad|iPod/i); - }, - 'Opera': function() { - return _0xd38ed.userAgent.match(/Opera Mini/i); - }, - 'Windows': function() { - return _0xd38ed.userAgent.match(/IEMobile/i); - }, - 'any': function() { - return _0x25725b.Android() || _0x25725b.BlackBerry() || _0x25725b.iOS() || _0x25725b.Opera() || _0x25725b.Windows(); - }, - 'getOsName': function() { - var _0x1056a5 = 'Unknown OS'; - return _0x25725b.Android() && (_0x1056a5 = 'Android'), _0x25725b.BlackBerry() && (_0x1056a5 = 'BlackBerry'), _0x25725b.iOS() && (_0x1056a5 = 'iOS'), _0x25725b.Opera() && (_0x1056a5 = 'Opera Mini'), _0x25725b.Windows() && (_0x1056a5 = 'Windows'), _0x1056a5; - } - }; - var _0xfabbbb = 'Unknown OS', - _0x533b2e = 'Unknown OS Version'; - var _0x373254, _0x3c966e, _0x47d25f = function() { - for (var _0x1056a5, _0x326931 = _0xd38ed.appVersion, _0x2fa590 = _0xd38ed.userAgent, _0x21b268 = '-', _0x521a09 = [{ - 's': 'Windows 10', - 'r': /(Windows 10.0|Windows NT 10.0)/ - }, { - 's': 'Windows 8.1', - 'r': /(Windows 8.1|Windows NT 6.3)/ - }, { - 's': 'Windows 8', - 'r': /(Windows 8|Windows NT 6.2)/ - }, { - 's': 'Windows 7', - 'r': /(Windows 7|Windows NT 6.1)/ - }, { - 's': 'Windows Vista', - 'r': /Windows NT 6.0/ - }, { - 's': 'Windows Server 2003', - 'r': /Windows NT 5.2/ - }, { - 's': 'Windows XP', - 'r': /(Windows NT 5.1|Windows XP)/ - }, { - 's': 'Windows 2000', - 'r': /(Windows NT 5.0|Windows 2000)/ - }, { - 's': 'Windows ME', - 'r': /(Win 9x 4.90|Windows ME)/ - }, { - 's': 'Windows 98', - 'r': /(Windows 98|Win98)/ - }, { - 's': 'Windows 95', - 'r': /(Windows 95|Win95|Windows_95)/ - }, { - 's': 'Windows NT 4.0', - 'r': /(Windows NT 4.0|WinNT4.0|WinNT|Windows NT)/ - }, { - 's': 'Windows CE', - 'r': /Windows CE/ - }, { - 's': 'Windows 3.11', - 'r': /Win16/ - }, { - 's': 'Android', - 'r': /Android/ - }, { - 's': 'Open BSD', - 'r': /OpenBSD/ - }, { - 's': 'Sun OS', - 'r': /SunOS/ - }, { - 's': 'Linux', - 'r': /(Linux|X11)/ - }, { - 's': 'iOS', - 'r': /(iPhone|iPad|iPod)/ - }, { - 's': 'Mac OS X', - 'r': /Mac OS X/ - }, { - 's': 'Mac OS', - 'r': /(MacPPC|MacIntel|Mac_PowerPC|Macintosh)/ - }, { - 's': 'QNX', - 'r': /QNX/ - }, { - 's': 'UNIX', - 'r': /UNIX/ - }, { - 's': 'BeOS', - 'r': /BeOS/ - }, { - 's': 'OS/2', - 'r': /OS\/2/ - }, { - 's': 'Search Bot', - 'r': /(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask Jeeves\/Teoma|ia_archiver)/ - }], _0x443861 = 0x0; _0x1056a5 = _0x521a09[_0x443861]; _0x443861++) - if (_0x1056a5.r.test(_0x2fa590)) { - _0x21b268 = _0x1056a5.s; - break; - } - var _0x434d96 = '-'; - switch (/Windows/ .test(_0x21b268) && (/Windows (.*)/ .test(_0x21b268) && (_0x434d96 = /Windows (.*)/ .exec(_0x21b268)[0x1]), _0x21b268 = 'Windows'), _0x21b268) { - case 'Mac OS X': - /Mac OS X (10[\.\_\d]+)/ .test(_0x2fa590) && (_0x434d96 = /Mac OS X (10[\.\_\d]+)/ .exec(_0x2fa590)[0x1]); - break; - case 'Android': - /Android ([\.\_\d]+)/ .test(_0x2fa590) && (_0x434d96 = /Android ([\.\_\d]+)/ .exec(_0x2fa590)[0x1]); - break; - case 'iOS': - /OS (\d+)_(\d+)_?(\d+)?/ .test(_0x2fa590) && (_0x434d96 = (_0x434d96 = /OS (\d+)_(\d+)_?(\d+)?/ .exec(_0x326931))[0x1] + '.' + _0x434d96[0x2] + '.' + (0x0 | _0x434d96[0x3])); - } - return { - 'osName': _0x21b268, - 'osVersion': _0x434d96 - }; - }(); - _0x47d25f && _0x47d25f.osName && '-' != _0x47d25f.osName ? (_0xfabbbb = _0x47d25f.osName, _0x533b2e = _0x47d25f.osVersion) : _0x25725b.any() && 'Android' == (_0xfabbbb = _0x25725b.getOsName()) && (_0x533b2e = !!(_0x3c966e = (_0x373254 = (_0x373254 || _0xd38ed.userAgent).toLowerCase()).match(/android\s([0-9\.]*)/)) && _0x3c966e[0x1]); - var _0x3f6d71 = 'object' === (void 0x0 === _0x521a09 ? 'undefined' : _0x4ffbab(_0x521a09)) && 'object' === _0x4ffbab(_0x521a09.versions) && _0x521a09.versions.node; - 'Unknown OS' === _0xfabbbb && _0x3f6d71 && (_0xfabbbb = 'Nodejs', _0x533b2e = _0x521a09.versions.node.toString().replace('v', '')); - var _0x233149 = !0x1, - _0x467217 = !0x1; - ['captureStream', 'mozCaptureStream', 'webkitCaptureStream'].forEach(function(_0x2dba73) { - 'undefined' != typeof document && 'function' == typeof document.createElement && (!_0x233149 && _0x2dba73 in document.createElement('canvas') && (_0x233149 = true), !_0x467217 && _0x2dba73 in document.createElement('video') && (_0x467217 = true)); - }); - var _0x327730 = /^(192\.168\.|169\.254\.|10\.|172\.(1[6-9]|2\d|3[01]))/, - _0x39bfae = /([0-9]{1,3}(\.[0-9]{1,3}){3})/, - _0xe1f7d = /[a-f0-9]{1,4}(:[a-f0-9]{1,4}){7}/; - var _0x37c2dd = [], - _0x47e1c4 = [], - _0x1e709a = [], - _0x536d10 = []; - _0xd38ed.mediaDevices && _0xd38ed.mediaDevices.enumerateDevices && (_0xd38ed.enumerateDevices = function(_0x101328) { - var _0x326931 = _0xd38ed.mediaDevices.enumerateDevices(); - _0x326931 && _0x326931.then ? _0xd38ed.mediaDevices.enumerateDevices().then(_0x101328).catch(function() { - _0x101328([]); - }) : _0x101328([]); - }); - var _0x1ec78f = !0x1; - void 0x0 !== _0x1d01b4 && 'getSources' in _0x1d01b4 ? _0x1ec78f = true : _0xd38ed.mediaDevices && _0xd38ed.mediaDevices.enumerateDevices && (_0x1ec78f = true); - var _0x1e6405 = !0x1, - _0x20f7ce = !0x1, - _0x528a8d = !0x1, - _0x242003 = !0x1, - _0x1583d5 = !0x1; - - function _0x5a290a(_0x5b8353) { - if (_0x1ec78f) - if (!_0xd38ed.enumerateDevices && window.MediaStreamTrack && window.MediaStreamTrack.getSources && (_0xd38ed.enumerateDevices = window.MediaStreamTrack.getSources.bind(window.MediaStreamTrack)), !_0xd38ed.enumerateDevices && _0xd38ed.enumerateDevices && (_0xd38ed.enumerateDevices = _0xd38ed.enumerateDevices.bind(_0xd38ed)), _0xd38ed.enumerateDevices) { - _0x37c2dd = [], _0x47e1c4 = [], _0x1e709a = [], _0x536d10 = [], _0x1e6405 = !0x1, _0x20f7ce = !0x1, _0x528a8d = !0x1, _0x242003 = !0x1, _0x1583d5 = !0x1; - var _0x326931 = {}; - _0xd38ed.enumerateDevices(function(_0x11a0f9) { - _0x11a0f9.forEach(function(_0x210fa4) { - var _0x11a0f9 = {}; - for (var _0x21b268 in _0x210fa4) try { - 'function' != typeof _0x210fa4[_0x21b268] && (_0x11a0f9[_0x21b268] = _0x210fa4[_0x21b268]); - } catch (_0x1914ff) {} - _0x326931[_0x11a0f9.deviceId + _0x11a0f9.label + _0x11a0f9.kind] || ('audio' === _0x11a0f9.kind && (_0x11a0f9.kind = 'audioinput'), 'video' === _0x11a0f9.kind && (_0x11a0f9.kind = 'videoinput'), _0x11a0f9.deviceId || (_0x11a0f9.deviceId = _0x11a0f9.id), _0x11a0f9.id || (_0x11a0f9.id = _0x11a0f9.deviceId), _0x11a0f9.label ? ('videoinput' !== _0x11a0f9.kind || _0x1583d5 || (_0x1583d5 = true), 'audioinput' !== _0x11a0f9.kind || _0x242003 || (_0x242003 = true)) : (_0x11a0f9.isCustomLabel = true, 'videoinput' === _0x11a0f9.kind ? _0x11a0f9.label = 'Camera ' + (_0x536d10.length + 0x1) : 'audioinput' === _0x11a0f9.kind ? _0x11a0f9.label = 'Microphone ' + (_0x47e1c4.length + 0x1) : 'audiooutput' === _0x11a0f9.kind ? _0x11a0f9.label = 'Speaker ' + (_0x1e709a.length + 0x1) : _0x11a0f9.label = 'Please invoke getUserMedia once.', void 0x0 !== _0x444319 && _0x444319.browser.isChrome && _0x444319.browser.version >= 0x2e && !/^(https:|chrome-extension:)$/g .test(location.protocol || '') && 'undefined' != typeof document && 'string' == typeof document.domain && document.domain.search && -0x1 === document.domain.search(/localhost|127.0./g) && (_0x11a0f9.label = 'HTTPs is required to get label of this ' + _0x11a0f9.kind + ' device.')), 'audioinput' === _0x11a0f9.kind && (_0x1e6405 = true, -0x1 === _0x47e1c4.indexOf(_0x11a0f9) && _0x47e1c4.push(_0x11a0f9)), 'audiooutput' === _0x11a0f9.kind && (_0x20f7ce = true, -0x1 === _0x1e709a.indexOf(_0x11a0f9) && _0x1e709a.push(_0x11a0f9)), 'videoinput' === _0x11a0f9.kind && (_0x528a8d = true, -0x1 === _0x536d10.indexOf(_0x11a0f9) && _0x536d10.push(_0x11a0f9)), _0x37c2dd.push(_0x11a0f9), _0x326931[_0x11a0f9.deviceId + _0x11a0f9.label + _0x11a0f9.kind] = _0x11a0f9); - }), void 0x0 !== _0x444319 && (_0x444319.MediaDevices = _0x37c2dd, _0x444319.hasMicrophone = _0x1e6405, _0x444319.hasSpeakers = _0x20f7ce, _0x444319.hasWebcam = _0x528a8d, _0x444319.isWebsiteHasWebcamPermissions = _0x1583d5, _0x444319.isWebsiteHasMicrophonePermissions = _0x242003, _0x444319.audioInputDevices = _0x47e1c4, _0x444319.audioOutputDevices = _0x1e709a, _0x444319.videoInputDevices = _0x536d10), _0x5b8353 && _0x5b8353(); - }); - } else _0x5b8353 && _0x5b8353(); - else _0x5b8353 && _0x5b8353(); - } - var _0x444319 = window.DetectRTC || {}; - _0x444319.browser = function() { - _0xd38ed.appVersion; - var _0x1056a5, _0x326931, _0x2fa590, _0x21b268 = _0xd38ed.userAgent, - _0x521a09 = _0xd38ed.appName, - _0x441e45 = '' + parseFloat(_0xd38ed.appVersion), - _0x174a5c = parseInt(_0xd38ed.appVersion, 0xa); - if (_0x2920ae && !_0x5e24f4 && -0x1 !== _0x21b268.indexOf('CriOS') && (_0x2920ae = !0x1, _0x5e24f4 = true), _0xa57f33) { - _0x521a09 = 'Opera'; - try { - _0x174a5c = (_0x441e45 = _0xd38ed.userAgent.split('OPR/')[0x1].split(' ')[0x0]).split('.')[0x0]; - } catch (_0xbb1615) { - _0x441e45 = '0.0.0.0', _0x174a5c = 0x0; - } - } else _0x566860 ? ((_0x326931 = _0x21b268.indexOf('rv:')) > 0x0 ? _0x441e45 = _0x21b268.substring(_0x326931 + 0x3) : (_0x326931 = _0x21b268.indexOf('MSIE'), _0x441e45 = _0x21b268.substring(_0x326931 + 0x5)), _0x521a09 = 'IE') : _0x5e24f4 ? (_0x326931 = _0x21b268.indexOf('Chrome'), _0x521a09 = 'Chrome', _0x441e45 = _0x21b268.substring(_0x326931 + 0x7)) : _0x2920ae ? (_0x326931 = _0x21b268.indexOf('Safari'), _0x521a09 = 'Safari', _0x441e45 = _0x21b268.substring(_0x326931 + 0x7), -0x1 !== (_0x326931 = _0x21b268.indexOf('Version')) && (_0x441e45 = _0x21b268.substring(_0x326931 + 0x8)), -0x1 !== _0xd38ed.userAgent.indexOf('Version/') && (_0x441e45 = _0xd38ed.userAgent.split('Version/')[0x1].split(' ')[0x0])) : _0x111853 ? (_0x326931 = _0x21b268.indexOf('Firefox'), _0x521a09 = 'Firefox', _0x441e45 = _0x21b268.substring(_0x326931 + 0x8)) : (_0x1056a5 = _0x21b268.lastIndexOf(' ') + 0x1) < (_0x326931 = _0x21b268.lastIndexOf('/')) && (_0x521a09 = _0x21b268.substring(_0x1056a5, _0x326931), _0x441e45 = _0x21b268.substring(_0x326931 + 0x1), _0x521a09.toLowerCase() === _0x521a09.toUpperCase() && (_0x521a09 = _0xd38ed.appName)); - return _0x4ba312 && (_0x521a09 = 'Edge', _0x441e45 = _0xd38ed.userAgent.split('Edge/')[0x1]), -0x1 !== (_0x2fa590 = _0x441e45.search(/[; \)]/)) && (_0x441e45 = _0x441e45.substring(0x0, _0x2fa590)), _0x174a5c = parseInt('' + _0x441e45, 0xa), isNaN(_0x174a5c) && (_0x441e45 = '' + parseFloat(_0xd38ed.appVersion), _0x174a5c = parseInt(_0xd38ed.appVersion, 0xa)), { - 'fullVersion': _0x441e45, - 'version': _0x174a5c, - 'name': _0x521a09, - 'isPrivateBrowsing': !0x1 - }; - }(), - function(_0xbf5986) { - var _0x326931; - try { - if (window.webkitRequestFileSystem) window.webkitRequestFileSystem(window.TEMPORARY, 0x1, function() { - _0x326931 = !0x1; - }, function(_0x57feb9) { - _0x326931 = true; - }); - else if (window.indexedDB && /Firefox/ .test(window.navigator.userAgent)) { - var _0x2fa590; - try { - (_0x2fa590 = window.indexedDB.open('test')).onerror = function() { - return true; - }; - } catch (_0xe0bac4) { - _0x326931 = true; - } - void 0x0 === _0x326931 && _0x8a78df(function() { - return 'done' === _0x2fa590.readyState; - }, function(_0x236923) { - _0x236923 || (_0x326931 = !_0x2fa590.result); - }); - } else if (function(_0x8e13f) { - var _0x326931 = _0x8e13f.toLowerCase(); - if (0x0 === _0x326931.indexOf('msie') && 0x0 === _0x326931.indexOf('trident')) return !0x1; - var _0x2fa590 = /(?:msie|rv:)\s?([\d\.]+)/ .exec(_0x326931); - return !!(_0x2fa590 && parseInt(_0x2fa590[0x1], 0xa) >= 0xa); - }(window.navigator.userAgent)) { - _0x326931 = !0x1; - try { - window.indexedDB || (_0x326931 = true); - } catch (_0x4d0f1c) { - _0x326931 = true; - } - } else if (window.localStorage && /Safari/ .test(window.navigator.userAgent)) { - try { - window.localStorage.setItem('test', 0x1); - } catch (_0x217100) { - _0x326931 = true; - } - void 0x0 === _0x326931 && (_0x326931 = !0x1, window.localStorage.removeItem('test')); - } - } catch (_0x54458d) { - _0x326931 = !0x1; - } - _0x8a78df(function() { - return void 0x0 !== _0x326931; - }, function(_0x139aa5) { - _0xbf5986(_0x326931); - }); - }(function(_0x82ccf2) { - _0x444319.browser.isPrivateBrowsing = !!_0x82ccf2; - }), _0x444319.browser['is' + _0x444319.browser.name] = true, _0x444319.osName = _0xfabbbb, _0x444319.osVersion = _0x533b2e; - 'object' === (void 0x0 === _0x521a09 ? 'undefined' : _0x4ffbab(_0x521a09)) && 'object' === _0x4ffbab(_0x521a09.versions) && _0x521a09.versions['node-webkit']; - var _0xb774b1 = !0x1; - ['RTCPeerConnection', 'webkitRTCPeerConnection', 'mozRTCPeerConnection', 'RTCIceGatherer'].forEach(function(_0x1a220e) { - _0xb774b1 || _0x1a220e in window && (_0xb774b1 = true); - }), _0x444319.isWebRTCSupported = _0xb774b1, _0x444319.isORTCSupported = 'undefined' != typeof RTCIceGatherer; - var _0x20eef3 = !0x1; - (_0x444319.browser.isChrome && _0x444319.browser.version >= 0x23 ? _0x20eef3 = true : _0x444319.browser.isFirefox && _0x444319.browser.version >= 0x22 ? _0x20eef3 = true : _0x444319.browser.isEdge && _0x444319.browser.version >= 0x11 ? _0x20eef3 = true : 'Android' === _0x444319.osName && _0x444319.browser.isChrome && (_0x20eef3 = true), /^(https:|chrome-extension:)$/g .test(location.protocol || '')) || ('undefined' != typeof document && 'string' == typeof document.domain && document.domain.search && -0x1 === document.domain.search(/localhost|127.0./g) && (_0x444319.browser.isChrome || _0x444319.browser.isEdge || _0x444319.browser.isOpera) ? _0x20eef3 = !0x1 : _0x444319.browser.isFirefox && (_0x20eef3 = !0x1)); - _0x444319.isScreenCapturingSupported = _0x20eef3; - var _0x41f5bd = { - 'isSupported': !0x1, - 'isCreateMediaStreamSourceSupported': !0x1 - }; - ['AudioContext', 'webkitAudioContext', 'mozAudioContext', 'msAudioContext'].forEach(function(_0x6f8ee8) { - _0x41f5bd.isSupported || _0x6f8ee8 in window && (_0x41f5bd.isSupported = true, window[_0x6f8ee8] && 'createMediaStreamSource' in window[_0x6f8ee8].prototype && (_0x41f5bd.isCreateMediaStreamSourceSupported = true)); - }), _0x444319.isAudioContextSupported = _0x41f5bd.isSupported, _0x444319.isCreateMediaStreamSourceSupported = _0x41f5bd.isCreateMediaStreamSourceSupported; - var _0x3c8f54 = !0x1; - _0x444319.browser.isChrome && _0x444319.browser.version > 0x1f && (_0x3c8f54 = true), _0x444319.isRtpDataChannelsSupported = _0x3c8f54; - var _0x4e0543 = !0x1; - _0x444319.browser.isFirefox && _0x444319.browser.version > 0x1c ? _0x4e0543 = true : _0x444319.browser.isChrome && _0x444319.browser.version > 0x19 ? _0x4e0543 = true : _0x444319.browser.isOpera && _0x444319.browser.version >= 0xb && (_0x4e0543 = true), _0x444319.isSctpDataChannelsSupported = _0x4e0543, _0x444319.isMobileDevice = _0x4aed46; - var _0x27c37d = !0x1; - _0xd38ed.getUserMedia ? _0x27c37d = true : _0xd38ed.mediaDevices && _0xd38ed.mediaDevices.getUserMedia && (_0x27c37d = true), _0x444319.browser.isChrome && _0x444319.browser.version >= 0x2e && !/^(https:|chrome-extension:)$/g .test(location.protocol || '') && 'undefined' != typeof document && 'string' == typeof document.domain && document.domain.search && -0x1 === document.domain.search(/localhost|127.0./g) && (_0x27c37d = 'Requires HTTPs'), 'Nodejs' === _0x444319.osName && (_0x27c37d = !0x1), _0x444319.isGetUserMediaSupported = _0x27c37d; - var _0x5d3017, _0x4c1193, _0x5997d1, _0x4bd937 = ''; - screen.width && (_0x4bd937 += (screen.width ? screen.width : '') + ' x ' + (screen.height ? screen.height : '')); - _0x444319.displayResolution = _0x4bd937, _0x444319.displayAspectRatio = (_0x5d3017 = screen.width, _0x4c1193 = screen.height, _0x5997d1 = function _0x1056a5(_0x9f77a2, _0x157ff4) { - return 0x0 == _0x157ff4 ? _0x9f77a2 : _0x1056a5(_0x157ff4, _0x9f77a2 % _0x157ff4); - }(_0x5d3017, _0x4c1193), _0x5d3017 / _0x5997d1 / (_0x4c1193 / _0x5997d1)).toFixed(0x2), _0x444319.isCanvasSupportsStreamCapturing = _0x233149, _0x444319.isVideoSupportsStreamCapturing = _0x467217, 'Chrome' == _0x444319.browser.name && _0x444319.browser.version >= 0x35 && (_0x444319.isCanvasSupportsStreamCapturing || (_0x444319.isCanvasSupportsStreamCapturing = 'Requires chrome flag: enable-experimental-web-platform-features'), _0x444319.isVideoSupportsStreamCapturing || (_0x444319.isVideoSupportsStreamCapturing = 'Requires chrome flag: enable-experimental-web-platform-features')), _0x444319.DetectLocalIPAddress = function(_0x527d6a, _0x3e6338) { - if (_0x444319.isWebRTCSupported) { - var _0x2fa590 = true, - _0x21b268 = true; - ! function(_0x169ed4, _0x457465) { - if ('undefined' == typeof document || 'function' != typeof document.getElementById) return; - var _0x2fa590 = {}, - _0x21b268 = window.RTCPeerConnection || window.mozRTCPeerConnection || window.webkitRTCPeerConnection; - if (!_0x21b268) { - var _0x521a09 = document.getElementById('iframe'); - if (!_0x521a09) return; - var _0x57dce2 = _0x521a09.contentWindow; - _0x21b268 = _0x57dce2.RTCPeerConnection || _0x57dce2.mozRTCPeerConnection || _0x57dce2.webkitRTCPeerConnection; - } - if (!_0x21b268) return; - var _0x1ebe24 = null; - 'Chrome' === _0x444319.browser && _0x444319.browser.version < 0x3a && (_0x1ebe24 = { - 'optional': [{ - 'RtpDataChannels': true - }] - }); - var _0x355289 = new _0x21b268({ - 'iceServers': [{ - 'urls': 'stun:stun.l.google.com:19302' - }] - }, _0x1ebe24); - _0x457465 && (_0x355289.addStream ? _0x355289.addStream(_0x457465) : _0x355289.addTrack && _0x457465.getTracks()[0x0] && _0x355289.addTrack(_0x457465.getTracks()[0x0], _0x457465)); - - function _0x367cf9(_0x23abd1) { - var _0x21b268 = _0x39bfae.exec(_0x23abd1); - if (_0x21b268) { - var _0x521a09 = _0x21b268[0x1], - _0x2faf0b = _0x23abd1.match(_0x327730); - void 0x0 === _0x2fa590[_0x521a09] && _0x169ed4(_0x521a09, _0x2faf0b, true), _0x2fa590[_0x521a09] = true; - } - } - if (_0x355289.onicecandidate = function(_0xd7031e) { - _0xd7031e.candidate && _0x367cf9(_0xd7031e.candidate.candidate); - }, !_0x457465) try { - _0x355289.createDataChannel('sctp', {}); - } catch (_0x1edf47) {} - _0x444319.isPromisesSupported ? _0x355289.createOffer().then(function(_0xedec09) { - _0x355289.setLocalDescription(_0xedec09).then(_0x45699b); - }) : _0x355289.createOffer(function(_0xf8592b) { - _0x355289.setLocalDescription(_0xf8592b, _0x45699b, function() {}); - }, function() {}); - - function _0x45699b() { - _0x355289.localDescription.sdp.split('\n').forEach(function(_0x4e78ca) { - 0x0 === _0x4e78ca.indexOf('a=candidate:') && _0x367cf9(_0x4e78ca); - }); - } - }(function(_0x2a2630) { - _0x2a2630.match(_0x327730) ? _0x527d6a('Local: ' + _0x2a2630, _0x2fa590 = !0x1, _0x21b268) : _0x2a2630.match(_0xe1f7d) ? _0x527d6a('Public: ' + _0x2a2630, _0x2fa590, _0x21b268 = !0x1) : _0x527d6a('Public: ' + _0x2a2630, _0x2fa590, _0x21b268); - }, _0x3e6338); - } - }, _0x444319.isWebSocketsSupported = 'WebSocket' in window && 0x2 === window.WebSocket.CLOSING, _0x444319.isWebSocketsBlocked = !_0x444319.isWebSocketsSupported, 'Nodejs' === _0x444319.osName && (_0x444319.isWebSocketsSupported = true, _0x444319.isWebSocketsBlocked = !0x1), _0x444319.checkWebSocketsSupport = function(_0x1102a1) { - _0x1102a1 = _0x1102a1 || function() {}; - try { - var _0x326931, _0x2fa590 = new WebSocket('wss://echo.websocket.org:443/'); - _0x2fa590.onopen = function() { - _0x444319.isWebSocketsBlocked = !0x1, _0x326931 = new Date().getTime(), _0x2fa590.send('ping'); - }, _0x2fa590.onmessage = function() { - _0x444319.WebsocketLatency = new Date().getTime() - _0x326931 + 'ms', _0x1102a1(), _0x2fa590.close(), _0x2fa590 = null; - }, _0x2fa590.onerror = function() { - _0x444319.isWebSocketsBlocked = true, _0x1102a1(); - }; - } catch (_0x11ac18) { - _0x444319.isWebSocketsBlocked = true, _0x1102a1(); - } - }, _0x444319.load = function(_0x83e5e9) { - _0x5a290a(_0x83e5e9 = _0x83e5e9 || function() {}); - }, _0x444319.MediaDevices = void 0x0 !== _0x37c2dd ? _0x37c2dd : [], _0x444319.hasMicrophone = _0x1e6405, _0x444319.hasSpeakers = _0x20f7ce, _0x444319.hasWebcam = _0x528a8d, _0x444319.isWebsiteHasWebcamPermissions = _0x1583d5, _0x444319.isWebsiteHasMicrophonePermissions = _0x242003, _0x444319.audioInputDevices = _0x47e1c4, _0x444319.audioOutputDevices = _0x1e709a, _0x444319.videoInputDevices = _0x536d10; - var _0x5da020 = !0x1; - 'undefined' != typeof document && 'function' == typeof document.createElement && 'setSinkId' in document.createElement('video') && (_0x5da020 = true), _0x444319.isSetSinkIdSupported = _0x5da020; - var _0x1b0b81 = !0x1; - _0x444319.browser.isFirefox && 'undefined' != typeof mozRTCPeerConnection ? 'getSenders' in mozRTCPeerConnection.prototype && (_0x1b0b81 = true) : _0x444319.browser.isChrome && 'undefined' != typeof webkitRTCPeerConnection && 'getSenders' in webkitRTCPeerConnection.prototype && (_0x1b0b81 = true), _0x444319.isRTPSenderReplaceTracksSupported = _0x1b0b81; - var _0x83ded = !0x1; - _0x444319.browser.isFirefox && _0x444319.browser.version > 0x26 && (_0x83ded = true), _0x444319.isRemoteStreamProcessingSupported = _0x83ded; - var _0x51520c = !0x1; - void 0x0 !== _0x1d01b4 && 'applyConstraints' in _0x1d01b4.prototype && (_0x51520c = true), _0x444319.isApplyConstraintsSupported = _0x51520c; - var _0x298a09 = !0x1; - _0x444319.browser.isFirefox && _0x444319.browser.version >= 0x2b && (_0x298a09 = true), _0x444319.isMultiMonitorScreenCapturingSupported = _0x298a09, _0x444319.isPromisesSupported = !!('Promise' in window), _0x444319.version = '1.3.7', void 0x0 === _0x444319 && (window.DetectRTC = {}); - var _0x187d8a = window.MediaStream; - void 0x0 === _0x187d8a && 'undefined' != typeof webkitMediaStream && (_0x187d8a = webkitMediaStream), _0x444319.MediaStream = void 0x0 !== _0x187d8a && 'function' == typeof _0x187d8a && Object.keys(_0x187d8a.prototype), _0x444319.MediaStreamTrack = void 0x0 !== _0x1d01b4 && Object.keys(_0x1d01b4.prototype); - var _0x5898a3 = window.RTCPeerConnection || window.mozRTCPeerConnection || window.webkitRTCPeerConnection; - _0x444319.RTCPeerConnection = void 0x0 !== _0x5898a3 && Object.keys(_0x5898a3.prototype), window.DetectRTC = _0x444319, 'function' == typeof define && _0x2fa590(0x90) && define('DetectRTC', [], function() { - return _0x444319; - }); - }(), 'undefined' != typeof cordova && (DetectRTC.isMobileDevice = true, DetectRTC.browser.name = 'Chrome'), navigator && navigator.userAgent && -0x1 !== navigator.userAgent.indexOf('Crosswalk') && (DetectRTC.isMobileDevice = true, DetectRTC.browser.name = 'Chrome'), window.addEventListener || (window.addEventListener = function(_0x1e341e, _0x410d8a, _0x164ba3) { - _0x1e341e.attachEvent && _0x1e341e.attachEvent('on' + _0x410d8a, _0x164ba3); - }), window.attachEventListener = function(_0x28f783, _0xf32336, _0x5ddd69, _0x1e62b3) { - _0x28f783.addEventListener(_0xf32336, _0x5ddd69, _0x1e62b3); - }; - var _0x1d809b = window.MediaStream; - - function _0x93df62(_0x128905, _0x2d6fa0) { - return (!_0x128905.session.audio || 'two-way' !== _0x128905.session.audio) && ('Firefox' === DetectRTC.browser.name && !0x1 !== _0x2d6fa0 || !('Chrome' !== DetectRTC.browser.name || DetectRTC.browser.version < 0x32) && (true === typeof _0x2d6fa0 || !(void 0x0 !== _0x2d6fa0 || !_0x128905.session.audio || !_0x128905.session.screen || _0x128905.session.video) && (_0x2d6fa0 = true, true))); - } - - function _0x405170(_0x53fd0a) { - return 'Firefox' === DetectRTC.browser.name || 'Chrome' === DetectRTC.browser.name && { - 'mandatory': { - 'chromeMediaSource': _0x53fd0a.mandatory.chromeMediaSource, - 'chromeMediaSourceId': _0x53fd0a.mandatory.chromeMediaSourceId - } - }; - } - - function _0x2cbba5(_0x5f06c5, _0x3f8518) { - return _0x5f06c5 && _0x5f06c5.getTracks ? _0x5f06c5.getTracks().filter(function(_0x12aae8) { - return _0x12aae8.kind === (_0x3f8518 || 'audio'); - }) : []; - } - - function _0x5407aa() { - var _0x1056a5 = !0x1; - try { - if ('undefined' == typeof RTCRtpTransceiver) return !0x1; - if (!('currentDirection' in RTCRtpTransceiver.prototype)) return !0x1; - var _0x326931 = new _0x2a4be1(); - try { - _0x326931.addTransceiver('audio'), _0x1056a5 = true; - } catch (_0x365290) {} - _0x326931.close(); - } catch (_0x4e12a1) { - _0x1056a5 = !0x1; - } - return _0x1056a5 && function() { - var _0x1056a5 = !0x1; - try { - var _0x326931 = new _0x2a4be1({ - 'sdpSemantics': 'unified-plan' - }); - try { - var _0x2fa590 = _0x326931.getConfiguration(); - _0x1056a5 = 'unified-plan' == _0x2fa590.sdpSemantics || (_0x2fa590.sdpSemantics, !0x1); - } catch (_0x1ddaa9) { - _0x1056a5 = !0x1; - } - } catch (_0x30213a) { - _0x1056a5 = !0x1; - } - return _0x1056a5; - }(); - } - - function _0x2eda5b() { - if ('undefined' != typeof cordova && void 0x0 !== cordova.plugins && void 0x0 !== cordova.plugins.iosrtc) { - var _0x1056a5 = cordova.plugins.iosrtc; - window.webkitRTCPeerConnection = _0x1056a5.RTCPeerConnection, window.RTCSessionDescription = _0x1056a5.RTCSessionDescription, window.RTCIceCandidate = _0x1056a5.RTCIceCandidate, window.MediaStream = _0x1056a5.MediaStream, window.MediaStreamTrack = _0x1056a5.MediaStreamTrack, navigator.getUserMedia = navigator.webkitGetUserMedia = _0x1056a5.getUserMedia, _0x1056a5.debug.enable('iosrtc*'), 'function' == typeof _0x1056a5.selectAudioOutput && _0x1056a5.selectAudioOutput(window.iOSDefaultAudioOutputDevice || 'speaker'), _0x1056a5.registerGlobals(); - } - } - void 0x0 === _0x1d809b && 'undefined' != typeof webkitMediaStream && (_0x1d809b = webkitMediaStream), void 0x0 !== _0x1d809b && ('stop' in _0x1d809b.prototype || (_0x1d809b.prototype.stop = function() { - this.getTracks().forEach(function(_0x484c2d) { - _0x484c2d.stop(); - }); - })), window.iOSDefaultAudioOutputDevice = window.iOSDefaultAudioOutputDevice || 'speaker', document.addEventListener('deviceready', _0x2eda5b, !0x1), _0x2eda5b(); - var _0x2a4be1, _0x394dad = {}; - - function _0xe7bfb2(_0x5b2014) { - return { - 'OfferToReceiveAudio': !!_0x5b2014.OfferToReceiveAudio, - 'OfferToReceiveVideo': !!_0x5b2014.OfferToReceiveVideo - }; - } - void 0x0 !== window.RTCPeerConnection ? _0x2a4be1 = window.RTCPeerConnection : 'undefined' != typeof mozRTCPeerConnection ? _0x2a4be1 = mozRTCPeerConnection : 'undefined' != typeof webkitRTCPeerConnection && (_0x2a4be1 = webkitRTCPeerConnection); - var _0x28d3c1 = window.RTCSessionDescription || window.mozRTCSessionDescription, - _0x437c06 = window.RTCIceCandidate || window.mozRTCIceCandidate, - _0x1d01b4 = window.MediaStreamTrack; - - function _0x4c6fdb(_0xeb3993) { - if (void 0x0 !== window.RTCPeerConnection ? _0x2a4be1 = window.RTCPeerConnection : 'undefined' != typeof mozRTCPeerConnection ? _0x2a4be1 = mozRTCPeerConnection : 'undefined' != typeof webkitRTCPeerConnection && (_0x2a4be1 = webkitRTCPeerConnection), _0x28d3c1 = window.RTCSessionDescription || window.mozRTCSessionDescription, _0x437c06 = window.RTCIceCandidate || window.mozRTCIceCandidate, _0x1d01b4 = window.MediaStreamTrack, !_0x2a4be1) throw 'WebRTC 1.0 (RTCPeerConnection) API are NOT available in this browser.'; - var _0x326931 = _0xeb3993.rtcMultiConnection; - this.extra = _0xeb3993.remoteSdp ? _0xeb3993.remoteSdp.extra : _0x326931.extra, this.userid = _0xeb3993.userid, this.streams = [], this.channels = _0xeb3993.channels || [], this.connectionDescription = _0xeb3993.connectionDescription, this.addStream = function(_0x500ec1) { - _0x326931.addStream(_0x500ec1, _0x2fa590.userid); - }, this.removeStream = function(_0x1bebfb) { - _0x326931.removeStream(_0x1bebfb, _0x2fa590.userid); - }; - var _0x2fa590 = this; - _0xeb3993.remoteSdp && (this.connectionDescription = _0xeb3993.remoteSdp.connectionDescription); - var _0x21b268, _0x521a09 = {}; - _0x394dad.sdpConstraints = _0xe7bfb2({ - 'OfferToReceiveAudio': true, - 'OfferToReceiveVideo': true - }); - var _0x53652f = !!_0xeb3993.renegotiatingPeer; - _0xeb3993.remoteSdp && (_0x53652f = !!_0xeb3993.remoteSdp.renegotiatingPeer); - var _0x5aa3f5 = []; - if (_0x326931.attachStreams.forEach(function(_0x37ab43) { - _0x37ab43 && _0x5aa3f5.push(_0x37ab43); - }), _0x53652f) _0x21b268 = _0xeb3993.peerRef; - else { - var _0x3802e4 = 'all'; - (_0x326931.candidates.turn || _0x326931.candidates.relay) && (_0x326931.candidates.stun || _0x326931.candidates.reflexive || _0x326931.candidates.host || (_0x3802e4 = 'relay')); - try { - var _0xa206a4 = { - 'iceServers': _0x326931.iceServers, - 'iceTransportPolicy': _0x326931.iceTransportPolicy || _0x3802e4 - }; - void 0x0 !== _0x326931.iceCandidatePoolSize && (_0xa206a4.iceCandidatePoolSize = _0x326931.iceCandidatePoolSize), void 0x0 !== _0x326931.bundlePolicy && (_0xa206a4.bundlePolicy = _0x326931.bundlePolicy), void 0x0 !== _0x326931.rtcpMuxPolicy && (_0xa206a4.rtcpMuxPolicy = _0x326931.rtcpMuxPolicy), 'Chrome' === DetectRTC.browser.name && (_0xa206a4.sdpSemantics = _0x326931.sdpSemantics || 'unified-plan'), _0x326931.iceServers && _0x326931.iceServers.length || (_0xa206a4 = null, _0x326931.optionalArgument = null), _0x21b268 = new _0x2a4be1(_0xa206a4, _0x326931.optionalArgument); - } catch (_0x2cdc2c) { - try { - _0xa206a4 = { - 'iceServers': _0x326931.iceServers - }; - _0x21b268 = new _0x2a4be1(_0xa206a4); - } catch (_0x1cd6f4) { - _0x21b268 = new _0x2a4be1(); - } - } - }!_0x21b268.getRemoteStreams && _0x21b268.getReceivers && (_0x21b268.getRemoteStreams = function() { - var _0xeb3993 = new _0x1d809b(); - return _0x21b268.getReceivers().forEach(function(_0x210865) { - _0xeb3993.addTrack(_0x210865.track); - }), [_0xeb3993]; - }), !_0x21b268.getLocalStreams && _0x21b268.getSenders && (_0x21b268.getLocalStreams = function() { - var _0xeb3993 = new _0x1d809b(); - return _0x21b268.getSenders().forEach(function(_0x4bc1bd) { - _0xeb3993.addTrack(_0x4bc1bd.track); - }), [_0xeb3993]; - }), _0x21b268.onicecandidate = function(_0x345d0e) { - if (_0x345d0e.candidate) _0x326931.trickleIce && _0xeb3993.onLocalCandidate({ - 'candidate': _0x345d0e.candidate.candidate, - 'sdpMid': _0x345d0e.candidate.sdpMid, - 'sdpMLineIndex': _0x345d0e.candidate.sdpMLineIndex - }); - else if (!_0x326931.trickleIce) { - var _0x5cad6b = _0x21b268.localDescription; - _0xeb3993.onLocalSdp({ - 'type': _0x5cad6b.type, - 'sdp': _0x5cad6b.sdp, - 'remotePeerSdpConstraints': _0xeb3993.remotePeerSdpConstraints || !0x1, - 'renegotiatingPeer': !!_0xeb3993.renegotiatingPeer || !0x1, - 'connectionDescription': _0x2fa590.connectionDescription, - 'dontGetRemoteStream': !!_0xeb3993.dontGetRemoteStream, - 'extra': _0x326931 ? _0x326931.extra : {}, - 'streamsToShare': _0x5ed0e1 - }); - } - }, _0x5aa3f5.forEach(function(_0x20e839) { - _0xeb3993.remoteSdp && _0xeb3993.remoteSdp.remotePeerSdpConstraints && _0xeb3993.remoteSdp.remotePeerSdpConstraints.dontGetRemoteStream || _0xeb3993.dontAttachLocalStream || (_0x20e839 = _0x326931.beforeAddingStream(_0x20e839, _0x2fa590)) && (_0x21b268.getLocalStreams().forEach(function(_0x37c67d) { - _0x20e839 && _0x37c67d.id == _0x20e839.id && (_0x20e839 = null); - }), _0x20e839 && _0x20e839.getTracks && _0x20e839.getTracks().forEach(function(_0x891f5b) { - try { - _0x21b268.addTrack(_0x891f5b, _0x20e839); - } catch (_0x13e107) {} - })); - }), _0x21b268.oniceconnectionstatechange = _0x21b268.onsignalingstatechange = function() { - var _0x521a09 = _0x2fa590.extra; - _0x326931.peers[_0x2fa590.userid] && (_0x521a09 = _0x326931.peers[_0x2fa590.userid].extra || _0x521a09), _0x21b268 && (_0xeb3993.onPeerStateChanged({ - 'iceConnectionState': _0x21b268.iceConnectionState, - 'iceGatheringState': _0x21b268.iceGatheringState, - 'signalingState': _0x21b268.signalingState, - 'extra': _0x521a09, - 'userid': _0x2fa590.userid - }), _0x21b268 && _0x21b268.iceConnectionState && -0x1 !== _0x21b268.iceConnectionState.search(/closed|failed/gi) && _0x2fa590.streams instanceof Array && _0x2fa590.streams.forEach(function(_0x5d55e7) { - var _0x2fa590 = _0x326931.streamEvents[_0x5d55e7.id] || { - 'streamid': _0x5d55e7.id, - 'stream': _0x5d55e7, - 'type': 'remote' - }; - _0x326931.onstreamended(_0x2fa590); - })); - }; - var _0x57365f = { - 'OfferToReceiveAudio': !!_0x5aa3f5.length, - 'OfferToReceiveVideo': !!_0x5aa3f5.length - }; - _0xeb3993.localPeerSdpConstraints && (_0x57365f = _0xeb3993.localPeerSdpConstraints), _0x394dad.sdpConstraints = _0xe7bfb2(_0x57365f); - var _0x7e19c5 = {}; - _0x21b268.ontrack = function(_0x5f3745) { - if (_0x5f3745 && 'track' === _0x5f3745.type) - if (_0x5f3745.stream = _0x5f3745.streams[_0x5f3745.streams.length - 0x1], _0x5f3745.stream.id || (_0x5f3745.stream.id = _0x5f3745.track.id), _0x7e19c5[_0x5f3745.stream.id] && 'Safari' !== DetectRTC.browser.name) _0x5f3745.track && (_0x5f3745.track.onended = function() { - _0x21b268.onremovestream(_0x5f3745); - }); - else { - _0x7e19c5[_0x5f3745.stream.id] = _0x5f3745.stream.id; - var _0x2fa590 = {}; - _0xeb3993.remoteSdp && _0xeb3993.remoteSdp.streamsToShare ? _0x2fa590 = _0xeb3993.remoteSdp.streamsToShare : _0xeb3993.streamsToShare && (_0x2fa590 = _0xeb3993.streamsToShare); - var _0x3dbe04 = _0x2fa590[_0x5f3745.stream.id]; - _0x3dbe04 ? (_0x5f3745.stream.isAudio = _0x3dbe04.isAudio, _0x5f3745.stream.isVideo = _0x3dbe04.isVideo, _0x5f3745.stream.isScreen = _0x3dbe04.isScreen) : (_0x5f3745.stream.isVideo = !!_0x2cbba5(_0x5f3745.stream, 'video').length, _0x5f3745.stream.isAudio = !_0x5f3745.stream.isVideo, _0x5f3745.stream.isScreen = !0x1), _0x5f3745.stream.streamid = _0x5f3745.stream.id, _0x521a09[_0x5f3745.stream.id] = _0x5f3745.stream, _0xeb3993.onRemoteStream(_0x5f3745.stream), _0x5f3745.stream.getTracks().forEach(function(_0x4eaf37) { - _0x4eaf37.onended = function() { - _0x21b268.onremovestream(_0x5f3745); - }; - }), _0x5f3745.stream.onremovetrack = function() { - _0x21b268.onremovestream(_0x5f3745); - }; - } - }, _0x21b268.onremovestream = function(_0x5131d7) { - _0x5131d7.stream.streamid = _0x5131d7.stream.id, _0x521a09[_0x5131d7.stream.id] && delete _0x521a09[_0x5131d7.stream.id], _0xeb3993.onRemoteStreamRemoved(_0x5131d7.stream); - }, 'function' != typeof _0x21b268.removeStream && (_0x21b268.removeStream = function(_0x659c28) { - _0x659c28.getTracks().forEach(function(_0x592b51) { - _0x21b268.removeTrack(_0x592b51, _0x659c28); - }); - }), this.addRemoteCandidate = function(_0x3baf5e) { - _0x21b268.addIceCandidate(new _0x437c06(_0x3baf5e)); - }, this.addRemoteSdp = function(_0x5132c2, _0x2483a6) { - _0x2483a6 = _0x2483a6 || function() {}, 'Safari' !== DetectRTC.browser.name && (_0x5132c2.sdp = _0x326931.processSdp(_0x5132c2.sdp)), _0x21b268.setRemoteDescription(new _0x28d3c1(_0x5132c2)).then(_0x2483a6, function(_0xe5feda) { - _0x326931.enableLogs && console.error('setRemoteDescription failed', '\n', _0xe5feda, '\n', _0x5132c2.sdp), _0x2483a6(); - }).catch(function(_0x3f508b) { - _0x326931.enableLogs && console.error('setRemoteDescription failed', '\n', _0x3f508b, '\n', _0x5132c2.sdp), _0x2483a6(); - }); - }; - var _0x2c7e5e = true; - - function _0x2e887d(_0xfe9b95) { - _0xfe9b95.binaryType = 'arraybuffer', _0xfe9b95.onmessage = function(_0x4397bd) { - _0xeb3993.onDataChannelMessage(_0x4397bd.data); - }, _0xfe9b95.onopen = function() { - _0xeb3993.onDataChannelOpened(_0xfe9b95); - }, _0xfe9b95.onerror = function(_0xa12ba0) { - _0xeb3993.onDataChannelError(_0xa12ba0); - }, _0xfe9b95.onclose = function(_0x30e29d) { - _0xeb3993.onDataChannelClosed(_0x30e29d); - }, _0xfe9b95.internalSend = _0xfe9b95.send, _0xfe9b95.send = function(_0x2c62da) { - 'open' === _0xfe9b95.readyState && _0xfe9b95.internalSend(_0x2c62da); - }, _0x21b268.channel = _0xfe9b95; - } - _0xeb3993.remoteSdp && (_0x2c7e5e = !0x1), this.createDataChannel = function() { - _0x2e887d(_0x21b268.createDataChannel('sctp', {})); - }, true !== _0x326931.session.data || _0x53652f || (_0x2c7e5e ? this.createDataChannel() : _0x21b268.ondatachannel = function(_0x4c5e51) { - _0x2e887d(_0x4c5e51.channel); - }), this.enableDisableVideoEncoding = function(_0x3d2379) { - var _0x326931; - if (_0x21b268.getSenders().forEach(function(_0x4212ea) { - _0x326931 || 'video' !== _0x4212ea.track.kind || (_0x326931 = _0x4212ea); - }), _0x326931 && _0x326931.getParameters) { - var _0x2fa590 = _0x326931.getParameters(); - _0x2fa590.encodings[0x1] && (_0x2fa590.encodings[0x1].active = !!_0x3d2379), _0x2fa590.encodings[0x2] && (_0x2fa590.encodings[0x2].active = !!_0x3d2379), _0x326931.setParameters(_0x2fa590); - } - }, _0xeb3993.remoteSdp && (_0xeb3993.remoteSdp.remotePeerSdpConstraints && (_0x57365f = _0xeb3993.remoteSdp.remotePeerSdpConstraints), _0x394dad.sdpConstraints = _0xe7bfb2(_0x57365f), this.addRemoteSdp(_0xeb3993.remoteSdp, function() { - _0x308f2d('createAnswer'); - })), 'two-way' != _0x326931.session.audio && 'two-way' != _0x326931.session.video && 'two-way' != _0x326931.session.screen || (_0x394dad.sdpConstraints = _0xe7bfb2({ - 'OfferToReceiveAudio': 'two-way' == _0x326931.session.audio || _0xeb3993.remoteSdp && _0xeb3993.remoteSdp.remotePeerSdpConstraints && _0xeb3993.remoteSdp.remotePeerSdpConstraints.OfferToReceiveAudio, - 'OfferToReceiveVideo': 'two-way' == _0x326931.session.video || 'two-way' == _0x326931.session.screen || _0xeb3993.remoteSdp && _0xeb3993.remoteSdp.remotePeerSdpConstraints && _0xeb3993.remoteSdp.remotePeerSdpConstraints.OfferToReceiveAudio - })); - var _0x5ed0e1 = {}; - - function _0x308f2d(_0x41a457) { - _0x21b268[_0x41a457](_0x394dad.sdpConstraints).then(function(_0x2f9b8b) { - 'Safari' !== DetectRTC.browser.name && (_0x2f9b8b.sdp = _0x326931.processSdp(_0x2f9b8b.sdp)), _0x21b268.setLocalDescription(_0x2f9b8b).then(function() { - _0x326931.trickleIce && (_0xeb3993.onLocalSdp({ - 'type': _0x2f9b8b.type, - 'sdp': _0x2f9b8b.sdp, - 'remotePeerSdpConstraints': _0xeb3993.remotePeerSdpConstraints || !0x1, - 'renegotiatingPeer': !!_0xeb3993.renegotiatingPeer || !0x1, - 'connectionDescription': _0x2fa590.connectionDescription, - 'dontGetRemoteStream': !!_0xeb3993.dontGetRemoteStream, - 'extra': _0x326931 ? _0x326931.extra : {}, - 'streamsToShare': _0x5ed0e1 - }), _0x326931.onSettingLocalDescription(_0x2fa590)); - }, function(_0x41064c) { - _0x326931.enableLogs && console.error('setLocalDescription error', _0x41064c); - }); - }, function(_0x31a9a8) { - _0x326931.enableLogs && console.error('sdp-error', _0x31a9a8); - }); - } - _0x21b268.getLocalStreams().forEach(function(_0x4ee107) { - _0x5ed0e1[_0x4ee107.streamid] = { - 'isAudio': !!_0x4ee107.isAudio, - 'isVideo': !!_0x4ee107.isVideo, - 'isScreen': !!_0x4ee107.isScreen - }; - }), _0x2c7e5e && _0x308f2d('createOffer'), _0x21b268.nativeClose = _0x21b268.close, _0x21b268.close = function() { - if (_0x21b268) { - try { - _0x21b268.nativeClose !== _0x21b268.close && _0x21b268.nativeClose(); - } catch (_0x3c28da) {} - _0x21b268 = null, _0x2fa590.peer = null; - } - }, this.peer = _0x21b268; - } - var _0x42fdaa = function() { - function _0x572b26(_0x16547c, _0x12b3cb) { - var _0x3623e4 = _0x5c82c5(_0x16547c); - return _0x3623e4.videoCodecNumbers ? 'vp8' === _0x12b3cb && _0x3623e4.vp8LineNumber === _0x3623e4.videoCodecNumbers[0x0] ? _0x16547c : 'vp9' === _0x12b3cb && _0x3623e4.vp9LineNumber === _0x3623e4.videoCodecNumbers[0x0] ? _0x16547c : 'h264' === _0x12b3cb && _0x3623e4.h264LineNumber === _0x3623e4.videoCodecNumbers[0x0] ? _0x16547c : _0x16547c = _0x249ace(_0x16547c, _0x12b3cb, _0x3623e4) : _0x16547c; - } - - function _0x249ace(_0x536ba9, _0x3e10ca, _0x141d2f, _0x1f707f) { - var _0x3623e4 = ''; - if ('vp8' === _0x3e10ca) { - if (!_0x141d2f.vp8LineNumber) return _0x536ba9; - _0x3623e4 = _0x141d2f.vp8LineNumber; - } - if ('vp9' === _0x3e10ca) { - if (!_0x141d2f.vp9LineNumber) return _0x536ba9; - _0x3623e4 = _0x141d2f.vp9LineNumber; - } - if ('h264' === _0x3e10ca) { - if (!_0x141d2f.h264LineNumber) return _0x536ba9; - _0x3623e4 = _0x141d2f.h264LineNumber; - } - var _0x314bfa = _0x141d2f.videoCodecNumbersOriginal.split('SAVPF')[0x0] + 'SAVPF ', - _0x52ac96 = [_0x3623e4]; - return _0x1f707f && (_0x52ac96 = []), _0x141d2f.videoCodecNumbers.forEach(function(_0x43af74) { - _0x43af74 !== _0x3623e4 && _0x52ac96.push(_0x43af74); - }), _0x314bfa += _0x52ac96.join(' '), _0x536ba9 = _0x536ba9.replace(_0x141d2f.videoCodecNumbersOriginal, _0x314bfa); - } - - function _0x5c82c5(_0x370eaf) { - var _0x249ace = {}; - return _0x370eaf.split('\n').forEach(function(_0x42cf6b) { - 0x0 === _0x42cf6b.indexOf('m=video') && (_0x249ace.videoCodecNumbers = [], _0x42cf6b.split('SAVPF')[0x1].split(' ').forEach(function(_0x340dfa) { - (_0x340dfa = _0x340dfa.trim()) && _0x340dfa.length && (_0x249ace.videoCodecNumbers.push(_0x340dfa), _0x249ace.videoCodecNumbersOriginal = _0x42cf6b); - })), -0x1 === _0x42cf6b.indexOf('VP8/90000') || _0x249ace.vp8LineNumber || (_0x249ace.vp8LineNumber = _0x42cf6b.replace('a=rtpmap:', '').split(' ')[0x0]), -0x1 === _0x42cf6b.indexOf('VP9/90000') || _0x249ace.vp9LineNumber || (_0x249ace.vp9LineNumber = _0x42cf6b.replace('a=rtpmap:', '').split(' ')[0x0]), -0x1 === _0x42cf6b.indexOf('H264/90000') || _0x249ace.h264LineNumber || (_0x249ace.h264LineNumber = _0x42cf6b.replace('a=rtpmap:', '').split(' ')[0x0]); - }), _0x249ace; - } - - function _0x4526d0(_0x39207b, _0x23a46a, _0x1ebb9d) { - return function(_0x20ed55, _0x5132ac, _0xcecfcd, _0x8459a8, _0x27ad22) { - for (var _0x2dbfb3 = -0x1 !== _0xcecfcd ? _0xcecfcd : _0x20ed55.length, _0x160b11 = _0x5132ac; _0x160b11 < _0x2dbfb3; ++_0x160b11) - if (0x0 === _0x20ed55[_0x160b11].indexOf(_0x8459a8) && (!_0x27ad22 || -0x1 !== _0x20ed55[_0x160b11].toLowerCase().indexOf(_0x27ad22.toLowerCase()))) return _0x160b11; - return null; - }(_0x39207b, 0x0, -0x1, _0x23a46a, _0x1ebb9d); - } - - function _0x3623e4(_0x46fa44) { - var _0x249ace = new RegExp('a=rtpmap:(\d+) \w+\/\d+'), - _0x5c82c5 = _0x46fa44.match(_0x249ace); - return _0x5c82c5 && 0x2 === _0x5c82c5.length ? _0x5c82c5[0x1] : null; - } - return { - 'removeVPX': function(_0x59de0e) { - var _0x4526d0 = _0x5c82c5(_0x59de0e); - return _0x59de0e = _0x249ace(_0x59de0e, 'vp9', _0x4526d0, true), _0x59de0e = _0x249ace(_0x59de0e, 'vp8', _0x4526d0, true); - }, - 'disableNACK': function(_0x376b0e) { - if (!_0x376b0e || 'string' != typeof _0x376b0e) throw 'Invalid arguments.'; - return _0x376b0e = (_0x376b0e = (_0x376b0e = (_0x376b0e = _0x376b0e.replace('a=rtcp-fb:126 nack\r\n', '')).replace('a=rtcp-fb:126 nack pli\x0d\n', 'a=rtcp-fb:126 pli\x0d\n')).replace('a=rtcp-fb:97 nack\r\n', '')).replace('a=rtcp-fb:97 nack pli\r\n', 'a=rtcp-fb:97 pli\r\n'); - }, - 'prioritize': function(_0x238652, _0x23ac58) { - if (_0x23ac58 && _0x23ac58.getSenders && _0x23ac58.getSenders().length) { - if (!_0x238652 || 'string' != typeof _0x238652) throw 'Invalid arguments.'; - _0x23ac58.getSenders().forEach(function(_0x4c4f96) { - for (var _0x5c82c5 = _0x4c4f96.getParameters(), _0x4526d0 = 0x0; _0x4526d0 < _0x5c82c5.codecs.length; _0x4526d0++) - if (_0x5c82c5.codecs[_0x4526d0].mimeType == _0x238652) { - _0x5c82c5.codecs.unshift(_0x5c82c5.codecs.splice(_0x4526d0, 0x1)); - break; - } - _0x4c4f96.setParameters(_0x5c82c5); - }); - } - }, - 'removeNonG722': function(_0x49005b) { - return _0x49005b.replace(/m=audio ([0-9]+) RTP\/SAVPF ([0-9 ]*)/g, 'm=audio $1 RTP/SAVPF 9'); - }, - 'setApplicationSpecificBandwidth': function(_0xa77e44, _0x517ea3, _0x4de140) { - return function(_0x58398a, _0x84509d, _0x378779) { - return _0x84509d ? void 0x0 !== _0x5c498f && _0x5c498f ? _0x58398a : (_0x378779 && (_0x84509d.screen ? _0x84509d.screen < 0x12c && console.warn('It seems that you are using wrong bandwidth value for screen. Screen sharing is expected to fail.') : console.warn('It seems that you are not using bandwidth for screen. Screen sharing is expected to fail.')), _0x84509d.screen && _0x378779 && (_0x58398a = (_0x58398a = _0x58398a.replace(/b=AS([^\r\n]+\r\n)/g, '')).replace(/a=mid:video\r\n/g, 'a=mid:video\r\nb=AS:' + _0x84509d.screen + '\x0d\n')), (_0x84509d.audio || _0x84509d.video) && (_0x58398a = _0x58398a.replace(/b=AS([^\r\n]+\r\n)/g, '')), _0x84509d.audio && (_0x58398a = _0x58398a.replace(/a=mid:audio\r\n/g, 'a=mid:audio\r\nb=AS:' + _0x84509d.audio + '\x0d\n')), _0x84509d.screen ? _0x58398a = _0x58398a.replace(/a=mid:video\r\n/g, 'a=mid:video\r\nb=AS:' + _0x84509d.screen + '\x0d\n') : _0x84509d.video && (_0x58398a = _0x58398a.replace(/a=mid:video\r\n/g, 'a=mid:video\r\nb=AS:' + _0x84509d.video + '\x0d\n')), _0x58398a) : _0x58398a; - }(_0xa77e44, _0x517ea3, _0x4de140); - }, - 'setVideoBitrates': function(_0x6898ff, _0xf38daa) { - return function(_0x4260bb, _0x46dc63) { - var _0x5c82c5, _0xcddf99 = (_0x46dc63 = _0x46dc63 || {}).min, - _0x4d9e07 = _0x46dc63.max, - _0x1e0ad5 = _0x4260bb.split('\x0d\n'), - _0x4e244d = _0x4526d0(_0x1e0ad5, 'a=rtpmap', 'VP8/90000'); - if (_0x4e244d && (_0x5c82c5 = _0x3623e4(_0x1e0ad5[_0x4e244d])), !_0x5c82c5) return _0x4260bb; - var _0x4a75e7, _0x5d5b05 = _0x4526d0(_0x1e0ad5, 'a=rtpmap', 'rtx/90000'); - if (_0x5d5b05 && (_0x4a75e7 = _0x3623e4(_0x1e0ad5[_0x5d5b05])), !_0x5d5b05) return _0x4260bb; - var _0x56e025 = _0x4526d0(_0x1e0ad5, 'a=fmtp:' + _0x4a75e7.toString()); - if (null !== _0x56e025) { - var _0x30c498 = '\x0d\n'; - _0x30c498 += 'a=fmtp:' + _0x5c82c5 + ' x-google-min-bitrate=' + (_0xcddf99 || '228') + '; x-google-max-bitrate=' + (_0x4d9e07 || '228'), _0x1e0ad5[_0x56e025] = _0x1e0ad5[_0x56e025].concat(_0x30c498), _0x4260bb = _0x1e0ad5.join('\x0d\n'); - } - return _0x4260bb; - }(_0x6898ff, _0xf38daa); - }, - 'setOpusAttributes': function(_0x553630, _0x553bce) { - return function(_0x48ec07, _0x1e35c6) { - _0x1e35c6 = _0x1e35c6 || {}; - var _0x5c82c5, _0x1be3e1 = _0x48ec07.split('\x0d\n'), - _0x456381 = _0x4526d0(_0x1be3e1, 'a=rtpmap', 'opus/48000'); - if (_0x456381 && (_0x5c82c5 = _0x3623e4(_0x1be3e1[_0x456381])), !_0x5c82c5) return _0x48ec07; - var _0x2d8ac5 = _0x4526d0(_0x1be3e1, 'a=fmtp:' + _0x5c82c5.toString()); - if (null === _0x2d8ac5) return _0x48ec07; - var _0x8350e7 = ''; - return _0x8350e7 += '; stereo=' + (void 0x0 !== _0x1e35c6.stereo ? _0x1e35c6.stereo : '1'), _0x8350e7 += '; sprop-stereo=' + (void 0x0 !== _0x1e35c6['sprop-stereo'] ? _0x1e35c6['sprop-stereo'] : '1'), void 0x0 !== _0x1e35c6.maxaveragebitrate && (_0x8350e7 += '; maxaveragebitrate=' + (_0x1e35c6.maxaveragebitrate || 0x100000)), void 0x0 !== _0x1e35c6.maxplaybackrate && (_0x8350e7 += '; maxplaybackrate=' + (_0x1e35c6.maxplaybackrate || 0x100000)), void 0x0 !== _0x1e35c6.cbr && (_0x8350e7 += '; cbr=' + (void 0x0 !== _0x1e35c6.cbr ? _0x1e35c6.cbr : '1')), void 0x0 !== _0x1e35c6.useinbandfec && (_0x8350e7 += '; useinbandfec=' + _0x1e35c6.useinbandfec), void 0x0 !== _0x1e35c6.usedtx && (_0x8350e7 += '; usedtx=' + _0x1e35c6.usedtx), void 0x0 !== _0x1e35c6.maxptime && (_0x8350e7 += '\x0d\na=maxptime:' + _0x1e35c6.maxptime), _0x1be3e1[_0x2d8ac5] = _0x1be3e1[_0x2d8ac5].concat(_0x8350e7), _0x48ec07 = _0x1be3e1.join('\x0d\n'); - }(_0x553630, _0x553bce); - }, - 'preferVP9': function(_0x18deb7) { - return _0x572b26(_0x18deb7, 'vp9'); - }, - 'preferCodec': _0x572b26, - 'forceStereoAudio': function(_0x14ddc9) { - for (var _0x249ace = _0x14ddc9.split('\x0d\n'), _0x5c82c5 = null, _0x4526d0 = 0x0; _0x4526d0 < _0x249ace.length; _0x4526d0++) - if (-0x1 !== _0x249ace[_0x4526d0].search('opus/48000')) { - var _0x3623e4 = extractSdp(_0x249ace[_0x4526d0], /:(\d+) opus\/48000/i); - break; - } - for (_0x4526d0 = 0x0; _0x4526d0 < _0x249ace.length; _0x4526d0++) { - if (-0x1 !== _0x249ace[_0x4526d0].search('a=fmtp')) - if (extractSdp(_0x249ace[_0x4526d0], /a=fmtp:(\d+)/) === _0x3623e4) { - _0x5c82c5 = _0x4526d0; - break; - } - } - return null === _0x5c82c5 ? _0x14ddc9 : (_0x249ace[_0x5c82c5] = _0x249ace[_0x5c82c5].concat('; stereo=1; sprop-stereo=1'), _0x14ddc9 = _0x249ace.join('\x0d\n')); - } - }; - }(); - window.BandwidthHandler = _0x42fdaa; - var _0x2b9f47 = { - 'processCandidates': function(_0x3bf1a2, _0x390036) { - var _0x2fa590 = _0x390036.candidate, - _0x21b268 = _0x3bf1a2.candidates, - _0x521a09 = _0x21b268.stun, - _0x3e00fc = _0x21b268.turn; - if (_0x3b94ab(_0x21b268.reflexive) || (_0x521a09 = _0x21b268.reflexive), _0x3b94ab(_0x21b268.relay) || (_0x3e00fc = _0x21b268.relay), (_0x21b268.host || !_0x2fa590.match(/typ host/g)) && (_0x3e00fc || !_0x2fa590.match(/typ relay/g)) && (_0x521a09 || !_0x2fa590.match(/typ srflx/g))) { - var _0x2b6e29 = _0x3bf1a2.iceProtocols; - if ((_0x2b6e29.udp || !_0x2fa590.match(/ udp /g)) && (_0x2b6e29.tcp || !_0x2fa590.match(/ tcp /g))) return _0x3bf1a2.enableLogs && console.debug('Your candidate pairs:', _0x2fa590), { - 'candidate': _0x2fa590, - 'sdpMid': _0x390036.sdpMid, - 'sdpMLineIndex': _0x390036.sdpMLineIndex - }; - } - } - }, - _0x3b9609 = { - 'getIceServers': function(_0x488e7f) { - return [{ - 'urls': ['stun:webrtcweb.com:7788'], - 'username': 'muazkh', - 'credential': 'muazkh' - }, { - 'urls': ['turn:webrtcweb.com:7788', 'turn:webrtcweb.com:8877', 'turn:webrtcweb.com:4455'], - 'username': 'muazkh', - 'credential': 'muazkh' - }, { - 'urls': ['stun:stun.l.google.com:19302', 'stun:stun1.l.google.com:19302', 'stun:stun2.l.google.com:19302', 'stun:stun.l.google.com:19302?transport=udp'] - }]; - } - }; - - function _0x5adfda(_0x283137) { - if (true !== currentUserMediaRequest.mutex) { - currentUserMediaRequest.mutex = true; - var _0x326931 = JSON.stringify(_0x283137.localMediaConstraints); - if (currentUserMediaRequest.streams[_0x326931]) _0x196d8c(currentUserMediaRequest.streams[_0x326931].stream, true); - else { - if (!!/BB10|BlackBerry/i .test(navigator.userAgent || '') || void 0x0 === navigator.mediaDevices || 'function' != typeof navigator.mediaDevices.getUserMedia) return navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia, void navigator.getUserMedia(_0x283137.localMediaConstraints, function(_0x470b2a) { - _0x470b2a.streamid = _0x470b2a.streamid || _0x470b2a.id || _0x5b8d5d(), _0x470b2a.idInstance = _0x326931, _0x196d8c(_0x470b2a); - }, function(_0x3fd14c) { - _0x283137.onLocalMediaError(_0x3fd14c, _0x283137.localMediaConstraints); - }); - if (void 0x0 === navigator.mediaDevices) { - navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia; - var _0x2fa590, _0x21b268, _0x521a09 = function() {}; - navigator.mediaDevices = { - 'getUserMedia': function(_0x1ddd61) { - return navigator.getUserMedia(_0x1ddd61, function(_0x4a0936) { - _0x4a0936(stream), _0x2fa590 = stream; - }, function(_0x15c59c) { - _0x521a09(_0x15c59c), _0x21b268 = _0x15c59c; - }), { - 'then': function(_0x3e20ef) { - if (!_0x2fa590) return _0x3e20ef, { - 'then': function(_0x444f48) { - _0x21b268 ? _0x444f48(_0x21b268) : _0x521a09 = _0x444f48; - } - }; - _0x3e20ef(_0x2fa590); - } - }; - } - }; - } - navigator.mediaDevices.getUserMedia(_0x283137.localMediaConstraints).then(function(_0x5a25ab) { - _0x5a25ab.streamid = _0x5a25ab.streamid || _0x5a25ab.id || _0x5b8d5d(), _0x5a25ab.idInstance = _0x326931, _0x196d8c(_0x5a25ab); - }).catch(function(_0x5f1ad4) { - _0x283137.onLocalMediaError(_0x5f1ad4, _0x283137.localMediaConstraints); - }); - } - } else currentUserMediaRequest.queueRequests.push(_0x283137); - - function _0x196d8c(_0x1f527b, _0x58cd7c) { - ! function(_0x3b5a94, _0x299595) { - _0x3b5a94.mandatory && _0x3b5a94.mandatory.chromeMediaSource ? _0x299595.isScreen = true : _0x3b5a94.mozMediaSource || _0x3b5a94.mediaSource ? _0x299595.isScreen = true : _0x3b5a94.video ? _0x299595.isVideo = true : _0x3b5a94.audio && (_0x299595.isAudio = true); - }(_0x283137.localMediaConstraints, _0x1f527b); - var _0x521a09 = 'ended'; - 'oninactive' in _0x1f527b && (_0x521a09 = 'inactive'), _0x1f527b.addEventListener(_0x521a09, function() { - delete currentUserMediaRequest.streams[_0x326931], currentUserMediaRequest.mutex = !0x1, currentUserMediaRequest.queueRequests.indexOf(_0x283137) && (delete currentUserMediaRequest.queueRequests[currentUserMediaRequest.queueRequests.indexOf(_0x283137)], currentUserMediaRequest.queueRequests = _0xf3acd(currentUserMediaRequest.queueRequests)); - }, !0x1), currentUserMediaRequest.streams[_0x326931] = { - 'stream': _0x1f527b - }, currentUserMediaRequest.mutex = !0x1, currentUserMediaRequest.queueRequests.length && _0x5adfda(currentUserMediaRequest.queueRequests.shift()), _0x283137.onGettingLocalMedia(_0x1f527b, _0x58cd7c); - } - } - window.currentUserMediaRequest = { - 'streams': [], - 'mutex': !0x1, - 'queueRequests': [], - 'remove': function(_0x1b91c8) { - this.mutex = !0x1; - var _0x326931 = this.streams[_0x1b91c8]; - if (_0x326931) { - var _0x2fa590 = (_0x326931 = _0x326931.stream).currentUserMediaRequestOptions; - this.queueRequests.indexOf(_0x2fa590) && (delete this.queueRequests[this.queueRequests.indexOf(_0x2fa590)], this.queueRequests = _0xf3acd(this.queueRequests)), this.streams[_0x1b91c8].stream = null, delete this.streams[_0x1b91c8]; - } - } - }; - var _0x25e82e = function() { - function _0xc80ee1(_0x19f0b1) { - if (_0x19f0b1) return 'string' == typeof _0x19f0b1 || void 0x0 === _0x19f0b1 ? _0x19f0b1 : _0x19f0b1.audio && _0x19f0b1.video ? null : _0x19f0b1.audio ? 'audio' : _0x19f0b1.video ? 'video' : void 0x0; - } - return { - 'setHandlers': function(_0x3d58a4, _0x57b7e9, _0x2faad3) { - if (_0x3d58a4 && _0x3d58a4.addEventListener) { - if (void 0x0 === _0x57b7e9 || 0x1 == _0x57b7e9) { - var _0x521a09 = 'ended'; - 'oninactive' in _0x3d58a4 && (_0x521a09 = 'inactive'), _0x3d58a4.addEventListener(_0x521a09, function() { - _0x25e82e.onSyncNeeded(this.streamid, _0x521a09); - }, !0x1); - } - _0x3d58a4.mute = function(_0x393c28, _0xb2bd8c) { - _0x393c28 = _0xc80ee1(_0x393c28), void 0x0 !== _0xb2bd8c && (_0x57b7e9 = _0xb2bd8c), void 0x0 !== _0x393c28 && 'audio' != _0x393c28 || _0x2cbba5(_0x3d58a4, 'audio').forEach(function(_0x3bbe2d) { - _0x3bbe2d.enabled = !0x1, _0x2faad3.streamEvents[_0x3d58a4.streamid].isAudioMuted = true; - }), void 0x0 !== _0x393c28 && 'video' != _0x393c28 || _0x2cbba5(_0x3d58a4, 'video').forEach(function(_0x2ba091) { - _0x2ba091.enabled = !0x1; - }), void 0x0 !== _0x57b7e9 && 0x1 != _0x57b7e9 || _0x25e82e.onSyncNeeded(_0x3d58a4.streamid, 'mute', _0x393c28), _0x2faad3.streamEvents[_0x3d58a4.streamid].muteType = _0x393c28 || 'both', _0x121233(_0x3d58a4, 'mute', _0x393c28); - }, _0x3d58a4.unmute = function(_0x557e65, _0x2dc6b7) { - _0x557e65 = _0xc80ee1(_0x557e65), void 0x0 !== _0x2dc6b7 && (_0x57b7e9 = _0x2dc6b7), - function() { - if (!_0x2faad3.streamEvents[_0x3d58a4.streamid].mediaElement) return; - var _0xc80ee1 = _0x2faad3.streamEvents[_0x3d58a4.streamid].mediaElement; - _0xc80ee1.volume = 0x0, - function _0xc80ee1(_0x537992, _0x12ab30, _0x212c93, _0x44a2b5) { - _0x44a2b5 = (_0x44a2b5 || 0x0) + 0x1; - if (_0x44a2b5 >= _0x12ab30) return; - setTimeout(function() { - _0x212c93(), _0xc80ee1(_0x537992, _0x12ab30, _0x212c93, _0x44a2b5); - }, _0x537992); - }(0xc8, 0x5, function() { - try { - _0xc80ee1.volume += 0.2; - } catch (_0x111824) { - _0xc80ee1.volume = 0x1; - } - }); - }(), void 0x0 !== _0x557e65 && 'audio' != _0x557e65 || _0x2cbba5(_0x3d58a4, 'audio').forEach(function(_0x39cdcf) { - _0x39cdcf.enabled = true, _0x2faad3.streamEvents[_0x3d58a4.streamid].isAudioMuted = !0x1; - }), void 0x0 !== _0x557e65 && 'video' != _0x557e65 || (_0x2cbba5(_0x3d58a4, 'video').forEach(function(_0x1bc1ac) { - _0x1bc1ac.enabled = true; - }), void 0x0 !== _0x557e65 && 'video' == _0x557e65 && _0x2faad3.streamEvents[_0x3d58a4.streamid].isAudioMuted && function _0xc80ee1(_0x2a12fa) { - _0x2a12fa || (_0x2a12fa = 0x0), ++_0x2a12fa < 0x64 && _0x2faad3.streamEvents[_0x3d58a4.streamid].isAudioMuted && (_0x3d58a4.mute('audio'), setTimeout(function() { - _0xc80ee1(_0x2a12fa); - }, 0x32)); - }()), void 0x0 !== _0x57b7e9 && 0x1 != _0x57b7e9 || _0x25e82e.onSyncNeeded(_0x3d58a4.streamid, 'unmute', _0x557e65), _0x2faad3.streamEvents[_0x3d58a4.streamid].unmuteType = _0x557e65 || 'both', _0x121233(_0x3d58a4, 'unmute', _0x557e65); - }; - } - }, - 'onSyncNeeded': function(_0x1963f6, _0x4e7716, _0x3963b) {} - }; - }(); - window.addEventListener('message', function(_0x48b05c) { - _0x48b05c.origin == window.location.origin && function(_0x53ae17) { - if ('PermissionDeniedError' == _0x53ae17) { - if (_0x301abf = 'PermissionDeniedError', _0x467e9d) return _0x467e9d('PermissionDeniedError'); - throw new Error('PermissionDeniedError'); - } - 'rtcmulticonnection-extension-loaded' == _0x53ae17 && (_0x301abf = 'desktop'); - _0x53ae17.sourceId && _0x467e9d && _0x467e9d(_0x427b66 = _0x53ae17.sourceId, true === _0x53ae17.canRequestAudioTrack); - }(_0x48b05c.data); - }); - var _0x427b66, _0x467e9d, _0x301abf = 'screen'; - - function _0x53da88(_0x14f9e0) { - if (_0x14f9e0) { - if ('desktop' == _0x301abf) return _0x14f9e0(true); - window.postMessage('are-you-there', '*'), setTimeout(function() { - _0x14f9e0('screen' != _0x301abf); - }, 0x7d0); - } - } - var _0x5c498f = void 0x0 !== window.InstallTrigger, - _0x1ea249 = !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0x0; - window.chrome; - - function _0x1f670d(_0x4bd5c8, _0x3b2cbe) { - if (_0x5c498f) return _0x3b2cbe('not-chrome'); - 0x2 != arguments.length && (_0x3b2cbe = _0x4bd5c8, _0x4bd5c8 = 'ajhifddimkapgcifgcodmmfdlknahffk'); - var _0x2fa590 = document.createElement('img'); - _0x2fa590.src = 'chrome-extension://' + _0x4bd5c8 + '/icon.png', _0x2fa590.onload = function() { - _0x301abf = 'screen', window.postMessage('are-you-there', '*'), setTimeout(function() { - _0x3b2cbe('screen' == _0x301abf ? 'installed-disabled' : 'installed-enabled'); - }, 0x7d0); - }, _0x2fa590.onerror = function() { - _0x3b2cbe('not-installed'); - }; - } - - function _0x1c050b(_0xe24308, _0x3ebcd4) { - if (_0x5c498f) return _0xe24308(null, { - 'mozMediaSource': 'window', - 'mediaSource': 'window' - }); - var _0x2fa590 = { - 'mandatory': { - 'chromeMediaSource': _0x301abf, - 'maxWidth': screen.width > 0x780 ? screen.width : 0x780, - 'maxHeight': screen.height > 0x438 ? screen.height : 0x438 - }, - 'optional': [] - }; - 'desktop' != _0x301abf || _0x427b66 ? ('desktop' == _0x301abf && (_0x2fa590.mandatory.chromeMediaSourceId = _0x427b66), _0xe24308(null, _0x2fa590)) : _0x3ebcd4 ? function(_0x16e1da) { - if (!_0x16e1da) throw '"callback" parameter is mandatory.'; - if (_0x427b66) return _0x16e1da(_0x427b66); - _0x467e9d = _0x16e1da, window.postMessage('audio-plus-tab', '*'); - }(function(_0x240030, _0x41af1b) { - _0x2fa590.mandatory.chromeMediaSourceId = _0x240030, _0x41af1b && (_0x2fa590.canRequestAudioTrack = true), _0xe24308('PermissionDeniedError' == _0x240030 ? _0x240030 : null, _0x2fa590); - }) : function(_0x465509) { - if (!_0x465509) throw '"callback" parameter is mandatory.'; - if (_0x427b66) return _0x465509(_0x427b66); - _0x467e9d = _0x465509, window.postMessage('get-sourceId', '*'); - }(function(_0x13bb7e) { - _0x2fa590.mandatory.chromeMediaSourceId = _0x13bb7e, _0xe24308('PermissionDeniedError' == _0x13bb7e ? _0x13bb7e : null, _0x2fa590); - }); - } - - function _0x342039(_0x4dbb06) { - var _0x326931 = {}; - return { - 'receive': function(_0x5d1473, _0x43133d, _0x584294) { - var _0x547cf6 = _0x5d1473.uuid; - if (_0x326931[_0x547cf6] || (_0x326931[_0x547cf6] = []), _0x326931[_0x547cf6].push(_0x5d1473.message), _0x5d1473.last) { - var _0x967e71 = _0x326931[_0x547cf6].join(''); - _0x5d1473.isobject && (_0x967e71 = JSON.parse(_0x967e71)); - var _0x33399d = { - 'data': _0x967e71, - 'userid': _0x43133d, - 'extra': _0x584294, - 'latency': new Date().getTime() - _0x5d1473.sendingTime - }; - _0x4dbb06.autoTranslateText ? (_0x33399d.original = _0x33399d.data, _0x4dbb06.Translator.TranslateText(_0x33399d.data, function(_0x420bda) { - _0x33399d.data = _0x420bda, _0x4dbb06.onmessage(_0x33399d); - })) : _0x4dbb06.onmessage(_0x33399d), delete _0x326931[_0x547cf6]; - } - } - }; - } - var _0x21703b = { - 'send': function(_0x3eb04b) { - var _0x326931 = _0x3eb04b.connection, - _0x2fa590 = _0x3eb04b.channel, - _0x21b268 = _0x3eb04b.remoteUserId, - _0x521a09 = _0x3eb04b.text, - _0x477fc1 = _0x326931.chunkSize || 0x3e8, - _0x2406ca = '', - _0x2b3340 = !0x1; - 'string' != typeof _0x521a09 && (_0x2b3340 = true, _0x521a09 = JSON.stringify(_0x521a09)); - var _0x5093c5 = _0x5b8d5d(), - _0x53bd37 = new Date().getTime(); - ! function _0x3eb04b(_0x452fc6, _0x2486ef) { - var _0x4068b1 = { - 'type': 'text', - 'uuid': _0x5093c5, - 'sendingTime': _0x53bd37 - }; - _0x452fc6 && (_0x2486ef = _0x452fc6, _0x4068b1.packets = parseInt(_0x2486ef.length / _0x477fc1)); - _0x2486ef.length > _0x477fc1 ? _0x4068b1.message = _0x2486ef.slice(0x0, _0x477fc1) : (_0x4068b1.message = _0x2486ef, _0x4068b1.last = true, _0x4068b1.isobject = _0x2b3340); - _0x2fa590.send(_0x4068b1, _0x21b268); - _0x2406ca = _0x2486ef.slice(_0x4068b1.message.length); - _0x2406ca.length && setTimeout(function() { - _0x3eb04b(null, _0x2406ca); - }, _0x326931.chunkInterval || 0x64); - }(_0x521a09); - } - }, - _0x2cf1f3 = { - 'handle': function(_0x519a30) { - var _0x326931 = {}; - _0x519a30.onFileStart = function(_0x2a3aa7) { - var _0x21b268 = document.createElement('div'); - if (_0x21b268.title = _0x2a3aa7.name, _0x21b268.innerHTML = ' ', _0x2a3aa7.remoteUserId && (_0x21b268.innerHTML += ' (Sharing with:' + _0x2a3aa7.remoteUserId + ')'), _0x519a30.filesContainer || (_0x519a30.filesContainer = document.body || document.documentElement), _0x519a30.filesContainer.insertBefore(_0x21b268, _0x519a30.filesContainer.firstChild), !_0x2a3aa7.remoteUserId) return _0x326931[_0x2a3aa7.uuid] = { - 'div': _0x21b268, - 'progress': _0x21b268.querySelector('progress'), - 'label': _0x21b268.querySelector('label') - }, void(_0x326931[_0x2a3aa7.uuid].progress.max = _0x2a3aa7.maxChunks); - _0x326931[_0x2a3aa7.uuid] || (_0x326931[_0x2a3aa7.uuid] = {}), _0x326931[_0x2a3aa7.uuid][_0x2a3aa7.remoteUserId] = { - 'div': _0x21b268, - 'progress': _0x21b268.querySelector('progress'), - 'label': _0x21b268.querySelector('label') - }, _0x326931[_0x2a3aa7.uuid][_0x2a3aa7.remoteUserId].progress.max = _0x2a3aa7.maxChunks; - }, _0x519a30.onFileProgress = function(_0x4330ac) { - var _0x2fa590 = _0x326931[_0x4330ac.uuid]; - _0x2fa590 && (_0x4330ac.remoteUserId && !(_0x2fa590 = _0x326931[_0x4330ac.uuid][_0x4330ac.remoteUserId]) || (_0x2fa590.progress.value = _0x4330ac.currentPosition || _0x4330ac.maxChunks || _0x2fa590.progress.max, function(_0x5df338, _0x284eff) { - if (-0x1 !== _0x5df338.position) { - var _0x2fa590 = +_0x5df338.position.toFixed(0x2).split('.')[0x1] || 0x64; - _0x284eff.innerHTML = _0x2fa590 + '%'; - } - }(_0x2fa590.progress, _0x2fa590.label))); - }, _0x519a30.onFileEnd = function(_0x60ee3b) { - var _0x2fa590 = _0x326931[_0x60ee3b.uuid]; - if (_0x2fa590) { - if (!_0x60ee3b.remoteUserId || (_0x2fa590 = _0x326931[_0x60ee3b.uuid][_0x60ee3b.remoteUserId])) { - var _0x21b268 = _0x2fa590.div; - 0x1 != _0x60ee3b.type.indexOf('image') ? _0x21b268.innerHTML = 'Download ' + _0x60ee3b.name + '
' : _0x21b268.innerHTML = 'Download ' + _0x60ee3b.name + '
'; - } - } else console.error('No such progress-helper element exist.', _0x60ee3b); - }; - } - }, - _0x400337 = { - 'handle': function(_0x386b1a) { - _0x386b1a.autoTranslateText = !0x1, _0x386b1a.language = 'en', _0x386b1a.googKey = 'AIzaSyCgB5hmFY74WYB-EoWkhr9cAGr6TiTHrEE', _0x386b1a.Translator = { - 'TranslateText': function(_0x211215, _0x254987) { - var _0x21b268 = document.createElement('script'); - _0x21b268.type = 'text/javascript'; - var _0x521a09 = encodeURIComponent(_0x211215), - _0x4a4191 = 'method' + _0x386b1a.token(); - window[_0x4a4191] = function(_0x9cc9a) { - _0x9cc9a.data && _0x9cc9a.data.translations[0x0] && _0x254987 ? _0x254987(_0x9cc9a.data.translations[0x0].translatedText) : _0x9cc9a.error && 'Daily Limit Exceeded' === _0x9cc9a.error.message ? console.error('Text translation failed. Error message: "Daily Limit Exceeded."') : _0x9cc9a.error ? console.error(_0x9cc9a.error.message) : console.error(_0x9cc9a); - }; - var _0xfca442 = 'https://www.googleapis.com/language/translate/v2?key=' + _0x386b1a.googKey + '&target=' + (_0x386b1a.language || 'en-US') + '&callback=window.' + _0x4a4191 + '&q=' + _0x521a09; - _0x21b268.src = _0xfca442, document.getElementsByTagName('head')[0x0].appendChild(_0x21b268); - }, - 'getListOfLanguages': function(_0x36cf7f) { - var _0x2fa590 = new XMLHttpRequest(); - _0x2fa590.onreadystatechange = function() { - if (_0x2fa590.readyState == XMLHttpRequest.DONE) { - var _0x386b1a = JSON.parse(_0x2fa590.responseText); - if (_0x386b1a && _0x386b1a.data && _0x386b1a.data.languages) return void _0x36cf7f(_0x386b1a.data.languages); - if (_0x386b1a.error && 'Daily Limit Exceeded' === _0x386b1a.error.message) return void console.error('Text translation failed. Error message: "Daily Limit Exceeded."'); - if (_0x386b1a.error) return void console.error(_0x386b1a.error.message); - console.error(_0x386b1a); - } - }; - var _0x21b268 = 'https://www.googleapis.com/language/translate/v2/languages?key=' + _0x386b1a.googKey + '&target=en'; - _0x2fa590.open('GET', _0x21b268, true), _0x2fa590.send(null); - } - }; - } - }; - ! function(_0x51c1c9) { - _0x326931 = _0x326931 || { - 'useDefaultDevices': true - }, _0x51c1c9.channel = _0x51c1c9.sessionid = (_0x1056a5 || location.href.replace(/\/|:|#|\?|\$|\^|%|\.|`|~|!|\+|@|\[|\||]|\|*. /g, '').split('\n').join('').split('\x0d').join('')) + ''; - var _0x21b268 = new _0x11ea4f(_0x51c1c9), - _0x521a09 = {}; - - function _0x2db9d8(_0x3112a3) { - if (_0x51c1c9.socketAutoReConnect = true, _0x51c1c9.socket) _0x3112a3 && _0x3112a3(_0x51c1c9.socket); - else { - if (void 0x0 === _0x45c30f) - if ('undefined' != typeof FirebaseConnection) window.SocketConnection = FirebaseConnection; - else { - if ('undefined' == typeof PubNubConnection) throw 'SocketConnection.js seems missed.'; - window.SocketConnection = PubNubConnection; - } - new _0x45c30f(_0x51c1c9, function(_0xbc287b) { - _0x3112a3 && _0x3112a3(_0x51c1c9.socket); - }); - } - } - - function _0x6a70ac(_0x2eb7ca, _0x54a40d) { - _0x51c1c9.socket.emit('join-room', { - 'sessionid': _0x51c1c9.sessionid, - 'session': _0x51c1c9.session, - 'mediaConstraints': _0x51c1c9.mediaConstraints, - 'sdpConstraints': _0x51c1c9.sdpConstraints, - 'streams': _0x3121c9(), - 'extra': _0x51c1c9.extra, - 'password': void 0x0 !== _0x51c1c9.password && 'object' !== _0x4ffbab(_0x51c1c9.password) ? _0x51c1c9.password : '' - }, function(_0x35f814, _0x1c1c0b) { - if (true === _0x35f814) { - if (_0x51c1c9.enableLogs && console.log('isRoomJoined: ', _0x35f814, ' roomid: ', _0x51c1c9.sessionid), _0x51c1c9.peers[_0x51c1c9.sessionid]) return; - _0x21b268.onNegotiationNeeded(_0x2eb7ca); - }!0x1 === _0x35f814 && _0x51c1c9.enableLogs && console.warn('isRoomJoined: ', _0x1c1c0b, ' roomid: ', _0x51c1c9.sessionid), _0x54a40d(_0x35f814, _0x51c1c9.sessionid, _0x1c1c0b); - }); - } - - function _0x484896(_0xaeb629) { - _0x51c1c9.enableLogs && console.log('Sending open-room signal to socket.io'), _0x51c1c9.waitingForLocalMedia = !0x1, _0x51c1c9.socket.emit('open-room', { - 'sessionid': _0x51c1c9.sessionid, - 'session': _0x51c1c9.session, - 'mediaConstraints': _0x51c1c9.mediaConstraints, - 'sdpConstraints': _0x51c1c9.sdpConstraints, - 'streams': _0x3121c9(), - 'extra': _0x51c1c9.extra, - 'identifier': _0x51c1c9.publicRoomIdentifier, - 'password': void 0x0 !== _0x51c1c9.password && 'object' !== _0x4ffbab(_0x51c1c9.password) ? _0x51c1c9.password : '' - }, function(_0x5de645, _0x24b2b1) { - true === _0x5de645 && (_0x51c1c9.enableLogs && console.log('isRoomOpened: ', _0x5de645, ' roomid: ', _0x51c1c9.sessionid), _0xaeb629(_0x5de645, _0x51c1c9.sessionid)), !0x1 === _0x5de645 && (_0x51c1c9.enableLogs && console.warn('isRoomOpened: ', _0x24b2b1, ' roomid: ', _0x51c1c9.sessionid), _0xaeb629(_0x5de645, _0x51c1c9.sessionid, _0x24b2b1)); - }); - } - - function _0x3121c9() { - try { - return _0x51c1c9.streamEvents.selectAll('local').map(function(_0x4301e9) { - return { - 'streamid': _0x4301e9.streamid, - 'tracks': _0x4301e9.stream.getTracks().length - }; - }); - } catch (_0x64ac4b) { - return []; - } - } - - function _0x373dce(_0x510ce7, _0xd10b33) { - if (_0x51c1c9.dontCaptureUserMedia || _0x510ce7.isDataOnly) _0xd10b33(); - else { - var _0x521a09 = {}; - _0x510ce7.localPeerSdpConstraints.OfferToReceiveAudio && (_0x521a09.audio = _0x51c1c9.mediaConstraints.audio), _0x510ce7.localPeerSdpConstraints.OfferToReceiveVideo && (_0x521a09.video = _0x51c1c9.mediaConstraints.video); - var _0x27fd08 = _0x510ce7.session || _0x51c1c9.session; - _0x27fd08.oneway && 'two-way' !== _0x27fd08.audio && 'two-way' !== _0x27fd08.video && 'two-way' !== _0x27fd08.screen ? _0xd10b33() : (_0x27fd08.oneway && _0x27fd08.audio && 'two-way' === _0x27fd08.audio && (_0x27fd08 = { - 'audio': true - }), (_0x27fd08.audio || _0x27fd08.video || _0x27fd08.screen) && (_0x27fd08.screen ? 'Edge' === DetectRTC.browser.name ? navigator.getDisplayMedia({ - 'video': true, - 'audio': _0x93df62(_0x51c1c9) - }).then(function(_0xceda9e) { - _0xceda9e.isScreen = true, _0x21b268.onGettingLocalMedia(_0xceda9e), !_0x27fd08.audio && !_0x27fd08.video || _0x93df62(_0x51c1c9) ? _0xd10b33(_0xceda9e) : _0x51c1c9.invokeGetUserMedia(null, _0xd10b33); - }, function(_0x15d180) { - console.error('Unable to capture screen on Edge. HTTPs and version 17+ is required.'); - }) : _0x51c1c9.getScreenConstraints(function(_0x81d091, _0x38bce3) { - _0x51c1c9.invokeGetUserMedia({ - 'audio': !!_0x93df62(_0x51c1c9) && _0x405170(_0x38bce3), - 'video': _0x38bce3, - 'isScreen': true - }, !_0x27fd08.audio && !_0x27fd08.video || _0x93df62(_0x51c1c9) ? _0xd10b33 : _0x51c1c9.invokeGetUserMedia(null, _0xd10b33)); - }) : (_0x27fd08.audio || _0x27fd08.video) && _0x51c1c9.invokeGetUserMedia(null, _0xd10b33, _0x27fd08))); - } - } - - function _0x2559f7(_0x54aa63, _0x15ef31) { - _0x54aa63 ? (_0x15ef31.audio && _0x2cbba5(_0x54aa63, 'audio').forEach(function(_0x3eb0f7) { - _0x3eb0f7.applyConstraints(_0x15ef31.audio); - }), _0x15ef31.video && _0x2cbba5(_0x54aa63, 'video').forEach(function(_0x404e22) { - _0x404e22.applyConstraints(_0x15ef31.video); - })) : _0x51c1c9.enableLogs && console.error('No stream to applyConstraints.'); - } - - function _0x44cd42(_0xa4ae78, _0xd64125, _0x3b5c67) { - _0xd64125 ? _0x21b268.replaceTrack(_0xa4ae78, _0xd64125, _0x3b5c67) : _0x51c1c9.peers.getAllParticipants().forEach(function(_0x67f7c1) { - _0x21b268.replaceTrack(_0xa4ae78, _0x67f7c1, _0x3b5c67); - }); - } - _0x21b268.onGettingLocalMedia = function(_0x399d43, _0x84fca0) { - if (_0x84fca0 = _0x84fca0 || function() {}, _0x521a09[_0x399d43.streamid]) _0x84fca0(); - else { - _0x521a09[_0x399d43.streamid] = true; - try { - _0x399d43.type = 'local'; - } catch (_0x17f6f2) {} - _0x51c1c9.setStreamEndHandler(_0x399d43), _0x412d65(_0x399d43, function(_0x2ad0da) { - _0x2ad0da.id = _0x399d43.streamid, _0x2ad0da.muted = true, _0x2ad0da.volume = 0x0, -0x1 === _0x51c1c9.attachStreams.indexOf(_0x399d43) && _0x51c1c9.attachStreams.push(_0x399d43), void 0x0 !== _0x25e82e && _0x25e82e.setHandlers(_0x399d43, true, _0x51c1c9), _0x51c1c9.streamEvents[_0x399d43.streamid] = { - 'stream': _0x399d43, - 'type': 'local', - 'mediaElement': _0x2ad0da, - 'userid': _0x51c1c9.userid, - 'extra': _0x51c1c9.extra, - 'streamid': _0x399d43.streamid, - 'isAudioMuted': true - }; - try { - ! function(_0x535d1c, _0x240dfe) { - if (_0x240dfe.stream && _0x2cbba5(_0x240dfe.stream, 'audio').length) { - if (!_0x535d1c || !_0x240dfe) throw 'Both arguments are required.'; - if (_0x535d1c.onspeaking && _0x535d1c.onsilence) { - if ('undefined' == typeof hark) throw 'hark.js not found.'; - hark(_0x240dfe.stream, { - 'onspeaking': function() { - _0x535d1c.onspeaking(_0x240dfe); - }, - 'onsilence': function() { - _0x535d1c.onsilence(_0x240dfe); - }, - 'onvolumechange': function(_0x114490, _0x4f35b0) { - _0x535d1c.onvolumechange && _0x535d1c.onvolumechange(_0x1e6a28({ - 'volume': _0x114490, - 'threshold': _0x4f35b0 - }, _0x240dfe)); - } - }); - } - } - }(_0x51c1c9, _0x51c1c9.streamEvents[_0x399d43.streamid]), _0x57b754(_0x51c1c9, _0x51c1c9.streamEvents[_0x399d43.streamid]), _0x51c1c9.onstream(_0x51c1c9.streamEvents[_0x399d43.streamid]); - } catch (_0x459936) {} - _0x84fca0(); - }, _0x51c1c9); - } - }, _0x21b268.onGettingRemoteMedia = function(_0x54dff5, _0x2bab67) { - try { - _0x54dff5.type = 'remote'; - } catch (_0x2b68f0) {} - _0x51c1c9.setStreamEndHandler(_0x54dff5, 'remote-stream'), _0x412d65(_0x54dff5, function(_0x291e4f) { - _0x291e4f.id = _0x54dff5.streamid, void 0x0 !== _0x25e82e && _0x25e82e.setHandlers(_0x54dff5, !0x1, _0x51c1c9), _0x51c1c9.streamEvents[_0x54dff5.streamid] = { - 'stream': _0x54dff5, - 'type': 'remote', - 'userid': _0x2bab67, - 'extra': _0x51c1c9.peers[_0x2bab67] ? _0x51c1c9.peers[_0x2bab67].extra : {}, - 'mediaElement': _0x291e4f, - 'streamid': _0x54dff5.streamid - }, _0x57b754(_0x51c1c9, _0x51c1c9.streamEvents[_0x54dff5.streamid]), _0x51c1c9.onstream(_0x51c1c9.streamEvents[_0x54dff5.streamid]); - }, _0x51c1c9); - }, _0x21b268.onRemovingRemoteMedia = function(_0x5e7396, _0x1a735c) { - var _0x21b268 = _0x51c1c9.streamEvents[_0x5e7396.streamid]; - _0x21b268 || (_0x21b268 = { - 'stream': _0x5e7396, - 'type': 'remote', - 'userid': _0x1a735c, - 'extra': _0x51c1c9.peers[_0x1a735c] ? _0x51c1c9.peers[_0x1a735c].extra : {}, - 'streamid': _0x5e7396.streamid, - 'mediaElement': _0x51c1c9.streamEvents[_0x5e7396.streamid] ? _0x51c1c9.streamEvents[_0x5e7396.streamid].mediaElement : null - }), _0x51c1c9.peersBackup[_0x21b268.userid] && (_0x21b268.extra = _0x51c1c9.peersBackup[_0x21b268.userid].extra), _0x51c1c9.onstreamended(_0x21b268), delete _0x51c1c9.streamEvents[_0x5e7396.streamid]; - }, _0x21b268.onNegotiationNeeded = function(_0x2d936f, _0x4e2d94, _0x5d7bb5) { - _0x5d7bb5 = _0x5d7bb5 || function() {}; - var _0x521a09 = { - 'remoteUserId': _0x4e2d94 = _0x4e2d94 || _0x2d936f.remoteUserId, - 'message': _0x2d936f = _0x2d936f || '', - 'sender': _0x51c1c9.userid - }; - _0x2d936f.remoteUserId && _0x2d936f.message && _0x2d936f.sender && (_0x521a09 = _0x2d936f), _0x2db9d8(function() { - _0x51c1c9.socket.emit(_0x51c1c9.socketMessageEvent, _0x521a09, _0x5d7bb5); - }); - }, _0x21b268.onUserLeft = function(_0x76e281) { - _0x51c1c9.deletePeer(_0x76e281); - }, _0x21b268.disconnectWith = function(_0x88879c, _0x323747) { - _0x51c1c9.socket && _0x51c1c9.socket.emit('disconnect-with', _0x88879c, _0x323747 || function() {}), _0x51c1c9.deletePeer(_0x88879c); - }, _0x51c1c9.socketOptions = { - 'transport': 'polling' - }, _0x51c1c9.openOrJoin = function(_0x66fc69, _0xba3fb1) { - _0xba3fb1 = _0xba3fb1 || function() {}, _0x51c1c9.checkPresence(_0x66fc69, function(_0x1c5cec, _0x207cb3) { - if (_0x1c5cec) { - _0x51c1c9.sessionid = _0x207cb3; - var _0x521a09, _0x429662, _0x22a5af = !!_0x51c1c9.session.oneway, - _0x5851c5 = _0x5deab2(_0x51c1c9.session); - _0x429662 = { - 'OfferToReceiveAudio': _0x51c1c9.sdpConstraints.mandatory.OfferToReceiveAudio, - 'OfferToReceiveVideo': _0x51c1c9.sdpConstraints.mandatory.OfferToReceiveVideo - }, _0x521a09 = { - 'OfferToReceiveAudio': _0x22a5af ? !!_0x51c1c9.session.audio : _0x51c1c9.sdpConstraints.mandatory.OfferToReceiveAudio, - 'OfferToReceiveVideo': _0x22a5af ? !!_0x51c1c9.session.video || !!_0x51c1c9.session.screen : _0x51c1c9.sdpConstraints.mandatory.OfferToReceiveVideo - }; - var _0x3fb79d = { - 'remoteUserId': _0x51c1c9.sessionid, - 'message': { - 'newParticipationRequest': true, - 'isOneWay': _0x22a5af, - 'isDataOnly': _0x5851c5, - 'localPeerSdpConstraints': _0x521a09, - 'remotePeerSdpConstraints': _0x429662 - }, - 'sender': _0x51c1c9.userid - }; - _0x373dce(_0x3fb79d.message, function() { - _0x6a70ac(_0x3fb79d, _0xba3fb1); - }); - } else _0x51c1c9.waitingForLocalMedia = true, _0x51c1c9.isInitiator = true, _0x51c1c9.sessionid = _0x207cb3 || _0x51c1c9.sessionid, _0x5deab2(_0x51c1c9.session) ? _0x484896(_0xba3fb1) : _0x51c1c9.captureUserMedia(function() { - _0x484896(_0xba3fb1); - }); - }); - }, _0x51c1c9.waitingForLocalMedia = !0x1, _0x51c1c9.open = function(_0x572e80, _0x37b154) { - _0x37b154 = _0x37b154 || function() {}, _0x51c1c9.waitingForLocalMedia = true, _0x51c1c9.isInitiator = true, _0x51c1c9.sessionid = _0x572e80 || _0x51c1c9.sessionid, _0x2db9d8(function() { - _0x5deab2(_0x51c1c9.session) ? _0x484896(_0x37b154) : _0x51c1c9.captureUserMedia(function() { - _0x484896(_0x37b154); - }); - }); - }, _0x51c1c9.peersBackup = {}, _0x51c1c9.deletePeer = function(_0x31e4e4) { - if (_0x31e4e4 && _0x51c1c9.peers[_0x31e4e4]) { - var _0x326931 = { - 'userid': _0x31e4e4, - 'extra': _0x51c1c9.peers[_0x31e4e4] ? _0x51c1c9.peers[_0x31e4e4].extra : {} - }; - if (_0x51c1c9.peersBackup[_0x326931.userid] && (_0x326931.extra = _0x51c1c9.peersBackup[_0x326931.userid].extra), _0x51c1c9.onleave(_0x326931), _0x51c1c9.peers[_0x31e4e4]) { - _0x51c1c9.peers[_0x31e4e4].streams.forEach(function(_0x424150) { - _0x424150.stop(); - }); - var _0x21b268 = _0x51c1c9.peers[_0x31e4e4].peer; - if (_0x21b268 && 'closed' !== _0x21b268.iceConnectionState) try { - _0x21b268.close(); - } catch (_0x24b95f) {} - _0x51c1c9.peers[_0x31e4e4] && (_0x51c1c9.peers[_0x31e4e4].peer = null, delete _0x51c1c9.peers[_0x31e4e4]); - } - } - }, _0x51c1c9.rejoin = function(_0x22fd47) { - if (!_0x51c1c9.isInitiator && _0x22fd47 && Object.keys(_0x22fd47).length) { - var _0x326931 = {}; - _0x51c1c9.peers[_0x22fd47.remoteUserId] && (_0x326931 = _0x51c1c9.peers[_0x22fd47.remoteUserId].extra, _0x51c1c9.deletePeer(_0x22fd47.remoteUserId)), _0x22fd47 && _0x22fd47.remoteUserId && (_0x51c1c9.join(_0x22fd47.remoteUserId), _0x51c1c9.onReConnecting({ - 'userid': _0x22fd47.remoteUserId, - 'extra': _0x326931 - })); - } - }, _0x51c1c9.join = function(_0x4b656a, _0x35b82f) { - _0x51c1c9.sessionid = !!_0x4b656a && (_0x4b656a.sessionid || _0x4b656a.remoteUserId || _0x4b656a) || _0x51c1c9.sessionid, _0x51c1c9.sessionid += ''; - var _0x21b268 = !0x1, - _0x521a09 = !0x1, - _0x20e7ef = !0x1, - _0x4b614d = !0x1; - if (_0x4b656a && _0x4b656a.session || !_0x4b656a || 'string' == typeof _0x4b656a) { - var _0x447147 = _0x4b656a && _0x4b656a.session || _0x51c1c9.session; - _0x20e7ef = !!_0x447147.oneway, _0x4b614d = _0x5deab2(_0x447147), _0x521a09 = { - 'OfferToReceiveAudio': _0x51c1c9.sdpConstraints.mandatory.OfferToReceiveAudio, - 'OfferToReceiveVideo': _0x51c1c9.sdpConstraints.mandatory.OfferToReceiveVideo - }, _0x21b268 = { - 'OfferToReceiveAudio': _0x20e7ef ? !!_0x51c1c9.session.audio : _0x51c1c9.sdpConstraints.mandatory.OfferToReceiveAudio, - 'OfferToReceiveVideo': _0x20e7ef ? !!_0x51c1c9.session.video || !!_0x51c1c9.session.screen : _0x51c1c9.sdpConstraints.mandatory.OfferToReceiveVideo - }; - } - var _0x13518b = function() {}; - 'function' == typeof(_0x35b82f = _0x35b82f || {}) && (_0x13518b = _0x35b82f, _0x35b82f = {}), void 0x0 !== _0x35b82f.localPeerSdpConstraints && (_0x21b268 = _0x35b82f.localPeerSdpConstraints), void 0x0 !== _0x35b82f.remotePeerSdpConstraints && (_0x521a09 = _0x35b82f.remotePeerSdpConstraints), void 0x0 !== _0x35b82f.isOneWay && (_0x20e7ef = _0x35b82f.isOneWay), void 0x0 !== _0x35b82f.isDataOnly && (_0x4b614d = _0x35b82f.isDataOnly); - var _0xcceebc = { - 'remoteUserId': _0x51c1c9.sessionid, - 'message': { - 'newParticipationRequest': true, - 'isOneWay': _0x20e7ef, - 'isDataOnly': _0x4b614d, - 'localPeerSdpConstraints': _0x21b268, - 'remotePeerSdpConstraints': _0x521a09 - }, - 'sender': _0x51c1c9.userid - }; - return _0x373dce(_0xcceebc.message, function() { - _0x2db9d8(function() { - _0x6a70ac(_0xcceebc, _0x13518b); - }); - }), _0xcceebc; - }, _0x51c1c9.publicRoomIdentifier = '', _0x51c1c9.getUserMedia = _0x51c1c9.captureUserMedia = function(_0x3ae868, _0x4adbb1) { - _0x3ae868 = _0x3ae868 || function() {}; - var _0x521a09 = _0x4adbb1 || _0x51c1c9.session; - _0x51c1c9.dontCaptureUserMedia || _0x5deab2(_0x521a09) ? _0x3ae868() : (_0x521a09.audio || _0x521a09.video || _0x521a09.screen) && (_0x521a09.screen ? 'Edge' === DetectRTC.browser.name ? navigator.getDisplayMedia({ - 'video': true, - 'audio': _0x93df62(_0x51c1c9) - }).then(function(_0x31597a) { - if (_0x31597a.isScreen = true, _0x21b268.onGettingLocalMedia(_0x31597a), !_0x521a09.audio && !_0x521a09.video || _0x93df62(_0x51c1c9)) _0x3ae868(_0x31597a); - else { - var _0x76c694 = {}; - for (var _0x1bab2d in _0x521a09) 'screen' !== _0x1bab2d && (_0x76c694[_0x1bab2d] = _0x521a09[_0x1bab2d]); - _0x51c1c9.invokeGetUserMedia(_0x4adbb1, _0x3ae868, _0x76c694); - } - }, function(_0x286f92) { - console.error('Unable to capture screen on Edge. HTTPs and version 17+ is required.'); - }) : _0x51c1c9.getScreenConstraints(function(_0x33fd74, _0x4af197) { - if (_0x33fd74) throw _0x33fd74; - _0x51c1c9.invokeGetUserMedia({ - 'audio': !!_0x93df62(_0x51c1c9) && _0x405170(_0x4af197), - 'video': _0x4af197, - 'isScreen': true - }, function(_0x295451) { - if (!_0x521a09.audio && !_0x521a09.video || _0x93df62(_0x51c1c9)) _0x3ae868(_0x295451); - else { - var _0x4af197 = {}; - for (var _0x3fbf75 in _0x521a09) 'screen' !== _0x3fbf75 && (_0x4af197[_0x3fbf75] = _0x521a09[_0x3fbf75]); - _0x51c1c9.invokeGetUserMedia(_0x4adbb1, _0x3ae868, _0x4af197); - } - }); - }) : (_0x521a09.audio || _0x521a09.video) && _0x51c1c9.invokeGetUserMedia(_0x4adbb1, _0x3ae868, _0x521a09)); - }, _0x51c1c9.onbeforeunload = function(_0x403853, _0xcfe5cf) { - _0x51c1c9.closeBeforeUnload && (_0x51c1c9.peers.getAllParticipants().forEach(function(_0x135225) { - _0x21b268.onNegotiationNeeded({ - 'userLeft': true - }, _0x135225), _0x51c1c9.peers[_0x135225] && _0x51c1c9.peers[_0x135225].peer && _0x51c1c9.peers[_0x135225].peer.close(), delete _0x51c1c9.peers[_0x135225]; - }), _0xcfe5cf || _0x51c1c9.closeSocket(), _0x51c1c9.isInitiator = !0x1); - }, window.ignoreBeforeUnload ? _0x51c1c9.closeBeforeUnload = !0x1 : (_0x51c1c9.closeBeforeUnload = true, window.addEventListener('beforeunload', _0x51c1c9.onbeforeunload, !0x1)), _0x51c1c9.userid = _0x5b8d5d(), _0x51c1c9.changeUserId = function(_0x305ce9, _0x4c71e8) { - _0x4c71e8 = _0x4c71e8 || function() {}, _0x51c1c9.userid = _0x305ce9 || _0x5b8d5d(), _0x51c1c9.socket.emit('changed-uuid', _0x51c1c9.userid, _0x4c71e8); - }, _0x51c1c9.extra = {}, _0x51c1c9.attachStreams = [], _0x51c1c9.session = { - 'audio': true, - 'video': true - }, _0x51c1c9.enableFileSharing = !0x1, _0x51c1c9.bandwidth = { - 'screen': !0x1, - 'audio': !0x1, - 'video': !0x1 - }, _0x51c1c9.codecs = { - 'audio': 'opus', - 'video': 'VP9' - }, _0x51c1c9.processSdp = function(_0xec5090) { - return _0x5407aa() ? _0xec5090 : 'Safari' === DetectRTC.browser.name ? _0xec5090 : ('VP8' === _0x51c1c9.codecs.video.toUpperCase() && (_0xec5090 = _0x42fdaa.preferCodec(_0xec5090, 'vp8')), 'VP9' === _0x51c1c9.codecs.video.toUpperCase() && (_0xec5090 = _0x42fdaa.preferCodec(_0xec5090, 'vp9')), 'H264' === _0x51c1c9.codecs.video.toUpperCase() && (_0xec5090 = _0x42fdaa.preferCodec(_0xec5090, 'h264')), 'G722' === _0x51c1c9.codecs.audio && (_0xec5090 = _0x42fdaa.removeNonG722(_0xec5090)), 'Firefox' === DetectRTC.browser.name ? _0xec5090 : ((_0x51c1c9.bandwidth.video || _0x51c1c9.bandwidth.screen) && (_0xec5090 = _0x42fdaa.setApplicationSpecificBandwidth(_0xec5090, _0x51c1c9.bandwidth, !!_0x51c1c9.session.screen)), _0x51c1c9.bandwidth.video && (_0xec5090 = _0x42fdaa.setVideoBitrates(_0xec5090, { - 'min': 0x8 * _0x51c1c9.bandwidth.video * 0x400, - 'max': 0x8 * _0x51c1c9.bandwidth.video * 0x400 - })), _0x51c1c9.bandwidth.audio && (_0xec5090 = _0x42fdaa.setOpusAttributes(_0xec5090, { - 'maxaveragebitrate': 0x8 * _0x51c1c9.bandwidth.audio * 0x400, - 'maxplaybackrate': 0x8 * _0x51c1c9.bandwidth.audio * 0x400, - 'stereo': 0x1, - 'maxptime': 0x3 - })), _0xec5090)); - }, void 0x0 !== _0x42fdaa && (_0x51c1c9.BandwidthHandler = _0x51c1c9.CodecsHandler = _0x42fdaa), _0x51c1c9.mediaConstraints = { - 'audio': { - 'mandatory': {}, - 'optional': _0x51c1c9.bandwidth.audio ? [{ - 'bandwidth': 0x8 * _0x51c1c9.bandwidth.audio * 0x400 || 0x100000 - }] : [] - }, - 'video': { - 'mandatory': {}, - 'optional': _0x51c1c9.bandwidth.video ? [{ - 'bandwidth': 0x8 * _0x51c1c9.bandwidth.video * 0x400 || 0x100000 - }, { - 'facingMode': 'user' - }] : [{ - 'facingMode': 'user' - }] - } - }, 'Firefox' === DetectRTC.browser.name && (_0x51c1c9.mediaConstraints = { - 'audio': true, - 'video': true - }), _0x326931.useDefaultDevices || DetectRTC.isMobileDevice || DetectRTC.load(function() { - var _0x1056a5, _0x326931; - if (DetectRTC.MediaDevices.forEach(function(_0x1e1549) { - 'audioinput' === _0x1e1549.kind && !0x1 !== _0x51c1c9.mediaConstraints.audio && (_0x1056a5 = _0x1e1549), 'videoinput' === _0x1e1549.kind && !0x1 !== _0x51c1c9.mediaConstraints.video && (_0x326931 = _0x1e1549); - }), _0x1056a5) { - if ('Firefox' === DetectRTC.browser.name) return void(true !== _0x51c1c9.mediaConstraints.audio ? _0x51c1c9.mediaConstraints.audio.deviceId = _0x1056a5.id : _0x51c1c9.mediaConstraints.audio = { - 'deviceId': _0x1056a5.id - }); - 0x1 == _0x51c1c9.mediaConstraints.audio && (_0x51c1c9.mediaConstraints.audio = { - 'mandatory': {}, - 'optional': [] - }), _0x51c1c9.mediaConstraints.audio.optional || (_0x51c1c9.mediaConstraints.audio.optional = []); - var _0x21b268 = [{ - 'sourceId': _0x1056a5.id - }]; - _0x51c1c9.mediaConstraints.audio.optional = _0x21b268.concat(_0x51c1c9.mediaConstraints.audio.optional); - } - if (_0x326931) { - if ('Firefox' === DetectRTC.browser.name) return void(true !== _0x51c1c9.mediaConstraints.video ? _0x51c1c9.mediaConstraints.video.deviceId = _0x326931.id : _0x51c1c9.mediaConstraints.video = { - 'deviceId': _0x326931.id - }); - 0x1 == _0x51c1c9.mediaConstraints.video && (_0x51c1c9.mediaConstraints.video = { - 'mandatory': {}, - 'optional': [] - }), _0x51c1c9.mediaConstraints.video.optional || (_0x51c1c9.mediaConstraints.video.optional = []); - _0x21b268 = [{ - 'sourceId': _0x326931.id - }]; - _0x51c1c9.mediaConstraints.video.optional = _0x21b268.concat(_0x51c1c9.mediaConstraints.video.optional); - } - }), _0x51c1c9.sdpConstraints = { - 'mandatory': { - 'OfferToReceiveAudio': true, - 'OfferToReceiveVideo': true - }, - 'optional': [{ - 'VoiceActivityDetection': !0x1 - }] - }, _0x51c1c9.sdpSemantics = null, _0x51c1c9.iceCandidatePoolSize = null, _0x51c1c9.bundlePolicy = null, _0x51c1c9.rtcpMuxPolicy = null, _0x51c1c9.iceTransportPolicy = null, _0x51c1c9.optionalArgument = { - 'optional': [{ - 'DtlsSrtpKeyAgreement': true - }, { - 'googImprovedWifiBwe': true - }, { - 'googScreencastMinBitrate': 0x12c - }, { - 'googIPv6': true - }, { - 'googDscp': true - }, { - 'googCpuUnderuseThreshold': 0x37 - }, { - 'googCpuOveruseThreshold': 0x55 - }, { - 'googSuspendBelowMinBitrate': true - }, { - 'googCpuOveruseDetection': true - }], - 'mandatory': {} - }, _0x51c1c9.iceServers = _0x3b9609.getIceServers(_0x51c1c9), _0x51c1c9.candidates = { - 'host': true, - 'stun': true, - 'turn': true - }, _0x51c1c9.iceProtocols = { - 'tcp': true, - 'udp': true - }, _0x51c1c9.onopen = function(_0x44d923) { - _0x51c1c9.enableLogs && console.info('Data connection has been opened between you & ', _0x44d923.userid); - }, _0x51c1c9.onclose = function(_0x4bc33b) { - _0x51c1c9.enableLogs && console.warn('Data connection has been closed between you & ', _0x4bc33b.userid); - }, _0x51c1c9.onerror = function(_0x119131) { - _0x51c1c9.enableLogs && console.error(_0x119131.userid, 'data-error', _0x119131); - }, _0x51c1c9.onmessage = function(_0x377929) { - _0x51c1c9.enableLogs && console.debug('data-message', _0x377929.userid, _0x377929.data); - }, _0x51c1c9.send = function(_0x21e29b, _0x2e0c9a) { - _0x51c1c9.peers.send(_0x21e29b, _0x2e0c9a); - }, _0x51c1c9.close = _0x51c1c9.disconnect = _0x51c1c9.leave = function() { - _0x51c1c9.onbeforeunload(!0x1, true); - }, _0x51c1c9.closeEntireSession = function(_0x5971f7) { - _0x5971f7 = _0x5971f7 || function() {}, _0x51c1c9.socket.emit('close-entire-session', function _0x326931() { - _0x51c1c9.getAllParticipants().length ? setTimeout(_0x326931, 0x64) : (_0x51c1c9.onEntireSessionClosed({ - 'sessionid': _0x51c1c9.sessionid, - 'userid': _0x51c1c9.userid, - 'extra': _0x51c1c9.extra - }), _0x51c1c9.changeUserId(null, function() { - _0x51c1c9.close(), _0x5971f7(); - })); - }); - }, _0x51c1c9.onEntireSessionClosed = function(_0x308fc8) { - _0x51c1c9.enableLogs && console.info('Entire session is closed: ', _0x308fc8.sessionid, _0x308fc8.extra); - }, _0x51c1c9.onstream = function(_0x2795c9) { - var _0x326931 = _0x51c1c9.videosContainer; - _0x326931.insertBefore(_0x2795c9.mediaElement, _0x326931.firstChild); - var _0x21b268 = _0x2795c9.mediaElement.play(); - void 0x0 === _0x21b268 ? setTimeout(function() { - _0x2795c9.mediaElement.play(); - }, 0x7d0) : _0x21b268.catch(function() {}).then(function() { - setTimeout(function() { - _0x2795c9.mediaElement.play(); - }, 0x7d0); - }); - }, _0x51c1c9.onstreamended = function(_0x22b684) { - _0x22b684.mediaElement || (_0x22b684.mediaElement = document.getElementById(_0x22b684.streamid)), _0x22b684.mediaElement && _0x22b684.mediaElement.parentNode && _0x22b684.mediaElement.parentNode.removeChild(_0x22b684.mediaElement); - }, _0x51c1c9.direction = 'many-to-many', _0x51c1c9.removeStream = function(_0x5af7be, _0x17537a) { - var _0x21b268; - _0x51c1c9.attachStreams.forEach(function(_0xc4fbb0) { - _0xc4fbb0.id === _0x5af7be && (_0x21b268 = _0xc4fbb0); - }), _0x21b268 ? (_0x51c1c9.peers.getAllParticipants().forEach(function(_0x2bd479) { - if (!_0x17537a || _0x2bd479 === _0x17537a) { - var _0x521a09 = _0x51c1c9.peers[_0x2bd479]; - try { - _0x521a09.peer.removeStream(_0x21b268); - } catch (_0x159ea4) {} - } - }), _0x51c1c9.renegotiate()) : console.warn('No such stream exist.', _0x5af7be); - }, _0x51c1c9.addStream = function(_0x44d589, _0x5d1f28) { - if (_0x44d589.getTracks) return -0x1 === _0x51c1c9.attachStreams.indexOf(_0x44d589) && (_0x44d589.streamid || (_0x44d589.streamid = _0x44d589.id), _0x51c1c9.attachStreams.push(_0x44d589)), void _0x51c1c9.renegotiate(_0x5d1f28); - - function _0x5a47df(_0x4cd18b) { - _0x44d589.streamCallback && _0x44d589.streamCallback(_0x4cd18b), _0x51c1c9.renegotiate(_0x5d1f28); - } - _0x5deab2(_0x44d589) ? _0x51c1c9.renegotiate(_0x5d1f28) : (_0x44d589.audio || _0x44d589.video || _0x44d589.screen) && (_0x44d589.screen ? 'Edge' === DetectRTC.browser.name ? navigator.getDisplayMedia({ - 'video': true, - 'audio': _0x93df62(_0x51c1c9) - }).then(function(_0x3bef4d) { - _0x3bef4d.isScreen = true, _0x21b268.onGettingLocalMedia(_0x3bef4d), !_0x44d589.audio && !_0x44d589.video || _0x93df62(_0x51c1c9) ? _0x5a47df(_0x3bef4d) : _0x51c1c9.invokeGetUserMedia(null, function(_0x108d5e) { - _0x5a47df(_0x108d5e); - }); - }, function(_0x107d05) { - console.error('Unable to capture screen on Edge. HTTPs and version 17+ is required.'); - }) : _0x51c1c9.getScreenConstraints(function(_0x247e33, _0x20dba5) { - if (_0x247e33) return 'PermissionDeniedError' === _0x247e33 ? (_0x44d589.streamCallback && _0x44d589.streamCallback(null), void(_0x51c1c9.enableLogs && console.error('User rejected to share his screen.'))) : alert(_0x247e33); - _0x51c1c9.invokeGetUserMedia({ - 'audio': !!_0x93df62(_0x51c1c9) && _0x405170(_0x20dba5), - 'video': _0x20dba5, - 'isScreen': true - }, function(_0x3558fb) { - !_0x44d589.audio && !_0x44d589.video || _0x93df62(_0x51c1c9) ? _0x5a47df(_0x3558fb) : _0x51c1c9.invokeGetUserMedia(null, function(_0x301cff) { - _0x5a47df(_0x301cff); - }); - }); - }) : (_0x44d589.audio || _0x44d589.video) && _0x51c1c9.invokeGetUserMedia(null, _0x5a47df)); - }, _0x51c1c9.invokeGetUserMedia = function(_0x39db84, _0x4c2007, _0x587a84) { - _0x587a84 || (_0x587a84 = _0x51c1c9.session), _0x39db84 || (_0x39db84 = _0x51c1c9.mediaConstraints), _0x5adfda({ - 'onGettingLocalMedia': function(_0x4608af) { - var _0x587a84 = _0x39db84.video; - _0x587a84 && (_0x587a84.mediaSource || _0x587a84.mozMediaSource ? _0x4608af.isScreen = true : _0x587a84.mandatory && _0x587a84.mandatory.chromeMediaSource && (_0x4608af.isScreen = true)), _0x4608af.isScreen || (_0x4608af.isVideo = !!_0x2cbba5(_0x4608af, 'video').length, _0x4608af.isAudio = !_0x4608af.isVideo && _0x2cbba5(_0x4608af, 'audio').length), _0x21b268.onGettingLocalMedia(_0x4608af, function() { - 'function' == typeof _0x4c2007 && _0x4c2007(_0x4608af); - }); - }, - 'onLocalMediaError': function(_0x290ef1, _0x3a75f5) { - _0x21b268.onLocalMediaError(_0x290ef1, _0x3a75f5); - }, - 'localMediaConstraints': _0x39db84 || { - 'audio': !!_0x587a84.audio && _0x39db84.audio, - 'video': !!_0x587a84.video && _0x39db84.video - } - }); - }, _0x51c1c9.applyConstraints = function(_0x314dfa, _0x295b4a) { - if (_0x1d01b4 && _0x1d01b4.prototype.applyConstraints) { - var _0x21b268; - if (_0x295b4a) return _0x51c1c9.streamEvents[_0x295b4a] && (_0x21b268 = _0x51c1c9.streamEvents[_0x295b4a].stream), void _0x2559f7(_0x21b268, _0x314dfa); - _0x51c1c9.attachStreams.forEach(function(_0x4e7a56) { - _0x2559f7(_0x4e7a56, _0x314dfa); - }); - } else alert('track.applyConstraints is NOT supported in your browser.'); - }, _0x51c1c9.replaceTrack = function(_0x3642cb, _0xd04c26, _0x485038) { - if (_0x3642cb = _0x3642cb || {}, _0x2a4be1.prototype.getSenders) - if (_0x3642cb instanceof _0x1d01b4) _0x44cd42(_0x3642cb, _0xd04c26, _0x485038); - else { - if (_0x3642cb instanceof _0x1d809b) return _0x2cbba5(_0x3642cb, 'video').length && _0x44cd42(_0x2cbba5(_0x3642cb, 'video')[0x0], _0xd04c26, true), void(_0x2cbba5(_0x3642cb, 'audio').length && _0x44cd42(_0x2cbba5(_0x3642cb, 'audio')[0x0], _0xd04c26, !0x1)); - if (_0x5deab2(_0x3642cb)) throw 'connection.replaceTrack requires audio and/or video and/or screen.'; - (_0x3642cb.audio || _0x3642cb.video || _0x3642cb.screen) && (_0x3642cb.screen ? 'Edge' === DetectRTC.browser.name ? navigator.getDisplayMedia({ - 'video': true, - 'audio': _0x93df62(_0x51c1c9) - }).then(function(_0x675faf) { - _0x675faf.isScreen = true, _0x21b268.onGettingLocalMedia(_0x675faf), !_0x3642cb.audio && !_0x3642cb.video || _0x93df62(_0x51c1c9) ? _0x564a08(_0x675faf) : _0x51c1c9.invokeGetUserMedia(null, _0x564a08); - }, function(_0x4219c9) { - console.error('Unable to capture screen on Edge. HTTPs and version 17+ is required.'); - }) : _0x51c1c9.getScreenConstraints(function(_0x38cb24, _0x2fa66e) { - if (_0x38cb24) return alert(_0x38cb24); - _0x51c1c9.invokeGetUserMedia({ - 'audio': !!_0x93df62(_0x51c1c9) && _0x405170(_0x2fa66e), - 'video': _0x2fa66e, - 'isScreen': true - }, !_0x3642cb.audio && !_0x3642cb.video || _0x93df62(_0x51c1c9) ? _0x564a08 : _0x51c1c9.invokeGetUserMedia(null, _0x564a08)); - }) : (_0x3642cb.audio || _0x3642cb.video) && _0x51c1c9.invokeGetUserMedia(null, _0x564a08)); - } - else _0x51c1c9.addStream(_0x3642cb); - - function _0x564a08(_0x547ff0) { - _0x51c1c9.replaceTrack(_0x547ff0, _0xd04c26, _0x485038 || _0x3642cb.video || _0x3642cb.screen); - } - }, _0x51c1c9.resetTrack = function(_0x1215de, _0x3d0c09) { - _0x1215de || (_0x1215de = _0x51c1c9.getAllParticipants()), 'string' == typeof _0x1215de && (_0x1215de = [_0x1215de]), _0x1215de.forEach(function(_0x17e765) { - var _0x21b268 = _0x51c1c9.peers[_0x17e765].peer; - void 0x0 !== _0x3d0c09 && true !== _0x3d0c09 || !_0x21b268.lastVideoTrack || _0x51c1c9.replaceTrack(_0x21b268.lastVideoTrack, _0x17e765, true), void 0x0 !== _0x3d0c09 && !0x1 !== _0x3d0c09 || !_0x21b268.lastAudioTrack || _0x51c1c9.replaceTrack(_0x21b268.lastAudioTrack, _0x17e765, !0x1); - }); - }, _0x51c1c9.renegotiate = function(_0x2ea770) { - _0x2ea770 ? _0x21b268.renegotiatePeer(_0x2ea770) : _0x51c1c9.peers.getAllParticipants().forEach(function(_0x428915) { - _0x21b268.renegotiatePeer(_0x428915); - }); - }, _0x51c1c9.setStreamEndHandler = function(_0x46fab4, _0x3cea1b) { - if (_0x46fab4 && _0x46fab4.addEventListener && (_0x3cea1b = !!_0x3cea1b, !_0x46fab4.alreadySetEndHandler)) { - _0x46fab4.alreadySetEndHandler = true; - var _0x21b268 = 'ended'; - 'oninactive' in _0x46fab4 && (_0x21b268 = 'inactive'), _0x46fab4.addEventListener(_0x21b268, function() { - if (_0x46fab4.idInstance && currentUserMediaRequest.remove(_0x46fab4.idInstance), !_0x3cea1b) { - var _0x21b268 = []; - _0x51c1c9.attachStreams.forEach(function(_0x35d5da) { - _0x35d5da.id != _0x46fab4.id && _0x21b268.push(_0x35d5da); - }), _0x51c1c9.attachStreams = _0x21b268; - } - var _0x521a09 = _0x51c1c9.streamEvents[_0x46fab4.streamid]; - if (_0x521a09 || (_0x521a09 = { - 'stream': _0x46fab4, - 'streamid': _0x46fab4.streamid, - 'type': _0x3cea1b ? 'remote' : 'local', - 'userid': _0x51c1c9.userid, - 'extra': _0x51c1c9.extra, - 'mediaElement': _0x51c1c9.streamEvents[_0x46fab4.streamid] ? _0x51c1c9.streamEvents[_0x46fab4.streamid].mediaElement : null - }), _0x3cea1b && _0x51c1c9.peers[_0x521a09.userid]) { - var _0x38a800 = _0x51c1c9.peers[_0x521a09.userid].peer; - _0x21b268 = []; - _0x38a800.getRemoteStreams().forEach(function(_0x59d565) { - _0x59d565.id != _0x46fab4.id && _0x21b268.push(_0x59d565); - }), _0x51c1c9.peers[_0x521a09.userid].streams = _0x21b268; - } - _0x521a09.userid === _0x51c1c9.userid && 'remote' === _0x521a09.type || (_0x51c1c9.peersBackup[_0x521a09.userid] && (_0x521a09.extra = _0x51c1c9.peersBackup[_0x521a09.userid].extra), _0x51c1c9.onstreamended(_0x521a09), delete _0x51c1c9.streamEvents[_0x46fab4.streamid]); - }, !0x1); - } - }, _0x51c1c9.onMediaError = function(_0x77c67c, _0x3533b2) { - _0x51c1c9.enableLogs && console.error(_0x77c67c, _0x3533b2); - }, _0x51c1c9.autoCloseEntireSession = !0x1, _0x51c1c9.filesContainer = _0x51c1c9.videosContainer = document.body || document.documentElement, _0x51c1c9.isInitiator = !0x1, _0x51c1c9.shareFile = _0x21b268.shareFile, void 0x0 !== _0x2cf1f3 && _0x2cf1f3.handle(_0x51c1c9), void 0x0 !== _0x400337 && _0x400337.handle(_0x51c1c9), _0x51c1c9.token = _0x5b8d5d, _0x51c1c9.onNewParticipant = function(_0xeb9f65, _0xbff370) { - _0x51c1c9.acceptParticipationRequest(_0xeb9f65, _0xbff370); - }, _0x51c1c9.acceptParticipationRequest = function(_0xdc5fa8, _0x444726) { - _0x444726.successCallback && (_0x444726.successCallback(), delete _0x444726.successCallback), _0x21b268.createNewPeer(_0xdc5fa8, _0x444726); - }, void 0x0 !== _0x25e82e && (_0x51c1c9.StreamsHandler = _0x25e82e), _0x51c1c9.onleave = function(_0x256c0a) {}, _0x51c1c9.invokeSelectFileDialog = function(_0x54e1d5) { - var _0x326931 = new _0x2e28ea(); - _0x326931.accept = '*.*', _0x326931.selectSingleFile(_0x54e1d5); - }, _0x51c1c9.onmute = function(_0x4cea9f) { - if (_0x4cea9f && _0x4cea9f.mediaElement) - if ('both' === _0x4cea9f.muteType || 'video' === _0x4cea9f.muteType) { - _0x4cea9f.mediaElement.src = null; - var _0x326931 = _0x4cea9f.mediaElement.pause(); - void 0x0 !== _0x326931 ? _0x326931.then(function() { - _0x4cea9f.mediaElement.poster = _0x4cea9f.snapshot || 'https://cdn.webrtc-experiment.com/images/muted.png'; - }) : _0x4cea9f.mediaElement.poster = _0x4cea9f.snapshot || 'https://cdn.webrtc-experiment.com/images/muted.png'; - } else 'audio' === _0x4cea9f.muteType && (_0x4cea9f.mediaElement.muted = true); - }, _0x51c1c9.onunmute = function(_0x59c1a4) { - _0x59c1a4 && _0x59c1a4.mediaElement && _0x59c1a4.stream && ('both' === _0x59c1a4.unmuteType || 'video' === _0x59c1a4.unmuteType ? (_0x59c1a4.mediaElement.poster = null, _0x59c1a4.mediaElement.srcObject = _0x59c1a4.stream, _0x59c1a4.mediaElement.play()) : 'audio' === _0x59c1a4.unmuteType && (_0x59c1a4.mediaElement.muted = !0x1)); - }, _0x51c1c9.onExtraDataUpdated = function(_0x429b15) { - _0x429b15.status = 'online', _0x51c1c9.onUserStatusChanged(_0x429b15, true); - }, _0x51c1c9.getAllParticipants = function(_0x57626c) { - return _0x51c1c9.peers.getAllParticipants(_0x57626c); - }, void 0x0 !== _0x25e82e && (_0x25e82e.onSyncNeeded = function(_0x45be06, _0x6b0c44, _0xe6bdb1) { - _0x51c1c9.peers.getAllParticipants().forEach(function(_0x26b256) { - _0x21b268.onNegotiationNeeded({ - 'streamid': _0x45be06, - 'action': _0x6b0c44, - 'streamSyncNeeded': true, - 'type': _0xe6bdb1 || 'both' - }, _0x26b256); - }); - }), _0x51c1c9.connectSocket = function(_0x5d44b4) { - _0x2db9d8(_0x5d44b4); - }, _0x51c1c9.closeSocket = function() { - try { - _0x31267b.a.sockets = {}; - } catch (_0x3aa9a3) {} - _0x51c1c9.socket && ('function' == typeof _0x51c1c9.socket.disconnect && _0x51c1c9.socket.disconnect(), 'function' == typeof _0x51c1c9.socket.resetProps && _0x51c1c9.socket.resetProps(), _0x51c1c9.socket = null); - }, _0x51c1c9.getSocket = function(_0x456c98) { - return !_0x456c98 && _0x51c1c9.enableLogs && console.warn('getSocket.callback paramter is required.'), _0x456c98 = _0x456c98 || function() {}, _0x51c1c9.socket ? _0x456c98(_0x51c1c9.socket) : _0x2db9d8(function() { - _0x456c98(_0x51c1c9.socket); - }), _0x51c1c9.socket; - }, _0x51c1c9.getRemoteStreams = _0x21b268.getRemoteStreams; - var _0x521c36 = ['selectFirst', 'selectAll', 'forEach']; - if (_0x51c1c9.streamEvents = { - 'selectFirst': function(_0x38ce07) { - return _0x51c1c9.streamEvents.selectAll(_0x38ce07)[0x0]; - }, - 'selectAll': function(_0x4b13fa) { - _0x4b13fa || (_0x4b13fa = { - 'local': true, - 'remote': true, - 'isScreen': true, - 'isAudio': true, - 'isVideo': true - }), 'local' == _0x4b13fa && (_0x4b13fa = { - 'local': true - }), 'remote' == _0x4b13fa && (_0x4b13fa = { - 'remote': true - }), 'screen' == _0x4b13fa && (_0x4b13fa = { - 'isScreen': true - }), 'audio' == _0x4b13fa && (_0x4b13fa = { - 'isAudio': true - }), 'video' == _0x4b13fa && (_0x4b13fa = { - 'isVideo': true - }); - var _0x326931 = []; - return Object.keys(_0x51c1c9.streamEvents).forEach(function(_0x59aced) { - var _0x521a09 = _0x51c1c9.streamEvents[_0x59aced]; - if (-0x1 === _0x521c36.indexOf(_0x59aced)) { - var _0x293b8c = true; - _0x4b13fa.local && 'local' === _0x521a09.type && (_0x293b8c = !0x1), _0x4b13fa.remote && 'remote' === _0x521a09.type && (_0x293b8c = !0x1), _0x4b13fa.isScreen && _0x521a09.stream.isScreen && (_0x293b8c = !0x1), _0x4b13fa.isVideo && _0x521a09.stream.isVideo && (_0x293b8c = !0x1), _0x4b13fa.isAudio && _0x521a09.stream.isAudio && (_0x293b8c = !0x1), _0x4b13fa.userid && _0x521a09.userid === _0x4b13fa.userid && (_0x293b8c = !0x1), !0x1 === _0x293b8c && _0x326931.push(_0x521a09); - } - }), _0x326931; - } - }, _0x51c1c9.socketURL = '/', _0x51c1c9.socketMessageEvent = 'RTCMultiConnection-Message', _0x51c1c9.socketCustomEvent = 'RTCMultiConnection-Custom-Message', _0x51c1c9.DetectRTC = DetectRTC, _0x51c1c9.setCustomSocketEvent = function(_0x1a650b) { - _0x1a650b && (_0x51c1c9.socketCustomEvent = _0x1a650b), _0x51c1c9.socket && _0x51c1c9.socket.emit('set-custom-socket-event-listener', _0x51c1c9.socketCustomEvent); - }, _0x51c1c9.getNumberOfBroadcastViewers = function(_0x2acdba, _0x377d0c) { - _0x51c1c9.socket && _0x2acdba && _0x377d0c && _0x51c1c9.socket.emit('get-number-of-users-in-specific-broadcast', _0x2acdba, _0x377d0c); - }, _0x51c1c9.onNumberOfBroadcastViewersUpdated = function(_0x617e81) { - _0x51c1c9.enableLogs && _0x51c1c9.isInitiator && console.info('Number of broadcast (', _0x617e81.broadcastId, ') viewers', _0x617e81.numberOfBroadcastViewers); - }, _0x51c1c9.onUserStatusChanged = function(_0x49e25f, _0x405028) { - _0x51c1c9.enableLogs && !_0x405028 && console.info(_0x49e25f.userid, _0x49e25f.status); - }, _0x51c1c9.getUserMediaHandler = _0x5adfda, _0x51c1c9.multiPeersHandler = _0x21b268, _0x51c1c9.enableLogs = true, _0x51c1c9.setCustomSocketHandler = function(_0x5840b1) { - void 0x0 !== _0x45c30f && (_0x45c30f = _0x5840b1); - }, _0x51c1c9.chunkSize = 0x9c40, _0x51c1c9.maxParticipantsAllowed = 0x3e8, _0x51c1c9.disconnectWith = _0x21b268.disconnectWith, _0x51c1c9.checkPresence = function(_0x2c66c1, _0xdf4545) { - _0x2c66c1 = _0x2c66c1 || _0x51c1c9.sessionid, 'SSEConnection' !== _0x45c30f.name ? _0x51c1c9.socket ? _0x51c1c9.socket.emit('check-presence', _0x2c66c1 + '', function(_0x4d585b, _0xfb6315, _0x414b29) { - _0x51c1c9.enableLogs && console.log('checkPresence.isRoomExist: ', _0x4d585b, ' roomid: ', _0xfb6315), _0xdf4545(_0x4d585b, _0xfb6315, _0x414b29); - }) : _0x51c1c9.connectSocket(function() { - _0x51c1c9.checkPresence(_0x2c66c1, _0xdf4545); - }) : SSEConnection.checkPresence(_0x2c66c1, function(_0x2d2553, _0x169410, _0x48e686) { - if (!_0x51c1c9.socket) return _0x2d2553 || (_0x51c1c9.userid = _0x169410), void _0x51c1c9.connectSocket(function() { - _0xdf4545(_0x2d2553, _0x169410, _0x48e686); - }); - _0xdf4545(_0x2d2553, _0x169410); - }); - }, _0x51c1c9.onReadyForOffer = function(_0x3f207b, _0x32ccc2) { - _0x51c1c9.multiPeersHandler.createNewPeer(_0x3f207b, _0x32ccc2); - }, _0x51c1c9.setUserPreferences = function(_0x371937) { - return _0x51c1c9.dontAttachStream && (_0x371937.dontAttachLocalStream = true), _0x51c1c9.dontGetRemoteStream && (_0x371937.dontGetRemoteStream = true), _0x371937; - }, _0x51c1c9.updateExtraData = function() { - _0x51c1c9.socket.emit('extra-data-updated', _0x51c1c9.extra); - }, _0x51c1c9.enableScalableBroadcast = !0x1, _0x51c1c9.maxRelayLimitPerUser = 0x3, _0x51c1c9.dontCaptureUserMedia = !0x1, _0x51c1c9.dontAttachStream = !0x1, _0x51c1c9.dontGetRemoteStream = !0x1, _0x51c1c9.onReConnecting = function(_0x4ffc93) { - _0x51c1c9.enableLogs && console.info('ReConnecting with', _0x4ffc93.userid, '...'); - }, _0x51c1c9.beforeAddingStream = function(_0xdd57a4) { - return _0xdd57a4; - }, _0x51c1c9.beforeRemovingStream = function(_0x191d70) { - return _0x191d70; - }, _0x51c1c9.checkIfChromeExtensionAvailable = _0x53da88, 'undefined' != typeof isFirefoxExtensionAvailable && (_0x51c1c9.checkIfChromeExtensionAvailable = isFirefoxExtensionAvailable), _0x51c1c9.getChromeExtensionStatus = _0x1f670d, _0x51c1c9.getScreenConstraints = function(_0x3b0f5e, _0x32535a) { - _0x93df62(_0x51c1c9, _0x32535a) && (_0x32535a = true), _0x1c050b(function(_0x19ad7c, _0x5c7f16) { - _0x19ad7c || (_0x5c7f16 = _0x51c1c9.modifyScreenConstraints(_0x5c7f16), _0x3b0f5e(_0x19ad7c, _0x5c7f16)); - }, _0x32535a); - }, _0x51c1c9.modifyScreenConstraints = function(_0x13a10e) { - return _0x13a10e; - }, _0x51c1c9.onPeerStateChanged = function(_0x5d030a) { - _0x51c1c9.enableLogs && -0x1 !== _0x5d030a.iceConnectionState.search(/closed|failed/gi) && console.error('Peer connection is closed between you & ', _0x5d030a.userid, _0x5d030a.extra, 'state:', _0x5d030a.iceConnectionState); - }, _0x51c1c9.isOnline = true, _0x1cbceb('online', function() { - _0x51c1c9.isOnline = true; - }), _0x1cbceb('offline', function() { - _0x51c1c9.isOnline = !0x1; - }), _0x51c1c9.isLowBandwidth = !0x1, navigator && navigator.connection && navigator.connection.type && (_0x51c1c9.isLowBandwidth = -0x1 !== navigator.connection.type.toString().toLowerCase().search(/wifi|cell/g), _0x51c1c9.isLowBandwidth)) { - if (_0x51c1c9.bandwidth = { - 'audio': !0x1, - 'video': !0x1, - 'screen': !0x1 - }, _0x51c1c9.mediaConstraints.audio && _0x51c1c9.mediaConstraints.audio.optional && _0x51c1c9.mediaConstraints.audio.optional.length) { - var _0x4c7586 = []; - _0x51c1c9.mediaConstraints.audio.optional.forEach(function(_0x330c5b) { - void 0x0 === _0x330c5b.bandwidth && _0x4c7586.push(_0x330c5b); - }), _0x51c1c9.mediaConstraints.audio.optional = _0x4c7586; - } - if (_0x51c1c9.mediaConstraints.video && _0x51c1c9.mediaConstraints.video.optional && _0x51c1c9.mediaConstraints.video.optional.length) { - _0x4c7586 = []; - _0x51c1c9.mediaConstraints.video.optional.forEach(function(_0x427f57) { - void 0x0 === _0x427f57.bandwidth && _0x4c7586.push(_0x427f57); - }), _0x51c1c9.mediaConstraints.video.optional = _0x4c7586; - } - } - _0x51c1c9.getExtraData = function(_0xeb7d85, _0x11bbdf) { - if (!_0xeb7d85) throw 'remoteUserId is required.'; - if (!_0x11bbdf) return _0x51c1c9.peers[_0xeb7d85] ? _0x51c1c9.peers[_0xeb7d85].extra : _0x51c1c9.peersBackup[_0xeb7d85] ? _0x51c1c9.peersBackup[_0xeb7d85].extra : {}; - _0x51c1c9.socket.emit('get-remote-user-extra-data', _0xeb7d85, function(_0x2b3ef8, _0x272a14, _0x50b4c5) { - _0x11bbdf(_0x2b3ef8, _0x272a14, _0x50b4c5); - }); - }, _0x326931.autoOpenOrJoin && _0x51c1c9.openOrJoin(_0x51c1c9.sessionid), _0x51c1c9.onUserIdAlreadyTaken = function(_0x375333, _0x594a1c) { - _0x51c1c9.close(), _0x51c1c9.closeSocket(), _0x51c1c9.isInitiator = !0x1, _0x51c1c9.userid = _0x51c1c9.token(), _0x51c1c9.join(_0x51c1c9.sessionid), _0x51c1c9.enableLogs && console.warn('Userid already taken.', _0x375333, 'Your new userid:', _0x51c1c9.userid); - }, _0x51c1c9.trickleIce = true, _0x51c1c9.version = '3.6.5', _0x51c1c9.onSettingLocalDescription = function(_0x5cd808) { - _0x51c1c9.enableLogs && console.info('Set local description for remote user', _0x5cd808.userid); - }, _0x51c1c9.resetScreen = function() { - _0x427b66 = null, DetectRTC && DetectRTC.screen && delete DetectRTC.screen.sourceId, currentUserMediaRequest = { - 'streams': [], - 'mutex': !0x1, - 'queueRequests': [] - }; - }, _0x51c1c9.autoCreateMediaElement = true, _0x51c1c9.password = null, _0x51c1c9.setPassword = function(_0x3fec38, _0x196913) { - _0x196913 = _0x196913 || function() {}, _0x51c1c9.socket ? _0x51c1c9.socket.emit('set-password', _0x3fec38, _0x196913) : (_0x51c1c9.password = _0x3fec38, _0x196913(true, _0x51c1c9.sessionid, null)); - }, _0x51c1c9.errors = { - 'ROOM_NOT_AVAILABLE': 'Room not available', - 'INVALID_PASSWORD': 'Invalid password', - 'USERID_NOT_AVAILABLE': 'User ID does not exist', - 'ROOM_PERMISSION_DENIED': 'Room permission denied', - 'ROOM_FULL': 'Room full', - 'DID_NOT_JOIN_ANY_ROOM': 'Did not join any room yet', - 'INVALID_SOCKET': 'Invalid socket', - 'PUBLIC_IDENTIFIER_MISSING': 'publicRoomIdentifier is required', - 'INVALID_ADMIN_CREDENTIAL': 'Invalid username or password attempted' - }; - }(this); - }; - }.call(this, _0x2fa590(0x49).Buffer, _0x2fa590(0x1f), _0x2fa590(0x31))); -}, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, function(_0x27927d, _0x28eced) { - _0x27927d.exports = function(_0x2da20d) { - var _0x28eced = []; - return _0x28eced.toString = function() { - return this.map(function(_0x375981) { - var _0x413325 = function(_0x5f5847, _0x5366c6) { - var _0x48f7cd = _0x5f5847[0x1] || '', - _0x237fae = _0x5f5847[0x3]; - if (!_0x237fae) return _0x48f7cd; - if (_0x5366c6 && 'function' == typeof btoa) { - var _0x489b4a = (_0x5a6547 = _0x237fae, '/*# sourceMappingURL=data:application/json;charset=utf-8;base64,' + btoa(unescape(encodeURIComponent(JSON.stringify(_0x5a6547)))) + ' */'), - _0x16964a = _0x237fae.sources.map(function(_0x481092) { - return '/*# sourceURL=' + _0x237fae.sourceRoot + _0x481092 + ' */'; - }); - return [_0x48f7cd].concat(_0x16964a).concat([_0x489b4a]).join('\n'); - } - var _0x5a6547; - return [_0x48f7cd].join('\n'); - }(_0x375981, _0x2da20d); - return _0x375981[0x2] ? '@media ' + _0x375981[0x2] + '{' + _0x413325 + '}' : _0x413325; - }).join(''); - }, _0x28eced.i = function(_0x4ea1ba, _0x43f363) { - 'string' == typeof _0x4ea1ba && (_0x4ea1ba = [ - [null, _0x4ea1ba, ''] - ]); - for (var _0x4e8d12 = {}, _0x35e98e = 0x0; _0x35e98e < this.length; _0x35e98e++) { - var _0x19ebdf = this[_0x35e98e][0x0]; - 'number' == typeof _0x19ebdf && (_0x4e8d12[_0x19ebdf] = true); - } - for (_0x35e98e = 0x0; _0x35e98e < _0x4ea1ba.length; _0x35e98e++) { - var _0xb1dcac = _0x4ea1ba[_0x35e98e]; - 'number' == typeof _0xb1dcac[0x0] && _0x4e8d12[_0xb1dcac[0x0]] || (_0x43f363 && !_0xb1dcac[0x2] ? _0xb1dcac[0x2] = _0x43f363 : _0x43f363 && (_0xb1dcac[0x2] = '(' + _0xb1dcac[0x2] + ') and (' + _0x43f363 + ')'), _0x28eced.push(_0xb1dcac)); - } - }, _0x28eced; - }; -}, null, function(_0x4e27b5, _0x3956c2) { - _0x4e27b5.exports = function(_0x11cd8b) { - var _0x3956c2 = 'undefined' != typeof window && window.location; - if (!_0x3956c2) throw new Error('fixUrls requires window.location'); - if (!_0x11cd8b || 'string' != typeof _0x11cd8b) return _0x11cd8b; - var _0x371ce6 = _0x3956c2.protocol + '//' + _0x3956c2.host, - _0x4e9f2b = _0x371ce6 + _0x3956c2.pathname.replace(/\/[^\/]*$/, '/'); - return _0x11cd8b.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi, function(_0x59c920, _0x2064b3) { - var _0x164a12, _0x104643 = _0x2064b3.trim().replace(/^"(.*)"$/, function(_0x130848, _0x1d01cb) { - return _0x1d01cb; - }).replace(/^'(.*)'$/, function(_0x22c858, _0xf25b24) { - return _0xf25b24; - }); - return /^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i .test(_0x104643) ? _0x59c920 : (_0x164a12 = 0x0 === _0x104643.indexOf('//') ? _0x104643 : 0x0 === _0x104643.indexOf('/') ? _0x371ce6 + _0x104643 : _0x4e9f2b + _0x104643.replace(/^\.\//, ''), 'url(' + JSON.stringify(_0x164a12) + ')'); - }); - }; -}, function(_0x1f7a9b, _0x35e9c1, _0x4e9120) { - 'use strict'; - _0x35e9c1.byteLength = function(_0x222212) { - var _0x35e9c1 = _0xebc8e4(_0x222212), - _0x4e9120 = _0x35e9c1[0x0], - _0x23993b = _0x35e9c1[0x1]; - return 0x3 * (_0x4e9120 + _0x23993b) / 0x4 - _0x23993b; - }, _0x35e9c1.toByteArray = function(_0x5ab0cd) { - var _0x35e9c1, _0x4e9120, _0x3d1e0c = _0xebc8e4(_0x5ab0cd), - _0x3de087 = _0x3d1e0c[0x0], - _0x56570e = _0x3d1e0c[0x1], - _0x35cd5b = new _0x1526d9(function(_0x219861, _0x3962e0, _0x439409) { - return 0x3 * (_0x3962e0 + _0x439409) / 0x4 - _0x439409; - }(0x0, _0x3de087, _0x56570e)), - _0x50face = 0x0, - _0x909a98 = _0x56570e > 0x0 ? _0x3de087 - 0x4 : _0x3de087; - for (_0x4e9120 = 0x0; _0x4e9120 < _0x909a98; _0x4e9120 += 0x4) _0x35e9c1 = _0x363090[_0x5ab0cd.charCodeAt(_0x4e9120)] << 0x12 | _0x363090[_0x5ab0cd.charCodeAt(_0x4e9120 + 0x1)] << 0xc | _0x363090[_0x5ab0cd.charCodeAt(_0x4e9120 + 0x2)] << 0x6 | _0x363090[_0x5ab0cd.charCodeAt(_0x4e9120 + 0x3)], _0x35cd5b[_0x50face++] = _0x35e9c1 >> 0x10 & 0xff, _0x35cd5b[_0x50face++] = _0x35e9c1 >> 0x8 & 0xff, _0x35cd5b[_0x50face++] = 0xff & _0x35e9c1; - 0x2 === _0x56570e && (_0x35e9c1 = _0x363090[_0x5ab0cd.charCodeAt(_0x4e9120)] << 0x2 | _0x363090[_0x5ab0cd.charCodeAt(_0x4e9120 + 0x1)] >> 0x4, _0x35cd5b[_0x50face++] = 0xff & _0x35e9c1); - 0x1 === _0x56570e && (_0x35e9c1 = _0x363090[_0x5ab0cd.charCodeAt(_0x4e9120)] << 0xa | _0x363090[_0x5ab0cd.charCodeAt(_0x4e9120 + 0x1)] << 0x4 | _0x363090[_0x5ab0cd.charCodeAt(_0x4e9120 + 0x2)] >> 0x2, _0x35cd5b[_0x50face++] = _0x35e9c1 >> 0x8 & 0xff, _0x35cd5b[_0x50face++] = 0xff & _0x35e9c1); - return _0x35cd5b; - }, _0x35e9c1.fromByteArray = function(_0xd0488e) { - for (var _0x35e9c1, _0x4e9120 = _0xd0488e.length, _0x34415e = _0x4e9120 % 0x3, _0x4bc8fc = [], _0x5bce44 = 0x0, _0x58739f = _0x4e9120 - _0x34415e; _0x5bce44 < _0x58739f; _0x5bce44 += 0x3fff) _0x4bc8fc.push(_0x48ea44(_0xd0488e, _0x5bce44, _0x5bce44 + 0x3fff > _0x58739f ? _0x58739f : _0x5bce44 + 0x3fff)); - 0x1 === _0x34415e ? (_0x35e9c1 = _0xd0488e[_0x4e9120 - 0x1], _0x4bc8fc.push(_0x1e6251[_0x35e9c1 >> 0x2] + _0x1e6251[_0x35e9c1 << 0x4 & 0x3f] + '==')) : 0x2 === _0x34415e && (_0x35e9c1 = (_0xd0488e[_0x4e9120 - 0x2] << 0x8) + _0xd0488e[_0x4e9120 - 0x1], _0x4bc8fc.push(_0x1e6251[_0x35e9c1 >> 0xa] + _0x1e6251[_0x35e9c1 >> 0x4 & 0x3f] + _0x1e6251[_0x35e9c1 << 0x2 & 0x3f] + '=')); - return _0x4bc8fc.join(''); - }; - for (var _0x1e6251 = [], _0x363090 = [], _0x1526d9 = 'undefined' != typeof Uint8Array ? Uint8Array : Array, _0x5a86b6 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/', _0x1f872e = 0x0, _0x5a9cb9 = _0x5a86b6.length; _0x1f872e < _0x5a9cb9; ++_0x1f872e) _0x1e6251[_0x1f872e] = _0x5a86b6[_0x1f872e], _0x363090[_0x5a86b6.charCodeAt(_0x1f872e)] = _0x1f872e; - - function _0xebc8e4(_0x1dbeba) { - var _0x35e9c1 = _0x1dbeba.length; - if (_0x35e9c1 % 0x4 > 0x0) throw new Error('Invalid string. Length must be a multiple of 4'); - var _0x4e9120 = _0x1dbeba.indexOf('='); - return -0x1 === _0x4e9120 && (_0x4e9120 = _0x35e9c1), [_0x4e9120, _0x4e9120 === _0x35e9c1 ? 0x0 : 0x4 - _0x4e9120 % 0x4]; - } - - function _0x48ea44(_0x56c278, _0x4a7346, _0x5f2040) { - for (var _0x50a526, _0xf5d207, _0x7291d9 = [], _0x4a0a0c = _0x4a7346; _0x4a0a0c < _0x5f2040; _0x4a0a0c += 0x3) _0x50a526 = (_0x56c278[_0x4a0a0c] << 0x10 & 0xff0000) + (_0x56c278[_0x4a0a0c + 0x1] << 0x8 & 0xff00) + (0xff & _0x56c278[_0x4a0a0c + 0x2]), _0x7291d9.push(_0x1e6251[(_0xf5d207 = _0x50a526) >> 0x12 & 0x3f] + _0x1e6251[_0xf5d207 >> 0xc & 0x3f] + _0x1e6251[_0xf5d207 >> 0x6 & 0x3f] + _0x1e6251[0x3f & _0xf5d207]); - return _0x7291d9.join(''); - } - _0x363090['-' .charCodeAt(0x0)] = 0x3e, _0x363090['_' .charCodeAt(0x0)] = 0x3f; -}, function(_0x1a2ca1, _0x5ab40f) { - _0x5ab40f.read = function(_0x98ecfb, _0x5ecfd8, _0x15d57f, _0x1459c1, _0x542705) { - var _0x2db62b, _0x395290, _0x1b5e59 = 0x8 * _0x542705 - _0x1459c1 - 0x1, - _0x4819f0 = (0x1 << _0x1b5e59) - 0x1, - _0x297b1a = _0x4819f0 >> 0x1, - _0xf83277 = -0x7, - _0xde96bc = _0x15d57f ? _0x542705 - 0x1 : 0x0, - _0x1e18fd = _0x15d57f ? -0x1 : 0x1, - _0x39dd3e = _0x98ecfb[_0x5ecfd8 + _0xde96bc]; - for (_0xde96bc += _0x1e18fd, _0x2db62b = _0x39dd3e & (0x1 << -_0xf83277) - 0x1, _0x39dd3e >>= -_0xf83277, _0xf83277 += _0x1b5e59; _0xf83277 > 0x0; _0x2db62b = 0x100 * _0x2db62b + _0x98ecfb[_0x5ecfd8 + _0xde96bc], _0xde96bc += _0x1e18fd, _0xf83277 -= 0x8); - for (_0x395290 = _0x2db62b & (0x1 << -_0xf83277) - 0x1, _0x2db62b >>= -_0xf83277, _0xf83277 += _0x1459c1; _0xf83277 > 0x0; _0x395290 = 0x100 * _0x395290 + _0x98ecfb[_0x5ecfd8 + _0xde96bc], _0xde96bc += _0x1e18fd, _0xf83277 -= 0x8); - if (0x0 === _0x2db62b) _0x2db62b = 0x1 - _0x297b1a; - else { - if (_0x2db62b === _0x4819f0) return _0x395290 ? NaN : 0x1 / 0x0 * (_0x39dd3e ? -0x1 : 0x1); - _0x395290 += Math.pow(0x2, _0x1459c1), _0x2db62b -= _0x297b1a; - } - return (_0x39dd3e ? -0x1 : 0x1) * _0x395290 * Math.pow(0x2, _0x2db62b - _0x1459c1); - }, _0x5ab40f.write = function(_0x4ba5be, _0x318108, _0x4685ef, _0x5c1ec6, _0x565bed, _0x42cd0b) { - var _0x4a1cdf, _0x3837e2, _0x50c917, _0x19dbca = 0x8 * _0x42cd0b - _0x565bed - 0x1, - _0x324c08 = (0x1 << _0x19dbca) - 0x1, - _0x523d34 = _0x324c08 >> 0x1, - _0xfab182 = 0x17 === _0x565bed ? Math.pow(0x2, -0x18) - Math.pow(0x2, -0x4d) : 0x0, - _0x370a26 = _0x5c1ec6 ? 0x0 : _0x42cd0b - 0x1, - _0x5bb572 = _0x5c1ec6 ? 0x1 : -0x1, - _0x3be950 = _0x318108 < 0x0 || 0x0 === _0x318108 && 0x1 / _0x318108 < 0x0 ? 0x1 : 0x0; - for (_0x318108 = Math.abs(_0x318108), isNaN(_0x318108) || _0x318108 === 0x1 / 0x0 ? (_0x3837e2 = isNaN(_0x318108) ? 0x1 : 0x0, _0x4a1cdf = _0x324c08) : (_0x4a1cdf = Math.floor(Math.log(_0x318108) / Math.LN2), _0x318108 * (_0x50c917 = Math.pow(0x2, -_0x4a1cdf)) < 0x1 && (_0x4a1cdf--, _0x50c917 *= 0x2), (_0x318108 += _0x4a1cdf + _0x523d34 >= 0x1 ? _0xfab182 / _0x50c917 : _0xfab182 * Math.pow(0x2, 0x1 - _0x523d34)) * _0x50c917 >= 0x2 && (_0x4a1cdf++, _0x50c917 /= 0x2), _0x4a1cdf + _0x523d34 >= _0x324c08 ? (_0x3837e2 = 0x0, _0x4a1cdf = _0x324c08) : _0x4a1cdf + _0x523d34 >= 0x1 ? (_0x3837e2 = (_0x318108 * _0x50c917 - 0x1) * Math.pow(0x2, _0x565bed), _0x4a1cdf += _0x523d34) : (_0x3837e2 = _0x318108 * Math.pow(0x2, _0x523d34 - 0x1) * Math.pow(0x2, _0x565bed), _0x4a1cdf = 0x0)); _0x565bed >= 0x8; _0x4ba5be[_0x4685ef + _0x370a26] = 0xff & _0x3837e2, _0x370a26 += _0x5bb572, _0x3837e2 /= 0x100, _0x565bed -= 0x8); - for (_0x4a1cdf = _0x4a1cdf << _0x565bed | _0x3837e2, _0x19dbca += _0x565bed; _0x19dbca > 0x0; _0x4ba5be[_0x4685ef + _0x370a26] = 0xff & _0x4a1cdf, _0x370a26 += _0x5bb572, _0x4a1cdf /= 0x100, _0x19dbca -= 0x8); - _0x4ba5be[_0x4685ef + _0x370a26 - _0x5bb572] |= 0x80 * _0x3be950; - }; -}, function(_0x7f2027, _0x1e318c) { - var _0x43851d = {}.toString; - _0x7f2027.exports = Array.isArray || function(_0x4397a1) { - return '[object Array]' == _0x43851d.call(_0x4397a1); - }; -}, function(_0x55766d, _0x425397, _0x30fc1c) { - var _0x312e4e = _0x30fc1c(0x91), - _0xfaebef = _0x30fc1c(0x4a)('socket.io-client:url'); - _0x55766d.exports = function(_0x1e578e, _0x55621b) { - var _0x30fc1c = _0x1e578e; - _0x55621b = _0x55621b || 'undefined' != typeof location && location, null == _0x1e578e && (_0x1e578e = _0x55621b.protocol + '//' + _0x55621b.host); - 'string' == typeof _0x1e578e && ('/' === _0x1e578e.charAt(0x0) && (_0x1e578e = '/' === _0x1e578e.charAt(0x1) ? _0x55621b.protocol + _0x1e578e : _0x55621b.host + _0x1e578e), /^(https?|wss?):\/\// .test(_0x1e578e) || (_0xfaebef('protocol-less url %s', _0x1e578e), _0x1e578e = void 0x0 !== _0x55621b ? _0x55621b.protocol + '//' + _0x1e578e : 'https://' + _0x1e578e), _0xfaebef('parse %s', _0x1e578e), _0x30fc1c = _0x312e4e(_0x1e578e)); - _0x30fc1c.port || (/^(http|ws)$/ .test(_0x30fc1c.protocol) ? _0x30fc1c.port = '80' : /^(http|ws)s$/ .test(_0x30fc1c.protocol) && (_0x30fc1c.port = '443')); - _0x30fc1c.path = _0x30fc1c.path || '/'; - var _0x259720 = -0x1 !== _0x30fc1c.host.indexOf(':') ? '[' + _0x30fc1c.host + ']' : _0x30fc1c.host; - return _0x30fc1c.id = _0x30fc1c.protocol + '://' + _0x259720 + ':' + _0x30fc1c.port, _0x30fc1c.href = _0x30fc1c.protocol + '://' + _0x259720 + (_0x55621b && _0x55621b.port === _0x30fc1c.port ? '' : ':' + _0x30fc1c.port), _0x30fc1c; - }; -}, function(_0x309003, _0x12598a, _0x6390d0) { - function _0x4bc461(_0x1b6f2f) { - var _0x6390d0; - - function _0x4f0f69() { - if (_0x4f0f69.enabled) { - var _0x1b6f2f = _0x4f0f69, - _0x478df4 = +new Date(), - _0x3e9539 = _0x478df4 - (_0x6390d0 || _0x478df4); - _0x1b6f2f.diff = _0x3e9539, _0x1b6f2f.prev = _0x6390d0, _0x1b6f2f.curr = _0x478df4, _0x6390d0 = _0x478df4; - for (var _0x4a107f = new Array(arguments.length), _0x13594f = 0x0; _0x13594f < _0x4a107f.length; _0x13594f++) _0x4a107f[_0x13594f] = arguments[_0x13594f]; - _0x4a107f[0x0] = _0x12598a.coerce(_0x4a107f[0x0]), 'string' != typeof _0x4a107f[0x0] && _0x4a107f.unshift('%O'); - var _0x3f5695 = 0x0; - _0x4a107f[0x0] = _0x4a107f[0x0].replace(/%([a-zA-Z%])/g, function(_0x4dd58f, _0x3b0513) { - if ('%%' === _0x4dd58f) return _0x4dd58f; - _0x3f5695++; - var _0x1d4539 = _0x12598a.formatters[_0x3b0513]; - if ('function' == typeof _0x1d4539) { - var _0x2f3d6f = _0x4a107f[_0x3f5695]; - _0x4dd58f = _0x1d4539.call(_0x1b6f2f, _0x2f3d6f), _0x4a107f.splice(_0x3f5695, 0x1), _0x3f5695--; - } - return _0x4dd58f; - }), _0x12598a.formatArgs.call(_0x1b6f2f, _0x4a107f), (_0x4f0f69.log || _0x12598a.log || console.log.bind(console)).apply(_0x1b6f2f, _0x4a107f); - } - } - return _0x4f0f69.namespace = _0x1b6f2f, _0x4f0f69.enabled = _0x12598a.enabled(_0x1b6f2f), _0x4f0f69.useColors = _0x12598a.useColors(), _0x4f0f69.color = function(_0x5aec32) { - var _0x6390d0, _0xe192b3 = 0x0; - for (_0x6390d0 in _0x5aec32) _0xe192b3 = (_0xe192b3 << 0x5) - _0xe192b3 + _0x5aec32.charCodeAt(_0x6390d0), _0xe192b3 |= 0x0; - return _0x12598a.colors[Math.abs(_0xe192b3) % _0x12598a.colors.length]; - }(_0x1b6f2f), _0x4f0f69.destroy = _0x41d325, 'function' == typeof _0x12598a.init && _0x12598a.init(_0x4f0f69), _0x12598a.instances.push(_0x4f0f69), _0x4f0f69; - } - - function _0x41d325() { - var _0x309003 = _0x12598a.instances.indexOf(this); - return -0x1 !== _0x309003 && (_0x12598a.instances.splice(_0x309003, 0x1), true); - }(_0x12598a = _0x309003.exports = _0x4bc461.debug = _0x4bc461.default = _0x4bc461).coerce = function(_0x46ff6f) { - return _0x46ff6f instanceof Error ? _0x46ff6f.stack || _0x46ff6f.message : _0x46ff6f; - }, _0x12598a.disable = function() { - _0x12598a.enable(''); - }, _0x12598a.enable = function(_0x4f23b1) { - var _0x6390d0; - _0x12598a.save(_0x4f23b1), _0x12598a.names = [], _0x12598a.skips = []; - var _0x199225 = ('string' == typeof _0x4f23b1 ? _0x4f23b1 : '').split(/[\s,]+/), - _0x2a6586 = _0x199225.length; - for (_0x6390d0 = 0x0; _0x6390d0 < _0x2a6586; _0x6390d0++) _0x199225[_0x6390d0] && ('-' === (_0x4f23b1 = _0x199225[_0x6390d0].replace(/\*/g, '.*?'))[0x0] ? _0x12598a.skips.push(new RegExp('^' + _0x4f23b1.substr(0x1) + '$')) : _0x12598a.names.push(new RegExp('^' + _0x4f23b1 + '$'))); - for (_0x6390d0 = 0x0; _0x6390d0 < _0x12598a.instances.length; _0x6390d0++) { - var _0x45a46b = _0x12598a.instances[_0x6390d0]; - _0x45a46b.enabled = _0x12598a.enabled(_0x45a46b.namespace); - } - }, _0x12598a.enabled = function(_0xde8aec) { - if ('*' === _0xde8aec[_0xde8aec.length - 0x1]) return true; - var _0x6390d0, _0xf406c9; - for (_0x6390d0 = 0x0, _0xf406c9 = _0x12598a.skips.length; _0x6390d0 < _0xf406c9; _0x6390d0++) - if (_0x12598a.skips[_0x6390d0].test(_0xde8aec)) return !0x1; - for (_0x6390d0 = 0x0, _0xf406c9 = _0x12598a.names.length; _0x6390d0 < _0xf406c9; _0x6390d0++) - if (_0x12598a.names[_0x6390d0].test(_0xde8aec)) return true; - return !0x1; - }, _0x12598a.humanize = _0x6390d0(0x68), _0x12598a.instances = [], _0x12598a.names = [], _0x12598a.skips = [], _0x12598a.formatters = {}; -}, function(_0x51bfb5, _0x52ec3c, _0x4a6556) { - _0x51bfb5.exports = _0x4a6556(0x4d); -}, function(_0x54fbaa, _0xb994ca, _0x222313) { - function _0x574a17(_0x160166) { - var _0x222313; - - function _0x1f7dd9() { - if (_0x1f7dd9.enabled) { - var _0x160166 = _0x1f7dd9, - _0x525d4f = +new Date(), - _0x394213 = _0x525d4f - (_0x222313 || _0x525d4f); - _0x160166.diff = _0x394213, _0x160166.prev = _0x222313, _0x160166.curr = _0x525d4f, _0x222313 = _0x525d4f; - for (var _0x4f052c = new Array(arguments.length), _0xe076c = 0x0; _0xe076c < _0x4f052c.length; _0xe076c++) _0x4f052c[_0xe076c] = arguments[_0xe076c]; - _0x4f052c[0x0] = _0xb994ca.coerce(_0x4f052c[0x0]), 'string' != typeof _0x4f052c[0x0] && _0x4f052c.unshift('%O'); - var _0x55ee0e = 0x0; - _0x4f052c[0x0] = _0x4f052c[0x0].replace(/%([a-zA-Z%])/g, function(_0x1d83d0, _0x1823f2) { - if ('%%' === _0x1d83d0) return _0x1d83d0; - _0x55ee0e++; - var _0x120817 = _0xb994ca.formatters[_0x1823f2]; - if ('function' == typeof _0x120817) { - var _0x12b98d = _0x4f052c[_0x55ee0e]; - _0x1d83d0 = _0x120817.call(_0x160166, _0x12b98d), _0x4f052c.splice(_0x55ee0e, 0x1), _0x55ee0e--; - } - return _0x1d83d0; - }), _0xb994ca.formatArgs.call(_0x160166, _0x4f052c), (_0x1f7dd9.log || _0xb994ca.log || console.log.bind(console)).apply(_0x160166, _0x4f052c); - } - } - return _0x1f7dd9.namespace = _0x160166, _0x1f7dd9.enabled = _0xb994ca.enabled(_0x160166), _0x1f7dd9.useColors = _0xb994ca.useColors(), _0x1f7dd9.color = function(_0x41b495) { - var _0x222313, _0x369715 = 0x0; - for (_0x222313 in _0x41b495) _0x369715 = (_0x369715 << 0x5) - _0x369715 + _0x41b495.charCodeAt(_0x222313), _0x369715 |= 0x0; - return _0xb994ca.colors[Math.abs(_0x369715) % _0xb994ca.colors.length]; - }(_0x160166), _0x1f7dd9.destroy = _0xafe771, 'function' == typeof _0xb994ca.init && _0xb994ca.init(_0x1f7dd9), _0xb994ca.instances.push(_0x1f7dd9), _0x1f7dd9; - } - - function _0xafe771() { - var _0x54fbaa = _0xb994ca.instances.indexOf(this); - return -0x1 !== _0x54fbaa && (_0xb994ca.instances.splice(_0x54fbaa, 0x1), true); - }(_0xb994ca = _0x54fbaa.exports = _0x574a17.debug = _0x574a17.default = _0x574a17).coerce = function(_0xeef7c3) { - return _0xeef7c3 instanceof Error ? _0xeef7c3.stack || _0xeef7c3.message : _0xeef7c3; - }, _0xb994ca.disable = function() { - _0xb994ca.enable(''); - }, _0xb994ca.enable = function(_0x136d11) { - var _0x222313; - _0xb994ca.save(_0x136d11), _0xb994ca.names = [], _0xb994ca.skips = []; - var _0xddbc08 = ('string' == typeof _0x136d11 ? _0x136d11 : '').split(/[\s,]+/), - _0xe57337 = _0xddbc08.length; - for (_0x222313 = 0x0; _0x222313 < _0xe57337; _0x222313++) _0xddbc08[_0x222313] && ('-' === (_0x136d11 = _0xddbc08[_0x222313].replace(/\*/g, '.*?'))[0x0] ? _0xb994ca.skips.push(new RegExp('^' + _0x136d11.substr(0x1) + '$')) : _0xb994ca.names.push(new RegExp('^' + _0x136d11 + '$'))); - for (_0x222313 = 0x0; _0x222313 < _0xb994ca.instances.length; _0x222313++) { - var _0x1f56d8 = _0xb994ca.instances[_0x222313]; - _0x1f56d8.enabled = _0xb994ca.enabled(_0x1f56d8.namespace); - } - }, _0xb994ca.enabled = function(_0x4167fe) { - if ('*' === _0x4167fe[_0x4167fe.length - 0x1]) return true; - var _0x222313, _0x59df7e; - for (_0x222313 = 0x0, _0x59df7e = _0xb994ca.skips.length; _0x222313 < _0x59df7e; _0x222313++) - if (_0xb994ca.skips[_0x222313].test(_0x4167fe)) return !0x1; - for (_0x222313 = 0x0, _0x59df7e = _0xb994ca.names.length; _0x222313 < _0x59df7e; _0x222313++) - if (_0xb994ca.names[_0x222313].test(_0x4167fe)) return true; - return !0x1; - }, _0xb994ca.humanize = _0x222313(0x68), _0xb994ca.instances = [], _0xb994ca.names = [], _0xb994ca.skips = [], _0xb994ca.formatters = {}; -}, function(_0x5ef37b, _0x2bf12f, _0x5e36a8) { - var _0x1896c7 = _0x5e36a8(0x93), - _0x4bc13e = Object.prototype.toString, - _0x1a39df = 'function' == typeof Blob || 'undefined' != typeof Blob && '[object BlobConstructor]' === _0x4bc13e.call(Blob), - _0x1fd000 = 'function' == typeof File || 'undefined' != typeof File && '[object FileConstructor]' === _0x4bc13e.call(File); - _0x2bf12f.deconstructPacket = function(_0x7b453a) { - var _0x2bf12f = [], - _0x5e36a8 = _0x7b453a.data, - _0x480b58 = _0x7b453a; - return _0x480b58.data = function _0x7b453a(_0x2b35ac, _0x5ae562) { - if (!_0x2b35ac) return _0x2b35ac; - if (_0x1896c7(_0x2b35ac)) { - var _0x41f818 = { - '_placeholder': true, - 'num': _0x5ae562.length - }; - return _0x5ae562.push(_0x2b35ac), _0x41f818; - } - if (Array.isArray(_0x2b35ac)) { - for (var _0x3af883 = new Array(_0x2b35ac.length), _0x4c62b6 = 0x0; _0x4c62b6 < _0x2b35ac.length; _0x4c62b6++) _0x3af883[_0x4c62b6] = _0x7b453a(_0x2b35ac[_0x4c62b6], _0x5ae562); - return _0x3af883; - } - if ('object' == typeof _0x2b35ac && !(_0x2b35ac instanceof Date)) { - _0x3af883 = {}; - for (var _0x33a853 in _0x2b35ac) _0x3af883[_0x33a853] = _0x7b453a(_0x2b35ac[_0x33a853], _0x5ae562); - return _0x3af883; - } - return _0x2b35ac; - }(_0x5e36a8, _0x2bf12f), _0x480b58.attachments = _0x2bf12f.length, { - 'packet': _0x480b58, - 'buffers': _0x2bf12f - }; - }, _0x2bf12f.reconstructPacket = function(_0x3a9261, _0x4464b6) { - return _0x3a9261.data = function _0x3a9261(_0x5dce45, _0x2d03b7) { - if (!_0x5dce45) return _0x5dce45; - if (_0x5dce45 && _0x5dce45._placeholder) return _0x2d03b7[_0x5dce45.num]; - if (Array.isArray(_0x5dce45)) - for (var _0x38ca1f = 0x0; _0x38ca1f < _0x5dce45.length; _0x38ca1f++) _0x5dce45[_0x38ca1f] = _0x3a9261(_0x5dce45[_0x38ca1f], _0x2d03b7); - else if ('object' == typeof _0x5dce45) - for (var _0x730ee1 in _0x5dce45) _0x5dce45[_0x730ee1] = _0x3a9261(_0x5dce45[_0x730ee1], _0x2d03b7); - return _0x5dce45; - }(_0x3a9261.data, _0x4464b6), _0x3a9261.attachments = void 0x0, _0x3a9261; - }, _0x2bf12f.removeBlobs = function(_0x4a63fc, _0xb57a00) { - var _0x5e36a8 = 0x0, - _0x204453 = _0x4a63fc; - ! function _0x4a63fc(_0x11b7e1, _0x47bee4, _0x1fbe7b) { - if (!_0x11b7e1) return _0x11b7e1; - if (_0x1a39df && _0x11b7e1 instanceof Blob || _0x1fd000 && _0x11b7e1 instanceof File) { - _0x5e36a8++; - var _0x4af2e1 = new FileReader(); - _0x4af2e1.onload = function() { - _0x1fbe7b ? _0x1fbe7b[_0x47bee4] = this.result : _0x204453 = this.result, --_0x5e36a8 || _0xb57a00(_0x204453); - }, _0x4af2e1.readAsArrayBuffer(_0x11b7e1); - } else if (Array.isArray(_0x11b7e1)) - for (var _0xe3e0da = 0x0; _0xe3e0da < _0x11b7e1.length; _0xe3e0da++) _0x4a63fc(_0x11b7e1[_0xe3e0da], _0xe3e0da, _0x11b7e1); - else if ('object' == typeof _0x11b7e1 && !_0x1896c7(_0x11b7e1)) - for (var _0x45739f in _0x11b7e1) _0x4a63fc(_0x11b7e1[_0x45739f], _0x45739f, _0x11b7e1); - }(_0x204453), _0x5e36a8 || _0xb57a00(_0x204453); - }; -}, function(_0x4110e5, _0xc49d7f, _0x49ae62) { - _0x4110e5.exports = _0x49ae62(0x17b), _0x4110e5.exports.parser = _0x49ae62(0x33); -}, function(_0x34d620, _0x3efa0b, _0x55216d) { - var _0x1fdb83 = _0x55216d(0x95), - _0x9fae3 = _0x55216d(0x32), - _0x148108 = _0x55216d(0x4d)('engine.io-client:socket'), - _0xc49fe6 = _0x55216d(0x99), - _0x423ddf = _0x55216d(0x33), - _0x5022c2 = _0x55216d(0x91), - _0x4dbffe = _0x55216d(0x4b); - - function _0x194ddd(_0x4a18d5, _0x4e8077) { - if (!(this instanceof _0x194ddd)) return new _0x194ddd(_0x4a18d5, _0x4e8077); - _0x4e8077 = _0x4e8077 || {}, _0x4a18d5 && 'object' == typeof _0x4a18d5 && (_0x4e8077 = _0x4a18d5, _0x4a18d5 = null), _0x4a18d5 ? (_0x4a18d5 = _0x5022c2(_0x4a18d5), _0x4e8077.hostname = _0x4a18d5.host, _0x4e8077.secure = 'https' === _0x4a18d5.protocol || 'wss' === _0x4a18d5.protocol, _0x4e8077.port = _0x4a18d5.port, _0x4a18d5.query && (_0x4e8077.query = _0x4a18d5.query)) : _0x4e8077.host && (_0x4e8077.hostname = _0x5022c2(_0x4e8077.host).host), this.secure = null != _0x4e8077.secure ? _0x4e8077.secure : 'undefined' != typeof location && 'https:' === location.protocol, _0x4e8077.hostname && !_0x4e8077.port && (_0x4e8077.port = this.secure ? '443' : '80'), this.agent = _0x4e8077.agent || !0x1, this.hostname = _0x4e8077.hostname || ('undefined' != typeof location ? location.hostname : 'localhost'), this.port = _0x4e8077.port || ('undefined' != typeof location && location.port ? location.port : this.secure ? 0x1bb : 0x50), this.query = _0x4e8077.query || {}, 'string' == typeof this.query && (this.query = _0x4dbffe.decode(this.query)), this.upgrade = !0x1 !== _0x4e8077.upgrade, this.path = (_0x4e8077.path || '/engine.io').replace(/\/$/, '') + '/', this.forceJSONP = !!_0x4e8077.forceJSONP, this.jsonp = !0x1 !== _0x4e8077.jsonp, this.forceBase64 = !!_0x4e8077.forceBase64, this.enablesXDR = !!_0x4e8077.enablesXDR, this.timestampParam = _0x4e8077.timestampParam || 't', this.timestampRequests = _0x4e8077.timestampRequests, this.transports = _0x4e8077.transports || ['polling', 'websocket'], this.transportOptions = _0x4e8077.transportOptions || {}, this.readyState = '', this.writeBuffer = [], this.prevBufferLen = 0x0, this.policyPort = _0x4e8077.policyPort || 0x34b, this.rememberUpgrade = _0x4e8077.rememberUpgrade || !0x1, this.binaryType = null, this.onlyBinaryUpgrades = _0x4e8077.onlyBinaryUpgrades, this.perMessageDeflate = !0x1 !== _0x4e8077.perMessageDeflate && (_0x4e8077.perMessageDeflate || {}), true === this.perMessageDeflate && (this.perMessageDeflate = {}), this.perMessageDeflate && null == this.perMessageDeflate.threshold && (this.perMessageDeflate.threshold = 0x400), this.pfx = _0x4e8077.pfx || null, this.key = _0x4e8077.key || null, this.passphrase = _0x4e8077.passphrase || null, this.cert = _0x4e8077.cert || null, this.ca = _0x4e8077.ca || null, this.ciphers = _0x4e8077.ciphers || null, this.rejectUnauthorized = void 0x0 === _0x4e8077.rejectUnauthorized || _0x4e8077.rejectUnauthorized, this.forceNode = !!_0x4e8077.forceNode, this.isReactNative = 'undefined' != typeof navigator && 'string' == typeof navigator.product && 'reactnative' === navigator.product.toLowerCase(), ('undefined' == typeof self || this.isReactNative) && (_0x4e8077.extraHeaders && Object.keys(_0x4e8077.extraHeaders).length > 0x0 && (this.extraHeaders = _0x4e8077.extraHeaders), _0x4e8077.localAddress && (this.localAddress = _0x4e8077.localAddress)), this.id = null, this.upgrades = null, this.pingInterval = null, this.pingTimeout = null, this.pingIntervalTimer = null, this.pingTimeoutTimer = null, this.open(); - } - _0x34d620.exports = _0x194ddd, _0x194ddd.priorWebsocketSuccess = !0x1, _0x9fae3(_0x194ddd.prototype), _0x194ddd.protocol = _0x423ddf.protocol, _0x194ddd.Socket = _0x194ddd, _0x194ddd.Transport = _0x55216d(0x6b), _0x194ddd.transports = _0x55216d(0x95), _0x194ddd.parser = _0x55216d(0x33), _0x194ddd.prototype.createTransport = function(_0x148af1) { - _0x148108('creating transport "%s"', _0x148af1); - var _0x3efa0b = function(_0x45595f) { - var _0x3efa0b = {}; - for (var _0x55216d in _0x45595f) _0x45595f.hasOwnProperty(_0x55216d) && (_0x3efa0b[_0x55216d] = _0x45595f[_0x55216d]); - return _0x3efa0b; - }(this.query); - _0x3efa0b.EIO = 4, _0x3efa0b.transport = _0x148af1; - var _0x55216d = this.transportOptions[_0x148af1] || {}; - return this.id && (_0x3efa0b.sid = this.id), new _0x1fdb83[_0x148af1]({ - 'query': _0x3efa0b, - 'socket': this, - 'agent': _0x55216d.agent || this.agent, - 'hostname': _0x55216d.hostname || this.hostname, - 'port': _0x55216d.port || this.port, - 'secure': _0x55216d.secure || this.secure, - 'path': _0x55216d.path || this.path, - 'forceJSONP': _0x55216d.forceJSONP || this.forceJSONP, - 'jsonp': _0x55216d.jsonp || this.jsonp, - 'forceBase64': _0x55216d.forceBase64 || this.forceBase64, - 'enablesXDR': _0x55216d.enablesXDR || this.enablesXDR, - 'timestampRequests': _0x55216d.timestampRequests || this.timestampRequests, - 'timestampParam': _0x55216d.timestampParam || this.timestampParam, - 'policyPort': _0x55216d.policyPort || this.policyPort, - 'pfx': _0x55216d.pfx || this.pfx, - 'key': _0x55216d.key || this.key, - 'passphrase': _0x55216d.passphrase || this.passphrase, - 'cert': _0x55216d.cert || this.cert, - 'ca': _0x55216d.ca || this.ca, - 'ciphers': _0x55216d.ciphers || this.ciphers, - 'rejectUnauthorized': _0x55216d.rejectUnauthorized || this.rejectUnauthorized, - 'perMessageDeflate': _0x55216d.perMessageDeflate || this.perMessageDeflate, - 'extraHeaders': _0x55216d.extraHeaders || this.extraHeaders, - 'forceNode': _0x55216d.forceNode || this.forceNode, - 'localAddress': _0x55216d.localAddress || this.localAddress, - 'requestTimeout': _0x55216d.requestTimeout || this.requestTimeout, - 'protocols': _0x55216d.protocols || void 0x0, - 'isReactNative': this.isReactNative - }); - }, _0x194ddd.prototype.open = function() { - var _0x34d620; - if (this.rememberUpgrade && _0x194ddd.priorWebsocketSuccess && -0x1 !== this.transports.indexOf('websocket')) _0x34d620 = 'websocket'; - else { - if (0x0 === this.transports.length) { - var _0x3efa0b = this; - return void setTimeout(function() { - _0x3efa0b.emit('error', 'No transports available'); - }, 0x0); - } - _0x34d620 = this.transports[0x0]; - } - this.readyState = 'opening'; - try { - _0x34d620 = this.createTransport(_0x34d620); - } catch (_0x5e61e1) { - return this.transports.shift(), void this.open(); - } - _0x34d620.open(), this.setTransport(_0x34d620); - }, _0x194ddd.prototype.setTransport = function(_0xb1579d) { - _0x148108('setting transport %s', _0xb1579d.name); - var _0x3efa0b = this; - this.transport && (_0x148108('clearing existing transport %s', this.transport.name), this.transport.removeAllListeners()), this.transport = _0xb1579d, _0xb1579d.on('drain', function() { - _0x3efa0b.onDrain(); - }).on('packet', function(_0x1712a3) { - _0x3efa0b.onPacket(_0x1712a3); - }).on('error', function(_0x89808c) { - _0x3efa0b.onError(_0x89808c); - }).on('close', function() { - _0x3efa0b.onClose('transport close'); - }); - }, _0x194ddd.prototype.probe = function(_0x501e0f) { - _0x148108('probing transport "%s"', _0x501e0f); - var _0x3efa0b = this.createTransport(_0x501e0f, { - 'probe': 0x1 - }), - _0x55216d = !0x1, - _0x5f251f = this; - - function _0x1eb3ab() { - if (_0x5f251f.onlyBinaryUpgrades) { - var _0x3f12eb = !this.supportsBinary && _0x5f251f.transport.supportsBinary; - _0x55216d = _0x55216d || _0x3f12eb; - } - _0x55216d || (_0x148108('probe transport "%s" opened', _0x501e0f), _0x3efa0b.send([{ - 'type': 'ping', - 'data': 'probe' - }]), _0x3efa0b.once('packet', function(_0x557c99) { - if (!_0x55216d) - if ('pong' === _0x557c99.type && 'probe' === _0x557c99.data) { - if (_0x148108('probe transport "%s" pong', _0x501e0f), _0x5f251f.upgrading = true, _0x5f251f.emit('upgrading', _0x3efa0b), !_0x3efa0b) return; - _0x194ddd.priorWebsocketSuccess = 'websocket' === _0x3efa0b.name, _0x148108('pausing current transport "%s"', _0x5f251f.transport.name), _0x5f251f.transport.pause(function() { - _0x55216d || 'closed' !== _0x5f251f.readyState && (_0x148108('changing transport and sending upgrade packet'), _0x3f719e(), _0x5f251f.setTransport(_0x3efa0b), _0x3efa0b.send([{ - 'type': 'upgrade' - }]), _0x5f251f.emit('upgrade', _0x3efa0b), _0x3efa0b = null, _0x5f251f.upgrading = !0x1, _0x5f251f.flush()); - }); - } else { - _0x148108('probe transport "%s" failed', _0x501e0f); - var _0x3e6d82 = new Error('probe error'); - _0x3e6d82.transport = _0x3efa0b.name, _0x5f251f.emit('upgradeError', _0x3e6d82); - } - })); - } - - function _0x2b67eb() { - _0x55216d || (_0x55216d = true, _0x3f719e(), _0x3efa0b.close(), _0x3efa0b = null); - } - - function _0x38040c(_0x76e3a6) { - var _0x29c478 = new Error('probe error: ' + _0x76e3a6); - _0x29c478.transport = _0x3efa0b.name, _0x2b67eb(), _0x148108('probe transport "%s" failed because of error: %s', _0x501e0f, _0x76e3a6), _0x5f251f.emit('upgradeError', _0x29c478); - } - - function _0x2e19bc() { - _0x38040c('transport closed'); - } - - function _0x548dfa() { - _0x38040c('socket closed'); - } - - function _0x50f53d(_0x215597) { - _0x3efa0b && _0x215597.name !== _0x3efa0b.name && (_0x148108('"%s" works - aborting "%s"', _0x215597.name, _0x3efa0b.name), _0x2b67eb()); - } - - function _0x3f719e() { - _0x3efa0b.removeListener('open', _0x1eb3ab), _0x3efa0b.removeListener('error', _0x38040c), _0x3efa0b.removeListener('close', _0x2e19bc), _0x5f251f.removeListener('close', _0x548dfa), _0x5f251f.removeListener('upgrading', _0x50f53d); - } - _0x194ddd.priorWebsocketSuccess = !0x1, _0x3efa0b.once('open', _0x1eb3ab), _0x3efa0b.once('error', _0x38040c), _0x3efa0b.once('close', _0x2e19bc), this.once('close', _0x548dfa), this.once('upgrading', _0x50f53d), _0x3efa0b.open(); - }, _0x194ddd.prototype.onOpen = function() { - if (_0x148108('socket open'), this.readyState = 'open', _0x194ddd.priorWebsocketSuccess = 'websocket' === this.transport.name, this.emit('open'), this.flush(), 'open' === this.readyState && this.upgrade && this.transport.pause) { - _0x148108('starting upgrade probes'); - for (var _0x34d620 = 0x0, _0x3efa0b = this.upgrades.length; _0x34d620 < _0x3efa0b; _0x34d620++) this.probe(this.upgrades[_0x34d620]); - } - }, _0x194ddd.prototype.onPacket = function(_0x55a19b) { - if ('opening' === this.readyState || 'open' === this.readyState || 'closing' === this.readyState) switch (_0x148108('socket receive: type "%s", data "%s"', _0x55a19b.type, _0x55a19b.data), this.emit('packet', _0x55a19b), this.emit('heartbeat'), _0x55a19b.type) { - case 'open': - this.onHandshake(JSON.parse(_0x55a19b.data)); - break; - case 'pong': - this.setPing(), this.emit('pong'); - break; - case 'error': - var _0x3efa0b = new Error('server error'); - _0x3efa0b.code = _0x55a19b.data, this.onError(_0x3efa0b); - break; - case 'message': - this.emit('data', _0x55a19b.data), this.emit('message', _0x55a19b.data); - } else _0x148108('packet received with socket readyState "%s"', this.readyState); - }, _0x194ddd.prototype.onHandshake = function(_0xe7da3a) { - this.emit('handshake', _0xe7da3a), this.id = _0xe7da3a.sid, this.transport.query.sid = _0xe7da3a.sid, this.upgrades = this.filterUpgrades(_0xe7da3a.upgrades), this.pingInterval = _0xe7da3a.pingInterval, this.pingTimeout = _0xe7da3a.pingTimeout, this.onOpen(), 'closed' !== this.readyState && (this.setPing(), this.removeListener('heartbeat', this.onHeartbeat), this.on('heartbeat', this.onHeartbeat)); - }, _0x194ddd.prototype.onHeartbeat = function(_0x22b120) { - clearTimeout(this.pingTimeoutTimer); - var _0x3efa0b = this; - _0x3efa0b.pingTimeoutTimer = setTimeout(function() { - 'closed' !== _0x3efa0b.readyState && _0x3efa0b.onClose('ping timeout'); - }, _0x22b120 || _0x3efa0b.pingInterval + _0x3efa0b.pingTimeout); - }, _0x194ddd.prototype.setPing = function() { - var _0x34d620 = this; - clearTimeout(_0x34d620.pingIntervalTimer), _0x34d620.pingIntervalTimer = setTimeout(function() { - _0x148108('writing ping packet - expecting pong within %sms', _0x34d620.pingTimeout), _0x34d620.ping(), _0x34d620.onHeartbeat(_0x34d620.pingTimeout); - }, _0x34d620.pingInterval); - }, _0x194ddd.prototype.ping = function() { - var _0x34d620 = this; - this.sendPacket('ping', function() { - _0x34d620.emit('ping'); - }); - }, _0x194ddd.prototype.onDrain = function() { - this.writeBuffer.splice(0x0, this.prevBufferLen), this.prevBufferLen = 0x0, 0x0 === this.writeBuffer.length ? this.emit('drain') : this.flush(); - }, _0x194ddd.prototype.flush = function() { - 'closed' !== this.readyState && this.transport.writable && !this.upgrading && this.writeBuffer.length && (_0x148108('flushing %d packets in socket', this.writeBuffer.length), this.transport.send(this.writeBuffer), this.prevBufferLen = this.writeBuffer.length, this.emit('flush')); - }, _0x194ddd.prototype.write = _0x194ddd.prototype.send = function(_0x484e6e, _0x3a0c43, _0x5b726c) { - return this.sendPacket('message', _0x484e6e, _0x3a0c43, _0x5b726c), this; - }, _0x194ddd.prototype.sendPacket = function(_0x3c238c, _0x20399f, _0xe002a, _0x33074d) { - if ('function' == typeof _0x20399f && (_0x33074d = _0x20399f, _0x20399f = void 0x0), 'function' == typeof _0xe002a && (_0x33074d = _0xe002a, _0xe002a = null), 'closing' !== this.readyState && 'closed' !== this.readyState) { - (_0xe002a = _0xe002a || {}).compress = !0x1 !== _0xe002a.compress; - var _0x486efa = { - 'type': _0x3c238c, - 'data': _0x20399f, - 'options': _0xe002a - }; - this.emit('packetCreate', _0x486efa), this.writeBuffer.push(_0x486efa), _0x33074d && this.once('flush', _0x33074d), this.flush(); - } - }, _0x194ddd.prototype.close = function() { - if ('opening' === this.readyState || 'open' === this.readyState) { - this.readyState = 'closing'; - var _0x34d620 = this; - this.writeBuffer.length ? this.once('drain', function() { - this.upgrading ? _0x2d4cad() : _0x492e95(); - }) : this.upgrading ? _0x2d4cad() : _0x492e95(); - } - - function _0x492e95() { - _0x34d620.onClose('forced close'), _0x148108('socket closing - telling transport to close'), _0x34d620.transport.close(); - } - - function _0x3daba2() { - _0x34d620.removeListener('upgrade', _0x3daba2), _0x34d620.removeListener('upgradeError', _0x3daba2), _0x492e95(); - } - - function _0x2d4cad() { - _0x34d620.once('upgrade', _0x3daba2), _0x34d620.once('upgradeError', _0x3daba2); - } - return this; - }, _0x194ddd.prototype.onError = function(_0x293f42) { - _0x148108('socket error %j', _0x293f42), _0x194ddd.priorWebsocketSuccess = !0x1, this.emit('error', _0x293f42), this.onClose('transport error', _0x293f42); - }, _0x194ddd.prototype.onClose = function(_0x505a19, _0x5b9107) { - if ('opening' === this.readyState || 'open' === this.readyState || 'closing' === this.readyState) { - _0x148108('socket close with reason: "%s"', _0x505a19); - clearTimeout(this.pingIntervalTimer), clearTimeout(this.pingTimeoutTimer), this.transport.removeAllListeners('close'), this.transport.close(), this.transport.removeAllListeners(), this.readyState = 'closed', this.id = null, this.emit('close', _0x505a19, _0x5b9107), this.writeBuffer = [], this.prevBufferLen = 0x0; - } - }, _0x194ddd.prototype.filterUpgrades = function(_0x5f33be) { - for (var _0x3efa0b = [], _0x55216d = 0x0, _0x57bb2f = _0x5f33be.length; _0x55216d < _0x57bb2f; _0x55216d++) ~_0xc49fe6(this.transports, _0x5f33be[_0x55216d]) && _0x3efa0b.push(_0x5f33be[_0x55216d]); - return _0x3efa0b; - }; -}, function(_0x17517c, _0x123023) { - try { - _0x17517c.exports = 'undefined' != typeof XMLHttpRequest && 'withCredentials' in new XMLHttpRequest(); - } catch (_0x5dcf38) { - _0x17517c.exports = !0x1; - } -}, function(_0x45792d, _0x4626ed, _0x2c3494) { - var _0x392a8c = _0x2c3494(0x6a), - _0x516d93 = _0x2c3494(0x96), - _0x30a32b = _0x2c3494(0x32), - _0x201202 = _0x2c3494(0x4c), - _0x5b93ba = _0x2c3494(0x4d)('engine.io-client:polling-xhr'); - - function _0x15789d() {} - - function _0x2c7385(_0x548340) { - if (_0x516d93.call(this, _0x548340), this.requestTimeout = _0x548340.requestTimeout, this.extraHeaders = _0x548340.extraHeaders, 'undefined' != typeof location) { - var _0x4626ed = 'https:' === location.protocol, - _0x2c3494 = location.port; - _0x2c3494 || (_0x2c3494 = _0x4626ed ? 0x1bb : 0x50), this.xd = 'undefined' != typeof location && _0x548340.hostname !== location.hostname || _0x2c3494 !== _0x548340.port, this.xs = _0x548340.secure !== _0x4626ed; - } - } - - function _0x59daee(_0x32ac42) { - this.method = _0x32ac42.method || 'GET', this.uri = _0x32ac42.uri, this.xd = !!_0x32ac42.xd, this.xs = !!_0x32ac42.xs, this.async = !0x1 !== _0x32ac42.async, this.data = void 0x0 !== _0x32ac42.data ? _0x32ac42.data : null, this.agent = _0x32ac42.agent, this.isBinary = _0x32ac42.isBinary, this.supportsBinary = _0x32ac42.supportsBinary, this.enablesXDR = _0x32ac42.enablesXDR, this.requestTimeout = _0x32ac42.requestTimeout, this.pfx = _0x32ac42.pfx, this.key = _0x32ac42.key, this.passphrase = _0x32ac42.passphrase, this.cert = _0x32ac42.cert, this.ca = _0x32ac42.ca, this.ciphers = _0x32ac42.ciphers, this.rejectUnauthorized = _0x32ac42.rejectUnauthorized, this.extraHeaders = _0x32ac42.extraHeaders, this.create(); - } - if (_0x45792d.exports = _0x2c7385, _0x45792d.exports.Request = _0x59daee, _0x201202(_0x2c7385, _0x516d93), _0x2c7385.prototype.supportsBinary = true, _0x2c7385.prototype.request = function(_0x8326ad) { - return (_0x8326ad = _0x8326ad || {}).uri = this.uri(), _0x8326ad.xd = this.xd, _0x8326ad.xs = this.xs, _0x8326ad.agent = this.agent || !0x1, _0x8326ad.supportsBinary = this.supportsBinary, _0x8326ad.enablesXDR = this.enablesXDR, _0x8326ad.pfx = this.pfx, _0x8326ad.key = this.key, _0x8326ad.passphrase = this.passphrase, _0x8326ad.cert = this.cert, _0x8326ad.ca = this.ca, _0x8326ad.ciphers = this.ciphers, _0x8326ad.rejectUnauthorized = this.rejectUnauthorized, _0x8326ad.requestTimeout = this.requestTimeout, _0x8326ad.extraHeaders = this.extraHeaders, new _0x59daee(_0x8326ad); - }, _0x2c7385.prototype.doWrite = function(_0x332d11, _0x37408c) { - var _0x2c3494 = 'string' != typeof _0x332d11 && void 0x0 !== _0x332d11, - _0x3525fb = this.request({ - 'method': 'POST', - 'data': _0x332d11, - 'isBinary': _0x2c3494 - }), - _0x2b0223 = this; - _0x3525fb.on('success', _0x37408c), _0x3525fb.on('error', function(_0xd90b63) { - _0x2b0223.onError('xhr post error', _0xd90b63); - }), this.sendXhr = _0x3525fb; - }, _0x2c7385.prototype.doPoll = function() { - _0x5b93ba('xhr poll'); - var _0x45792d = this.request(), - _0x4626ed = this; - _0x45792d.on('data', function(_0x49eeb5) { - _0x4626ed.onData(_0x49eeb5); - }), _0x45792d.on('error', function(_0x1ab330) { - _0x4626ed.onError('xhr poll error', _0x1ab330); - }), this.pollXhr = _0x45792d; - }, _0x30a32b(_0x59daee.prototype), _0x59daee.prototype.create = function() { - var _0x45792d = { - 'agent': this.agent, - 'xdomain': this.xd, - 'xscheme': this.xs, - 'enablesXDR': this.enablesXDR - }; - _0x45792d.pfx = this.pfx, _0x45792d.key = this.key, _0x45792d.passphrase = this.passphrase, _0x45792d.cert = this.cert, _0x45792d.ca = this.ca, _0x45792d.ciphers = this.ciphers, _0x45792d.rejectUnauthorized = this.rejectUnauthorized; - var _0x4626ed = this.xhr = new _0x392a8c(_0x45792d), - _0x2c3494 = this; - try { - _0x5b93ba('xhr open %s: %s', this.method, this.uri), _0x4626ed.open(this.method, this.uri, this.async); - try { - if (this.extraHeaders) - for (var _0x1aa437 in _0x4626ed.setDisableHeaderCheck && _0x4626ed.setDisableHeaderCheck(true), this.extraHeaders) this.extraHeaders.hasOwnProperty(_0x1aa437) && _0x4626ed.setRequestHeader(_0x1aa437, this.extraHeaders[_0x1aa437]); - } catch (_0x594576) {} - if ('POST' === this.method) try { - this.isBinary ? _0x4626ed.setRequestHeader('Content-type', 'application/octet-stream') : _0x4626ed.setRequestHeader('Content-type', 'text/plain;charset=UTF-8'); - } catch (_0x287e44) {} - try { - _0x4626ed.setRequestHeader('Accept', '*/*'); - } catch (_0x427204) {} - 'withCredentials' in _0x4626ed && (_0x4626ed.withCredentials = true), this.requestTimeout && (_0x4626ed.timeout = this.requestTimeout), this.hasXDR() ? (_0x4626ed.onload = function() { - _0x2c3494.onLoad(); - }, _0x4626ed.onerror = function() { - _0x2c3494.onError(_0x4626ed.responseText); - }) : _0x4626ed.onreadystatechange = function() { - if (0x2 === _0x4626ed.readyState) try { - var _0x45792d = _0x4626ed.getResponseHeader('Content-Type'); - _0x2c3494.supportsBinary && 'application/octet-stream' === _0x45792d && (_0x4626ed.responseType = 'arraybuffer'); - } catch (_0x191d4d) {} - 0x4 === _0x4626ed.readyState && (0xc8 === _0x4626ed.status || 0x4c7 === _0x4626ed.status ? _0x2c3494.onLoad() : setTimeout(function() { - _0x2c3494.onError(_0x4626ed.status); - }, 0x0)); - }, _0x5b93ba('xhr data %s', this.data), _0x4626ed.send(this.data); - } catch (_0x4ab9a1) { - return void setTimeout(function() { - _0x2c3494.onError(_0x4ab9a1); - }, 0x0); - } - 'undefined' != typeof document && (this.index = _0x59daee.requestsCount++, _0x59daee.requests[this.index] = this); - }, _0x59daee.prototype.onSuccess = function() { - this.emit('success'), this.cleanup(); - }, _0x59daee.prototype.onData = function(_0xfa89ce) { - this.emit('data', _0xfa89ce), this.onSuccess(); - }, _0x59daee.prototype.onError = function(_0x5e8001) { - this.emit('error', _0x5e8001), this.cleanup(true); - }, _0x59daee.prototype.cleanup = function(_0x26dc20) { - if (void 0x0 !== this.xhr && null !== this.xhr) { - if (this.hasXDR() ? this.xhr.onload = this.xhr.onerror = _0x15789d : this.xhr.onreadystatechange = _0x15789d, _0x26dc20) try { - this.xhr.abort(); - } catch (_0x4343d3) {} - 'undefined' != typeof document && delete _0x59daee.requests[this.index], this.xhr = null; - } - }, _0x59daee.prototype.onLoad = function() { - var _0x45792d; - try { - var _0x4626ed; - try { - _0x4626ed = this.xhr.getResponseHeader('Content-Type'); - } catch (_0x5532aa) {} - _0x45792d = 'application/octet-stream' === _0x4626ed && this.xhr.response || this.xhr.responseText; - } catch (_0x56c59b) { - this.onError(_0x56c59b); - } - null != _0x45792d && this.onData(_0x45792d); - }, _0x59daee.prototype.hasXDR = function() { - return 'undefined' != typeof XDomainRequest && !this.xs && this.enablesXDR; - }, _0x59daee.prototype.abort = function() { - this.cleanup(); - }, _0x59daee.requestsCount = 0x0, _0x59daee.requests = {}, 'undefined' != typeof document) - if ('function' == typeof attachEvent) attachEvent('onunload', _0x2c3054); - else if ('function' == typeof addEventListener) { - var _0x5079fe = 'onpagehide' in self ? 'pagehide' : 'unload'; - addEventListener(_0x5079fe, _0x2c3054, !0x1); - } - - function _0x2c3054() { - for (var _0x45792d in _0x59daee.requests) _0x59daee.requests.hasOwnProperty(_0x45792d) && _0x59daee.requests[_0x45792d].abort(); - } -}, function(_0x23190e, _0x3c89b0) { - _0x23190e.exports = Object.keys || function(_0x516c5d) { - var _0x3c89b0 = [], - _0x2f9e1d = Object.prototype.hasOwnProperty; - for (var _0x51dcd5 in _0x516c5d) _0x2f9e1d.call(_0x516c5d, _0x51dcd5) && _0x3c89b0.push(_0x51dcd5); - return _0x3c89b0; - }; -}, function(_0x728d4, _0x277c89) { - -}, function(_0x3c6f20, _0x261939) { - _0x3c6f20.exports = function(_0x205693, _0x194773, _0x3b1eb5) { - var _0x5d37a7 = _0x205693.byteLength; - if (_0x194773 = _0x194773 || 0x0, _0x3b1eb5 = _0x3b1eb5 || _0x5d37a7, _0x205693.slice) return _0x205693.slice(_0x194773, _0x3b1eb5); - if (_0x194773 < 0x0 && (_0x194773 += _0x5d37a7), _0x3b1eb5 < 0x0 && (_0x3b1eb5 += _0x5d37a7), _0x3b1eb5 > _0x5d37a7 && (_0x3b1eb5 = _0x5d37a7), _0x194773 >= _0x5d37a7 || _0x194773 >= _0x3b1eb5 || 0x0 === _0x5d37a7) return new ArrayBuffer(0x0); - for (var _0x1001c1 = new Uint8Array(_0x205693), _0x5ef208 = new Uint8Array(_0x3b1eb5 - _0x194773), _0x7bc3bd = _0x194773, _0x473143 = 0x0; _0x7bc3bd < _0x3b1eb5; _0x7bc3bd++, _0x473143++) _0x5ef208[_0x473143] = _0x1001c1[_0x7bc3bd]; - return _0x5ef208.buffer; - }; -}, function(_0x29396f, _0x544191) { - function _0x2b6d82() {} - _0x29396f.exports = function(_0x5cb977, _0x34b5bc, _0x15f370) { - var _0x51741f = !0x1; - return _0x15f370 = _0x15f370 || _0x2b6d82, _0x3677ac.count = _0x5cb977, 0x0 === _0x5cb977 ? _0x34b5bc() : _0x3677ac; - - function _0x3677ac(_0x195369, _0x2de4b0) { - if (_0x3677ac.count <= 0x0) throw new Error('after called too many times'); - --_0x3677ac.count, _0x195369 ? (_0x51741f = true, _0x34b5bc(_0x195369), _0x34b5bc = _0x15f370) : 0x0 !== _0x3677ac.count || _0x51741f || _0x34b5bc(null, _0x2de4b0); - } - }; -}, function(_0x27c0f2, _0x161faf) { - var _0x252312, _0x28e0ec, _0x55ae78, _0x546e19 = String.fromCharCode; - - function _0x2206a8(_0x11983a) { - for (var _0x161faf, _0x2a2014, _0x35f89f = [], _0x48ddc3 = 0x0, _0x412ce4 = _0x11983a.length; _0x48ddc3 < _0x412ce4;)(_0x161faf = _0x11983a.charCodeAt(_0x48ddc3++)) >= 0xd800 && _0x161faf <= 0xdbff && _0x48ddc3 < _0x412ce4 ? 0xdc00 == (0xfc00 & (_0x2a2014 = _0x11983a.charCodeAt(_0x48ddc3++))) ? _0x35f89f.push(((0x3ff & _0x161faf) << 0xa) + (0x3ff & _0x2a2014) + 0x10000) : (_0x35f89f.push(_0x161faf), _0x48ddc3--) : _0x35f89f.push(_0x161faf); - return _0x35f89f; - } - - function _0x2b78cd(_0x19c167, _0x5649d7) { - if (_0x19c167 >= 0xd800 && _0x19c167 <= 0xdfff) { - if (_0x5649d7) throw Error('Lone surrogate U+' + _0x19c167.toString(0x10).toUpperCase() + ' is not a scalar value'); - return !0x1; - } - return true; - } - - function _0x55ceec(_0x1705ac, _0xe35948) { - return _0x546e19(_0x1705ac >> _0xe35948 & 0x3f | 0x80); - } - - function _0x29682c(_0x27b905, _0x2da860) { - if (0x0 == (0xffffff80 & _0x27b905)) return _0x546e19(_0x27b905); - var _0x4e33ec = ''; - return 0x0 == (0xfffff800 & _0x27b905) ? _0x4e33ec = _0x546e19(_0x27b905 >> 0x6 & 0x1f | 0xc0) : 0x0 == (0xffff0000 & _0x27b905) ? (_0x2b78cd(_0x27b905, _0x2da860) || (_0x27b905 = 0xfffd), _0x4e33ec = _0x546e19(_0x27b905 >> 0xc & 0xf | 0xe0), _0x4e33ec += _0x55ceec(_0x27b905, 0x6)) : 0x0 == (0xffe00000 & _0x27b905) && (_0x4e33ec = _0x546e19(_0x27b905 >> 0x12 & 0x7 | 0xf0), _0x4e33ec += _0x55ceec(_0x27b905, 0xc), _0x4e33ec += _0x55ceec(_0x27b905, 0x6)), _0x4e33ec += _0x546e19(0x3f & _0x27b905 | 0x80); - } - - function _0x116134() { - if (_0x55ae78 >= _0x28e0ec) throw Error('Invalid byte index'); - var _0x27c0f2 = 0xff & _0x252312[_0x55ae78]; - if (_0x55ae78++, 0x80 == (0xc0 & _0x27c0f2)) return 0x3f & _0x27c0f2; - throw Error('Invalid continuation byte'); - } - - function _0x2e6b3a(_0x431721) { - var _0x161faf, _0xab203b; - if (_0x55ae78 > _0x28e0ec) throw Error('Invalid byte index'); - if (_0x55ae78 == _0x28e0ec) return !0x1; - if (_0x161faf = 0xff & _0x252312[_0x55ae78], _0x55ae78++, 0x0 == (0x80 & _0x161faf)) return _0x161faf; - if (0xc0 == (0xe0 & _0x161faf)) { - if ((_0xab203b = (0x1f & _0x161faf) << 0x6 | _0x116134()) >= 0x80) return _0xab203b; - throw Error('Invalid continuation byte'); - } - if (0xe0 == (0xf0 & _0x161faf)) { - if ((_0xab203b = (0xf & _0x161faf) << 0xc | _0x116134() << 0x6 | _0x116134()) >= 0x800) return _0x2b78cd(_0xab203b, _0x431721) ? _0xab203b : 0xfffd; - throw Error('Invalid continuation byte'); - } - if (0xf0 == (0xf8 & _0x161faf) && (_0xab203b = (0x7 & _0x161faf) << 0x12 | _0x116134() << 0xc | _0x116134() << 0x6 | _0x116134()) >= 0x10000 && _0xab203b <= 0x10ffff) return _0xab203b; - throw Error('Invalid UTF-8 detected'); - } - _0x27c0f2.exports = { - 'version': '2.1.2', - 'encode': function(_0x261891, _0x1ac5a7) { - for (var _0x12bdc4 = !0x1 !== (_0x1ac5a7 = _0x1ac5a7 || {}).strict, _0x4f027e = _0x2206a8(_0x261891), _0x1ccefc = _0x4f027e.length, _0x4fb114 = -0x1, _0x257db2 = ''; ++_0x4fb114 < _0x1ccefc;) _0x257db2 += _0x29682c(_0x4f027e[_0x4fb114], _0x12bdc4); - return _0x257db2; - }, - 'decode': function(_0x11d8a7, _0x5d4ff2) { - var _0x7f1f3d = !0x1 !== (_0x5d4ff2 = _0x5d4ff2 || {}).strict; - _0x252312 = _0x2206a8(_0x11d8a7), _0x28e0ec = _0x252312.length, _0x55ae78 = 0x0; - for (var _0x1a3efe, _0x45a3c2 = []; !0x1 !== (_0x1a3efe = _0x2e6b3a(_0x7f1f3d));) _0x45a3c2.push(_0x1a3efe); - return function(_0x547381) { - for (var _0x5d4ff2, _0x195dce = _0x547381.length, _0x3e98ca = -0x1, _0x4d6382 = ''; ++_0x3e98ca < _0x195dce;)(_0x5d4ff2 = _0x547381[_0x3e98ca]) > 0xffff && (_0x4d6382 += _0x546e19((_0x5d4ff2 -= 0x10000) >>> 0xa & 0x3ff | 0xd800), _0x5d4ff2 = 0xdc00 | 0x3ff & _0x5d4ff2), _0x4d6382 += _0x546e19(_0x5d4ff2); - return _0x4d6382; - }(_0x45a3c2); - } - }; -}, function(_0x38d195, _0x4811ee) { - ! function() { - 'use strict'; - for (var _0x38d195 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/', _0x384e68 = new Uint8Array(0x100), _0x31e36b = 0x0; _0x31e36b < _0x38d195.length; _0x31e36b++) _0x384e68[_0x38d195.charCodeAt(_0x31e36b)] = _0x31e36b; - _0x4811ee.encode = function(_0x176f44) { - var _0x55a38a, _0x32742c = new Uint8Array(_0x176f44), - _0x2ae305 = _0x32742c.length, - _0x38d8a6 = ''; - for (_0x55a38a = 0x0; _0x55a38a < _0x2ae305; _0x55a38a += 0x3) _0x38d8a6 += _0x38d195[_0x32742c[_0x55a38a] >> 0x2], _0x38d8a6 += _0x38d195[(0x3 & _0x32742c[_0x55a38a]) << 0x4 | _0x32742c[_0x55a38a + 0x1] >> 0x4], _0x38d8a6 += _0x38d195[(0xf & _0x32742c[_0x55a38a + 0x1]) << 0x2 | _0x32742c[_0x55a38a + 0x2] >> 0x6], _0x38d8a6 += _0x38d195[0x3f & _0x32742c[_0x55a38a + 0x2]]; - return _0x2ae305 % 0x3 == 0x2 ? _0x38d8a6 = _0x38d8a6.substring(0x0, _0x38d8a6.length - 0x1) + '=' : _0x2ae305 % 0x3 == 0x1 && (_0x38d8a6 = _0x38d8a6.substring(0x0, _0x38d8a6.length - 0x2) + '=='), _0x38d8a6; - }, _0x4811ee.decode = function(_0x2a77ad) { - var _0x4811ee, _0x21a812, _0x4cf0d4, _0x508a77, _0x437e39, _0x2ae0e4 = 0.75 * _0x2a77ad.length, - _0x4ae7ea = _0x2a77ad.length, - _0x3ad7b0 = 0x0; - '=' === _0x2a77ad[_0x2a77ad.length - 0x1] && (_0x2ae0e4--, '=' === _0x2a77ad[_0x2a77ad.length - 0x2] && _0x2ae0e4--); - var _0x424982 = new ArrayBuffer(_0x2ae0e4), - _0x4e04ae = new Uint8Array(_0x424982); - for (_0x4811ee = 0x0; _0x4811ee < _0x4ae7ea; _0x4811ee += 0x4) _0x21a812 = _0x384e68[_0x2a77ad.charCodeAt(_0x4811ee)], _0x4cf0d4 = _0x384e68[_0x2a77ad.charCodeAt(_0x4811ee + 0x1)], _0x508a77 = _0x384e68[_0x2a77ad.charCodeAt(_0x4811ee + 0x2)], _0x437e39 = _0x384e68[_0x2a77ad.charCodeAt(_0x4811ee + 0x3)], _0x4e04ae[_0x3ad7b0++] = _0x21a812 << 0x2 | _0x4cf0d4 >> 0x4, _0x4e04ae[_0x3ad7b0++] = (0xf & _0x4cf0d4) << 0x4 | _0x508a77 >> 0x2, _0x4e04ae[_0x3ad7b0++] = (0x3 & _0x508a77) << 0x6 | 0x3f & _0x437e39; - return _0x424982; - }; - }(); -}, function(_0x5840ab, _0x36c0a4) { - var _0x16d045 = void 0x0 !== _0x16d045 ? _0x16d045 : 'undefined' != typeof WebKitBlobBuilder ? WebKitBlobBuilder : 'undefined' != typeof MSBlobBuilder ? MSBlobBuilder : 'undefined' != typeof MozBlobBuilder && MozBlobBuilder, - _0x5325fc = function() { - try { - return 0x2 === new Blob(['hi']).size; - } catch (_0x1ac492) { - return !0x1; - } - }(), - _0x41d4ae = _0x5325fc && function() { - try { - return 0x2 === new Blob([new Uint8Array([0x1, 0x2])]).size; - } catch (_0x502217) { - return !0x1; - } - }(), - _0x1e1873 = _0x16d045 && _0x16d045.prototype.append && _0x16d045.prototype.getBlob; - - function _0x4d6846(_0x2a24ff) { - return _0x2a24ff.map(function(_0x5cc924) { - if (_0x5cc924.buffer instanceof ArrayBuffer) { - var _0x36c0a4 = _0x5cc924.buffer; - if (_0x5cc924.byteLength !== _0x36c0a4.byteLength) { - var _0x265d40 = new Uint8Array(_0x5cc924.byteLength); - _0x265d40.set(new Uint8Array(_0x36c0a4, _0x5cc924.byteOffset, _0x5cc924.byteLength)), _0x36c0a4 = _0x265d40.buffer; - } - return _0x36c0a4; - } - return _0x5cc924; - }); - } - - function _0x3de8c2(_0x4ca3d5, _0x23197b) { - _0x23197b = _0x23197b || {}; - var _0x471378 = new _0x16d045(); - return _0x4d6846(_0x4ca3d5).forEach(function(_0x445dda) { - _0x471378.append(_0x445dda); - }), _0x23197b.type ? _0x471378.getBlob(_0x23197b.type) : _0x471378.getBlob(); - } - - function _0x3833cc(_0x1fe744, _0x4f9e18) { - return new Blob(_0x4d6846(_0x1fe744), _0x4f9e18 || {}); - } - 'undefined' != typeof Blob && (_0x3de8c2.prototype = Blob.prototype, _0x3833cc.prototype = Blob.prototype), _0x5840ab.exports = _0x5325fc ? _0x41d4ae ? Blob : _0x3833cc : _0x1e1873 ? _0x3de8c2 : void 0x0; -}, function(_0x16e69f, _0x1c3b8a, _0x5a1504) { - function _0x560e41(_0x4d58e2) { - var _0x5a1504; - - function _0x3dfc51() { - if (_0x3dfc51.enabled) { - var _0x4d58e2 = _0x3dfc51, - _0x2acf9f = +new Date(), - _0x4da3f6 = _0x2acf9f - (_0x5a1504 || _0x2acf9f); - _0x4d58e2.diff = _0x4da3f6, _0x4d58e2.prev = _0x5a1504, _0x4d58e2.curr = _0x2acf9f, _0x5a1504 = _0x2acf9f; - for (var _0xb2190b = new Array(arguments.length), _0x436528 = 0x0; _0x436528 < _0xb2190b.length; _0x436528++) _0xb2190b[_0x436528] = arguments[_0x436528]; - _0xb2190b[0x0] = _0x1c3b8a.coerce(_0xb2190b[0x0]), 'string' != typeof _0xb2190b[0x0] && _0xb2190b.unshift('%O'); - var _0x8a4b4e = 0x0; - _0xb2190b[0x0] = _0xb2190b[0x0].replace(/%([a-zA-Z%])/g, function(_0x80647d, _0x3ded36) { - if ('%%' === _0x80647d) return _0x80647d; - _0x8a4b4e++; - var _0x1f7c83 = _0x1c3b8a.formatters[_0x3ded36]; - if ('function' == typeof _0x1f7c83) { - var _0x4e683a = _0xb2190b[_0x8a4b4e]; - _0x80647d = _0x1f7c83.call(_0x4d58e2, _0x4e683a), _0xb2190b.splice(_0x8a4b4e, 0x1), _0x8a4b4e--; - } - return _0x80647d; - }), _0x1c3b8a.formatArgs.call(_0x4d58e2, _0xb2190b), (_0x3dfc51.log || _0x1c3b8a.log || console.log.bind(console)).apply(_0x4d58e2, _0xb2190b); - } - } - return _0x3dfc51.namespace = _0x4d58e2, _0x3dfc51.enabled = _0x1c3b8a.enabled(_0x4d58e2), _0x3dfc51.useColors = _0x1c3b8a.useColors(), _0x3dfc51.color = function(_0x3b3a5e) { - var _0x5a1504, _0x46203e = 0x0; - for (_0x5a1504 in _0x3b3a5e) _0x46203e = (_0x46203e << 0x5) - _0x46203e + _0x3b3a5e.charCodeAt(_0x5a1504), _0x46203e |= 0x0; - return _0x1c3b8a.colors[Math.abs(_0x46203e) % _0x1c3b8a.colors.length]; - }(_0x4d58e2), _0x3dfc51.destroy = _0x35c174, 'function' == typeof _0x1c3b8a.init && _0x1c3b8a.init(_0x3dfc51), _0x1c3b8a.instances.push(_0x3dfc51), _0x3dfc51; - } - - function _0x35c174() { - var _0x16e69f = _0x1c3b8a.instances.indexOf(this); - return -0x1 !== _0x16e69f && (_0x1c3b8a.instances.splice(_0x16e69f, 0x1), true); - }(_0x1c3b8a = _0x16e69f.exports = _0x560e41.debug = _0x560e41.default = _0x560e41).coerce = function(_0x12a2a8) { - return _0x12a2a8 instanceof Error ? _0x12a2a8.stack || _0x12a2a8.message : _0x12a2a8; - }, _0x1c3b8a.disable = function() { - _0x1c3b8a.enable(''); - }, _0x1c3b8a.enable = function(_0x17c742) { - var _0x5a1504; - _0x1c3b8a.save(_0x17c742), _0x1c3b8a.names = [], _0x1c3b8a.skips = []; - var _0xbc47d1 = ('string' == typeof _0x17c742 ? _0x17c742 : '').split(/[\s,]+/), - _0x42ff09 = _0xbc47d1.length; - for (_0x5a1504 = 0x0; _0x5a1504 < _0x42ff09; _0x5a1504++) _0xbc47d1[_0x5a1504] && ('-' === (_0x17c742 = _0xbc47d1[_0x5a1504].replace(/\*/g, '.*?'))[0x0] ? _0x1c3b8a.skips.push(new RegExp('^' + _0x17c742.substr(0x1) + '$')) : _0x1c3b8a.names.push(new RegExp('^' + _0x17c742 + '$'))); - for (_0x5a1504 = 0x0; _0x5a1504 < _0x1c3b8a.instances.length; _0x5a1504++) { - var _0x55d6c7 = _0x1c3b8a.instances[_0x5a1504]; - _0x55d6c7.enabled = _0x1c3b8a.enabled(_0x55d6c7.namespace); - } - }, _0x1c3b8a.enabled = function(_0x44c4fb) { - if ('*' === _0x44c4fb[_0x44c4fb.length - 0x1]) return true; - var _0x5a1504, _0x254db3; - for (_0x5a1504 = 0x0, _0x254db3 = _0x1c3b8a.skips.length; _0x5a1504 < _0x254db3; _0x5a1504++) - if (_0x1c3b8a.skips[_0x5a1504].test(_0x44c4fb)) return !0x1; - for (_0x5a1504 = 0x0, _0x254db3 = _0x1c3b8a.names.length; _0x5a1504 < _0x254db3; _0x5a1504++) - if (_0x1c3b8a.names[_0x5a1504].test(_0x44c4fb)) return true; - return !0x1; - }, _0x1c3b8a.humanize = _0x5a1504(0x68), _0x1c3b8a.instances = [], _0x1c3b8a.names = [], _0x1c3b8a.skips = [], _0x1c3b8a.formatters = {}; -}, function(_0x11cf35, _0x41c8d5, _0x4c4716) { - (function(_0x112650) { - var _0x128f0e = _0x4c4716(0x96), - _0x49dc48 = _0x4c4716(0x4c); - _0x11cf35.exports = _0x5bcec9; - var _0x233154, _0x550051 = /\n/g, - _0x1c3933 = /\\n/g; - - function _0x3cd450() {} - - function _0x2c9c81() { - return 'undefined' != typeof self ? self : 'undefined' != typeof window ? window : void 0x0 !== _0x112650 ? _0x112650 : {}; - } - - function _0x5bcec9(_0x3d1fd5) { - if (_0x128f0e.call(this, _0x3d1fd5), this.query = this.query || {}, !_0x233154) { - var _0x112650 = _0x2c9c81(); - _0x233154 = _0x112650.___eio = _0x112650.___eio || []; - } - this.index = _0x233154.length; - var _0x4c4716 = this; - _0x233154.push(function(_0x365d1f) { - _0x4c4716.onData(_0x365d1f); - }), this.query.j = this.index, 'function' == typeof addEventListener && addEventListener('beforeunload', function() { - _0x4c4716.script && (_0x4c4716.script.onerror = _0x3cd450); - }, !0x1); - } - _0x49dc48(_0x5bcec9, _0x128f0e), _0x5bcec9.prototype.supportsBinary = !0x1, _0x5bcec9.prototype.doClose = function() { - this.script && (this.script.parentNode.removeChild(this.script), this.script = null), this.form && (this.form.parentNode.removeChild(this.form), this.form = null, this.iframe = null), _0x128f0e.prototype.doClose.call(this); - }, _0x5bcec9.prototype.doPoll = function() { - var _0x11cf35 = this, - _0x112650 = document.createElement('script'); - this.script && (this.script.parentNode.removeChild(this.script), this.script = null), _0x112650.async = true, _0x112650.src = this.uri(), _0x112650.onerror = function(_0xb5b355) { - _0x11cf35.onError('jsonp poll error', _0xb5b355); - }; - var _0x4c4716 = document.getElementsByTagName('script')[0x0]; - _0x4c4716 ? _0x4c4716.parentNode.insertBefore(_0x112650, _0x4c4716) : (document.head || document.body).appendChild(_0x112650), this.script = _0x112650, 'undefined' != typeof navigator && /gecko/i .test(navigator.userAgent) && setTimeout(function() { - var _0x11cf35 = document.createElement('iframe'); - document.body.appendChild(_0x11cf35), document.body.removeChild(_0x11cf35); - }, 0x64); - }, _0x5bcec9.prototype.doWrite = function(_0xc3039c, _0x36909a) { - var _0x4c4716 = this; - if (!this.form) { - var _0x2e3f9b, _0x4dc2ae = document.createElement('form'), - _0x180cf2 = document.createElement('textarea'), - _0x179585 = this.iframeId = 'eio_iframe_' + this.index; - _0x4dc2ae.className = 'socketio', _0x4dc2ae.style.position = 'absolute', _0x4dc2ae.style.top = '-1000px', _0x4dc2ae.style.left = '-1000px', _0x4dc2ae.target = _0x179585, _0x4dc2ae.method = 'POST', _0x4dc2ae.setAttribute('accept-charset', 'utf-8'), _0x180cf2.name = 'd', _0x4dc2ae.appendChild(_0x180cf2), document.body.appendChild(_0x4dc2ae), this.form = _0x4dc2ae, this.area = _0x180cf2; - } - - function _0x5e5e8c() { - _0xa911be(), _0x36909a(); - } - - function _0xa911be() { - if (_0x4c4716.iframe) try { - _0x4c4716.form.removeChild(_0x4c4716.iframe); - } catch (_0x3b8869) { - _0x4c4716.onError('jsonp polling iframe removal error', _0x3b8869); - } - try { - var _0xc3039c = ''):console.error("No such progress-helper element exist.",e)}}},t={handle:function(i){i.autoTranslateText=!1,i.language="en",i.googKey="AIzaSyCgB5hmFY74WYB-EoWkhr9cAGr6TiTHrEE",i.Translator={TranslateText:function(e,t){var n=document.createElement("script"),e=(n.type="text/javascript",encodeURIComponent(e)),o="method"+i.token(),o=(window[o]=function(e){e.data&&e.data.translations[0]&&t?t(e.data.translations[0].translatedText):e.error&&"Daily Limit Exceeded"===e.error.message?console.error('Text translation failed. Error message: "Daily Limit Exceeded."'):e.error?console.error(e.error.message):console.error(e)},"https://www.googleapis.com/language/translate/v2?key="+i.googKey+"&target="+(i.language||"en-US")+"&callback=window."+o+"&q="+e);n.src=o,document.getElementsByTagName("head")[0].appendChild(n)},getListOfLanguages:function(t){var n=new XMLHttpRequest,e=(n.onreadystatechange=function(){var e;n.readyState==XMLHttpRequest.DONE&&((e=JSON.parse(n.responseText))&&e.data&&e.data.languages?t(e.data.languages):e.error&&"Daily Limit Exceeded"===e.error.message?console.error('Text translation failed. Error message: "Daily Limit Exceeded."'):e.error?console.error(e.error.message):console.error(e))},"https://www.googleapis.com/language/translate/v2/languages?key="+i.googKey+"&target=en");n.open("GET",e,!0),n.send(null)}}}};function L(t){if(P.socketAutoReConnect=!0,P.socket)t&&t(P.socket);else{if(void 0===n)if("undefined"!=typeof FirebaseConnection)window.SocketConnection=FirebaseConnection;else{if("undefined"==typeof PubNubConnection)throw"SocketConnection.js seems missed.";window.SocketConnection=PubNubConnection}new n(P,function(e){t&&t(P.socket)})}}function ke(n,o){P.socket.emit("join-room",{sessionid:P.sessionid,session:P.session,mediaConstraints:P.mediaConstraints,sdpConstraints:P.sdpConstraints,streams:Re(),extra:P.extra,password:void 0!==P.password&&"object"!==ze(P.password)?P.password:""},function(e,t){if(!0===e){if(P.enableLogs&&console.log("isRoomJoined: ",e," roomid: ",P.sessionid),P.peers[P.sessionid])return;I.onNegotiationNeeded(n)}!1===e&&P.enableLogs&&console.warn("isRoomJoined: ",t," roomid: ",P.sessionid),o(e,P.sessionid,t)})}function Oe(n){P.enableLogs&&console.log("Sending open-room signal to socket.io"),P.waitingForLocalMedia=!1,P.socket.emit("open-room",{sessionid:P.sessionid,session:P.session,mediaConstraints:P.mediaConstraints,sdpConstraints:P.sdpConstraints,streams:Re(),extra:P.extra,identifier:P.publicRoomIdentifier,password:void 0!==P.password&&"object"!==ze(P.password)?P.password:""},function(e,t){!0===e&&(P.enableLogs&&console.log("isRoomOpened: ",e," roomid: ",P.sessionid),n(e,P.sessionid)),!1===e&&(P.enableLogs&&console.warn("isRoomOpened: ",t," roomid: ",P.sessionid),n(e,P.sessionid,t))})}function Re(){try{return P.streamEvents.selectAll("local").map(function(e){return{streamid:e.streamid,tracks:e.stream.getTracks().length}})}catch(e){return[]}}function Pe(e,n){var t,o;P.dontCaptureUserMedia||e.isDataOnly?n():(t={},e.localPeerSdpConstraints.OfferToReceiveAudio&&(t.audio=P.mediaConstraints.audio),e.localPeerSdpConstraints.OfferToReceiveVideo&&(t.video=P.mediaConstraints.video),(o=e.session||P.session).oneway&&"two-way"!==o.audio&&"two-way"!==o.video&&"two-way"!==o.screen?n():((o=o.oneway&&o.audio&&"two-way"===o.audio?{audio:!0}:o).audio||o.video||o.screen)&&(o.screen?"Edge"===DetectRTC.browser.name?navigator.getDisplayMedia({video:!0,audio:_(P)}).then(function(e){e.isScreen=!0,I.onGettingLocalMedia(e),!o.audio&&!o.video||_(P)?n(e):P.invokeGetUserMedia(null,n)},function(e){console.error("Unable to capture screen on Edge. HTTPs and version 17+ is required.")}):P.getScreenConstraints(function(e,t){P.invokeGetUserMedia({audio:!!_(P)&&le(t),video:t,isScreen:!0},!o.audio&&!o.video||_(P)?n:P.invokeGetUserMedia(null,n))}):(o.audio||o.video)&&P.invokeGetUserMedia(null,n,o)))}function Ie(e,t){e?(t.audio&&S(e,"audio").forEach(function(e){e.applyConstraints(t.audio)}),t.video&&S(e,"video").forEach(function(e){e.applyConstraints(t.video)})):P.enableLogs&&console.error("No stream to applyConstraints.")}function Ne(t,e,n){e?I.replaceTrack(t,e,n):P.peers.getAllParticipants().forEach(function(e){I.replaceTrack(t,e,n)})}B=B||{useDefaultDevices:!0},(P=this).channel=P.sessionid=(D||location.href.replace(/\/|:|#|\?|\$|\^|%|\.|`|~|!|\+|@|\[|\||]|\|*. /g,"").split("\n").join("").split("\r").join(""))+"",I=new z(P),Ee={},I.onGettingLocalMedia=function(t,i){if(i=i||function(){},Ee[t.streamid])i();else{Ee[t.streamid]=!0;try{t.type="local"}catch(e){}P.setStreamEndHandler(t),j(t,function(e){e.id=t.streamid,e.muted=!0,e.volume=0,-1===P.attachStreams.indexOf(t)&&P.attachStreams.push(t),void 0!==M&&M.setHandlers(t,!0,P),P.streamEvents[t.streamid]={stream:t,type:"local",mediaElement:e,userid:P.userid,extra:P.extra,streamid:t.streamid,isAudioMuted:!0};try{var n=P,o=P.streamEvents[t.streamid];if(o.stream&&S(o.stream,"audio").length){if(!n||!o)throw"Both arguments are required.";if(n.onspeaking&&n.onsilence){if("undefined"==typeof hark)throw"hark.js not found.";hark(o.stream,{onspeaking:function(){n.onspeaking(o)},onsilence:function(){n.onsilence(o)},onvolumechange:function(e,t){n.onvolumechange&&n.onvolumechange(je({volume:e,threshold:t},o))}})}}F(P,P.streamEvents[t.streamid]),P.onstream(P.streamEvents[t.streamid])}catch(e){}i()},P)}},I.onGettingRemoteMedia=function(t,n){try{t.type="remote"}catch(e){}P.setStreamEndHandler(t,"remote-stream"),j(t,function(e){e.id=t.streamid,void 0!==M&&M.setHandlers(t,!1,P),P.streamEvents[t.streamid]={stream:t,type:"remote",userid:n,extra:P.peers[n]?P.peers[n].extra:{},mediaElement:e,streamid:t.streamid},F(P,P.streamEvents[t.streamid]),P.onstream(P.streamEvents[t.streamid])},P)},I.onRemovingRemoteMedia=function(e,t){var n=(n=P.streamEvents[e.streamid])||{stream:e,type:"remote",userid:t,extra:P.peers[t]?P.peers[t].extra:{},streamid:e.streamid,mediaElement:P.streamEvents[e.streamid]?P.streamEvents[e.streamid].mediaElement:null};P.peersBackup[n.userid]&&(n.extra=P.peersBackup[n.userid].extra),P.onstreamended(n),delete P.streamEvents[e.streamid]},I.onNegotiationNeeded=function(e,t,n){n=n||function(){};var o={remoteUserId:t=t||e.remoteUserId,message:e=e||"",sender:P.userid};e.remoteUserId&&e.message&&e.sender&&(o=e),L(function(){P.socket.emit(P.socketMessageEvent,o,n)})},I.onUserLeft=function(e){P.deletePeer(e)},I.disconnectWith=function(e,t){P.socket&&P.socket.emit("disconnect-with",e,t||function(){}),P.deletePeer(e)},P.socketOptions={transport:"polling"},P.openOrJoin=function(e,r){r=r||function(){},P.checkPresence(e,function(e,t){var n,o,i,a;e?(P.sessionid=t,e=!!P.session.oneway,n=c(P.session),o={OfferToReceiveAudio:P.sdpConstraints.mandatory.OfferToReceiveAudio,OfferToReceiveVideo:P.sdpConstraints.mandatory.OfferToReceiveVideo},i={OfferToReceiveAudio:e?!!P.session.audio:P.sdpConstraints.mandatory.OfferToReceiveAudio,OfferToReceiveVideo:e?!!P.session.video||!!P.session.screen:P.sdpConstraints.mandatory.OfferToReceiveVideo},Pe((a={remoteUserId:P.sessionid,message:{newParticipationRequest:!0,isOneWay:e,isDataOnly:n,localPeerSdpConstraints:i,remotePeerSdpConstraints:o},sender:P.userid}).message,function(){ke(a,r)})):(P.waitingForLocalMedia=!0,P.isInitiator=!0,P.sessionid=t||P.sessionid,c(P.session)?Oe(r):P.captureUserMedia(function(){Oe(r)}))})},P.waitingForLocalMedia=!1,P.open=function(e,t){t=t||function(){},P.waitingForLocalMedia=!0,P.isInitiator=!0,P.sessionid=e||P.sessionid,L(function(){c(P.session)?Oe(t):P.captureUserMedia(function(){Oe(t)})})},P.peersBackup={},P.deletePeer=function(e){if(e&&P.peers[e]){var t={userid:e,extra:P.peers[e]?P.peers[e].extra:{}};if(P.peersBackup[t.userid]&&(t.extra=P.peersBackup[t.userid].extra),P.onleave(t),P.peers[e]){P.peers[e].streams.forEach(function(e){e.stop()});t=P.peers[e].peer;if(t&&"closed"!==t.iceConnectionState)try{t.close()}catch(e){}P.peers[e]&&(P.peers[e].peer=null,delete P.peers[e])}}},P.rejoin=function(e){var t;!P.isInitiator&&e&&Object.keys(e).length&&(t={},P.peers[e.remoteUserId]&&(t=P.peers[e.remoteUserId].extra,P.deletePeer(e.remoteUserId)),e&&e.remoteUserId&&(P.join(e.remoteUserId),P.onReConnecting({userid:e.remoteUserId,extra:t})))},P.join=function(e,t){P.sessionid=!!e&&(e.sessionid||e.remoteUserId||e)||P.sessionid,P.sessionid+="";var n=!1,o=!1,i=!1,a=!1,r=((e&&e.session||!e||"string"==typeof e)&&(i=!!(e=e&&e.session||P.session).oneway,a=c(e),o={OfferToReceiveAudio:P.sdpConstraints.mandatory.OfferToReceiveAudio,OfferToReceiveVideo:P.sdpConstraints.mandatory.OfferToReceiveVideo},n={OfferToReceiveAudio:i?!!P.session.audio:P.sdpConstraints.mandatory.OfferToReceiveAudio,OfferToReceiveVideo:i?!!P.session.video||!!P.session.screen:P.sdpConstraints.mandatory.OfferToReceiveVideo}),function(){}),s=("function"==typeof(t=t||{})&&(r=t,t={}),void 0!==t.localPeerSdpConstraints&&(n=t.localPeerSdpConstraints),void 0!==t.remotePeerSdpConstraints&&(o=t.remotePeerSdpConstraints),void 0!==t.isOneWay&&(i=t.isOneWay),void 0!==t.isDataOnly&&(a=t.isDataOnly),{remoteUserId:P.sessionid,message:{newParticipationRequest:!0,isOneWay:i,isDataOnly:a,localPeerSdpConstraints:n,remotePeerSdpConstraints:o},sender:P.userid});return Pe(s.message,function(){L(function(){ke(s,r)})}),s},P.publicRoomIdentifier="",P.getUserMedia=P.captureUserMedia=function(o,i){o=o||function(){};var a=i||P.session;P.dontCaptureUserMedia||c(a)?o():(a.audio||a.video||a.screen)&&(a.screen?"Edge"===DetectRTC.browser.name?navigator.getDisplayMedia({video:!0,audio:_(P)}).then(function(e){if(e.isScreen=!0,I.onGettingLocalMedia(e),!a.audio&&!a.video||_(P))o(e);else{var t,n={};for(t in a)"screen"!==t&&(n[t]=a[t]);P.invokeGetUserMedia(i,o,n)}},function(e){console.error("Unable to capture screen on Edge. HTTPs and version 17+ is required.")}):P.getScreenConstraints(function(e,t){if(e)throw e;P.invokeGetUserMedia({audio:!!_(P)&&le(t),video:t,isScreen:!0},function(e){if(!a.audio&&!a.video||_(P))o(e);else{var t,n={};for(t in a)"screen"!==t&&(n[t]=a[t]);P.invokeGetUserMedia(i,o,n)}})}):(a.audio||a.video)&&P.invokeGetUserMedia(i,o,a))},P.onbeforeunload=function(e,t){P.closeBeforeUnload&&(P.peers.getAllParticipants().forEach(function(e){I.onNegotiationNeeded({userLeft:!0},e),P.peers[e]&&P.peers[e].peer&&P.peers[e].peer.close(),delete P.peers[e]}),t||P.closeSocket(),P.isInitiator=!1)},window.ignoreBeforeUnload?P.closeBeforeUnload=!1:(P.closeBeforeUnload=!0,window.addEventListener("beforeunload",P.onbeforeunload,!1)),P.userid=f(),P.changeUserId=function(e,t){t=t||function(){},P.userid=e||f(),P.socket.emit("changed-uuid",P.userid,t)},P.extra={},P.attachStreams=[],P.session={audio:!0,video:!0},P.enableFileSharing=!1,P.bandwidth={screen:!1,audio:!1,video:!1},P.codecs={audio:"opus",video:"VP9"},P.processSdp=function(e){return function(){var t=!1;try{if("undefined"==typeof RTCRtpTransceiver)return;if(!("currentDirection"in RTCRtpTransceiver.prototype))return;var e=new T;try{e.addTransceiver("audio"),t=!0}catch(e){}e.close()}catch(e){t=!1}return t&&function(){var t=!1;try{var e=new T({sdpSemantics:"unified-plan"});try{var n=e.getConfiguration(),t="unified-plan"==n.sdpSemantics||(n.sdpSemantics,!1)}catch(e){t=!1}}catch(e){t=!1}return t}()}()||"Safari"!==DetectRTC.browser.name&&("VP8"===P.codecs.video.toUpperCase()&&(e=E.preferCodec(e,"vp8")),"VP9"===P.codecs.video.toUpperCase()&&(e=E.preferCodec(e,"vp9")),"H264"===P.codecs.video.toUpperCase()&&(e=E.preferCodec(e,"h264")),"G722"===P.codecs.audio&&(e=E.removeNonG722(e)),"Firefox"!==DetectRTC.browser.name&&((P.bandwidth.video||P.bandwidth.screen)&&(e=E.setApplicationSpecificBandwidth(e,P.bandwidth,!!P.session.screen)),P.bandwidth.video&&(e=E.setVideoBitrates(e,{min:8*P.bandwidth.video*1024,max:8*P.bandwidth.video*1024})),P.bandwidth.audio&&(e=E.setOpusAttributes(e,{maxaveragebitrate:8*P.bandwidth.audio*1024,maxplaybackrate:8*P.bandwidth.audio*1024,stereo:1,maxptime:3})))),e},void 0!==E&&(P.BandwidthHandler=P.CodecsHandler=E),P.mediaConstraints={audio:{mandatory:{},optional:P.bandwidth.audio?[{bandwidth:8*P.bandwidth.audio*1024||1048576}]:[]},video:{mandatory:{},optional:P.bandwidth.video?[{bandwidth:8*P.bandwidth.video*1024||1048576},{facingMode:"user"}]:[{facingMode:"user"}]}},"Firefox"===DetectRTC.browser.name&&(P.mediaConstraints={audio:!0,video:!0}),B.useDefaultDevices||DetectRTC.isMobileDevice||DetectRTC.load(function(){var t,n;if(DetectRTC.MediaDevices.forEach(function(e){"audioinput"===e.kind&&!1!==P.mediaConstraints.audio&&(t=e),"videoinput"===e.kind&&!1!==P.mediaConstraints.video&&(n=e)}),t){if("Firefox"===DetectRTC.browser.name)return void(!0!==P.mediaConstraints.audio?P.mediaConstraints.audio.deviceId=t.id:P.mediaConstraints.audio={deviceId:t.id});1==P.mediaConstraints.audio&&(P.mediaConstraints.audio={mandatory:{},optional:[]}),P.mediaConstraints.audio.optional||(P.mediaConstraints.audio.optional=[]);var e=[{sourceId:t.id}];P.mediaConstraints.audio.optional=e.concat(P.mediaConstraints.audio.optional)}n&&("Firefox"===DetectRTC.browser.name?!0!==P.mediaConstraints.video?P.mediaConstraints.video.deviceId=n.id:P.mediaConstraints.video={deviceId:n.id}:(1==P.mediaConstraints.video&&(P.mediaConstraints.video={mandatory:{},optional:[]}),P.mediaConstraints.video.optional||(P.mediaConstraints.video.optional=[]),e=[{sourceId:n.id}],P.mediaConstraints.video.optional=e.concat(P.mediaConstraints.video.optional)))}),P.sdpConstraints={mandatory:{OfferToReceiveAudio:!0,OfferToReceiveVideo:!0},optional:[{VoiceActivityDetection:!1}]},P.sdpSemantics=null,P.iceCandidatePoolSize=null,P.bundlePolicy=null,P.rtcpMuxPolicy=null,P.iceTransportPolicy=null,P.optionalArgument={optional:[{DtlsSrtpKeyAgreement:!0},{googImprovedWifiBwe:!0},{googScreencastMinBitrate:300},{googIPv6:!0},{googDscp:!0},{googCpuUnderuseThreshold:55},{googCpuOveruseThreshold:85},{googSuspendBelowMinBitrate:!0},{googCpuOveruseDetection:!0}],mandatory:{}},P.iceServers=l(P),P.candidates={host:!0,stun:!0,turn:!0},P.iceProtocols={tcp:!0,udp:!0},P.onopen=function(e){P.enableLogs&&console.info("Data connection has been opened between you & ",e.userid)},P.onclose=function(e){P.enableLogs&&console.warn("Data connection has been closed between you & ",e.userid)},P.onerror=function(e){P.enableLogs&&console.error(e.userid,"data-error",e)},P.onmessage=function(e){P.enableLogs&&console.debug("data-message",e.userid,e.data)},P.send=function(e,t){P.peers.send(e,t)},P.close=P.disconnect=P.leave=function(){P.onbeforeunload(!1,!0)},P.closeEntireSession=function(t){t=t||function(){},P.socket.emit("close-entire-session",function e(){P.getAllParticipants().length?setTimeout(e,100):(P.onEntireSessionClosed({sessionid:P.sessionid,userid:P.userid,extra:P.extra}),P.changeUserId(null,function(){P.close(),t()}))})},P.onEntireSessionClosed=function(e){P.enableLogs&&console.info("Entire session is closed: ",e.sessionid,e.extra)},P.onstream=function(e){var t=P.videosContainer,t=(t.insertBefore(e.mediaElement,t.firstChild),e.mediaElement.play());void 0===t?setTimeout(function(){e.mediaElement.play()},2e3):t.catch(function(){}).then(function(){setTimeout(function(){e.mediaElement.play()},2e3)})},P.onstreamended=function(e){e.mediaElement||(e.mediaElement=document.getElementById(e.streamid)),e.mediaElement&&e.mediaElement.parentNode&&e.mediaElement.parentNode.removeChild(e.mediaElement)},P.direction="many-to-many",P.removeStream=function(t,n){var o;P.attachStreams.forEach(function(e){e.id===t&&(o=e)}),o?(P.peers.getAllParticipants().forEach(function(e){if(!n||e===n){e=P.peers[e];try{e.peer.removeStream(o)}catch(e){}}}),P.renegotiate()):console.warn("No such stream exist.",t)},P.addStream=function(n,t){if(n.getTracks)return-1===P.attachStreams.indexOf(n)&&(n.streamid||(n.streamid=n.id),P.attachStreams.push(n)),void P.renegotiate(t);function o(e){n.streamCallback&&n.streamCallback(e),P.renegotiate(t)}c(n)?P.renegotiate(t):(n.audio||n.video||n.screen)&&(n.screen?"Edge"===DetectRTC.browser.name?navigator.getDisplayMedia({video:!0,audio:_(P)}).then(function(e){e.isScreen=!0,I.onGettingLocalMedia(e),!n.audio&&!n.video||_(P)?o(e):P.invokeGetUserMedia(null,function(e){o(e)})},function(e){console.error("Unable to capture screen on Edge. HTTPs and version 17+ is required.")}):P.getScreenConstraints(function(e,t){if(e)return"PermissionDeniedError"===e?(n.streamCallback&&n.streamCallback(null),void(P.enableLogs&&console.error("User rejected to share his screen."))):alert(e);P.invokeGetUserMedia({audio:!!_(P)&&le(t),video:t,isScreen:!0},function(e){!n.audio&&!n.video||_(P)?o(e):P.invokeGetUserMedia(null,function(e){o(e)})})}):(n.audio||n.video)&&P.invokeGetUserMedia(null,o))},P.invokeGetUserMedia=function(n,o,e){e=e||P.session,we({onGettingLocalMedia:function(e){var t=n.video;t&&(t.mediaSource||t.mozMediaSource||t.mandatory&&t.mandatory.chromeMediaSource)&&(e.isScreen=!0),e.isScreen||(e.isVideo=!!S(e,"video").length,e.isAudio=!e.isVideo&&S(e,"audio").length),I.onGettingLocalMedia(e,function(){"function"==typeof o&&o(e)})},onLocalMediaError:function(e,t){I.onLocalMediaError(e,t)},localMediaConstraints:(n=n||P.mediaConstraints)||{audio:!!e.audio&&n.audio,video:!!e.video&&n.video}})},P.applyConstraints=function(t,e){var n;C&&C.prototype.applyConstraints?e?Ie(n=P.streamEvents[e]?P.streamEvents[e].stream:n,t):P.attachStreams.forEach(function(e){Ie(e,t)}):alert("track.applyConstraints is NOT supported in your browser.")},P.replaceTrack=function(n,t,o){if(n=n||{},T.prototype.getSenders)if(n instanceof C)Ne(n,t,o);else{if(n instanceof w)return S(n,"video").length&&Ne(S(n,"video")[0],t,!0),void(S(n,"audio").length&&Ne(S(n,"audio")[0],t,!1));if(c(n))throw"connection.replaceTrack requires audio and/or video and/or screen.";(n.audio||n.video||n.screen)&&(n.screen?"Edge"===DetectRTC.browser.name?navigator.getDisplayMedia({video:!0,audio:_(P)}).then(function(e){e.isScreen=!0,I.onGettingLocalMedia(e),!n.audio&&!n.video||_(P)?i(e):P.invokeGetUserMedia(null,i)},function(e){console.error("Unable to capture screen on Edge. HTTPs and version 17+ is required.")}):P.getScreenConstraints(function(e,t){if(e)return alert(e);P.invokeGetUserMedia({audio:!!_(P)&&le(t),video:t,isScreen:!0},!n.audio&&!n.video||_(P)?i:P.invokeGetUserMedia(null,i))}):(n.audio||n.video)&&P.invokeGetUserMedia(null,i))}else P.addStream(n);function i(e){P.replaceTrack(e,t,o||n.video||n.screen)}},P.resetTrack=function(e,n){(e="string"==typeof(e=e||P.getAllParticipants())?[e]:e).forEach(function(e){var t=P.peers[e].peer;void 0!==n&&!0!==n||!t.lastVideoTrack||P.replaceTrack(t.lastVideoTrack,e,!0),void 0!==n&&!1!==n||!t.lastAudioTrack||P.replaceTrack(t.lastAudioTrack,e,!1)})},P.renegotiate=function(e){e?I.renegotiatePeer(e):P.peers.getAllParticipants().forEach(function(e){I.renegotiatePeer(e)})},P.setStreamEndHandler=function(o,i){var e;o&&o.addEventListener&&(i=!!i,!o.alreadySetEndHandler)&&(o.alreadySetEndHandler=!0,e="ended","oninactive"in o&&(e="inactive"),o.addEventListener(e,function(){o.idInstance&¤tUserMediaRequest.remove(o.idInstance),i||(t=[],P.attachStreams.forEach(function(e){e.id!=o.id&&t.push(e)}),P.attachStreams=t);var e,t,n=(n=P.streamEvents[o.streamid])||{stream:o,streamid:o.streamid,type:i?"remote":"local",userid:P.userid,extra:P.extra,mediaElement:P.streamEvents[o.streamid]?P.streamEvents[o.streamid].mediaElement:null};i&&P.peers[n.userid]&&(e=P.peers[n.userid].peer,t=[],e.getRemoteStreams().forEach(function(e){e.id!=o.id&&t.push(e)}),P.peers[n.userid].streams=t),n.userid===P.userid&&"remote"===n.type||(P.peersBackup[n.userid]&&(n.extra=P.peersBackup[n.userid].extra),P.onstreamended(n),delete P.streamEvents[o.streamid])},!1))},P.onMediaError=function(e,t){P.enableLogs&&console.error(e,t)},P.autoCloseEntireSession=!1,P.filesContainer=P.videosContainer=document.body||document.documentElement,P.isInitiator=!1,P.shareFile=I.shareFile,a.handle(P),t.handle(P),P.token=f,P.onNewParticipant=function(e,t){P.acceptParticipationRequest(e,t)},P.acceptParticipationRequest=function(e,t){t.successCallback&&(t.successCallback(),delete t.successCallback),I.createNewPeer(e,t)},void 0!==M&&(P.StreamsHandler=M),P.onleave=function(e){},P.invokeSelectFileDialog=function(e){var t=new Fe;t.accept="*.*",t.selectSingleFile(e)},P.onmute=function(e){var t;e&&e.mediaElement&&("both"===e.muteType||"video"===e.muteType?(e.mediaElement.src=null,void 0!==(t=e.mediaElement.pause())?t.then(function(){e.mediaElement.poster=e.snapshot||"https://cdn.webrtc-experiment.com/images/muted.png"}):e.mediaElement.poster=e.snapshot||"https://cdn.webrtc-experiment.com/images/muted.png"):"audio"===e.muteType&&(e.mediaElement.muted=!0))},P.onunmute=function(e){e&&e.mediaElement&&e.stream&&("both"===e.unmuteType||"video"===e.unmuteType?(e.mediaElement.poster=null,e.mediaElement.srcObject=e.stream,e.mediaElement.play()):"audio"===e.unmuteType&&(e.mediaElement.muted=!1))},P.onExtraDataUpdated=function(e){e.status="online",P.onUserStatusChanged(e,!0)},P.getAllParticipants=function(e){return P.peers.getAllParticipants(e)},void 0!==M&&(M.onSyncNeeded=function(t,n,o){P.peers.getAllParticipants().forEach(function(e){I.onNegotiationNeeded({streamid:t,action:n,streamSyncNeeded:!0,type:o||"both"},e)})}),P.connectSocket=function(e){L(e)},P.closeSocket=function(){try{Be.a.sockets={}}catch(e){}P.socket&&("function"==typeof P.socket.disconnect&&P.socket.disconnect(),"function"==typeof P.socket.resetProps&&P.socket.resetProps(),P.socket=null)},P.getSocket=function(e){return!e&&P.enableLogs&&console.warn("getSocket.callback paramter is required."),e=e||function(){},P.socket?e(P.socket):L(function(){e(P.socket)}),P.socket},P.getRemoteStreams=I.getRemoteStreams,Ae=["selectFirst","selectAll","forEach"],P.streamEvents={selectFirst:function(e){return P.streamEvents.selectAll(e)[0]},selectAll:function(n){"video"==(n="audio"==(n="screen"==(n="remote"==(n="local"==(n=n||{local:!0,remote:!0,isScreen:!0,isAudio:!0,isVideo:!0})?{local:!0}:n)?{remote:!0}:n)?{isScreen:!0}:n)?{isAudio:!0}:n)&&(n={isVideo:!0});var o=[];return Object.keys(P.streamEvents).forEach(function(e){var t=P.streamEvents[e];-1===Ae.indexOf(e)&&(e=!0,n.local&&"local"===t.type&&(e=!1),n.remote&&"remote"===t.type&&(e=!1),n.isScreen&&t.stream.isScreen&&(e=!1),n.isVideo&&t.stream.isVideo&&(e=!1),n.isAudio&&t.stream.isAudio&&(e=!1),!1===(e=n.userid&&t.userid===n.userid?!1:e)&&o.push(t))}),o}},P.socketURL="/",P.socketMessageEvent="RTCMultiConnection-Message",P.socketCustomEvent="RTCMultiConnection-Custom-Message",P.DetectRTC=DetectRTC,P.setCustomSocketEvent=function(e){e&&(P.socketCustomEvent=e),P.socket&&P.socket.emit("set-custom-socket-event-listener",P.socketCustomEvent)},P.getNumberOfBroadcastViewers=function(e,t){P.socket&&e&&t&&P.socket.emit("get-number-of-users-in-specific-broadcast",e,t)},P.onNumberOfBroadcastViewersUpdated=function(e){P.enableLogs&&P.isInitiator&&console.info("Number of broadcast (",e.broadcastId,") viewers",e.numberOfBroadcastViewers)},P.onUserStatusChanged=function(e,t){P.enableLogs&&!t&&console.info(e.userid,e.status)},P.getUserMediaHandler=we,P.multiPeersHandler=I,P.enableLogs=!0,P.setCustomSocketHandler=function(e){void 0!==n&&(n=e)},P.chunkSize=4e4,P.maxParticipantsAllowed=1e3,P.disconnectWith=I.disconnectWith,P.checkPresence=function(e,o){e=e||P.sessionid,"SSEConnection"!==n.name?P.socket?P.socket.emit("check-presence",e+"",function(e,t,n){P.enableLogs&&console.log("checkPresence.isRoomExist: ",e," roomid: ",t),o(e,t,n)}):P.connectSocket(function(){P.checkPresence(e,o)}):SSEConnection.checkPresence(e,function(e,t,n){if(!P.socket)return e||(P.userid=t),void P.connectSocket(function(){o(e,t,n)});o(e,t)})},P.onReadyForOffer=function(e,t){P.multiPeersHandler.createNewPeer(e,t)},P.setUserPreferences=function(e){return P.dontAttachStream&&(e.dontAttachLocalStream=!0),P.dontGetRemoteStream&&(e.dontGetRemoteStream=!0),e},P.updateExtraData=function(){P.socket.emit("extra-data-updated",P.extra)},P.enableScalableBroadcast=!1,P.maxRelayLimitPerUser=3,P.dontCaptureUserMedia=!1,P.dontAttachStream=!1,P.dontGetRemoteStream=!1,P.onReConnecting=function(e){P.enableLogs&&console.info("ReConnecting with",e.userid,"...")},P.beforeAddingStream=function(e){return e},P.beforeRemovingStream=function(e){return e},P.checkIfChromeExtensionAvailable=Se,"undefined"!=typeof isFirefoxExtensionAvailable&&(P.checkIfChromeExtensionAvailable=isFirefoxExtensionAvailable),P.getChromeExtensionStatus=xe,P.getScreenConstraints=function(n,e){_(P,e)&&(e=!0);var o,i=function(e,t){e||(t=P.modifyScreenConstraints(t),n(e,t))};Te?i(null,{mozMediaSource:"window",mediaSource:"window"}):(o={mandatory:{chromeMediaSource:R,maxWidth:1920>16&255,i[a++]=t>>8&255,i[a++]=255&t;return 2===n&&(t=c[e.charCodeAt(s)]<<2|c[e.charCodeAt(s+1)]>>4,i[a++]=255&t),1===n&&(t=c[e.charCodeAt(s)]<<10|c[e.charCodeAt(s+1)]<<4|c[e.charCodeAt(s+2)]>>2,i[a++]=t>>8&255,i[a++]=255&t),i},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],a=0,r=n-o;a>18&63]+s[o>>12&63]+s[o>>6&63]+s[63&o]);return i.join("")}(e,a,r>2]+s[t<<4&63]+"==")):2==o&&(t=(e[n-2]<<8)+e[n-1],i.push(s[t>>10]+s[t>>4&63]+s[t<<2&63]+"=")),i.join("")};for(var s=[],c=[],l="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,a=o.length;i>1,d=-7,u=n?i-1:0,f=n?-1:1,i=e[t+u];for(u+=f,a=i&(1<<-d)-1,i>>=-d,d+=s;0>=-d,d+=o;0>1,u=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=o?0:a-1,p=o?1:-1,a=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,r=l):(r=Math.floor(Math.log(t)/Math.LN2),t*(o=Math.pow(2,-r))<1&&(r--,o*=2),2<=(t+=1<=r+d?u/o:u*Math.pow(2,1-d))*o&&(r++,o/=2),l<=r+d?(s=0,r=l):1<=r+d?(s=(t*o-1)*Math.pow(2,i),r+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),r=0));8<=i;e[n+f]=255&s,f+=p,s/=256,i-=8);for(r=r<>t&63|128)}function g(){if(u<=f)throw Error("Invalid byte index");var e=255&d[f];if(f++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}e.exports={version:"2.1.2",encode:function(e,t){for(var n=!1!==(t=t||{}).strict,o=h(e),i=o.length,a=-1,r="";++a>6&31|192):0==(4294901760&e)?(m(e,t)||(e=65533),n=p(e>>12&15|224),n+=s(e,6)):0==(4292870144&e)&&(n=p(e>>18&7|240),n=(n+=s(e,12))+s(e,6)),n+p(63&e|128)}(o[a],n);return r},decode:function(e,t){var n=!1!==(t=t||{}).strict;d=h(e),u=d.length,f=0;for(var o,i=[];!1!==(o=function(e){var t,n;if(u>>10&1023|55296),a=56320|1023&a),l+=p(a);return l}}},function(e,t){!function(){"use strict";for(var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=new Uint8Array(256),e=0;e>2])+a[(3&t[i])<<4|t[i+1]>>4])+a[(15&t[i+1])<<2|t[i+2]>>6])+a[63&t[i+2]];return n%3==2?o=o.substring(0,o.length-1)+"=":n%3==1&&(o=o.substring(0,o.length-2)+"=="),o},t.decode=function(e){for(var t,n,o,i,a=.75*e.length,r=e.length,s=0,a=("="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--),new ArrayBuffer(a)),c=new Uint8Array(a),l=0;l>4,c[s++]=(15&n)<<4|o>>2,c[s++]=(3&o)<<6|63&i;return a}}()},function(e,t){var o=void 0!==o?o:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder&&MozBlobBuilder,n=function(){try{return 2===new Blob(["hi"]).size}catch(e){return!1}}(),i=n&&function(){try{return 2===new Blob([new Uint8Array([1,2])]).size}catch(e){return!1}}(),a=o&&o.prototype.append&&o.prototype.getBlob;function r(e){return e.map(function(e){var t,n;return e.buffer instanceof ArrayBuffer?(t=e.buffer,e.byteLength!==t.byteLength&&((n=new Uint8Array(e.byteLength)).set(new Uint8Array(t,e.byteOffset,e.byteLength)),t=n.buffer),t):e})}function s(e,t){t=t||{};var n=new o;return r(e).forEach(function(e){n.append(e)}),t.type?n.getBlob(t.type):n.getBlob()}function c(e,t){return new Blob(r(e),t||{})}"undefined"!=typeof Blob&&(s.prototype=Blob.prototype,c.prototype=Blob.prototype),e.exports=n?i?Blob:c:a?s:void 0},function(e,c,t){function n(e){var r;function s(){if(s.enabled){var o=s,e=+new Date,t=e-(r||e);o.diff=t,o.prev=r,o.curr=e,r=e;for(var i=new Array(arguments.length),n=0;n';n=document.createElement(e)}catch(e){(n=document.createElement("iframe")).name=r.iframeId,n.src="javascript:0"}n.id=r.iframeId,r.form.appendChild(n),r.iframe=n}this.form||(o=document.createElement("form"),i=document.createElement("textarea"),a=this.iframeId="eio_iframe_"+this.index,o.className="socketio",o.style.position="absolute",o.style.top="-1000px",o.style.left="-1000px",o.target=a,o.method="POST",o.setAttribute("accept-charset","utf-8"),i.name="d",o.appendChild(i),document.body.appendChild(o),this.form=o,this.area=i),this.form.action=this.uri(),c(),e=e.replace(d,"\\\n"),this.area.value=e.replace(l,"\\n");try{this.form.submit()}catch(e){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"===r.iframe.readyState&&s()}:this.iframe.onload=s}}.call(this,s(31))},function(u,e,f){!function(a){var t,n,o=f(107),r=f(51),i=f(75),e=f(76),s=f(152),c=f(77)("engine.io-client:websocket");if("undefined"!=typeof WebSocket)t=WebSocket;else if("undefined"!=typeof self)t=self.WebSocket||self.MozWebSocket;else try{n=f(392)}catch(e){}var l=t||n;function d(e){e&&e.forceBase64&&(this.supportsBinary=!1),this.perMessageDeflate=e.perMessageDeflate,this.usingBrowserWebSocket=t&&!e.forceNode,this.protocols=e.protocols,this.usingBrowserWebSocket||(l=n),o.call(this,e)}e(u.exports=d,o),d.prototype.name="websocket",d.prototype.supportsBinary=!0,d.prototype.doOpen=function(){if(this.check()){var e=this.uri(),t=this.protocols,n={agent:this.agent,perMessageDeflate:this.perMessageDeflate};n.pfx=this.pfx,n.key=this.key,n.passphrase=this.passphrase,n.cert=this.cert,n.ca=this.ca,n.ciphers=this.ciphers,n.rejectUnauthorized=this.rejectUnauthorized,this.extraHeaders&&(n.headers=this.extraHeaders),this.localAddress&&(n.localAddress=this.localAddress);try{this.ws=this.usingBrowserWebSocket&&!this.isReactNative?t?new l(e,t):new l(e):new l(e,t,n)}catch(e){return this.emit("error",e)}void 0===this.ws.binaryType&&(this.supportsBinary=!1),this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="nodebuffer"):this.ws.binaryType="arraybuffer",this.addEventListeners()}},d.prototype.addEventListeners=function(){var t=this;this.ws.onopen=function(){t.onOpen()},this.ws.onclose=function(){t.onClose()},this.ws.onmessage=function(e){t.onData(e.data)},this.ws.onerror=function(e){t.onError("websocket error",e)}},d.prototype.write=function(e){var o=this;this.writable=!1;for(var i=e.length,t=0,n=i;t= 130\n#define COMPAT_VARYING out\n#define COMPAT_ATTRIBUTE in\n#define COMPAT_TEXTURE texture\n#else\n#define COMPAT_VARYING varying \n#define COMPAT_ATTRIBUTE attribute \n#define COMPAT_TEXTURE texture2D\n#endif\n\n#ifdef GL_ES\n#define COMPAT_PRECISION mediump\n#else\n#define COMPAT_PRECISION\n#endif\n\nCOMPAT_ATTRIBUTE vec4 VertexCoord;\nCOMPAT_ATTRIBUTE vec4 COLOR;\nCOMPAT_ATTRIBUTE vec4 TexCoord;\nCOMPAT_VARYING vec4 COL0;\nCOMPAT_VARYING vec4 TEX0;\nCOMPAT_VARYING vec4 t1;\nCOMPAT_VARYING vec4 t2;\nCOMPAT_VARYING vec4 t3;\nCOMPAT_VARYING vec4 t4;\n\nvec4 _oPosition1; \nuniform mat4 MVPMatrix;\nuniform COMPAT_PRECISION int FrameDirection;\nuniform COMPAT_PRECISION int FrameCount;\nuniform COMPAT_PRECISION vec2 OutputSize;\nuniform COMPAT_PRECISION vec2 TextureSize;\nuniform COMPAT_PRECISION vec2 InputSize;\n\n// compatibility #defines\n#define vTexCoord TEX0.xy\n#define SourceSize vec4(TextureSize, 1.0 / TextureSize) //either TextureSize or InputSize\n#define OutSize vec4(OutputSize, 1.0 / OutputSize)\n\nvoid main()\n{\ngl_Position = MVPMatrix * VertexCoord;\nTEX0.xy = TexCoord.xy;\nfloat x = 0.5 * SourceSize.z;\nfloat y = 0.5 * SourceSize.w;\nvec2 dg1 = vec2( x, y);\nvec2 dg2 = vec2(-x, y);\nvec2 dx = vec2(x, 0.0);\nvec2 dy = vec2(0.0, y);\nt1 = vec4(vTexCoord - dg1, vTexCoord - dy);\nt2 = vec4(vTexCoord - dg2, vTexCoord + dx);\nt3 = vec4(vTexCoord + dg1, vTexCoord + dy);\nt4 = vec4(vTexCoord + dg2, vTexCoord - dx);\n}\n\n#elif defined(FRAGMENT)\n\n#if __VERSION__ >= 130\n#define COMPAT_VARYING in\n#define COMPAT_TEXTURE texture\nout vec4 FragColor;\n#else\n#define COMPAT_VARYING varying\n#define FragColor gl_FragColor\n#define COMPAT_TEXTURE texture2D\n#endif\n\n#ifdef GL_ES\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n#define COMPAT_PRECISION mediump\n#else\n#define COMPAT_PRECISION\n#endif\n\nuniform COMPAT_PRECISION int FrameDirection;\nuniform COMPAT_PRECISION int FrameCount;\nuniform COMPAT_PRECISION vec2 OutputSize;\nuniform COMPAT_PRECISION vec2 TextureSize;\nuniform COMPAT_PRECISION vec2 InputSize;\nuniform sampler2D Texture;\nCOMPAT_VARYING vec4 TEX0;\nCOMPAT_VARYING vec4 t1;\nCOMPAT_VARYING vec4 t2;\nCOMPAT_VARYING vec4 t3;\nCOMPAT_VARYING vec4 t4;\n\n// compatibility #defines\n#define Source Texture\n#define vTexCoord TEX0.xy\n\n#define SourceSize vec4(TextureSize, 1.0 / TextureSize) //either TextureSize or InputSize\n#define OutSize vec4(OutputSize, 1.0 / OutputSize)\n\nfloat mx = 0.325; // start smoothing wt.\nfloat k = -0.250; // wt. decrease factor\nfloat max_w = 0.25; // max filter weight\nfloat min_w =-0.05; // min filter weight\nfloat lum_add = 0.25; // affects smoothing\nvec3 dt = vec3(1.0);\n\nvoid main()\n{\nvec3 c00 = COMPAT_TEXTURE(Source, t1.xy).xyz; \nvec3 c10 = COMPAT_TEXTURE(Source, t1.zw).xyz; \nvec3 c20 = COMPAT_TEXTURE(Source, t2.xy).xyz; \nvec3 c01 = COMPAT_TEXTURE(Source, t4.zw).xyz; \nvec3 c11 = COMPAT_TEXTURE(Source, vTexCoord).xyz; \nvec3 c21 = COMPAT_TEXTURE(Source, t2.zw).xyz; \nvec3 c02 = COMPAT_TEXTURE(Source, t4.xy).xyz; \nvec3 c12 = COMPAT_TEXTURE(Source, t3.zw).xyz; \nvec3 c22 = COMPAT_TEXTURE(Source, t3.xy).xyz; \n\nfloat md1 = dot(abs(c00 - c22), dt);\nfloat md2 = dot(abs(c02 - c20), dt);\n\nfloat w1 = dot(abs(c22 - c11), dt) * md2;\nfloat w2 = dot(abs(c02 - c11), dt) * md1;\nfloat w3 = dot(abs(c00 - c11), dt) * md2;\nfloat w4 = dot(abs(c20 - c11), dt) * md1;\n\nfloat t1 = w1 + w3;\nfloat t2 = w2 + w4;\nfloat ww = max(t1, t2) + 0.0001;\n\nc11 = (w1 * c00 + w2 * c20 + w3 * c22 + w4 * c02 + ww * c11) / (t1 + t2 + ww);\n\nfloat lc1 = k / (0.12 * dot(c10 + c12 + c11, dt) + lum_add);\nfloat lc2 = k / (0.12 * dot(c01 + c21 + c11, dt) + lum_add);\n\nw1 = clamp(lc1 * dot(abs(c11 - c10), dt) + mx, min_w, max_w);\nw2 = clamp(lc2 * dot(abs(c11 - c21), dt) + mx, min_w, max_w);\nw3 = clamp(lc1 * dot(abs(c11 - c12), dt) + mx, min_w, max_w);\nw4 = clamp(lc2 * dot(abs(c11 - c01), dt) + mx, min_w, max_w);\nFragColor = vec4(w1 * c10 + w2 * c21 + w3 * c12 + w4 * c01 + (1.0 - w1 - w2 - w3 - w4) * c11, 1.0);\n} \n#endif\n","4xScaleHQ.glsl":"/*\n4xGLSLHqFilter shader\n\nCopyright (C) 2005 guest(r) - guest.r@gmail.com\n\nThis program is free software; you can redistribute it and/or\nmodify it under the terms of the GNU General Public License\nas published by the Free Software Foundation; either version 2\nof the License, or (at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program; if not, write to the Free Software\nFoundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n*/\n\n#if defined(VERTEX)\n\n#if __VERSION__ >= 130\n#define COMPAT_VARYING out\n#define COMPAT_ATTRIBUTE in\n#define COMPAT_TEXTURE texture\n#else\n#define COMPAT_VARYING varying \n#define COMPAT_ATTRIBUTE attribute \n#define COMPAT_TEXTURE texture2D\n#endif\n\n#ifdef GL_ES\n#define COMPAT_PRECISION mediump\n#else\n#define COMPAT_PRECISION\n#endif\n\nCOMPAT_ATTRIBUTE vec4 VertexCoord;\nCOMPAT_ATTRIBUTE vec4 COLOR;\nCOMPAT_ATTRIBUTE vec4 TexCoord;\nCOMPAT_VARYING vec4 COL0;\nCOMPAT_VARYING vec4 TEX0;\nCOMPAT_VARYING vec4 t1;\nCOMPAT_VARYING vec4 t2;\nCOMPAT_VARYING vec4 t3;\nCOMPAT_VARYING vec4 t4;\nCOMPAT_VARYING vec4 t5;\nCOMPAT_VARYING vec4 t6;\n\nvec4 _oPosition1; \nuniform mat4 MVPMatrix;\nuniform COMPAT_PRECISION int FrameDirection;\nuniform COMPAT_PRECISION int FrameCount;\nuniform COMPAT_PRECISION vec2 OutputSize;\nuniform COMPAT_PRECISION vec2 TextureSize;\nuniform COMPAT_PRECISION vec2 InputSize;\n\n// compatibility #defines\n#define vTexCoord TEX0.xy\n#define SourceSize vec4(TextureSize, 1.0 / TextureSize) //either TextureSize or InputSize\n#define OutSize vec4(OutputSize, 1.0 / OutputSize)\n\nvoid main()\n{\ngl_Position = MVPMatrix * VertexCoord;\nTEX0.xy = TexCoord.xy;\nfloat x = 0.5 * SourceSize.z;\nfloat y = 0.5 * SourceSize.w;\nvec2 dg1 = vec2( x, y);\nvec2 dg2 = vec2(-x, y);\nvec2 sd1 = dg1 * 0.5;\nvec2 sd2 = dg2 * 0.5;\nvec2 ddx = vec2(x, 0.0);\nvec2 ddy = vec2(0.0, y);\nt1 = vec4(vTexCoord - sd1, vTexCoord - ddy);\nt2 = vec4(vTexCoord - sd2, vTexCoord + ddx);\nt3 = vec4(vTexCoord + sd1, vTexCoord + ddy);\nt4 = vec4(vTexCoord + sd2, vTexCoord - ddx);\nt5 = vec4(vTexCoord - dg1, vTexCoord - dg2);\nt6 = vec4(vTexCoord + dg1, vTexCoord + dg2);\n}\n\n#elif defined(FRAGMENT)\n\n#if __VERSION__ >= 130\n#define COMPAT_VARYING in\n#define COMPAT_TEXTURE texture\nout vec4 FragColor;\n#else\n#define COMPAT_VARYING varying\n#define FragColor gl_FragColor\n#define COMPAT_TEXTURE texture2D\n#endif\n\n#ifdef GL_ES\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n#define COMPAT_PRECISION mediump\n#else\n#define COMPAT_PRECISION\n#endif\n\nuniform COMPAT_PRECISION int FrameDirection;\nuniform COMPAT_PRECISION int FrameCount;\nuniform COMPAT_PRECISION vec2 OutputSize;\nuniform COMPAT_PRECISION vec2 TextureSize;\nuniform COMPAT_PRECISION vec2 InputSize;\nuniform sampler2D Texture;\nCOMPAT_VARYING vec4 TEX0;\nCOMPAT_VARYING vec4 t1;\nCOMPAT_VARYING vec4 t2;\nCOMPAT_VARYING vec4 t3;\nCOMPAT_VARYING vec4 t4;\nCOMPAT_VARYING vec4 t5;\nCOMPAT_VARYING vec4 t6;\n\n// compatibility #defines\n#define Source Texture\n#define vTexCoord TEX0.xy\n\n#define SourceSize vec4(TextureSize, 1.0 / TextureSize) //either TextureSize or InputSize\n#define OutSize vec4(OutputSize, 1.0 / OutputSize)\n\nfloat mx = 1.0; // start smoothing wt.\nfloat k = -1.10; // wt. decrease factor\nfloat max_w = 0.75; // max filter weight\nfloat min_w = 0.03; // min filter weight\nfloat lum_add = 0.33; // affects smoothing\nvec3 dt = vec3(1.0);\n\nvoid main()\n{\nvec3 c = COMPAT_TEXTURE(Source, vTexCoord).xyz;\nvec3 i1 = COMPAT_TEXTURE(Source, t1.xy).xyz; \nvec3 i2 = COMPAT_TEXTURE(Source, t2.xy).xyz; \nvec3 i3 = COMPAT_TEXTURE(Source, t3.xy).xyz; \nvec3 i4 = COMPAT_TEXTURE(Source, t4.xy).xyz; \nvec3 o1 = COMPAT_TEXTURE(Source, t5.xy).xyz; \nvec3 o3 = COMPAT_TEXTURE(Source, t6.xy).xyz; \nvec3 o2 = COMPAT_TEXTURE(Source, t5.zw).xyz;\nvec3 o4 = COMPAT_TEXTURE(Source, t6.zw).xyz;\nvec3 s1 = COMPAT_TEXTURE(Source, t1.zw).xyz; \nvec3 s2 = COMPAT_TEXTURE(Source, t2.zw).xyz; \nvec3 s3 = COMPAT_TEXTURE(Source, t3.zw).xyz; \nvec3 s4 = COMPAT_TEXTURE(Source, t4.zw).xyz; \n\nfloat ko1=dot(abs(o1-c),dt);\nfloat ko2=dot(abs(o2-c),dt);\nfloat ko3=dot(abs(o3-c),dt);\nfloat ko4=dot(abs(o4-c),dt);\n\nfloat k1=min(dot(abs(i1-i3),dt),max(ko1,ko3));\nfloat k2=min(dot(abs(i2-i4),dt),max(ko2,ko4));\n\nfloat w1 = k2; if(ko3= 130\n #define COMPAT_VARYING out\n #define COMPAT_ATTRIBUTE in\n #define COMPAT_TEXTURE texture\n #else\n #define COMPAT_VARYING varying\n #define COMPAT_ATTRIBUTE attribute\n #define COMPAT_TEXTURE texture2D\n #endif\n \n #ifdef GL_ES\n #define COMPAT_PRECISION mediump\n #else\n #define COMPAT_PRECISION\n #endif\n COMPAT_VARYING float _frame_rotation;\n struct input_dummy {\n vec2 _video_size;\n vec2 _texture_size;\n vec2 _output_dummy_size;\n float _frame_count;\n float _frame_direction;\n float _frame_rotation;\n };\n vec4 _oPosition1;\n vec4 _r0005;\n COMPAT_ATTRIBUTE vec4 VertexCoord;\n COMPAT_ATTRIBUTE vec4 TexCoord;\n COMPAT_VARYING vec4 TEX0;\n \n uniform mat4 MVPMatrix;\n uniform int FrameDirection;\n uniform int FrameCount;\n uniform COMPAT_PRECISION vec2 OutputSize;\n uniform COMPAT_PRECISION vec2 TextureSize;\n uniform COMPAT_PRECISION vec2 InputSize;\n void main()\n {\n vec2 _oTex;\n _r0005 = VertexCoord.x*MVPMatrix[0];\n _r0005 = _r0005 + VertexCoord.y*MVPMatrix[1];\n _r0005 = _r0005 + VertexCoord.z*MVPMatrix[2];\n _r0005 = _r0005 + VertexCoord.w*MVPMatrix[3];\n _oPosition1 = _r0005;\n _oTex = TexCoord.xy;\n gl_Position = _r0005;\n TEX0.xy = TexCoord.xy;\n }\n #elif defined(FRAGMENT)\n \n #if __VERSION__ >= 130\n #define COMPAT_VARYING in\n #define COMPAT_TEXTURE texture\n out vec4 FragColor;\n #else\n #define COMPAT_VARYING varying\n #define FragColor gl_FragColor\n #define COMPAT_TEXTURE texture2D\n #endif\n \n #ifdef GL_ES\n #ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp float;\n #else\n precision mediump float;\n #endif\n #define COMPAT_PRECISION mediump\n #else\n #define COMPAT_PRECISION\n #endif\n COMPAT_VARYING float _frame_rotation;\n struct input_dummy {\n vec2 _video_size;\n vec2 _texture_size;\n vec2 _output_dummy_size;\n float _frame_count;\n float _frame_direction;\n float _frame_rotation;\n };\n vec4 _ret_0;\n float _TMP30;\n float _TMP29;\n float _TMP28;\n float _TMP13;\n float _TMP32;\n float _TMP11;\n float _TMP10;\n float _TMP31;\n float _TMP9;\n float _TMP8;\n float _TMP15;\n float _TMP14;\n float _TMP33;\n vec4 _TMP34;\n vec4 _TMP27;\n vec4 _TMP25;\n vec4 _TMP23;\n vec4 _TMP21;\n vec4 _TMP26;\n vec4 _TMP24;\n vec4 _TMP22;\n vec4 _TMP20;\n float _TMP4;\n vec4 _TMP3;\n vec4 _TMP2;\n float _TMP19;\n float _TMP18;\n float _TMP17;\n float _TMP16;\n vec4 _TMP1;\n vec2 _TMP0;\n uniform sampler2D Texture;\n input_dummy _IN1;\n float _TMP43;\n float _x_step0044;\n float _curve0044;\n float _a0048;\n float _val0052;\n float _a0052;\n vec4 _TMP57;\n vec4 _x0072;\n vec2 _c0086;\n vec4 _x0088;\n vec4 _x0094;\n vec2 _c0098;\n vec4 _x0100;\n vec2 _c0104;\n vec4 _x0106;\n vec4 _sample_min0110;\n vec4 _sample_max0110;\n vec4 _r0112;\n vec4 _TMP117;\n vec2 _co0124;\n vec2 _c0126;\n vec4 _x0128;\n vec4 _x0134;\n vec2 _c0138;\n vec4 _x0140;\n vec2 _c0144;\n vec4 _x0146;\n vec4 _sample_min0150;\n vec4 _sample_max0150;\n vec4 _r0152;\n vec4 _TMP157;\n float _TMP163;\n float _x_step0164;\n float _curve0164;\n float _a0168;\n float _val0172;\n float _a0172;\n float _TMP183;\n float _TMP189;\n float _x0190;\n float _a0196;\n float _x0198;\n vec2 _x0200;\n float _x0208;\n COMPAT_VARYING vec4 TEX0;\n \n uniform COMPAT_PRECISION vec2 OutputSize;\n uniform COMPAT_PRECISION vec2 TextureSize;\n uniform COMPAT_PRECISION vec2 InputSize;\n void main()\n {\n vec2 _dx1;\n vec2 _dy;\n vec2 _pix_co;\n vec2 _tex_co;\n vec2 _dist;\n vec3 _col2;\n vec3 _col21;\n vec4 _coeffs1;\n float _luma;\n float _bright;\n float _scan_weight;\n vec2 _mod_fac;\n int _dot_no;\n vec3 _mask_weight;\n vec3 _TMP37;\n _dx1 = vec2(1.00000000E+00/TextureSize.x, 0.00000000E+00);\n _dy = vec2(0.00000000E+00, 1.00000000E+00/TextureSize.y);\n _pix_co = TEX0.xy*TextureSize - vec2( 5.00000000E-01, 5.00000000E-01);\n _TMP0 = floor(_pix_co);\n _tex_co = (_TMP0 + vec2( 5.00000000E-01, 5.00000000E-01))/TextureSize;\n _dist = fract(_pix_co);\n _x_step0044 = float((_dist.x >= 5.00000000E-01));\n _a0048 = 2.50000000E-01 - (_dist.x - _x_step0044)*(_dist.x - _x_step0044);\n _TMP33 = inversesqrt(_a0048);\n _TMP14 = 1.00000000E+00/_TMP33;\n _a0052 = 5.00000000E-01 - _dist.x;\n _val0052 = float((_a0052 > 0.00000000E+00));\n _TMP15 = _val0052 - float((_a0052 < 0.00000000E+00));\n _curve0044 = 5.00000000E-01 - _TMP14*_TMP15;\n _TMP43 = _dist.x + 2.50000000E-01*(_curve0044 - _dist.x);\n _coeffs1 = 3.14159274E+00*vec4(1.00000000E+00 + _TMP43, _TMP43, 1.00000000E+00 - _TMP43, 2.00000000E+00 - _TMP43);\n _TMP1 = abs(_coeffs1);\n _TMP57 = max(_TMP1, vec4( 9.99999975E-06, 9.99999975E-06, 9.99999975E-06, 9.99999975E-06));\n _TMP16 = sin(_TMP57.x);\n _TMP17 = sin(_TMP57.y);\n _TMP18 = sin(_TMP57.z);\n _TMP19 = sin(_TMP57.w);\n _TMP2 = vec4(_TMP16, _TMP17, _TMP18, _TMP19);\n _x0072 = _TMP57/2.00000000E+00;\n _TMP16 = sin(_x0072.x);\n _TMP17 = sin(_x0072.y);\n _TMP18 = sin(_x0072.z);\n _TMP19 = sin(_x0072.w);\n _TMP3 = vec4(_TMP16, _TMP17, _TMP18, _TMP19);\n _coeffs1 = ((2.00000000E+00*_TMP2)*_TMP3)/(_TMP57*_TMP57);\n _TMP4 = dot(_coeffs1, vec4( 1.00000000E+00, 1.00000000E+00, 1.00000000E+00, 1.00000000E+00));\n _coeffs1 = _coeffs1/_TMP4;\n _c0086 = _tex_co - _dx1;\n _TMP20 = COMPAT_TEXTURE(Texture, _c0086);\n _x0088 = vec4( 1.00000000E+00, 1.00000000E+00, 1.00000000E+00, 1.00000000E+00) + (_TMP20 - vec4( 1.00000000E+00, 1.00000000E+00, 1.00000000E+00, 1.00000000E+00));\n _TMP21 = _TMP20*_x0088;\n _TMP22 = COMPAT_TEXTURE(Texture, _tex_co);\n _x0094 = vec4( 1.00000000E+00, 1.00000000E+00, 1.00000000E+00, 1.00000000E+00) + (_TMP22 - vec4( 1.00000000E+00, 1.00000000E+00, 1.00000000E+00, 1.00000000E+00));\n _TMP23 = _TMP22*_x0094;\n _c0098 = _tex_co + _dx1;\n _TMP24 = COMPAT_TEXTURE(Texture, _c0098);\n _x0100 = vec4( 1.00000000E+00, 1.00000000E+00, 1.00000000E+00, 1.00000000E+00) + (_TMP24 - vec4( 1.00000000E+00, 1.00000000E+00, 1.00000000E+00, 1.00000000E+00));\n _TMP25 = _TMP24*_x0100;\n _c0104 = _tex_co + 2.00000000E+00*_dx1;\n _TMP26 = COMPAT_TEXTURE(Texture, _c0104);\n _x0106 = vec4( 1.00000000E+00, 1.00000000E+00, 1.00000000E+00, 1.00000000E+00) + (_TMP26 - vec4( 1.00000000E+00, 1.00000000E+00, 1.00000000E+00, 1.00000000E+00));\n _TMP27 = _TMP26*_x0106;\n _r0112 = _coeffs1.x*_TMP21;\n _r0112 = _r0112 + _coeffs1.y*_TMP23;\n _r0112 = _r0112 + _coeffs1.z*_TMP25;\n _r0112 = _r0112 + _coeffs1.w*_TMP27;\n _sample_min0110 = min(_TMP23, _TMP25);\n _sample_max0110 = max(_TMP23, _TMP25);\n _TMP34 = min(_sample_max0110, _r0112);\n _TMP117 = max(_sample_min0110, _TMP34);\n _co0124 = _tex_co + _dy;\n _c0126 = _co0124 - _dx1;\n _TMP20 = COMPAT_TEXTURE(Texture, _c0126);\n _x0128 = vec4( 1.00000000E+00, 1.00000000E+00, 1.00000000E+00, 1.00000000E+00) + (_TMP20 - vec4( 1.00000000E+00, 1.00000000E+00, 1.00000000E+00, 1.00000000E+00));\n _TMP21 = _TMP20*_x0128;\n _TMP22 = COMPAT_TEXTURE(Texture, _co0124);\n _x0134 = vec4( 1.00000000E+00, 1.00000000E+00, 1.00000000E+00, 1.00000000E+00) + (_TMP22 - vec4( 1.00000000E+00, 1.00000000E+00, 1.00000000E+00, 1.00000000E+00));\n _TMP23 = _TMP22*_x0134;\n _c0138 = _co0124 + _dx1;\n _TMP24 = COMPAT_TEXTURE(Texture, _c0138);\n _x0140 = vec4( 1.00000000E+00, 1.00000000E+00, 1.00000000E+00, 1.00000000E+00) + (_TMP24 - vec4( 1.00000000E+00, 1.00000000E+00, 1.00000000E+00, 1.00000000E+00));\n _TMP25 = _TMP24*_x0140;\n _c0144 = _co0124 + 2.00000000E+00*_dx1;\n _TMP26 = COMPAT_TEXTURE(Texture, _c0144);\n _x0146 = vec4( 1.00000000E+00, 1.00000000E+00, 1.00000000E+00, 1.00000000E+00) + (_TMP26 - vec4( 1.00000000E+00, 1.00000000E+00, 1.00000000E+00, 1.00000000E+00));\n _TMP27 = _TMP26*_x0146;\n _r0152 = _coeffs1.x*_TMP21;\n _r0152 = _r0152 + _coeffs1.y*_TMP23;\n _r0152 = _r0152 + _coeffs1.z*_TMP25;\n _r0152 = _r0152 + _coeffs1.w*_TMP27;\n _sample_min0150 = min(_TMP23, _TMP25);\n _sample_max0150 = max(_TMP23, _TMP25);\n _TMP34 = min(_sample_max0150, _r0152);\n _TMP157 = max(_sample_min0150, _TMP34);\n _x_step0164 = float((_dist.y >= 5.00000000E-01));\n _a0168 = 2.50000000E-01 - (_dist.y - _x_step0164)*(_dist.y - _x_step0164);\n _TMP33 = inversesqrt(_a0168);\n _TMP14 = 1.00000000E+00/_TMP33;\n _a0172 = 5.00000000E-01 - _dist.y;\n _val0172 = float((_a0172 > 0.00000000E+00));\n _TMP15 = _val0172 - float((_a0172 < 0.00000000E+00));\n _curve0164 = 5.00000000E-01 - _TMP14*_TMP15;\n _TMP163 = _dist.y + (_curve0164 - _dist.y);\n _col2 = _TMP117.xyz + _TMP163*(_TMP157.xyz - _TMP117.xyz);\n _luma = dot(vec3( 2.12599993E-01, 7.15200007E-01, 7.22000003E-02), _col2);\n _TMP8 = max(_col2.y, _col2.z);\n _TMP9 = max(_col2.x, _TMP8);\n _bright = (_TMP9 + _luma)/2.00000000E+00;\n _TMP31 = min(6.49999976E-01, _bright);\n _TMP183 = max(3.49999994E-01, _TMP31);\n _x0190 = _bright*1.50000000E+00;\n _TMP31 = min(1.50000000E+00, _x0190);\n _TMP189 = max(1.50000000E+00, _TMP31);\n _a0196 = TEX0.y*2.00000000E+00*3.14159274E+00*TextureSize.y;\n _TMP10 = cos(_a0196);\n _x0198 = _TMP10*5.00000000E-01 + 5.00000000E-01;\n _TMP11 = pow(_x0198, _TMP189);\n _scan_weight = 1.00000000E+00 - _TMP11;\n _x0200 = (TEX0.xy*OutputSize*TextureSize)/InputSize;\n _mod_fac = floor(_x0200);\n _x0208 = _mod_fac.x/3.00000000E+00;\n _TMP32 = floor(_x0208);\n _TMP13 = _mod_fac.x - 3.00000000E+00*_TMP32;\n _dot_no = int(_TMP13);\n if (_dot_no == 0) {\n _mask_weight = vec3( 1.00000000E+00, 6.99999988E-01, 6.99999988E-01);\n } else {\n if (_dot_no == 1) {\n _mask_weight = vec3( 6.99999988E-01, 1.00000000E+00, 6.99999988E-01);\n } else {\n _mask_weight = vec3( 6.99999988E-01, 6.99999988E-01, 1.00000000E+00);\n }\n }\n if (InputSize.y >= 4.00000000E+02) {\n _scan_weight = 1.00000000E+00;\n }\n _col21 = _col2.xyz;\n _col2 = _col2*vec3(_scan_weight, _scan_weight, _scan_weight);\n _col2 = _col2 + _TMP183*(_col21 - _col2);\n _col2 = _col2*_mask_weight;\n _TMP28 = pow(_col2.x, 5.55555582E-01);\n _TMP29 = pow(_col2.y, 5.55555582E-01);\n _TMP30 = pow(_col2.z, 5.55555582E-01);\n _col2 = vec3(_TMP28, _TMP29, _TMP30);\n _TMP37 = _col2*1.20000005E+00;\n _ret_0 = vec4(_TMP37.x, _TMP37.y, _TMP37.z, 1.00000000E+00);\n FragColor = _ret_0;\n return;\n }\n #endif\n","crt-aperture.glsl":'\n/*\nCRT Shader by EasyMode\nLicense: GPL\n*/\n/*\n#pragma parameter SHARPNESS_IMAGE "Sharpness Image" 1.0 1.0 5.0 1.0\n#pragma parameter SHARPNESS_EDGES "Sharpness Edges" 3.0 1.0 5.0 1.0\n#pragma parameter GLOW_WIDTH "Glow Width" 0.5 0.05 0.65 0.05\n#pragma parameter GLOW_HEIGHT "Glow Height" 0.5 0.05 0.65 0.05\n#pragma parameter GLOW_HALATION "Glow Halation" 0.1 0.0 1.0 0.01\n#pragma parameter GLOW_DIFFUSION "Glow Diffusion" 0.05 0.0 1.0 0.01\n#pragma parameter MASK_COLORS "Mask Colors" 2.0 2.0 3.0 1.0\n#pragma parameter MASK_STRENGTH "Mask Strength" 0.3 0.0 1.0 0.05\n#pragma parameter MASK_SIZE "Mask Size" 1.0 1.0 9.0 1.0\n#pragma parameter SCANLINE_SIZE_MIN "Scanline Size Min." 0.5 0.5 1.5 0.05\n#pragma parameter SCANLINE_SIZE_MAX "Scanline Size Max." 1.5 0.5 1.5 0.05\n#pragma parameter GAMMA_INPUT "Gamma Input" 2.4 1.0 5.0 0.1\n#pragma parameter GAMMA_OUTPUT "Gamma Output" 2.4 1.0 5.0 0.1\n#pragma parameter BRIGHTNESS "Brightness" 1.5 0.0 2.0 0.05\n* */\n\n#define Coord TEX0\n\n#if defined(VERTEX)\n\n#if __VERSION__ >= 130\n#define OUT out\n#define IN in\n#define tex2D texture\n#else\n#define OUT varying \n#define IN attribute \n#define tex2D texture2D\n#endif\n\n#ifdef GL_ES\n#define PRECISION mediump\n#else\n#define PRECISION\n#endif\n\nIN vec4 VertexCoord;\nIN vec4 Color;\nIN vec2 TexCoord;\nOUT vec4 color;\nOUT vec2 Coord;\n\nuniform mat4 MVPMatrix;\nuniform PRECISION int FrameDirection;\nuniform PRECISION int FrameCount;\nuniform PRECISION vec2 OutputSize;\nuniform PRECISION vec2 TextureSize;\nuniform PRECISION vec2 InputSize;\n\nvoid main()\n{\ngl_Position = MVPMatrix * VertexCoord;\ncolor = Color;\nCoord = TexCoord;\n}\n\n#elif defined(FRAGMENT)\n\n#if __VERSION__ >= 130\n#define IN in\n#define tex2D texture\nout vec4 FragColor;\n#else\n#define IN varying\n#define FragColor gl_FragColor\n#define tex2D texture2D\n#endif\n\n#ifdef GL_ES\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n#define PRECISION mediump\n#else\n#define PRECISION\n#endif\n\nuniform PRECISION int FrameDirection;\nuniform PRECISION int FrameCount;\nuniform PRECISION vec2 OutputSize;\nuniform PRECISION vec2 TextureSize;\nuniform PRECISION vec2 InputSize;\nuniform sampler2D Texture;\nIN vec2 Coord;\n\n#ifdef PARAMETER_UNIFORM\nuniform PRECISION float SHARPNESS_IMAGE;\nuniform PRECISION float SHARPNESS_EDGES;\nuniform PRECISION float GLOW_WIDTH;\nuniform PRECISION float GLOW_HEIGHT;\nuniform PRECISION float GLOW_HALATION;\nuniform PRECISION float GLOW_DIFFUSION;\nuniform PRECISION float MASK_COLORS;\nuniform PRECISION float MASK_STRENGTH;\nuniform PRECISION float MASK_SIZE;\nuniform PRECISION float SCANLINE_SIZE_MIN;\nuniform PRECISION float SCANLINE_SIZE_MAX;\nuniform PRECISION float GAMMA_INPUT;\nuniform PRECISION float GAMMA_OUTPUT;\nuniform PRECISION float BRIGHTNESS;\n#else\n#define SHARPNESS_IMAGE 1.0\n#define SHARPNESS_EDGES 3.0\n#define GLOW_WIDTH 0.5\n#define GLOW_HEIGHT 0.5\n#define GLOW_HALATION 0.1\n#define GLOW_DIFFUSION 0.05\n#define MASK_COLORS 2.0\n#define MASK_STRENGTH 0.3\n#define MASK_SIZE 1.0\n#define SCANLINE_SIZE_MIN 0.5\n#define SCANLINE_SIZE_MAX 1.5\n#define GAMMA_INPUT 2.4\n#define GAMMA_OUTPUT 2.4\n#define BRIGHTNESS 1.5\n#endif\n\n#define FIX(c) max(abs(c), 1e-5)\n#define PI 3.141592653589\n#define saturate(c) clamp(c, 0.0, 1.0)\n#define TEX2D(c) pow(tex2D(tex, c).rgb, vec3(GAMMA_INPUT))\n\nmat3 get_color_matrix(sampler2D tex, vec2 co, vec2 dx)\n{\nreturn mat3(TEX2D(co - dx), TEX2D(co), TEX2D(co + dx));\n}\n\nvec3 blur(mat3 m, float dist, float rad)\n{\nvec3 x = vec3(dist - 1.0, dist, dist + 1.0) / rad;\nvec3 w = exp2(x * x * -1.0);\n\nreturn (m[0] * w.x + m[1] * w.y + m[2] * w.z) / (w.x + w.y + w.z);\n}\n\nvec3 filter_gaussian(sampler2D tex, vec2 co, vec2 tex_size)\n{\nvec2 dx = vec2(1.0 / tex_size.x, 0.0);\nvec2 dy = vec2(0.0, 1.0 / tex_size.y);\nvec2 pix_co = co * tex_size;\nvec2 tex_co = (floor(pix_co) + 0.5) / tex_size;\nvec2 dist = (fract(pix_co) - 0.5) * -1.0;\n\nmat3 line0 = get_color_matrix(tex, tex_co - dy, dx);\nmat3 line1 = get_color_matrix(tex, tex_co, dx);\nmat3 line2 = get_color_matrix(tex, tex_co + dy, dx);\nmat3 column = mat3(blur(line0, dist.x, GLOW_WIDTH),\n blur(line1, dist.x, GLOW_WIDTH),\n blur(line2, dist.x, GLOW_WIDTH));\n\nreturn blur(column, dist.y, GLOW_HEIGHT);\n}\n\nvec3 filter_lanczos(sampler2D tex, vec2 co, vec2 tex_size, float sharp)\n{\ntex_size.x *= sharp;\n\nvec2 dx = vec2(1.0 / tex_size.x, 0.0);\nvec2 pix_co = co * tex_size - vec2(0.5, 0.0);\nvec2 tex_co = (floor(pix_co) + vec2(0.5, 0.0)) / tex_size;\nvec2 dist = fract(pix_co);\nvec4 coef = PI * vec4(dist.x + 1.0, dist.x, dist.x - 1.0, dist.x - 2.0);\n\ncoef = FIX(coef);\ncoef = 2.0 * sin(coef) * sin(coef / 2.0) / (coef * coef);\ncoef /= dot(coef, vec4(1.0));\n\nvec4 col1 = vec4(TEX2D(tex_co), 1.0);\nvec4 col2 = vec4(TEX2D(tex_co + dx), 1.0);\n\nreturn (mat4(col1, col1, col2, col2) * coef).rgb;\n}\n\nvec3 get_scanline_weight(float x, vec3 col)\n{\nvec3 beam = mix(vec3(SCANLINE_SIZE_MIN), vec3(SCANLINE_SIZE_MAX), col);\nvec3 x_mul = 2.0 / beam;\nvec3 x_offset = x_mul * 0.5;\n\nreturn smoothstep(0.0, 1.0, 1.0 - abs(x * x_mul - x_offset)) * x_offset;\n}\n\nvec3 get_mask_weight(float x)\n{\nfloat i = mod(floor(x * OutputSize.x * TextureSize.x / (InputSize.x * MASK_SIZE)), MASK_COLORS);\n\nif (i == 0.0) return mix(vec3(1.0, 0.0, 1.0), vec3(1.0, 0.0, 0.0), MASK_COLORS - 2.0);\nelse if (i == 1.0) return vec3(0.0, 1.0, 0.0);\nelse return vec3(0.0, 0.0, 1.0);\n}\n\nvoid main()\n{\nvec3 col_glow = filter_gaussian(Texture, Coord, TextureSize);\nvec3 col_soft = filter_lanczos(Texture, Coord, TextureSize, SHARPNESS_IMAGE);\nvec3 col_sharp = filter_lanczos(Texture, Coord, TextureSize, SHARPNESS_EDGES);\nvec3 col = sqrt(col_sharp * col_soft);\n\ncol *= get_scanline_weight(fract(Coord.y * TextureSize.y), col_soft);\ncol_glow = saturate(col_glow - col);\ncol += col_glow * col_glow * GLOW_HALATION;\ncol = mix(col, col * get_mask_weight(Coord.x) * MASK_COLORS, MASK_STRENGTH);\ncol += col_glow * GLOW_DIFFUSION;\ncol = pow(col * BRIGHTNESS, vec3(1.0 / GAMMA_OUTPUT));\n\nFragColor = vec4(col, 1.0);\n}\n\n#endif\n',"crt-geom.glsl":'\n/*\nCRT-interlaced\n\nCopyright (C) 2010-2012 cgwg, Themaister and DOLLS\n\nThis program is free software; you can redistribute it and/or modify it\nunder the terms of the GNU General Public License as published by the Free\nSoftware Foundation; either version 2 of the License, or (at your option)\nany later version.\n\n(cgwg gave their consent to have the original version of this shader\ndistributed under the GPL in this message:\n\nhttp://board.byuu.org/viewtopic.php?p=26075#p26075\n\n"Feel free to distribute my shaders under the GPL. After all, the\nbarrel distortion code was taken from the Curvature shader, which is\nunder the GPL."\n)\nThis shader variant is pre-configured with screen curvature\n*/\n/*\n#pragma parameter CRTgamma "CRTGeom Target Gamma" 2.4 0.1 5.0 0.1\n#pragma parameter monitorgamma "CRTGeom Monitor Gamma" 2.2 0.1 5.0 0.1\n#pragma parameter d "CRTGeom Distance" 1.6 0.1 3.0 0.1\n#pragma parameter CURVATURE "CRTGeom Curvature Toggle" 1.0 0.0 1.0 1.0\n#pragma parameter R "CRTGeom Curvature Radius" 2.0 0.1 10.0 0.1\n#pragma parameter cornersize "CRTGeom Corner Size" 0.03 0.001 1.0 0.005\n#pragma parameter cornersmooth "CRTGeom Corner Smoothness" 1000.0 80.0 2000.0 100.0\n#pragma parameter x_tilt "CRTGeom Horizontal Tilt" 0.0 -0.5 0.5 0.05\n#pragma parameter y_tilt "CRTGeom Vertical Tilt" 0.0 -0.5 0.5 0.05\n#pragma parameter overscan_x "CRTGeom Horiz. Overscan %" 100.0 -125.0 125.0 1.0\n#pragma parameter overscan_y "CRTGeom Vert. Overscan %" 100.0 -125.0 125.0 1.0\n#pragma parameter DOTMASK "CRTGeom Dot Mask Toggle" 0.3 0.0 0.3 0.3\n#pragma parameter SHARPER "CRTGeom Sharpness" 1.0 1.0 3.0 1.0\n#pragma parameter scanline_weight "CRTGeom Scanline Weight" 0.3 0.1 0.5 0.05\n*/\n\n#ifndef PARAMETER_UNIFORM\n#define CRTgamma 2.4\n#define monitorgamma 2.2\n#define d 1.6\n#define CURVATURE 1.0\n#define R 2.0\n#define cornersize 0.03\n#define cornersmooth 1000.0\n#define x_tilt 0.0\n#define y_tilt 0.0\n#define overscan_x 100.0\n#define overscan_y 100.0\n#define DOTMASK 0.3\n#define SHARPER 1.0\n#define scanline_weight 0.3\n#endif\n\n#if defined(VERTEX)\n\n#if __VERSION__ >= 130\n#define COMPAT_VARYING out\n#define COMPAT_ATTRIBUTE in\n#define COMPAT_TEXTURE texture\n#else\n#define COMPAT_VARYING varying \n#define COMPAT_ATTRIBUTE attribute \n#define COMPAT_TEXTURE texture2D\n#endif\n\n#ifdef GL_ES\n#define COMPAT_PRECISION mediump\n#else\n#define COMPAT_PRECISION\n#endif\n\nCOMPAT_ATTRIBUTE vec4 VertexCoord;\nCOMPAT_ATTRIBUTE vec4 COLOR;\nCOMPAT_ATTRIBUTE vec4 TexCoord;\nCOMPAT_VARYING vec4 COL0;\nCOMPAT_VARYING vec4 TEX0;\n\nvec4 _oPosition1; \nuniform mat4 MVPMatrix;\nuniform COMPAT_PRECISION int FrameDirection;\nuniform COMPAT_PRECISION int FrameCount;\nuniform COMPAT_PRECISION vec2 OutputSize;\nuniform COMPAT_PRECISION vec2 TextureSize;\nuniform COMPAT_PRECISION vec2 InputSize;\n\nCOMPAT_VARYING vec2 overscan;\nCOMPAT_VARYING vec2 aspect;\nCOMPAT_VARYING vec3 stretch;\nCOMPAT_VARYING vec2 sinangle;\nCOMPAT_VARYING vec2 cosangle;\nCOMPAT_VARYING vec2 one;\nCOMPAT_VARYING float mod_factor;\nCOMPAT_VARYING vec2 ilfac;\n\n#ifdef PARAMETER_UNIFORM\nuniform COMPAT_PRECISION float CRTgamma;\nuniform COMPAT_PRECISION float monitorgamma;\nuniform COMPAT_PRECISION float d;\nuniform COMPAT_PRECISION float CURVATURE;\nuniform COMPAT_PRECISION float R;\nuniform COMPAT_PRECISION float cornersize;\nuniform COMPAT_PRECISION float cornersmooth;\nuniform COMPAT_PRECISION float x_tilt;\nuniform COMPAT_PRECISION float y_tilt;\nuniform COMPAT_PRECISION float overscan_x;\nuniform COMPAT_PRECISION float overscan_y;\nuniform COMPAT_PRECISION float DOTMASK;\nuniform COMPAT_PRECISION float SHARPER;\nuniform COMPAT_PRECISION float scanline_weight;\n#endif\n\n#define FIX(c) max(abs(c), 1e-5);\n\nfloat intersect(vec2 xy)\n{\nfloat A = dot(xy,xy)+d*d;\nfloat B = 2.0*(R*(dot(xy,sinangle)-d*cosangle.x*cosangle.y)-d*d);\nfloat C = d*d + 2.0*R*d*cosangle.x*cosangle.y;\nreturn (-B-sqrt(B*B-4.0*A*C))/(2.0*A);\n}\n\nvec2 bkwtrans(vec2 xy)\n{\nfloat c = intersect(xy);\nvec2 point = vec2(c)*xy;\npoint -= vec2(-R)*sinangle;\npoint /= vec2(R);\nvec2 tang = sinangle/cosangle;\nvec2 poc = point/cosangle;\nfloat A = dot(tang,tang)+1.0;\nfloat B = -2.0*dot(poc,tang);\nfloat C = dot(poc,poc)-1.0;\nfloat a = (-B+sqrt(B*B-4.0*A*C))/(2.0*A);\nvec2 uv = (point-a*sinangle)/cosangle;\nfloat r = R*acos(a);\nreturn uv*r/sin(r/R);\n}\n\nvec2 fwtrans(vec2 uv)\n{\nfloat r = FIX(sqrt(dot(uv,uv)));\nuv *= sin(r/R)/r;\nfloat x = 1.0-cos(r/R);\nfloat D = d/R + x*cosangle.x*cosangle.y+dot(uv,sinangle);\nreturn d*(uv*cosangle-x*sinangle)/D;\n}\n\nvec3 maxscale()\n{\nvec2 c = bkwtrans(-R * sinangle / (1.0 + R/d*cosangle.x*cosangle.y));\nvec2 a = vec2(0.5,0.5)*aspect;\nvec2 lo = vec2(fwtrans(vec2(-a.x,c.y)).x, fwtrans(vec2(c.x,-a.y)).y)/aspect;\nvec2 hi = vec2(fwtrans(vec2(+a.x,c.y)).x, fwtrans(vec2(c.x,+a.y)).y)/aspect;\nreturn vec3((hi+lo)*aspect*0.5,max(hi.x-lo.x,hi.y-lo.y));\n}\n\nvoid main()\n{\n// START of parameters\n\n// gamma of simulated CRT\n//\tCRTgamma = 1.8;\n// gamma of display monitor (typically 2.2 is correct)\n//\tmonitorgamma = 2.2;\n// overscan (e.g. 1.02 for 2% overscan)\noverscan = vec2(1.00,1.00);\n// aspect ratio\naspect = vec2(1.0, 0.75);\n// lengths are measured in units of (approximately) the width\n// of the monitor simulated distance from viewer to monitor\n//\td = 2.0;\n// radius of curvature\n//\tR = 1.5;\n// tilt angle in radians\n// (behavior might be a bit wrong if both components are\n// nonzero)\nconst vec2 angle = vec2(0.0,0.0);\n// size of curved corners\n//\tcornersize = 0.03;\n// border smoothness parameter\n// decrease if borders are too aliased\n//\tcornersmooth = 1000.0;\n\n// END of parameters\n\nvec4 _oColor;\nvec2 _otexCoord;\ngl_Position = VertexCoord.x * MVPMatrix[0] + VertexCoord.y * MVPMatrix[1] + VertexCoord.z * MVPMatrix[2] + VertexCoord.w * MVPMatrix[3];\n_oPosition1 = gl_Position;\n_oColor = COLOR;\n_otexCoord = TexCoord.xy;\nCOL0 = COLOR;\nTEX0.xy = TexCoord.xy;\n\n// Precalculate a bunch of useful values we\'ll need in the fragment\n// shader.\nsinangle = sin(vec2(x_tilt, y_tilt)) + vec2(0.001);//sin(vec2(max(abs(x_tilt), 1e-3), max(abs(y_tilt), 1e-3)));\ncosangle = cos(vec2(x_tilt, y_tilt)) + vec2(0.001);//cos(vec2(max(abs(x_tilt), 1e-3), max(abs(y_tilt), 1e-3)));\nstretch = maxscale();\n\nilfac = vec2(1.0,clamp(floor(InputSize.y/200.0), 1.0, 2.0));\n\n// The size of one texel, in texture-coordinates.\nvec2 sharpTextureSize = vec2(SHARPER * TextureSize.x, TextureSize.y);\none = ilfac / sharpTextureSize;\n\n// Resulting X pixel-coordinate of the pixel we\'re drawing.\nmod_factor = TexCoord.x * TextureSize.x * OutputSize.x / InputSize.x;\n\n}\n\n#elif defined(FRAGMENT)\n\n#if __VERSION__ >= 130\n#define COMPAT_VARYING in\n#define COMPAT_TEXTURE texture\nout vec4 FragColor;\n#else\n#define COMPAT_VARYING varying\n#define FragColor gl_FragColor\n#define COMPAT_TEXTURE texture2D\n#endif\n\n#ifdef GL_ES\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n#define COMPAT_PRECISION mediump\n#else\n#define COMPAT_PRECISION\n#endif\n\nstruct output_dummy {\nvec4 _color;\n};\n\nuniform COMPAT_PRECISION int FrameDirection;\nuniform COMPAT_PRECISION int FrameCount;\nuniform COMPAT_PRECISION vec2 OutputSize;\nuniform COMPAT_PRECISION vec2 TextureSize;\nuniform COMPAT_PRECISION vec2 InputSize;\nuniform sampler2D Texture;\nCOMPAT_VARYING vec4 TEX0;\n\n// Comment the next line to disable interpolation in linear gamma (and\n// gain speed).\n#define LINEAR_PROCESSING\n\n// Enable screen curvature.\n// #define CURVATURE\n\n// Enable 3x oversampling of the beam profile\n#define OVERSAMPLE\n\n// Use the older, purely gaussian beam profile\n//#define USEGAUSSIAN\n\n// Macros.\n#define FIX(c) max(abs(c), 1e-5);\n#define PI 3.141592653589\n\n#ifdef LINEAR_PROCESSING\n# define TEX2D(c) pow(COMPAT_TEXTURE(Texture, (c)), vec4(CRTgamma))\n#else\n# define TEX2D(c) COMPAT_TEXTURE(Texture, (c))\n#endif\n\nCOMPAT_VARYING vec2 one;\nCOMPAT_VARYING float mod_factor;\nCOMPAT_VARYING vec2 ilfac;\nCOMPAT_VARYING vec2 overscan;\nCOMPAT_VARYING vec2 aspect;\nCOMPAT_VARYING vec3 stretch;\nCOMPAT_VARYING vec2 sinangle;\nCOMPAT_VARYING vec2 cosangle;\n\n#ifdef PARAMETER_UNIFORM\nuniform COMPAT_PRECISION float CRTgamma;\nuniform COMPAT_PRECISION float monitorgamma;\nuniform COMPAT_PRECISION float d;\nuniform COMPAT_PRECISION float CURVATURE;\nuniform COMPAT_PRECISION float R;\nuniform COMPAT_PRECISION float cornersize;\nuniform COMPAT_PRECISION float cornersmooth;\nuniform COMPAT_PRECISION float x_tilt;\nuniform COMPAT_PRECISION float y_tilt;\nuniform COMPAT_PRECISION float overscan_x;\nuniform COMPAT_PRECISION float overscan_y;\nuniform COMPAT_PRECISION float DOTMASK;\nuniform COMPAT_PRECISION float SHARPER;\nuniform COMPAT_PRECISION float scanline_weight;\n#endif\n\nfloat intersect(vec2 xy)\n{\nfloat A = dot(xy,xy)+d*d;\nfloat B = 2.0*(R*(dot(xy,sinangle)-d*cosangle.x*cosangle.y)-d*d);\nfloat C = d*d + 2.0*R*d*cosangle.x*cosangle.y;\nreturn (-B-sqrt(B*B-4.0*A*C))/(2.0*A);\n}\n\nvec2 bkwtrans(vec2 xy)\n{\nfloat c = intersect(xy);\nvec2 point = vec2(c)*xy;\npoint -= vec2(-R)*sinangle;\npoint /= vec2(R);\nvec2 tang = sinangle/cosangle;\nvec2 poc = point/cosangle;\nfloat A = dot(tang,tang)+1.0;\nfloat B = -2.0*dot(poc,tang);\nfloat C = dot(poc,poc)-1.0;\nfloat a = (-B+sqrt(B*B-4.0*A*C))/(2.0*A);\nvec2 uv = (point-a*sinangle)/cosangle;\nfloat r = FIX(R*acos(a));\nreturn uv*r/sin(r/R);\n}\n\nvec2 transform(vec2 coord)\n{\ncoord *= TextureSize / InputSize;\ncoord = (coord-vec2(0.5))*aspect*stretch.z+stretch.xy;\nreturn (bkwtrans(coord)/vec2(overscan_x / 100.0, overscan_y / 100.0)/aspect+vec2(0.5)) * InputSize / TextureSize;\n}\n\nfloat corner(vec2 coord)\n{\ncoord *= TextureSize / InputSize;\ncoord = (coord - vec2(0.5)) * vec2(overscan_x / 100.0, overscan_y / 100.0) + vec2(0.5);\ncoord = min(coord, vec2(1.0)-coord) * aspect;\nvec2 cdist = vec2(cornersize);\ncoord = (cdist - min(coord,cdist));\nfloat dist = sqrt(dot(coord,coord));\nreturn clamp((cdist.x-dist)*cornersmooth,0.0, 1.0);\n}\n\n// Calculate the influence of a scanline on the current pixel.\n//\n// \'distance\' is the distance in texture coordinates from the current\n// pixel to the scanline in question.\n// \'color\' is the colour of the scanline at the horizontal location of\n// the current pixel.\nvec4 scanlineWeights(float distance, vec4 color)\n{\n// "wid" controls the width of the scanline beam, for each RGB\n// channel The "weights" lines basically specify the formula\n// that gives you the profile of the beam, i.e. the intensity as\n// a function of distance from the vertical center of the\n// scanline. In this case, it is gaussian if width=2, and\n// becomes nongaussian for larger widths. Ideally this should\n// be normalized so that the integral across the beam is\n// independent of its width. That is, for a narrower beam\n// "weights" should have a higher peak at the center of the\n// scanline than for a wider beam.\n#ifdef USEGAUSSIAN\nvec4 wid = 0.3 + 0.1 * pow(color, vec4(3.0));\nvec4 weights = vec4(distance / wid);\nreturn 0.4 * exp(-weights * weights) / wid;\n#else\nvec4 wid = 2.0 + 2.0 * pow(color, vec4(4.0));\nvec4 weights = vec4(distance / scanline_weight);\nreturn 1.4 * exp(-pow(weights * inversesqrt(0.5 * wid), wid)) / (0.6 + 0.2 * wid);\n#endif\n}\n\nvoid main()\n{\n// Here\'s a helpful diagram to keep in mind while trying to\n// understand the code:\n//\n// | | | | |\n// -------------------------------\n// | | | | |\n// | 01 | 11 | 21 | 31 | <-- current scanline\n// | | @ | | |\n// -------------------------------\n// | | | | |\n// | 02 | 12 | 22 | 32 | <-- next scanline\n// | | | | |\n// -------------------------------\n// | | | | |\n//\n// Each character-cell represents a pixel on the output\n// surface, "@" represents the current pixel (always somewhere\n// in the bottom half of the current scan-line, or the top-half\n// of the next scanline). The grid of lines represents the\n// edges of the texels of the underlying texture.\n\n// Texture coordinates of the texel containing the active pixel.\nvec2 xy = (CURVATURE > 0.5) ? transform(TEX0.xy) : TEX0.xy;\n\nfloat cval = corner(xy);\n\n// Of all the pixels that are mapped onto the texel we are\n// currently rendering, which pixel are we currently rendering?\nvec2 ilvec = vec2(0.0,ilfac.y > 1.5 ? mod(float(FrameCount),2.0) : 0.0);\nvec2 ratio_scale = (xy * TextureSize - vec2(0.5) + ilvec)/ilfac;\n#ifdef OVERSAMPLE\nfloat filter_ = InputSize.y/OutputSize.y;//fwidth(ratio_scale.y);\n#endif\nvec2 uv_ratio = fract(ratio_scale);\n\n// Snap to the center of the underlying texel.\nxy = (floor(ratio_scale)*ilfac + vec2(0.5) - ilvec) / TextureSize;\n\n// Calculate Lanczos scaling coefficients describing the effect\n// of various neighbour texels in a scanline on the current\n// pixel.\nvec4 coeffs = PI * vec4(1.0 + uv_ratio.x, uv_ratio.x, 1.0 - uv_ratio.x, 2.0 - uv_ratio.x);\n\n// Prevent division by zero.\ncoeffs = FIX(coeffs);\n\n// Lanczos2 kernel.\ncoeffs = 2.0 * sin(coeffs) * sin(coeffs / 2.0) / (coeffs * coeffs);\n\n// Normalize.\ncoeffs /= dot(coeffs, vec4(1.0));\n\n// Calculate the effective colour of the current and next\n// scanlines at the horizontal location of the current pixel,\n// using the Lanczos coefficients above.\nvec4 col = clamp(mat4(\n TEX2D(xy + vec2(-one.x, 0.0)),\n TEX2D(xy),\n TEX2D(xy + vec2(one.x, 0.0)),\n TEX2D(xy + vec2(2.0 * one.x, 0.0))) * coeffs,\n 0.0, 1.0);\nvec4 col2 = clamp(mat4(\n TEX2D(xy + vec2(-one.x, one.y)),\n TEX2D(xy + vec2(0.0, one.y)),\n TEX2D(xy + one),\n TEX2D(xy + vec2(2.0 * one.x, one.y))) * coeffs,\n 0.0, 1.0);\n\n#ifndef LINEAR_PROCESSING\ncol = pow(col , vec4(CRTgamma));\ncol2 = pow(col2, vec4(CRTgamma));\n#endif\n\n// Calculate the influence of the current and next scanlines on\n// the current pixel.\nvec4 weights = scanlineWeights(uv_ratio.y, col);\nvec4 weights2 = scanlineWeights(1.0 - uv_ratio.y, col2);\n#ifdef OVERSAMPLE\nuv_ratio.y =uv_ratio.y+1.0/3.0*filter_;\nweights = (weights+scanlineWeights(uv_ratio.y, col))/3.0;\nweights2=(weights2+scanlineWeights(abs(1.0-uv_ratio.y), col2))/3.0;\nuv_ratio.y =uv_ratio.y-2.0/3.0*filter_;\nweights=weights+scanlineWeights(abs(uv_ratio.y), col)/3.0;\nweights2=weights2+scanlineWeights(abs(1.0-uv_ratio.y), col2)/3.0;\n#endif\n\nvec3 mul_res = (col * weights + col2 * weights2).rgb * vec3(cval);\n\n// dot-mask emulation:\n// Output pixels are alternately tinted green and magenta.\nvec3 dotMaskWeights = mix(\nvec3(1.0, 1.0 - DOTMASK, 1.0),\nvec3(1.0 - DOTMASK, 1.0, 1.0 - DOTMASK),\nfloor(mod(mod_factor, 2.0))\n);\n\nmul_res *= dotMaskWeights;\n\n// Convert the image gamma for display on our output device.\nmul_res = pow(mul_res, vec3(1.0 / monitorgamma));\n\n// Color the texel.\noutput_dummy _OUT;\n_OUT._color = vec4(mul_res, 1.0);\nFragColor = _OUT._color;\nreturn;\n} \n#endif\n\n'},o=e(57),ve=e.n(o),K=e(11),J={addStyleHook:function(){V(this.elements.container,this.config.selectors.container.replace(".",""),!0),V(this.elements.container,this.config.classNames.uiSupported,!0),V(this.elements.container,this.config.classNames.hideControls,!0)},build:function(){this.listeners.media(),z.element(this.elements.controls)||(ne.inject.call(this),this.listeners.controls()),this.volume=null,this.muted=null,ne.updateVolume.call(this),V(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0},toggleControls:function(e){var n,t,o=this.elements.controls;o&&(n=0,t=s.call(this,".".concat(H({ejs__dialogs:!0})," > .").concat(H({ejs__dialog:!0}))),Array.from(t).forEach(function(e,t){!0!==e.hidden&&(n+=1)}),0>>0},r.prototype.readU24=function(){return this.littleEndian?this._lastRead=this._u8array[this.offset]+(this._u8array[this.offset+1]<<8)+(this._u8array[this.offset+2]<<16):this._lastRead=(this._u8array[this.offset]<<16)+(this._u8array[this.offset+1]<<8)+this._u8array[this.offset+2],this.offset+=3,this._lastRead>>>0},r.prototype.readU32=function(){return this.littleEndian?this._lastRead=this._u8array[this.offset]+(this._u8array[this.offset+1]<<8)+(this._u8array[this.offset+2]<<16)+(this._u8array[this.offset+3]<<24):this._lastRead=(this._u8array[this.offset]<<24)+(this._u8array[this.offset+1]<<16)+(this._u8array[this.offset+2]<<8)+this._u8array[this.offset+3],this.offset+=4,this._lastRead>>>0},r.prototype.readBytes=function(e){this._lastRead=new Array(e);for(var t=0;t>8):(this._u8array[this.offset]=e>>8,this._u8array[this.offset+1]=255&e),this.offset+=2},r.prototype.writeU24=function(e){this.littleEndian?(this._u8array[this.offset]=255&e,this._u8array[this.offset+1]=(65280&e)>>8,this._u8array[this.offset+2]=(16711680&e)>>16):(this._u8array[this.offset]=(16711680&e)>>16,this._u8array[this.offset+1]=(65280&e)>>8,this._u8array[this.offset+2]=255&e),this.offset+=3},r.prototype.writeU32=function(e){this.littleEndian?(this._u8array[this.offset]=255&e,this._u8array[this.offset+1]=(65280&e)>>8,this._u8array[this.offset+2]=(16711680&e)>>16,this._u8array[this.offset+3]=(4278190080&e)>>24):(this._u8array[this.offset]=(4278190080&e)>>24,this._u8array[this.offset+1]=(16711680&e)>>16,this._u8array[this.offset+2]=(65280&e)>>8,this._u8array[this.offset+3]=255&e),this.offset+=4},r.prototype.writeBytes=function(e){for(var t=0;tn&&(n=i.offset+i.length):i.offset+i.data.length>n&&(n=i.offset+i.data.length)}n===e.fileSize?t=e.slice(0,e.fileSize):(t=new Q(n),e.copyToFile(t,0))}for(e.seek(0),o=0;o>>1:n>>>1;e[t]=n}return e}();function $(e,t,n){for(var o=t?new Uint8Array(e._u8array.buffer,t):e._u8array,i=-1,a=n?o.length-4:o.length,r=0;r>>8^we[255&(i^o[r])];return(-1^i)>>>0}var _e=1,Se=2,Te=3;function xe(){this.sourceSize=0,this.targetSize=0,this.metaData="",this.actions=[],this.sourceChecksum=0,this.targetChecksum=0,this.patchChecksum=0}function Ce(e){e.readVLV=Ee,e.littleEndian=!0;var t=new xe,n=(e.seek(4),t.sourceSize=e.readVLV(),t.targetSize=e.readVLV(),e.readVLV());n&&(t.metaData=e.readString(n));for(var o=e.fileSize-12;e.offset>2)};a.type===_e?a.bytes=e.readBytes(a.length):a.type!==Se&&a.type!==Te||(i=e.readVLV(),a.relativeOffset=(1&i?-1:1)*(i>>1)),t.actions.push(a)}if(t.sourceChecksum=e.readU32(),t.targetChecksum=e.readU32(),t.patchChecksum=e.readU32(),t.patchChecksum!==$(e,0,!0))throw new Error("error_crc_patch");return t}function Ee(){for(var e=0,t=1;;){var n=this.readU8();if(e+=(127&n)*t,128&n)break;e+=t<<=7}return this._lastRead=e}function Ae(e){for(;;){var t=127&e;if(0==(e>>=7)){this.writeU8(128|t);break}this.writeU8(t),e--}}function Me(e){for(var t=0;;){if(0==(e>>=7)){t++;break}t++,e--}return t}xe.prototype.toString=function(){var e="Source size: "+this.sourceSize;return(e=(e+="\nTarget size: "+this.targetSize)+("\nMetadata: "+this.metaData))+("\n#Actions: "+this.actions.length)},xe.prototype.validateSource=function(e,t){return this.sourceChecksum===$(e,t)},xe.prototype.apply=function(e,t){if(t&&!this.validateSource(e))throw new Error("error_crc_input");for(var n=new Q(this.targetSize),o=0,i=0,a=0;a>=7)){this.writeU8(128|t);break}this.writeU8(t),--e}}function Re(){for(var e=0,t=1;;){var n=this.readU8();if(-1==n)throw new Error("Can't read UPS VLV at 0x"+(this.offset-1).toString(16));if(e+=(127&n)*t,0!=(128&n))break;e+=t<<=7}return e}function Pe(e){for(var t=0;t++,0!=(e>>=7);)--e;return t}function Ie(e){var t=new u;for(e.readVLV=Re,e.seek(ke.length),t.sizeInput=e.readVLV(),t.sizeOutput=e.readVLV();e.offset\n \n \n \n
\n
\n
\n
\n
\n \n ",e=j("iframe",{src:v.adUrl,scrolling:"no",frameborder:"no",style:"width:300px !important;height:250px !important;display: block !important;"}),Z.loading.querySelector(".".concat(T.ad)).removeChild(Z.loading.querySelector(".".concat(T.ad," iframe"))),Z.loading.querySelector(".".concat(T.ad)).appendChild(e),X.webgl.DETECTED||(G(Z.loading.querySelector(".".concat(T["start-game"])),!0),Z.loading.querySelector(".".concat(T.p3)).innerHTML='Failed to initialize WebGL.'),Z.loading.querySelector(".".concat(T.ad," iframe")).style.setProperty("display","block","important"),Z.loading.querySelector(".".concat(T.ad," iframe")).style.setProperty("visibility","visible","important"),Z.loading.querySelector(".".concat(T.ad)).style.setProperty("display","block","important"),Z.loading.querySelector(".".concat(T.ad)).style.setProperty("visibility","visible","important")):(Z.loading.innerHTML='\n
\n
\n
\n
\n
\n
\n \n
"),X.webgl.DETECTED||(G(Z.loading.querySelector(".".concat(T["start-game"])),!0),Z.loading.querySelector(".".concat(T.p3)).innerHTML='Failed to initialize WebGL.')),window.URL||window.webkitURL),x=function(e){var t;return 80===e[0]&&75===e[1]&&3===e[2]&&4===e[3]||80===e[0]&&75===e[1]&&5===e[2]&&6===e[3]||80===e[0]&&75===e[1]&&7===e[2]&&8===e[3]?t="zip":55===e[0]&&122===e[1]&&188===e[2]&&175===e[3]&&39===e[4]&&28===e[5]?t="7z":82===e[0]&&97===e[1]&&114===e[2]&&33===e[3]&&26===e[4]&&7===e[5]&&0==e[6]&&(t="rar"),t},C=function(e){var e=new Blob(['importScripts("'+e+'");'],{type:"application/javascript"}),n=window.URL.createObjectURL(e);return new Promise(function(e,t){e(new Worker(n))})},E=function(e,t){var n="",t=("rar"==t&&(n="\nvar dataToPass = [];\nModule = {\n monitorRunDependencies: function(left) {\n if (left == 0) {\n setTimeout(function() {\n unrar(dataToPass, null);\n }, 100);\n }\n },\n onRuntimeInitialized: function() {\n },\n locateFile: function(file) {\n return '".concat(e+".mem","';\n }\n};\nimportScripts(\"").concat(e,'");\nvar unrar = function(data, password) {\n var cb = function(fileName, fileSize, progress) {\n postMessage({"t":4,"current":progress,"total":fileSize, "name": fileName});\n };\n\n var rarContent = readRARContent(data.map(function(d) {\n return {\n name: d.name,\n content: new Uint8Array(d.content)\n }\n }), password, cb)\n var rec = function(entry) {\n if (entry.type === \'file\') {\n postMessage({"t":2,"file":entry.fullFileName,"size":entry.fileSize,"data":entry.fileContent});\n } else if (entry.type === \'dir\') {\n Object.keys(entry.ls).forEach(function(k) {\n rec(entry.ls[k]);\n })\n } else {\n throw "Unknown type";\n }\n }\n rec(rarContent);\n postMessage({"t":1});\n return rarContent;\n};\nonmessage = function(data) {\n dataToPass.push({name: \'test.rar\', content: data.data});\n};\n ')),new Blob([n],{type:"application/javascript"})),o=window.URL.createObjectURL(t);return new Promise(function(e,t){e(new Worker(o))})},A=null,d=null,c=null,u=null;try{A=new ve.a({dbVersion:1,storePrefix:"ejs-",storeName:"system",keyPath:null,autoIncrement:!1,onStoreReady:function(){n=!0},onError:function(){n=!0}}),d=new ve.a({dbVersion:1,storePrefix:"ejs-",storeName:"roms",keyPath:null,autoIncrement:!1,onStoreReady:function(){o=!0},onError:function(){o=!0}}),c=new ve.a({dbVersion:1,storePrefix:"ejs-",storeName:"bios",keyPath:null,autoIncrement:!1,onStoreReady:function(){i=!0},onError:function(){i=!0}}),u=new ve.a({dbVersion:1,storePrefix:"ejs-",storeName:"romsdata",keyPath:null,autoIncrement:!1,onStoreReady:function(){},onError:function(){}})}catch(e){i=o=n=!0,console.log(e)}U.call(v,v.elements.container,"start-game",function(e){v.started=!0,v.playing=!0,G(Z.loading.querySelector(".".concat(T["loading-info"])),!0),!ee||"undefined"!=ee.virtualGamepadContainer&&null!==ee.virtualGamepadContainer||J.toggleControls.call(v,!0);var t,n,o,i,a,r,s,c,l=H({"ejs__tooltip--visible":!0}),d=v.elements.buttons.gamepad.querySelector(".".concat(H({ejs__tooltip:!0}))),u=(V(d,l,!0),setTimeout(function(){V(d,l,!1)},5e3),"string"==typeof v.adUrl&&(G(Z.loading.querySelector(".".concat(T["close-ad"])),!1),!0!==v.config.noAutoAdClose&&setTimeout(function(){v.started&&Z.loading.querySelector(".".concat(T.ad))&&Z.loading.querySelector(".".concat(T.ad)).parentNode.removeChild(Z.loading.querySelector(".".concat(T.ad)))},1e4)),G(Z.loading.querySelector(".".concat(T["start-game"])),!0),Y(ne.defaultCoreOptionsValues.call(p),ne.storage.get("core-options")||{})),f=("n64"===v.system&&u&&Object.keys(u).forEach(function(e){"glupen64-aspect"===e&&"16:9"===u[e]&&(S.height=S.width/16*9,Z.aspectRatio=16/9)}),"arcade"!==p.system&&"fba0.2.97.29"!==p.system||u&&Object.keys(u).forEach(function(e){"fba-aspect"===e&&"PAR"===u[e]&&(S.height=S.width/16*9,Z.aspectRatio=16/9)}),"gba"===v.system&&(S.height=S.width/1.5,Z.aspectRatio=1.5),window.setTimeout(function(){},150),f=p,"undefined"!=typeof RI?(document.removeEventListener("mousemove",RI.eventHandler,!1),S.removeEventListener("mousedown",RI.canvasEventHandler,!1),S.removeEventListener("mouseup",RI.canvasEventHandler,!1),f.elements.container.addEventListener("mousemove",function(e){var t=0,n=0,o=e.offsetX-Z.Module.canvas.offsetLeft,i=e.offsetY-Z.Module.canvas.offsetTop;if("mousemove"===e.type){t=o<0?(o=0,-Z.Module.canvas.offsetWidth):o>Z.Module.canvas.offsetWidth?(o=Z.Module.canvas.offsetWidth,Z.Module.canvas.offsetWidth):o-RI.currentX,n=i<0?(i=0,-Z.Module.canvas.offsetHeight):i>Z.Module.canvas.offsetHeight?(i=Z.Module.canvas.offsetHeight,Z.Module.canvas.offsetHeight):i-RI.currentY,RI.currentX=o,RI.currentY=i;for(var a=0;a>2]=t,HEAP32[RI.contexts[a].state+36>>2]=n}},!1),f.elements.container.addEventListener("mousedown",RI.canvasEventHandler,!1),f.elements.container.addEventListener("mouseup",RI.canvasEventHandler,!1),f.elements.container.addEventListener("touchstart",t=function(e){if(e.targetTouches[0]){var t,n=0,o=0,i=e.target.getBoundingClientRect(),a=e.targetTouches[0].clientX-i.left,i=e.targetTouches[0].clientY-i.top,n=a<0?(a=0,-Z.Module.canvas.offsetWidth):a>Z.Module.canvas.offsetWidth?(a=Z.Module.canvas.offsetWidth,Z.Module.canvas.offsetWidth):a-RI.currentX,o=i<0?(i=0,-Z.Module.canvas.offsetHeight):i>Z.Module.canvas.offsetHeight?(i=Z.Module.canvas.offsetHeight,Z.Module.canvas.offsetHeight):i-RI.currentY;RI.currentX=a,RI.currentY=i;for(var r=0;r>2]=n,HEAP32[RI.contexts[r].state+36>>2]=o;switch(e.type){case"touchend":case"touchstart":if(0===e.button)t=40;else{if(2!==e.button)break;t=41}for(var s="touchend"===e.type?0:1,c=0;c>0]=s}}},!1),f.elements.container.addEventListener("touchend",t,!1)):(f=function(e){e=new MouseEvent(e.type,e);Z.Module.canvas.dispatchEvent(e)},q.call(p,".".concat(H({ejs__dialogs:!0}))).addEventListener("mousemove",f,!1),q.call(p,".".concat(H({ejs__dialogs:!0}))).addEventListener("mousedown",f,!1),q.call(p,".".concat(H({ejs__dialogs:!0}))).addEventListener("mouseup",f,!1)),"msx"===v.system&&"undefined"!=typeof RI&&(document.removeEventListener("keydown",RI.eventHandler,!1),document.removeEventListener("keyup",RI.eventHandler,!1),t=function(e){var t=e.keyCode,n=t>>3,o=1<<(7&t);switch(e.type){case"keyup":case"keydown":if(32<=n)throw"key code error! bad code: "+t;for(var i=0;i>0];"keyup"===e.type?a&=~o:a|=o,HEAP8[RI.contexts[i].state+n>>0]=a}}},document.addEventListener("keydown",t,!1),document.addEventListener("keyup",t,!1)),setTimeout(function(){var i=W.info();null===ee.setVolume&&"undefined"!=typeof RA?(RA.queueAudio=function(){var e=v.volume,t=RA.bufIndex,n=RA.bufIndex?RA.buffers[RA.bufIndex-1].endTime:RA.context.currentTime,o=(RA.buffers[t].endTime=n+RA.buffers[t].duration,RA.context.createBufferSource());o.buffer=RA.buffers[t],1===(e=v.muted?0:e)?o.connect(RA.context.destination):(t=RA.context.createGain(),o.connect(t),t.connect(RA.context.destination),W.isEdge||"chrome"===i.name&&parseInt(i.version,10)<=60||"firefox"===i.name&&parseInt(i.version,10)<=56||"opera"===i.name&&parseInt(i.version,10)<=44?t.gain.value=e:"firefox"===i.name?t.gain.setValueAtTime(e,RA.context.currentTime):t.gain.setValueAtTime(e,RA.context.currentTime,0)),o.start(n),RA.bufIndex+=1,RA.bufOffset=0},W.isIos&&window.addEventListener("touchstart",function(){var e;RA.context&&(RA.context.resume(),(e=RA.context.createBufferSource()).connect(RA.context.destination),e.start())},!1)):ee.setVolume()},500),setTimeout(function(){v.elements.container.focus()},30),void 0===window.addRunDependency&&(window.Module=void 0),Z.FS.readFile(v.startName));f.length<=33554432&&".cue"!=v.startName.substr(-4)&&(o="snes"===v.system||["snes2002","snes2005","snes2010"].includes(v.system)?(n=f.length%1024,new Q(n?f.slice?f.slice(n):f.subarray(n):f)):new Q(f),i=Ne.a.create(),a=new FileReader,r=0,s=o._u8array.length,c=function(){var e;rDoesn\'t look like your browser is supported'}try{r()}catch(e){}}if(2===e.data.t){var n=e.data.file.split("/"),o=(i=n.pop()).split(".").pop(),i=i.replace(/\#/g,"");Z._FS.createPath("/",n.join("/"),!0,!0);for(var a=m[l].length-1;0<=a;--a)m[l][a]===o.toLowerCase()&&dDoesn\'t look like your browser is supported'}try{r()}catch(e){}}},s=function(){var t=p,n=Z.loading.querySelector(".".concat(T.p3)),e=p.config,o=(e.gameId,e.gameUrl),i=e.system,e=("vbanext"==i&&(i="gba"),o.split("/")),l=e[e.length-1];(l=-1");c=c.split("|");Z.coreFileName="".concat(D.system,"-").concat(c[0]),i="1"===c[1],z.element(D.elements.buttons.saveState)&&G(D.elements.buttons.saveState,!i),z.element(D.elements.buttons.loadState)&&G(D.elements.buttons.loadState,!i),G(ne.contextMenu.querySelectorAll("ul li").item(2),!i),G(ne.contextMenu.querySelectorAll("ul li").item(3),!i),d=2===D.coreVer?"":D.system.concat("-old-").concat(c[0],"-wasm.data"),c[0]?(X.wasm&&r?h=!0:(s.innerHTML=''+D.localization("Webassembly support is not detected in this browser")+"",d=""),d&&(A.db?A.get(d,function(e){e&&e.version===n?2===v.coreVer?L(e.data):((e=e.data.slice?e.data.slice(12):e.data.subarray(12)).set([55,122,188,175,39,28,0,3],0),L(e)):u(d,n)}):u(d,n))):s.innerHTML=''+D.localization("Unsupported Game")+""}else{var l,d=!1;if(X.wasm&&r?(l="wasm",d=!0,"n64"!==D.system||e||2===D.coreVer||(l="legacy-wasm"),h=!0):a&&(d=!0,l="asmjs","n64"!==D.system||e||2===D.coreVer||(l="legacy-asmjs")),!0!==(d="undefined"!=typeof EJS_CUSTOM_COREFILE?EJS_CUSTOM_COREFILE:d))return void(s.innerHTML=''+D.localization("Please upgrade your browser to the latest version")+"");d=2===D.coreVer?t+"-"+l+".data":t+"-old-"+l+".data","undefined"!=typeof EJS_CUSTOM_COREFILE&&(d=EJS_CUSTOM_COREFILE),A.db?A.get(d,function(e){!e||e.version!==n||"undefined"!=typeof EJS_DEBUG_XX&&!0===EJS_DEBUG_XX?u(d,n):2===v.coreVer?L(e.data):((e=e.data.slice?e.data.slice(12):e.data.subarray(12)).set([55,122,188,175,39,28,0,3],0),L(e))}):u(d,n)}o||z.element(D.elements.buttons.netplay)&&G(D.elements.buttons.netplay,!0),z.element(D.elements.buttons.saveState)&&G(D.elements.buttons.saveState,!i),z.element(D.elements.buttons.loadState)&&G(D.elements.buttons.loadState,!i),G(ne.contextMenu.querySelectorAll("ul li").item(2),!i),G(ne.contextMenu.querySelectorAll("ul li").item(3),!i),v.setStatesSupported(i)}).catch(function(e){B(e,t,v)}),Z.romdb=d),!1}),!0===v.startOnLoad&&(!0===n&&!0===o&&!0===i?Z.loading.querySelector(".".concat(T["start-game"])).click():console.warn("Start on load attempted, but user has not yet interacted with the document"))}},m=Z,Le=e(161);function De(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t')),!t)return!0;for(var n in t)je(n);return!0}),playerName:"",players:[],waitingList:{},roomMaster:null,inputsData:{},coreOptionData:{},currentFrame:0,wait:!(je=function(e){if(!document.getElementById(e))return!1}),progressHelper:{},icons:{lock:''},disableInput:!1,disableControl:function(e){if(e){for(var t=0;t<24;t+=1)v.simulateInputFn(0,t,0),v.simulateInputFn(1,t,0),v.simulateInputFn(2,t,0),v.simulateInputFn(3,t,0);v.disableInput=!0}else v.disableInput=!1},loadRoomsListTimer:null,loadRoomsList:function(){},stopLoadRooms:function(){v.loadRoomsListTimer&&clearTimeout(v.loadRoomsListTimer)},openRoom:function(){},isPaused:null,setVolume:null,setVariable:null,simulateInput:null,simulateInputFn:null,toggleShader:null,saveState:null,screenRecord:null,loadState:null,quickSaveState:null,quickLoadState:null,changeStateSlot:null,getScreenData:null,getStateInfo:null,setCheat:null,resetCheat:null,getGameCoreOptions:null,classNames:{"dialog-container":H({"dialog-container":!0}),tabs:H({tabs:!0}),"dialog-title":H({"dialog-title":!0}),"dialog-content":H({"dialog-content":!0}),"dialog-buttons":H({"dialog-buttons":!0}),overlay:H({overlay:!0}),"key-setting-popup":H({"key-setting-popup":!0}),"tabs-panel":H({"tabs-panel":!0}),"tabs-content":H({"tabs-content":!0}),"button-container":H({"button-container":!0}),set:H({set:!0}),active:H({active:!0}),"btn-cancel":H({"btn-cancel":!0}),"btn-reset":H({"btn-reset":!0}),"btn-clear":H({"btn-clear":!0}),"btn-create":H({"btn-create":!0}),"btn-submit":H({"btn-submit":!0}),"btn-join-room":H({"btn-join-room":!0}),"btn-quit":H({"btn-quit":!0}),"btn-create-room":H({"btn-create-room":!0}),"netplay-player-name":H({"netplay-player-name":!0}),"netplay-roomlist":H({"netplay-roomlist":!0}),"netplay-room-name-input":H({"netplay-room-name-input":!0}),"netplay-room-password-input":H({"netplay-room-password-input":!0}),"netplay-create-room-set":H({"netplay-create-room-set":!0}),"netplay-room":H({"netplay-room":!0}),modal:H({modal:!0}),modal__overlay:H({modal__overlay:!0}),modal__container:H({modal__container:!0}),modal__header:H({modal__header:!0}),modal__title:H({modal__title:!0}),modal__close:H({modal__close:!0}),modal__content:H({modal__content:!0}),modal__btn:H({modal__btn:!0}),"modal__btn-primary":H({"modal__btn-primary":!0}),"micromodal-slide":H({"micromodal-slide":!0}),modal__errmsg:H({modal__errmsg:!0}),modal__footer:H({modal__footer:!0}),"cheats-add":H({"cheats-add":!0}),"cheats-list":H({"cheats-list":!0}),"cheat-code-input":H({"cheat-code-input":!0}),"cheat-name-input":H({"cheat-name-input":!0}),"ejs-switch":H({"ejs-switch":!0}),"ejs-delete-cheat":H({"ejs-delete-cheat":!0})},initShaders:function(){for(var e,t=ge,n=Object.keys(t),o=0;o\n
\n

'+s.localization("Control Settings")+'

\n
\n \n \n
\n
\n \n
\n
\n \n \n \n ",'\n ')),n='\n
\n
\n \n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n \n
\n
');"nes"===s.system?a={0:"B",2:"SELECT",3:"START",4:"UP",5:"DOWN",6:"LEFT",7:"RIGHT",8:"A",24:s.localization("QUICK SAVE STATE"),25:s.localization("QUICK LOAD STATE"),26:s.localization("CHANGE STATE SLOT")}:"snes"===s.system?a={0:"B",1:"Y",2:"SELECT",3:"START",4:"UP",5:"DOWN",6:"LEFT",7:"RIGHT",8:"A",9:"X",10:"L",11:"R",24:s.localization("QUICK SAVE STATE"),25:s.localization("QUICK LOAD STATE"),26:s.localization("CHANGE STATE SLOT")}:"n64"===s.system?(a={0:"B",3:"START",4:"UP",5:"DOWN",6:"LEFT",7:"RIGHT",8:"A",10:"L",11:"R",12:"Z",19:"L STICK UP",18:"L STICK DOWN",17:"L STICK LEFT",16:"L STICK RIGHT",23:"R STICK UP",22:"R STICK DOWN",21:"R STICK LEFT",20:"R STICK RIGHT",24:s.localization("QUICK SAVE STATE"),25:s.localization("QUICK LOAD STATE"),26:s.localization("CHANGE STATE SLOT")},2===s.coreVer&&(a[0]="A",a[1]="B",delete a[8])):a="nds"===s.system?{0:"B",1:"Y",2:"SELECT",3:"START",4:"UP",5:"DOWN",6:"LEFT",7:"RIGHT",8:"A",9:"X",10:"L",11:"R",14:"Microphone",24:s.localization("QUICK SAVE STATE"),25:s.localization("QUICK LOAD STATE"),26:s.localization("CHANGE STATE SLOT")}:{0:"B",1:"Y",2:"SELECT",3:"START",4:"UP",5:"DOWN",6:"LEFT",7:"RIGHT",8:"A",9:"X",10:"L",11:"R",12:"L2",13:"R2",14:"L3",15:"R3",19:"L STICK UP",18:"L STICK DOWN",17:"L STICK LEFT",16:"L STICK RIGHT",23:"R STICK UP",22:"R STICK DOWN",21:"R STICK LEFT",20:"R STICK RIGHT",24:s.localization("QUICK SAVE STATE"),25:s.localization("QUICK LOAD STATE"),26:s.localization("CHANGE STATE SLOT")},["arcade","mame"].includes(s.system)&&(a[2]=s.localization("INSERT COIN")),!1===s.statesSupported&&(delete a[24],delete a[25],delete a[26]);for(var o=[2,3,4,5,6,7,8,0,9,1,10,11,12,13,14,15,19,18,17,16,23,22,21,20,24,25,26],t=0;t<=3;t+=1)!function(t){s.elements.dialogs.gamepad.querySelector(".".concat(v.classNames["tabs-content"])).innerHTML+=e.replace(/{index}/g,t),o.forEach(function(e){a[e]&&(s.elements.dialogs.gamepad.querySelector("#controls-".concat(t)).innerHTML+=n.replace(/{index}/g,t).replace(/{id}/g,e).replace(/{label}/g,a[e]))}),s.elements.dialogs.gamepad.querySelector('[data-id="16"][data-index="'.concat(t,'"][data-type="2"]'))&&(s.elements.dialogs.gamepad.querySelector('[data-id="16"][data-index="'.concat(t,'"][data-type="2"]')).style.backgroundColor="#ccc"),s.elements.dialogs.gamepad.querySelector('[data-id="17"][data-index="'.concat(t,'"][data-type="2"]'))&&(s.elements.dialogs.gamepad.querySelector('[data-id="17"][data-index="'.concat(t,'"][data-type="2"]')).style.backgroundColor="#ccc"),s.elements.dialogs.gamepad.querySelector('[data-id="18"][data-index="'.concat(t,'"][data-type="2"]'))&&(s.elements.dialogs.gamepad.querySelector('[data-id="18"][data-index="'.concat(t,'"][data-type="2"]')).style.backgroundColor="#ccc"),s.elements.dialogs.gamepad.querySelector('[data-id="19"][data-index="'.concat(t,'"][data-type="2"]'))&&(s.elements.dialogs.gamepad.querySelector('[data-id="19"][data-index="'.concat(t,'"][data-type="2"]')).style.backgroundColor="#ccc"),s.elements.dialogs.gamepad.querySelector('[data-id="20"][data-index="'.concat(t,'"][data-type="2"]'))&&(s.elements.dialogs.gamepad.querySelector('[data-id="20"][data-index="'.concat(t,'"][data-type="2"]')).style.backgroundColor="#ccc"),s.elements.dialogs.gamepad.querySelector('[data-id="21"][data-index="'.concat(t,'"][data-type="2"]'))&&(s.elements.dialogs.gamepad.querySelector('[data-id="21"][data-index="'.concat(t,'"][data-type="2"]')).style.backgroundColor="#ccc"),s.elements.dialogs.gamepad.querySelector('[data-id="22"][data-index="'.concat(t,'"][data-type="2"]'))&&(s.elements.dialogs.gamepad.querySelector('[data-id="22"][data-index="'.concat(t,'"][data-type="2"]')).style.backgroundColor="#ccc"),s.elements.dialogs.gamepad.querySelector('[data-id="23"][data-index="'.concat(t,'"][data-type="2"]'))&&(s.elements.dialogs.gamepad.querySelector('[data-id="23"][data-index="'.concat(t,'"][data-type="2"]')).style.backgroundColor="#ccc")}(t);Object.keys(v.controllers).forEach(function(o){v.controllers[o]&&Object.keys(v.controllers[o]).forEach(function(e){var t=s.elements.dialogs.gamepad.querySelector('[data-id="'.concat(e,'"][data-index="').concat(o,'"][data-type="1"]')),n=s.elements.dialogs.gamepad.querySelector('[data-id="'.concat(e,'"][data-index="').concat(o,'"][data-type="2"]'));if(!t||!n)return!1;e=v.controllers[o][e];e&&(e.type&&1!==parseInt(e.type,10)?n.value="":e.value&&(t.value=v.keyMap[e.value]||"",t.setAttribute("data-value",e.value)),e.value2&&(n.value=isNaN(e.value2)?e.value2:"button ".concat(parseInt(e.value2,10)+1),n.setAttribute("data-value",e.value2)))})}),U.call(this,s.elements.dialogs.gamepad.querySelector(".".concat(v.classNames["btn-submit"])),"click",function(e){var t=s.elements.dialogs.gamepad.querySelectorAll("input"),i={};return Array.from(t).forEach(function(e){var t,n=e.getAttribute("data-index"),o=e.getAttribute("data-value"),e=(2===parseInt(e.getAttribute("data-type"),10)&&(t=e.getAttribute("data-value")),e.getAttribute("data-id"));i[n]||(i[n]={}),i[n][e]||(i[n][e]={}),o&&(i[n][e].value=o),t&&(i[n][e].value2=t)}),ne.storage.set({controllers:i}),v.controllers=i,G(s.elements.dialogs.gamepad,!0),s.elements.container.focus(),e.stopPropagation(),!1}),U.call(this,s.elements.dialogs.gamepad.querySelector(".".concat(v.classNames["btn-reset"])),"click",function(e){v.controllers=JSON.parse(JSON.stringify(v.defaultControllers)),localStorage.removeItem(ne.storage.key);for(var t=s.elements.dialogs.gamepad.querySelectorAll("input"),n=0;n
"+s.localization("Press keyboard or gamepad")+"
"+s.localization("Press escape (esc) to clear")):t+="
Press keyboard
"+s.localization("Press escape (esc) to clear"),r.querySelector(".".concat(v.classNames["key-setting-popup"])).innerHTML=t,e.stopPropagation()})})},setCacheDialog:function(){var t=this;t.elements.dialogs.cache.innerHTML='\n
\n
\n

'+t.localization("Cache Manager")+'

\n
\n
\n\n
\n \n
\n "),U.call(this,t.elements.dialogs.cache.querySelector(".".concat(v.classNames["btn-cancel"])),"click",function(e){return G(t.elements.dialogs.cache,!0),t.elements.container.focus(),e.stopPropagation(),!1}),U.call(this,t.elements.dialogs.cache.querySelector(".".concat(v.classNames["dialog-title"]," a")),"click",function(e){return m.romdb&&(m.romdb.clear(),t.elements.dialogs.cache.querySelector(".".concat(v.classNames["dialog-content"])).innerHTML='
'+t.localization("Empty")+"
"),e.stopPropagation(),!1})},showLoading:function(e){g.show("modal-6ed698f3d04061f5",{closeByEsckey:!1}),e&&console.log(""),G(this.elements.dialogs.loading,!1)},hideLoading:function(){g.close(),G(this.elements.dialogs.loading,!0)},setLoadingDialog:function(){this.elements.dialogs.loading&&(this.elements.dialogs.loading.innerHTML='\n "))},setCheatDialog:function(){var a,r,o,s=this;s.elements.dialogs.cheat&&(s.elements.dialogs.cheat.innerHTML='\n
\n
\n

Cheats

\n
\n
\n
\n \n
\n
\n \n
\n\n \n\n \n "),a=s.elements.dialogs.cheat.querySelector("#modal-85cd7a1c543a484b"),U.call(this,s.elements.dialogs.cheat.querySelector(".".concat(v.classNames["cheats-add"])),"click",function(e){return g.show("modal-85cd7a1c543a484b",{closeTrigger:"data-modal-close"}),!1}),r=s.elements.dialogs.cheat.querySelector(".".concat(v.classNames["cheats-list"])),U.call(this,a.querySelector(".".concat(v.classNames["modal__btn-primary"])),"click",function(e){var t,n,o=a.querySelector(".".concat(v.classNames["cheat-name-input"])).value,i=a.querySelector(".".concat(v.classNames["cheat-code-input"])).value;return o&&i&&(t=r.querySelectorAll("input:checked"),a.querySelector(".".concat(v.classNames["cheat-name-input"])).value="",a.querySelector(".".concat(v.classNames["cheat-code-input"])).value="",g.close(),n=s.cheats.length,s.cheats.push([o,i]),r.innerHTML+='
\n \n \n ×\n
'),t.forEach(function(e,t){r.querySelector("#ejs-cheat-switch-".concat(t)).setAttribute("checked","checked")})),"localStorage"in window&&localStorage.setItem("".concat(s.system,"-").concat(s.startName,"-cheats"),JSON.stringify(s.cheats)),e.stopPropagation(),!1}),o=function(){if("localStorage"in window){var e=localStorage.getItem("".concat(s.system,"-").concat(s.startName,"-cheats"));try{e=JSON.parse(e)}catch(e){}e&&(s.cheats=e)}r.innerHTML="",s.cheats&&Array.isArray(s.cheats)&&s.cheats.forEach(function(e,t){var n=e[0];e[1],r.innerHTML+='
\n \n \n ×\n
')})},U.call(s,r,"click",function(e){var t,n;return e.target&&e.target.classList.contains(v.classNames["ejs-delete-cheat"])&&e.target.getAttribute("data-idx")&&(t=e.target.getAttribute("data-idx"),s.cheats.splice(t,1),"localStorage"in window&&localStorage.setItem("".concat(s.system,"-").concat(s.startName,"-cheats"),JSON.stringify(s.cheats)),n=[],r.querySelectorAll("input").forEach(function(e,t){n[t]=!!r.querySelector("#ejs-cheat-switch-".concat(t,":checked"))}),n.splice(t,1),o(),n.forEach(function(e,t){e&&r.querySelector("#ejs-cheat-switch-".concat(t)).setAttribute("checked","checked")})),e.stopPropagation(),!1}),U.call(s,s.elements.container,"start-game",function(e){o()}),U.call(this,s.elements.dialogs.cheat.querySelector(".".concat(v.classNames["btn-cancel"])),"click",function(e){return G(s.elements.dialogs.cheat,!0),e.stopPropagation(),s.elements.container.focus(),!1}),U.call(this,s.elements.dialogs.cheat.querySelector(".".concat(v.classNames["btn-submit"])),"click",function(e){return v.resetCheat(),r.querySelectorAll("input:checked").forEach(function(e,t){e=s.cheats[e.value];e&&v.setCheat(t,1,e[1])}),G(s.elements.dialogs.cheat,!0),s.elements.container.focus(),!1}),"arcade"!==s.system&&"mame"!==s.system&&"mame2003"!==s.system&&"mame2010"!==s.system||(z.element(s.elements.buttons.cheat)&&G(s.elements.buttons.cheat,!0),v.allowCheat=!1),v.setCheat||(G(s.elements.buttons.cheat,!0),v.allowCheat=!1))},setNetplayDialog:function(){var n,a,o,i,l,s,c,d,e,r,u,f,p=this,h=this;h.elements.dialogs.netplay&&(h.elements.dialogs.netplay.innerHTML='\n
\n
\n

'+h.localization("Netplay")+'

\n
\n
\n \n\n \n
\n \n
\n\n \n \n \n \n \n \n \n \n \n \n '),U.call(this,h.elements.dialogs.netplay.querySelector(".".concat(v.classNames["btn-cancel"])),"click",function(e){return G(h.elements.dialogs.netplay,!0),v.disableControl(!1),v.stopLoadRooms(),e.stopPropagation(),h.elements.container.focus(),!1}),window.setInterval(function(){var o="
    ";v.players.forEach(function(e,t){var n=null;e?(v.connection.peers[e]?n=v.connection.peers[e].extra:v.connection.userid===e&&(n=v.connection.extra),o+="
  • ".concat(t+1,". ").concat(n.name,"
  • ")):o+="
  • ".concat(t+1,".
  • ")}),o+="
",h.elements.widgets.netplay.innerHTML=o},500),n=h.elements.dialogs.netplay.querySelector("#modal-9de6c4e9ce2b9361"),a=h.elements.dialogs.netplay.querySelector("#modal-85cd7a1c543a484a"),o=h.elements.dialogs.netplay.querySelector("#modal-7d8fd50ed642340b"),i=h.elements.dialogs.netplay.querySelector("#modal-5aa765d61d8327de"),l={},v.connection=new Le.a,(e=p.socketUrl).endsWith("/")||(e+="/"),v.connection.socketURL="/",v.connection.socketURL=e,v.connection.socketMessageEvent="emulatorjs-message",v.connection.socketCustomEvent="emulatorjs-custom-message",e=W.info(),v.connection.extra={name:v.playerName,game_id:h.config.gameId,browser_name:e.name,room_name:" ",domain:document.domain},v.connection.socketMessageEvent="netplay",v.connection.enableFileSharing=!0,v.connection.enableLogs=!1,v.connection.session={data:!0},v.connection.sdpConstraints.mandatory={OfferToReceiveAudio:!1,OfferToReceiveVideo:!1},v.connection.onclose=function(e){},v.connection.iceServers=[{urls:"turn:turn.emulatorjs.com:3478",credential:"dSnmrtehverella",username:"ejs"},{urls:["stun:stun.l.google.com:19302","stun:stun1.l.google.com:19302","stun:stun2.l.google.com:19302","stun:stun.l.google.com:19302?transport=udp"]}],v.connection.maxParticipantsAllowed=4,s=v.netPlayInitFrame=0,c=!1,Module.postMainLoop=function(){var e,t;if(v.currentFrame=parseInt(v.currentFrameNum(),10),v.connected)if(s+=1,v.connection.isInitiator)if(1<=s){for(var n=[],o=v.currentFrame-1;ov.currentFrame){console.log("lost",v.currentFrame),i=!0;break}i?v.wait||(!c||c<(new Date).valueOf()-3e3)&&(v.inputsData={},c=(new Date).valueOf(),v.connection.send(JSON.stringify({act:"sync-mem",value:v.connection.userid}),v.roomMaster)):(v.wait=!0,v.systemPause(1),m.Module.pauseMainLoop())}v.currentFrame%100==0&&Object.keys(v.inputsData).forEach(function(e,t){e>0;"reset"===t[0]?(n=0,v.connection.isInitiator?(v.systemPause(0),v.disableControl(!1),h.playing=!0,m.Module.resumeMainLoop()):K.a.get(e.url,{responseType:"arraybuffer"}).then(function(e){v.inputsData={};e=new Uint8Array(e.data);v.loadState(e,n),v.wait=!1,v.systemPause(0),v.disableInput=!1,h.playing=!0,m.Module.resumeMainLoop()})):"game.state"===t[1]&&(v.connection.isInitiator?(v.openRoom(h),v.wait=!1,v.systemPause(0),m.Module.resumeMainLoop()):(v.netPlayInitFrame=n,K.a.get(e.url,{responseType:"arraybuffer"}).then(function(e){e=new Uint8Array(e.data);v.loadState(e,n),v.wait=!1,v.disableInput=!1,v.connection.send(JSON.stringify({act:"wait-end",value:v.connection.userid})),v.hideLoading.call(h),h.playing=!0,m.Module.resumeMainLoop()}))),v.connection.isInitiator||console.log("recv mem end",v.currentFrame,e.name)}),v.connection.onmessage=function(e){var t,r,n,e=e.data||e;try{t=JSON.parse(e)}catch(e){t=null}if(t){if("room-master"===t.act&&(v.roomMaster=t.value),t.act,"short-pause"!==t.act||d||(v.systemPause(1),m.Module.pauseMainLoop(),d=!0,v.wait=!0,setTimeout(function(){v.systemPause(0),m.Module.resumeMainLoop(),v.wait=!1,d=!1},48)),"sync-control"===t.act&&(e=t.value,h.playing||v.wait,r=v.connection.userid,v.players.indexOf(r),v.connection.isInitiator,e.forEach(function(e,t){var e=e.split("|"),n=e[0]>>0,o=e[1]>>0,i=e[2]>>0,e=e[3]>>0,a=v.currentFrame;v.inputsData[e]||(v.inputsData[e]=[]),-1!=n&&e===a&&v.simulateInputFn(n,o,i),v.connection.isInitiator?0<=n&&(v.inputsData[a]||(v.inputsData[a]=[]),-2!=o&&(v.inputsData[a].push({index:n,key:o,status:i,frame:a}),v.simulateInputFn(n,o,i)),d||e<=a-10&&(v.systemPause(1),m.Module.pauseMainLoop(),d=!0,v.wait=!0,setTimeout(function(){v.systemPause(0),m.Module.resumeMainLoop(),v.wait=!1,d=!1},48))):(""!==n&&v.inputsData[e].push({index:n,key:o,status:i,frame:e}),v.inputsData[v.currentFrame]&&m.Module.resumeMainLoop(),a+10<=e&&e>v.netPlayInitFrame+100&&v.connection.send(JSON.stringify({act:"short-pause",value:r}),v.roomMaster))})),t.act,t.act,"update-core-option"!==t.act||v.connection.isInitiator||(v.coreOptionData[t.frame]={key:t.key,value:t.value}),"restart-game"===t.act&&(v.inputsData={},v.connection.send(JSON.stringify({act:"sync-mem",value:v.connection.userid}),v.roomMaster)),"pause"===t.act&&m.Module.pauseMainLoop(),"resume"===t.act&&m.Module.resumeMainLoop(),"wait"===t.act&&(v.wait=!0,v.systemPause(1),t.value!==v.connection.userid&&(v.waitingList[t.value]=1),v.disableControl(!0)),"wait-end"===t.act&&(v.waitingList[t.value]&&delete v.waitingList[t.value],0===Object.keys(v.waitingList).length&&(v.wait=!1,v.systemPause(0),v.disableInput=!1)),"sync-mem"===t.act){v.wait=!0,v.systemPause(1);e=t.value;v.disableControl(!0),v.connection.send(JSON.stringify({act:"wait",value:e}));for(var o=v.getStateInfo().split("|"),i=o[0]>>0,a=new Uint8Array(i),s=o[1]>>0,c=0;cJoin'):"",i=t.country||"?";n.innerHTML="[".concat(i,"] ").concat(o," ").concat(t.room_name,"").concat(t.current,"/").concat(t.max,"").concat(e,""),U.call(p,n.querySelector(".".concat(v.classNames["btn-join-room"])),"click",f),c.appendChild(n)}),c.querySelectorAll("tr").forEach(function(e){r.includes(e.id)||c.removeChild(e)})),v.loadRoomsListTimer=setTimeout(v.loadRoomsList,2e3)}).catch(function(e){console.log("Network Error",e),v.loadRoomsListTimer=setTimeout(v.loadRoomsList,2e3)})},v.openRoom=function(e){v.stopLoadRooms(),G(e.elements.dialogs.netplay.querySelector(".".concat(v.classNames["netplay-roomlist"])),!0),G(e.elements.dialogs.netplay.querySelector(".".concat(v.classNames["netplay-room"])),!1),G(e.elements.dialogs.netplay.querySelector(".".concat(v.classNames["btn-create-room"])),!0),G(e.elements.dialogs.netplay.querySelector(".".concat(v.classNames["btn-quit"])),!1),v.resetCheat(),G(e.elements.buttons.cheat,!0);var e=e.elements.dialogs.netplay.querySelector(".".concat(v.classNames["netplay-room"])),t=e.querySelector("[data-room-password]"),o=(null===v.connection.password?G(t,!0):(G(t,!1),t.querySelector("span").innerText=v.connection.password),e.querySelector("tbody"));o.innerHTML="",e.querySelector("strong").innerText=l.room_name,v.players.forEach(function(e,t){var n=null;e&&(v.connection.peers[e]?n=v.connection.peers[e].extra:v.connection.userid===e&&(n=v.connection.extra),n&&n.name)&&((e=document.createElement("tr")).innerHTML="".concat(t+1,"").concat(n.name,""),o.appendChild(e))})},U.call(this,i.querySelector(".".concat(v.classNames["modal__btn-primary"])),"click",function(e){var t=i.querySelector(".".concat(v.classNames["netplay-room-password-input"])).value,t=(v.showLoading.call(h),v.connection.password=t,i.getAttribute("data-id"));v.connection.join(t,function(e,t,n){u(e,0,n),e&&i.classList.remove(H({"is-open":!0}))}),e.stopPropagation()}),U.call(this,n.querySelector(".".concat(v.classNames["modal__btn-primary"])),"click",function(e){var t=(t=n.querySelector(".".concat(v.classNames["netplay-player-name"])).value).replace(/<|>/g,"");n.querySelector(".".concat(v.classNames.modal__errmsg)).innerHTML="",t.trim()&&(v.playerName=t.trim(),v.connection.extra.name=t.trim(),g.close()),e.stopPropagation()}),U.call(this,a.querySelector(".".concat(v.classNames["modal__btn-primary"])),"click",function(e){var t=(t=a.querySelector(".".concat(v.classNames["netplay-room-name-input"])).value).replace(/<|>/g,""),n=a.querySelector("select[data-max-players] option:checked").value;4<(n=n<2?2:n)&&(n=4);for(var o=0;o')+('
'),!0===n.LandR&&(i="n64"===t.system?(i=(i+='
L
')+'
Z
')+'
R
':(i+='
L
')+'
R
'),i=(i=(i+="
")+('
'))+('
'),"n64"===t.system?i+='
'+t.localization("Start")+"
":i=(i+='
'+t.localization("Start")+"
")+'
'+t.localization("Select")+"
",i=(i+="
")+('
'),"n64"===t.system&&(i=(i=(i=(i+='
')+'
')+'
')+'
');for(var a=0;a'+n.order[a]+"
"}v.virtualGamepadContainer.innerHTML=i+="",G(v.virtualGamepadContainer,!e);o=me.a.create({zone:q.call(this,".".concat(H({"ejs-virtual-gamepad":!0})," .").concat(H({left:!0}))),mode:"static",position:{left:"50%",top:"50%"},color:"red"});function s(){var e;return"n64"!==t.system||"d-pad"===(e=ne&&"function"==typeof ne.getCoreOptionsValues?ne.getCoreOptionsValues()["joystick-input"]:e)?{downVal:1,4:4,5:5,6:6,7:7}:{downVal:32767,4:19,5:18,6:17,7:16}}o.on("end",function(e,t){v.syncInput(0,s()[4],0),v.syncInput(0,s()[5],0),v.syncInput(0,s()[6],0),v.syncInput(0,s()[7],0)}),o.on("move",function(e,t){t=t.angle.degree;30<=t&&t<150?v.syncInput(0,s()[4],s().downVal):window.setTimeout(function(){v.syncInput(0,s()[4],0)},30),210<=t&&t<330?v.syncInput(0,s()[5],s().downVal):window.setTimeout(function(){v.syncInput(0,s()[5],0)},30),120<=t&&t<240?v.syncInput(0,s()[6],s().downVal):window.setTimeout(function(){v.syncInput(0,s()[6],0)},30),300<=t||0<=t&&t<60?v.syncInput(0,s()[7],s().downVal):window.setTimeout(function(){v.syncInput(0,s()[7],0)},30)});var c,l=H({"virtual-gamepad":!0}),d=H({touch:!0}),o=(W.isIos||U.call(this,q.call(this,".".concat(l)),"touchmove",function(e){e.stopPropagation()}),[{id:{b_a:!0},number:8},{id:{b_b:!0},number:0},{id:{b_x:!0},number:9},{id:{b_y:!0},number:1},{id:{b_l:!0},number:10},{id:{b_z:!0},number:12},{id:{b_r:!0},number:11},{id:{b_start:!0},number:3},{id:{b_select:!0},number:2},{id:{b_cu:!0},number:23},{id:{b_cd:!0},number:22},{id:{b_cl:!0},number:21},{id:{b_cr:!0},number:20}]),o=("n64"===t.system&&(o[0].number=0,o[1].number=1),o.forEach(t=>{U.call(this,q.call(this,".".concat(l," .").concat(H(t.id))),"touchstart touchend",function(e){["touchend"].includes(e.type)?(V(e.target,d,!1),window.setTimeout(function(){v.syncInput(0,t.number,0)},30)):(V(e.target,d,!0),v.syncInput(0,t.number,1)),e.stopPropagation()})}),j("div",{class:H({ejs__widget:!0,ejs__widget_controls_toggle:!0})},""));o.innerHTML='',q.call(this,".".concat(H({ejs__widgets:!0}))).appendChild(o),U.call(this,o,"mousedown touchstart",function(e){V(e.target,d,!0),clearTimeout(c),J.toggleControls.call(t,!0),c=setTimeout(function(){J.toggleControls.call(t,!1)},5e3)})}else G(v.virtualGamepadContainer,!e)},setup:function(){var e,t,n,o=this;this.game?(v.playerName=o.config.playerName,V(this.elements.container,this.config.classNames.type,!0),this.elements.container.setAttribute("tabindex","0"),this.color&&(e=function(e){var t=e.toLowerCase();if(t&&/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(t)){if(4===t.length){for(var n="#",o=1;o<4;o+=1)n+=t.slice(o,o+1).concat(t.slice(o,o+1));t=n}for(var i=[],a=1;a<7;a+=2)i.push(parseInt("0x".concat(t.slice(a,a+2)),16));return i}return null}(this.color))&&this.elements.container.setAttribute("style","--ejs-primary-color: ".concat(e[0],", ").concat(e[1],", ").concat(e[2])),this.elements.wrapper=j("div",{class:this.config.classNames.video}),R(this.game,this.elements.wrapper),"video"!==o.game.tagName.toLocaleLowerCase()&&(t=this.config.volume,Object.defineProperty(o.game,"volume",{get:function(){return t},set:function(e){t=e,F.call(o,o.game,"volumechange")}}),n=o.storage.get("muted"),Object.defineProperty(o.game,"muted",{get:function(){return n},set:function(e){e=!!z.boolean(e)&&e;n=e,F.call(o,o.game,"volumechange")}})),window.addEventListener("beforeunload",function(e){if(o.started){var t=o.startName.split("/").pop().split("."),t=t.slice(0,t.length-1).join(".");m.FS.syncfs(function(e){});try{var n="srm";"nds"===o.system&&(n="dsv"),m.FS.unlink("/data/saves/".concat(t,".").concat(n))}catch(e){console.log("fail to save")}v.saveSavFiles(),m.FS.syncfs(function(e){})}},!0)):console.warn("No game element found!")},listeners:function(){var r=this;r.elements.buttons.restart&&U.call(r,r.elements.buttons.restart,"click",function(e){if(v.restartGame(),v.inputsData={},v.connected&&v.connection.isInitiator){for(var t=v.getStateInfo().split("|"),n=t[0]>>0,o=(t[2],new Uint8Array(n)),i=t[1]>>0,a=0;a>0==0&&(c[t]!==n&&(o?(v.inputsData[a]||(v.inputsData[a]=[]),v.inputsData[a].push({index:i,key:t,status:n,frame:a}),v.simulateInputFn(i,t,n)):v.connection.send(JSON.stringify({act:"sync-control",value:["".concat(i,"|").concat(t,"|").concat(n,"|").concat(a)]}),v.roomMaster)),c[t]=n)):v.disableInput||v.simulateInputFn(e,t,n)},v.syncInput=v.simulateInput,window.simulateInput=v.simulateInput,m.Module.cwrap("shader_enable","null",["number"])),l=(v.toggleShader=function(e){return n(e)},2!==r.coreVer?v.getStateInfo=m.Module.cwrap("get_state_info","string",[]):(v.getInfoOfState=m.Module.cwrap("get_state_info","string",[]),v.getStateInfo1=m.Module.cwrap("save_state_info","null",[]),v.getStateInfo=function(){return v.getStateInfo1(),new Promise(function(e,t){var n,o=v.getInfoOfState();o?e(o):n=setInterval(function(){(o=v.getInfoOfState())&&(clearInterval(n),e(o))},50)})}),v.saveState=async function(){var e=(2!==r.coreVer?v.getStateInfo():await v.getStateInfo()).split("|"),t=e[0]>>0;if(0>0,i=0;i>0,o=(e[2],new Uint8Array(n)),i=e[1]>>0,a=0;a".concat(this.icons[e],"");for(var o=t.childNodes[0].childNodes,i=0;i",""]),a=[];function n(e,t,n){"function"==typeof n?a.push(n):a.push(function(){});n=i.length-1;t?i.splice(n,0,'"):i.splice(n,0,'
  • '+e+"
  • ")}n(o.localization("Take Screenshot"),!1,function(e){var t=v.getScreenData(),n=(n="string"==typeof o.gameName?o.gameName:n)?"".concat(n,"-screenshot.png"):"game.png";return he()(new Blob([t]),n),!1}),n(o.localization("Cache Manage"),!0,function(e){var n;return m.romdb&&(G(o.elements.dialogs.cache,!1),(n=o.elements.dialogs.cache.querySelector(".".concat(v.classNames["dialog-content"]))).innerHTML="
    "+o.localization("Loading")+"
    ",m.romdb.getAll(function(e){var t,l;e?(t=j("table",{style:"width:100%;padding-left:10px;text-align:left"}),l=j("tbody"),0"):n.innerHTML='
    '+o.localization("Empty")+"
    "},function(){})),!1}),n(o.localization("Quick Save")+" (F2)",!1,function(e){v.quickSaveState(),ne.contextMenu.style.display="none"}),n(o.localization("Quick Load")+" (F4)",!1,function(e){v.quickLoadState(),ne.contextMenu.style.display="none"}),te.contextMenu.innerHTML=i.join("");for(var r=te.contextMenu.getElementsByTagName("li"),s=0;s',"exit-fullscreen":'',gamepad:'',"load-state":'',muted:'',netplay:'',pause:'',play:'',restart:'',"save-state":'',"screen-record":'',settings:'',volume:'\n \n ',cheat:''},this.id=Math.floor(1e4*Math.random()),null),t=(this.elements.controls=null,{id:this.id}),o=!0;z.function(this.config.controls)&&(this.config.controls=this.config.controls.call(this.props)),this.config.controls||(this.config.controls=[]),z.element(this.config.controls)||z.string(this.config.controls)?e=this.config.controls:(e=te.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality}),o=!1);function i(e){var n=e;return Object.entries(t).forEach(function(e){t=2;var e=function(e){if(Array.isArray(e))return e}(e=e)||function(e,t){var n=[],o=!0,i=!1,a=void 0;try{for(var r,s=e[Symbol.iterator]();!(o=(r=s.next()).done)&&(n.push(r.value),!t||n.length!==t);o=!0);}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}(),t=e[0],e=e[1];n=le(n,"{".concat(t,"}"),e)}),n}var a,r;o&&(z.string(this.config.controls)?e=i(e):z.element(e)&&(e.innerHTML=i(e.innerHTML))),z.string(this.config.selectors.controls.container)&&(a=document.querySelector(this.config.selectors.controls.container)),(a=z.element(a)?a:this.elements.container)[z.element(e)?"insertAdjacentElement":"insertAdjacentHTML"]("afterbegin",e),z.element(this.elements.controls)||te.findElements.call(this),z.empty(this.elements.buttons)||(r=function(e){var t=n.config.classNames.controlPressed;Object.defineProperty(e,"pressed",{enumerable:!0,get:function(){return L(e,t)},set:function(){V(e,t,0Math.abs(n)?o:n),n=(a.increaseVolume(o/50),a.game.volume);(1===o&&n<1||-1===o&&0'+n.localization("CORS Error")+"":t.innerHTML=''+n.localization("Network Error")+""}},null,null,null,null,null,function(e,t,n){!function(e){"use strict";function a(){}function t(e){var t=this,n=window;this.update=a,this.requestAnimationFrame=e||n.requestAnimationFrame||n.webkitRequestAnimationFrame||n.mozRequestAnimationFrame,this.tickFunction=function(){t.update(),t.startTicker()},this.startTicker=function(){t.requestAnimationFrame.apply(n,[t.tickFunction])}}function n(){}function o(e,t){this.listener=e,this.gamepadGetter=t,this.knownGamepads=[]}function i(t){this.listener=t,window.addEventListener("gamepadconnected",function(e){t._connect(e.gamepad)}),window.addEventListener("gamepaddisconnected",function(e){t._disconnect(e.gamepad)})}function c(e){this.updateStrategy=e||new t,this.gamepads=[],this.listeners={},this.platform=s,this.deadzone=.03,this.maximizeThreshold=.97}var s={getType:function(){return"null"},isSupported:function(){return!1},update:a};t.prototype.start=function(e){this.update=e||a,this.startTicker()},n.prototype.update=a,n.prototype.start=function(e){this.update=e||a},o.factory=function(e){var t=s,n=window&&window.navigator;return n&&(void 0!==n.getGamepads?t=new o(e,function(){return n.getGamepads()}):void 0!==n.webkitGamepads?t=new o(e,function(){return n.webkitGamepads()}):void 0!==n.webkitGetGamepads&&(t=new o(e,function(){return n.webkitGetGamepads()}))),t},o.getType=function(){return"WebKit"},o.prototype.getType=function(){return o.getType()},o.prototype.isSupported=function(){return!0},o.prototype.update=function(){for(var e,t=Array.prototype.slice.call(this.gamepadGetter(),0),n=this.knownGamepads.length-1;0<=n;n--)e=this.knownGamepads[n],t.indexOf(e)<0&&(this.knownGamepads.splice(n,1),this.listener._disconnect(e));for(n=0;nthis.options.threshold){var r={};for(l in this.direction)this.direction.hasOwnProperty(l)&&(r[l]=this.direction[l]);var l,c={};for(l in this.direction={x:n,y:a,angle:t},e.direction=this.direction,r)r[l]===this.direction[l]&&(c[l]=!0);if(c.x&&c.y&&c.angle)return e;c.x&&c.y||this.trigger("plain",e),c.x||this.trigger("plain:"+n,e),c.y||this.trigger("plain:"+a,e),c.angle||this.trigger("dir dir:"+t,e)}return e},a.prototype=new e,(a.constructor=a).id=0,a.prototype.prepareNipples=function(){var e=this,a=e.nipples;a.on=e.on.bind(e),a.off=e.off.bind(e),a.options=e.options,a.destroy=e.destroy.bind(e),a.ids=e.ids,a.id=e.id,a.processOnMove=e.processOnMove.bind(e),a.processOnEnd=e.processOnEnd.bind(e),a.get=function(e){if(void 0===e)return a[0];for(var t=0,n=a.length;t