Fixed minification bug in login page.

Ylian Saint-Hilaire committed Oct 24, 2019 at 23:58 UTC cdadf8595bd9c32a600ed9d2b3d6e99efc0d54af
28 files changed +120 -988
MeshCentralServer.njsproj
-5
@@ -274,19 +274,14 @@
274 <Content Include="translate\readme.txt" />
275 <Content Include="translate\translate.json" />
276 <Content Include="views\agentinvite.handlebars" />
277 - <Content Include="views\default-min.handlebars" />
278 - <Content Include="views\default-mobile-min.handlebars" />
277 <Content Include="views\default-mobile.handlebars" />
278 <Content Include="views\default.handlebars" />
279 <Content Include="views\download.handlebars" />
280 <Content Include="views\error404-mobile.handlebars" />
281 <Content Include="views\error404.handlebars" />
284 - <Content Include="views\login-min.handlebars" />
285 - <Content Include="views\login-mobile-min.handlebars" />
282 <Content Include="views\login-mobile.handlebars" />
283 <Content Include="views\login.handlebars" />
284 <Content Include="views\message.handlebars" />
289 - <Content Include="views\messenger-min.handlebars" />
285 <Content Include="views\messenger.handlebars" />
286 <Content Include="views\terms-mobile.handlebars" />
287 <Content Include="views\terms.handlebars" />
agents/MeshCmd-signed.exe
Binary files a/agents/MeshCmd-signed.exe and b/agents/MeshCmd-signed.exe differ
agents/MeshCmd64-signed.exe
Binary files a/agents/MeshCmd64-signed.exe and b/agents/MeshCmd64-signed.exe differ
agents/meshcmd.js
+39 -32
@@ -2564,46 +2564,53 @@ function removeItemFromArray(array, element) {
2564 }
2565
2566 // Run MeshCmd, but before we do, we need to see if what type of service we are going to be
2567 -var serviceName = null;
2568 -var serviceOpSpecified = 0;
2569 -var serviceInstall = 0;
2570 -
2567 +var serviceName = null, serviceDisplayName = null, serviceDesc = null;
2568 for (var i in process.argv) {
2572 - if (process.argv[i].toLowerCase() == 'install') { serviceInstall = 1 } else if (process.argv[i].toLowerCase() == 'uninstall') { serviceInstall = -1 }
2573 - if ((process.argv[i].toLowerCase() == 'microlms') || (process.argv[i].toLowerCase() == 'amtlms') || (process.argv[i].toLowerCase() == 'lms')) { serviceName = 'MicroLMS'; break; }
2574 - if ((process.argv[i].toLowerCase() == 'meshcommander') || (process.argv[i].toLowerCase() == 'commander')) { serviceName = 'MeshCommander'; break; }
2569 + if (process.argv[i].toLowerCase() == 'install') { process.argv[i] = '-install'; }
2570 + if (process.argv[i].toLowerCase() == 'uninstall') { process.argv[i] = '-uninstall'; }
2571 + if ((process.argv[i].toLowerCase() == 'microlms') || (process.argv[i].toLowerCase() == 'amtlms') || (process.argv[i].toLowerCase() == 'lms')) {
2572 + serviceName = 'MicroLMS';
2573 + serviceDisplayName = 'MicroLMS Service for Intel(R) AMT';
2574 + serviceDesc = 'Intel AMT Micro Local Manageability Service (MicroLMS)';
2575 + } else if ((process.argv[i].toLowerCase() == 'intellms')) {
2576 + serviceName = 'LMS';
2577 + serviceDisplayName = 'Intel(R) Management and Security Application Local Management Service';
2578 + serviceDesc = 'Intel(R) Management and Security Application Local Management Service - Provides OS-related Intel(R) ME functionality.';
2579 + } else if ((process.argv[i].toLowerCase() == 'meshcommander') || (process.argv[i].toLowerCase() == 'commander')) {
2580 + serviceName = 'MeshCommander';
2581 + serviceDisplayName = 'MeshCommander, Intel AMT Management console';
2582 + serviceDesc = 'MeshCommander is a Intel AMT management console.';
2583 + }
2584 }
2585
2586 if (serviceName == null) {
2578 - for (var i in process.argv) {
2579 - if ((process.argv[i].toLowerCase() == 'install') || (process.argv[i].toLowerCase() == 'uninstall')) {
2580 - console.log('In order to install/uninstall, a service type must be specified.');
2581 - process.exit();
2582 - }
2583 - }
2587 if (process.execPath.includes('MicroLMS')) { serviceName = 'MicroLMS'; }
2588 + else if (process.execPath.includes('LMS')) { serviceName = 'LMS'; }
2589 else if (process.execPath.includes('MeshCommander')) { serviceName = 'MeshCommander'; }
2586 - else { serviceName = 'not_a_service'; }
2590 + if (serviceName == null) { for (var i in process.argv) { if ((process.argv[i].toLowerCase() == '-install') || (process.argv[i].toLowerCase() == '-uninstall')) { console.log('In order to install/uninstall, a service type must be specified.'); process.exit(); } } }
2591 + if (serviceName == null) { try { run(process.argv); } catch (e) { console.log('ERROR: ' + e); } process.exit(); }
2592 }
2593
2589 -if (serviceInstall == 0) {
2590 - run(process.argv);
2591 -} else {
2592 - var serviceHost = require('service-host');
2593 - var meshcmdService = new serviceHost({ name: serviceName, startType: 'AUTO_START' });
2594 +var serviceHost = require('service-host');
2595 +var meshcmdService = new serviceHost({ name: serviceName, displayName: serviceDisplayName, startType: 'AUTO_START', description: serviceDesc });
2596
2595 - // Called when the background service is started.
2596 - meshcmdService.on('serviceStart', function onStart() {
2597 - console.setDestination(console.Destinations.DISABLED); // Disable console.log().
2598 - if (process.execPath.includes('MicroLMS')) { run([process.execPath, 'microlms']); } //
2599 - else if (process.execPath.includes('MeshCommander')) { run([process.execPath, 'meshcommander']); }
2600 - else { console.log('Aborting Service Start, because unknown binary: ' + process.execPath); process.exit(1); }
2601 - });
2597 +// Called when the background service is started.
2598 +meshcmdService.on('serviceStart', function onStart() {
2599 + //process.coreDumpLocation = 'C:\\tmp\\meshcommander.dmp';
2600 + //process.on('exit', function () { console.log('exit3'); _debugCrash(); });
2601 + console.setDestination(console.Destinations.DISABLED); // Disable console.log().
2602 + //console.setDestination(console.Destinations.LOGFILE);
2603 + //attachDebuger({ webport: 0, wait: 1 }).then(console.log, console.log);
2604
2603 - // Called when the background service is stopping
2604 - meshcmdService.on('serviceStop', function onStop() { console.log('Stopping service'); process.exit(); }); // The console.log() is for debugging, will be ignored unless "console.setDestination()" is set.
2605 + if (process.execPath.includes('MicroLMS')) { run([process.execPath, 'microlms']); } // Start MicroLMS
2606 + else if (process.execPath.includes('LMS')) { run([process.execPath, 'microlms']); } // Start MicroLMS
2607 + else if (process.execPath.includes('MeshCommander')) { run([process.execPath, 'meshcommander']); } // Start MeshCommander
2608 + else { console.log('Aborting Service Start, because unknown binary: ' + process.execPath); process.exit(1); }
2609 +});
2610
2606 - // Called when the executable is not running as a service, run normally.
2607 - meshcmdService.on('normalStart', function onNormalStart() { try { run(process.argv); } catch (e) { console.log('ERROR: ' + e); } });
2608 - meshcmdService.run();
2609 -}
2611 +// Called when the background service is stopping
2612 +meshcmdService.on('serviceStop', function onStop() { console.log('Stopping service'); process.exit(); }); // The console.log() is for debugging, will be ignored unless "console.setDestination()" is set.
2613 +
2614 +// Called when the executable is not running as a service, run normally.
2615 +meshcmdService.on('normalStart', function onNormalStart() { try { run(process.argv); } catch (e) { console.log('ERROR: ' + e); } });
2616 +meshcmdService.run();
agents/meshcmd.min.js
+39 -32
@@ -2564,46 +2564,53 @@ function removeItemFromArray(array, element) {
2564 }
2565
2566 // Run MeshCmd, but before we do, we need to see if what type of service we are going to be
2567 -var serviceName = null;
2568 -var serviceOpSpecified = 0;
2569 -var serviceInstall = 0;
2570 -
2567 +var serviceName = null, serviceDisplayName = null, serviceDesc = null;
2568 for (var i in process.argv) {
2572 - if (process.argv[i].toLowerCase() == 'install') { serviceInstall = 1 } else if (process.argv[i].toLowerCase() == 'uninstall') { serviceInstall = -1 }
2573 - if ((process.argv[i].toLowerCase() == 'microlms') || (process.argv[i].toLowerCase() == 'amtlms') || (process.argv[i].toLowerCase() == 'lms')) { serviceName = 'MicroLMS'; break; }
2574 - if ((process.argv[i].toLowerCase() == 'meshcommander') || (process.argv[i].toLowerCase() == 'commander')) { serviceName = 'MeshCommander'; break; }
2569 + if (process.argv[i].toLowerCase() == 'install') { process.argv[i] = '-install'; }
2570 + if (process.argv[i].toLowerCase() == 'uninstall') { process.argv[i] = '-uninstall'; }
2571 + if ((process.argv[i].toLowerCase() == 'microlms') || (process.argv[i].toLowerCase() == 'amtlms') || (process.argv[i].toLowerCase() == 'lms')) {
2572 + serviceName = 'MicroLMS';
2573 + serviceDisplayName = 'MicroLMS Service for Intel(R) AMT';
2574 + serviceDesc = 'Intel AMT Micro Local Manageability Service (MicroLMS)';
2575 + } else if ((process.argv[i].toLowerCase() == 'intellms')) {
2576 + serviceName = 'LMS';
2577 + serviceDisplayName = 'Intel(R) Management and Security Application Local Management Service';
2578 + serviceDesc = 'Intel(R) Management and Security Application Local Management Service - Provides OS-related Intel(R) ME functionality.';
2579 + } else if ((process.argv[i].toLowerCase() == 'meshcommander') || (process.argv[i].toLowerCase() == 'commander')) {
2580 + serviceName = 'MeshCommander';
2581 + serviceDisplayName = 'MeshCommander, Intel AMT Management console';
2582 + serviceDesc = 'MeshCommander is a Intel AMT management console.';
2583 + }
2584 }
2585
2586 if (serviceName == null) {
2578 - for (var i in process.argv) {
2579 - if ((process.argv[i].toLowerCase() == 'install') || (process.argv[i].toLowerCase() == 'uninstall')) {
2580 - console.log('In order to install/uninstall, a service type must be specified.');
2581 - process.exit();
2582 - }
2583 - }
2587 if (process.execPath.includes('MicroLMS')) { serviceName = 'MicroLMS'; }
2588 + else if (process.execPath.includes('LMS')) { serviceName = 'LMS'; }
2589 else if (process.execPath.includes('MeshCommander')) { serviceName = 'MeshCommander'; }
2586 - else { serviceName = 'not_a_service'; }
2590 + if (serviceName == null) { for (var i in process.argv) { if ((process.argv[i].toLowerCase() == '-install') || (process.argv[i].toLowerCase() == '-uninstall')) { console.log('In order to install/uninstall, a service type must be specified.'); process.exit(); } } }
2591 + if (serviceName == null) { try { run(process.argv); } catch (e) { console.log('ERROR: ' + e); } process.exit(); }
2592 }
2593
2589 -if (serviceInstall == 0) {
2590 - run(process.argv);
2591 -} else {
2592 - var serviceHost = require('service-host');
2593 - var meshcmdService = new serviceHost({ name: serviceName, startType: 'AUTO_START' });
2594 +var serviceHost = require('service-host');
2595 +var meshcmdService = new serviceHost({ name: serviceName, displayName: serviceDisplayName, startType: 'AUTO_START', description: serviceDesc });
2596
2595 - // Called when the background service is started.
2596 - meshcmdService.on('serviceStart', function onStart() {
2597 - console.setDestination(console.Destinations.DISABLED); // Disable console.log().
2598 - if (process.execPath.includes('MicroLMS')) { run([process.execPath, 'microlms']); } //
2599 - else if (process.execPath.includes('MeshCommander')) { run([process.execPath, 'meshcommander']); }
2600 - else { console.log('Aborting Service Start, because unknown binary: ' + process.execPath); process.exit(1); }
2601 - });
2597 +// Called when the background service is started.
2598 +meshcmdService.on('serviceStart', function onStart() {
2599 + //process.coreDumpLocation = 'C:\\tmp\\meshcommander.dmp';
2600 + //process.on('exit', function () { console.log('exit3'); _debugCrash(); });
2601 + console.setDestination(console.Destinations.DISABLED); // Disable console.log().
2602 + //console.setDestination(console.Destinations.LOGFILE);
2603 + //attachDebuger({ webport: 0, wait: 1 }).then(console.log, console.log);
2604
2603 - // Called when the background service is stopping
2604 - meshcmdService.on('serviceStop', function onStop() { console.log('Stopping service'); process.exit(); }); // The console.log() is for debugging, will be ignored unless "console.setDestination()" is set.
2605 + if (process.execPath.includes('MicroLMS')) { run([process.execPath, 'microlms']); } // Start MicroLMS
2606 + else if (process.execPath.includes('LMS')) { run([process.execPath, 'microlms']); } // Start MicroLMS
2607 + else if (process.execPath.includes('MeshCommander')) { run([process.execPath, 'meshcommander']); } // Start MeshCommander
2608 + else { console.log('Aborting Service Start, because unknown binary: ' + process.execPath); process.exit(1); }
2609 +});
2610
2606 - // Called when the executable is not running as a service, run normally.
2607 - meshcmdService.on('normalStart', function onNormalStart() { try { run(process.argv); } catch (e) { console.log('ERROR: ' + e); } });
2608 - meshcmdService.run();
2609 -}
2611 +// Called when the background service is stopping
2612 +meshcmdService.on('serviceStop', function onStop() { console.log('Stopping service'); process.exit(); }); // The console.log() is for debugging, will be ignored unless "console.setDestination()" is set.
2613 +
2614 +// Called when the executable is not running as a service, run normally.
2615 +meshcmdService.on('normalStart', function onNormalStart() { try { run(process.argv); } catch (e) { console.log('ERROR: ' + e); } });
2616 +meshcmdService.run();
agents/modules_meshcmd/service-host.js deleted
-389
@@ -1,389 +0,0 @@
1 -/*
2 -Copyright 2018 Intel Corporation
3 -
4 -Licensed under the Apache License, Version 2.0 (the "License");
5 -you may not use this file except in compliance with the License.
6 -You may obtain a copy of the License at
7 -
8 - http://www.apache.org/licenses/LICENSE-2.0
9 -
10 -Unless required by applicable law or agreed to in writing, software
11 -distributed under the License is distributed on an "AS IS" BASIS,
12 -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 -See the License for the specific language governing permissions and
14 -limitations under the License.
15 -*/
16 -
17 -
18 -var SERVICE_WIN32 = 0x00000010 | 0x00000020;
19 -var SERVICE_STATE = { STOPPED: 0x00000001, SERVICE_START_PENDING: 0x00000002, SERVICE_STOP_PENDING: 0x00000003, RUNNING: 0x00000004 };
20 -var SERVICE_ACCEPT = { SERVICE_ACCEPT_STOP: 0x00000001, SERVICE_ACCEPT_SHUTDOWN: 0x00000004, SERVICE_ACCEPT_POWEREVENT: 0x00000040, SERVICE_ACCEPT_SESSIONCHANGE: 0x00000080 };
21 -
22 -var SERVICE_CONTROL = { SERVICE_CONTROL_SHUTDOWN: 0x00000005, SERVICE_CONTROL_STOP: 0x00000001, SERVICE_CONTROL_POWEREVENT: 0x0000000D, SERVICE_CONTROL_SESSIONCHANGE: 0x0000000E};
23 -var SESSION_CHANGE_TYPE =
24 -{
25 - WTS_CONSOLE_CONNECT: 0x1,
26 - WTS_CONSOLE_DISCONNECT: 0x2,
27 - WTS_REMOTE_CONNECT: 0x3,
28 - WTS_REMOTE_DISCONNECT: 0x4,
29 - WTS_SESSION_LOGON: 0x5,
30 - WTS_SESSION_LOGOFF: 0x6,
31 - WTS_SESSION_LOCK: 0x7,
32 - WTS_SESSION_UNLOCK: 0x8,
33 - WTS_SESSION_REMOTE_CONTROL: 0x9,
34 - WTS_SESSION_CREATE: 0xa,
35 - WTS_SESSION_TERMINATE: 0xb
36 -};
37 -
38 -
39 -var NO_ERROR = 0;
40 -
41 -var serviceManager = require('service-manager');
42 -
43 -function serviceHost(serviceName)
44 -{
45 - this._ObjectID = 'service-host';
46 - var emitterUtils = require('events').inherits(this);
47 - emitterUtils.createEvent('serviceStart');
48 - emitterUtils.createEvent('serviceStop');
49 - emitterUtils.createEvent('normalStart');
50 - emitterUtils.createEvent('session');
51 - emitterUtils.createEvent('powerStateChange');
52 -
53 - if (process.platform == 'win32')
54 - {
55 - this.GM = require('_GenericMarshal');
56 - this.Advapi = this.GM.CreateNativeProxy('Advapi32.dll');
57 - this.Advapi.CreateMethod({ method: 'StartServiceCtrlDispatcherA', threadDispatch: 1 });
58 - this.Advapi.CreateMethod('RegisterServiceCtrlHandlerExA');
59 - this.Advapi.CreateMethod('SetServiceStatus');
60 - this.Kernel32 = this.GM.CreateNativeProxy('Kernel32.dll');
61 - this.Kernel32.CreateMethod('GetLastError');
62 -
63 - this.Ole32 = this.GM.CreateNativeProxy('Ole32.dll');
64 - this.Ole32.CreateMethod('CoInitializeEx');
65 - this.Ole32.CreateMethod('CoUninitialize');
66 -
67 - this._ServiceName = this.GM.CreateVariable(typeof (serviceName) == 'string' ? serviceName : serviceName.name);
68 - this._ServiceMain = this.GM.GetGenericGlobalCallback(2);
69 - this._ServiceMain.Parent = this;
70 - this._ServiceMain.GM = this.GM;
71 - this._ServiceMain.on('GlobalCallback', function onGlobalCallback(argc, argv)
72 - {
73 - //ToDo: Check to make sure this is for us
74 -
75 - this.Parent._ServiceStatus = this.GM.CreateVariable(28);
76 - //typedef struct _SERVICE_STATUS {
77 - // DWORD dwServiceType;
78 - // DWORD dwCurrentState;
79 - // DWORD dwControlsAccepted;
80 - // DWORD dwWin32ExitCode;
81 - // DWORD dwServiceSpecificExitCode;
82 - // DWORD dwCheckPoint;
83 - // DWORD dwWaitHint;
84 - //} SERVICE_STATUS, *LPSERVICE_STATUS;
85 -
86 - // Initialise service status
87 - this.Parent._ServiceStatus.toBuffer().writeUInt32LE(SERVICE_WIN32);
88 - this.Parent._ServiceStatus.toBuffer().writeUInt32LE(SERVICE_STATE.SERVICE_STOPPED, 4);
89 - this.Parent._ServiceStatusHandle = this.Parent.Advapi.RegisterServiceCtrlHandlerExA(this.Parent._ServiceName, this.Parent._ServiceControlHandler, this.Parent.GM.StashObject(this.Parent._ServiceControlHandler));
90 - if(this.Parent._ServiceStatusHandle.Val == 0)
91 - {
92 - process.exit(1);
93 - }
94 -
95 - // Service is starting
96 - this.Parent._ServiceStatus.toBuffer().writeUInt32LE(SERVICE_STATE.SERVICE_START_PENDING, 4);
97 - this.Parent.Advapi.SetServiceStatus(this.Parent._ServiceStatusHandle, this.Parent._ServiceStatus);
98 -
99 - // Service running
100 - this.Parent._ServiceStatus.toBuffer().writeUInt32LE(SERVICE_STATE.RUNNING, 4);
101 - this.Parent._ServiceStatus.toBuffer().writeUInt32LE(SERVICE_ACCEPT.SERVICE_ACCEPT_STOP | SERVICE_ACCEPT.SERVICE_ACCEPT_POWEREVENT | SERVICE_ACCEPT.SERVICE_ACCEPT_SESSIONCHANGE, 8);
102 - this.Parent.Advapi.SetServiceStatus(this.Parent._ServiceStatusHandle, this.Parent._ServiceStatus);
103 -
104 - this.Parent.Ole32.CoInitializeEx(0, 2);
105 - this.Parent.on('~', function OnServiceHostFinalizer()
106 - {
107 - var GM = require('_GenericMarshal');
108 - var Advapi = GM.CreateNativeProxy('Advapi32.dll');
109 - Advapi.CreateMethod('SetServiceStatus');
110 -
111 - Kernel32 = this.GM.CreateNativeProxy('Kernel32.dll');
112 - Kernel32.CreateMethod('GetLastError');
113 -
114 - var status = GM.CreateVariable(28);
115 -
116 - // Service was stopped
117 - status.toBuffer().writeUInt32LE(SERVICE_WIN32);
118 - status.toBuffer().writeUInt32LE(0x00000001, 4);
119 - status.toBuffer().writeUInt32LE(0, 8);
120 -
121 - Advapi.SetServiceStatus(this._ServiceStatusHandle, status);
122 -
123 - this.Ole32.CoUninitialize();
124 - });
125 -
126 - this.Parent.emit('serviceStart');
127 - });
128 - this._ServiceControlHandler = this.GM.GetGenericGlobalCallback(4);
129 - this._ServiceControlHandler.Parent = this;
130 - this._ServiceControlHandler.GM = this.GM;
131 - this._ServiceControlHandler.on('GlobalCallback', function onServiceControlHandler(code, eventType, eventData, context)
132 - {
133 - var j = this.Parent.GM.UnstashObject(context);
134 - if (j != null && j == this)
135 - {
136 - switch (code.Val)
137 - {
138 - case SERVICE_CONTROL.SERVICE_CONTROL_SHUTDOWN:
139 - case SERVICE_CONTROL.SERVICE_CONTROL_STOP:
140 - this.Parent.emit('serviceStop');
141 - return;
142 - case SERVICE_CONTROL.SERVICE_CONTROL_SESSIONCHANGE:
143 - var sessionId = eventData.Deref(4, 4).toBuffer().readUInt32LE();
144 - switch(eventType.Val)
145 - {
146 - case SESSION_CHANGE_TYPE.WTS_SESSION_LOGON:
147 - case SESSION_CHANGE_TYPE.WTS_SESSION_LOGOFF:
148 - require('user-sessions').emit('changed');
149 - break;
150 - }
151 - break;
152 - default:
153 - break;
154 - }
155 -
156 - this.Parent.Advapi.SetServiceStatus(this.Parent._ServiceStatusHandle, this.Parent._ServiceStatus);
157 - }
158 - });
159 - }
160 -
161 - if (serviceName) { this._ServiceOptions = typeof (serviceName) == 'object' ? serviceName : { name: serviceName }; }
162 - else
163 - {
164 - throw ('Must specify either ServiceName or Options');
165 - }
166 - if (!this._ServiceOptions.servicePath)
167 - {
168 - this._ServiceOptions.servicePath = process.execPath;
169 - }
170 -
171 - this.run = function run()
172 - {
173 - var serviceOperation = 0;
174 -
175 - for(var i = 0; i<process.argv.length; ++i)
176 - {
177 - switch(process.argv[i])
178 - {
179 - case '-install':
180 - if (!this._svcManager) { this._svcManager = new serviceManager(); }
181 - try
182 - {
183 - this._svcManager.installService(this._ServiceOptions);
184 - }
185 - catch(e)
186 - {
187 - console.log(e);
188 - process.exit();
189 - }
190 -
191 - console.log(this._ServiceOptions.name + ' installed');
192 - process.exit();
193 - break;
194 - case '-uninstall':
195 - if (!this._svcManager) { this._svcManager = new serviceManager(); }
196 - try
197 - {
198 - this._svcManager.uninstallService(this._ServiceOptions);
199 - }
200 - catch(e)
201 - {
202 - console.log(e);
203 - process.exit();
204 - }
205 - if (process.platform == 'win32' || process.platform == 'darwin')
206 - {
207 - // Only do this on Windows/MacOS, becuase Linux is async... It'll complete later
208 - console.log(this._ServiceOptions.name + ' uninstalled');
209 - process.exit();
210 - }
211 - i = process.argv.length;
212 - serviceOperation = 1;
213 - break;
214 - case 'start':
215 - case '-d':
216 - if (process.platform != 'win32') { break; }
217 - if (!this._svcManager) { this._svcManager = new serviceManager(); }
218 - this._svcManager.getService(this._ServiceOptions.name).start();
219 - console.log(this._ServiceOptions.name + ' starting...');
220 - process.exit();
221 - break;
222 - case 'stop':
223 - case '-s':
224 - if (process.platform != 'win32') { break; }
225 - if (!this._svcManager) { this._svcManager = new serviceManager(); }
226 - this._svcManager.getService(this._ServiceOptions.name).stop();
227 - console.log(this._ServiceOptions.name + ' stopping...');
228 - process.exit();
229 - break;
230 -
231 - }
232 - }
233 -
234 - if (process.platform == 'win32')
235 - {
236 - var serviceTable = this.GM.CreateVariable(4 * this.GM.PointerSize);
237 - this._ServiceName.pointerBuffer().copy(serviceTable.toBuffer());
238 - this._ServiceMain.pointerBuffer().copy(serviceTable.toBuffer(), this.GM.PointerSize);
239 - this._sscd = this.Advapi.StartServiceCtrlDispatcherA(serviceTable);
240 - this._sscd.parent = this;
241 - this._sscd.on('done', function OnStartServiceCtrlDispatcherA(retVal) {
242 - if (retVal.Val == 0)
243 - {
244 - this.parent.emit('normalStart');
245 - }
246 - });
247 - return;
248 - }
249 - else if (process.platform == 'linux')
250 - {
251 - var moduleName = this._ServiceOptions ? this._ServiceOptions.name : process.execPath.substring(1 + process.execPath.lastIndexOf('/'));
252 -
253 - for (var i = 0; i < process.argv.length; ++i) {
254 - switch (process.argv[i]) {
255 - case 'start':
256 - case '-d':
257 - var child = require('child_process').execFile(process.execPath, [moduleName], { type: require('child_process').SpawnTypes.DETACHED });
258 - var pstream = null;
259 - try {
260 - pstream = require('fs').createWriteStream('/var/run/' + moduleName + '.pid', { flags: 'w' });
261 - }
262 - catch (e) {
263 - }
264 - if (pstream == null) {
265 - pstream = require('fs').createWriteStream('.' + moduleName + '.pid', { flags: 'w' });
266 - }
267 - pstream.end(child.pid.toString());
268 -
269 - console.log(moduleName + ' started!');
270 - process.exit();
271 - break;
272 - case 'stop':
273 - case '-s':
274 - var pid = null;
275 - try {
276 - pid = parseInt(require('fs').readFileSync('/var/run/' + moduleName + '.pid', { flags: 'r' }));
277 - require('fs').unlinkSync('/var/run/' + moduleName + '.pid');
278 - }
279 - catch (e) {
280 - }
281 - if (pid == null) {
282 - try {
283 - pid = parseInt(require('fs').readFileSync('.' + moduleName + '.pid', { flags: 'r' }));
284 - require('fs').unlinkSync('.' + moduleName + '.pid');
285 - }
286 - catch (e) {
287 - }
288 - }
289 -
290 - if (pid) {
291 - process.kill(pid);
292 - console.log(moduleName + ' stopped');
293 - }
294 - else {
295 - console.log(moduleName + ' not running');
296 - }
297 - process.exit();
298 - break;
299 - }
300 - }
301 -
302 - if (serviceOperation == 0) {
303 - // This is non-windows, so we need to check how this binary was started to determine if this was a service start
304 -
305 - // Start by checking if we were started with start/stop
306 - var pid = null;
307 - try {
308 - pid = parseInt(require('fs').readFileSync('/var/run/' + moduleName + '.pid', { flags: 'r' }));
309 - }
310 - catch (e) {
311 - }
312 - if (pid == null) {
313 - try {
314 - pid = parseInt(require('fs').readFileSync('.' + moduleName + '.pid', { flags: 'r' }));
315 - }
316 - catch (e) {
317 - }
318 - }
319 -
320 - if (pid != null && pid == process.pid) {
321 - this.emit('serviceStart');
322 - }
323 - else {
324 - // Now we need to check if we were started with systemd
325 - if (require('process-manager').getProcessInfo(1).Name == 'systemd') {
326 - this._checkpid = require('child_process').execFile('/bin/sh', ['sh'], { type: require('child_process').SpawnTypes.TERM });
327 - this._checkpid.result = '';
328 - this._checkpid.parent = this;
329 - this._checkpid.on('exit', function onCheckPIDExit() {
330 - var lines = this.result.split('\r\n');
331 - for (i in lines) {
332 - if (lines[i].startsWith(' Main PID:')) {
333 - var tokens = lines[i].split(' ');
334 - if (parseInt(tokens[3]) == process.pid) {
335 - this.parent.emit('serviceStart');
336 - }
337 - else {
338 - this.parent.emit('normalStart');
339 - }
340 - delete this.parent._checkpid;
341 - return;
342 - }
343 - }
344 - this.parent.emit('normalStart');
345 - delete this.parent._checkpid;
346 - });
347 - this._checkpid.stdout.on('data', function (chunk) { this.parent.result += chunk.toString(); });
348 - this._checkpid.stdin.write("systemctl status " + moduleName + " | grep 'Main PID:'\n");
349 - this._checkpid.stdin.write('exit\n');
350 - }
351 - else {
352 - // This isn't even a systemd platform, so this couldn't have been a service start
353 - this.emit('normalStart');
354 - }
355 - }
356 - }
357 - }
358 - else if(process.platform == 'darwin')
359 - {
360 - // First let's fetch all the PIDs of running services
361 - var child = require('child_process').execFile('/bin/sh', ['sh']);
362 - child.stdout.str = '';
363 - child.stdout.on('data', function (chunk) { this.str += chunk.toString(); });
364 - child.stdin.write('launchctl list\nexit\n');
365 - child.waitExit();
366 -
367 - var lines = child.stdout.str.split('\n');
368 - var tokens, i;
369 - var p = {};
370 - for (i = 1; i < lines.length; ++i)
371 - {
372 - tokens = lines[i].split('\t');
373 - if (tokens[0] && tokens[0] != '-') { p[tokens[0]] = tokens[0]; }
374 - }
375 -
376 - if(p[process.pid.toString()])
377 - {
378 - // We are a service!
379 - this.emit('serviceStart');
380 - }
381 - else
382 - {
383 - this.emit('normalStart');
384 - }
385 - }
386 - };
387 -}
388 -
389 -module.exports = serviceHost;
\ No newline at end of file
agents/modules_meshcmd/service-manager.js deleted
-497
@@ -1,497 +0,0 @@
1 -/*
2 -Copyright 2018 Intel Corporation
3 -
4 -Licensed under the Apache License, Version 2.0 (the "License");
5 -you may not use this file except in compliance with the License.
6 -You may obtain a copy of the License at
7 -
8 - http://www.apache.org/licenses/LICENSE-2.0
9 -
10 -Unless required by applicable law or agreed to in writing, software
11 -distributed under the License is distributed on an "AS IS" BASIS,
12 -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 -See the License for the specific language governing permissions and
14 -limitations under the License.
15 -*/
16 -
17 -function parseServiceStatus(token)
18 -{
19 - var j = {};
20 - var serviceType = token.Deref(0, 4).IntVal;
21 - j.isFileSystemDriver = ((serviceType & 0x00000002) == 0x00000002);
22 - j.isKernelDriver = ((serviceType & 0x00000001) == 0x00000001);
23 - j.isSharedProcess = ((serviceType & 0x00000020) == 0x00000020);
24 - j.isOwnProcess = ((serviceType & 0x00000010) == 0x00000010);
25 - j.isInteractive = ((serviceType & 0x00000100) == 0x00000100);
26 - switch (token.Deref((1 * 4), 4).toBuffer().readUInt32LE())
27 - {
28 - case 0x00000005:
29 - j.state = 'CONTINUE_PENDING';
30 - break;
31 - case 0x00000006:
32 - j.state = 'PAUSE_PENDING';
33 - break;
34 - case 0x00000007:
35 - j.state = 'PAUSED';
36 - break;
37 - case 0x00000004:
38 - j.state = 'RUNNING';
39 - break;
40 - case 0x00000002:
41 - j.state = 'START_PENDING';
42 - break;
43 - case 0x00000003:
44 - j.state = 'STOP_PENDING';
45 - break;
46 - case 0x00000001:
47 - j.state = 'STOPPED';
48 - break;
49 - }
50 - var controlsAccepted = token.Deref((2 * 4), 4).toBuffer().readUInt32LE();
51 - j.controlsAccepted = [];
52 - if ((controlsAccepted & 0x00000010) == 0x00000010)
53 - {
54 - j.controlsAccepted.push('SERVICE_CONTROL_NETBINDADD');
55 - j.controlsAccepted.push('SERVICE_CONTROL_NETBINDREMOVE');
56 - j.controlsAccepted.push('SERVICE_CONTROL_NETBINDENABLE');
57 - j.controlsAccepted.push('SERVICE_CONTROL_NETBINDDISABLE');
58 - }
59 - if ((controlsAccepted & 0x00000008) == 0x00000008) { j.controlsAccepted.push('SERVICE_CONTROL_PARAMCHANGE'); }
60 - if ((controlsAccepted & 0x00000002) == 0x00000002) { j.controlsAccepted.push('SERVICE_CONTROL_PAUSE'); j.controlsAccepted.push('SERVICE_CONTROL_CONTINUE'); }
61 - if ((controlsAccepted & 0x00000100) == 0x00000100) { j.controlsAccepted.push('SERVICE_CONTROL_PRESHUTDOWN'); }
62 - if ((controlsAccepted & 0x00000004) == 0x00000004) { j.controlsAccepted.push('SERVICE_CONTROL_SHUTDOWN'); }
63 - if ((controlsAccepted & 0x00000001) == 0x00000001) { j.controlsAccepted.push('SERVICE_CONTROL_STOP'); }
64 - if ((controlsAccepted & 0x00000020) == 0x00000020) { j.controlsAccepted.push('SERVICE_CONTROL_HARDWAREPROFILECHANGE'); }
65 - if ((controlsAccepted & 0x00000040) == 0x00000040) { j.controlsAccepted.push('SERVICE_CONTROL_POWEREVENT'); }
66 - if ((controlsAccepted & 0x00000080) == 0x00000080) { j.controlsAccepted.push('SERVICE_CONTROL_SESSIONCHANGE'); }
67 - j.pid = token.Deref((7 * 4), 4).toBuffer().readUInt32LE();
68 - return (j);
69 -}
70 -
71 -function serviceManager()
72 -{
73 - this._ObjectID = 'service-manager';
74 - if (process.platform == 'win32')
75 - {
76 - this.GM = require('_GenericMarshal');
77 - this.proxy = this.GM.CreateNativeProxy('Advapi32.dll');
78 - this.proxy.CreateMethod('OpenSCManagerA');
79 - this.proxy.CreateMethod('EnumServicesStatusExA');
80 - this.proxy.CreateMethod('OpenServiceA');
81 - this.proxy.CreateMethod('QueryServiceStatusEx');
82 - this.proxy.CreateMethod('ControlService');
83 - this.proxy.CreateMethod('StartServiceA');
84 - this.proxy.CreateMethod('CloseServiceHandle');
85 - this.proxy.CreateMethod('CreateServiceA');
86 - this.proxy.CreateMethod('ChangeServiceConfig2A');
87 - this.proxy.CreateMethod('DeleteService');
88 - this.proxy.CreateMethod('AllocateAndInitializeSid');
89 - this.proxy.CreateMethod('CheckTokenMembership');
90 - this.proxy.CreateMethod('FreeSid');
91 -
92 - this.proxy2 = this.GM.CreateNativeProxy('Kernel32.dll');
93 - this.proxy2.CreateMethod('GetLastError');
94 -
95 - this.isAdmin = function isAdmin() {
96 - var NTAuthority = this.GM.CreateVariable(6);
97 - NTAuthority.toBuffer().writeInt8(5, 5);
98 - var AdministratorsGroup = this.GM.CreatePointer();
99 - var admin = false;
100 -
101 - if (this.proxy.AllocateAndInitializeSid(NTAuthority, 2, 32, 544, 0, 0, 0, 0, 0, 0, AdministratorsGroup).Val != 0)
102 - {
103 - var member = this.GM.CreateInteger();
104 - if (this.proxy.CheckTokenMembership(0, AdministratorsGroup.Deref(), member).Val != 0)
105 - {
106 - if (member.toBuffer().readUInt32LE() != 0) { admin = true; }
107 - }
108 - this.proxy.FreeSid(AdministratorsGroup.Deref());
109 - }
110 - return admin;
111 - };
112 - this.getProgramFolder = function getProgramFolder()
113 - {
114 - if (require('os').arch() == 'x64')
115 - {
116 - // 64 bit Windows
117 - if (this.GM.PointerSize == 4)
118 - {
119 - return process.env['ProgramFiles(x86)']; // 32 Bit App
120 - }
121 - return process.env['ProgramFiles']; // 64 bit App
122 - }
123 -
124 - // 32 bit Windows
125 - return process.env['ProgramFiles'];
126 - };
127 - this.getServiceFolder = function getServiceFolder() { return this.getProgramFolder() + '\\mesh'; };
128 -
129 - this.enumerateService = function () {
130 - var machineName = this.GM.CreatePointer();
131 - var dbName = this.GM.CreatePointer();
132 - var handle = this.proxy.OpenSCManagerA(0x00, 0x00, 0x0001 | 0x0004);
133 -
134 - var bytesNeeded = this.GM.CreatePointer();
135 - var servicesReturned = this.GM.CreatePointer();
136 - var resumeHandle = this.GM.CreatePointer();
137 - //var services = this.proxy.CreateVariable(262144);
138 - var success = this.proxy.EnumServicesStatusExA(handle, 0, 0x00000030, 0x00000003, 0x00, 0x00, bytesNeeded, servicesReturned, resumeHandle, 0x00);
139 - if (bytesNeeded.IntVal <= 0) {
140 - throw ('error enumerating services');
141 - }
142 - var sz = bytesNeeded.IntVal;
143 - var services = this.GM.CreateVariable(sz);
144 - this.proxy.EnumServicesStatusExA(handle, 0, 0x00000030, 0x00000003, services, sz, bytesNeeded, servicesReturned, resumeHandle, 0x00);
145 - console.log("servicesReturned", servicesReturned.IntVal);
146 -
147 - var ptrSize = dbName._size;
148 - var blockSize = 36 + (2 * ptrSize);
149 - blockSize += ((ptrSize - (blockSize % ptrSize)) % ptrSize);
150 - var retVal = [];
151 - for (var i = 0; i < servicesReturned.IntVal; ++i) {
152 - var token = services.Deref(i * blockSize, blockSize);
153 - var j = {};
154 - j.name = token.Deref(0, ptrSize).Deref().String;
155 - j.displayName = token.Deref(ptrSize, ptrSize).Deref().String;
156 - j.status = parseServiceStatus(token.Deref(2 * ptrSize, 36));
157 - retVal.push(j);
158 - }
159 - this.proxy.CloseServiceHandle(handle);
160 - return (retVal);
161 - }
162 - this.getService = function (name) {
163 - var serviceName = this.GM.CreateVariable(name);
164 - var ptr = this.GM.CreatePointer();
165 - var bytesNeeded = this.GM.CreateVariable(ptr._size);
166 - var handle = this.proxy.OpenSCManagerA(0x00, 0x00, 0x0001 | 0x0004 | 0x0020 | 0x0010);
167 - if (handle.Val == 0) { throw ('could not open ServiceManager'); }
168 - var h = this.proxy.OpenServiceA(handle, serviceName, 0x0004 | 0x0020 | 0x0010 | 0x00010000);
169 - if (h.Val != 0) {
170 - var success = this.proxy.QueryServiceStatusEx(h, 0, 0, 0, bytesNeeded);
171 - var status = this.GM.CreateVariable(bytesNeeded.toBuffer().readUInt32LE());
172 - success = this.proxy.QueryServiceStatusEx(h, 0, status, status._size, bytesNeeded);
173 - if (success != 0) {
174 - retVal = {};
175 - retVal.status = parseServiceStatus(status);
176 - retVal._scm = handle;
177 - retVal._service = h;
178 - retVal._GM = this.GM;
179 - retVal._proxy = this.proxy;
180 - require('events').inherits(retVal);
181 - retVal.on('~', function () { this._proxy.CloseServiceHandle(this); this._proxy.CloseServiceHandle(this._scm); });
182 - retVal.name = name;
183 - retVal.stop = function () {
184 - if (this.status.state == 'RUNNING') {
185 - var newstate = this._GM.CreateVariable(36);
186 - var success = this._proxy.ControlService(this._service, 0x00000001, newstate);
187 - if (success == 0) {
188 - throw (this.name + '.stop() failed');
189 - }
190 - }
191 - else {
192 - throw ('cannot call ' + this.name + '.stop(), when current state is: ' + this.status.state);
193 - }
194 - }
195 - retVal.start = function () {
196 - if (this.status.state == 'STOPPED') {
197 - var success = this._proxy.StartServiceA(this._service, 0, 0);
198 - if (success == 0) {
199 - throw (this.name + '.start() failed');
200 - }
201 - }
202 - else {
203 - throw ('cannot call ' + this.name + '.start(), when current state is: ' + this.status.state);
204 - }
205 - }
206 - return (retVal);
207 - }
208 - else {
209 -
210 - }
211 - }
212 -
213 - this.proxy.CloseServiceHandle(handle);
214 - throw ('could not find service: ' + name);
215 - }
216 - }
217 - else
218 - {
219 - this.isAdmin = function isAdmin()
220 - {
221 - return (require('user-sessions').isRoot());
222 - }
223 - }
224 - this.installService = function installService(options)
225 - {
226 - if (process.platform == 'win32')
227 - {
228 - if (!this.isAdmin()) { throw ('Installing as Service, requires admin'); }
229 -
230 - // Before we start, we need to copy the binary to the right place
231 - var folder = this.getServiceFolder();
232 - if (!require('fs').existsSync(folder)) { require('fs').mkdirSync(folder); }
233 - require('fs').copyFileSync(options.servicePath, folder + '\\' + options.name + '.exe');
234 - options.servicePath = folder + '\\' + options.name + '.exe';
235 -
236 - var servicePath = this.GM.CreateVariable('"' + options.servicePath + '"');
237 - var handle = this.proxy.OpenSCManagerA(0x00, 0x00, 0x0002);
238 - if (handle.Val == 0) { throw ('error opening SCManager'); }
239 - var serviceName = this.GM.CreateVariable(options.name);
240 - var displayName = this.GM.CreateVariable(options.name);
241 - var allAccess = 0x000F01FF;
242 - var serviceType;
243 -
244 -
245 - switch (options.startType) {
246 - case 'BOOT_START':
247 - serviceType = 0x00;
248 - break;
249 - case 'SYSTEM_START':
250 - serviceType = 0x01;
251 - break;
252 - case 'AUTO_START':
253 - serviceType = 0x02;
254 - break;
255 - case 'DEMAND_START':
256 - serviceType = 0x03;
257 - break;
258 - default:
259 - serviceType = 0x04; // Disabled
260 - break;
261 - }
262 -
263 - var h = this.proxy.CreateServiceA(handle, serviceName, displayName, allAccess, 0x10 | 0x100, serviceType, 0, servicePath, 0, 0, 0, 0, 0);
264 - if (h.Val == 0) { this.proxy.CloseServiceHandle(handle); throw ('Error Creating Service: ' + this.proxy2.GetLastError().Val); }
265 - if (options.description) {
266 - console.log(options.description);
267 -
268 - var dscPtr = this.GM.CreatePointer();
269 - dscPtr.Val = this.GM.CreateVariable(options.description);
270 -
271 - if (this.proxy.ChangeServiceConfig2A(h, 1, dscPtr) == 0) {
272 - this.proxy.CloseServiceHandle(h);
273 - this.proxy.CloseServiceHandle(handle);
274 - throw ('Unable to set description');
275 - }
276 - }
277 - this.proxy.CloseServiceHandle(h);
278 - this.proxy.CloseServiceHandle(handle);
279 - return (this.getService(options.name));
280 - }
281 - if(process.platform == 'linux')
282 - {
283 - if (!this.isAdmin()) { throw ('Installing as Service, requires root'); }
284 -
285 - switch (this.getServiceType())
286 - {
287 - case 'init':
288 - require('fs').copyFileSync(options.servicePath, '/etc/init.d/' + options.name);
289 - console.log('copying ' + options.servicePath);
290 - var m = require('fs').statSync('/etc/init.d/' + options.name).mode;
291 - m |= (require('fs').CHMOD_MODES.S_IXUSR | require('fs').CHMOD_MODES.S_IXGRP);
292 - require('fs').chmodSync('/etc/init.d/' + options.name, m);
293 - this._update = require('child_process').execFile('/bin/sh', ['sh'], { type: require('child_process').SpawnTypes.TERM });
294 - this._update._moduleName = options.name;
295 - this._update.stdout.on('data', function (chunk) { });
296 - this._update.stdin.write('update-rc.d ' + options.name + ' defaults\n');
297 - this._update.stdin.write('exit\n');
298 - //update-rc.d meshagent defaults # creates symlinks for rc.d
299 - //service meshagent start
300 -
301 - this._update.waitExit();
302 -
303 - break;
304 - case 'systemd':
305 - var serviceDescription = options.description ? options.description : 'MeshCentral Agent';
306 - if (!require('fs').existsSync('/usr/local/mesh')) { require('fs').mkdirSync('/usr/local/mesh'); }
307 - require('fs').copyFileSync(options.servicePath, '/usr/local/mesh/' + options.name);
308 - var m = require('fs').statSync('/usr/local/mesh/' + options.name).mode;
309 - m |= (require('fs').CHMOD_MODES.S_IXUSR | require('fs').CHMOD_MODES.S_IXGRP);
310 - require('fs').chmodSync('/usr/local/mesh/' + options.name, m);
311 - require('fs').writeFileSync('/lib/systemd/system/' + options.name + '.service', '[Unit]\nDescription=' + serviceDescription + '\n[Service]\nExecStart=/usr/local/mesh/' + options.name + '\nStandardOutput=null\nRestart=always\nRestartSec=3\n[Install]\nWantedBy=multi-user.target\nAlias=' + options.name + '.service\n', { flags: 'w' });
312 - this._update = require('child_process').execFile('/bin/sh', ['sh'], { type: require('child_process').SpawnTypes.TERM });
313 - this._update._moduleName = options.name;
314 - this._update.stdout.on('data', function (chunk) { });
315 - this._update.stdin.write('systemctl enable ' + options.name + '.service\n');
316 - this._update.stdin.write('exit\n');
317 - this._update.waitExit();
318 - break;
319 - default: // unknown platform service type
320 - break;
321 - }
322 - }
323 - if(process.platform == 'darwin')
324 - {
325 - if (!this.isAdmin()) { throw ('Installing as Service, requires root'); }
326 -
327 - // Mac OS
328 - var stdoutpath = (options.stdout ? ('<key>StandardOutPath</key>\n<string>' + options.stdout + '</string>') : '');
329 - var autoStart = (options.startType == 'AUTO_START' ? '<true/>' : '<false/>');
330 - var params = ' <key>ProgramArguments</key>\n';
331 - params += ' <array>\n';
332 - params += (' <string>/usr/local/mesh_services/' + options.name + '/' + options.name + '</string>\n');
333 - if(options.parameters)
334 - {
335 - for(var itm in options.parameters)
336 - {
337 - params += (' <string>' + options.parameters[itm] + '</string>\n');
338 - }
339 - }
340 - params += ' </array>\n';
341 -
342 - var plist = '<?xml version="1.0" encoding="UTF-8"?>\n';
343 - plist += '<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">\n';
344 - plist += '<plist version="1.0">\n';
345 - plist += ' <dict>\n';
346 - plist += ' <key>Label</key>\n';
347 - plist += (' <string>' + options.name + '</string>\n');
348 - plist += (params + '\n');
349 - plist += ' <key>WorkingDirectory</key>\n';
350 - plist += (' <string>/usr/local/mesh_services/' + options.name + '</string>\n');
351 - plist += (stdoutpath + '\n');
352 - plist += ' <key>RunAtLoad</key>\n';
353 - plist += (autoStart + '\n');
354 - plist += ' </dict>\n';
355 - plist += '</plist>';
356 -
357 - if (!require('fs').existsSync('/usr/local/mesh_services')) { require('fs').mkdirSync('/usr/local/mesh_services'); }
358 - if (!require('fs').existsSync('/Library/LaunchDaemons/' + options.name + '.plist'))
359 - {
360 - if (!require('fs').existsSync('/usr/local/mesh_services/' + options.name)) { require('fs').mkdirSync('/usr/local/mesh_services/' + options.name); }
361 - if (options.binary)
362 - {
363 - require('fs').writeFileSync('/usr/local/mesh_services/' + options.name + '/' + options.name, options.binary);
364 - }
365 - else
366 - {
367 - require('fs').copyFileSync(options.servicePath, '/usr/local/mesh_services/' + options.name + '/' + options.name);
368 - }
369 - require('fs').writeFileSync('/Library/LaunchDaemons/' + options.name + '.plist', plist);
370 - var m = require('fs').statSync('/usr/local/mesh_services/' + options.name + '/' + options.name).mode;
371 - m |= (require('fs').CHMOD_MODES.S_IXUSR | require('fs').CHMOD_MODES.S_IXGRP);
372 - require('fs').chmodSync('/usr/local/mesh_services/' + options.name + '/' + options.name, m);
373 - }
374 - else
375 - {
376 - throw ('Service: ' + options.name + ' already exists');
377 - }
378 - }
379 - }
380 - this.uninstallService = function uninstallService(name)
381 - {
382 - if (!this.isAdmin()) { throw ('Uninstalling a service, requires admin'); }
383 -
384 - if (typeof (name) == 'object') { name = name.name; }
385 - if (process.platform == 'win32')
386 - {
387 - var service = this.getService(name);
388 - if (service.status.state == undefined || service.status.state == 'STOPPED')
389 - {
390 - if (this.proxy.DeleteService(service._service) == 0)
391 - {
392 - throw ('Uninstall Service for: ' + name + ', failed with error: ' + this.proxy2.GetLastError());
393 - }
394 - else
395 - {
396 - try
397 - {
398 - require('fs').unlinkSync(this.getServiceFolder() + '\\' + name + '.exe');
399 - }
400 - catch(e)
401 - {
402 - }
403 - }
404 - }
405 - else
406 - {
407 - throw ('Cannot uninstall service: ' + name + ', because it is: ' + service.status.state);
408 - }
409 - }
410 - else if(process.platform == 'linux')
411 - {
412 - switch (this.getServiceType())
413 - {
414 - case 'init':
415 - this._update = require('child_process').execFile('/bin/sh', ['sh'], { type: require('child_process').SpawnTypes.TERM });
416 - this._update.stdout.on('data', function (chunk) { });
417 - this._update.stdin.write('service ' + name + ' stop\n');
418 - this._update.stdin.write('update-rc.d -f ' + name + ' remove\n');
419 - this._update.stdin.write('exit\n');
420 - this._update.waitExit();
421 - try
422 - {
423 - require('fs').unlinkSync('/etc/init.d/' + name);
424 - console.log(name + ' uninstalled');
425 -
426 - }
427 - catch (e)
428 - {
429 - console.log(name + ' could not be uninstalled', e)
430 - }
431 - break;
432 - case 'systemd':
433 - this._update = require('child_process').execFile('/bin/sh', ['sh'], { type: require('child_process').SpawnTypes.TERM });
434 - this._update.stdout.on('data', function (chunk) { });
435 - this._update.stdin.write('systemctl stop ' + name + '.service\n');
436 - this._update.stdin.write('systemctl disable ' + name + '.service\n');
437 - this._update.stdin.write('exit\n');
438 - this._update.waitExit();
439 - try
440 - {
441 - require('fs').unlinkSync('/usr/local/mesh/' + name);
442 - require('fs').unlinkSync('/lib/systemd/system/' + name + '.service');
443 - console.log(name + ' uninstalled');
444 - }
445 - catch (e)
446 - {
447 - console.log(name + ' could not be uninstalled', e)
448 - }
449 - break;
450 - default: // unknown platform service type
451 - break;
452 - }
453 - }
454 - else if(process.platform == 'darwin')
455 - {
456 - if (require('fs').existsSync('/Library/LaunchDaemons/' + name + '.plist'))
457 - {
458 - var child = require('child_process').execFile('/bin/sh', ['sh']);
459 - child.stdout.on('data', function (chunk) { });
460 - child.stdin.write('launchctl stop ' + name + '\n');
461 - child.stdin.write('launchctl unload /Library/LaunchDaemons/' + name + '.plist\n');
462 - child.stdin.write('exit\n');
463 - child.waitExit();
464 -
465 - try
466 - {
467 - require('fs').unlinkSync('/usr/local/mesh_services/' + name + '/' + name);
468 - require('fs').unlinkSync('/Library/LaunchDaemons/' + name + '.plist');
469 - }
470 - catch(e)
471 - {
472 - throw ('Error uninstalling service: ' + name + ' => ' + e);
473 - }
474 -
475 - try
476 - {
477 - require('fs').rmdirSync('/usr/local/mesh_services/' + name);
478 - }
479 - catch(e)
480 - {}
481 - }
482 - else
483 - {
484 - throw ('Service: ' + name + ' does not exist');
485 - }
486 - }
487 - }
488 - if(process.platform == 'linux')
489 - {
490 - this.getServiceType = function getServiceType()
491 - {
492 - return (require('process-manager').getProcessInfo(1).Name);
493 - };
494 - }
495 -}
496 -
497 -module.exports = serviceManager;
\ No newline at end of file
agents/modules_meshcmd_min/service-host.min.js deleted
-1
@@ -1 +0,0 @@
1 -var SERVICE_WIN32=16|32;var SERVICE_STATE={STOPPED:1,SERVICE_START_PENDING:2,SERVICE_STOP_PENDING:3,RUNNING:4};var SERVICE_ACCEPT={SERVICE_ACCEPT_STOP:1,SERVICE_ACCEPT_SHUTDOWN:4,SERVICE_ACCEPT_POWEREVENT:64,SERVICE_ACCEPT_SESSIONCHANGE:128};var SERVICE_CONTROL={SERVICE_CONTROL_SHUTDOWN:5,SERVICE_CONTROL_STOP:1,SERVICE_CONTROL_POWEREVENT:13,SERVICE_CONTROL_SESSIONCHANGE:14};var SESSION_CHANGE_TYPE={WTS_CONSOLE_CONNECT:1,WTS_CONSOLE_DISCONNECT:2,WTS_REMOTE_CONNECT:3,WTS_REMOTE_DISCONNECT:4,WTS_SESSION_LOGON:5,WTS_SESSION_LOGOFF:6,WTS_SESSION_LOCK:7,WTS_SESSION_UNLOCK:8,WTS_SESSION_REMOTE_CONTROL:9,WTS_SESSION_CREATE:10,WTS_SESSION_TERMINATE:11};var NO_ERROR=0;var serviceManager=require("service-manager");function serviceHost(e){this._ObjectID="service-host";var a=require("events").inherits(this);a.createEvent("serviceStart");a.createEvent("serviceStop");a.createEvent("normalStart");a.createEvent("session");a.createEvent("powerStateChange");if(process.platform=="win32"){this.GM=require("_GenericMarshal");this.Advapi=this.GM.CreateNativeProxy("Advapi32.dll");this.Advapi.CreateMethod({method:"StartServiceCtrlDispatcherA",threadDispatch:1});this.Advapi.CreateMethod("RegisterServiceCtrlHandlerExA");this.Advapi.CreateMethod("SetServiceStatus");this.Kernel32=this.GM.CreateNativeProxy("Kernel32.dll");this.Kernel32.CreateMethod("GetLastError");this.Ole32=this.GM.CreateNativeProxy("Ole32.dll");this.Ole32.CreateMethod("CoInitializeEx");this.Ole32.CreateMethod("CoUninitialize");this._ServiceName=this.GM.CreateVariable(typeof(e)=="string"?e:e.name);this._ServiceMain=this.GM.GetGenericGlobalCallback(2);this._ServiceMain.Parent=this;this._ServiceMain.GM=this.GM;this._ServiceMain.on("GlobalCallback",function b(f,g){this.Parent._ServiceStatus=this.GM.CreateVariable(28);this.Parent._ServiceStatus.toBuffer().writeUInt32LE(SERVICE_WIN32);this.Parent._ServiceStatus.toBuffer().writeUInt32LE(SERVICE_STATE.SERVICE_STOPPED,4);this.Parent._ServiceStatusHandle=this.Parent.Advapi.RegisterServiceCtrlHandlerExA(this.Parent._ServiceName,this.Parent._ServiceControlHandler,this.Parent.GM.StashObject(this.Parent._ServiceControlHandler));if(this.Parent._ServiceStatusHandle.Val==0){process.exit(1)}this.Parent._ServiceStatus.toBuffer().writeUInt32LE(SERVICE_STATE.SERVICE_START_PENDING,4);this.Parent.Advapi.SetServiceStatus(this.Parent._ServiceStatusHandle,this.Parent._ServiceStatus);this.Parent._ServiceStatus.toBuffer().writeUInt32LE(SERVICE_STATE.RUNNING,4);this.Parent._ServiceStatus.toBuffer().writeUInt32LE(SERVICE_ACCEPT.SERVICE_ACCEPT_STOP|SERVICE_ACCEPT.SERVICE_ACCEPT_POWEREVENT|SERVICE_ACCEPT.SERVICE_ACCEPT_SESSIONCHANGE,8);this.Parent.Advapi.SetServiceStatus(this.Parent._ServiceStatusHandle,this.Parent._ServiceStatus);this.Parent.Ole32.CoInitializeEx(0,2);this.Parent.on("~",function h(){var j=require("_GenericMarshal");var i=j.CreateNativeProxy("Advapi32.dll");i.CreateMethod("SetServiceStatus");Kernel32=this.GM.CreateNativeProxy("Kernel32.dll");Kernel32.CreateMethod("GetLastError");var k=j.CreateVariable(28);k.toBuffer().writeUInt32LE(SERVICE_WIN32);k.toBuffer().writeUInt32LE(1,4);k.toBuffer().writeUInt32LE(0,8);i.SetServiceStatus(this._ServiceStatusHandle,k);this.Ole32.CoUninitialize()});this.Parent.emit("serviceStart")});this._ServiceControlHandler=this.GM.GetGenericGlobalCallback(4);this._ServiceControlHandler.Parent=this;this._ServiceControlHandler.GM=this.GM;this._ServiceControlHandler.on("GlobalCallback",function c(f,i,h,g){var k=this.Parent.GM.UnstashObject(g);if(k!=null&&k==this){switch(f.Val){case SERVICE_CONTROL.SERVICE_CONTROL_SHUTDOWN:case SERVICE_CONTROL.SERVICE_CONTROL_STOP:this.Parent.emit("serviceStop");return;case SERVICE_CONTROL.SERVICE_CONTROL_SESSIONCHANGE:var l=h.Deref(4,4).toBuffer().readUInt32LE();switch(i.Val){case SESSION_CHANGE_TYPE.WTS_SESSION_LOGON:case SESSION_CHANGE_TYPE.WTS_SESSION_LOGOFF:require("user-sessions").emit("changed");break}break;default:break}this.Parent.Advapi.SetServiceStatus(this.Parent._ServiceStatusHandle,this.Parent._ServiceStatus)}})}if(e){this._ServiceOptions=typeof(e)=="object"?e:{name:e}}else{throw ("Must specify either ServiceName or Options")}if(!this._ServiceOptions.servicePath){this._ServiceOptions.servicePath=process.execPath}this.run=function d(){var r=0;for(var h=0;h<process.argv.length;++h){switch(process.argv[h]){case"-install":if(!this._svcManager){this._svcManager=new serviceManager()}try{this._svcManager.installService(this._ServiceOptions)}catch(g){console.log(g);process.exit()}console.log(this._ServiceOptions.name+" installed");process.exit();break;case"-uninstall":if(!this._svcManager){this._svcManager=new serviceManager()}try{this._svcManager.uninstallService(this._ServiceOptions)}catch(g){console.log(g);process.exit()}if(process.platform=="win32"||process.platform=="darwin"){console.log(this._ServiceOptions.name+" uninstalled");process.exit()}h=process.argv.length;r=1;break;case"start":case"-d":if(process.platform!="win32"){break}if(!this._svcManager){this._svcManager=new serviceManager()}this._svcManager.getService(this._ServiceOptions.name).start();console.log(this._ServiceOptions.name+" starting...");process.exit();break;case"stop":case"-s":if(process.platform!="win32"){break}if(!this._svcManager){this._svcManager=new serviceManager()}this._svcManager.getService(this._ServiceOptions.name).stop();console.log(this._ServiceOptions.name+" stopping...");process.exit();break}}if(process.platform=="win32"){var s=this.GM.CreateVariable(4*this.GM.PointerSize);this._ServiceName.pointerBuffer().copy(s.toBuffer());this._ServiceMain.pointerBuffer().copy(s.toBuffer(),this.GM.PointerSize);this._sscd=this.Advapi.StartServiceCtrlDispatcherA(s);this._sscd.parent=this;this._sscd.on("done",function m(i){if(i.Val==0){this.parent.emit("normalStart")}});return}else{if(process.platform=="linux"){var k=this._ServiceOptions?this._ServiceOptions.name:process.execPath.substring(1+process.execPath.lastIndexOf("/"));for(var h=0;h<process.argv.length;++h){switch(process.argv[h]){case"start":case"-d":var f=require("child_process").execFile(process.execPath,[k],{type:require("child_process").SpawnTypes.DETACHED});var q=null;try{q=require("fs").createWriteStream("/var/run/"+k+".pid",{flags:"w"})}catch(g){}if(q==null){q=require("fs").createWriteStream("."+k+".pid",{flags:"w"})}q.end(f.pid.toString());console.log(k+" started!");process.exit();break;case"stop":case"-s":var o=null;try{o=parseInt(require("fs").readFileSync("/var/run/"+k+".pid",{flags:"r"}));require("fs").unlinkSync("/var/run/"+k+".pid")}catch(g){}if(o==null){try{o=parseInt(require("fs").readFileSync("."+k+".pid",{flags:"r"}));require("fs").unlinkSync("."+k+".pid")}catch(g){}}if(o){process.kill(o);console.log(k+" stopped")}else{console.log(k+" not running")}process.exit();break}}if(r==0){var o=null;try{o=parseInt(require("fs").readFileSync("/var/run/"+k+".pid",{flags:"r"}))}catch(g){}if(o==null){try{o=parseInt(require("fs").readFileSync("."+k+".pid",{flags:"r"}))}catch(g){}}if(o!=null&&o==process.pid){this.emit("serviceStart")}else{if(require("process-manager").getProcessInfo(1).Name=="systemd"){this._checkpid=require("child_process").execFile("/bin/sh",["sh"],{type:require("child_process").SpawnTypes.TERM});this._checkpid.result="";this._checkpid.parent=this;this._checkpid.on("exit",function l(){var i=this.result.split("\r\n");for(h in i){if(i[h].startsWith(" Main PID:")){var p=i[h].split(" ");if(parseInt(p[3])==process.pid){this.parent.emit("serviceStart")}else{this.parent.emit("normalStart")}delete this.parent._checkpid;return}}this.parent.emit("normalStart");delete this.parent._checkpid});this._checkpid.stdout.on("data",function(i){this.parent.result+=i.toString()});this._checkpid.stdin.write("systemctl status "+k+" | grep 'Main PID:'\n");this._checkpid.stdin.write("exit\n")}else{this.emit("normalStart")}}}}else{if(process.platform=="darwin"){var f=require("child_process").execFile("/bin/sh",["sh"]);f.stdout.str="";f.stdout.on("data",function(i){this.str+=i.toString()});f.stdin.write("launchctl list\nexit\n");f.waitExit();var j=f.stdout.str.split("\n");var t,h;var n={};for(h=1;h<j.length;++h){t=j[h].split("\t");if(t[0]&&t[0]!="-"){n[t[0]]=t[0]}}if(n[process.pid.toString()]){this.emit("serviceStart")}else{this.emit("normalStart")}}}}}}module.exports=serviceHost;
\ No newline at end of file
agents/modules_meshcmd_min/service-manager.min.js deleted
-1
@@ -1 +0,0 @@
1 -function parseServiceStatus(d){var b={};var c=d.Deref(0,4).IntVal;b.isFileSystemDriver=((c&2)==2);b.isKernelDriver=((c&1)==1);b.isSharedProcess=((c&32)==32);b.isOwnProcess=((c&16)==16);b.isInteractive=((c&256)==256);switch(d.Deref((1*4),4).toBuffer().readUInt32LE()){case 5:b.state="CONTINUE_PENDING";break;case 6:b.state="PAUSE_PENDING";break;case 7:b.state="PAUSED";break;case 4:b.state="RUNNING";break;case 2:b.state="START_PENDING";break;case 3:b.state="STOP_PENDING";break;case 1:b.state="STOPPED";break}var a=d.Deref((2*4),4).toBuffer().readUInt32LE();b.controlsAccepted=[];if((a&16)==16){b.controlsAccepted.push("SERVICE_CONTROL_NETBINDADD");b.controlsAccepted.push("SERVICE_CONTROL_NETBINDREMOVE");b.controlsAccepted.push("SERVICE_CONTROL_NETBINDENABLE");b.controlsAccepted.push("SERVICE_CONTROL_NETBINDDISABLE")}if((a&8)==8){b.controlsAccepted.push("SERVICE_CONTROL_PARAMCHANGE")}if((a&2)==2){b.controlsAccepted.push("SERVICE_CONTROL_PAUSE");b.controlsAccepted.push("SERVICE_CONTROL_CONTINUE")}if((a&256)==256){b.controlsAccepted.push("SERVICE_CONTROL_PRESHUTDOWN")}if((a&4)==4){b.controlsAccepted.push("SERVICE_CONTROL_SHUTDOWN")}if((a&1)==1){b.controlsAccepted.push("SERVICE_CONTROL_STOP")}if((a&32)==32){b.controlsAccepted.push("SERVICE_CONTROL_HARDWAREPROFILECHANGE")}if((a&64)==64){b.controlsAccepted.push("SERVICE_CONTROL_POWEREVENT")}if((a&128)==128){b.controlsAccepted.push("SERVICE_CONTROL_SESSIONCHANGE")}b.pid=d.Deref((7*4),4).toBuffer().readUInt32LE();return(b)}function serviceManager(){this._ObjectID="service-manager";if(process.platform=="win32"){this.GM=require("_GenericMarshal");this.proxy=this.GM.CreateNativeProxy("Advapi32.dll");this.proxy.CreateMethod("OpenSCManagerA");this.proxy.CreateMethod("EnumServicesStatusExA");this.proxy.CreateMethod("OpenServiceA");this.proxy.CreateMethod("QueryServiceStatusEx");this.proxy.CreateMethod("ControlService");this.proxy.CreateMethod("StartServiceA");this.proxy.CreateMethod("CloseServiceHandle");this.proxy.CreateMethod("CreateServiceA");this.proxy.CreateMethod("ChangeServiceConfig2A");this.proxy.CreateMethod("DeleteService");this.proxy.CreateMethod("AllocateAndInitializeSid");this.proxy.CreateMethod("CheckTokenMembership");this.proxy.CreateMethod("FreeSid");this.proxy2=this.GM.CreateNativeProxy("Kernel32.dll");this.proxy2.CreateMethod("GetLastError");this.isAdmin=function e(){var j=this.GM.CreateVariable(6);j.toBuffer().writeInt8(5,5);var h=this.GM.CreatePointer();var g=false;if(this.proxy.AllocateAndInitializeSid(j,2,32,544,0,0,0,0,0,0,h).Val!=0){var i=this.GM.CreateInteger();if(this.proxy.CheckTokenMembership(0,h.Deref(),i).Val!=0){if(i.toBuffer().readUInt32LE()!=0){g=true}}this.proxy.FreeSid(h.Deref())}return g};this.getProgramFolder=function a(){if(require("os").arch()=="x64"){if(this.GM.PointerSize==4){return process.env["ProgramFiles(x86)"]}return process.env.ProgramFiles}return process.env.ProgramFiles};this.getServiceFolder=function b(){return this.getProgramFolder()+"\\mesh"};this.enumerateService=function(){var o=this.GM.CreatePointer();var k=this.GM.CreatePointer();var l=this.proxy.OpenSCManagerA(0,0,1|4);var h=this.GM.CreatePointer();var t=this.GM.CreatePointer();var q=this.GM.CreatePointer();var u=this.proxy.EnumServicesStatusExA(l,0,48,3,0,0,h,t,q,0);if(h.IntVal<=0){throw ("error enumerating services")}var v=h.IntVal;var s=this.GM.CreateVariable(v);this.proxy.EnumServicesStatusExA(l,0,48,3,s,v,h,t,q,0);console.log("servicesReturned",t.IntVal);var p=k._size;var g=36+(2*p);g+=((p-(g%p))%p);var r=[];for(var m=0;m<t.IntVal;++m){var w=s.Deref(m*g,g);var n={};n.name=w.Deref(0,p).Deref().String;n.displayName=w.Deref(p,p).Deref().String;n.status=parseServiceStatus(w.Deref(2*p,36));r.push(n)}this.proxy.CloseServiceHandle(l);return(r)};this.getService=function(k){var m=this.GM.CreateVariable(k);var l=this.GM.CreatePointer();var g=this.GM.CreateVariable(l._size);var j=this.proxy.OpenSCManagerA(0,0,1|4|32|16);if(j.Val==0){throw ("could not open ServiceManager")}var i=this.proxy.OpenServiceA(j,m,4|32|16|65536);if(i.Val!=0){var o=this.proxy.QueryServiceStatusEx(i,0,0,0,g);var n=this.GM.CreateVariable(g.toBuffer().readUInt32LE());o=this.proxy.QueryServiceStatusEx(i,0,n,n._size,g);if(o!=0){retVal={};retVal.status=parseServiceStatus(n);retVal._scm=j;retVal._service=i;retVal._GM=this.GM;retVal._proxy=this.proxy;require("events").inherits(retVal);retVal.on("~",function(){this._proxy.CloseServiceHandle(this);this._proxy.CloseServiceHandle(this._scm)});retVal.name=k;retVal.stop=function(){if(this.status.state=="RUNNING"){var h=this._GM.CreateVariable(36);var p=this._proxy.ControlService(this._service,1,h);if(p==0){throw (this.name+".stop() failed")}}else{throw ("cannot call "+this.name+".stop(), when current state is: "+this.status.state)}};retVal.start=function(){if(this.status.state=="STOPPED"){var h=this._proxy.StartServiceA(this._service,0,0);if(h==0){throw (this.name+".start() failed")}}else{throw ("cannot call "+this.name+".start(), when current state is: "+this.status.state)}};return(retVal)}else{}}this.proxy.CloseServiceHandle(j);throw ("could not find service: "+k)}}else{this.isAdmin=function e(){return(require("user-sessions").isRoot())}}this.installService=function d(r){if(process.platform=="win32"){if(!this.isAdmin()){throw ("Installing as Service, requires admin")}var l=this.getServiceFolder();if(!require("fs").existsSync(l)){require("fs").mkdirSync(l)}require("fs").copyFileSync(r.servicePath,l+"\\"+r.name+".exe");r.servicePath=l+"\\"+r.name+".exe";var w=this.GM.CreateVariable('"'+r.servicePath+'"');var o=this.proxy.OpenSCManagerA(0,0,2);if(o.Val==0){throw ("error opening SCManager")}var v=this.GM.CreateVariable(r.name);var j=this.GM.CreateVariable(r.name);var g=983551;var x;switch(r.startType){case"BOOT_START":x=0;break;case"SYSTEM_START":x=1;break;case"AUTO_START":x=2;break;case"DEMAND_START":x=3;break;default:x=4;break}var n=this.proxy.CreateServiceA(o,v,j,g,16|256,x,0,w,0,0,0,0,0);if(n.Val==0){this.proxy.CloseServiceHandle(o);throw ("Error Creating Service: "+this.proxy2.GetLastError().Val)}if(r.description){console.log(r.description);var k=this.GM.CreatePointer();k.Val=this.GM.CreateVariable(r.description);if(this.proxy.ChangeServiceConfig2A(n,1,k)==0){this.proxy.CloseServiceHandle(n);this.proxy.CloseServiceHandle(o);throw ("Unable to set description")}}this.proxy.CloseServiceHandle(n);this.proxy.CloseServiceHandle(o);return(this.getService(r.name))}if(process.platform=="linux"){if(!this.isAdmin()){throw ("Installing as Service, requires root")}switch(this.getServiceType()){case"init":require("fs").copyFileSync(r.servicePath,"/etc/init.d/"+r.name);console.log("copying "+r.servicePath);var q=require("fs").statSync("/etc/init.d/"+r.name).mode;q|=(require("fs").CHMOD_MODES.S_IXUSR|require("fs").CHMOD_MODES.S_IXGRP);require("fs").chmodSync("/etc/init.d/"+r.name,q);this._update=require("child_process").execFile("/bin/sh",["sh"],{type:require("child_process").SpawnTypes.TERM});this._update._moduleName=r.name;this._update.stdout.on("data",function(h){});this._update.stdin.write("update-rc.d "+r.name+" defaults\n");this._update.stdin.write("exit\n");this._update.waitExit();break;case"systemd":var u=r.description?r.description:"MeshCentral Agent";if(!require("fs").existsSync("/usr/local/mesh")){require("fs").mkdirSync("/usr/local/mesh")}require("fs").copyFileSync(r.servicePath,"/usr/local/mesh/"+r.name);var q=require("fs").statSync("/usr/local/mesh/"+r.name).mode;q|=(require("fs").CHMOD_MODES.S_IXUSR|require("fs").CHMOD_MODES.S_IXGRP);require("fs").chmodSync("/usr/local/mesh/"+r.name,q);require("fs").writeFileSync("/lib/systemd/system/"+r.name+".service","[Unit]\nDescription="+u+"\n[Service]\nExecStart=/usr/local/mesh/"+r.name+"\nStandardOutput=null\nRestart=always\nRestartSec=3\n[Install]\nWantedBy=multi-user.target\nAlias="+r.name+".service\n",{flags:"w"});this._update=require("child_process").execFile("/bin/sh",["sh"],{type:require("child_process").SpawnTypes.TERM});this._update._moduleName=r.name;this._update.stdout.on("data",function(h){});this._update.stdin.write("systemctl enable "+r.name+".service\n");this._update.stdin.write("exit\n");this._update.waitExit();break;default:break}}if(process.platform=="darwin"){if(!this.isAdmin()){throw ("Installing as Service, requires root")}var y=(r.stdout?("<key>StandardOutPath</key>\n<string>"+r.stdout+"</string>"):"");var i=(r.startType=="AUTO_START"?"<true/>":"<false/>");var s=" <key>ProgramArguments</key>\n";s+=" <array>\n";s+=(" <string>/usr/local/mesh_services/"+r.name+"/"+r.name+"</string>\n");if(r.parameters){for(var p in r.parameters){s+=(" <string>"+r.parameters[p]+"</string>\n")}}s+=" </array>\n";var t='<?xml version="1.0" encoding="UTF-8"?>\n';t+='<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">\n';t+='<plist version="1.0">\n';t+=" <dict>\n";t+=" <key>Label</key>\n";t+=(" <string>"+r.name+"</string>\n");t+=(s+"\n");t+=" <key>WorkingDirectory</key>\n";t+=(" <string>/usr/local/mesh_services/"+r.name+"</string>\n");t+=(y+"\n");t+=" <key>RunAtLoad</key>\n";t+=(i+"\n");t+=" </dict>\n";t+="</plist>";if(!require("fs").existsSync("/usr/local/mesh_services")){require("fs").mkdirSync("/usr/local/mesh_services")}if(!require("fs").existsSync("/Library/LaunchDaemons/"+r.name+".plist")){if(!require("fs").existsSync("/usr/local/mesh_services/"+r.name)){require("fs").mkdirSync("/usr/local/mesh_services/"+r.name)}if(r.binary){require("fs").writeFileSync("/usr/local/mesh_services/"+r.name+"/"+r.name,r.binary)}else{require("fs").copyFileSync(r.servicePath,"/usr/local/mesh_services/"+r.name+"/"+r.name)}require("fs").writeFileSync("/Library/LaunchDaemons/"+r.name+".plist",t);var q=require("fs").statSync("/usr/local/mesh_services/"+r.name+"/"+r.name).mode;q|=(require("fs").CHMOD_MODES.S_IXUSR|require("fs").CHMOD_MODES.S_IXGRP);require("fs").chmodSync("/usr/local/mesh_services/"+r.name+"/"+r.name,q)}else{throw ("Service: "+r.name+" already exists")}}};this.uninstallService=function f(i){if(!this.isAdmin()){throw ("Uninstalling a service, requires admin")}if(typeof(i)=="object"){i=i.name}if(process.platform=="win32"){var j=this.getService(i);if(j.status.state==undefined||j.status.state=="STOPPED"){if(this.proxy.DeleteService(j._service)==0){throw ("Uninstall Service for: "+i+", failed with error: "+this.proxy2.GetLastError())}else{try{require("fs").unlinkSync(this.getServiceFolder()+"\\"+i+".exe")}catch(h){}}}else{throw ("Cannot uninstall service: "+i+", because it is: "+j.status.state)}}else{if(process.platform=="linux"){switch(this.getServiceType()){case"init":this._update=require("child_process").execFile("/bin/sh",["sh"],{type:require("child_process").SpawnTypes.TERM});this._update.stdout.on("data",function(k){});this._update.stdin.write("service "+i+" stop\n");this._update.stdin.write("update-rc.d -f "+i+" remove\n");this._update.stdin.write("exit\n");this._update.waitExit();try{require("fs").unlinkSync("/etc/init.d/"+i);console.log(i+" uninstalled")}catch(h){console.log(i+" could not be uninstalled",h)}break;case"systemd":this._update=require("child_process").execFile("/bin/sh",["sh"],{type:require("child_process").SpawnTypes.TERM});this._update.stdout.on("data",function(k){});this._update.stdin.write("systemctl stop "+i+".service\n");this._update.stdin.write("systemctl disable "+i+".service\n");this._update.stdin.write("exit\n");this._update.waitExit();try{require("fs").unlinkSync("/usr/local/mesh/"+i);require("fs").unlinkSync("/lib/systemd/system/"+i+".service");console.log(i+" uninstalled")}catch(h){console.log(i+" could not be uninstalled",h)}break;default:break}}else{if(process.platform=="darwin"){if(require("fs").existsSync("/Library/LaunchDaemons/"+i+".plist")){var g=require("child_process").execFile("/bin/sh",["sh"]);g.stdout.on("data",function(k){});g.stdin.write("launchctl stop "+i+"\n");g.stdin.write("launchctl unload /Library/LaunchDaemons/"+i+".plist\n");g.stdin.write("exit\n");g.waitExit();try{require("fs").unlinkSync("/usr/local/mesh_services/"+i+"/"+i);require("fs").unlinkSync("/Library/LaunchDaemons/"+i+".plist")}catch(h){throw ("Error uninstalling service: "+i+" => "+h)}try{require("fs").rmdirSync("/usr/local/mesh_services/"+i)}catch(h){}}else{throw ("Service: "+i+" does not exist")}}}}};if(process.platform=="linux"){this.getServiceType=function c(){return(require("process-manager").getProcessInfo(1).Name)}}}module.exports=serviceManager;
\ No newline at end of file
package.json
+1 -1
@@ -1,6 +1,6 @@
1 {
2 "name": "meshcentral",
3 - "version": "0.4.3-a",
3 + "version": "0.4.3-c",
4 "keywords": [
5 "Remote Management",
6 "Intel AMT",
public/minify.bat new
+3
@@ -0,0 +1,3 @@
1 +@ECHO OFF
2 +CD ..\translate
3 +C:\Users\Default.DESKTOP-M9I88C9\AppData\Roaming\nvm\v12.13.0\node translate.js minifyall
\ No newline at end of file
public/player-min.htm
+1 -1
@@ -1 +1 @@
1 -<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><script src=scripts/agent-desktop-0.0.2.js></script><script src=scripts/amt-desktop-0.0.2.js></script><script src=scripts/amt-terminal-0.0.2.js></script><script src=scripts/zlib.js></script><script src=scripts/zlib-inflate.js></script><script src=scripts/zlib-adler32.js></script><script src=scripts/zlib-crc32.js></script><body style=overflow:hidden;background-color:#000><div id=p11 class=noselect style=overflow:hidden><div id=deskarea0><div id=deskarea1 class=areaHead><div class=toright2><div class=deskareaicon title="Toggle View Mode"onclick=toggleAspectRatio(1)>&#8690;</div></div><div><input id=OpenFileButton type=button value="Open File..."onclick=openfile()><span id=deskstatus></span></div></div><div id=deskarea2><div class=areaProgress><div id=progressbar></div></div></div><div id=deskarea3x style="max-height:calc(100vh - 54px);height:calc(100vh - 54px)"onclick=togglePause()><div id=bigok style="display:none;left:calc((100vh / 2))"><b>&checkmark;</b></div><div id=bigfail style="display:none;left:calc((100vh / 2))"><b>&#10007;</b></div><div id=metadatadiv style=padding:20px;color:#d3d3d3;text-align:left;display:none></div><div id=DeskParent><canvas id=Desk width=640 height=480></canvas></div><div id=TermParent style=display:none><pre id=Term></pre></div><div id=p11DeskConsoleMsg style=display:none;cursor:pointer;position:absolute;left:30px;top:17px;color:#ff0;background-color:rgba(0,0,0,.6);padding:10px;border-radius:5px onclick=clearConsoleMsg()></div></div><div id=deskarea4 class=areaFoot><div class=toright2><div id=timespan style=padding-top:4px;padding-right:4px>00:00:00</div></div><div>&nbsp; <input id=PlayButton type=button value=Play disabled onclick=play()> <input id=PauseButton type=button value=Pause disabled onclick=pause()> <input id=RestartButton type=button value=Restart disabled onclick=restart()><select id=PlaySpeed onchange=this.blur()><option value=4>1/4 Speed<option value=2>1/2 Speed<option value=1 selected>Normal Speed<option value=0.5>2x Speed<option value=0.25>4x Speed<option value=0.1>10x Speed</select></div></div></div><div id=dialog class=noselect style=display:none><div id=dialogHeader><div tabindex=0 id=id_dialogclose onclick=setDialogMode() onkeypress='"Enter"==event.key&&setDialogMode()'>&#x2716;</div><div id=id_dialogtitle></div></div><div id=dialogBody><div id=dialog1><div id=id_dialogMessage></div></div><div id=dialog2><div id=id_dialogOptions></div></div></div><div id=idx_dlgButtonBar><input id=idx_dlgCancelButton type=button value=Cancel onclick=dialogclose(0)> <input id=idx_dlgOkButton type=button value=OK onclick=dialogclose(1)><div><input id=idx_dlgDeleteButton type=button value=Delete style=display:none onclick=dialogclose(2)></div></div></div></div><script>var recFile=null,recFilePtr=0,recFileStartTime=0,recFileLastTime=0,recFileEndTime=0,recFileMetadata=null,recFileProtocol=0,agentDesktop=null,amtDesktop=null,playing=!1,readState=0,waitTimer=null,waitTimerArgs=null,deskAspectRatio=0,currentDeltaTimeTotalSec=0;function start(){window.onresize=deskAdjust,document.ondrop=ondrop,document.ondragover=ondragover,document.ondragleave=ondragleave,document.onkeypress=onkeypress,Q("PlaySpeed").value=1,cleanup()}function readNextBlock(l){if(recFilePtr+16>recFile.size)QS("progressbar").width="100%",l(-1);else{var e=new FileReader;e.onload=function(){var e=ReadShort(this.result,0),t=ReadShort(this.result,2),a=ReadInt(this.result,4),r=(ReadInt(this.result,8)<<32)+ReadInt(this.result,12);if(recFilePtr+16+a>recFile.size)QS("progressbar").width="100%",l(-1);else{var i=new FileReader;i.onload=function(){recFilePtr+=16+a,QS("progressbar").width=0==recFileEndTime?Math.floor(recFilePtr/recFile.size*100)+"%":Math.floor((recFileLastTime-recFileStartTime)/(recFileEndTime-recFileStartTime)*100)+"%",l(e,t,r,this.result)},i.readAsBinaryString(recFile.slice(recFilePtr+16,recFilePtr+16+a))}},e.readAsBinaryString(recFile.slice(recFilePtr,recFilePtr+16))}}function readLastBlock(i){if(recFile.size<32)i(-1);else{var e=new FileReader;e.onload=function(){var e=ReadShort(this.result,0),t=ReadShort(this.result,2),a=ReadInt(this.result,4),r=(ReadInt(this.result,8)<<32)+ReadInt(this.result,12);3==e&&16==a&&"MeshCentralMCREC"==this.result.substring(16,32)?i(e,t,r):i(-1)},e.readAsBinaryString(recFile.slice(recFile.size-32,recFile.size))}}function addInfo(e,t){return null==t?"":addInfoNoEsc(e,EscapeHtml(t))}function addInfoNoEsc(e,t){return null==t?"":"<span style=color:gray>"+EscapeHtml(e)+"</span>:&nbsp;<span style=font-size:20px>"+t+"</span><br/>"}function processFirstBlock(e,t,a,r){if(recFileProtocol=0,1==e&&0==t){try{recFileMetadata=JSON.parse(r)}catch(e){return void cleanup()}if(null!=recFileMetadata&&"MeshCentralRelaySession"==recFileMetadata.magic&&1==recFileMetadata.ver){var i="";if(i+=addInfo("Time",recFileMetadata.time),0!=recFileEndTime){var l=Math.floor((recFileEndTime-a)/1e3);i+=addInfo("Duration",format("{0} second{1}",l,1<l?"s":""))}if(i+=addInfo("Username",recFileMetadata.username),i+=addInfo("UserID",recFileMetadata.userid),i+=addInfo("SessionID",recFileMetadata.sessionid),recFileMetadata.ipaddr1&&recFileMetadata.ipaddr2&&(i+=addInfo("Addresses",format("{0} to {1}",recFileMetadata.ipaddr1,recFileMetadata.ipaddr2))),recFileMetadata.devicename&&(i+=addInfo("DeviceName",recFileMetadata.devicename)),i+=addInfo("NodeID",recFileMetadata.nodeid),recFileMetadata.protocol){var n=recFileMetadata.protocol;1==n?n="MeshCentral Terminal":2==n?n="MeshCentral Desktop":100==n?n="Intel&reg; AMT WSMAN":101==n&&(n="Intel&reg; AMT Redirection"),i+=addInfoNoEsc("Protocol",n)}QV("DeskParent",!0),QV("TermParent",!1),1==recFileMetadata.protocol?(recFileProtocol=1,i+="<br /><br /><span style=color:gray>Press [space] to play/pause.</span>",QE("PlayButton",!0),QE("PauseButton",!1),QE("RestartButton",!1),recFileStartTime=recFileLastTime=a):2==recFileMetadata.protocol?(recFileProtocol=2,i+="<br /><br /><span style=color:gray>Press [space] to play/pause.</span>",QE("PlayButton",!0),QE("PauseButton",!1),QE("RestartButton",!1),recFileStartTime=recFileLastTime=a,(agentDesktop=CreateAgentRemoteDesktop("Desk")).onScreenSizeChange=deskAdjust,agentDesktop.State=3,deskAdjust()):101==recFileMetadata.protocol&&(recFileProtocol=101,i+="<br /><br /><span style=color:gray>Press [space] to play/pause.</span>",QE("PlayButton",!0),QE("PauseButton",!1),QE("RestartButton",!1),recFileStartTime=recFileLastTime=a,(amtDesktop=CreateAmtRemoteDesktop("Desk")).onScreenSizeChange=deskAdjust,amtDesktop.State=3,amtDesktop.Start(),deskAdjust()),QV("metadatadiv",!0),QH("metadatadiv",i),QH("deskstatus",recFile.name)}else cleanup()}else cleanup()}function processBlock(e,t,a,r){if(e<0)pause();else{var i=Math.round((a-recFileLastTime)*parseFloat(Q("PlaySpeed").value));i<5?processBlockEx(e,t,a,r):(waitTimerArgs=[e,t,a,r],waitTimer=setTimeout(function(){waitTimer=null,processBlockEx(waitTimerArgs[0],waitTimerArgs[1],waitTimerArgs[2],waitTimerArgs[3])},i))}}function processBlockEx(e,t,a,r){if(0!=playing){var i=0!=(1&t),l=0!=(2&t),n=Math.floor((a-recFileStartTime)/1e3);if(currentDeltaTimeTotalSec!=n){currentDeltaTimeTotalSec=n;var o=Math.floor(n/3600);n-=3600*o;var s=Math.floor(n/60);n-=60*o;var c=Math.floor(n);QH("timespan",pad2(o)+":"+pad2(s)+":"+pad2(c))}2==e&&i&&!l?1==recFileProtocol?agentTerminal.ProcessData(r):2==recFileProtocol?agentDesktop.ProcessData(r):101==recFileProtocol&&(0==readState&&"4100000000000000"==rstr2hex(r)?(readState=1,8<r.length&&amtDesktop.ProcessData(r.substring(8))):1==readState&&amtDesktop.ProcessData(r)):2==e&&i&&l&&101==recFileProtocol&&"0000000008080001000700070003050200000000"==rstr2hex(r)&&(amtDesktop.bpp=1),recFileLastTime=a,playing&&readNextBlock(processBlock)}}function cleanup(){recFilePtr=0,playing=!1,(recFileMetadata=recFile=null)!=agentDesktop&&(agentDesktop.Canvas.clearRect(0,0,agentDesktop.CanvasId.width,agentDesktop.CanvasId.height),agentDesktop=null),null!=amtDesktop&&(amtDesktop.canvas.clearRect(0,0,amtDesktop.CanvasId.width,amtDesktop.CanvasId.height),amtDesktop=null),recFileEndTime=currentDeltaTimeTotalSec=readState=0,(agentTerminal=waitTimerArgs=null)!=waitTimer&&(clearTimeout(waitTimer),waitTimer=null),QH("deskstatus",""),QE("PlayButton",!1),QE("PauseButton",!1),QE("RestartButton",!1),QS("progressbar").width="0px",QH("timespan","00:00:00"),QV("metadatadiv",!0),QH("metadatadiv",'<span style="font-family:Arial,Helvetica Neue,Helvetica,sans-serif;font-size:28px">MeshCentral Session Player</span><br /><br /><span style=color:gray>Drag & drop a .mcrec file or click "Open File..."</span>'),QV("DeskParent",!0),QV("TermParent",!1)}function ondrop(e){if(haltEvent(e),QV("bigfail",!1),QV("bigok",!1),null!=e.dataTransfer){var t=[];for(var a in e.dataTransfer.files)null!=e.dataTransfer.files[a].type&&null!=e.dataTransfer.files[a].size&&0!=e.dataTransfer.files[a].size&&e.dataTransfer.files[a].name.endsWith(".mcrec")&&t.push(e.dataTransfer.files[a]);0!=t.length&&(cleanup(),recFile=t[0],recFilePtr=0,readNextBlock(processFirstBlock),readLastBlock(function(e,t,a){recFileEndTime=3==e?a:0}))}}var xxdialogMode,xxdialogFunc,xxdialogButtons,xxdialogTag,dragtimer=null;function ondragover(e){haltEvent(e),null!=dragtimer&&(clearTimeout(dragtimer),dragtimer=null);QV("bigok",!0),QV("bigfail",!1)}function ondragleave(e){haltEvent(e),dragtimer=setTimeout(function(){QV("bigfail",!1),QV("bigok",!1),dragtimer=null},10)}function onkeypress(e){xxdialogMode||(" "==e.key&&(togglePause(),haltEvent(e)),"1"==e.key&&(Q("PlaySpeed").value=4,haltEvent(e)),"2"==e.key&&(Q("PlaySpeed").value=2,haltEvent(e)),"3"==e.key&&(Q("PlaySpeed").value=1,haltEvent(e)),"4"==e.key&&(Q("PlaySpeed").value=.5,haltEvent(e)),"5"==e.key&&(Q("PlaySpeed").value=.25,haltEvent(e)),"6"==e.key&&(Q("PlaySpeed").value=.1,haltEvent(e)),"0"==e.key&&(pause(),restart(),haltEvent(e)))}function openfile(){setDialogMode(2,"Open File...",3,openfileEx,'<input type=file name=files id=p2fileinput style=width:100% accept=".mcrec" onchange="openfileChanged()" />'),QE("idx_dlgOkButton",!1)}function openfileEx(){var e=Q("p2fileinput").files;if(null!=e){var t=[];for(var a in e)null!=e[a].type&&null!=e[a].size&&0!=e[a].size&&e[a].name.endsWith(".mcrec")&&t.push(e[a])}0!=t.length&&(cleanup(),recFile=t[0],recFilePtr=0,readNextBlock(processFirstBlock),readLastBlock(function(e,t,a){recFileEndTime=3==e?a:0}),Q("OpenFileButton").blur())}function openfileChanged(){var e=Q("p2fileinput").files;if(null!=e){var t=[];for(var a in e)null!=e[a].type&&null!=e[a].size&&0!=e[a].size&&e[a].name.endsWith(".mcrec")&&t.push(e[a])}QE("idx_dlgOkButton",1==t.length)}function togglePause(){return null!=recFile&&(1==playing?pause():recFilePtr!=recFile.size&&play()),!1}function play(){Q("PlayButton").blur(),1!=playing&&0!=recFileProtocol&&(playing=!0,QV("metadatadiv",!1),QE("PlayButton",!1),QE("PauseButton",!0),QE("RestartButton",!1),1==recFileProtocol&&null==agentTerminal&&(QV("DeskParent",!1),QV("TermParent",!0),agentTerminal=CreateAmtRemoteTerminal("Term",{}),agentTerminal.State=3),readNextBlock(processBlock))}function pause(){Q("PauseButton").blur(),0!=playing&&(playing=!1,QE("PlayButton",recFilePtr!=recFile.size),QE("PauseButton",!1),QE("RestartButton",0!=recFilePtr),null!=waitTimer&&(clearTimeout(waitTimer),waitTimer=null,processBlockEx(waitTimerArgs[0],waitTimerArgs[1],waitTimerArgs[2],waitTimerArgs[3]),waitTimerArgs=null))}function restart(){Q("RestartButton").blur(),1!=playing&&(currentDeltaTimeTotalSec=readState=recFilePtr=0,QV("metadatadiv",!0),QE("PlayButton",!0),QE("PauseButton",!1),QE("RestartButton",!1),QS("progressbar").width="0px",QH("timespan","00:00:00"),QV("DeskParent",!0),QV("TermParent",!1),agentDesktop?agentDesktop.Canvas.clearRect(0,0,agentDesktop.CanvasId.width,agentDesktop.CanvasId.height):amtDesktop?(amtDesktop.canvas.clearRect(0,0,amtDesktop.CanvasId.width,amtDesktop.CanvasId.height),(amtDesktop=CreateAmtRemoteDesktop("Desk")).onScreenSizeChange=deskAdjust,amtDesktop.State=3,amtDesktop.Start()):agentTerminal=agentTerminal&&null)}function clearConsoleMsg(){QH("p11DeskConsoleMsg","")}function toggleAspectRatio(e){1===e&&(deskAspectRatio=(deskAspectRatio+1)%3),deskAdjust()}function deskAdjust(){var e=Q("DeskParent").clientHeight,t=Q("DeskParent").clientWidth,a=Q("Desk").height,r=Q("Desk").width;if(2==deskAspectRatio)QS("Desk")["margin-top"]=null,QS("Desk").height="100%",QS("Desk").width="100%",QS("DeskParent").overflow="hidden";else if(1==deskAspectRatio)QS("Desk")["margin-top"]="0px",QS("Desk").height=a+"px",QS("Desk").width=r+"px",QS("DeskParent").overflow="scroll";else{if(a/r<e/t){var i=a*t/r+"px";QS("Desk").height=i,QS("Desk").width="100%"}else{var l=r*e/a+"px";QS("Desk").height="100%",QS("Desk").width=l}QS("Desk")["margin-top"]=null,QS("DeskParent").overflow="hidden"}}var xxcurrentView=-1;function setDialogMode(e,t,a,r,i,l){xxdialogMode=e,xxdialogFunc=r,xxdialogButtons=a,xxdialogTag=l,QE("idx_dlgOkButton",!0),QV("idx_dlgOkButton",1&a),QV("idx_dlgCancelButton",2&a),QV("id_dialogclose",2&a||8&a),QV("idx_dlgDeleteButton",4&a),QV("idx_dlgButtonBar",7&a),t&&QH("id_dialogtitle",t);for(var n=1;n<3;n++)QV("dialog"+n,n==e);QV("dialog",e),i&&(2==e?QH("id_dialogOptions",i):QH("id_dialogMessage",i))}function dialogclose(e){var t=xxdialogFunc,a=xxdialogButtons,r=xxdialogTag;setDialogMode(),(8&a||e)&&t&&t(e,r)}function messagebox(e,t){setSessionActivity(),QH("id_dialogMessage",t),setDialogMode(1,e,1)}function statusbox(e,t){setSessionActivity(),QH("id_dialogMessage",t),setDialogMode(1,e)}function haltEvent(e){return e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1}function pad2(e){var t="00"+e;return t.substr(t.length-2)}function format(e){var a=Array.prototype.slice.call(arguments,1);return e.replace(/{(\d+)}/g,function(e,t){return void 0!==a[t]?a[t]:e})}start()</script>
\ No newline at end of file
1 +<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><script src=scripts/agent-desktop-0.0.2.js></script><script src=scripts/amt-desktop-0.0.2.js></script><script src=scripts/amt-terminal-0.0.2.js></script><script src=scripts/zlib.js></script><script src=scripts/zlib-inflate.js></script><script src=scripts/zlib-adler32.js></script><script src=scripts/zlib-crc32.js></script><body style=overflow:hidden;background-color:#000><div id=p11 class=noselect style=overflow:hidden><div id=deskarea0><div id=deskarea1 class=areaHead><div class=toright2><div class=deskareaicon title="Toggle View Mode"onclick=toggleAspectRatio(1)>&#8690;</div></div><div><input id=OpenFileButton type=button value="Open File..."onclick=openfile()> <span id=deskstatus></span></div></div><div id=deskarea2><div class=areaProgress><div id=progressbar></div></div></div><div id=deskarea3x style="max-height:calc(100vh - 54px);height:calc(100vh - 54px)"onclick=togglePause()><div id=bigok style="display:none;left:calc((100vh / 2))"><b>&checkmark;</b></div><div id=bigfail style="display:none;left:calc((100vh / 2))"><b>&#10007;</b></div><div id=metadatadiv style=padding:20px;color:#d3d3d3;text-align:left;display:none></div><div id=DeskParent><canvas id=Desk width=640 height=480></canvas></div><div id=TermParent style=display:none><pre id=Term></pre></div><div id=p11DeskConsoleMsg style=display:none;cursor:pointer;position:absolute;left:30px;top:17px;color:#ff0;background-color:rgba(0,0,0,.6);padding:10px;border-radius:5px onclick=clearConsoleMsg()></div></div><div id=deskarea4 class=areaFoot><div class=toright2><div id=timespan style=padding-top:4px;padding-right:4px>00:00:00</div></div><div>&nbsp; <input id=PlayButton type=button value=Play disabled onclick=play()> <input id=PauseButton type=button value=Pause disabled onclick=pause()> <input id=RestartButton type=button value=Restart disabled onclick=restart()> <select id=PlaySpeed onchange=this.blur()><option value=4>1/4 Speed<option value=2>1/2 Speed<option value=1 selected>Normal Speed<option value=0.5>2x Speed<option value=0.25>4x Speed<option value=0.1>10x Speed</select></div></div></div><div id=dialog class=noselect style=display:none><div id=dialogHeader><div tabindex=0 id=id_dialogclose onclick=setDialogMode() onkeypress='"Enter"==event.key&&setDialogMode()'>&#x2716;</div><div id=id_dialogtitle></div></div><div id=dialogBody><div id=dialog1><div id=id_dialogMessage></div></div><div id=dialog2><div id=id_dialogOptions></div></div></div><div id=idx_dlgButtonBar><input id=idx_dlgCancelButton type=button value=Cancel onclick=dialogclose(0)> <input id=idx_dlgOkButton type=button value=OK onclick=dialogclose(1)><div><input id=idx_dlgDeleteButton type=button value=Delete style=display:none onclick=dialogclose(2)></div></div></div></div><script>var recFile=null,recFilePtr=0,recFileStartTime=0,recFileLastTime=0,recFileEndTime=0,recFileMetadata=null,recFileProtocol=0,agentDesktop=null,amtDesktop=null,playing=!1,readState=0,waitTimer=null,waitTimerArgs=null,deskAspectRatio=0,currentDeltaTimeTotalSec=0;function start(){window.onresize=deskAdjust,document.ondrop=ondrop,document.ondragover=ondragover,document.ondragleave=ondragleave,document.onkeypress=onkeypress,Q("PlaySpeed").value=1,cleanup()}function readNextBlock(l){if(recFilePtr+16>recFile.size)QS("progressbar").width="100%",l(-1);else{var e=new FileReader;e.onload=function(){var e=ReadShort(this.result,0),t=ReadShort(this.result,2),a=ReadInt(this.result,4),r=(ReadInt(this.result,8)<<32)+ReadInt(this.result,12);if(recFilePtr+16+a>recFile.size)QS("progressbar").width="100%",l(-1);else{var i=new FileReader;i.onload=function(){recFilePtr+=16+a,QS("progressbar").width=0==recFileEndTime?Math.floor(recFilePtr/recFile.size*100)+"%":Math.floor((recFileLastTime-recFileStartTime)/(recFileEndTime-recFileStartTime)*100)+"%",l(e,t,r,this.result)},i.readAsBinaryString(recFile.slice(recFilePtr+16,recFilePtr+16+a))}},e.readAsBinaryString(recFile.slice(recFilePtr,recFilePtr+16))}}function readLastBlock(i){if(recFile.size<32)i(-1);else{var e=new FileReader;e.onload=function(){var e=ReadShort(this.result,0),t=ReadShort(this.result,2),a=ReadInt(this.result,4),r=(ReadInt(this.result,8)<<32)+ReadInt(this.result,12);3==e&&16==a&&"MeshCentralMCREC"==this.result.substring(16,32)?i(e,t,r):i(-1)},e.readAsBinaryString(recFile.slice(recFile.size-32,recFile.size))}}function addInfo(e,t){return null==t?"":addInfoNoEsc(e,EscapeHtml(t))}function addInfoNoEsc(e,t){return null==t?"":"<span style=color:gray>"+EscapeHtml(e)+"</span>:&nbsp;<span style=font-size:20px>"+t+"</span><br/>"}function processFirstBlock(e,t,a,r){if(recFileProtocol=0,1==e&&0==t){try{recFileMetadata=JSON.parse(r)}catch(e){return void cleanup()}if(null!=recFileMetadata&&"MeshCentralRelaySession"==recFileMetadata.magic&&1==recFileMetadata.ver){var i="";if(i+=addInfo("Time",recFileMetadata.time),0!=recFileEndTime){var l=Math.floor((recFileEndTime-a)/1e3);i+=addInfo("Duration",format("{0} second{1}",l,1<l?"s":""))}if(i+=addInfo("Username",recFileMetadata.username),i+=addInfo("UserID",recFileMetadata.userid),i+=addInfo("SessionID",recFileMetadata.sessionid),recFileMetadata.ipaddr1&&recFileMetadata.ipaddr2&&(i+=addInfo("Addresses",format("{0} to {1}",recFileMetadata.ipaddr1,recFileMetadata.ipaddr2))),recFileMetadata.devicename&&(i+=addInfo("DeviceName",recFileMetadata.devicename)),i+=addInfo("NodeID",recFileMetadata.nodeid),recFileMetadata.protocol){var n=recFileMetadata.protocol;1==n?n="MeshCentral Terminal":2==n?n="MeshCentral Desktop":100==n?n="Intel&reg; AMT WSMAN":101==n&&(n="Intel&reg; AMT Redirection"),i+=addInfoNoEsc("Protocol",n)}QV("DeskParent",!0),QV("TermParent",!1),1==recFileMetadata.protocol?(recFileProtocol=1,i+="<br /><br /><span style=color:gray>Press [space] to play/pause.</span>",QE("PlayButton",!0),QE("PauseButton",!1),QE("RestartButton",!1),recFileStartTime=recFileLastTime=a):2==recFileMetadata.protocol?(recFileProtocol=2,i+="<br /><br /><span style=color:gray>Press [space] to play/pause.</span>",QE("PlayButton",!0),QE("PauseButton",!1),QE("RestartButton",!1),recFileStartTime=recFileLastTime=a,(agentDesktop=CreateAgentRemoteDesktop("Desk")).onScreenSizeChange=deskAdjust,agentDesktop.State=3,deskAdjust()):101==recFileMetadata.protocol&&(recFileProtocol=101,i+="<br /><br /><span style=color:gray>Press [space] to play/pause.</span>",QE("PlayButton",!0),QE("PauseButton",!1),QE("RestartButton",!1),recFileStartTime=recFileLastTime=a,(amtDesktop=CreateAmtRemoteDesktop("Desk")).onScreenSizeChange=deskAdjust,amtDesktop.State=3,amtDesktop.Start(),deskAdjust()),QV("metadatadiv",!0),QH("metadatadiv",i),QH("deskstatus",recFile.name)}else cleanup()}else cleanup()}function processBlock(e,t,a,r){if(e<0)pause();else{var i=Math.round((a-recFileLastTime)*parseFloat(Q("PlaySpeed").value));i<5?processBlockEx(e,t,a,r):(waitTimerArgs=[e,t,a,r],waitTimer=setTimeout(function(){waitTimer=null,processBlockEx(waitTimerArgs[0],waitTimerArgs[1],waitTimerArgs[2],waitTimerArgs[3])},i))}}function processBlockEx(e,t,a,r){if(0!=playing){var i=0!=(1&t),l=0!=(2&t),n=Math.floor((a-recFileStartTime)/1e3);if(currentDeltaTimeTotalSec!=n){currentDeltaTimeTotalSec=n;var o=Math.floor(n/3600);n-=3600*o;var s=Math.floor(n/60);n-=60*o;var c=Math.floor(n);QH("timespan",pad2(o)+":"+pad2(s)+":"+pad2(c))}2==e&&i&&!l?1==recFileProtocol?agentTerminal.ProcessData(r):2==recFileProtocol?agentDesktop.ProcessData(r):101==recFileProtocol&&(0==readState&&"4100000000000000"==rstr2hex(r)?(readState=1,8<r.length&&amtDesktop.ProcessData(r.substring(8))):1==readState&&amtDesktop.ProcessData(r)):2==e&&i&&l&&101==recFileProtocol&&"0000000008080001000700070003050200000000"==rstr2hex(r)&&(amtDesktop.bpp=1),recFileLastTime=a,playing&&readNextBlock(processBlock)}}function cleanup(){recFilePtr=0,playing=!1,(recFileMetadata=recFile=null)!=agentDesktop&&(agentDesktop.Canvas.clearRect(0,0,agentDesktop.CanvasId.width,agentDesktop.CanvasId.height),agentDesktop=null),null!=amtDesktop&&(amtDesktop.canvas.clearRect(0,0,amtDesktop.CanvasId.width,amtDesktop.CanvasId.height),amtDesktop=null),recFileEndTime=currentDeltaTimeTotalSec=readState=0,(agentTerminal=waitTimerArgs=null)!=waitTimer&&(clearTimeout(waitTimer),waitTimer=null),QH("deskstatus",""),QE("PlayButton",!1),QE("PauseButton",!1),QE("RestartButton",!1),QS("progressbar").width="0px",QH("timespan","00:00:00"),QV("metadatadiv",!0),QH("metadatadiv",'<span style="font-family:Arial,Helvetica Neue,Helvetica,sans-serif;font-size:28px">MeshCentral Session Player</span><br /><br /><span style=color:gray>Drag & drop a .mcrec file or click "Open File..."</span>'),QV("DeskParent",!0),QV("TermParent",!1)}function ondrop(e){if(haltEvent(e),QV("bigfail",!1),QV("bigok",!1),null!=e.dataTransfer){var t=[];for(var a in e.dataTransfer.files)null!=e.dataTransfer.files[a].type&&null!=e.dataTransfer.files[a].size&&0!=e.dataTransfer.files[a].size&&e.dataTransfer.files[a].name.endsWith(".mcrec")&&t.push(e.dataTransfer.files[a]);0!=t.length&&(cleanup(),recFile=t[0],recFilePtr=0,readNextBlock(processFirstBlock),readLastBlock(function(e,t,a){recFileEndTime=3==e?a:0}))}}var xxdialogMode,xxdialogFunc,xxdialogButtons,xxdialogTag,dragtimer=null;function ondragover(e){haltEvent(e),null!=dragtimer&&(clearTimeout(dragtimer),dragtimer=null);QV("bigok",!0),QV("bigfail",!1)}function ondragleave(e){haltEvent(e),dragtimer=setTimeout(function(){QV("bigfail",!1),QV("bigok",!1),dragtimer=null},10)}function onkeypress(e){xxdialogMode||(" "==e.key&&(togglePause(),haltEvent(e)),"1"==e.key&&(Q("PlaySpeed").value=4,haltEvent(e)),"2"==e.key&&(Q("PlaySpeed").value=2,haltEvent(e)),"3"==e.key&&(Q("PlaySpeed").value=1,haltEvent(e)),"4"==e.key&&(Q("PlaySpeed").value=.5,haltEvent(e)),"5"==e.key&&(Q("PlaySpeed").value=.25,haltEvent(e)),"6"==e.key&&(Q("PlaySpeed").value=.1,haltEvent(e)),"0"==e.key&&(pause(),restart(),haltEvent(e)))}function openfile(){setDialogMode(2,"Open File...",3,openfileEx,'<input type=file name=files id=p2fileinput style=width:100% accept=".mcrec" onchange="openfileChanged()" />'),QE("idx_dlgOkButton",!1)}function openfileEx(){var e=Q("p2fileinput").files;if(null!=e){var t=[];for(var a in e)null!=e[a].type&&null!=e[a].size&&0!=e[a].size&&e[a].name.endsWith(".mcrec")&&t.push(e[a])}0!=t.length&&(cleanup(),recFile=t[0],recFilePtr=0,readNextBlock(processFirstBlock),readLastBlock(function(e,t,a){recFileEndTime=3==e?a:0}),Q("OpenFileButton").blur())}function openfileChanged(){var e=Q("p2fileinput").files;if(null!=e){var t=[];for(var a in e)null!=e[a].type&&null!=e[a].size&&0!=e[a].size&&e[a].name.endsWith(".mcrec")&&t.push(e[a])}QE("idx_dlgOkButton",1==t.length)}function togglePause(){return null!=recFile&&(1==playing?pause():recFilePtr!=recFile.size&&play()),!1}function play(){Q("PlayButton").blur(),1!=playing&&0!=recFileProtocol&&(playing=!0,QV("metadatadiv",!1),QE("PlayButton",!1),QE("PauseButton",!0),QE("RestartButton",!1),1==recFileProtocol&&null==agentTerminal&&(QV("DeskParent",!1),QV("TermParent",!0),agentTerminal=CreateAmtRemoteTerminal("Term",{}),agentTerminal.State=3),readNextBlock(processBlock))}function pause(){Q("PauseButton").blur(),0!=playing&&(playing=!1,QE("PlayButton",recFilePtr!=recFile.size),QE("PauseButton",!1),QE("RestartButton",0!=recFilePtr),null!=waitTimer&&(clearTimeout(waitTimer),waitTimer=null,processBlockEx(waitTimerArgs[0],waitTimerArgs[1],waitTimerArgs[2],waitTimerArgs[3]),waitTimerArgs=null))}function restart(){Q("RestartButton").blur(),1!=playing&&(currentDeltaTimeTotalSec=readState=recFilePtr=0,QV("metadatadiv",!0),QE("PlayButton",!0),QE("PauseButton",!1),QE("RestartButton",!1),QS("progressbar").width="0px",QH("timespan","00:00:00"),QV("DeskParent",!0),QV("TermParent",!1),agentDesktop?agentDesktop.Canvas.clearRect(0,0,agentDesktop.CanvasId.width,agentDesktop.CanvasId.height):amtDesktop?(amtDesktop.canvas.clearRect(0,0,amtDesktop.CanvasId.width,amtDesktop.CanvasId.height),(amtDesktop=CreateAmtRemoteDesktop("Desk")).onScreenSizeChange=deskAdjust,amtDesktop.State=3,amtDesktop.Start()):agentTerminal=agentTerminal&&null)}function clearConsoleMsg(){QH("p11DeskConsoleMsg","")}function toggleAspectRatio(e){1===e&&(deskAspectRatio=(deskAspectRatio+1)%3),deskAdjust()}function deskAdjust(){var e=Q("DeskParent").clientHeight,t=Q("DeskParent").clientWidth,a=Q("Desk").height,r=Q("Desk").width;if(2==deskAspectRatio)QS("Desk")["margin-top"]=null,QS("Desk").height="100%",QS("Desk").width="100%",QS("DeskParent").overflow="hidden";else if(1==deskAspectRatio)QS("Desk")["margin-top"]="0px",QS("Desk").height=a+"px",QS("Desk").width=r+"px",QS("DeskParent").overflow="scroll";else{if(a/r<e/t){var i=a*t/r+"px";QS("Desk").height=i,QS("Desk").width="100%"}else{var l=r*e/a+"px";QS("Desk").height="100%",QS("Desk").width=l}QS("Desk")["margin-top"]=null,QS("DeskParent").overflow="hidden"}}var xxcurrentView=-1;function setDialogMode(e,t,a,r,i,l){xxdialogMode=e,xxdialogFunc=r,xxdialogButtons=a,xxdialogTag=l,QE("idx_dlgOkButton",!0),QV("idx_dlgOkButton",1&a),QV("idx_dlgCancelButton",2&a),QV("id_dialogclose",2&a||8&a),QV("idx_dlgDeleteButton",4&a),QV("idx_dlgButtonBar",7&a),t&&QH("id_dialogtitle",t);for(var n=1;n<3;n++)QV("dialog"+n,n==e);QV("dialog",e),i&&(2==e?QH("id_dialogOptions",i):QH("id_dialogMessage",i))}function dialogclose(e){var t=xxdialogFunc,a=xxdialogButtons,r=xxdialogTag;setDialogMode(),(8&a||e)&&t&&t(e,r)}function messagebox(e,t){setSessionActivity(),QH("id_dialogMessage",t),setDialogMode(1,e,1)}function statusbox(e,t){setSessionActivity(),QH("id_dialogMessage",t),setDialogMode(1,e)}function haltEvent(e){return e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1}function pad2(e){var t="00"+e;return t.substr(t.length-2)}function format(e){var a=Array.prototype.slice.call(arguments,1);return e.replace(/{(\d+)}/g,function(e,t){return void 0!==a[t]?a[t]:e})}start()</script>
\ No newline at end of file
public/translations/player-min_fr.htm
+1 -1
@@ -1 +1 @@
1 -<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><script src=scripts/agent-desktop-0.0.2.js></script><script src=scripts/amt-desktop-0.0.2.js></script><script src=scripts/amt-terminal-0.0.2.js></script><script src=scripts/zlib.js></script><script src=scripts/zlib-inflate.js></script><script src=scripts/zlib-adler32.js></script><script src=scripts/zlib-crc32.js></script><body style=overflow:hidden;background-color:#000><div id=p11 class=noselect style=overflow:hidden><div id=deskarea0><div id=deskarea1 class=areaHead><div class=toright2><div class=deskareaicon title="Toggle View Mode"onclick=toggleAspectRatio(1)>⇲</div></div><div><input id=OpenFileButton type=button value="Open File..."onclick=openfile()><span id=deskstatus></span></div></div><div id=deskarea2><div class=areaProgress><div id=progressbar></div></div></div><div id=deskarea3x style="max-height:calc(100vh - 54px);height:calc(100vh - 54px)"onclick=togglePause()><div id=bigok style="display:none;left:calc((100vh / 2))"><b>✓</b></div><div id=bigfail style="display:none;left:calc((100vh / 2))"><b>✗</b></div><div id=metadatadiv style=padding:20px;color:#d3d3d3;text-align:left;display:none></div><div id=DeskParent><canvas id=Desk width=640 height=480></canvas></div><div id=TermParent style=display:none><pre id=Term></pre></div><div id=p11DeskConsoleMsg style=display:none;cursor:pointer;position:absolute;left:30px;top:17px;color:#ff0;background-color:rgba(0,0,0,.6);padding:10px;border-radius:5px onclick=clearConsoleMsg()></div></div><div id=deskarea4 class=areaFoot><div class=toright2><div id=timespan style=padding-top:4px;padding-right:4px>00:00:00</div></div><div>&nbsp; <input id=PlayButton type=button value=Jouer disabled onclick=play()> <input id=PauseButton type=button value=Pause disabled onclick=pause()> <input id=RestartButton type=button value=Redémarrer disabled onclick=restart()><select id=PlaySpeed onchange=this.blur()><option value=4>1/4 vitesse<option value=2>1/2 vitesse<option value=1 selected>Normal Speed<option value=0.5>2x vitesse<option value=0.25>4x vitesse<option value=0.1>10x vitesse</select></div></div></div><div id=dialog class=noselect style=display:none><div id=dialogHeader><div tabindex=0 id=id_dialogclose onclick=setDialogMode() onkeypress='"Enter"==event.key&&setDialogMode()'>✖</div><div id=id_dialogtitle></div></div><div id=dialogBody><div id=dialog1><div id=id_dialogMessage></div></div><div id=dialog2><div id=id_dialogOptions></div></div></div><div id=idx_dlgButtonBar><input id=idx_dlgCancelButton type=button value=Annuler onclick=dialogclose(0)> <input id=idx_dlgOkButton type=button value=OK onclick=dialogclose(1)><div><input id=idx_dlgDeleteButton type=button value=Delete style=display:none onclick=dialogclose(2)></div></div></div></div><script>var recFile=null,recFilePtr=0,recFileStartTime=0,recFileLastTime=0,recFileEndTime=0,recFileMetadata=null,recFileProtocol=0,agentDesktop=null,amtDesktop=null,playing=!1,readState=0,waitTimer=null,waitTimerArgs=null,deskAspectRatio=0,currentDeltaTimeTotalSec=0;function start(){window.onresize=deskAdjust,document.ondrop=ondrop,document.ondragover=ondragover,document.ondragleave=ondragleave,document.onkeypress=onkeypress,Q("PlaySpeed").value=1,cleanup()}function readNextBlock(l){if(recFilePtr+16>recFile.size)QS("progressbar").width="100%",l(-1);else{var e=new FileReader;e.onload=function(){var e=ReadShort(this.result,0),t=ReadShort(this.result,2),a=ReadInt(this.result,4),r=(ReadInt(this.result,8)<<32)+ReadInt(this.result,12);if(recFilePtr+16+a>recFile.size)QS("progressbar").width="100%",l(-1);else{var i=new FileReader;i.onload=function(){recFilePtr+=16+a,QS("progressbar").width=0==recFileEndTime?Math.floor(recFilePtr/recFile.size*100)+"%":Math.floor((recFileLastTime-recFileStartTime)/(recFileEndTime-recFileStartTime)*100)+"%",l(e,t,r,this.result)},i.readAsBinaryString(recFile.slice(recFilePtr+16,recFilePtr+16+a))}},e.readAsBinaryString(recFile.slice(recFilePtr,recFilePtr+16))}}function readLastBlock(i){if(recFile.size<32)i(-1);else{var e=new FileReader;e.onload=function(){var e=ReadShort(this.result,0),t=ReadShort(this.result,2),a=ReadInt(this.result,4),r=(ReadInt(this.result,8)<<32)+ReadInt(this.result,12);3==e&&16==a&&"MeshCentralMCREC"==this.result.substring(16,32)?i(e,t,r):i(-1)},e.readAsBinaryString(recFile.slice(recFile.size-32,recFile.size))}}function addInfo(e,t){return null==t?"":addInfoNoEsc(e,EscapeHtml(t))}function addInfoNoEsc(e,t){return null==t?"":"<span style=color:gray>"+EscapeHtml(e)+"</span>:&nbsp;<span style=font-size:20px>"+t+"</span><br/>"}function processFirstBlock(e,t,a,r){if(recFileProtocol=0,1==e&&0==t){try{recFileMetadata=JSON.parse(r)}catch(e){return void cleanup()}if(null!=recFileMetadata&&"MeshCentralRelaySession"==recFileMetadata.magic&&1==recFileMetadata.ver){var i="";if(i+=addInfo("Temps",recFileMetadata.time),0!=recFileEndTime){var l=Math.floor((recFileEndTime-a)/1e3);i+=addInfo("Duration",format("{0} second{1}",l,1<l?"s":""))}if(i+=addInfo("Nom d'utilisateur",recFileMetadata.username),i+=addInfo("Identifiant d'utilisateur",recFileMetadata.userid),i+=addInfo("SessionID",recFileMetadata.sessionid),recFileMetadata.ipaddr1&&recFileMetadata.ipaddr2&&(i+=addInfo("Addresses",format("{0} to {1}",recFileMetadata.ipaddr1,recFileMetadata.ipaddr2))),recFileMetadata.devicename&&(i+=addInfo("DeviceName",recFileMetadata.devicename)),i+=addInfo("NodeID",recFileMetadata.nodeid),recFileMetadata.protocol){var n=recFileMetadata.protocol;1==n?n="MeshCentral Terminal":2==n?n="MeshCentral Desktop":100==n?n="Intel&reg; AMT WSMAN":101==n&&(n="Intel&reg; AMT Redirection"),i+=addInfoNoEsc("Protocol",n)}QV("DeskParent",!0),QV("TermParent",!1),1==recFileMetadata.protocol?(recFileProtocol=1,i+="<br /><br /><span style=color:gray>Press [space] to play/pause.</span>",QE("PlayButton",!0),QE("PauseButton",!1),QE("RestartButton",!1),recFileStartTime=recFileLastTime=a):2==recFileMetadata.protocol?(recFileProtocol=2,i+="<br /><br /><span style=color:gray>Press [space] to play/pause.</span>",QE("PlayButton",!0),QE("PauseButton",!1),QE("RestartButton",!1),recFileStartTime=recFileLastTime=a,(agentDesktop=CreateAgentRemoteDesktop("Desk")).onScreenSizeChange=deskAdjust,agentDesktop.State=3,deskAdjust()):101==recFileMetadata.protocol&&(recFileProtocol=101,i+="<br /><br /><span style=color:gray>Press [space] to play/pause.</span>",QE("PlayButton",!0),QE("PauseButton",!1),QE("RestartButton",!1),recFileStartTime=recFileLastTime=a,(amtDesktop=CreateAmtRemoteDesktop("Desk")).onScreenSizeChange=deskAdjust,amtDesktop.State=3,amtDesktop.Start(),deskAdjust()),QV("metadatadiv",!0),QH("metadatadiv",i),QH("deskstatus",recFile.name)}else cleanup()}else cleanup()}function processBlock(e,t,a,r){if(e<0)pause();else{var i=Math.round((a-recFileLastTime)*parseFloat(Q("PlaySpeed").value));i<5?processBlockEx(e,t,a,r):(waitTimerArgs=[e,t,a,r],waitTimer=setTimeout(function(){waitTimer=null,processBlockEx(waitTimerArgs[0],waitTimerArgs[1],waitTimerArgs[2],waitTimerArgs[3])},i))}}function processBlockEx(e,t,a,r){if(0!=playing){var i=0!=(1&t),l=0!=(2&t),n=Math.floor((a-recFileStartTime)/1e3);if(currentDeltaTimeTotalSec!=n){currentDeltaTimeTotalSec=n;var o=Math.floor(n/3600);n-=3600*o;var s=Math.floor(n/60);n-=60*o;var c=Math.floor(n);QH("timespan",pad2(o)+":"+pad2(s)+":"+pad2(c))}2==e&&i&&!l?1==recFileProtocol?agentTerminal.ProcessData(r):2==recFileProtocol?agentDesktop.ProcessData(r):101==recFileProtocol&&(0==readState&&"4100000000000000"==rstr2hex(r)?(readState=1,8<r.length&&amtDesktop.ProcessData(r.substring(8))):1==readState&&amtDesktop.ProcessData(r)):2==e&&i&&l&&101==recFileProtocol&&"0000000008080001000700070003050200000000"==rstr2hex(r)&&(amtDesktop.bpp=1),recFileLastTime=a,playing&&readNextBlock(processBlock)}}function cleanup(){recFilePtr=0,playing=!1,(recFileMetadata=recFile=null)!=agentDesktop&&(agentDesktop.Canvas.clearRect(0,0,agentDesktop.CanvasId.width,agentDesktop.CanvasId.height),agentDesktop=null),null!=amtDesktop&&(amtDesktop.canvas.clearRect(0,0,amtDesktop.CanvasId.width,amtDesktop.CanvasId.height),amtDesktop=null),recFileEndTime=currentDeltaTimeTotalSec=readState=0,(agentTerminal=waitTimerArgs=null)!=waitTimer&&(clearTimeout(waitTimer),waitTimer=null),QH("deskstatus",""),QE("PlayButton",!1),QE("PauseButton",!1),QE("RestartButton",!1),QS("progressbar").width="0px",QH("timespan","00:00:00"),QV("metadatadiv",!0),QH("metadatadiv",'<span style="font-family:Arial,Helvetica Neue,Helvetica,sans-serif;font-size:28px">MeshCentral Session Player</span><br /><br /><span style=color:gray>Drag & drop a .mcrec file or click "Open File..."</span>'),QV("DeskParent",!0),QV("TermParent",!1)}function ondrop(e){if(haltEvent(e),QV("bigfail",!1),QV("bigok",!1),null!=e.dataTransfer){var t=[];for(var a in e.dataTransfer.files)null!=e.dataTransfer.files[a].type&&null!=e.dataTransfer.files[a].size&&0!=e.dataTransfer.files[a].size&&e.dataTransfer.files[a].name.endsWith(".mcrec")&&t.push(e.dataTransfer.files[a]);0!=t.length&&(cleanup(),recFile=t[0],recFilePtr=0,readNextBlock(processFirstBlock),readLastBlock(function(e,t,a){recFileEndTime=3==e?a:0}))}}var xxdialogMode,xxdialogFunc,xxdialogButtons,xxdialogTag,dragtimer=null;function ondragover(e){haltEvent(e),null!=dragtimer&&(clearTimeout(dragtimer),dragtimer=null);QV("bigok",!0),QV("bigfail",!1)}function ondragleave(e){haltEvent(e),dragtimer=setTimeout(function(){QV("bigfail",!1),QV("bigok",!1),dragtimer=null},10)}function onkeypress(e){xxdialogMode||(" "==e.key&&(togglePause(),haltEvent(e)),"1"==e.key&&(Q("PlaySpeed").value=4,haltEvent(e)),"2"==e.key&&(Q("PlaySpeed").value=2,haltEvent(e)),"3"==e.key&&(Q("PlaySpeed").value=1,haltEvent(e)),"4"==e.key&&(Q("PlaySpeed").value=.5,haltEvent(e)),"5"==e.key&&(Q("PlaySpeed").value=.25,haltEvent(e)),"6"==e.key&&(Q("PlaySpeed").value=.1,haltEvent(e)),"0"==e.key&&(pause(),restart(),haltEvent(e)))}function openfile(){setDialogMode(2,"Open File...",3,openfileEx,'<input type=file name=files id=p2fileinput style=width:100% accept=".mcrec" onchange="openfileChanged()" />'),QE("idx_dlgOkButton",!1)}function openfileEx(){var e=Q("p2fileinput").files;if(null!=e){var t=[];for(var a in e)null!=e[a].type&&null!=e[a].size&&0!=e[a].size&&e[a].name.endsWith(".mcrec")&&t.push(e[a])}0!=t.length&&(cleanup(),recFile=t[0],recFilePtr=0,readNextBlock(processFirstBlock),readLastBlock(function(e,t,a){recFileEndTime=3==e?a:0}),Q("OpenFileButton").blur())}function openfileChanged(){var e=Q("p2fileinput").files;if(null!=e){var t=[];for(var a in e)null!=e[a].type&&null!=e[a].size&&0!=e[a].size&&e[a].name.endsWith(".mcrec")&&t.push(e[a])}QE("idx_dlgOkButton",1==t.length)}function togglePause(){return null!=recFile&&(1==playing?pause():recFilePtr!=recFile.size&&play()),!1}function play(){Q("PlayButton").blur(),1!=playing&&0!=recFileProtocol&&(playing=!0,QV("metadatadiv",!1),QE("PlayButton",!1),QE("PauseButton",!0),QE("RestartButton",!1),1==recFileProtocol&&null==agentTerminal&&(QV("DeskParent",!1),QV("TermParent",!0),agentTerminal=CreateAmtRemoteTerminal("Term",{}),agentTerminal.State=3),readNextBlock(processBlock))}function pause(){Q("PauseButton").blur(),0!=playing&&(playing=!1,QE("PlayButton",recFilePtr!=recFile.size),QE("PauseButton",!1),QE("RestartButton",0!=recFilePtr),null!=waitTimer&&(clearTimeout(waitTimer),waitTimer=null,processBlockEx(waitTimerArgs[0],waitTimerArgs[1],waitTimerArgs[2],waitTimerArgs[3]),waitTimerArgs=null))}function restart(){Q("RestartButton").blur(),1!=playing&&(currentDeltaTimeTotalSec=readState=recFilePtr=0,QV("metadatadiv",!0),QE("PlayButton",!0),QE("PauseButton",!1),QE("RestartButton",!1),QS("progressbar").width="0px",QH("timespan","00:00:00"),QV("DeskParent",!0),QV("TermParent",!1),agentDesktop?agentDesktop.Canvas.clearRect(0,0,agentDesktop.CanvasId.width,agentDesktop.CanvasId.height):amtDesktop?(amtDesktop.canvas.clearRect(0,0,amtDesktop.CanvasId.width,amtDesktop.CanvasId.height),(amtDesktop=CreateAmtRemoteDesktop("Desk")).onScreenSizeChange=deskAdjust,amtDesktop.State=3,amtDesktop.Start()):agentTerminal=agentTerminal&&null)}function clearConsoleMsg(){QH("p11DeskConsoleMsg","")}function toggleAspectRatio(e){1===e&&(deskAspectRatio=(deskAspectRatio+1)%3),deskAdjust()}function deskAdjust(){var e=Q("DeskParent").clientHeight,t=Q("DeskParent").clientWidth,a=Q("Desk").height,r=Q("Desk").width;if(2==deskAspectRatio)QS("Desk")["margin-top"]=null,QS("Desk").height="100%",QS("Desk").width="100%",QS("DeskParent").overflow="hidden";else if(1==deskAspectRatio)QS("Desk")["margin-top"]="0px",QS("Desk").height=a+"px",QS("Desk").width=r+"px",QS("DeskParent").overflow="scroll";else{if(a/r<e/t){var i=a*t/r+"px";QS("Desk").height=i,QS("Desk").width="100%"}else{var l=r*e/a+"px";QS("Desk").height="100%",QS("Desk").width=l}QS("Desk")["margin-top"]=null,QS("DeskParent").overflow="hidden"}}var xxcurrentView=-1;function setDialogMode(e,t,a,r,i,l){xxdialogMode=e,xxdialogFunc=r,xxdialogButtons=a,xxdialogTag=l,QE("idx_dlgOkButton",!0),QV("idx_dlgOkButton",1&a),QV("idx_dlgCancelButton",2&a),QV("id_dialogclose",2&a||8&a),QV("idx_dlgDeleteButton",4&a),QV("idx_dlgButtonBar",7&a),t&&QH("id_dialogtitle",t);for(var n=1;n<3;n++)QV("dialog"+n,n==e);QV("dialog",e),i&&(2==e?QH("id_dialogOptions",i):QH("id_dialogMessage",i))}function dialogclose(e){var t=xxdialogFunc,a=xxdialogButtons,r=xxdialogTag;setDialogMode(),(8&a||e)&&t&&t(e,r)}function messagebox(e,t){setSessionActivity(),QH("id_dialogMessage",t),setDialogMode(1,e,1)}function statusbox(e,t){setSessionActivity(),QH("id_dialogMessage",t),setDialogMode(1,e)}function haltEvent(e){return e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1}function pad2(e){var t="00"+e;return t.substr(t.length-2)}function format(e){var a=Array.prototype.slice.call(arguments,1);return e.replace(/{(\d+)}/g,function(e,t){return void 0!==a[t]?a[t]:e})}start()</script>
\ No newline at end of file
1 +<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><script src=scripts/agent-desktop-0.0.2.js></script><script src=scripts/amt-desktop-0.0.2.js></script><script src=scripts/amt-terminal-0.0.2.js></script><script src=scripts/zlib.js></script><script src=scripts/zlib-inflate.js></script><script src=scripts/zlib-adler32.js></script><script src=scripts/zlib-crc32.js></script><body style=overflow:hidden;background-color:#000><div id=p11 class=noselect style=overflow:hidden><div id=deskarea0><div id=deskarea1 class=areaHead><div class=toright2><div class=deskareaicon title="Toggle View Mode"onclick=toggleAspectRatio(1)>⇲</div></div><div><input id=OpenFileButton type=button value="Open File..."onclick=openfile()> <span id=deskstatus></span></div></div><div id=deskarea2><div class=areaProgress><div id=progressbar></div></div></div><div id=deskarea3x style="max-height:calc(100vh - 54px);height:calc(100vh - 54px)"onclick=togglePause()><div id=bigok style="display:none;left:calc((100vh / 2))"><b>✓</b></div><div id=bigfail style="display:none;left:calc((100vh / 2))"><b>✗</b></div><div id=metadatadiv style=padding:20px;color:#d3d3d3;text-align:left;display:none></div><div id=DeskParent><canvas id=Desk width=640 height=480></canvas></div><div id=TermParent style=display:none><pre id=Term></pre></div><div id=p11DeskConsoleMsg style=display:none;cursor:pointer;position:absolute;left:30px;top:17px;color:#ff0;background-color:rgba(0,0,0,.6);padding:10px;border-radius:5px onclick=clearConsoleMsg()></div></div><div id=deskarea4 class=areaFoot><div class=toright2><div id=timespan style=padding-top:4px;padding-right:4px>00:00:00</div></div><div>&nbsp; <input id=PlayButton type=button value=Jouer disabled onclick=play()> <input id=PauseButton type=button value=Pause disabled onclick=pause()> <input id=RestartButton type=button value=Redémarrer disabled onclick=restart()> <select id=PlaySpeed onchange=this.blur()><option value=4>1/4 vitesse<option value=2>1/2 vitesse<option value=1 selected>Normal Speed<option value=0.5>2x vitesse<option value=0.25>4x vitesse<option value=0.1>10x vitesse</select></div></div></div><div id=dialog class=noselect style=display:none><div id=dialogHeader><div tabindex=0 id=id_dialogclose onclick=setDialogMode() onkeypress='"Enter"==event.key&&setDialogMode()'>✖</div><div id=id_dialogtitle></div></div><div id=dialogBody><div id=dialog1><div id=id_dialogMessage></div></div><div id=dialog2><div id=id_dialogOptions></div></div></div><div id=idx_dlgButtonBar><input id=idx_dlgCancelButton type=button value=Annuler onclick=dialogclose(0)> <input id=idx_dlgOkButton type=button value=OK onclick=dialogclose(1)><div><input id=idx_dlgDeleteButton type=button value=Delete style=display:none onclick=dialogclose(2)></div></div></div></div><script>var recFile=null,recFilePtr=0,recFileStartTime=0,recFileLastTime=0,recFileEndTime=0,recFileMetadata=null,recFileProtocol=0,agentDesktop=null,amtDesktop=null,playing=!1,readState=0,waitTimer=null,waitTimerArgs=null,deskAspectRatio=0,currentDeltaTimeTotalSec=0;function start(){window.onresize=deskAdjust,document.ondrop=ondrop,document.ondragover=ondragover,document.ondragleave=ondragleave,document.onkeypress=onkeypress,Q("PlaySpeed").value=1,cleanup()}function readNextBlock(l){if(recFilePtr+16>recFile.size)QS("progressbar").width="100%",l(-1);else{var e=new FileReader;e.onload=function(){var e=ReadShort(this.result,0),t=ReadShort(this.result,2),a=ReadInt(this.result,4),r=(ReadInt(this.result,8)<<32)+ReadInt(this.result,12);if(recFilePtr+16+a>recFile.size)QS("progressbar").width="100%",l(-1);else{var i=new FileReader;i.onload=function(){recFilePtr+=16+a,QS("progressbar").width=0==recFileEndTime?Math.floor(recFilePtr/recFile.size*100)+"%":Math.floor((recFileLastTime-recFileStartTime)/(recFileEndTime-recFileStartTime)*100)+"%",l(e,t,r,this.result)},i.readAsBinaryString(recFile.slice(recFilePtr+16,recFilePtr+16+a))}},e.readAsBinaryString(recFile.slice(recFilePtr,recFilePtr+16))}}function readLastBlock(i){if(recFile.size<32)i(-1);else{var e=new FileReader;e.onload=function(){var e=ReadShort(this.result,0),t=ReadShort(this.result,2),a=ReadInt(this.result,4),r=(ReadInt(this.result,8)<<32)+ReadInt(this.result,12);3==e&&16==a&&"MeshCentralMCREC"==this.result.substring(16,32)?i(e,t,r):i(-1)},e.readAsBinaryString(recFile.slice(recFile.size-32,recFile.size))}}function addInfo(e,t){return null==t?"":addInfoNoEsc(e,EscapeHtml(t))}function addInfoNoEsc(e,t){return null==t?"":"<span style=color:gray>"+EscapeHtml(e)+"</span>:&nbsp;<span style=font-size:20px>"+t+"</span><br/>"}function processFirstBlock(e,t,a,r){if(recFileProtocol=0,1==e&&0==t){try{recFileMetadata=JSON.parse(r)}catch(e){return void cleanup()}if(null!=recFileMetadata&&"MeshCentralRelaySession"==recFileMetadata.magic&&1==recFileMetadata.ver){var i="";if(i+=addInfo("Temps",recFileMetadata.time),0!=recFileEndTime){var l=Math.floor((recFileEndTime-a)/1e3);i+=addInfo("Duration",format("{0} second{1}",l,1<l?"s":""))}if(i+=addInfo("Nom d'utilisateur",recFileMetadata.username),i+=addInfo("Identifiant d'utilisateur",recFileMetadata.userid),i+=addInfo("SessionID",recFileMetadata.sessionid),recFileMetadata.ipaddr1&&recFileMetadata.ipaddr2&&(i+=addInfo("Addresses",format("{0} to {1}",recFileMetadata.ipaddr1,recFileMetadata.ipaddr2))),recFileMetadata.devicename&&(i+=addInfo("DeviceName",recFileMetadata.devicename)),i+=addInfo("NodeID",recFileMetadata.nodeid),recFileMetadata.protocol){var n=recFileMetadata.protocol;1==n?n="MeshCentral Terminal":2==n?n="MeshCentral Desktop":100==n?n="Intel&reg; AMT WSMAN":101==n&&(n="Intel&reg; AMT Redirection"),i+=addInfoNoEsc("Protocol",n)}QV("DeskParent",!0),QV("TermParent",!1),1==recFileMetadata.protocol?(recFileProtocol=1,i+="<br /><br /><span style=color:gray>Press [space] to play/pause.</span>",QE("PlayButton",!0),QE("PauseButton",!1),QE("RestartButton",!1),recFileStartTime=recFileLastTime=a):2==recFileMetadata.protocol?(recFileProtocol=2,i+="<br /><br /><span style=color:gray>Press [space] to play/pause.</span>",QE("PlayButton",!0),QE("PauseButton",!1),QE("RestartButton",!1),recFileStartTime=recFileLastTime=a,(agentDesktop=CreateAgentRemoteDesktop("Desk")).onScreenSizeChange=deskAdjust,agentDesktop.State=3,deskAdjust()):101==recFileMetadata.protocol&&(recFileProtocol=101,i+="<br /><br /><span style=color:gray>Press [space] to play/pause.</span>",QE("PlayButton",!0),QE("PauseButton",!1),QE("RestartButton",!1),recFileStartTime=recFileLastTime=a,(amtDesktop=CreateAmtRemoteDesktop("Desk")).onScreenSizeChange=deskAdjust,amtDesktop.State=3,amtDesktop.Start(),deskAdjust()),QV("metadatadiv",!0),QH("metadatadiv",i),QH("deskstatus",recFile.name)}else cleanup()}else cleanup()}function processBlock(e,t,a,r){if(e<0)pause();else{var i=Math.round((a-recFileLastTime)*parseFloat(Q("PlaySpeed").value));i<5?processBlockEx(e,t,a,r):(waitTimerArgs=[e,t,a,r],waitTimer=setTimeout(function(){waitTimer=null,processBlockEx(waitTimerArgs[0],waitTimerArgs[1],waitTimerArgs[2],waitTimerArgs[3])},i))}}function processBlockEx(e,t,a,r){if(0!=playing){var i=0!=(1&t),l=0!=(2&t),n=Math.floor((a-recFileStartTime)/1e3);if(currentDeltaTimeTotalSec!=n){currentDeltaTimeTotalSec=n;var o=Math.floor(n/3600);n-=3600*o;var s=Math.floor(n/60);n-=60*o;var c=Math.floor(n);QH("timespan",pad2(o)+":"+pad2(s)+":"+pad2(c))}2==e&&i&&!l?1==recFileProtocol?agentTerminal.ProcessData(r):2==recFileProtocol?agentDesktop.ProcessData(r):101==recFileProtocol&&(0==readState&&"4100000000000000"==rstr2hex(r)?(readState=1,8<r.length&&amtDesktop.ProcessData(r.substring(8))):1==readState&&amtDesktop.ProcessData(r)):2==e&&i&&l&&101==recFileProtocol&&"0000000008080001000700070003050200000000"==rstr2hex(r)&&(amtDesktop.bpp=1),recFileLastTime=a,playing&&readNextBlock(processBlock)}}function cleanup(){recFilePtr=0,playing=!1,(recFileMetadata=recFile=null)!=agentDesktop&&(agentDesktop.Canvas.clearRect(0,0,agentDesktop.CanvasId.width,agentDesktop.CanvasId.height),agentDesktop=null),null!=amtDesktop&&(amtDesktop.canvas.clearRect(0,0,amtDesktop.CanvasId.width,amtDesktop.CanvasId.height),amtDesktop=null),recFileEndTime=currentDeltaTimeTotalSec=readState=0,(agentTerminal=waitTimerArgs=null)!=waitTimer&&(clearTimeout(waitTimer),waitTimer=null),QH("deskstatus",""),QE("PlayButton",!1),QE("PauseButton",!1),QE("RestartButton",!1),QS("progressbar").width="0px",QH("timespan","00:00:00"),QV("metadatadiv",!0),QH("metadatadiv",'<span style="font-family:Arial,Helvetica Neue,Helvetica,sans-serif;font-size:28px">MeshCentral Session Player</span><br /><br /><span style=color:gray>Drag & drop a .mcrec file or click "Open File..."</span>'),QV("DeskParent",!0),QV("TermParent",!1)}function ondrop(e){if(haltEvent(e),QV("bigfail",!1),QV("bigok",!1),null!=e.dataTransfer){var t=[];for(var a in e.dataTransfer.files)null!=e.dataTransfer.files[a].type&&null!=e.dataTransfer.files[a].size&&0!=e.dataTransfer.files[a].size&&e.dataTransfer.files[a].name.endsWith(".mcrec")&&t.push(e.dataTransfer.files[a]);0!=t.length&&(cleanup(),recFile=t[0],recFilePtr=0,readNextBlock(processFirstBlock),readLastBlock(function(e,t,a){recFileEndTime=3==e?a:0}))}}var xxdialogMode,xxdialogFunc,xxdialogButtons,xxdialogTag,dragtimer=null;function ondragover(e){haltEvent(e),null!=dragtimer&&(clearTimeout(dragtimer),dragtimer=null);QV("bigok",!0),QV("bigfail",!1)}function ondragleave(e){haltEvent(e),dragtimer=setTimeout(function(){QV("bigfail",!1),QV("bigok",!1),dragtimer=null},10)}function onkeypress(e){xxdialogMode||(" "==e.key&&(togglePause(),haltEvent(e)),"1"==e.key&&(Q("PlaySpeed").value=4,haltEvent(e)),"2"==e.key&&(Q("PlaySpeed").value=2,haltEvent(e)),"3"==e.key&&(Q("PlaySpeed").value=1,haltEvent(e)),"4"==e.key&&(Q("PlaySpeed").value=.5,haltEvent(e)),"5"==e.key&&(Q("PlaySpeed").value=.25,haltEvent(e)),"6"==e.key&&(Q("PlaySpeed").value=.1,haltEvent(e)),"0"==e.key&&(pause(),restart(),haltEvent(e)))}function openfile(){setDialogMode(2,"Open File...",3,openfileEx,'<input type=file name=files id=p2fileinput style=width:100% accept=".mcrec" onchange="openfileChanged()" />'),QE("idx_dlgOkButton",!1)}function openfileEx(){var e=Q("p2fileinput").files;if(null!=e){var t=[];for(var a in e)null!=e[a].type&&null!=e[a].size&&0!=e[a].size&&e[a].name.endsWith(".mcrec")&&t.push(e[a])}0!=t.length&&(cleanup(),recFile=t[0],recFilePtr=0,readNextBlock(processFirstBlock),readLastBlock(function(e,t,a){recFileEndTime=3==e?a:0}),Q("OpenFileButton").blur())}function openfileChanged(){var e=Q("p2fileinput").files;if(null!=e){var t=[];for(var a in e)null!=e[a].type&&null!=e[a].size&&0!=e[a].size&&e[a].name.endsWith(".mcrec")&&t.push(e[a])}QE("idx_dlgOkButton",1==t.length)}function togglePause(){return null!=recFile&&(1==playing?pause():recFilePtr!=recFile.size&&play()),!1}function play(){Q("PlayButton").blur(),1!=playing&&0!=recFileProtocol&&(playing=!0,QV("metadatadiv",!1),QE("PlayButton",!1),QE("PauseButton",!0),QE("RestartButton",!1),1==recFileProtocol&&null==agentTerminal&&(QV("DeskParent",!1),QV("TermParent",!0),agentTerminal=CreateAmtRemoteTerminal("Term",{}),agentTerminal.State=3),readNextBlock(processBlock))}function pause(){Q("PauseButton").blur(),0!=playing&&(playing=!1,QE("PlayButton",recFilePtr!=recFile.size),QE("PauseButton",!1),QE("RestartButton",0!=recFilePtr),null!=waitTimer&&(clearTimeout(waitTimer),waitTimer=null,processBlockEx(waitTimerArgs[0],waitTimerArgs[1],waitTimerArgs[2],waitTimerArgs[3]),waitTimerArgs=null))}function restart(){Q("RestartButton").blur(),1!=playing&&(currentDeltaTimeTotalSec=readState=recFilePtr=0,QV("metadatadiv",!0),QE("PlayButton",!0),QE("PauseButton",!1),QE("RestartButton",!1),QS("progressbar").width="0px",QH("timespan","00:00:00"),QV("DeskParent",!0),QV("TermParent",!1),agentDesktop?agentDesktop.Canvas.clearRect(0,0,agentDesktop.CanvasId.width,agentDesktop.CanvasId.height):amtDesktop?(amtDesktop.canvas.clearRect(0,0,amtDesktop.CanvasId.width,amtDesktop.CanvasId.height),(amtDesktop=CreateAmtRemoteDesktop("Desk")).onScreenSizeChange=deskAdjust,amtDesktop.State=3,amtDesktop.Start()):agentTerminal=agentTerminal&&null)}function clearConsoleMsg(){QH("p11DeskConsoleMsg","")}function toggleAspectRatio(e){1===e&&(deskAspectRatio=(deskAspectRatio+1)%3),deskAdjust()}function deskAdjust(){var e=Q("DeskParent").clientHeight,t=Q("DeskParent").clientWidth,a=Q("Desk").height,r=Q("Desk").width;if(2==deskAspectRatio)QS("Desk")["margin-top"]=null,QS("Desk").height="100%",QS("Desk").width="100%",QS("DeskParent").overflow="hidden";else if(1==deskAspectRatio)QS("Desk")["margin-top"]="0px",QS("Desk").height=a+"px",QS("Desk").width=r+"px",QS("DeskParent").overflow="scroll";else{if(a/r<e/t){var i=a*t/r+"px";QS("Desk").height=i,QS("Desk").width="100%"}else{var l=r*e/a+"px";QS("Desk").height="100%",QS("Desk").width=l}QS("Desk")["margin-top"]=null,QS("DeskParent").overflow="hidden"}}var xxcurrentView=-1;function setDialogMode(e,t,a,r,i,l){xxdialogMode=e,xxdialogFunc=r,xxdialogButtons=a,xxdialogTag=l,QE("idx_dlgOkButton",!0),QV("idx_dlgOkButton",1&a),QV("idx_dlgCancelButton",2&a),QV("id_dialogclose",2&a||8&a),QV("idx_dlgDeleteButton",4&a),QV("idx_dlgButtonBar",7&a),t&&QH("id_dialogtitle",t);for(var n=1;n<3;n++)QV("dialog"+n,n==e);QV("dialog",e),i&&(2==e?QH("id_dialogOptions",i):QH("id_dialogMessage",i))}function dialogclose(e){var t=xxdialogFunc,a=xxdialogButtons,r=xxdialogTag;setDialogMode(),(8&a||e)&&t&&t(e,r)}function messagebox(e,t){setSessionActivity(),QH("id_dialogMessage",t),setDialogMode(1,e,1)}function statusbox(e,t){setSessionActivity(),QH("id_dialogMessage",t),setDialogMode(1,e)}function haltEvent(e){return e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1}function pad2(e){var t="00"+e;return t.substr(t.length-2)}function format(e){var a=Array.prototype.slice.call(arguments,1);return e.replace(/{(\d+)}/g,function(e,t){return void 0!==a[t]?a[t]:e})}start()</script>
\ No newline at end of file
translate/translate.js
+2 -2
@@ -141,7 +141,7 @@ function start() {
141 if (minifyLib = 2) {
142 var minifiedOut = minify(fs.readFileSync(outname).toString(), {
143 collapseBooleanAttributes: true,
144 - collapseInlineTagWhitespace: true,
144 + collapseInlineTagWhitespace: false, // This is not good.
145 collapseWhitespace: true,
146 minifyCSS: true,
147 minifyJS: true,
@@ -333,7 +333,7 @@ function translateFromHtml(lang, file, createSubDir) {
333 if (minifyLib = 2) {
334 var minifiedOut = minify(out, {
335 collapseBooleanAttributes: true,
336 - collapseInlineTagWhitespace: true,
336 + collapseInlineTagWhitespace: false, // This is not good.
337 collapseWhitespace: true,
338 minifyCSS: true,
339 minifyJS: true,
views/agentinvite-min.handlebars
+1 -1
@@ -1 +1 @@
1 -<!doctypehtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><title>MeshCentral - Agent Installation</title><style>.tab{overflow:hidden;border:1px solid #ccc;background-color:#f1f1f1}.tab button{background-color:inherit;float:left;border:none;outline:0;cursor:pointer;padding:14px 16px;transition:.3s}.tab button:hover{background-color:#ddd}.tab button.active{background-color:#8f8}.tabcontent{display:none;padding:6px 12px;border:1px solid #ccc;border-top:none}</style><body id=body onload='"undefined"!=typeof startup&&startup()'style=display:none;overflow:hidden><div id=container><div id=masthead class=noselect style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left;height:66px;color:#c8c8c8;padding-left:20px;padding-top:8px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div><p id=logoutControl style="color:#fff;font-size:11px;margin:10px 10px 0">{{{logoutControl}}}</div><div id=page_leftbar><div style=height:16px></div></div><div id=topbar class="noselect style3"style=height:24px;position:relative><div id=uiMenuButton title="User interface selection"onclick=showUserInterfaceSelectMenu()>&diams;<div id=uiMenu style=display:none><div id=uiViewButton1 class=uiSelector onclick=userInterfaceSelectMenu(1) title="Left bar interface"><div class=uiSelector1></div></div><div id=uiViewButton2 class=uiSelector onclick=userInterfaceSelectMenu(2) title="Top bar interface"><div class=uiSelector2></div></div><div id=uiViewButton3 class=uiSelector onclick=userInterfaceSelectMenu(3) title="Fixed width interface"><div class=uiSelector3></div></div><div id=uiViewButton4 class=uiSelector onclick=toggleNightMode() title="Toggle night mode"><div class=uiSelector4></div></div></div></div></div><div id=column_l style="max-height:calc(100vh - 135px);overflow-y:auto"><h1>Remote Agent Installation<span id=groupname></span></h1><p>You have been invited to install a software that will allow a remote operator to fully access your computer remotely including the desktop and files. Only follow the instructions below if this invitation was expected and you know who will be accessing your computer. Selecting your operation system and follow the instructions below.<div><div class=tab><button id=twintab64 class=tablinks onclick='openTab(event,"wintab64")'>Windows 64bit</button><button id=twintab32 class=tablinks onclick='openTab(event,"wintab32")'>Windows 32bit</button><button id=tlinuxtab class=tablinks onclick='openTab(event,"linuxtab")'>Linux</button><button id=tmacostab class=tablinks onclick='openTab(event,"macostab")'>MacOS</button></div><div id=wintab64 class=tabcontent style=background-color:#fff;color:#000><h3>Microsoft&trade; Windows 64bit</h3><p><a id=win64url>Download the software here</a>, run it and press "Install" or "Connect".<div style=text-align:center><img class=winagent-img src=images/winagent.png></div></div><div id=wintab32 class=tabcontent style=background-color:#fff;color:#000><h3>Microsoft&trade; Windows 32bit</h3><p><a id=win32url>Download the software here</a>, run it and press "Install" or "Connect".<div style=text-align:center><img class=winagent-img src=images/winagent.png></div></div><div id=linuxtab class=tabcontent style=background-color:#fff;color:#000><h3>Linux</h3><p>To install, cut and paste the following command in a root terminal.<div id=linuxinstall style="font-family:courier,'courier new',monospace;margin-left:30px"></div><input type=button value="Copy to clipboard"style=margin-left:30px;margin-top:4px onclick=copyToClipLinuxInstall()><p>To uninstall, cut and paste the following command as root.<div id=unlinuxinstall style="font-family:courier,'courier new',monospace;margin-left:30px"></div><input type=button value="Copy to clipboard"style=margin-left:30px;margin-top:4px onclick=copyToClipLinuxUnInstall()><br><br></div><div id=macostab class=tabcontent style=background-color:#fff;color:#000><h3>Apple&trade; MacOS</h3><p><a id=macosurl>Download the installer here</a>, right click on it or press "control" and click on the file. Then select "Open" and follow the instructions.<div style=text-align:center><img src=images/macosagent.png></div></div></div></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right></table></div></div><script>"use strict";var linuxInstall,linuxUnInstall,uiMode=parseInt(getstore("uiMode",1)),webPageStackMenu=!1,webPageFullScreen=!0,nightMode="1"==getstore("_nightMode","0"),domain="{{{domain}}}",domainUrl="{{{domainurl}}}",meshid="{{{meshid}}}",serverPort="{{{serverport}}}",serverHttps="{{{serverhttps}}}",serverNoProxy="{{{servernoproxy}}}",installFlags="{{{installflags}}}",groupName=decodeURIComponent("{{{meshname}}}");function showUserInterfaceSelectMenu(){Q("uiViewButton1").classList.remove("uiSelectorSel"),Q("uiViewButton2").classList.remove("uiSelectorSel"),Q("uiViewButton3").classList.remove("uiSelectorSel"),Q("uiViewButton4").classList.remove("uiSelectorSel");try{Q("uiViewButton"+uiMode).classList.add("uiSelectorSel")}catch(e){}QV("uiMenu","none"==QS("uiMenu").display),nightMode&&Q("uiViewButton4").classList.add("uiSelectorSel")}function userInterfaceSelectMenu(e){e&&putstore("uiMode",uiMode=e),webPageFullScreen=uiMode<3,webPageStackMenu=!0,toggleFullScreen(0),toggleStackMenu(0),QC("column_l").add("room4submenu")}function toggleNightMode(){(nightMode=!nightMode)?QC("body").add("night"):QC("body").remove("night"),putstore("_nightMode",nightMode?"1":"0")}function toggleFullScreen(e){1===e&&putstore("webPageFullScreen",webPageFullScreen=!webPageFullScreen);0==webPageFullScreen?(QC("body").remove("menu_stack"),QC("body").remove("fullscreen"),QC("body").remove("arg_hide")):QC("body").add("fullscreen"),QV("body",!0)}function toggleStackMenu(e){1==webPageFullScreen&&(1===e&&putstore("webPageStackMenu",webPageStackMenu=!webPageStackMenu),0==webPageStackMenu?QC("body").remove("menu_stack"):QC("body").add("menu_stack"))}function putstore(e,t){try{if("undefined"==typeof localStorage)return;localStorage.setItem(e,t)}catch(e){}}function getstore(e,t){try{if("undefined"==typeof localStorage)return t;var n=localStorage.getItem(e);return null==n||null==n?t:n}catch(e){return t}}function openTab(e,t){var n,s,l;for(s=document.getElementsByClassName("tabcontent"),n=0;n<s.length;n++)s[n].style.display="none";for(l=document.getElementsByClassName("tablinks"),n=0;n<l.length;n++)l[n].className=l[n].className.replace(" active","");document.getElementById(t).style.display="block",null!=e?e.currentTarget.className+=" active":document.getElementById("t"+t).className+=" active"}function setup(){var e=window.location.hostname,t=domainUrl.substring(0,domainUrl.length-1),n="meshagents?id=4&meshid="+meshid;if(0!=installFlags&&(n+="&installflags="+installFlags),Q("win64url").href=n,n="meshagents?id=3&meshid="+meshid,0!=installFlags&&(n+="&installflags="+installFlags),Q("win32url").href=n,n="meshosxagent?id=16&meshid="+meshid,Q("macosurl").href=n,1==serverHttps){var s=443==serverPort?"":":"+serverPort;linuxUnInstall=0==serverNoProxy?(linuxInstall="(wget https://"+e+s+domainUrl+"meshagents?script=1 --no-check-certificate -O ./meshinstall.sh || wget https://"+e+s+domainUrl+"meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh https://"+e+s+t+" '"+meshid+"'\r\n","(wget https://"+e+s+domainUrl+"meshagents?script=1 --no-check-certificate -O ./meshinstall.sh || wget https://"+e+s+domainUrl+"meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n"):(linuxInstall="wget https://"+e+s+domainUrl+"meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh https://"+e+s+t+" '"+meshid+"'\r\n","wget https://"+e+s+domainUrl+"meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n")}else{s=80==serverPort?"":":"+serverPort;linuxUnInstall=0==serverNoProxy?(linuxInstall="(wget http://"+e+s+domainUrl+"meshagents?script=1 -O ./meshinstall.sh || wget http://"+e+s+domainUrl+"meshagents?script=1 --no-proxy -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh http://"+e+s+t+" '"+meshid+"'\r\n","(wget http://"+e+s+domainUrl+"meshagents?script=1 -O ./meshinstall.sh || wget http://"+e+s+domainUrl+"meshagents?script=1 --no-proxy -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n"):(linuxInstall="wget http://"+e+s+domainUrl+"meshagents?script=1 --no-proxy -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh http://"+e+s+t+" '"+meshid+"'\r\n","wget http://"+e+s+domainUrl+"meshagents?script=1 --no-proxy -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n")}QH("linuxinstall",linuxInstall),QH("unlinuxinstall",linuxUnInstall),0<=navigator.userAgent.indexOf("Win64")?openTab(null,"wintab64"):0<=navigator.userAgent.indexOf("Windows")?openTab(null,"wintab32"):0<=navigator.userAgent.indexOf("Linux")?openTab(null,"linuxtab"):0<=navigator.userAgent.indexOf("Macintosh")?openTab(null,"macostab"):openTab(null,"wintab64")}function copyToClipLinuxInstall(){copyTextToClip(linuxInstall)}function copyToClipLinuxUnInstall(){copyTextToClip(linuxUnInstall)}function copyTextToClip(e){var t=document.createElement("DIV");t.textContent=e,document.body.appendChild(t),function(e){if(document.selection)(t=document.body.createTextRange()).moveToElementText(e),t.select();else if(window.getSelection){var t;(t=document.createRange()).selectNode(e),window.getSelection().removeAllRanges(),window.getSelection().addRange(t)}}(t),document.execCommand("copy"),t.remove()}""!=groupName&&QH("groupname"," for "+groupName),userInterfaceSelectMenu(),setup()</script>
\ No newline at end of file
1 +<!doctypehtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><title>MeshCentral - Agent Installation</title><style>.tab{overflow:hidden;border:1px solid #ccc;background-color:#f1f1f1}.tab button{background-color:inherit;float:left;border:none;outline:0;cursor:pointer;padding:14px 16px;transition:.3s}.tab button:hover{background-color:#ddd}.tab button.active{background-color:#8f8}.tabcontent{display:none;padding:6px 12px;border:1px solid #ccc;border-top:none}</style><body id=body onload='"undefined"!=typeof startup&&startup()'style=display:none;overflow:hidden><div id=container><div id=masthead class=noselect style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left;height:66px;color:#c8c8c8;padding-left:20px;padding-top:8px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div><p id=logoutControl style="color:#fff;font-size:11px;margin:10px 10px 0">{{{logoutControl}}}</div><div id=page_leftbar><div style=height:16px></div></div><div id=topbar class="noselect style3"style=height:24px;position:relative><div id=uiMenuButton title="User interface selection"onclick=showUserInterfaceSelectMenu()>&diams;<div id=uiMenu style=display:none><div id=uiViewButton1 class=uiSelector onclick=userInterfaceSelectMenu(1) title="Left bar interface"><div class=uiSelector1></div></div><div id=uiViewButton2 class=uiSelector onclick=userInterfaceSelectMenu(2) title="Top bar interface"><div class=uiSelector2></div></div><div id=uiViewButton3 class=uiSelector onclick=userInterfaceSelectMenu(3) title="Fixed width interface"><div class=uiSelector3></div></div><div id=uiViewButton4 class=uiSelector onclick=toggleNightMode() title="Toggle night mode"><div class=uiSelector4></div></div></div></div></div><div id=column_l style="max-height:calc(100vh - 135px);overflow-y:auto"><h1>Remote Agent Installation<span id=groupname></span></h1><p>You have been invited to install a software that will allow a remote operator to fully access your computer remotely including the desktop and files. Only follow the instructions below if this invitation was expected and you know who will be accessing your computer. Selecting your operation system and follow the instructions below.<div><div class=tab><button id=twintab64 class=tablinks onclick='openTab(event,"wintab64")'>Windows 64bit</button> <button id=twintab32 class=tablinks onclick='openTab(event,"wintab32")'>Windows 32bit</button> <button id=tlinuxtab class=tablinks onclick='openTab(event,"linuxtab")'>Linux</button> <button id=tmacostab class=tablinks onclick='openTab(event,"macostab")'>MacOS</button></div><div id=wintab64 class=tabcontent style=background-color:#fff;color:#000><h3>Microsoft&trade; Windows 64bit</h3><p><a id=win64url>Download the software here</a>, run it and press "Install" or "Connect".<div style=text-align:center><img class=winagent-img src=images/winagent.png></div></div><div id=wintab32 class=tabcontent style=background-color:#fff;color:#000><h3>Microsoft&trade; Windows 32bit</h3><p><a id=win32url>Download the software here</a>, run it and press "Install" or "Connect".<div style=text-align:center><img class=winagent-img src=images/winagent.png></div></div><div id=linuxtab class=tabcontent style=background-color:#fff;color:#000><h3>Linux</h3><p>To install, cut and paste the following command in a root terminal.<div id=linuxinstall style="font-family:courier,'courier new',monospace;margin-left:30px"></div><input type=button value="Copy to clipboard"style=margin-left:30px;margin-top:4px onclick=copyToClipLinuxInstall()><p>To uninstall, cut and paste the following command as root.<div id=unlinuxinstall style="font-family:courier,'courier new',monospace;margin-left:30px"></div><input type=button value="Copy to clipboard"style=margin-left:30px;margin-top:4px onclick=copyToClipLinuxUnInstall()><br><br></div><div id=macostab class=tabcontent style=background-color:#fff;color:#000><h3>Apple&trade; MacOS</h3><p><a id=macosurl>Download the installer here</a>, right click on it or press "control" and click on the file. Then select "Open" and follow the instructions.<div style=text-align:center><img src=images/macosagent.png></div></div></div></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right></table></div></div><script>"use strict";var linuxInstall,linuxUnInstall,uiMode=parseInt(getstore("uiMode",1)),webPageStackMenu=!1,webPageFullScreen=!0,nightMode="1"==getstore("_nightMode","0"),domain="{{{domain}}}",domainUrl="{{{domainurl}}}",meshid="{{{meshid}}}",serverPort="{{{serverport}}}",serverHttps="{{{serverhttps}}}",serverNoProxy="{{{servernoproxy}}}",installFlags="{{{installflags}}}",groupName=decodeURIComponent("{{{meshname}}}");function showUserInterfaceSelectMenu(){Q("uiViewButton1").classList.remove("uiSelectorSel"),Q("uiViewButton2").classList.remove("uiSelectorSel"),Q("uiViewButton3").classList.remove("uiSelectorSel"),Q("uiViewButton4").classList.remove("uiSelectorSel");try{Q("uiViewButton"+uiMode).classList.add("uiSelectorSel")}catch(e){}QV("uiMenu","none"==QS("uiMenu").display),nightMode&&Q("uiViewButton4").classList.add("uiSelectorSel")}function userInterfaceSelectMenu(e){e&&putstore("uiMode",uiMode=e),webPageFullScreen=uiMode<3,webPageStackMenu=!0,toggleFullScreen(0),toggleStackMenu(0),QC("column_l").add("room4submenu")}function toggleNightMode(){(nightMode=!nightMode)?QC("body").add("night"):QC("body").remove("night"),putstore("_nightMode",nightMode?"1":"0")}function toggleFullScreen(e){1===e&&putstore("webPageFullScreen",webPageFullScreen=!webPageFullScreen);0==webPageFullScreen?(QC("body").remove("menu_stack"),QC("body").remove("fullscreen"),QC("body").remove("arg_hide")):QC("body").add("fullscreen"),QV("body",!0)}function toggleStackMenu(e){1==webPageFullScreen&&(1===e&&putstore("webPageStackMenu",webPageStackMenu=!webPageStackMenu),0==webPageStackMenu?QC("body").remove("menu_stack"):QC("body").add("menu_stack"))}function putstore(e,t){try{if("undefined"==typeof localStorage)return;localStorage.setItem(e,t)}catch(e){}}function getstore(e,t){try{if("undefined"==typeof localStorage)return t;var n=localStorage.getItem(e);return null==n||null==n?t:n}catch(e){return t}}function openTab(e,t){var n,s,l;for(s=document.getElementsByClassName("tabcontent"),n=0;n<s.length;n++)s[n].style.display="none";for(l=document.getElementsByClassName("tablinks"),n=0;n<l.length;n++)l[n].className=l[n].className.replace(" active","");document.getElementById(t).style.display="block",null!=e?e.currentTarget.className+=" active":document.getElementById("t"+t).className+=" active"}function setup(){var e=window.location.hostname,t=domainUrl.substring(0,domainUrl.length-1),n="meshagents?id=4&meshid="+meshid;if(0!=installFlags&&(n+="&installflags="+installFlags),Q("win64url").href=n,n="meshagents?id=3&meshid="+meshid,0!=installFlags&&(n+="&installflags="+installFlags),Q("win32url").href=n,n="meshosxagent?id=16&meshid="+meshid,Q("macosurl").href=n,1==serverHttps){var s=443==serverPort?"":":"+serverPort;linuxUnInstall=0==serverNoProxy?(linuxInstall="(wget https://"+e+s+domainUrl+"meshagents?script=1 --no-check-certificate -O ./meshinstall.sh || wget https://"+e+s+domainUrl+"meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh https://"+e+s+t+" '"+meshid+"'\r\n","(wget https://"+e+s+domainUrl+"meshagents?script=1 --no-check-certificate -O ./meshinstall.sh || wget https://"+e+s+domainUrl+"meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n"):(linuxInstall="wget https://"+e+s+domainUrl+"meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh https://"+e+s+t+" '"+meshid+"'\r\n","wget https://"+e+s+domainUrl+"meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n")}else{s=80==serverPort?"":":"+serverPort;linuxUnInstall=0==serverNoProxy?(linuxInstall="(wget http://"+e+s+domainUrl+"meshagents?script=1 -O ./meshinstall.sh || wget http://"+e+s+domainUrl+"meshagents?script=1 --no-proxy -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh http://"+e+s+t+" '"+meshid+"'\r\n","(wget http://"+e+s+domainUrl+"meshagents?script=1 -O ./meshinstall.sh || wget http://"+e+s+domainUrl+"meshagents?script=1 --no-proxy -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n"):(linuxInstall="wget http://"+e+s+domainUrl+"meshagents?script=1 --no-proxy -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh http://"+e+s+t+" '"+meshid+"'\r\n","wget http://"+e+s+domainUrl+"meshagents?script=1 --no-proxy -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n")}QH("linuxinstall",linuxInstall),QH("unlinuxinstall",linuxUnInstall),0<=navigator.userAgent.indexOf("Win64")?openTab(null,"wintab64"):0<=navigator.userAgent.indexOf("Windows")?openTab(null,"wintab32"):0<=navigator.userAgent.indexOf("Linux")?openTab(null,"linuxtab"):0<=navigator.userAgent.indexOf("Macintosh")?openTab(null,"macostab"):openTab(null,"wintab64")}function copyToClipLinuxInstall(){copyTextToClip(linuxInstall)}function copyToClipLinuxUnInstall(){copyTextToClip(linuxUnInstall)}function copyTextToClip(e){var t=document.createElement("DIV");t.textContent=e,document.body.appendChild(t),function(e){if(document.selection)(t=document.body.createTextRange()).moveToElementText(e),t.select();else if(window.getSelection){var t;(t=document.createRange()).selectNode(e),window.getSelection().removeAllRanges(),window.getSelection().addRange(t)}}(t),document.execCommand("copy"),t.remove()}""!=groupName&&QH("groupname"," for "+groupName),userInterfaceSelectMenu(),setup()</script>
\ No newline at end of file
views/default-min.handlebars
+1 -1
@@ -1,4 +1,4 @@
1 -<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link rel="shortcut icon"type=image/x-icon href={{{domainurl}}}favicon.ico><link keeplink=1 type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><link type=text/css href=styles/ol.css media=screen rel=stylesheet title=CSS><link type=text/css href=styles/ol3-contextmenu.min.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><script src=scripts/meshcentral.js></script><script src=scripts/amt-0.2.0.js></script><script src=scripts/amt-wsman-0.2.0.js></script><script src=scripts/amt-desktop-0.0.2.js></script><script src=scripts/amt-terminal-0.0.2.js></script><script src=scripts/zlib.js></script><script src=scripts/zlib-inflate.js></script><script src=scripts/zlib-adler32.js></script><script src=scripts/zlib-crc32.js></script><script src=scripts/amt-redir-ws-0.1.0.js></script><script src=scripts/amt-wsman-ws-0.2.0.js></script><script src=scripts/agent-redir-ws-0.1.1.js></script><script src=scripts/agent-redir-rtc-0.1.0.js></script><script src=scripts/agent-desktop-0.0.2.js></script><script src=scripts/qrcode.min.js></script><script keeplink=1 src=scripts/u2f-api.js></script><script keeplink=1 src=scripts/charts.js></script><script keeplink=1 src=scripts/filesaver.js></script><script keeplink=1 src=scripts/ol.js></script><script keeplink=1 src=scripts/ol3-contextmenu.js></script><title>{{{title}}}</title><body id=body onload='"undefined"!=typeof startup&&startup()'oncontextmenu=handleContextMenu(event) style=display:none;min-width:495px><div id=contextMenu class="contextMenu noselect"style=display:none><div id=cxinfo class=cmtext onclick=cmaction(1,event)><b>Information</b></div><div id=cxdesktop class=cmtext onclick=cmaction(3,event)>Desktop</div><div id=cxterminal class=cmtext onclick=cmaction(2,event)>Terminal</div><div id=cxfiles class=cmtext onclick=cmaction(4,event)>Files</div><div id=cxevents class=cmtext onclick=cmaction(5,event)>Events</div><div id=cxconsole class=cmtext onclick=cmaction(6,event)>Console</div><hr id=cxmgroupsplit><div id=cxmdesktop class=cmtext onclick=cmaction(7,event) style=display:none>Multi-Desktop</div></div><div id=meshContextMenu class="contextMenu noselect"style=display:none;min-width:0><div id=cxselectall class=cmtext onclick=cmmeshaction(1,event)>Select All</div><div id=cxselectnone class=cmtext onclick=cmmeshaction(2,event)>Select None</div></div><div id=termShellContextMenu class="contextMenu noselect"style=display:none;min-width:0><div id=cxtermnorm class=cmtext onclick=cmtermaction(1,event)>Normal Connect</div><div id=cxtermps class=cmtext onclick=cmtermaction(2,event)>PowerShell Connect</div></div><div id=container><div id=notifiyBox class=notifiyBox style=display:none></div><div id=masthead class=noselect><div class=title>{{{title}}}</div><div class=title2>{{{title2}}}</div><div style=float:right><div id=notificationCount onclick=clickNotificationIcon() class=unselectable style=display:none title="Click to view current notifications">0</div></div><p id=logoutControl>{{{logoutControl}}}<span id=idleTimeoutNotify style=color:#ff0></span></div><div id=page_leftbar><div style=height:16px></div><div id=LeftMenuMyDevices tabindex=0 class="lbbutton lbbuttonsel"title="My Devices"onclick=go(1,event) onkeypress='"Enter"==event.key&&go(1)'><div class=lb2></div></div><div id=LeftMenuMyAccount tabindex=0 class=lbbutton title="My Account"onclick=go(2,event) onkeypress='"Enter"==event.key&&go(2)'><div class=lb1></div></div><div id=LeftMenuMyEvents tabindex=0 class=lbbutton title="My Events"onclick=go(3,event) onkeypress='"Enter"==event.key&&go(3)'><div class=lb3></div></div><div id=LeftMenuMyFiles tabindex=0 class=lbbutton style=display:none title="My Files"onclick=go(5,event) onkeypress='"Enter"==event.key&&go(5)'><div class=lb4></div></div><div id=LeftMenuMyUsers tabindex=0 class=lbbutton style=display:none title="My Users"onclick=go(4,event) onkeypress='"Enter"==event.key&&go(4)'><div class=lb5></div></div><div id=LeftMenuMyServer tabindex=0 class=lbbutton style=display:none title="My Server"onclick=go(6,event) onkeypress='"Enter"==event.key&&go(6)'><div class=lb6></div></div></div><div id=topbar class=noselect><div><div style=position:relative><div tabindex=0 id=uiMenuButton title="User interface selection"onclick=showUserInterfaceSelectMenu() onkeypress='"Enter"==event.key&&showUserInterfaceSelectMenu()'>&diams;<div id=uiMenu style=display:none><div tabindex=0 id=uiViewButton1 class=uiSelector onclick=userInterfaceSelectMenu(1) title="Left bar interface"onkeypress='"Enter"==event.key&&userInterfaceSelectMenu(1)'><div class=uiSelector1></div></div><div tabindex=0 id=uiViewButton2 class=uiSelector onclick=userInterfaceSelectMenu(2) title="Top bar interface"onkeypress='"Enter"==event.key&&userInterfaceSelectMenu(2)'><div class=uiSelector2></div></div><div tabindex=0 id=uiViewButton3 class=uiSelector onclick=userInterfaceSelectMenu(3) title="Fixed width interface"onkeypress='"Enter"==event.key&&userInterfaceSelectMenu(3)'><div class=uiSelector3></div></div><div tabindex=0 id=uiViewButton4 class=uiSelector onclick=toggleNightMode() title="Toggle night mode"onkeypress='"Enter"==event.key&&toggleNightMode()'><div class=uiSelector4></div></div></div></div><table id=MainMenuSpan cellpadding=0 cellspacing=0 class=style1><tr><td tabindex=0 id=MainMenuMyDevices class="topbar_td style3x"onclick=go(1,event) onkeypress='"Enter"==event.key&&go(1)'>My Devices<td tabindex=0 id=MainMenuMyAccount class="topbar_td style3x"onclick=go(2,event) onkeypress='"Enter"==event.key&&go(2)'>My Account<td tabindex=0 id=MainMenuMyEvents class="topbar_td style3x"onclick=go(3,event) onkeypress='"Enter"==event.key&&go(3)'>My Events<td tabindex=0 id=MainMenuMyFiles class="topbar_td style3x"onclick=go(5,event) onkeypress='"Enter"==event.key&&go(5)'>My Files<td tabindex=0 id=MainMenuMyUsers class="topbar_td style3x"onclick=go(4,event) onkeypress='"Enter"==event.key&&go(4)'>My Users<td tabindex=0 id=MainMenuMyServer class="topbar_td style3x"onclick=go(6,event) onkeypress='"Enter"==event.key&&go(6)'>My Server<td class="topbar_td_end style3">&nbsp;</table><div id=MainSubMenuSpan style=display:none><table id=MainSubMenu cellpadding=0 cellspacing=0 class=style1><tr><td tabindex=0 id=MainDev class="topbar_td style3x"onclick=go(10,event) onkeypress='"Enter"==event.key&&go(10)'>General<td tabindex=0 id=MainDevDesktop class="topbar_td style3x"onclick=go(11,event) onkeypress='"Enter"==event.key&&go(11)'>Desktop<td tabindex=0 id=MainDevTerminal class="topbar_td style3x"onclick=go(12,event) onkeypress='"Enter"==event.key&&go(12)'>Terminal<td tabindex=0 id=MainDevFiles class="topbar_td style3x"onclick=go(13,event) onkeypress='"Enter"==event.key&&go(13)'>Files<td tabindex=0 id=MainDevEvents class="topbar_td style3x"onclick=go(16,event) onkeypress='"Enter"==event.key&&go(16)'>Events<td tabindex=0 id=MainDevInfo class="topbar_td style3x"onclick=go(17,event) onkeypress='"Enter"==event.key&&go(17)'>Details<td tabindex=0 id=MainDevAmt class="topbar_td style3x"onclick=go(14,event) onkeypress='"Enter"==event.key&&go(14)'>Intel&reg; AMT<td tabindex=0 id=MainDevConsole class="topbar_td style3x"onclick=go(15,event) onkeypress='"Enter"==event.key&&go(15)'>Console<td tabindex=0 id=MainDevPlugins class="topbar_td style3x"onclick=go(19,event) onkeypress='"Enter"==event.key&&go(19)'>Plugins<td class="topbar_td_end style3">&nbsp;</table></div><div id=MeshSubMenuSpan style=display:none><table id=MeshSubMenu cellpadding=0 cellspacing=0 class=style1><tr><td tabindex=0 id=MeshGeneral class="topbar_td style3x"onclick=go(20,event) onkeypress='"Enter"==event.key&&go(20)'>General<td class="topbar_td_end style3">&nbsp;</table></div><div id=UserSubMenuSpan style=display:none><table id=UserSubMenu cellpadding=0 cellspacing=0 class=style1><tr><td tabindex=0 id=UserGeneral class="topbar_td style3x"onclick=go(30,event) onkeypress='"Enter"==event.key&&go(30)'>General<td tabindex=0 id=UserEvents class="topbar_td style3x"onclick=go(31,event) onkeypress='"Enter"==event.key&&go(31)'>Events<td class="topbar_td_end style3">&nbsp;</table></div><div id=ServerSubMenuSpan style=display:none><table id=ServerSubMenu cellpadding=0 cellspacing=0 class=style1><tr><td tabindex=0 id=ServerGeneral class="topbar_td style3x"onclick=go(6,event) onkeypress='"Enter"==event.key&&go(6)'>General<td tabindex=0 id=ServerStats class="topbar_td style3x"onclick=go(40,event) onkeypress='"Enter"==event.key&&go(40)'>Stats<td tabindex=0 id=ServerConsole class="topbar_td style3x"onclick=go(115,event) onkeypress='"Enter"==event.key&&go(115)'>Console<td tabindex=0 id=ServerTrace class="topbar_td style3x"onclick=go(41,event) onkeypress='"Enter"==event.key&&go(41)'>Trace<td class="topbar_td_end style3">&nbsp;</table></div><div id=UserDummyMenuSpan><table id=UserDummyMenu cellpadding=0 cellspacing=0 class=style1><tr><td class=style3>&nbsp;</table></div></div></div></div><div id=column_l><div id=p0 style=display:none><div id=p0message><span id=p0span>Server disconnected</span>,<href onclick=reload() style=cursor:pointer><u>click to reconnect</u></href>.</div></div><div id=p1 style=display:none><div style=display:none id=devListToolbarViewIcons><div tabindex=0 id=devViewButton1 class=viewSelector onclick=onDeviceViewChange(1) onkeypress='"Enter"==event.key&&onDeviceViewChange(1)'title=Columns><div class=viewSelector2></div></div><div tabindex=0 id=devViewButton2 class=viewSelector onclick=onDeviceViewChange(2) onkeypress='"Enter"==event.key&&onDeviceViewChange(2)'title=List><div class=viewSelector1></div></div><div tabindex=0 id=devViewButton3 class=viewSelector onclick=onDeviceViewChange(3) onkeypress='"Enter"==event.key&&onDeviceViewChange(3)'title=Desktops><div class=viewSelector3></div></div><div tabindex=0 id=devViewButton4 class=viewSelector onclick=onDeviceViewChange(4) onkeypress='"Enter"==event.key&&onDeviceViewChange(4)'title=Map><div class=viewSelector4></div></div></div><div><h1>My Devices</h1></div><table id=devListToolbarSpan class=noselect><tr><td class=h1><td id=devListToolbar class=style14 style=display:none>&nbsp;&nbsp;<input type=button id=SelectAllButton onclick=selectallButtonFunction() value="Select All">&nbsp; <input type=button id=GroupActionButton disabled value="Group Action"onclick=groupActionFunction()>&nbsp; <input id=SearchInput placeholder=Filter onchange=masterUpdate(5) onkeyup=masterUpdate(5) autocomplete=off onfocus=onSearchFocus(1) onblur=onSearchFocus(0)>&nbsp;<label><input type=checkbox id=RealNameCheckBox onclick=onRealNameCheckBox()><span title="Show devices operating system name">OS Name</span></label><td id=kvmListToolbar class=style14 style=display:none>&nbsp;&nbsp;<span id=kvmMultiConnectButtonSpan><input type=button onclick=connectAllKvmFunction() value="Connect All">&nbsp;</span><input type=button onclick=disconnectAllKvmFunction() value="Disconnect All">&nbsp;<span id=kvmAutoConnectButtonSpan><label><input type=checkbox id=autoConnectDesktopCheckbox onclick=autoConnectDesktops(event) title="Automatic connect">Auto&nbsp;</label></span><input type=button onclick=showMultiDesktopSettings() value=Settings>&nbsp;<td id=devMapToolbar class=style14 style=display:none>&nbsp;&nbsp;<input id=mapSearchLocation placeholder="Search Location"onfocus=onMapSearchFocus(1) onblur=onMapSearchFocus(0)> <input type=button value=Search title="Search for location"onclick=getSearchLocation()> <input type=button id=refreshmap title="Reset map view"value=Reset onclick=refreshMap(!1,!0)><td class=auto-style1 style=height:100%><div style=display:none id=devListToolbarView>View<select id=viewselect onchange=onDeviceViewChange()><option value=1>Columns<option value=2>List<option value=3>Desktops<option id=viewselectmapoption value=4>Map</select></div><div style=display:none id=devListToolbarSort>Sort<select id=sortselect onchange=masterUpdate(6)><option>Group<option>Power<option>Device<option>Tags</select>&nbsp;</div><div style=display:none id=devListToolbarSize>Size<select id=sizeselect onchange=onDeviceViewChange()><option value=0>Small<option value=1>Medium<option value=2>Large</select>&nbsp;</div><td class=h2></table><div id=NoMeshesPanel style=display:none><table><tr><td valign=top style=width:50px><img src=images/info.png><td><div id=getStarted1>To get started,<a href=# onclick="return account_createMesh()"><strong>click here to create a device group</strong></a>.</div><div id=getStarted2>No device groups.</div></table></div><div id=xdevices class=noselect style=display:none></div><div id=xdevicesmap style=display:none><div id=xmapSearchResultsDlg style=display:none><div id=xmapSearchResultsBck><div id=xmapSearchClose onclick=mapCloseSearchWindow()><b>X</b></div><div style=padding:5px>Location Results</div><div style=width:100%;margin:6px></div></div><div id=xmapSearchResults style=margin:6px></div></div></div><div id=xmap-info-window></div></div><div id=p2 style=display:none><h1>My Account</h1><img id=p2AccountImage alt=""src=images/clipboard-128.png><div id=p2AccountSecurity style=display:none><p><strong>Account security</strong><div style=margin-left:25px><div id=manageAuthApp><div class=p2AccountActions><span id=authAppSetupCheck><strong>&#x2713;</strong></span></div><span><a href=# onclick="return account_manageAuthApp()">Manage authenticator app</a><br></span></div><div id=manageHardwareOtp><div class=p2AccountActions><span id=authKeySetupCheck><strong>&#x2713;</strong></span></div><span><a href=# onclick="return account_manageHardwareOtp(0)">Manage security keys</a><br></span></div><div id=manageOtp><div class=p2AccountActions><span id=authCodesSetupCheck><strong>&#x2713;</strong></span></div><span><a href=# onclick="return account_manageOtp(0)">Manage backup codes</a><br></span></div></div></div><div id=p2AccountActions><p><strong>Account actions</strong><p class=mL><span id=verifyEmailId style=display:none><a href=# onclick="return account_showVerifyEmail()">Verify email</a><br></span><span id=accountEnableNotificationsSpan style=display:none><a href=# onclick="return account_enableNotifications()">Enable web notifications</a><br></span><a href=# onclick="return account_showLocalizationSettings()">Localization Settings</a><br><a href=# onclick="return account_showAccountNotifySettings()">Notification Settings</a><br><span id=accountChangeEmailAddressSpan style=display:none><a href=# onclick="return account_showChangeEmail()">Change email address</a><br></span><a href=# onclick="return account_showChangePassword()">Change password</a><span id=p2nextPasswordUpdateTime></span><br><a href=# onclick="return account_showDeleteAccount()">Delete account</a><br></p><br style=clear:both></div><strong>Device Groups</strong><span id=p2createMeshLink1>(<a href=# onclick="return account_createMesh()"class=newMeshBtn>New</a>)</span><br><br><div id=p2meshes></div><div id=p2noMeshFound style=display:none>No device groups.<span id=p2createMeshLink2><a href=# onclick="return account_createMesh()"><strong>Get started here!</strong></a></span></div><br style=clear:both></div><div id=p3 style=display:none><h1>My Events</h1><table class=pTable><tr><td class=h1><td class=auto-style1>Show<select id=p3limitdropdown onchange=refreshEvents()><option value=60>Last 60<option value=120>Last 120<option value=250>Last 250<option value=500>Last 500<option value=1000>Last 1000</select>&nbsp;<a href=# onclick=p3showDownloadEventsDialog(2)><img src=images/link4.png height=10 width=10 title="Download Events"style=cursor:pointer></a>&nbsp;<td class=h2></table><div id=p3events></div></div><div id=p4 style=display:none><h1>My Users</h1><table class=pTable><tr><td class=h1><td class=style14><div style=float:right><input type=button onclick=showUserBroadcastDialog() style=margin-right:6px value=Broadcast><a href=# onclick=p4downloadUserInfo()><img style=cursor:pointer title="Download user information"src=images/link4.png></a><a href=# onclick=p4batchAccountCreate()><img id=p4UserBatchCreate style=cursor:pointer;display:none title="Batch create many user accounts"src=images/link6.png></a></div><div><input id=UserNewAccountButton type=button style=margin-left:6px onclick=showCreateNewAccountDialog() value="New Account..."> <input id=UserSearchInput style=width:120px;margin-left:6px placeholder=Filter onchange=onUserSearchInputChanged() onkeyup=onUserSearchInputChanged() autocomplete=off onfocus=onUserSearchFocus(1) onblur=onUserSearchFocus(0)></div><td class=h2></table><div id=p3users></div></div><div id=p5 style=display:none><h1>My Files</h1><table id=p5toolbar cellpadding=0 cellspacing=0><tr><td id=p5filehead valign=bottom><div id=p5rightOfButtons></div><div><input type=button id=p5FolderUp disabled onclick="return p5folderup()"value=Up>&nbsp; <input type=button id=p5SelectAllButton disabled onclick=p5selectallfile() value="Select All">&nbsp; <input type=button id=p5RenameFileButton disabled value=Rename onclick=p5renamefile()>&nbsp; <input type=button id=p5DeleteFileButton disabled value=Delete onclick=p5deletefile()>&nbsp; <input type=button id=p5NewFolderButton disabled value="New Folder"onclick=p5createfolder()>&nbsp; <input type=button id=p5UploadButton disabled value=Upload onclick=p5uploadFile()>&nbsp; <input type=button id=p5CutButton disabled value=Cut onclick=p5copyFile(1)>&nbsp; <input type=button id=p5CopyButton disabled value=Copy onclick=p5copyFile(0)>&nbsp; <input type=button id=p5PasteButton disabled value=Paste onclick=p5pasteFile()>&nbsp;</div><tr><td id=p5filesubhead><div style=float:right><select id=p5sortdropdown onchange=updateFiles()><option value=1 selected>Sort by name<option value=2>Sort by size<option value=3>Sort by date<option value=4>Descend by name<option value=5>Descend by size<option value=6>Descend by date</select></div><div>&nbsp;&nbsp;<span id=p5currentpath></span></div></table><div id=p5filetable><div id=p5PublicShare><div>These files are shared publicly, click "link" to get public url.</div></div><div id=bigok style=display:none><b>&checkmark;</b></div><div id=bigfail style=display:none><b>&#10007;</b></div><span id=p5files></span></div><table id=p5toolbarBottom style=width:100% cellpadding=0 cellspacing=0><tr><td class=style6>&nbsp;<span id=p5bottomstatus></span></table></div><div id=p6 style=display:none><img id=MainMeshImage src=serverpic.ashx><h1>My Server</h1><div id=p2ServerActions><p><strong>Server actions</strong><div class=mL><div id=p2ServerActionsBackup><a href={{{domainurl}}}backup.zip rel="noreferrer noopener"target=_blank>Download server backup</a></div><div id=p2ServerActionsRestore><a href=# onclick="return server_showRestoreDlg()">Restore server with backup</a></div><div id=p2ServerActionsVersion><a href=# onclick="return server_showVersionDlg()">Check server version</a></div><div id=p2ServerActionsErrors><a href=# onclick="return server_showErrorsDlg()">Show server error log</a></div></div></div><br><strong>Server Statistics</strong><br><br><div id=serverStats><div id=serverCpuChartView style=display:none><div class=chartViewCanvas><canvas id=serverCpuChart></canvas></div><div class=chartViewText id=serverCpuChartText></div></div><div id=serverMemoryChartView style=display:none><div class=chartViewCanvas><canvas id=serverMemoryChart></canvas></div><div class=chartViewText id=serverMemoryChartText></div></div><br><br><div id=serverStatsTable></div></div></div><div id=p10 style=display:none><table style=width:100% cellpadding=0 cellspacing=0><tr><td style=width:auto valign=top><div id=p10title><div id=p10BackButton><div class=backButton tabindex=0 onclick=goBack() title=Back onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><h1>General -<span id=p10deviceName></span></h1></div><div id=p10html></div><td style=width:20px><td style=width:200px><a href=# onclick=p10showiconselector()><img id=MainComputerImage></a><div id=MainComputerState></div></table><br><div id=p10html2></div><div id=p10html3></div></div><div id=p11 class=noselect style=display:none><div id=p11title><div id=p11deviceNameHeader><div id=p11BackButton><div class=backButton tabindex=0 onclick=goBack() title=Back onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><div id=devListToolbarViewIcons><div class=viewSelector onclick=deskToggleFull(event) title="Full Screen. Hold shift to browser full screen."><div class=viewSelector5></div></div></div><h1>Desktop -<span id=p11deviceName></span></h1></div></div><div id=p11warning onclick=showFeaturesDlg()><div class=icon2></div><div class=warningbox>Intel&reg; AMT Redirection port or KVM feature is disabled<span id=p11warninga>, click here to enable it.</span></div></div><div id=p11warning2 onclick=showPowerActionDlg()><div class=icon2></div><div class=warningbox>Remote computer is not powered on, click here to issue a power command.</div></div><div id=deskarea0 cellpadding=0 cellspacing=0><div id=deskarea1 class=areaHead><div class=toright2><span id=p11power></span>&nbsp;<div class=deskareaicon title="Toggle View Mode"onclick=toggleAspectRatio(1)>&#8690;</div><div class=deskareaicon title="Rotate Left"onclick=drotate(-1)>&olarr;</div><div class=deskareaicon title="Rotate Right"onclick=drotate(1)>&orarr;</div><div id=deskRecordIcon class=deskareaicon title="Server is recording this session"style=display:none;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px></div><input id=deskFocusBtn type=button title="Toggle focus mode, when active only the region around the mouse is updated"onkeypress=return!1 onkeydown=return!1 value="Focus All"onclick=deskToggleFocus() style=margin-right:3px;display:none> <input id=deskSaveBtn type=button title="Save a screenshot of the remote desktop"onkeypress=return!1 onkeydown=return!1 value=Save... onclick=deskSaveImage() class=mR> <input id=deskActionsBtn type=button title="Perform power actions on the device"onkeypress=return!1 onkeydown=return!1 value=Actions onclick=deviceActionFunction() class=mR> <input id=deskActionsSettings type=button value=Settings... title="Edit remote desktop settings"onkeypress=return!1 onkeydown=return!1 onclick=showDesktopSettings() class=mR> <input type=button title="Change the power state of the remote machine"onkeypress=return!1 onkeydown=return!1 value="Power Actions..."onclick=showPowerActionDlg() style=display:none></div><div><div id=idx_deskFullBtn2 onclick=deskToggleFull(event)>&nbsp;&#x2716;</div><input type=button id=autoconnectbutton1 value=AutoConnect onclick=autoConnectDesktop(event) onkeypress=return!1 onkeydown=return!1 style=display:none><span id=connectbutton1span><input type=button id=connectbutton1 value=Connect onclick=connectDesktop(event,1) onkeypress=return!1 onkeydown=return!1 disabled></span><span id=connectbutton1hspan>&nbsp;<input type=button id=connectbutton1h value="HW Connect"onclick=connectDesktop(event,2) onkeypress=return!1 onkeydown=return!1 disabled></span><span id=disconnectbutton1span>&nbsp;<input type=button id=disconnectbutton1 value=Disconnect onclick=connectDesktop(event,0) onkeypress=return!1 onkeydown=return!1></span>&nbsp;<span id=deskstatus>Disconnected</span></div></div><div id=deskarea2><div class=areaProgress><div id=progressbar></div></div></div><div id=deskarea3x><div id=DeskFocus oncontextmenu=return!1 onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event)></div><div id=DeskParent><canvas id=Desk width=640 height=480 oncontextmenu=return!1 onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel=dmousewheel(event)></canvas></div><div id=DeskTools><div id=deskToolsAreaTop><a id=DeskToolsRefreshButton style=right:2px onclick=refreshDeskTools()>Refresh</a><div id=deskToolsTopTabProcess class=deskToolsTopTab onclick=changeDeskToolTab(0) style=left:0;bottom:0>Processes</div><div id=deskToolsTopTabService class=deskToolsTopTab onclick=changeDeskToolTab(1) style=display:none;left:90px;color:gray>Services</div></div><div id=deskToolsArea><div id=DeskToolsProcessTab><div id=deskToolsHeader><a class=colmn1 title="Sort by process id"onclick=sortProcess(0)>PID</a><a class=colmn2 title="Sort by name"onclick=sortProcess(1)>Name</a></div><div id=DeskToolsProcesses></div></div><div id=DeskToolsServiceTab style=display:none><div id=deskToolsServiceHeader><a class=colmn1 style=width:70px title="Sort by state"onclick=sortService(0)>State</a><a class=colmn2 title="Sort by name"onclick=sortService(1)>Name</a></div><div id=DeskToolsServices></div></div></div></div><div id=p11DeskConsoleMsg style=display:none;cursor:pointer;position:absolute;left:30px;top:17px;color:#ff0;background-color:rgba(0,0,0,.6);padding:10px;border-radius:5px onclick=p11clearConsoleMsg()></div></div><div id=deskarea4 class=areaFoot><div class=toright2><span id=DeskTimer title="Session time"></span>&nbsp;<select id=termdisplays style=display:none onchange=deskSetDisplay(event) onkeypress=return!1 onkeydown=return!1></select>&nbsp; <input id=DeskToolsButton type=button value=Tools title="Toggle tools view"onkeypress=return!1 onkeydown=return!1 onclick=toggleDeskTools()>&nbsp;<span id=DeskChatButton class=deskarea title="Open chat window to this computer"><img src=images/icon-chat.png onclick=deviceChat() height=16 width=16 style=padding-top:2px></span><span id=DeskNotifyButton title="Display a notification on the remote computer"><img src=images/icon-notify.png onclick=deviceToastFunction() height=16 width=16 style=padding-top:2px></span><span id=DeskOpenWebButton title="Open a web address on remote computer"><img src=images/icon-url2.png onclick=deviceUrlFunction() height=16 width=16 style=padding-top:2px></span></div><div><select id=deskkeys><option value=10>Ctrl+Alt+Del<option value=5>Win<option value=0>Win+Down<option value=1>Win+Up<option value=2>Win+L<option value=3>Win+M<option value=4>Shift+Win+M<option value=6>Win+R<option value=7>Alt-F4<option value=8>Ctrl-W<option value=9>Alt-Tab<option value=11>Win+Left<option value=12>Win+Right</select><input id=DeskWD type=button value=Send onkeypress=return!1 onkeydown=return!1 onclick=deskSendKeys()> <input id=DeskClip type=button value=Clipboard onkeypress=return!1 onkeydown=return!1 onclick=showDeskClip()> <input id=DeskType type=button value=Type onkeypress=return!1 onkeydown=return!1 onclick=showDeskType()><label><span id=DeskControlSpan title="Toggle mouse and keyboard input"><input id=DeskControl type=checkbox onkeypress=return!1 onkeydown=return!1 onclick=toggleKvmControl()>Input</span></label>&nbsp;</div></div></div></div><div id=p12 style=display:none><div id=p12title><div id=p12BackButton><div class=backButton tabindex=0 onclick=goBack() title=Back onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><h1>Terminal -<span id=p12deviceName></span></h1></div><div id=p12warning onclick=showFeaturesDlg()><div class=icon2></div><div class=warningbox>Intel&reg; AMT Redirection port or KVM feature is disabled<span id=p12warninga>, click here to enable it.</span></div></div><div id=p12warning2 onclick=showPowerActionDlg()><div class=icon2></div><div class=warningbox>Remote computer is not powered on, click here to issue a power command.</div></div><div id=termTable style=position:relative><table style=width:100% cellpadding=0 cellspacing=0><tr><td class=areaHead><div class=toright2><div id=termRecordIcon class=deskareaicon title="Server is recording this session"style=display:none;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-left:5px></div><input id=termActionsBtn type=button title="Perform power actions on the device"onkeypress=return!1 onkeydown=return!1 value=Actions onclick=deviceActionFunction()></div><div><input type=button id=autoconnectbutton2 value=AutoConnect onclick=autoConnectTerminal(event) onkeypress=return!1 onkeydown=return!1 style=display:none><span id=connectbutton2span><input type=button id=connectbutton2 value=Connect onclick=connectTerminal(event,1) onkeypress=return!1 onkeydown=return!1 disabled></span><span id=connectbutton2hspan>&nbsp;<input type=button id=connectbutton2h value="HW Connect"onclick=connectTerminal(event,2) onkeypress=return!1 onkeydown=return!1 disabled></span><span id=disconnectbutton2span>&nbsp;<input type=button id=disconnectbutton2 value=Disconnect onclick=connectTerminal(event,0) onkeypress=return!1 onkeydown=return!1></span>&nbsp;<span id=termstatus>Disconnected</span><span id=termtitle></span></div><tr><td><div class=areaProgress><div id=termprogressbar></div></div><tr><td id=termarea3x><pre id=Term></pre><tr><td class=areaFoot><div class=toright2><span id=TermTimer title="Session time"></span>&nbsp;<span id=terminalSettingsButtons style=display:none><input id=id_tcrbutton type=button onkeypress=return!1 onkeydown=return!1 class=bottombutton value=CR+LF title="Toggle what the return key will send"onclick=termToggleCr()> <input id=id_tfxkeysbutton type=button onkeypress=return!1 onkeydown=return!1 class=bottombutton value="Intel (F10 = ESC+[OM)"title="Toggle F1 to F10 keys emulation type"onclick=termToggleFx()> <input id=id_ttypebutton type=button onkeypress=return!1 onkeydown=return!1 class=bottombutton value="Extended Ascii"title="Toggle terminal emulation type"onclick=termToggleType()></span><span id=terminalSizeDropDown><select id=termSizeList onkeypress=return!1><option value=1>80x25<option value=2>100x30<option value=3 selected>Auto</select></span><select id=specialkeylist onkeypress=return!1></select><input id=specialkeylistinput type=button onkeypress=return!1 class=bottombutton value=Send title="Send the selected special key"onclick=sendSpecialKey()></div><div>&nbsp; <input type=button onkeypress=return!1 onkeydown=return!1 class=bottombutton id=ctrlcbutton value=Ctl-C onclick='termSendKey(3,"ctrlcbutton")'> <input type=button onkeypress=return!1 onkeydown=return!1 class=bottombutton id=ctrlxbutton value=Ctl-X onclick='termSendKey(24,"ctrlxbutton")'> <input type=button onkeypress=return!1 onkeydown=return!1 class=bottombutton id=escbutton value=ESC onclick='termSendKey(27,"escbutton")'> <input type=button onkeypress=return!1 onkeydown=return!1 class=bottombutton id=bsbutton value=Backspace onclick='termSendKey(8,"bsbutton")'> <input type=button onkeypress=return!1 onkeydown=return!1 class=bottombutton id=pastebutton value=Paste title="Paste text into the terminal"onclick=showTermPasteDialog()></div></table><div id=p12TermConsoleMsg style=display:none;cursor:pointer;position:absolute;left:30px;top:45px;color:#ff0;background-color:rgba(0,0,0,.6);padding:10px;border-radius:5px onclick=p12clearConsoleMsg()></div></div></div><div id=p13 style=display:none><div id=p13title><div id=p13BackButton style=float:left><div class=backButton tabindex=0 onclick=goBack() title=Back onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><h1>Files -<span id=p13deviceName></span></h1></div><table id=p13toolbar cellpadding=0 cellspacing=0><tr><td class=areaHead><div class=toright2><input id=filesActionsBtn type=button title="Perform power actions on the device"value=Actions onclick=deviceActionFunction()><div id=filesRecordIcon class=deskareaicon title="Server is recording this session"style=display:none;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-left:5px></div></div><div><input id=p13AutoConnect value=AutoConnect onclick=autoConnectFiles(event) type=button style=display:none> <input id=p13Connect value=Connect onclick=connectFiles(event) type=button><span id=p13Status>Disconnected</span></div><tr><td class=areaHead2 valign=bottom><div id=p13rightOfButtons class=toright2></div><div><input type=button id=p13FolderUp disabled onclick=p13folderup() value=Up>&nbsp; <input type=button id=p13SelectAllButton disabled onclick=p13selectallfile() value="Select All">&nbsp; <input type=button id=p13RenameFileButton disabled value=Rename onclick=p13renamefile()>&nbsp; <input type=button id=p13DeleteFileButton disabled value=Delete onclick=p13deletefile()>&nbsp; <input type=button id=p13ViewFileButton disabled value=Edit onclick=p13viewfile()>&nbsp; <input type=button id=p13NewFolderButton disabled value="New Folder"onclick=p13createfolder()>&nbsp; <input type=button id=p13UploadButton disabled value=Upload onclick=p13uploadFile()>&nbsp; <input type=button id=p13CutButton disabled value=Cut onclick=p13copyFile(1)>&nbsp; <input type=button id=p13CopyButton disabled value=Copy onclick=p13copyFile(0)>&nbsp; <input type=button id=p13PasteButton disabled value=Paste onclick=p13pasteFile()>&nbsp; <input type=button id=p13RefreshButton disabled value=Refresh onclick=p13folderup(9999)>&nbsp;</div><tr><td class=areaHead3><div class=toright2><select id=p13sortdropdown onchange=p13updateFiles()><option value=1 selected>Sort by name<option value=2>Sort by size<option value=3>Sort by date<option value=4>Descend by name<option value=5>Descend by size<option value=6>Descend by date</select></div><div>&nbsp;&nbsp;<span id=p13currentpath></span></div></table><div id=p13FilesConsoleMsg style=display:none;cursor:pointer;position:absolute;left:30px;top:165px;color:#ff0;background-color:rgba(0,0,0,.6);padding:10px;border-radius:5px onclick=p13clearConsoleMsg()></div><div id=p13filetable><div id=p13bigok style=display:none><b>&checkmark;</b></div><div id=p13bigfail style=display:none><b>&#10007;</b></div><span id=p13files></span></div><table id=p13toolbarBottom cellpadding=0 cellspacing=0><tr><td class=style6>&nbsp;<span id=p13bottomstatus></span></table></div><div id=p14 style=display:none><div id=p14title><div id=p14BackButton style=float:left><div class=backButton tabindex=0 onclick=goBack() title=Back onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><div id=devListToolbarViewIcons><div class=viewSelector onclick=deskToggleFull(event) title="Full Screen. Hold shift to browser full screen."><div class=viewSelector5></div></div></div><h1>Intel&reg; AMT -<span id=p14deviceName></span></h1></div><iframe id=p14iframe src={{{domainurl}}}commander.htm></iframe></div><div id=p15 style=display:none><div id=p15title><div id=p15BackButton style=float:left><div class=backButton tabindex=0 onclick=goBack() title=Back onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><h1><span id=p15deviceName></span></h1></div><table id=consoleTable cellpadding=0 cellspacing=0><tr><td class=areaHead><div class=toright2><div id=p15coreName title="Information about current core running on this agent"></div><input type=button id=p15uploadCore value="Agent Action"onclick=p15uploadCore(event) title="Change the agent Java Script code module"> <img onclick=p15downloadConsoleText() style=cursor:pointer;margin-top:6px title="Download console text"src=images/link4.png></div><div id=p15statetext></div><tr><td><div class=areaProgress><div id=consoleprogressbar></div></div><tr><td id=p15agentConsole><pre id=p15agentConsoleText></pre><tr><td class=areaFoot><table style=width:100%><tr><td style=width:99%><input id=p15consoleText style=width:100% onkeyup=p15consoleSend(event) onfocus=onConsoleFocus(1) onblur=onConsoleFocus(0)><td>&nbsp;<td id=p15outputselecttd><select id=p15outputselect><option value=1>Agent<option value=2>MQTT</select><td style=width:1%><input id=id_p15consoleClear type=button class=bottombutton value=Clear onclick=p15consoleClear()></table></table></div><div id=p16 style=display:none><div id=p16title><div id=p16BackButton style=float:left><div class=backButton tabindex=0 onclick=goBack() title=Back onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><h1>Events -<span id=p16deviceName></span></h1></div><table class=pTable><tr><td class=h1><td class=auto-style1>Show<select id=p16limitdropdown onchange=refreshDeviceEvents()><option value=60>Last 60<option value=120>Last 120<option value=250>Last 250<option value=500>Last 500<option value=1000>Last 1000</select><a href=# onclick=p3showDownloadEventsDialog(1)><img src=images/link4.png height=10 width=10 title="Download Events"style=cursor:pointer></a>&nbsp;<td class=h2></table><div id=p16events></div></div><div id=p17 style=display:none><div id=p17title><div id=p17BackButton style=float:left><div class=backButton tabindex=0 onclick=goBack() title=Back onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><h1>Details -<span id=p17deviceName></span></h1></div><div id=p17info></div></div><div id=p20 style=display:none><picture id=MainMeshImage style=border-width:0;height:200px;width:200px;float:right><source type=image/webp width=200 height=200 srcset=images/webp/mesh-256.webp><img alt=""width=200 height=200 src=images/mesh-256.png></picture><div style=float:left><div class=backButton tabindex=0 onclick=goBack() title=Back onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><h1>General -<span id=p20meshName></span></h1><p id=p20info></div><div id=p30 style=display:none><table style=width:100% cellpadding=0 cellspacing=0><tr><td style=width:auto valign=top><div id=p30title><div style=float:left><div class=backButton tabindex=0 onclick=goBack() title=Back onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><h1>General -<span id=p30userName></span></h1></div><div id=p30html></div><td style=width:20px><td style=width:200px><picture id=MainUserImage style=border-width:0;height:200px;width:200px;float:right><source type=image/webp width=200 height=200 srcset=images/webp/user-256.webp><img alt=""width=200 height=200 src=images/user-256.png></picture><div style=width:100%;text-align:center><strong><span id=MainUserState></span></strong></div></table><br><div id=p30html2></div><div id=p30html3></div></div><div id=p31 style=display:none><div style=float:left><div class=backButton tabindex=0 onclick=goBack() title=Back onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><h1>Events -<span id=p31userName></span></h1><table class=pTable><tr><td class=h1><td class=auto-style1>Show<select id=p31limitdropdown onchange=refreshUsersEvents()><option value=60>Last 60<option value=120>Last 120<option value=250>Last 250<option value=500>Last 500<option value=1000>Last 1000</select><a href=# onclick=p3showDownloadEventsDialog(3)><img src=images/link4.png height=10 width=10 title="Download Events"style=cursor:pointer></a>&nbsp;<td class=h2></table><div id=p31events></div></div><div id=p40 style=display:none><h1>My Server Stats</h1><div class=areaHead><div class=toright2><select id=p40type onchange=updateServerTimelineStats()><option value=0>Connections<option value=1>Memory</select>&nbsp;<select id=p40time onchange=updateServerTimelineHours()><option value=3>Last 3 hours<option value=8>Last 8 hours<option value=24>Last day<option value=168>Last week<option value=720>Last 30 days</select>&nbsp; <img src=images/link4.png height=10 width=10 title="Download data points (.csv)"style=cursor:pointer onclick=p40downloadEvents()>&nbsp;</div><div><input value=Refresh type=button onclick=refreshServerTimelineStats()> &nbsp;<label><input id=p40log type=checkbox onclick=updateServerTimelineHours()>Log-X</label></div></div><canvas id=serverMainStats></canvas></div><div id=p41 style=display:none><h1>My Server Tracing</h1><div class=areaHead><div class=toright2>Show<select id=p41limitdropdown onchange=displayServerTrace()><option value=100>Last 100<option value=250>Last 250<option value=500>Last 500<option value=1000>Last 1000</select><input value=Clear type=button onclick=clearServerTracing()> <img src=images/link4.png height=10 width=10 title="Download trace (.csv)"style=cursor:pointer onclick=p41downloadServerTrace()>&nbsp;</div><div><input value=Tracing type=button onclick=setServerTracing()><span id=p41traceStatus>None</span></div></div><div id=p41events></div></div><div id=p19 style=display:none><h1>Plugins -<span id=p19deviceName></span></h1><style>#p19headers{padding-right:7px;padding-bottom:10px;font-weight:700;border-bottom:1px dotted #00f}#p19headers>span:nth-child(n+2){border-left:1px solid #000}#p19headers>span{padding-left:4px;padding-right:4px}</style><div id=p19headers></div><div id=p19pages></div></div><br id=column_l_bottomgap></div><div id=footer><div class=footer1>{{{footer}}}</div><div class=footer2><a id=verifyEmailId2 style=display:none href=# onclick=account_showVerifyEmail()>Verify Email</a>&nbsp;<a href=terms>Terms &amp; Privacy</a></div></div><div id=dialog class=noselect style=display:none><div id=dialogHeader><div tabindex=0 id=id_dialogclose onclick=setDialogMode() onkeypress='"Enter"==event.key&&setDialogMode()'>&#x2716;</div><div id=id_dialogtitle></div></div><div id=dialogBody><div id=dialog1><div id=id_dialogMessage></div></div><div id=dialog2><div id=id_dialogOptions></div></div><div id=dialog3><div id=d3upload><div>File Selection</div><select id=d3uploadMode onchange=d3modechange()><option value=1>Local file upload<option value=2>Server file selection</select></div><div id=d3localmode style=display:none><div>Upload File</div><form id=d3localmodeform method=post enctype=multipart/form-data action=uploadfile.ashx target=fileUploadFrame><input id=d3auth name=auth style=display:none> <input id=d3attrib name=attrib style=display:none> <input type=file id=d3localFile name=files onchange=d3setActions()> <input type=submit id=d3submit style=display:none></form></div><div id=d3servermode><div id=d3serveraction valign=bottom><input type=button id=p3FolderUp disabled onclick=d3folderup() value=Up>&nbsp;</div><div id=d3serverfiles></div></div></div><div id=dialog7><div id=d7meshkvm><h4>Agent Remote Desktop</h4><div><div>Quality</div><select id=d7bitmapquality dir=rtl></select></div><div><div>Scaling</div><select id=d7bitmapscaling dir=rtl><option selected value=1024>100%<option value=896>87.5%<option value=768>75%<option value=640>62.5%<option value=512>50%<option value=384>37.5%<option value=256>25%<option value=128>12.5%</select></div><div><div>Frame rate</div><select id=d7framelimiter dir=rtl><option selected value=50>Fast<option value=100>Medium<option value=400>Slow<option value=1000>Very slow</select></div></div><div id=d7amtkvm><h4>Intel&reg; AMT Hardware KVM</h4><div><div>Image Encoding</div><select id=d7desktopmode><option value=1>RLE8, Fastest<option value=2>RLE16, Recommended<option value=3>RAW8, Slow<option value=4>RAW16, Very Slow</select></div><div><div>Other Settings</div><div id=d7otherset style=display:block><label style=display:block><input type=checkbox id=d7showfocus>Show Focus Tool</label><label style=display:block><input type=checkbox id=d7showcursor>Show Local Mouse Cursor</label><label style=display:block><input type=checkbox id=d7localKeyMap>Local Keyboard Map</label></div></div></div></div></div><div id=idx_dlgButtonBar><input id=idx_dlgCancelButton type=button value=Cancel onclick=dialogclose(0)> <input id=idx_dlgOkButton type=button value=OK onclick=dialogclose(1)><div><input id=idx_dlgDeleteButton type=button value=Delete style=display:none onclick=dialogclose(2)></div></div></div><iframe name=fileUploadFrame style=display:none></iframe><form style=display:none method=post action=uploadfile.ashx enctype=multipart/form-data target=fileUploadFrame><input id=p5fileDragName name=name><input id=p5fileDragAuthCookie name=auth><input id=p5fileDragSize name=size><input id=p5fileDragType name=type><input id=p5fileDragData name=data><input id=p5fileDragLink name=link><input type=submit id=p5loginSubmit2 style=display:none></form><form style=display:none method=post action=uploadnodefile.ashx enctype=multipart/form-data target=fileUploadFrame><input id=p13fileDragName name=name><input id=p13fileDragSize name=size><input id=p13fileDragType name=type><input id=p13fileDragData name=data><input id=p13fileDragLink name=link><input type=submit id=p13loginSubmit2 style=display:none></form><audio id=chimes><source src=sounds/chimes.mp3 type=audio/mp3></audio></div><script>'use strict';
1 +<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link rel="shortcut icon"type=image/x-icon href={{{domainurl}}}favicon.ico><link keeplink=1 type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><link type=text/css href=styles/ol.css media=screen rel=stylesheet title=CSS><link type=text/css href=styles/ol3-contextmenu.min.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><script src=scripts/meshcentral.js></script><script src=scripts/amt-0.2.0.js></script><script src=scripts/amt-wsman-0.2.0.js></script><script src=scripts/amt-desktop-0.0.2.js></script><script src=scripts/amt-terminal-0.0.2.js></script><script src=scripts/zlib.js></script><script src=scripts/zlib-inflate.js></script><script src=scripts/zlib-adler32.js></script><script src=scripts/zlib-crc32.js></script><script src=scripts/amt-redir-ws-0.1.0.js></script><script src=scripts/amt-wsman-ws-0.2.0.js></script><script src=scripts/agent-redir-ws-0.1.1.js></script><script src=scripts/agent-redir-rtc-0.1.0.js></script><script src=scripts/agent-desktop-0.0.2.js></script><script src=scripts/qrcode.min.js></script><script keeplink=1 src=scripts/u2f-api.js></script><script keeplink=1 src=scripts/charts.js></script><script keeplink=1 src=scripts/filesaver.js></script><script keeplink=1 src=scripts/ol.js></script><script keeplink=1 src=scripts/ol3-contextmenu.js></script><title>{{{title}}}</title><body id=body onload='"undefined"!=typeof startup&&startup()'oncontextmenu=handleContextMenu(event) style=display:none;min-width:495px><div id=contextMenu class="contextMenu noselect"style=display:none><div id=cxinfo class=cmtext onclick=cmaction(1,event)><b>Information</b></div><div id=cxdesktop class=cmtext onclick=cmaction(3,event)>Desktop</div><div id=cxterminal class=cmtext onclick=cmaction(2,event)>Terminal</div><div id=cxfiles class=cmtext onclick=cmaction(4,event)>Files</div><div id=cxevents class=cmtext onclick=cmaction(5,event)>Events</div><div id=cxconsole class=cmtext onclick=cmaction(6,event)>Console</div><hr id=cxmgroupsplit><div id=cxmdesktop class=cmtext onclick=cmaction(7,event) style=display:none>Multi-Desktop</div></div><div id=meshContextMenu class="contextMenu noselect"style=display:none;min-width:0><div id=cxselectall class=cmtext onclick=cmmeshaction(1,event)>Select All</div><div id=cxselectnone class=cmtext onclick=cmmeshaction(2,event)>Select None</div></div><div id=termShellContextMenu class="contextMenu noselect"style=display:none;min-width:0><div id=cxtermnorm class=cmtext onclick=cmtermaction(1,event)>Normal Connect</div><div id=cxtermps class=cmtext onclick=cmtermaction(2,event)>PowerShell Connect</div></div><div id=container><div id=notifiyBox class=notifiyBox style=display:none></div><div id=masthead class=noselect><div class=title>{{{title}}}</div><div class=title2>{{{title2}}}</div><div style=float:right><div id=notificationCount onclick=clickNotificationIcon() class=unselectable style=display:none title="Click to view current notifications">0</div></div><p id=logoutControl>{{{logoutControl}}}<span id=idleTimeoutNotify style=color:#ff0></span></div><div id=page_leftbar><div style=height:16px></div><div id=LeftMenuMyDevices tabindex=0 class="lbbutton lbbuttonsel"title="My Devices"onclick=go(1,event) onkeypress='"Enter"==event.key&&go(1)'><div class=lb2></div></div><div id=LeftMenuMyAccount tabindex=0 class=lbbutton title="My Account"onclick=go(2,event) onkeypress='"Enter"==event.key&&go(2)'><div class=lb1></div></div><div id=LeftMenuMyEvents tabindex=0 class=lbbutton title="My Events"onclick=go(3,event) onkeypress='"Enter"==event.key&&go(3)'><div class=lb3></div></div><div id=LeftMenuMyFiles tabindex=0 class=lbbutton style=display:none title="My Files"onclick=go(5,event) onkeypress='"Enter"==event.key&&go(5)'><div class=lb4></div></div><div id=LeftMenuMyUsers tabindex=0 class=lbbutton style=display:none title="My Users"onclick=go(4,event) onkeypress='"Enter"==event.key&&go(4)'><div class=lb5></div></div><div id=LeftMenuMyServer tabindex=0 class=lbbutton style=display:none title="My Server"onclick=go(6,event) onkeypress='"Enter"==event.key&&go(6)'><div class=lb6></div></div></div><div id=topbar class=noselect><div><div style=position:relative><div tabindex=0 id=uiMenuButton title="User interface selection"onclick=showUserInterfaceSelectMenu() onkeypress='"Enter"==event.key&&showUserInterfaceSelectMenu()'>&diams;<div id=uiMenu style=display:none><div tabindex=0 id=uiViewButton1 class=uiSelector onclick=userInterfaceSelectMenu(1) title="Left bar interface"onkeypress='"Enter"==event.key&&userInterfaceSelectMenu(1)'><div class=uiSelector1></div></div><div tabindex=0 id=uiViewButton2 class=uiSelector onclick=userInterfaceSelectMenu(2) title="Top bar interface"onkeypress='"Enter"==event.key&&userInterfaceSelectMenu(2)'><div class=uiSelector2></div></div><div tabindex=0 id=uiViewButton3 class=uiSelector onclick=userInterfaceSelectMenu(3) title="Fixed width interface"onkeypress='"Enter"==event.key&&userInterfaceSelectMenu(3)'><div class=uiSelector3></div></div><div tabindex=0 id=uiViewButton4 class=uiSelector onclick=toggleNightMode() title="Toggle night mode"onkeypress='"Enter"==event.key&&toggleNightMode()'><div class=uiSelector4></div></div></div></div><table id=MainMenuSpan cellpadding=0 cellspacing=0 class=style1><tr><td tabindex=0 id=MainMenuMyDevices class="topbar_td style3x"onclick=go(1,event) onkeypress='"Enter"==event.key&&go(1)'>My Devices<td tabindex=0 id=MainMenuMyAccount class="topbar_td style3x"onclick=go(2,event) onkeypress='"Enter"==event.key&&go(2)'>My Account<td tabindex=0 id=MainMenuMyEvents class="topbar_td style3x"onclick=go(3,event) onkeypress='"Enter"==event.key&&go(3)'>My Events<td tabindex=0 id=MainMenuMyFiles class="topbar_td style3x"onclick=go(5,event) onkeypress='"Enter"==event.key&&go(5)'>My Files<td tabindex=0 id=MainMenuMyUsers class="topbar_td style3x"onclick=go(4,event) onkeypress='"Enter"==event.key&&go(4)'>My Users<td tabindex=0 id=MainMenuMyServer class="topbar_td style3x"onclick=go(6,event) onkeypress='"Enter"==event.key&&go(6)'>My Server<td class="topbar_td_end style3">&nbsp;</table><div id=MainSubMenuSpan style=display:none><table id=MainSubMenu cellpadding=0 cellspacing=0 class=style1><tr><td tabindex=0 id=MainDev class="topbar_td style3x"onclick=go(10,event) onkeypress='"Enter"==event.key&&go(10)'>General<td tabindex=0 id=MainDevDesktop class="topbar_td style3x"onclick=go(11,event) onkeypress='"Enter"==event.key&&go(11)'>Desktop<td tabindex=0 id=MainDevTerminal class="topbar_td style3x"onclick=go(12,event) onkeypress='"Enter"==event.key&&go(12)'>Terminal<td tabindex=0 id=MainDevFiles class="topbar_td style3x"onclick=go(13,event) onkeypress='"Enter"==event.key&&go(13)'>Files<td tabindex=0 id=MainDevEvents class="topbar_td style3x"onclick=go(16,event) onkeypress='"Enter"==event.key&&go(16)'>Events<td tabindex=0 id=MainDevInfo class="topbar_td style3x"onclick=go(17,event) onkeypress='"Enter"==event.key&&go(17)'>Details<td tabindex=0 id=MainDevAmt class="topbar_td style3x"onclick=go(14,event) onkeypress='"Enter"==event.key&&go(14)'>Intel&reg; AMT<td tabindex=0 id=MainDevConsole class="topbar_td style3x"onclick=go(15,event) onkeypress='"Enter"==event.key&&go(15)'>Console<td tabindex=0 id=MainDevPlugins class="topbar_td style3x"onclick=go(19,event) onkeypress='"Enter"==event.key&&go(19)'>Plugins<td class="topbar_td_end style3">&nbsp;</table></div><div id=MeshSubMenuSpan style=display:none><table id=MeshSubMenu cellpadding=0 cellspacing=0 class=style1><tr><td tabindex=0 id=MeshGeneral class="topbar_td style3x"onclick=go(20,event) onkeypress='"Enter"==event.key&&go(20)'>General<td class="topbar_td_end style3">&nbsp;</table></div><div id=UserSubMenuSpan style=display:none><table id=UserSubMenu cellpadding=0 cellspacing=0 class=style1><tr><td tabindex=0 id=UserGeneral class="topbar_td style3x"onclick=go(30,event) onkeypress='"Enter"==event.key&&go(30)'>General<td tabindex=0 id=UserEvents class="topbar_td style3x"onclick=go(31,event) onkeypress='"Enter"==event.key&&go(31)'>Events<td class="topbar_td_end style3">&nbsp;</table></div><div id=ServerSubMenuSpan style=display:none><table id=ServerSubMenu cellpadding=0 cellspacing=0 class=style1><tr><td tabindex=0 id=ServerGeneral class="topbar_td style3x"onclick=go(6,event) onkeypress='"Enter"==event.key&&go(6)'>General<td tabindex=0 id=ServerStats class="topbar_td style3x"onclick=go(40,event) onkeypress='"Enter"==event.key&&go(40)'>Stats<td tabindex=0 id=ServerConsole class="topbar_td style3x"onclick=go(115,event) onkeypress='"Enter"==event.key&&go(115)'>Console<td tabindex=0 id=ServerTrace class="topbar_td style3x"onclick=go(41,event) onkeypress='"Enter"==event.key&&go(41)'>Trace<td class="topbar_td_end style3">&nbsp;</table></div><div id=UserDummyMenuSpan><table id=UserDummyMenu cellpadding=0 cellspacing=0 class=style1><tr><td class=style3>&nbsp;</table></div></div></div></div><div id=column_l><div id=p0 style=display:none><div id=p0message><span id=p0span>Server disconnected</span>,<href onclick=reload() style=cursor:pointer><u>click to reconnect</u></href>.</div></div><div id=p1 style=display:none><div style=display:none id=devListToolbarViewIcons><div tabindex=0 id=devViewButton1 class=viewSelector onclick=onDeviceViewChange(1) onkeypress='"Enter"==event.key&&onDeviceViewChange(1)'title=Columns><div class=viewSelector2></div></div><div tabindex=0 id=devViewButton2 class=viewSelector onclick=onDeviceViewChange(2) onkeypress='"Enter"==event.key&&onDeviceViewChange(2)'title=List><div class=viewSelector1></div></div><div tabindex=0 id=devViewButton3 class=viewSelector onclick=onDeviceViewChange(3) onkeypress='"Enter"==event.key&&onDeviceViewChange(3)'title=Desktops><div class=viewSelector3></div></div><div tabindex=0 id=devViewButton4 class=viewSelector onclick=onDeviceViewChange(4) onkeypress='"Enter"==event.key&&onDeviceViewChange(4)'title=Map><div class=viewSelector4></div></div></div><div><h1>My Devices</h1></div><table id=devListToolbarSpan class=noselect><tr><td class=h1><td id=devListToolbar class=style14 style=display:none>&nbsp;&nbsp;<input type=button id=SelectAllButton onclick=selectallButtonFunction() value="Select All">&nbsp; <input type=button id=GroupActionButton disabled value="Group Action"onclick=groupActionFunction()>&nbsp; <input id=SearchInput placeholder=Filter onchange=masterUpdate(5) onkeyup=masterUpdate(5) autocomplete=off onfocus=onSearchFocus(1) onblur=onSearchFocus(0)>&nbsp; <label><input type=checkbox id=RealNameCheckBox onclick=onRealNameCheckBox()><span title="Show devices operating system name">OS Name</span></label><td id=kvmListToolbar class=style14 style=display:none>&nbsp;&nbsp;<span id=kvmMultiConnectButtonSpan><input type=button onclick=connectAllKvmFunction() value="Connect All">&nbsp;</span> <input type=button onclick=disconnectAllKvmFunction() value="Disconnect All">&nbsp; <span id=kvmAutoConnectButtonSpan><label><input type=checkbox id=autoConnectDesktopCheckbox onclick=autoConnectDesktops(event) title="Automatic connect">Auto&nbsp;</label></span> <input type=button onclick=showMultiDesktopSettings() value=Settings>&nbsp;<td id=devMapToolbar class=style14 style=display:none>&nbsp;&nbsp;<input id=mapSearchLocation placeholder="Search Location"onfocus=onMapSearchFocus(1) onblur=onMapSearchFocus(0)> <input type=button value=Search title="Search for location"onclick=getSearchLocation()> <input type=button id=refreshmap title="Reset map view"value=Reset onclick=refreshMap(!1,!0)><td class=auto-style1 style=height:100%><div style=display:none id=devListToolbarView>View <select id=viewselect onchange=onDeviceViewChange()><option value=1>Columns<option value=2>List<option value=3>Desktops<option id=viewselectmapoption value=4>Map</select></div><div style=display:none id=devListToolbarSort>Sort <select id=sortselect onchange=masterUpdate(6)><option>Group<option>Power<option>Device<option>Tags</select> &nbsp;</div><div style=display:none id=devListToolbarSize>Size <select id=sizeselect onchange=onDeviceViewChange()><option value=0>Small<option value=1>Medium<option value=2>Large</select> &nbsp;</div><td class=h2></table><div id=NoMeshesPanel style=display:none><table><tr><td valign=top style=width:50px><img src=images/info.png><td><div id=getStarted1>To get started, <a href=# onclick="return account_createMesh()"><strong>click here to create a device group</strong></a>.</div><div id=getStarted2>No device groups.</div></table></div><div id=xdevices class=noselect style=display:none></div><div id=xdevicesmap style=display:none><div id=xmapSearchResultsDlg style=display:none><div id=xmapSearchResultsBck><div id=xmapSearchClose onclick=mapCloseSearchWindow()><b>X</b></div><div style=padding:5px>Location Results</div><div style=width:100%;margin:6px></div></div><div id=xmapSearchResults style=margin:6px></div></div></div><div id=xmap-info-window></div></div><div id=p2 style=display:none><h1>My Account</h1><img id=p2AccountImage alt=""src=images/clipboard-128.png><div id=p2AccountSecurity style=display:none><p><strong>Account security</strong><div style=margin-left:25px><div id=manageAuthApp><div class=p2AccountActions><span id=authAppSetupCheck><strong>&#x2713;</strong></span></div><span><a href=# onclick="return account_manageAuthApp()">Manage authenticator app</a><br></span></div><div id=manageHardwareOtp><div class=p2AccountActions><span id=authKeySetupCheck><strong>&#x2713;</strong></span></div><span><a href=# onclick="return account_manageHardwareOtp(0)">Manage security keys</a><br></span></div><div id=manageOtp><div class=p2AccountActions><span id=authCodesSetupCheck><strong>&#x2713;</strong></span></div><span><a href=# onclick="return account_manageOtp(0)">Manage backup codes</a><br></span></div></div></div><div id=p2AccountActions><p><strong>Account actions</strong><p class=mL><span id=verifyEmailId style=display:none><a href=# onclick="return account_showVerifyEmail()">Verify email</a><br></span><span id=accountEnableNotificationsSpan style=display:none><a href=# onclick="return account_enableNotifications()">Enable web notifications</a><br></span><a href=# onclick="return account_showLocalizationSettings()">Localization Settings</a><br><a href=# onclick="return account_showAccountNotifySettings()">Notification Settings</a><br><span id=accountChangeEmailAddressSpan style=display:none><a href=# onclick="return account_showChangeEmail()">Change email address</a><br></span><a href=# onclick="return account_showChangePassword()">Change password</a><span id=p2nextPasswordUpdateTime></span><br><a href=# onclick="return account_showDeleteAccount()">Delete account</a><br></p><br style=clear:both></div><strong>Device Groups</strong> <span id=p2createMeshLink1>( <a href=# onclick="return account_createMesh()"class=newMeshBtn>New</a> )</span><br><br><div id=p2meshes></div><div id=p2noMeshFound style=display:none>No device groups.<span id=p2createMeshLink2> <a href=# onclick="return account_createMesh()"><strong>Get started here!</strong></a></span></div><br style=clear:both></div><div id=p3 style=display:none><h1>My Events</h1><table class=pTable><tr><td class=h1><td class=auto-style1>Show <select id=p3limitdropdown onchange=refreshEvents()><option value=60>Last 60<option value=120>Last 120<option value=250>Last 250<option value=500>Last 500<option value=1000>Last 1000</select>&nbsp; <a href=# onclick=p3showDownloadEventsDialog(2)><img src=images/link4.png height=10 width=10 title="Download Events"style=cursor:pointer></a>&nbsp;<td class=h2></table><div id=p3events></div></div><div id=p4 style=display:none><h1>My Users</h1><table class=pTable><tr><td class=h1><td class=style14><div style=float:right><input type=button onclick=showUserBroadcastDialog() style=margin-right:6px value=Broadcast> <a href=# onclick=p4downloadUserInfo()><img style=cursor:pointer title="Download user information"src=images/link4.png></a><a href=# onclick=p4batchAccountCreate()><img id=p4UserBatchCreate style=cursor:pointer;display:none title="Batch create many user accounts"src=images/link6.png></a></div><div><input id=UserNewAccountButton type=button style=margin-left:6px onclick=showCreateNewAccountDialog() value="New Account..."> <input id=UserSearchInput style=width:120px;margin-left:6px placeholder=Filter onchange=onUserSearchInputChanged() onkeyup=onUserSearchInputChanged() autocomplete=off onfocus=onUserSearchFocus(1) onblur=onUserSearchFocus(0)></div><td class=h2></table><div id=p3users></div></div><div id=p5 style=display:none><h1>My Files</h1><table id=p5toolbar cellpadding=0 cellspacing=0><tr><td id=p5filehead valign=bottom><div id=p5rightOfButtons></div><div><input type=button id=p5FolderUp disabled onclick="return p5folderup()"value=Up>&nbsp; <input type=button id=p5SelectAllButton disabled onclick=p5selectallfile() value="Select All">&nbsp; <input type=button id=p5RenameFileButton disabled value=Rename onclick=p5renamefile()>&nbsp; <input type=button id=p5DeleteFileButton disabled value=Delete onclick=p5deletefile()>&nbsp; <input type=button id=p5NewFolderButton disabled value="New Folder"onclick=p5createfolder()>&nbsp; <input type=button id=p5UploadButton disabled value=Upload onclick=p5uploadFile()>&nbsp; <input type=button id=p5CutButton disabled value=Cut onclick=p5copyFile(1)>&nbsp; <input type=button id=p5CopyButton disabled value=Copy onclick=p5copyFile(0)>&nbsp; <input type=button id=p5PasteButton disabled value=Paste onclick=p5pasteFile()>&nbsp;</div><tr><td id=p5filesubhead><div style=float:right><select id=p5sortdropdown onchange=updateFiles()><option value=1 selected>Sort by name<option value=2>Sort by size<option value=3>Sort by date<option value=4>Descend by name<option value=5>Descend by size<option value=6>Descend by date</select></div><div>&nbsp;&nbsp;<span id=p5currentpath></span></div></table><div id=p5filetable><div id=p5PublicShare><div>These files are shared publicly, click "link" to get public url.</div></div><div id=bigok style=display:none><b>&checkmark;</b></div><div id=bigfail style=display:none><b>&#10007;</b></div><span id=p5files></span></div><table id=p5toolbarBottom style=width:100% cellpadding=0 cellspacing=0><tr><td class=style6>&nbsp;<span id=p5bottomstatus></span></table></div><div id=p6 style=display:none><img id=MainMeshImage src=serverpic.ashx><h1>My Server</h1><div id=p2ServerActions><p><strong>Server actions</strong><div class=mL><div id=p2ServerActionsBackup><a href={{{domainurl}}}backup.zip rel="noreferrer noopener"target=_blank>Download server backup</a></div><div id=p2ServerActionsRestore><a href=# onclick="return server_showRestoreDlg()">Restore server with backup</a></div><div id=p2ServerActionsVersion><a href=# onclick="return server_showVersionDlg()">Check server version</a></div><div id=p2ServerActionsErrors><a href=# onclick="return server_showErrorsDlg()">Show server error log</a></div></div></div><br><strong>Server Statistics</strong><br><br><div id=serverStats><div id=serverCpuChartView style=display:none><div class=chartViewCanvas><canvas id=serverCpuChart></canvas></div><div class=chartViewText id=serverCpuChartText></div></div><div id=serverMemoryChartView style=display:none><div class=chartViewCanvas><canvas id=serverMemoryChart></canvas></div><div class=chartViewText id=serverMemoryChartText></div></div><br><br><div id=serverStatsTable></div></div></div><div id=p10 style=display:none><table style=width:100% cellpadding=0 cellspacing=0><tr><td style=width:auto valign=top><div id=p10title><div id=p10BackButton><div class=backButton tabindex=0 onclick=goBack() title=Back onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><h1>General - <span id=p10deviceName></span></h1></div><div id=p10html></div><td style=width:20px><td style=width:200px><a href=# onclick=p10showiconselector()><img id=MainComputerImage></a><div id=MainComputerState></div></table><br><div id=p10html2></div><div id=p10html3></div></div><div id=p11 class=noselect style=display:none><div id=p11title><div id=p11deviceNameHeader><div id=p11BackButton><div class=backButton tabindex=0 onclick=goBack() title=Back onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><div id=devListToolbarViewIcons><div class=viewSelector onclick=deskToggleFull(event) title="Full Screen. Hold shift to browser full screen."><div class=viewSelector5></div></div></div><h1>Desktop - <span id=p11deviceName></span></h1></div></div><div id=p11warning onclick=showFeaturesDlg()><div class=icon2></div><div class=warningbox>Intel&reg; AMT Redirection port or KVM feature is disabled<span id=p11warninga>, click here to enable it.</span></div></div><div id=p11warning2 onclick=showPowerActionDlg()><div class=icon2></div><div class=warningbox>Remote computer is not powered on, click here to issue a power command.</div></div><div id=deskarea0 cellpadding=0 cellspacing=0><div id=deskarea1 class=areaHead><div class=toright2><span id=p11power></span>&nbsp;<div class=deskareaicon title="Toggle View Mode"onclick=toggleAspectRatio(1)>&#8690;</div><div class=deskareaicon title="Rotate Left"onclick=drotate(-1)>&olarr;</div><div class=deskareaicon title="Rotate Right"onclick=drotate(1)>&orarr;</div><div id=deskRecordIcon class=deskareaicon title="Server is recording this session"style=display:none;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px></div><input id=deskFocusBtn type=button title="Toggle focus mode, when active only the region around the mouse is updated"onkeypress=return!1 onkeydown=return!1 value="Focus All"onclick=deskToggleFocus() style=margin-right:3px;display:none> <input id=deskSaveBtn type=button title="Save a screenshot of the remote desktop"onkeypress=return!1 onkeydown=return!1 value=Save... onclick=deskSaveImage() class=mR> <input id=deskActionsBtn type=button title="Perform power actions on the device"onkeypress=return!1 onkeydown=return!1 value=Actions onclick=deviceActionFunction() class=mR> <input id=deskActionsSettings type=button value=Settings... title="Edit remote desktop settings"onkeypress=return!1 onkeydown=return!1 onclick=showDesktopSettings() class=mR> <input type=button title="Change the power state of the remote machine"onkeypress=return!1 onkeydown=return!1 value="Power Actions..."onclick=showPowerActionDlg() style=display:none></div><div><div id=idx_deskFullBtn2 onclick=deskToggleFull(event)>&nbsp;&#x2716;</div><input type=button id=autoconnectbutton1 value=AutoConnect onclick=autoConnectDesktop(event) onkeypress=return!1 onkeydown=return!1 style=display:none> <span id=connectbutton1span><input type=button id=connectbutton1 value=Connect onclick=connectDesktop(event,1) onkeypress=return!1 onkeydown=return!1 disabled></span><span id=connectbutton1hspan>&nbsp;<input type=button id=connectbutton1h value="HW Connect"onclick=connectDesktop(event,2) onkeypress=return!1 onkeydown=return!1 disabled></span><span id=disconnectbutton1span>&nbsp;<input type=button id=disconnectbutton1 value=Disconnect onclick=connectDesktop(event,0) onkeypress=return!1 onkeydown=return!1></span>&nbsp;<span id=deskstatus>Disconnected</span></div></div><div id=deskarea2><div class=areaProgress><div id=progressbar></div></div></div><div id=deskarea3x><div id=DeskFocus oncontextmenu=return!1 onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event)></div><div id=DeskParent><canvas id=Desk width=640 height=480 oncontextmenu=return!1 onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel=dmousewheel(event)></canvas></div><div id=DeskTools><div id=deskToolsAreaTop><a id=DeskToolsRefreshButton style=right:2px onclick=refreshDeskTools()>Refresh</a><div id=deskToolsTopTabProcess class=deskToolsTopTab onclick=changeDeskToolTab(0) style=left:0;bottom:0>Processes</div><div id=deskToolsTopTabService class=deskToolsTopTab onclick=changeDeskToolTab(1) style=display:none;left:90px;color:gray>Services</div></div><div id=deskToolsArea><div id=DeskToolsProcessTab><div id=deskToolsHeader><a class=colmn1 title="Sort by process id"onclick=sortProcess(0)>PID</a> <a class=colmn2 title="Sort by name"onclick=sortProcess(1)>Name</a></div><div id=DeskToolsProcesses></div></div><div id=DeskToolsServiceTab style=display:none><div id=deskToolsServiceHeader><a class=colmn1 style=width:70px title="Sort by state"onclick=sortService(0)>State</a> <a class=colmn2 title="Sort by name"onclick=sortService(1)>Name</a></div><div id=DeskToolsServices></div></div></div></div><div id=p11DeskConsoleMsg style=display:none;cursor:pointer;position:absolute;left:30px;top:17px;color:#ff0;background-color:rgba(0,0,0,.6);padding:10px;border-radius:5px onclick=p11clearConsoleMsg()></div></div><div id=deskarea4 class=areaFoot><div class=toright2><span id=DeskTimer title="Session time"></span>&nbsp; <select id=termdisplays style=display:none onchange=deskSetDisplay(event) onkeypress=return!1 onkeydown=return!1></select>&nbsp; <input id=DeskToolsButton type=button value=Tools title="Toggle tools view"onkeypress=return!1 onkeydown=return!1 onclick=toggleDeskTools()>&nbsp; <span id=DeskChatButton class=deskarea title="Open chat window to this computer"><img src=images/icon-chat.png onclick=deviceChat() height=16 width=16 style=padding-top:2px></span><span id=DeskNotifyButton title="Display a notification on the remote computer"><img src=images/icon-notify.png onclick=deviceToastFunction() height=16 width=16 style=padding-top:2px></span><span id=DeskOpenWebButton title="Open a web address on remote computer"><img src=images/icon-url2.png onclick=deviceUrlFunction() height=16 width=16 style=padding-top:2px></span></div><div><select id=deskkeys><option value=10>Ctrl+Alt+Del<option value=5>Win<option value=0>Win+Down<option value=1>Win+Up<option value=2>Win+L<option value=3>Win+M<option value=4>Shift+Win+M<option value=6>Win+R<option value=7>Alt-F4<option value=8>Ctrl-W<option value=9>Alt-Tab<option value=11>Win+Left<option value=12>Win+Right</select> <input id=DeskWD type=button value=Send onkeypress=return!1 onkeydown=return!1 onclick=deskSendKeys()> <input id=DeskClip type=button value=Clipboard onkeypress=return!1 onkeydown=return!1 onclick=showDeskClip()> <input id=DeskType type=button value=Type onkeypress=return!1 onkeydown=return!1 onclick=showDeskType()> <label><span id=DeskControlSpan title="Toggle mouse and keyboard input"><input id=DeskControl type=checkbox onkeypress=return!1 onkeydown=return!1 onclick=toggleKvmControl()>Input</span></label>&nbsp;</div></div></div></div><div id=p12 style=display:none><div id=p12title><div id=p12BackButton><div class=backButton tabindex=0 onclick=goBack() title=Back onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><h1>Terminal - <span id=p12deviceName></span></h1></div><div id=p12warning onclick=showFeaturesDlg()><div class=icon2></div><div class=warningbox>Intel&reg; AMT Redirection port or KVM feature is disabled<span id=p12warninga>, click here to enable it.</span></div></div><div id=p12warning2 onclick=showPowerActionDlg()><div class=icon2></div><div class=warningbox>Remote computer is not powered on, click here to issue a power command.</div></div><div id=termTable style=position:relative><table style=width:100% cellpadding=0 cellspacing=0><tr><td class=areaHead><div class=toright2><div id=termRecordIcon class=deskareaicon title="Server is recording this session"style=display:none;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-left:5px></div><input id=termActionsBtn type=button title="Perform power actions on the device"onkeypress=return!1 onkeydown=return!1 value=Actions onclick=deviceActionFunction()></div><div><input type=button id=autoconnectbutton2 value=AutoConnect onclick=autoConnectTerminal(event) onkeypress=return!1 onkeydown=return!1 style=display:none> <span id=connectbutton2span><input type=button id=connectbutton2 value=Connect onclick=connectTerminal(event,1) onkeypress=return!1 onkeydown=return!1 disabled></span><span id=connectbutton2hspan>&nbsp;<input type=button id=connectbutton2h value="HW Connect"onclick=connectTerminal(event,2) onkeypress=return!1 onkeydown=return!1 disabled></span><span id=disconnectbutton2span>&nbsp;<input type=button id=disconnectbutton2 value=Disconnect onclick=connectTerminal(event,0) onkeypress=return!1 onkeydown=return!1></span>&nbsp;<span id=termstatus>Disconnected</span><span id=termtitle></span></div><tr><td><div class=areaProgress><div id=termprogressbar></div></div><tr><td id=termarea3x><pre id=Term></pre><tr><td class=areaFoot><div class=toright2><span id=TermTimer title="Session time"></span>&nbsp; <span id=terminalSettingsButtons style=display:none><input id=id_tcrbutton type=button onkeypress=return!1 onkeydown=return!1 class=bottombutton value=CR+LF title="Toggle what the return key will send"onclick=termToggleCr()> <input id=id_tfxkeysbutton type=button onkeypress=return!1 onkeydown=return!1 class=bottombutton value="Intel (F10 = ESC+[OM)"title="Toggle F1 to F10 keys emulation type"onclick=termToggleFx()> <input id=id_ttypebutton type=button onkeypress=return!1 onkeydown=return!1 class=bottombutton value="Extended Ascii"title="Toggle terminal emulation type"onclick=termToggleType()> </span><span id=terminalSizeDropDown><select id=termSizeList onkeypress=return!1><option value=1>80x25<option value=2>100x30<option value=3 selected>Auto</select> </span><select id=specialkeylist onkeypress=return!1></select> <input id=specialkeylistinput type=button onkeypress=return!1 class=bottombutton value=Send title="Send the selected special key"onclick=sendSpecialKey()></div><div>&nbsp; <input type=button onkeypress=return!1 onkeydown=return!1 class=bottombutton id=ctrlcbutton value=Ctl-C onclick='termSendKey(3,"ctrlcbutton")'> <input type=button onkeypress=return!1 onkeydown=return!1 class=bottombutton id=ctrlxbutton value=Ctl-X onclick='termSendKey(24,"ctrlxbutton")'> <input type=button onkeypress=return!1 onkeydown=return!1 class=bottombutton id=escbutton value=ESC onclick='termSendKey(27,"escbutton")'> <input type=button onkeypress=return!1 onkeydown=return!1 class=bottombutton id=bsbutton value=Backspace onclick='termSendKey(8,"bsbutton")'> <input type=button onkeypress=return!1 onkeydown=return!1 class=bottombutton id=pastebutton value=Paste title="Paste text into the terminal"onclick=showTermPasteDialog()></div></table><div id=p12TermConsoleMsg style=display:none;cursor:pointer;position:absolute;left:30px;top:45px;color:#ff0;background-color:rgba(0,0,0,.6);padding:10px;border-radius:5px onclick=p12clearConsoleMsg()></div></div></div><div id=p13 style=display:none><div id=p13title><div id=p13BackButton style=float:left><div class=backButton tabindex=0 onclick=goBack() title=Back onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><h1>Files - <span id=p13deviceName></span></h1></div><table id=p13toolbar cellpadding=0 cellspacing=0><tr><td class=areaHead><div class=toright2><input id=filesActionsBtn type=button title="Perform power actions on the device"value=Actions onclick=deviceActionFunction()><div id=filesRecordIcon class=deskareaicon title="Server is recording this session"style=display:none;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-left:5px></div></div><div><input id=p13AutoConnect value=AutoConnect onclick=autoConnectFiles(event) type=button style=display:none> <input id=p13Connect value=Connect onclick=connectFiles(event) type=button> <span id=p13Status>Disconnected</span></div><tr><td class=areaHead2 valign=bottom><div id=p13rightOfButtons class=toright2></div><div><input type=button id=p13FolderUp disabled onclick=p13folderup() value=Up>&nbsp; <input type=button id=p13SelectAllButton disabled onclick=p13selectallfile() value="Select All">&nbsp; <input type=button id=p13RenameFileButton disabled value=Rename onclick=p13renamefile()>&nbsp; <input type=button id=p13DeleteFileButton disabled value=Delete onclick=p13deletefile()>&nbsp; <input type=button id=p13ViewFileButton disabled value=Edit onclick=p13viewfile()>&nbsp; <input type=button id=p13NewFolderButton disabled value="New Folder"onclick=p13createfolder()>&nbsp; <input type=button id=p13UploadButton disabled value=Upload onclick=p13uploadFile()>&nbsp; <input type=button id=p13CutButton disabled value=Cut onclick=p13copyFile(1)>&nbsp; <input type=button id=p13CopyButton disabled value=Copy onclick=p13copyFile(0)>&nbsp; <input type=button id=p13PasteButton disabled value=Paste onclick=p13pasteFile()>&nbsp; <input type=button id=p13RefreshButton disabled value=Refresh onclick=p13folderup(9999)>&nbsp;</div><tr><td class=areaHead3><div class=toright2><select id=p13sortdropdown onchange=p13updateFiles()><option value=1 selected>Sort by name<option value=2>Sort by size<option value=3>Sort by date<option value=4>Descend by name<option value=5>Descend by size<option value=6>Descend by date</select></div><div>&nbsp;&nbsp;<span id=p13currentpath></span></div></table><div id=p13FilesConsoleMsg style=display:none;cursor:pointer;position:absolute;left:30px;top:165px;color:#ff0;background-color:rgba(0,0,0,.6);padding:10px;border-radius:5px onclick=p13clearConsoleMsg()></div><div id=p13filetable><div id=p13bigok style=display:none><b>&checkmark;</b></div><div id=p13bigfail style=display:none><b>&#10007;</b></div><span id=p13files></span></div><table id=p13toolbarBottom cellpadding=0 cellspacing=0><tr><td class=style6>&nbsp;<span id=p13bottomstatus></span></table></div><div id=p14 style=display:none><div id=p14title><div id=p14BackButton style=float:left><div class=backButton tabindex=0 onclick=goBack() title=Back onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><div id=devListToolbarViewIcons><div class=viewSelector onclick=deskToggleFull(event) title="Full Screen. Hold shift to browser full screen."><div class=viewSelector5></div></div></div><h1>Intel&reg; AMT - <span id=p14deviceName></span></h1></div><iframe id=p14iframe src={{{domainurl}}}commander.htm></iframe></div><div id=p15 style=display:none><div id=p15title><div id=p15BackButton style=float:left><div class=backButton tabindex=0 onclick=goBack() title=Back onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><h1><span id=p15deviceName></span></h1></div><table id=consoleTable cellpadding=0 cellspacing=0><tr><td class=areaHead><div class=toright2><div id=p15coreName title="Information about current core running on this agent"></div><input type=button id=p15uploadCore value="Agent Action"onclick=p15uploadCore(event) title="Change the agent Java Script code module"> <img onclick=p15downloadConsoleText() style=cursor:pointer;margin-top:6px title="Download console text"src=images/link4.png></div><div id=p15statetext></div><tr><td><div class=areaProgress><div id=consoleprogressbar></div></div><tr><td id=p15agentConsole><pre id=p15agentConsoleText></pre><tr><td class=areaFoot><table style=width:100%><tr><td style=width:99%><input id=p15consoleText style=width:100% onkeyup=p15consoleSend(event) onfocus=onConsoleFocus(1) onblur=onConsoleFocus(0)><td>&nbsp;<td id=p15outputselecttd><select id=p15outputselect><option value=1>Agent<option value=2>MQTT</select><td style=width:1%><input id=id_p15consoleClear type=button class=bottombutton value=Clear onclick=p15consoleClear()></table></table></div><div id=p16 style=display:none><div id=p16title><div id=p16BackButton style=float:left><div class=backButton tabindex=0 onclick=goBack() title=Back onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><h1>Events - <span id=p16deviceName></span></h1></div><table class=pTable><tr><td class=h1><td class=auto-style1>Show <select id=p16limitdropdown onchange=refreshDeviceEvents()><option value=60>Last 60<option value=120>Last 120<option value=250>Last 250<option value=500>Last 500<option value=1000>Last 1000</select> <a href=# onclick=p3showDownloadEventsDialog(1)><img src=images/link4.png height=10 width=10 title="Download Events"style=cursor:pointer></a>&nbsp;<td class=h2></table><div id=p16events></div></div><div id=p17 style=display:none><div id=p17title><div id=p17BackButton style=float:left><div class=backButton tabindex=0 onclick=goBack() title=Back onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><h1>Details - <span id=p17deviceName></span></h1></div><div id=p17info></div></div><div id=p20 style=display:none><picture id=MainMeshImage style=border-width:0;height:200px;width:200px;float:right><source type=image/webp width=200 height=200 srcset=images/webp/mesh-256.webp><img alt=""width=200 height=200 src=images/mesh-256.png></picture><div style=float:left><div class=backButton tabindex=0 onclick=goBack() title=Back onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><h1>General - <span id=p20meshName></span></h1><p id=p20info></div><div id=p30 style=display:none><table style=width:100% cellpadding=0 cellspacing=0><tr><td style=width:auto valign=top><div id=p30title><div style=float:left><div class=backButton tabindex=0 onclick=goBack() title=Back onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><h1>General - <span id=p30userName></span></h1></div><div id=p30html></div><td style=width:20px><td style=width:200px><picture id=MainUserImage style=border-width:0;height:200px;width:200px;float:right><source type=image/webp width=200 height=200 srcset=images/webp/user-256.webp><img alt=""width=200 height=200 src=images/user-256.png></picture><div style=width:100%;text-align:center><strong><span id=MainUserState></span></strong></div></table><br><div id=p30html2></div><div id=p30html3></div></div><div id=p31 style=display:none><div style=float:left><div class=backButton tabindex=0 onclick=goBack() title=Back onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><h1>Events - <span id=p31userName></span></h1><table class=pTable><tr><td class=h1><td class=auto-style1>Show <select id=p31limitdropdown onchange=refreshUsersEvents()><option value=60>Last 60<option value=120>Last 120<option value=250>Last 250<option value=500>Last 500<option value=1000>Last 1000</select> <a href=# onclick=p3showDownloadEventsDialog(3)><img src=images/link4.png height=10 width=10 title="Download Events"style=cursor:pointer></a>&nbsp;<td class=h2></table><div id=p31events></div></div><div id=p40 style=display:none><h1>My Server Stats</h1><div class=areaHead><div class=toright2><select id=p40type onchange=updateServerTimelineStats()><option value=0>Connections<option value=1>Memory</select>&nbsp; <select id=p40time onchange=updateServerTimelineHours()><option value=3>Last 3 hours<option value=8>Last 8 hours<option value=24>Last day<option value=168>Last week<option value=720>Last 30 days</select>&nbsp; <img src=images/link4.png height=10 width=10 title="Download data points (.csv)"style=cursor:pointer onclick=p40downloadEvents()>&nbsp;</div><div><input value=Refresh type=button onclick=refreshServerTimelineStats()> &nbsp;<label><input id=p40log type=checkbox onclick=updateServerTimelineHours()>Log-X</label></div></div><canvas id=serverMainStats></canvas></div><div id=p41 style=display:none><h1>My Server Tracing</h1><div class=areaHead><div class=toright2>Show <select id=p41limitdropdown onchange=displayServerTrace()><option value=100>Last 100<option value=250>Last 250<option value=500>Last 500<option value=1000>Last 1000</select> <input value=Clear type=button onclick=clearServerTracing()> <img src=images/link4.png height=10 width=10 title="Download trace (.csv)"style=cursor:pointer onclick=p41downloadServerTrace()>&nbsp;</div><div><input value=Tracing type=button onclick=setServerTracing()> <span id=p41traceStatus>None</span></div></div><div id=p41events></div></div><div id=p19 style=display:none><h1>Plugins - <span id=p19deviceName></span></h1><style>#p19headers{padding-right:7px;padding-bottom:10px;font-weight:700;border-bottom:1px dotted #00f}#p19headers>span:nth-child(n+2){border-left:1px solid #000}#p19headers>span{padding-left:4px;padding-right:4px}</style><div id=p19headers></div><div id=p19pages></div></div><br id=column_l_bottomgap></div><div id=footer><div class=footer1>{{{footer}}}</div><div class=footer2><a id=verifyEmailId2 style=display:none href=# onclick=account_showVerifyEmail()>Verify Email</a> &nbsp;<a href=terms>Terms &amp; Privacy</a></div></div><div id=dialog class=noselect style=display:none><div id=dialogHeader><div tabindex=0 id=id_dialogclose onclick=setDialogMode() onkeypress='"Enter"==event.key&&setDialogMode()'>&#x2716;</div><div id=id_dialogtitle></div></div><div id=dialogBody><div id=dialog1><div id=id_dialogMessage></div></div><div id=dialog2><div id=id_dialogOptions></div></div><div id=dialog3><div id=d3upload><div>File Selection</div><select id=d3uploadMode onchange=d3modechange()><option value=1>Local file upload<option value=2>Server file selection</select></div><div id=d3localmode style=display:none><div>Upload File</div><form id=d3localmodeform method=post enctype=multipart/form-data action=uploadfile.ashx target=fileUploadFrame><input id=d3auth name=auth style=display:none> <input id=d3attrib name=attrib style=display:none> <input type=file id=d3localFile name=files onchange=d3setActions()> <input type=submit id=d3submit style=display:none></form></div><div id=d3servermode><div id=d3serveraction valign=bottom><input type=button id=p3FolderUp disabled onclick=d3folderup() value=Up>&nbsp;</div><div id=d3serverfiles></div></div></div><div id=dialog7><div id=d7meshkvm><h4>Agent Remote Desktop</h4><div><div>Quality</div><select id=d7bitmapquality dir=rtl></select></div><div><div>Scaling</div><select id=d7bitmapscaling dir=rtl><option selected value=1024>100%<option value=896>87.5%<option value=768>75%<option value=640>62.5%<option value=512>50%<option value=384>37.5%<option value=256>25%<option value=128>12.5%</select></div><div><div>Frame rate</div><select id=d7framelimiter dir=rtl><option selected value=50>Fast<option value=100>Medium<option value=400>Slow<option value=1000>Very slow</select></div></div><div id=d7amtkvm><h4>Intel&reg; AMT Hardware KVM</h4><div><div>Image Encoding</div><select id=d7desktopmode><option value=1>RLE8, Fastest<option value=2>RLE16, Recommended<option value=3>RAW8, Slow<option value=4>RAW16, Very Slow</select></div><div><div>Other Settings</div><div id=d7otherset style=display:block><label style=display:block><input type=checkbox id=d7showfocus>Show Focus Tool</label> <label style=display:block><input type=checkbox id=d7showcursor>Show Local Mouse Cursor</label> <label style=display:block><input type=checkbox id=d7localKeyMap>Local Keyboard Map</label></div></div></div></div></div><div id=idx_dlgButtonBar><input id=idx_dlgCancelButton type=button value=Cancel onclick=dialogclose(0)> <input id=idx_dlgOkButton type=button value=OK onclick=dialogclose(1)><div><input id=idx_dlgDeleteButton type=button value=Delete style=display:none onclick=dialogclose(2)></div></div></div><iframe name=fileUploadFrame style=display:none></iframe><form style=display:none method=post action=uploadfile.ashx enctype=multipart/form-data target=fileUploadFrame><input id=p5fileDragName name=name><input id=p5fileDragAuthCookie name=auth><input id=p5fileDragSize name=size><input id=p5fileDragType name=type><input id=p5fileDragData name=data><input id=p5fileDragLink name=link><input type=submit id=p5loginSubmit2 style=display:none></form><form style=display:none method=post action=uploadnodefile.ashx enctype=multipart/form-data target=fileUploadFrame><input id=p13fileDragName name=name><input id=p13fileDragSize name=size><input id=p13fileDragType name=type><input id=p13fileDragData name=data><input id=p13fileDragLink name=link><input type=submit id=p13loginSubmit2 style=display:none></form><audio id=chimes><source src=sounds/chimes.mp3 type=audio/mp3></audio></div><script>'use strict';
2
3 // Process server-side web state
4 var webState = '{{{webstate}}}';
views/default-mobile-min.handlebars
+1 -1
@@ -1 +1 @@
1 -<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link rel="shortcut icon"type=image/x-icon href={{{domainurl}}}favicon.ico><script src=scripts/common-0.0.1.js></script><script src=scripts/meshcentral.js></script><script src=scripts/agent-redir-ws-0.1.1.js></script><script src=scripts/agent-desktop-0.0.2.js></script><script src=scripts/amt-0.2.0.js></script><script src=scripts/amt-redir-ws-0.1.0.js></script><script src=scripts/amt-desktop-0.0.2.js></script><script src=scripts/zlib.js></script><script src=scripts/zlib-inflate.js></script><script src=scripts/zlib-adler32.js></script><script src=scripts/zlib-crc32.js></script><script keeplink=1 src=scripts/filesaver.js></script><title>{{{title}}}</title><style>a{color:#036;text-decoration:underline}#footer a{color:#fff;text-decoration:underline}#footer a:hover{color:#fff;text-decoration:none}.i1{background:url(../images/icons50.png) 0 0;height:50px;width:50px;border:none}.i2{background:url(../images/icons50.png) -50px 0;height:50px;width:50px;border:none}.i3{background:url(../images/icons50.png) -100px 0;height:50px;width:50px;border:none}.i4{background:url(../images/icons50.png) -150px 0;height:50px;width:50px;border:none}.i5{background:url(../images/icons50.png) -200px 0;height:50px;width:50px;border:none}.i6{background:url(../images/icons50.png) -250px 0;height:50px;width:50px;border:none}.m0{background:url(../images/images16.png) -32px 0;height:16px;width:16px;border:none;float:left}.m1{background:url(../images/images16.png) -16px 0;height:16px;width:16px;border:none;float:left}.m2{background:url(../images/images16.png) -96px 0;height:16px;width:16px;border:none;float:left}.m3{background:url(../images/images16.png) -112px 0;height:16px;width:16px;border:none;float:left}.gray{filter:gray;-webkit-filter:grayscale(100%) opacity(60%)}.DevSt{padding-left:5px;border-bottom-style:solid;border-bottom-width:1px;border-bottom-color:#ddd}.noselect{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.fileIcon4{background:url(../images/meshicon16.png);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:#fff;clear:both}</style><body onload='"undefined"!=typeof startup&&startup()'style="overflow-y:hidden;margin:0;padding:0;border:0;color:#000;font-size:13px;font-family:\'Trebuchet MS\',Arial,Helvetica,sans-serif"><div id=container><div id=mastheadx></div><div id=masthead style="background:url(logo.png) 0 0;background-size:341px 50px;background-color:#036;background-repeat:no-repeat;height:50px;width:100%;overflow:hidden"><div style="width:calc(100% - 50px);overflow:hidden"><div style=float:left;height:66px;color:#c8c8c8;padding-left:10px;padding-top:6px><strong><font style=font-size:36px;font-family:Arial,Helvetica,sans-serif>{{{title}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:10px><strong><font style=font-size:12px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><img id=topMenuIcon class=noselect style=position:absolute;right:0;top:10px;bottom:50px;color:#c8c8c8;font-size:44px;margin-right:8px;cursor:pointer;display:none onclick=topMenu() src=/images/3bars-30.png width=30 height=30></div><div id=page_content style=overflow-y:scroll;position:absolute;bottom:32px;top:50px;width:100%><div id=column_l style=width:100%;padding:0;position:absolute;bottom:0;top:0><div id=p0 style=display:none;width:100%;height:100%><div style=display:flex;align-items:center;width:100%;height:100%><div id=p0message style=text-align:center;width:100%><span id=p0span>Server disconnected</span>,<href onclick=reload() style=cursor:pointer><u>click to reconnect</u></href>.</div></div></div><div id=p1 style=display:none;width:100%;height:100%><div style=display:flex;align-items:center;width:100%;height:100%><div id=p1message style=text-align:center;width:100%></div></div></div><div id=p2 style=display:none><div id=xdevices></div></div><div id=p3 style=display:none;position:absolute;bottom:0;top:0;width:100%><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">&#9664;</div><td><img src=/images/user-50.png width=50 height=50><td><div style=margin-left:5px><strong style=font-size:large><span id=p3userName></span></strong><br></div></table><div id=p3info style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%><div style=margin-left:8px><div id=p3AccountActions><p><strong>Account Security</strong><div style=margin-left:9px;margin-bottom:8px><div id=manageAuthApp style=margin-top:5px;display:none><a onclick=account_manageAuthApp() style=cursor:pointer>Manage authenticator app</a></div><div id=manageOtp style=margin-top:5px;display:none><a onclick=account_manageOtp(0) style=cursor:pointer>Manage backup codes</a></div></div><p><strong>Account Actions</strong><div style=margin-left:9px;margin-bottom:8px><div style=margin-top:5px><span id=verifyEmailId style=display:none><a onclick=account_showVerifyEmail() style=cursor:pointer>Verify email</a></span></div><div style=margin-top:5px><span id=changeEmailId style=display:none><a onclick=account_showChangeEmail() style=cursor:pointer>Change email address</a></span></div><div style=margin-top:5px><a onclick=account_showChangePassword() style=cursor:pointer>Change password</a><span id=p2nextPasswordUpdateTime></span></div><div style=margin-top:5px><a onclick=account_showDeleteAccount() style=cursor:pointer>Delete account</a></div></div><br style=clear:both></div><strong>Device Groups</strong><span id=p3createMeshLink1>(<a onclick=account_createMesh() style=cursor:pointer><img src=images/icon-addnew.png width=12 height=12 border=0> New</a>)</span><br><br><div id=p3meshes></div><div id=p3noMeshFound style=margin-left:9px;display:none>No device groups.<span id=p3createMeshLink2><a onclick=account_createMesh() style=cursor:pointer><strong>Get started here!</strong></a></span></div><br style=clear:both></div></div></div><div id=p5 style=display:none><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">&#9664;</div><td><img src=/images/user-50.png width=50 height=50><td><div style=margin-left:5px><strong style=font-size:large>My Files</strong><br></div></table><div id=p5myfiles style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%><table id=p5toolbar style=width:100%;height:78px cellpadding=0 cellspacing=0><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign=bottom><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p5FolderUp disabled onclick=p5folderup() value=Up> <input type=button style="width:calc(100%/5 - 5px)"id=p5SelectAllButton disabled onclick=p5selectallfile() value=SelectAll onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5RenameFileButton disabled value=Rename onclick=p5renamefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5DeleteFileButton disabled value=Delete onclick=p5deletefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5NewFolderButton disabled value=Folder onclick=p5createfolder() onkeypress=return!1 onkeydown=return!1></div><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p5UploadButton disabled value=Upload onclick=p5uploadFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5CutButton disabled value=Cut onclick=p5copyFile(1) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5CopyButton disabled value=Copy onclick=p5copyFile(0) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5PasteButton disabled value=Paste onclick=p5pasteFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5RefreshButton value=Refresh onclick=p5refreshFiles() onkeypress=return!1 onkeydown=return!1></div><tr><td style=background-color:#e4e9e7;height:28px><table style=width:100%><tr><td id=p5currentpath style=overflow:hidden;padding-left:4px;padding-top:2px><td style=text-align:right;padding-right:4px><select id=p5sortdropdown onchange=updateFiles()><option value=1 selected>Sort by name<option value=2>Sort by size<option value=3>Sort by date<option value=4>Descend by name<option value=5>Descend by size<option value=6>Descend by date</select></table></table><div id=p5filetable style="width:100%;height:calc(100% - 133px);overflow:auto;-webkit-user-select:none"><span id=p5files></span></div><table id=p5toolbarBottom style=width:100%;height:22px;position:absolute;bottom:0;background-color:#d3d9d6 cellpadding=0 cellspacing=0><tr><td style=text-align:left;padding:3px>&nbsp;<span id=p5bottomstatus></span><td id=p5rightOfButtons style=text-align:right;padding:3px></table></div></div><div id=p10 style=display:none;position:absolute;bottom:0;top:0;width:100%;overflow:hidden><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0;position:absolute;top:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">&#9664;</div><td><a id=MainComputerImage style=cursor:pointer onclick=p10showiconselector()></a><td><div style=margin-left:5px><strong><span id=p10deviceName></span></strong><br><span id=MainComputerState></span></div></table><div id=p10general style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%><div id=p10html style=margin-left:8px;margin-right:8px></div><div id=p10html2></div><div id=p10html3></div></div><div id=p10desktop style=overflow:hidden;position:absolute;top:55px;bottom:0;width:100%;display:none><div id=deskarea1 style=position:absolute;top:0;width:100%;height:25px><div style=padding-top:2px;padding-bottom:2px;background:silver><div style=float:right;text-align:right><span id=p14power></span>&nbsp; <input id=DeskSoftInput style=width:25px;display:none;opacity:.2 onblur=toggleSoftKeys(0) onkeypress="return ondeskkeypress(event)"onkeydown="return ondeskkeydown(event)"onkeyup="return ondeskkeyup(event)"></div><div style=margin-left:3px><input type=button id=connectbutton1 value=Connect onclick=connectDesktop(event,1) onkeypress=return!1 onkeydown=return!1 disabled> <input type=button id=connectbutton1h value="HW Connect"onclick=connectDesktop(event,2) onkeypress=return!1 onkeydown=return!1 disabled> <input type=button id=disconnectbutton1 value=Disconnect onclick=connectDesktop(event,0) onkeypress=return!1 onkeydown=return!1><span id=deskstatus>Disconnected</span></div></div></div><div id=deskarea3 style="position:absolute;top:25px;width:100%;height:calc(100% - 50px)"><div id=deskarea3x style=background:#000;text-align:center;height:100%;position:relative><div id=DeskParent style=height:100%><canvas id=Desk width=640 height=200 style=width:100%;-ms-touch-action:none;margin-left:0 oncontextmenu=return!1 onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel=dmousewheel(event)></canvas></div><div id=DeskTools style="position:absolute;width:400px;height:100%;background-color:gray;top:0;right:0;border-left:2px solid #d3d3d3;display:none"><a id=DeskToolsRefreshButton style=float:right;padding:3px;cursor:pointer onclick=refreshDeskTools()>Refresh</a><div id=DeskToolsBar style="position:absolute;padding:3px;border-radius:3px 3px 0 0;top:5px;left:4px;bottom:26px;background-color:#d3d3d3;cursor:pointer">Processes</div><div style=position:absolute;top:26px;left:4px;right:4px;bottom:4px;background-color:#d3d3d3;text-align:left><div style="border-bottom:1px solid #a9a9a9;padding:3px"><a style=width:50px;padding-right:5px;float:left;cursor:pointer onclick=sortProcess(0)>PID</a><a style=cursor:pointer onclick=sortProcess(1)>Name</a></div><div id=DeskToolsProcesses style=overflow-y:scroll;position:absolute;top:24px;bottom:0;width:100%></div></div></div></div></div><div id=deskarea4 style=position:absolute;bottom:0;width:100%;height:25px><div style=padding-top:2px;padding-bottom:2px;background:silver><div style=float:right;text-align:right><select id=termdisplays style=display:none onchange=deskSetDisplay(event) onclick=deskGetDisplayNumbers(event)></select>&nbsp;<span id=DeskToastButton><img src=images/icon-notify.png onclick=deviceToastFunction() height=16 width=16 style=padding-top:2px></span>&nbsp;</div><div><input id=deskActionsBtn type=button style=margin-left:3px onkeypress=return!1 onkeydown=return!1 value=Actions onclick=deviceActionFunction()> <input type=button value=Settings onkeypress=return!1 onkeydown=return!1 onclick=showDesktopSettings()> <input type=button onkeypress=return!1 onkeydown=return!1 value="Power Actions..."onclick=showPowerActionDlg() style=display:none> <input id=DeskSpecialKeys type=button value="Special Keys"onkeypress=return!1 onkeydown=return!1 onclick=sendSpecialKeys()> <input id=DeskSoftKeys type=button value=Keyboard onkeypress=return!1 onkeydown=return!1 onclick=toggleSoftKeys(1)><label><span id=DeskControlSpan style=display:none><input id=DeskControl type=checkbox onkeypress=return!1 onkeydown=return!1>Input</span></label></div></div></div></div><div id=p10files style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%;display:none><table id=p13toolbar style=width:100%;height:111px cellpadding=0 cellspacing=0><tr><td style="background-color:silver;border-bottom:2px solid #000;padding:2px"><div style=float:right;text-align:right><input id=filesActionsBtn type=button onkeypress=return!1 onkeydown=return!1 value=Actions onclick=deviceActionFunction() style=margin-right:2px></div><div style=margin-left:2px><input id=p13AutoConnect value=AutoConnect onclick=autoConnectFiles(event) onkeypress=return!1 onkeydown=return!1 type=button style=display:none> <input id=p13Connect value=Connect onclick=connectFiles(event) onkeypress=return!1 onkeydown=return!1 type=button><span id=p13Status>Disconnected</span></div><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign=bottom><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p13FolderUp disabled onclick=p13folderup() value=Up> <input type=button style="width:calc(100%/5 - 5px)"id=p13SelectAllButton disabled onclick=p13selectallfile() value=SelectAll onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13RenameFileButton disabled value=Rename onclick=p13renamefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13DeleteFileButton disabled value=Delete onclick=p13deletefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13NewFolderButton disabled value=Folder onclick=p13createfolder() onkeypress=return!1 onkeydown=return!1></div><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p13UploadButton disabled value=Upload onclick=p13uploadFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13CutButton disabled value=Cut onclick=p13copyFile(1) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13CopyButton disabled value=Copy onclick=p13copyFile(0) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13PasteButton disabled value=Paste onclick=p13pasteFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13RefreshButton disabled value=Refresh onclick=p13folderup(9999) onkeypress=return!1 onkeydown=return!1></div><tr><td style=background-color:#e4e9e7;height:28px><table style=width:100%><tr><td id=p13currentpath style=overflow:hidden;padding-left:4px;padding-top:2px><td style=text-align:right;padding-right:4px><select id=p13sortdropdown onchange=p13updateFiles()><option value=1 selected>Sort by name<option value=2>Sort by size<option value=3>Sort by date<option value=4>Descend by name<option value=5>Descend by size<option value=6>Descend by date</select></table></table><div id=p13filetable style="width:100%;height:calc(100% - 133px);overflow:auto;-webkit-user-select:none"><span id=p13files></span></div><table id=p13toolbarBottom style=width:100%;height:22px;position:absolute;bottom:0 cellpadding=0 cellspacing=0><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#d3d9d6>&nbsp;<span id=p13bottomstatus></span></table></div></div><div id=p20 style=display:none;position:absolute;bottom:0;top:0;width:100%><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">&#9664;</div><td onclick=p20editmesh(1)><img src=/images/meshicon50.png width=50 height=50><td onclick=p20editmesh(1)><div style=margin-left:5px><strong style=font-size:large><span id=p20meshName></span></strong><br></div></table><div id=p20info style=margin-left:8px;margin-right:8px></div></div></div></div><div id=footer style=height:32px;width:100%;text-align:center;background-color:#113962;position:absolute;bottom:0><table id=footerMenu cellpadding=0 cellspacing=0 style=height:32px;width:100%;color:#fff;cursor:pointer;table-layout:fixed></table></div></div><div id=dialog style="z-index:1000;background-color:#eee;box-shadow:0 0 15px #666;font-family:Arial,Helvetica,sans-serif;border-radius:5px;position:fixed;top:90px;width:300px;display:none"><div style="width:100%;background-color:#036;color:#fff;border-radius:5px 5px 0 0"><div id=id_dialogclose style=float:right;padding:5px;cursor:pointer onclick=setDialogMode()><b>X</b></div><div id=id_dialogtitle style=padding:5px></div><div style=width:100%;margin:6px></div></div><div style=margin-right:16px;margin-left:8px><div id=dialog1 style=margin:auto;text-align:center;margin:3px><div id=id_dialogMessage style=padding:10px></div></div><div id=dialog2 style=margin:auto;margin:3px><div id=id_dialogOptions></div></div><div id=dialog3 style=margin:auto;margin:3px><select id=deskkeys style=width:100%><option value=10>Ctrl+Alt+Del<option value=11>Tab<option value=5>Win<option value=0>Win+Down<option value=1>Win+Up<option value=2>Win+L<option value=3>Win+M<option value=4>Shift+Win+M<option value=6>Win+R<option value=7>Alt-F4<option value=8>Ctrl-W<option value=9>Alt-Tab</select></div><div id=dialog7 style=margin:auto;margin:3px><div id=d7meshkvm><h4 style="width:100%;border-bottom:1px solid gray">Agent Remote Desktop</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir=rtl></select><div style=height:20px>Quality</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir=rtl><option selected value=1024>100%<option value=896>87.5%<option value=768>75%<option value=640>62.5%<option value=512>50%<option value=384>37.5%<option value=256>25%<option value=128>12.5%</select><div style=height:20px>Scaling</div></div><div style="margin:3px 0 3px 0"><select id=d7framelimiter style=float:right;width:200px;height:20px dir=rtl><option selected value=50>Fast<option value=100>Medium<option value=400>Slow<option value=1000>Very slow</select><div style=height:20px>Rate</div></div></div><div id=d7amtkvm><h4 style="width:100%;border-bottom:1px solid gray">Intel&reg; AMT Hardware KVM</h4><div style=height:26px><select id=d7desktopmode style=float:right;width:200px><option value=1>RLE8, Fastest<option value=2>RLE16, Recommended<option value=3>RAW8, Slow<option value=4>RAW16, Very Slow</select><div>Encoding</div></div><div style=height:60px><div style="float:right;border:1px solid #666;width:200px;height:60px;overflow-y:scroll;background-color:#fff"><label><input type=checkbox id=d7showfocus>Show Focus Tool</label><br><label><input type=checkbox id=d7showcursor>Show Local Mouse Cursor</label><br></div><div>Other</div></div></div></div></div><div id=idx_dlgButtonBar style=padding:10px;margin-bottom:20px><input id=idx_dlgCancelButton type=button value=Cancel style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)> <input id=idx_dlgOkButton type=button value=OK style=float:right;width:80px onclick=dialogclose(1)></div></div><div id=topMenu style="z-index:1000;background-color:#eee;box-shadow:0 0 15px #666;font-family:Arial,Helvetica,sans-serif;border-radius:0 0 5px 5px;position:fixed;top:50px;right:5px;width:170px;display:none"><div style="padding:12px;border-top:1px solid gray;color:#000;cursor:pointer"onclick=topMenu(2)>My Files</div><div style="padding:12px;border-top:1px solid gray;color:#000;cursor:pointer"onclick=topMenu(1)>My Account</div><div id=logoutMenuOption><a href=/logout><div style="padding:12px;border-top:1px solid gray;color:#000;cursor:pointer">Logout</div></a></div></div><iframe name=fileUploadFrame style=display:none></iframe><script>"use strict";var webState="{{{webstate}}}";for(var i in""!=webState&&(webState=JSON.parse(decodeURIComponent(webState))),webState)localStorage.setItem(i,webState[i]);webState.loctag||localStorage.removeItem("loctag");var files,args=parseUriArgs(),debugLevel=parseInt("{{{debuglevel}}}"),features=parseInt("{{{features}}}"),sessionTime=parseInt("{{{sessiontime}}}"),domain="{{{domain}}}",domainUrl="{{{domainurl}}}",authCookie="{{{authCookie}}}",authRelayCookie="{{{authRelayCookie}}}",authCookieRenewTimer=null,meshserver=null,xdr=null,serverinfo=null,nodes=[],meshes={},filetree={},userinfo=null,users=(serverinfo=null,null),nodeShortIdent=0,serverPublicNamePort="{{{serverDnsName}}}:{{{serverPublicPort}}}",debugmode=!1,attemptWebRTC=0!=(128&features),StatusStrs=["Disconnected","Connecting...","Setup...","Connected","Intel&reg; AMT Connected"],passRequirements="{{{passRequirements}}}";""!=passRequirements&&(passRequirements=JSON.parse(decodeURIComponent(passRequirements)));var sessionActivity=Date.now();function startup(){if(0==(32&features)){var e=null;try{e=top.location.toString().toLowerCase()}catch(e){}if(top!=self&&(null==e||0==top.active))return void(top.location=self.location)}if(!args.locale){var t=getstore("loctag",0);null!=t&&"*"!=t&&(args.locale=t)}(window.onresize=center)(),QV("changeEmailId",0==(2097152&features)),QH("p1message","Connecting..."),go(1),(meshserver=MeshServerCreateControl(domainUrl,authCookie)).onStateChanged=onStateChanged,meshserver.onMessage=onMessage,meshserver.Start();var o=localStorage.getItem("desktopsettings");null!=o&&(desktopsettings=JSON.parse(o)),applyDesktopSettings()}function onStateChanged(e,t,o,n){if(0==t){if(setDialogMode(0),go(0),"noauth"==n)return void QH("p0span","Unable to perform authentication");2==o?setTimeout(serverPoll,5e3):QH("p0span","Unable to connect web socket"),null!=authCookieRenewTimer&&(clearInterval(authCookieRenewTimer),authCookieRenewTimer=null)}else 2==t&&(meshserver.send({action:"meshes"}),meshserver.send({action:"nodes"}),meshserver.send({action:"files"}),xxcurrentView<2&&go(2),authCookieRenewTimer=setInterval(function(){meshserver.send({action:"authcookie"})},18e5));QV("topMenuIcon",2==t)}function serverPoll(){xdr=null;try{xdr=new XDomainRequest}catch(e){}(xdr=xdr||new XMLHttpRequest).open("HEAD",window.location.href),xdr.timeout=15e3,xdr.onload=function(){reload()},xdr.onerror=xdr.ontimeout=function(){setTimeout(serverPoll,1e4)},xdr.send()}function updateSelf(){if(QV("verifyEmailId",!0!==userinfo.emailVerified&&null!=userinfo.email&&1==serverinfo.emailcheck),QV("manageAuthApp",4096&features),QV("manageOtp",0!=(4096&features)&&(1==userinfo.otpsecret||0<userinfo.otphkeys)),QV("p3createMeshLink1",!1),QV("p3createMeshLink2",!1),"number"==typeof userinfo.passchange)if(-1==userinfo.passchange)QH("p2nextPasswordUpdateTime"," - Reset on next login.");else if(null!=passRequirements&&"number"==typeof passRequirements.reset){var e=userinfo.passchange+86400*passRequirements.reset-Math.floor(Date.now()/1e3);e<0?QH("p2nextPasswordUpdateTime"," - Reset on next login."):e<3600?QH("p2nextPasswordUpdateTime",format(" - Reset in {0} minute{1}.",Math.floor(e/60),addLetterS(Math.floor(e/60)))):e<86400?QH("p2nextPasswordUpdateTime",format(" - Reset in {0} hour{1}.",Math.floor(e/3600),addLetterS(Math.floor(e/3600)))):QH("p2nextPasswordUpdateTime",format(" - Reset in {0} day{1}."),Math.floor(e/86400),addLetterS(Math.floor(e/86400)))}}function addLetterS(e){return 1<e?"s":""}function setSessionActivity(){sessionActivity=Date.now()}function checkIdleSessionTimeout(){Date.now()-sessionActivity>serverinfo.timeout&&(window.location.href="logout")}function onMessage(e,t){switch(t.action){case"serverinfo":(serverinfo=t.serverinfo).timeout&&(setInterval(checkIdleSessionTimeout,1e4),checkIdleSessionTimeout()),QV("p3AccountActions",0==(4&features)&&0==serverinfo.domainauth),QV("logoutMenuOption",0==(4&features)&&0==serverinfo.domainauth);break;case"authcookie":authCookie=t.cookie,authRelayCookie=t.rcookie;break;case"userinfo":userinfo=t.userinfo,QH("p3userName",userinfo.name),updateSelf();break;case"users":for(var o in users={},t.users)users[t.users[o]._id]=t.users[o];updateUsers();break;case"wssessioncount":wssessions=t.wssessions,updateUsers();break;case"meshes":for(var o in meshes={},t.meshes)meshes[t.meshes[o]._id]=t.meshes[o];updateMeshes(),updateDevices();break;case"files":filetree=setupBackPointers(t.filetree),updateFiles();break;case"nodes":for(var o in nodes=[],t.nodes)for(var n in t.nodes[o])meshes[o]?(t.nodes[o][n].namel=t.nodes[o][n].name.toLowerCase(),t.nodes[o][n].rname?t.nodes[o][n].rnamel=t.nodes[o][n].rname.toLowerCase():t.nodes[o][n].rnamel=t.nodes[o][n].namel,t.nodes[o][n].meshnamel=meshes[o].name.toLowerCase(),t.nodes[o][n].meshid=o,t.nodes[o][n].state=t.nodes[o][n].state?t.nodes[o][n].state:0,t.nodes[o][n].desc=t.nodes[o][n].desc,t.nodes[o][n].icon||(t.nodes[o][n].icon=1),t.nodes[o][n].ident=++nodeShortIdent,nodes.push(t.nodes[o][n])):console.log("Invalid mesh (1): "+o);updateDevices(),0==xxcurrentView&&go(parseInt("{{viewmode}}")),gotoDevice("{{currentNode}}",parseInt("{{viewmode}}"));break;case"powertimeline":if(t.nodeid!=powerTimelineReq)break;powerTimelineNode=t.nodeid,powerTimeline=t.timeline,powerTimelineUpdate=Date.now()+3e5,currentNode._id==t.nodeid&&drawDeviceTimeline();break;case"otpauth-request":if(2==xxdialogMode&&"otpauth-request"==xxdialogTag){var i=t.secret;52==i.length?i=i.split(/(.............)/).filter(Boolean).join(" "):32==i.length&&(i=(i=i.split(/(....)/).filter(Boolean).join(" ")).substring(0,20)+"<br/>"+i.substring(20)),QH("d2optinfo",'Install <a href="https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2" rel="noreferrer noopener" target=_blank>Google Authenticator</a> or a compatible application, use <a href="\' + message.url + \'" rel="noreferrer noopener" target=_blank> this link</a> or enter the secret below. Then, enter the current 6 digit token to activate 2-Step login.<br /><br /><div style=width:100%;text-align:center><tt id=d2optsecret secret="'+t.secret+'" style=font-size:15px>'+i+'</tt><br /><br />Token: <input type=text onkeypress="return (event.keyCode == 8) || (event.charCode >= 48 && event.charCode <= 57)" onkeyup=account_addOtpCheck(event) onkeydown=account_addOtpCheck() maxlength=6 id=d2otpauthinput type=text></div>'),QV("idx_dlgOkButton",!0),QE("idx_dlgOkButton",!1),Q("d2otpauthinput").focus()}break;case"otpauth-setup":if(xxdialogMode)return;setDialogMode(2,"Authenticator App",1,null,t.success?"<b style=color:green>2-step login activation successful</b>. You will now need a valid token to login again.":"<b style=color:red>2-step login activation failed</b>. Clear the secret from the application and try again. You only have a few minutes to enter the proper code.");break;case"otpauth-clear":if(xxdialogMode)return;setDialogMode(2,"Authenticator App",1,null,t.success?"<b style=color:green>2-step login activation removed</b>. You can reactivate this feature at any time.":"<b style=color:red>2-step login activation removal failed</b>. Try again.");break;case"otpauth-getpasswords":if(xxdialogMode)return;var a="One time tokens can be used as secondary authentication. Generate a set, print them and keep them in a safe place.";if(a+="<div style='border-radius:6px;border: 2px dashed #888;width:100%;margin-top:8px'><div style='padding:8px;font-family:Arial, Helvetica, sans-serif;font-size:20px;font-weight:bold'><table style=width:100%;text-align:center>",t.passwords){var s=0;for(var l in t.passwords){++s%2&&(a+="<tr>");for(var r=""+t.passwords[l].p;r.length<8;)r="0"+r;!0===t.passwords[l].u?a+="<td>"+r.substring(0,4)+"&nbsp;"+r.substring(4):a+="<td><strike style=color:#BBB>"+r.substring(0,4)+"&nbsp;"+r.substring(4)}}else a+="<tr><td>No Active Tokens";a+="</table></div></div><br />",a+="<div><input type=button value='Close' onclick=setDialogMode(0) style=float:right></input>",a+="<input type=button value='New Tokens' onclick='account_manageOtp(1);'></input>",null!=t.passwords&&(a+="<input type=button value='Clear' onclick='account_manageOtp(2);'></input>"),setDialogMode(2,"Manage Backup Codes",8,null,a+="</div><br />","otpauth-manage");break;case"event":if(t.event.noact)break;switch(t.event.action){case"userWebState":if(null!=localStorage){var d=JSON.parse(t.event.state);for(var l in d)localStorage.setItem(l,d[l]);null!=d.loctag&&d.loctag!=oldLoctag&&(null!=d.loctag?args.locale=d.loctag:delete args.locale,updateDevices(),updateMeshes())}break;case"accountchange":if(userinfo.name==t.event.account.name){var p=t.event.account.siteadmin?t.event.account.siteadmin:0,c=userinfo.siteadmin?userinfo.siteadmin:0;(t.event.account.quota!=userinfo.quota||0==(8&userinfo.siteadmin)&&0!=(8&t.event.account.siteadmin))&&meshserver.send({action:"files"}),userinfo=t.event.account,c!=p&&updateSiteAdmin(),updateSelf()}break;case"createmesh":null!=t.event.links[userinfo._id]&&(meshes[t.event.meshid]={_id:t.event.meshid,name:t.event.name,mtype:t.event.mtype,desc:t.event.desc,links:t.event.links},updateMeshes(),updateDevices(),meshserver.send({action:"files"}));break;case"meshchange":if(null==meshes[t.event.meshid])meshes[t.event.meshid]={_id:t.event.meshid,name:t.event.name,mtype:t.event.mtype,desc:t.event.desc,links:t.event.links},meshserver.send({action:"nodes"});else{if(meshes[t.event.meshid].name!=t.event.name)for(var l in meshes[t.event.meshid].name=t.event.name,nodes)nodes[l].meshid==t.event.meshid&&(nodes[l].meshnamel=t.event.name.toLowerCase());if(meshes[t.event.meshid].desc=t.event.desc,meshes[t.event.meshid].links=t.event.links,null==meshes[t.event.meshid].links[userinfo._id]){20==xxcurrentView&&currentMesh==meshes[t.event.meshid]&&go(2),delete meshes[t.event.meshid];var u=[];for(var l in nodes)nodes[l].meshid!=t.event.meshid&&u.push(nodes[l]);nodes=u,10<=xxcurrentView&&xxcurrentView<20&&currentNode&&currentNode.meshid==t.event.meshid&&(setDialogMode(0),go(2))}}updateMeshes(),updateDevices(),meshserver.send({action:"files"}),20==xxcurrentView&&currentMesh._id==t.event.meshid&&p20updateMesh();break;case"deletemesh":meshes[t.event.meshid]&&(delete meshes[t.event.meshid],updateMeshes(),meshserver.send({action:"files"}));u=[];for(var l in nodes)nodes[l].meshid!=t.event.meshid&&u.push(nodes[l]);nodes=u,updateDevices(),20<=xxcurrentView&&xxcurrentView<30&&currentMesh._id==t.event.meshid&&(setDialogMode(0),go(2)),10<=xxcurrentView&&xxcurrentView<20&&currentNode&&currentNode.meshid==t.event.meshid&&(setDialogMode(0),go(2));break;case"addnode":var m=t.event.node;if(!meshes[m.meshid])break;if(null!=getNodeFromId(m._id))break;m.namel=m.name.toLowerCase(),m.rname?m.rnamel=m.rname.toLowerCase():m.rnamel=m.namel,m.meshnamel=meshes[m.meshid].name.toLowerCase(),m.state=0,m.icon||(m.icon=1),m.ident=++nodeShortIdent,nodes.push(m),updateDevices();break;case"removenode":var h=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){h=l;break}if(-1!=h){m=nodes[h];currentNode==m&&(10<=xxcurrentView&&xxcurrentView<20&&(setDialogMode(0),go(2)),currentNode=null),nodes.splice(h,1),updateDevices()}break;case"changenode":h=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){h=l;break}if(-1!=h)(m=nodes[h]).name=t.event.node.name,m.rname=t.event.node.rname,m.host=t.event.node.host,m.desc=t.event.node.desc,m.publicip=t.event.node.publicip,m.iploc=t.event.node.iploc,m.wifiloc=t.event.node.wifiloc,m.gpsloc=t.event.node.gpsloc,m.tags=t.event.node.tags,m.userloc=t.event.node.userloc,null!=t.event.node.agent&&(null==m.agent&&(m.agent={}),null!=t.event.node.agent.ver&&(m.agent.ver=t.event.node.agent.ver),null!=t.event.node.agent.id&&(m.agent.id=t.event.node.agent.id),null!=t.event.node.agent.caps&&(m.agent.caps=t.event.node.agent.caps),null!=t.event.node.agent.core?m.agent.core=t.event.node.agent.core:m.agent.core&&delete m.agent.core,m.agent.tag=t.event.node.agent.tag),null!=t.event.node.intelamt&&(null==m.intelamt&&(m.intelamt={}),null!=t.event.node.intelamt.state&&(m.intelamt.state=t.event.node.intelamt.state),null!=t.event.node.intelamt.host&&(m.intelamt.user=t.event.node.intelamt.host),null!=t.event.node.intelamt.user&&(m.intelamt.user=t.event.node.intelamt.user),null!=t.event.node.intelamt.tls&&(m.intelamt.tls=t.event.node.intelamt.tls),null!=t.event.node.intelamt.ver&&(m.intelamt.ver=t.event.node.intelamt.ver),null!=t.event.node.intelamt.tag&&(m.intelamt.tag=t.event.node.intelamt.tag),null!=t.event.node.intelamt.uuid&&(m.intelamt.uuid=t.event.node.intelamt.uuid),null!=t.event.node.intelamt.realm&&(m.intelamt.realm=t.event.node.intelamt.realm)),m.namel=m.name.toLowerCase(),m.rname?m.rnamel=m.rname.toLowerCase():m.rnamel=m.namel,t.event.node.icon&&(m.icon=t.event.node.icon),refreshDevice(m._id),updateDevices();break;case"nodemeshchange":h=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){h=l;break}if(-1!=h){m=nodes[h];null==meshes[t.event.newMeshId]?(currentNode==m&&(10<=xxcurrentView&&xxcurrentView<20&&(setDialogMode(0),go(2)),currentNode=null),nodes.splice(h,1)):(m.meshid=t.event.newMeshId,m.meshnamel=meshes[t.event.newMeshId].name.toLowerCase()),updateDevices(),refreshDevice(t.event.nodeid)}else{m=t.event.node;if(!meshes[m.meshid])break;m.namel=m.name.toLowerCase(),m.rname?m.rnamel=m.rname.toLowerCase():m.rnamel=m.namel,m.meshnamel=meshes[m.meshid].name.toLowerCase(),m.state=0,m.icon||(m.icon=1),m.ident=++nodeShortIdent,nodes.push(m),updateDevices()}break;case"nodeconnect":h=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){h=l;break}if(-1!=h)(m=nodes[h]).conn=t.event.conn,m.pwr=t.event.pwr,updateDevices();break;case"login":null!=users&&users["user/"+domain+"/"+t.event.username.toLowerCase()]&&(users["user/"+domain+"/"+t.event.username.toLowerCase()].login=t.event.time)}}}function topMenu(e){null!=xxdialogMode&&0!=xxdialogMode&&999!=xxdialogMode||(void 0===e?1==("none"==QS("topMenu").display)?0!=xxdialogMode&&null!=xxdialogMode||(QV("topMenu",!0),xxdialogMode=999):(QV("topMenu",!1),xxdialogMode=0):(QV("topMenu",!1),xxdialogMode=0,1==e&&3!=xxcurrentView&&goForward("account"),2==e&&5!=xxcurrentView&&goForward("files")))}var filetreelinkpath,backStack=[];function goBack(){xxdialogMode||(0<backStack.length&&backStack.pop(),goStack())}function goForward(e){xxdialogMode||(backStack.push(e),goStack())}function goStack(){if(0!=backStack.length){var e=backStack[backStack.length-1],t=e.split("/")[0];"node"==t&&(setupDeviceMenu(0),gotoDevice(e)),"mesh"==t&&gotoMesh(e),"account"==t&&go(3),"devices"==t&&go(2),"files"==t&&go(5)}else go(2)}function updateFooterMenu(e){for(;null!=e&&e.length<3;)e.push({n:""});var t="",o="";if(null!=e)for(var n in e)t+='<td style="cursor:pointer'+(""==o?"":";border-left:solid 1px white")+'" onclick="'+e[n].f+'">'+e[n].n,o=e[n].n;QH("footerMenu","<tr>"+t)}function account_manageAuthApp(){xxdialogMode||0==(4096&features)||(1==userinfo.otpsecret?account_removeOtp():account_addOtp())}function account_addOtp(){xxdialogMode||1==userinfo.otpsecret||0==(4096&features)||(setDialogMode(2,"Authenticator App",2,function(){meshserver.send({action:"otpauth-setup",secret:Q("d2optsecret").attributes.secret.value,token:Q("d2otpauthinput").value})},"<div id=d2optinfo>Loading...</div>","otpauth-request"),meshserver.send({action:"otpauth-request"}))}function account_addOtpCheck(e){var t=6==Q("d2otpauthinput").value.length;QE("idx_dlgOkButton",t),e&&13==e.keyCode&&t&&dialogclose(1)}function account_removeOtp(){xxdialogMode||1!=userinfo.otpsecret||0==(4096&features)||setDialogMode(2,"Authenticator App",3,function(){meshserver.send({action:"otpauth-clear"})},"Confirm removal of authenticator application 2-step login?")}function account_manageOtp(e){2==xxdialogMode&&"otpauth-manage"==xxdialogTag&&dialogclose(0),xxdialogMode||1!=userinfo.otpsecret||0==(4096&features)||meshserver.send({action:"otpauth-getpasswords",subaction:e})}function account_showVerifyEmail(){xxdialogMode||1==userinfo.emailVerified||1!=serverinfo.emailcheck||setDialogMode(2,"Email Verification",3,account_showVerifyEmailEx,"Click ok to send a verification mail to:<br /><div style=padding:8px><b>"+EscapeHtml(userinfo.email)+"</b></div>Please wait a few minute to receive the verification.")}function account_showVerifyEmailEx(){meshserver.send({action:"verifyemail",email:userinfo.email})}function account_showChangeEmail(){xxdialogMode||(setDialogMode(2,"Email Address Change",3,account_changeEmail,addHtmlValue("Email","<input id=dp3email style=width:170px maxlength=256 onchange=account_validateEmail() onkeyup=account_validateEmail(event) />")),null!=userinfo.email&&(Q("dp3email").value=userinfo.email),account_validateEmail(),Q("dp3email").focus())}function account_validateEmail(e,t){QE("idx_dlgOkButton",validateEmail(Q("dp3email").value)&&Q("dp3email").value!=userinfo.email),null!=e&&13==e.keyCode&&dialogclose(1)}function account_changeEmail(){meshserver.send({action:"changeemail",email:Q("dp3email").value})}function account_showDeleteAccount(){if(!xxdialogMode){var e="<form method=post><table style=margin-left:10px><input type=hidden name=action value=deleteaccount /><input type=hidden name=authcookie value="+authCookie+" /><tr>";e+="<td align=right>Password:</td><td><input id=apassword1 type=password name=apassword1 autocomplete=off onchange=account_validateDeleteAccount() onkeyup=account_validateDeleteAccount() /></td>",e+="</tr><tr><td align=right>Password:</td><td><input id=apassword2 type=password name=apassword2 autocomplete=off onchange=account_validateDeleteAccount() onkeyup=account_validateDeleteAccount() /></td>",e+="</tr></table><div style=padding:10px;margin-bottom:4px>",e+='<input id=account_dlgCancelButton type=button value="Cancel" style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)>',e+='<input id=account_dlgOkButton type=submit value="OK" style="float:right;width:80px" onclick=dialogclose(1)>',setDialogMode(2,"Delete Account",0,null,e+="</div><br /></form>"),account_validateDeleteAccount(),Q("apassword1").focus()}}function account_showChangePassword(){if(xxdialogMode)return!1;var e="<table style=margin-left:10px>";if(e+="<tr><td align=right>"+nobreak("Old password:")+"</td><td><input id=apassword0 type=password name=apassword0 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /> <b></b></td></tr>",e+="<tr><td align=right>"+nobreak("New password:")+"</td><td><input id=apassword1 type=password name=apassword1 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /> <b><span id=dxPassWarn></span></b></td></tr>",e+="<tr><td align=right>"+nobreak("New password:")+"</td><td><input id=apassword2 type=password name=apassword2 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /></td></tr>",65536&features&&(e+="<tr><td align=right>Password hint:</td><td><input id=apasswordhint name=apasswordhint maxlength=250 type=text autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /></td></tr>"),e+="</table>",passRequirements){var t=[],o=0;for(var n in passRequirements)"reset"!=n&&"hint"!=n&&(t.push(n+":"+passRequirements[n]),o++);0<o&&(e+="<br /><span style=font-size:x-small>"+format("Requirements: {0}.",t.join(", "))+"</span>")}return setDialogMode(2,"Change Password",3,account_showChangePasswordEx,e+="<br />"),Q("apassword0").focus(),account_validateNewPassword(),!1}function account_showChangePasswordEx(){if(Q("apassword1").value==Q("apassword2").value){var e={action:"changepassword",oldpass:Q("apassword0").value,newpass:Q("apassword1").value};65536&features&&(e.hint=Q("apasswordhint").value),meshserver.send(e)}}function account_createMesh(){if(!xxdialogMode)if(4294967295==userinfo.siteadmin||0==(64&userinfo.siteadmin))if(!0===userinfo.emailVerified||1!=serverinfo.emailcheck||4294967295==userinfo.siteadmin)if(!(262144&features)||1==userinfo.otpsecret||0<userinfo.otphkeys||0<userinfo.otpkeys){var e=addHtmlValue("Name","<input id=dp3meshname style=width:170px maxlength=64 onchange=account_validateMeshCreate() onkeyup=account_validateMeshCreate() />");e+=addHtmlValue("Type","<div style=width:170px;margin:0;padding:0><select id=dp3meshtype style=width:100% onchange=account_validateMeshCreate() ><option value=2>Software Agent Group</option><option value=1>Intel&reg; AMT only</option></select></div>"),setDialogMode(2,"Create Device Group",3,account_createMeshEx,e+=addHtmlValue("Description","<div style=width:170px;margin:0;padding:0><textarea id=dp3meshdesc maxlength=1024 style=width:100%;resize:none></textarea></div>")),account_validateMeshCreate(),Q("dp3meshname").focus()}else setDialogMode(2,"Account Security",1,null,'Unable to access a device until two-factor authentication is enabled. This is required for extra security. Go to the "My Account" and look at the "Account Security" section.');else setDialogMode(2,"Account Security",1,null,'Unable to access a device until a email address is verified. This is required for password recovery. Go to the "My Account" to change and verify an email address.');else setDialogMode(2,"New Device Group",1,null,"This account does not have the rights to create a new device group.")}function account_validateMeshCreate(){QE("idx_dlgOkButton",0<Q("dp3meshname").value.length)}function account_createMeshEx(e,t){meshserver.send({action:"createmesh",meshname:Q("dp3meshname").value,meshtype:Q("dp3meshtype").value,desc:Q("dp3meshdesc").value})}function account_validateDeleteAccount(){QE("account_dlgOkButton",0<Q("apassword1").value.length&&Q("apassword1").value==Q("apassword2").value)}function account_validateNewPassword(){var e="",t=0<Q("apassword0").value.length&&0<Q("apassword1").value.length&&Q("apassword1").value==Q("apassword2").value&&Q("apassword0").value!=Q("apassword1").value;if(65536&features&&Q("apasswordhint").value==Q("apassword1").value&&(t=!1),""!=Q("apassword1").value)if(null==passRequirements||""==passRequirements){var o=checkPasswordStrength(Q("apassword1").value);e=80<=o?"<span style=color:green>Strong<span>":60<=o?"<span style=color:blue>&#9679;<span>":"<span style=color:red>&#9679;<span>"}else{0==checkPasswordRequirements(Q("apassword1").value,passRequirements)&&(t=!1,e="<span style=color:red>Policy<span>")}QH("dxPassWarn",e),QE("idx_dlgOkButton",t)}function checkPasswordStrength(e){var t=0,o={},n=0,i={digits:/\d/.test(e),lower:/[a-z]/.test(e),upper:/[A-Z]/.test(e),nonWords:/\W/.test(e)};if(!e)return 0;for(var a=0;a<e.length;a++)o[e[a]]=(o[e[a]]||0)+1,t+=5/o[e[a]];for(var s in i)n+=1==i[s]?1:0;return parseInt(t+10*(n-1))}function checkPasswordRequirements(e,t){if(null==t||""==t||"object"!=typeof t)return!0;if(t.min&&e.length<t.min)return!1;if(t.max&&e.length>t.max)return!1;for(var o=0,n=0,i=0,a=0,s=0;s<e.length;s++)/\d/.test(e[s])&&o++,/[a-z]/.test(e[s])&&n++,/[A-Z]/.test(e[s])&&i++,/\W/.test(e[s])&&a++;return!(t.num&&o<t.num)&&(!(t.lower&&n<t.lower)&&(!(t.upper&&i<t.upper)&&!(t.nonalpha&&a<t.nonalpha)))}function updateMeshes(){var e="",t=0;for(i in meshes){t++;var o=meshes[i].links[userinfo._id].rights,n="Partial Rights";4294967295==o?n="Full Administrator":0==o&&(n="No Rights"),e+="<div style=cursor:pointer onclick=goForward('"+i+"')>",e+='<div style="float:left;margin-left:4px"><img src="/images/meshicon50.png" width=50 height=50 /></div>',e+='<div style="width:auto;height:40px;background-color:lightgray;margin-top:5px;margin-bottom:5px;margin-left:60px;padding-top:5px;padding-bottom:5px;border-radius:8px 0px 0px 8px">',e+="<div><div style=padding-left:12px;padding-top:2px><b>"+EscapeHtml(meshes[i].name)+"</b></div><div style=padding-left:12px;padding-top:3px;color:gray>"+n+"</div></div>",e+="</div></div>"}QH("p3meshes",e),QV("p3noMeshFound",0==t)}function gotoMesh(e){null==(currentMesh=meshes[e])&&goBack(),p20updateMesh(),go(20)}var sortorder,filetreelocation=[];function p5refreshFiles(){meshserver.send({action:"files"})}function updateFiles(){if(QV("MainMenuMyFiles",0==(8&features)),0==(8&features)){for(var e,t="",o="",n="<a style=cursor:pointer onclick=p5folderup(0)>Root</a>",i="Root",a=filetree,s=1,l=[],r=filetreelinkpath,d=[],p=document.getElementsByName("fc"),c=0;c<p.length;c++)p[c].checked&&d.push(p[c].value);for(var c in filetreelinkpath="",filetreelocation){if(null==a.f||null==a.f[filetreelocation[c]])break;if(l.push(filetreelocation[c]),i+=" / "+filetreelocation[c],1==s){var u=filetreelocation[c].split("/");e=window.location+u[0]+"files/"+u[2],filetreelinkpath+=filetreelocation[c]}else""!=filetreelinkpath&&(filetreelinkpath+="/"+filetreelocation[c],2<s&&(e+="/"+filetreelocation[c]));n+=" / <a style=cursor:pointer onclick=p5folderup("+s+")>"+(null!=(a=a.f[filetreelocation[c]]).n?a.n:filetreelocation[c])+"</a>",s++}filetreelocation=l;var m=i.toLowerCase().startsWith("root / "+userinfo._id+" / public"),h=p5sort_files(a.f);for(var c in h){var f,g=h[c],v=g.n;f=40<(f=v).length?EscapeHtml(v.substring(0,40))+"...":EscapeHtml(v),v=EscapeHtml(v);var k="";null!=g.s&&(k=getFileSizeStr(g.s));var y="";if(g.t<3||4==g.t){y="<div class=filelist file=999><input file=999 style=float:left name=fc class=fcb type=checkbox onchange=p5setActions() value='"+v+"'>&nbsp;<span style=float:right;padding-right:4px>"+(1==g.t||4==g.t?p5getQuotabar(g):"")+"</span><span><div class=fileIcon"+g.t+'></div><a style=cursor:pointer onclick=p5folderset("'+encodeURIComponent(g.nx)+'")>'+f+"</a></span></div>"}else{var w=f,x="";m&&(x=" (<a style=cursor:pointer onclick='p5showPublicLink(\""+e+"/"+g.nx+"\")'>Link</a>)"),0<g.s&&(w='<a rel="noreferrer noopener" target="_blank" href="downloadfile.ashx?link='+encodeURIComponent(filetreelinkpath+"/"+g.nx)+'">'+f+"</a>"+x),y="<div class=filelist file=3><input file=3 style=float:left name=fc class=fcb type=checkbox onchange=p5setActions() value='"+g.nx+"'>&nbsp;<span style=float:right;padding-right:4px>"+k+"</span><span><div class=fileIcon"+g.t+"></div>"+w+"</span></div>"}g.t<3?t+=y:o+=y}if(QH("p5rightOfButtons",p5getQuotabar(a)),QH("p5files",t+o),QH("p5currentpath",n),QE("p5FolderUp",0!=filetreelocation.length),QV("p5PublicShare",m),r==filetreelinkpath){p=document.getElementsByName("fc");for(c=0;c<p.length;c++)p[c].checked=0<=d.indexOf(p[c].value)}p5setActions()}}function getNiceSize(e){return e<=0?"Storage exceed":e<2048?format("{0}b left",e):e<2097152?format("{0}k left",Math.round(e/1024)):e<2147483648?format("{0}m left",Math.round(e/1024/1024)):format("{0}g left",Math.round(e/1024/1024/1024))}function p5getQuotabar(e){for(;1<e.t&&4!=e.t;)e=e.parent;return 1!=e.t&&4!=e.t||null==e.maxbytes?"":getNiceSize(e.maxbytes-e.s)+" <progress style=height:10px;width:100px value="+e.s+" max="+e.maxbytes+" />"}function p5showPublicLink(e){setDialogMode(2,"Public Link",1,null,'<input type=text style=width:100% value="'+e+'" readonly />')}function p5sort_filename(e,t){return e.ln>t.ln?1*sortorder:e.ln<t.ln?-1*sortorder:0}function p5sort_timestamp(e,t){return e.d>t.d?1*sortorder:e.d<t.d?-1*sortorder:0}function p5sort_bysize(e,t){return e.s==t.s?p5sort_filename(e,t):(e.s-t.s)*sortorder}function p5sort_files(e){var t=[],o=Q("p5sortdropdown").value;for(var n in e)e[n].nx=n,null==e[n].n&&(e[n].n=n),e[n].ln=e[n].n.toLowerCase(),t.push(e[n]);return sortorder=1,3<o&&(sortorder=-1,o-=3),1==o?t.sort(p5sort_filename):2==o?t.sort(p5sort_bysize):3==o&&t.sort(p5sort_timestamp),t}function p5setActions(){var e=getFileSelCount(),t=getFileCount(),o=getFileSelCount(!1);QE("p5DeleteFileButton",0<e&&0<filetreelocation.length),QE("p5NewFolderButton",0<filetreelocation.length),QE("p5UploadButton",0<filetreelocation.length),QE("p5RenameFileButton",1==e&&0<filetreelocation.length),QE("p5SelectAllButton",0<t),Q("p5SelectAllButton").value=0<e?"None":"All",QE("p5CutButton",0<o&&e==o),QE("p5CopyButton",0<o&&e==o),QE("p5PasteButton",null!=p5clipboard&&0<p5clipboard.length&&0<filetreelocation.length)}function getFileSelCount(e){for(var t=0,o=document.getElementsByName("fc"),n=0;n<o.length;n++)!o[n].checked||0==e&&"3"!=o[n].attributes.file.value||t++;return t}function getFileSelDirCount(){for(var e=0,t=document.getElementsByName("fc"),o=0;o<t.length;o++)t[o].checked&&"999"==t[o].attributes.file.value&&e++;return e}function getFileCount(){return document.getElementsByName("fc").length}function p5selectallfile(){for(var e=0==getFileSelCount(),t=document.getElementsByName("fc"),o=0;o<t.length;o++)t[o].checked=e;p5setActions()}function setupBackPointers(e){if(null!=e.f){var t=0,o=0;for(var n in e.f)setupBackPointers(e.f[n]),(e.f[n].parent=e).f[n].s&&(t+=e.f[n].s),e.f[n].c&&(o+=e.f[n].c),3==e.f[n].t&&o++;e.s=t,e.c=o}return e}function getFileSizeStr(e){return 1==e?"1 byte":format("{0} bytes",e)}function p5folderup(e){if(null==e)filetreelocation.pop();else for(;filetreelocation.length>e;)filetreelocation.pop();return updateFiles(),!1}function p5folderset(e){return filetreelocation.push(decodeURIComponent(e)),updateFiles(),!1}function p5createfolder(){setDialogMode(2,"New Folder",3,p5createfolderEx,"<input type=text id=p5renameinput maxlength=64 onkeyup=p5fileNameCheck(event) style=width:100% />"),focusTextBox("p5renameinput"),p5fileNameCheck()}function p5createfolderEx(){meshserver.send({action:"fileoperation",fileop:"createfolder",path:filetreelocation,newfolder:Q("p5renameinput").value})}function p5deletefile(){var e=getFileSelCount(),t=0<getFileSelDirCount()?"<br /><br /><label><input type=checkbox id=p5recdeleteinput>Recursive delete</label><br>":"<input type=checkbox id=p5recdeleteinput style='display:none'>";setDialogMode(2,"Delete",3,p5deletefileEx,1<e?format("Delete {0} selected items?",e)+t:"Delete selected item?"+t)}function p5deletefileEx(){for(var e=[],t=document.getElementsByName("fc"),o=0;o<t.length;o++)t[o].checked&&e.push(t[o].value);meshserver.send({action:"fileoperation",fileop:"delete",path:filetreelocation,delfiles:e,rec:Q("p5recdeleteinput").checked})}function p5renamefile(){for(var e,t=document.getElementsByName("fc"),o=0;o<t.length;o++)t[o].checked&&(e=t[o].value);setDialogMode(2,"Rename",3,p5renamefileEx,'<input type=text id=p5renameinput maxlength=64 onkeyup=p5fileNameCheck(event) style=width:100% value="'+e+'" />',{action:"fileoperation",fileop:"rename",path:filetreelocation,oldname:e}),focusTextBox("p5renameinput"),p5fileNameCheck()}function p5renamefileEx(e,t){t.newname=Q("p5renameinput").value,meshserver.send(t)}function p5fileNameCheck(e){var t=isFilenameValid(Q("p5renameinput").value);QE("idx_dlgOkButton",t),1==t&&e&&13==e.keyCode&&dialogclose(1)}var isFilenameValid=function(){var t=/^[^\\/:\*\?"<>\|]+$/,o=/^\./,n=/^(nul|prn|con|lpt[0-9]|com[0-9])(\.|$)/i;return function(e){return t.test(e)&&!o.test(e)&&!n.test(e)&&"."!=e[0]}}();function p5uploadFile(){setDialogMode(2,"Upload File",3,p5uploadFileEx,'<form method=post enctype=multipart/form-data action=uploadfile.ashx target=fileUploadFrame><input type=text name=link style=display:none id=p5uploadpath value="'+encodeURIComponent(filetreelinkpath)+'" /><input type=file name=files id=p5uploadinput style=width:100% multiple=multiple onchange="updateUploadDialogOk(\'p5uploadinput\')" /><input type=hidden name=authCookie value='+authCookie+" /><input type=submit id=p5loginSubmit style=display:none /></form>"),updateUploadDialogOk("p5uploadinput")}function p5uploadFileEx(){Q("p5loginSubmit").click()}function updateUploadDialogOk(e){QE("idx_dlgOkButton",""!=Q(e).value)}var p5clipboard=null,p5clipboardFolder=null,p5clipboardCut=0;function p5copyFile(e){var t=document.getElementsByName("fc");p5clipboard=[],p5clipboardCut=e,p5clipboardFolder=Clone(filetreelocation);for(var o=0;o<t.length;o++)t[o].checked&&"3"==t[o].attributes.file.value&&p5clipboard.push(t[o].value);p5updateClipview()}function p5pasteFile(){var e="";null!=p5clipboard&&0<p5clipboard.length&&(e=format("Confim {0} of {1} entrie{2} to this location?",0==p5clipboardCut?"copy":"move",p5clipboard.length,1<p5clipboard.length?"s":"")),setDialogMode(2,"Paste",3,p5pasteFileEx,e)}function p5pasteFileEx(){meshserver.send({action:"fileoperation",fileop:0==p5clipboardCut?"copy":"move",scpath:p5clipboardFolder,path:filetreelocation,names:p5clipboard}),p5folderup(999),1==p5clipboardCut&&(p5clipboardFolder=p5clipboard=null,p5clipboardCut=0,p5updateClipview())}function p5updateClipview(){var e="";null!=p5clipboard&&0<p5clipboard.length&&(e=format("Holding {0} entrie{1} for {2}",p5clipboard.length,1<p5clipboard.length?"s":"",0==p5clipboardCut?"copy":"move")+', <a href=# onclick="return p5clearClip()" style=cursor:pointer>Clear</a>.'),QH("p5bottomstatus",e),p5setActions()}function p5clearClip(){return p5clipboardFolder=p5clipboard=null,p5clipboardCut=0,p5updateClipview(),!1}function p5fileDragDrop(e){if(haltEvent(e),QV("bigfail",!1),QV("bigok",!1),null!=e.dataTransfer&&0!=e.dataTransfer.files.length&&0!=filetreelocation.length)for(var t=[],o=[],n=[],i=[],a=e.dataTransfer.files.length,s=0;s<e.dataTransfer.files.length;s++){var l=new FileReader,r=e.dataTransfer.files[s];t.push(r.name),o.push(r.size),n.push(r.type),l.onload=function(e){i.push(e.target.result),0==--a&&(Q("p5fileDragName").value=t.join("*"),Q("p5fileDragSize").value=o.join("*"),Q("p5fileDragType").value=n.join("*"),Q("p5fileDragData").value=i.join("*"),Q("p5fileDragLink").value=encodeURIComponent(filetreelinkpath),Q("p5loginSubmit2").click())},l.readAsDataURL(r)}}var p5dragtimer=null;function p5fileDragOver(e){haltEvent(e),null!=p5dragtimer&&(clearTimeout(p5dragtimer),p5dragtimer=null);var t=!0;0==filetreelocation.length&&(t=!1),QV("bigok",t),QV("bigfail",!t)}function p5fileDragLeave(e){haltEvent(e),"p5filetable"!=e.target.id?(QV("bigfail",!1),QV("bigok",!1)):p5dragtimer=setTimeout("QV('bigfail',false);QV('bigok',false);p5dragtimer=null;",200)}function ondeskkeypress(e){if(toggleSoftKeys(0),Q("DeskSoftInput").value="",setSessionActivity(),desktop&&!xxdialogMode&&10==xxcurrentView){if(null!=currentNode){var t=meshes[currentNode.meshid].links[userinfo._id].rights;if(0==(4294967295==t||0!=(8&t)&&0==(256&t)))return!1;if(1==(4294967295!=t&&0!=(8&t)&&0==(256&t)&&0!=(4096&t))&&(1==e.altKey||1==e.ctrlKey||e.keyCode<32&&8!=e.keyCode&&13!=e.keyCode||90<e.keyCode))return!1}return desktop.m.handleKeys(e)}}function ondeskkeydown(e){if(toggleSoftKeys(0),Q("DeskSoftInput").value="",setSessionActivity(),desktop&&!xxdialogMode&&10==xxcurrentView){if(null!=currentNode){var t=meshes[currentNode.meshid].links[userinfo._id].rights;if(0==(4294967295==t||0!=(8&t)&&0==(256&t)))return!1;if(1==(4294967295!=t&&0!=(8&t)&&0==(256&t)&&0!=(4096&t))&&(1==e.altKey||1==e.ctrlKey||e.keyCode<32&&8!=e.keyCode&&13!=e.keyCode||90<e.keyCode))return!1}return desktop.m.handleKeyDown(e)}}function ondeskkeyup(e){if(toggleSoftKeys(0),Q("DeskSoftInput").value="",setSessionActivity(),desktop&&!xxdialogMode&&10==xxcurrentView){if(null!=currentNode){var t=meshes[currentNode.meshid].links[userinfo._id].rights;if(0==(4294967295==t||0!=(8&t)&&0==(256&t)))return!1;if(1==(4294967295!=t&&0!=(8&t)&&0==(256&t)&&0!=(4096&t))&&(1==e.altKey||1==e.ctrlKey||e.keyCode<32&&8!=e.keyCode&&13!=e.keyCode||90<e.keyCode))return!1}return desktop.m.handleKeyUp(e)}}var updateDevicesTimer=null;function updateDevices(){null==updateDevicesTimer&&(updateDevicesTimer=setTimeout(updateDevicesEx,200))}var deviceHeaderCount,sort=0,deviceHeaderId=0,deviceHeaders={},showRealNames=!1,deviceHeaderTotal=0,deviceHeadersTitles=(deviceHeaders={},{});function updateDevicesEx(){null!=updateDevicesTimer&&(clearTimeout(updateDevicesTimer),updateDevicesTimer=null);var e="",t=0,o=null,n=0,i={};for(var a in deviceHeaderCount={},deviceHeaders={},deviceHeadersTitles={},(deviceHeaderTotal=deviceHeaderId=0)==sort?nodes.sort(meshSort):1==sort?nodes.sort(powerSort):2==sort&&(1==showRealNames?nodes.sort(deviceHostSort):nodes.sort(deviceSort)),nodes)if(0!=nodes[a].v){var s=meshes[nodes[a].meshid].links[userinfo._id];if(null!=s){s.rights;if(0==sort){if(nodes.sort(meshSort),nodes[a].meshid!=o){deviceHeaderSet();var l="";1==meshes[nodes[a].meshid].mtype&&(l="<span style=color:lightgray>, Intel&reg; AMT only</span>"),null!=o&&(2==t&&(e+="<td><div style=width:301px></div></td>"),""!=e&&(e+="</tr></table>")),e+="<div class=DevSt style=padding-top:4px><span style=float:right>",e+='</span><span id=MxMESH style=cursor:pointer onclick=goForward("'+nodes[a].meshid+'")>'+EscapeHtml(meshes[nodes[a].meshid].name)+"</span>"+l+"<span id=DevxHeader"+deviceHeaderId+" style=color:lightgray></span></div>",i[o=nodes[a].meshid]=1,t=0}}else 1==sort?nodes[a].pwr!==o&&(deviceHeaderSet(),null!==o&&(2==t&&(e+="<td><div style=width:301px></div></td>"),""!=e&&(e+="</tr></table>")),e+="<div class=DevSt style=width:100%;padding-top:4px><span>"+PowerStateStr2(nodes[a].pwr)+"</span><span id=DevxHeader"+deviceHeaderId+" style=color:lightgray></span></div>",o=nodes[a].pwr,t=0):2==sort&&null==o&&(o="1");n++;var r=EscapeHtml(nodes[a].name);0==r.length&&(r="<i>None</i>"),null!=nodes[a].rname&&0<nodes[a].rname.length&&(r+=" / "+EscapeHtml(nodes[a].rname));var d=EscapeHtml(nodes[a].name);1==showRealNames&&null!=nodes[a].rname&&(d=EscapeHtml(nodes[a].rname)),0==d.length&&(d="<i>None</i>");var p=nodes[a].icon,c=NodeStateStr(nodes[a]);nodes[a].conn&&0!=nodes[a].conn||(p+=" gray"),e+="<div style=cursor:pointer onclick=goForward('"+nodes[a]._id+"')>",e+='<div class="i'+p+'" style="float:left;margin-left:4px"></div>',e+='<div style="width:auto;height:40px;background-color:lightgray;margin-top:5px;margin-bottom:5px;margin-left:60px;padding-top:5px;padding-bottom:5px;border-radius:8px 0px 0px 8px">',e+="<div><div style=padding-left:12px;padding-top:2px><b>"+d+"</b></div><div style=padding-left:12px;padding-top:3px;color:gray>"+c+"</div></div>",e+="</div></div>",deviceHeaderTotal++,void 0===deviceHeaderCount[nodes[a].state]?deviceHeaderCount[nodes[a].state]=1:deviceHeaderCount[nodes[a].state]++}}if(0==sort)for(var a in meshes){var u=meshes[a],m=u.links[userinfo._id];if(null!=m){m.rights;null==i[u._id]&&(""!=o&&""!=e&&(e+="</tr></table>"),e+="<div><div colspan=3 class=DevSt><span style=float:right>",e+='</span><span id=MxMESH style=cursor:pointer onclick=goForward("'+u._id+'")>'+EscapeHtml(u.name)+"</span></div>",1==u.mtype&&(e+="<div style=padding:10px><i>No Intel&reg; AMT devices in this group"),2==u.mtype&&(e+="<div style=padding:10px><i>No devices in this group"),e+=".</i></div></div>",o=u._id,n++)}}for(var a in 0==n?QH("xdevices",'<div style="margin-top:50px;text-align:center"><span style="font-size:30px">No devices</span><br /><br />Use the desktop version of this website to add devices.</div>'):QH("xdevices",e),deviceHeaderSet(),deviceHeaders)QH(a,deviceHeaders[a]);for(var a in deviceHeadersTitles)Q(a).title=deviceHeadersTitles[a]}var powerStatetable=["","Powered","Sleep","Sleep","Sleep","Hibernating","Power off","Present"],powerStateStrings=["","Powered","Sleeping","Sleeping","Deep Sleep","Hibernating","Soft-Off","Present"],powerStateStrings2=["","Device is powered","Device is in sleep state (S1)","Device is in sleep state (S2)","Device is in deep sleep state (S3)","Device is hibernating (S4)","Device is in soft-off state (S5)","Device is present, but power state cannot be determined"],powerColorTable=["#00000000","black","blue","blue","lightblue","blueviolet","darkgreen","lightseagreen","lightseagreen"];function NodeStateStr(e){var t=[];return 0<e.state&&e.state<powerStatetable.length&&state.push(powerStatetable[e.state]),e.conn&&(0!=(1&e.conn)&&t.push("<span>Agent</span>"),0!=(2&e.conn)?t.push("<span>CIRA</span>"):0!=(4&e.conn)&&t.push("<span>Intel&reg; AMT</span>"),0!=(8&e.conn)&&t.push("<span>Relay</span>"),0!=(16&e.conn)&&t.push("<span>MQTT</span>")),null!=e.pwr&&0!=e.pwr&&t.push(powerStateStrings[e.pwr]),t.join(", ")}function PowerStateStr(e){return e<powerStatetable.length?powerStatetable[e]:""}function PowerStateStr2(e){return 0!=e&&e<powerStatetable.length?powerStatetable[e]:"Unknown"}function onSortSelectChange(e){sort=document.getElementById("sortselect").selectedIndex,e||putstore("sort",sort),updateDevicesEx()}function deviceHeaderSet(){if(0!=deviceHeaderId){deviceHeaders["DevxHeader"+deviceHeaderId]=", "+deviceHeaderTotal+(1==deviceHeaderTotal?" node":" nodes");var e="";for(var t in deviceHeaderCount)0<e.length&&(e+=", "),e+=deviceHeaderCount[t]+" "+PowerStateStr2(t);deviceHeadersTitles["DevxHeader"+deviceHeaderId]=e,deviceHeaderId++,deviceHeaderCount={},deviceHeaderTotal=0}else deviceHeaderId=1}function meshSort(e,t){return e.meshnamel>t.meshnamel?1:e.meshnamel<t.meshnamel?-1:e.meshid==t.meshid?1==showRealNames?e.rnamel>t.rnamel?1:e.rnamel<t.rnamel?-1:0:e.namel>t.namel?1:e.namel<t.namel?-1:0:0}function powerSort(e,t){var o=e.pwr?e.pwr:0,n=t.pwr?t.pwr:0;return o==n?1==showRealNames?e.rnamel>t.rnamel?1:e.rnamel<t.rnamel?-1:0:e.namel>t.namel?1:e.namel<t.namel?-1:0:n<o?1:o<n?-1:0}function deviceSort(e,t){return e.namel>t.namel?1:e.namel<t.namel?-1:0}function deviceHostSort(e,t){return e.rnamel>t.rnamel?1:e.rnamel<t.rnamel?-1:0}function refreshDevice(e){currentNode&&currentNode._id==e&&gotoDevice(e,xxcurrentView,!0)}function getNodeRights(e){var t=getNodeFromId(e);return meshes[t.meshid].links[userinfo._id].rights}var currentNode,currentDevicePanel=0,powerTimelineNode=null,powerTimelineReq=null,powerTimelineUpdate=null,powerTimeline=null;function getCurrentNode(){return currentNode}function gotoDevice(e,t,o){if(!0===userinfo.emailVerified||1!=serverinfo.emailcheck||4294967295==userinfo.siteadmin)if(!(262144&features)||1==userinfo.otpsecret||0<userinfo.otphkeys||0<userinfo.otpkeys){var n=getNodeFromId(e);if(null!=n){var i=meshes[n.meshid];if(null!=i){var a=i.links[userinfo._id].rights;if(!currentNode||currentNode._id!=n._id||1==o){currentNode=n;var s=EscapeHtml(n.name);0==s.length&&(s="<i>None</i>"),0!=(4&a)&&(s="<span onclick=showEditNodeValueDialog(0) style=cursor:pointer>"+s+"</span>"),QH("p10deviceName",s);var l="<table style=width:100%>";l+=addDeviceAttribute("<span>Group</span>",'<a onclick=goForward("'+n.meshid+'") style=cursor:pointer>'+EscapeHtml(meshes[n.meshid].name)+"</a>"),null!=n.rname&&(l+=addDeviceAttribute("<span>Name</span>","<span>"+EscapeHtml(n.rname)+"</span>")),1!=i.mtype&&n.name==n.host||(0!=(4&a)?n.host?l+=addDeviceAttribute("Hostname","<span onclick=showEditNodeValueDialog(1) style=cursor:pointer>"+EscapeHtml(n.host)+"</span>"):l+=addDeviceAttribute("Hostname","<span onclick=showEditNodeValueDialog(1) style=cursor:pointer><i>None</i></span>"):l+=addDeviceAttribute("Hostname",EscapeHtml(n.host)));var r=n.desc?EscapeHtml(n.desc):"<i>None</i>";l+=addDeviceAttribute("Description",0!=(4&a)?"<span onclick=showEditNodeValueDialog(2) style=cursor:pointer>"+r+"</span>":r);var d=["Unknown","Windows 32bit console","Windows 64bit console","Windows 32bit service","Windows 64bit service","Linux 32bit","Linux 64bit","MIPS","XENx86","Android ARM","Linux ARM","MacOS 32bit","Android x86","PogoPlug ARM","Android APK","Linux Poky x86-32bit","MacOS 64bit","ChromeOS","Linux Poky x86-64bit","Linux NoKVM x86-32bit","Linux NoKVM x86-64bit","Windows MinCore console","Windows MinCore service","NodeJS","ARM-Linaro","ARMv6l / ARMv7l","ARMv8 64bit","ARMv6l / ARMv7l / NoKVM","Unknown","Unknown","FreeBSD x86-64"];if(null!=n.agent&&null!=n.agent.id&&null!=n.agent.ver){var p="";p=n.agent.id<=d.length?d[n.agent.id]:d[0],0!=n.agent.ver&&(p+=" v"+n.agent.ver),l+=addDeviceAttribute("Agent",p)}if(null!=n.intelamt){p="";var c={0:nobreak("Not Activated (Pre)"),1:nobreak("Not Activated (In)"),2:nobreak("Activated")};null!=n.intelamt.ver&&null==n.intelamt.state?p+="<i>"+nobreak("Unknown State")+"</i>, v"+n.intelamt.ver:null==n.intelamt.ver&&2==n.intelamt.state?p+="<i>Activated</i>":null==n.intelamt.ver||null==n.intelamt.state?p+="<i>Unknown Version & State</i>":(p+=c[n.intelamt.state],n.intelamt.flags&&(2&n.intelamt.flags?p=" <span>CCM</span>":4&n.intelamt.flags&&(p=" <span>ACM</span>")),p+=", v"+n.intelamt.ver),1==n.intelamt.tls&&(p+=", <span>TLS</span>"),2==n.intelamt.state&&(null!=n.intelamt.user&&""!=n.intelamt.user||(p+=0!=(4&a)?', <i style=color:#FF0000;cursor:pointer onclick=editDeviceAmtSettings("'+n._id+'")>'+nobreak("No Credentials")+"</i>":", <i style=color:#FF0000>No Credentials</i>"),p+=" ",0!=(4&a)&&(p+='<img src=images/link4.png height=10 width=10 style=cursor:pointer onclick=editDeviceAmtSettings("'+n._id+'")>'));var u="Intel&reg; ME";"number"==typeof n.intelamt.sku&&(0!=(8&n.intelamt.sku)?u="Intel&reg; AMT":0!=(16&n.intelamt.sku)&&(u="Intel&reg; SM")),l+=addDeviceAttribute(u,p)}if(null!=n.agent&&null!=n.agent.tag&&"mailto:"!=n.agent.tag){var m=EscapeHtml(n.agent.tag);m.startsWith("mailto:")&&(m='<a href="'+m+'">'+m.substring(7)+"</a>"),l+=addDeviceAttribute("Agent Tag",m)}var h=n.conn;if(h&&1<h){var f=[];0!=(1&n.conn)&&f.push("<span>Agent</span>"),0!=(2&n.conn)?f.push("<span>Intel&reg; AMT CIRA</span>"):0!=(4&n.conn)&&f.push("<span>Intel&reg; AMT</span>"),0!=(8&n.conn)&&f.push("<span>Agent Relay</span>"),0!=(16&n.conn)&&f.push("<span>MQTT</span>"),l+=addDeviceAttribute("Connectivity",f.join(", "))}var g="<i>None</i>";if(null!=n.tags)for(var v in g="",n.tags)g+='<span style="background-color:lightgray;padding:3px;margin-right:4px;border-radius:5px">'+n.tags[v]+"</span>";l+=addDeviceAttribute("Tags",0!=(4&a)?"<span onclick=showEditNodeValueDialog(3) style=cursor:pointer>"+g+"</span>":g),l+="</table><br />",0!=(76&a)&&(l+="<input type=button value=Actions onclick=deviceActionFunction() />"),QH("p10html",l),setupFiles(),l="<div style=float:right;font-size:x-small;margin-right:10px>",0!=(4&a)&&(l+='<a style=cursor:pointer onclick=p10showDeleteNodeDialog("'+n._id+'")>Delete Device</a>'),l+="</div><div style=font-size:x-small>",l+="</div><br>",QH("p10html3",l);var k=PowerStateStr(n.state);0!=(1&h)&&(0<k.length&&(k+=", "),k+="<span style=font-size:10px>Mesh Agent</span>"),0!=(2&h)?(0<k.length&&(k+=", "),k+="<span style=font-size:10px>Intel&reg; AMT connected</span>"):0!=(4&h)&&(0<k.length&&(k+=", "),k+="<span style=font-size:10px>Intel&reg; AMT detected</span>"),0!=(16&h)&&(0<k.length&&(k+="<br/>"),k+="<span style=font-size:12px>MQTT channel connected</span>"),QH("MainComputerState",k),QH("MainComputerImage",'<div class="i'+n.icon+'"></div>'),powerTimelineNode!=currentNode._id&&powerTimelineReq!=currentNode._id&&(QH("p10html2",""),powerTimelineReq=currentNode._id,meshserver.send({action:"powertimeline",nodeid:currentNode._id}))}setupDesktop(),go(t=t||10),setupDeviceMenu()}else goBack()}else goBack()}else setDialogMode(2,"Account Security",1,null,'Unable to access a device until two-factor authentication is enabled. This is required for extra security. Go to the "My Account" and look at the "Account Security" section.');else setDialogMode(2,"Account Security",1,null,'Unable to access a device until a email address is verified. This is required for password recovery. Go to the "My Account" to change and verify an email address.')}function deviceToastFunction(){xxdialogMode||setDialogMode(2,"Device Toast",3,deviceToastFunctionEx,"<textarea id=d2devToast style=width:100%;height:80px;resize:none;overflow-y:scroll></textarea>")}function deviceToastFunctionEx(){meshserver.send({action:"toast",nodeids:[currentNode._id],title:"MeshCentral",msg:Q("d2devToast").value})}function setupDeviceMenu(e,t){var o=0;currentNode&&(o=meshes[currentNode.meshid].links[userinfo._id].rights),null!=e&&(currentDevicePanel=e),QV("p10general",0==currentDevicePanel),QV("p10desktop",1==currentDevicePanel),QV("p10files",2==currentDevicePanel);var n=[];0!=currentDevicePanel&&n.push({n:"General",f:"setupDeviceMenu(0)"}),1!=currentDevicePanel&&null!=currentNode&&(8&o||256&o)&&(1==meshes[currentNode.meshid].mtype&&("number"!=typeof currentNode.intelamt.sku||0!=(8&currentNode.intelamt.sku))||currentNode.agent&&1&currentNode.agent.caps)&&n.push({n:"Desktop",f:"setupDeviceMenu(1)"}),2!=currentDevicePanel&&null!=currentNode&&8&o&&(4294967295==o||0==(1024&o))&&2==currentNode.mtype&&4&currentNode.agent.caps&&n.push({n:"Files",f:"setupDeviceMenu(2)"}),updateFooterMenu(n)}function deviceActionFunction(){if(!xxdialogMode){var e=meshes[currentNode.meshid].links[userinfo._id].rights,t="Select an operation to perform on this device.<br /><br />",o="<select id=d2deviceop style=float:right;width:170px>";0!=(64&e)&&(o+="<option value=100>Wake-up</option>"),0!=(8&e)&&(o+="<option value=4>Sleep</option><option value=3>Reset</option><option value=2>Power off</option>"),setDialogMode(2,"Device Action",3,deviceActionFunctionEx,t+=addHtmlValue("Operation",o+="</select>"))}}function deviceActionFunctionEx(){var e=Q("d2deviceop").value;100==e?meshserver.send({action:"wakedevices",nodeids:[currentNode._id]}):meshserver.send({action:"poweraction",nodeids:[currentNode._id],actiontype:e})}function updateDeviceTimeline(){2==meshserver.State&&null!=powerTimelineNode&&null!=powerTimelineUpdate&&null!=currentNode&&powerTimelineNode==powerTimelineReq&&currentNode._id==powerTimelineNode&&powerTimelineUpdate<Date.now()&&(powerTimelineUpdate=null,meshserver.send({action:"powertimeline",nodeid:currentNode._id}))}function drawDeviceTimeline(){var e=null,t=Date.now();currentNode._id==powerTimelineNode&&(e=powerTimeline);var o=new Date;o.setHours(0,0,0,0);(o=new Date(o.getTime()-5184e5)).getTime();var n=[];if(null!=e&&1<e.length){n.push([0,e[1],e[0]]);for(var i=e[1],a=2;a<e.length;a+=2){var s=e[a],l=t;e.length>a+1&&(l=e[a+1]),n.push([i,i+l,s]),i+=l}}var r="",d=1,p=new Date,c=Q("masthead").offsetWidth-122;p.setHours(0,0,0,0);for(a=0;a<7;a++){var u="",m=p.getTime(),h=m+864e5;for(var f in n){var g=n[f];if(1==isTimeBlockInside(m,h,g[0],g[1])){var v=Math.max(m,g[0]),k=Math.min(Math.min(h,g[1]),t),y=Math.round((k-v)*c/864e5);0<y&&(u+="<div style=display:table-cell;width:"+y+"px;background-color:"+powerColor(g[2])+";height:16px></div>")}}r+="<tr style="+(d%2==0?"background-color:#DDD":"")+"><td><div>&nbsp;"+printDate(p)+"<div></div></div></td><td><div>"+u+"</div></td></tr>",++d,p=new Date(p.getTime()-864e5)}QH("p10html2",'<table style="color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse;width:calc(100% - 18px);margin:9px" border=0 cellpadding=2 cellspacing=0><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:center;width:90px>Day</th><th scope=col style=text-align:center>Power State</th></tr>'+r+"</tbody></table>")}function powerColor(e){return e<powerColorTable.length?powerColorTable[e]:"yellow"}function isTimeBlockInside(e,t,o,n){return o<e&&t<n||(e<o&&o<t||e<n&&n<t)}function addDeviceAttribute(e,t){return"<tr><td style=width:100px;color:gray>"+e+"</td><td style=overflow:hidden>"+t+"</td></tr>"}function editDeviceAmtSettings(e,t){if(!xxdialogMode){var o="",n=getNodeFromId(e),i=3;0!=(4&getNodeRights(e))&&(o+=addHtmlValue("Username",'<input id=dp10username style=width:170px maxlength=32 autocomplete=nope placeholder="admin" onchange=validateDeviceAmtSettings() onkeyup=validateDeviceAmtSettings() />'),o+=addHtmlValue("Password","<input id=dp10password type=password style=width:170px autocomplete=nope maxlength=32 onchange=validateDeviceAmtSettings() onkeyup=validateDeviceAmtSettings() />"),o+=addHtmlValue("Security","<select id=dp10tls style=width:176px><option value=0>No TLS security</option><option value=1>TLS security required</option></select>"),null!=n.intelamt.user&&""!=n.intelamt.user&&(i=7),setDialogMode(2,"Edit Intel&reg; AMT credentials",i,editDeviceAmtSettingsEx,o,{node:n,func:t}),null!=n.intelamt.user&&""!=n.intelamt.user?Q("dp10username").value=n.intelamt.user:Q("dp10username").value="admin",Q("dp10tls").value=n.intelamt.tls,validateDeviceAmtSettings())}}function validateDeviceAmtSettings(){QE("idx_dlgOkButton",passwordcheck(Q("dp10password").value))}function editDeviceAmtSettingsEx(e,t){if(2==e)meshserver.send({action:"changedevice",nodeid:t.node._id,intelamt:{user:"",pass:""}});else{var o=Q("dp10username").value;""==o&&(o="admin");var n=Q("dp10password").value;""==n&&(o=""),meshserver.send({action:"changedevice",nodeid:t.node._id,intelamt:{user:o,pass:n,tls:Q("dp10tls").value}}),t.node.intelamt.user=o,t.node.intelamt.tls=Q("dp10tls").value,t.func&&setTimeout(t.func,300)}}function p10showDeleteNodeDialog(e){xxdialogMode||(setDialogMode(2,"Delete Node",3,p10showDeleteNodeDialogEx,format("Delete {0}?",EscapeHtml(currentNode.name))+"<br /><br /><input id=p10check type=checkbox onchange=p10validateDeleteNodeDialog() />Confirm",e),p10validateDeleteNodeDialog())}function p10validateDeleteNodeDialog(){QE("idx_dlgOkButton",Q("p10check").checked)}function p10showDeleteNodeDialogEx(e,t){meshserver.send({action:"removedevices",nodeids:[t]})}function p10showiconselector(){if(!xxdialogMode&&0!=(4&meshes[currentNode.meshid].links[userinfo._id].rights)){"<div style=display:inline-block class=i1 onclick=p10setIcon(1)></div>","<div style=display:inline-block class=i2 onclick=p10setIcon(2)></div>","<div style=display:inline-block class=i3 onclick=p10setIcon(3)></div><br>","<div style=display:inline-block class=i4 onclick=p10setIcon(4)></div>","<div style=display:inline-block class=i5 onclick=p10setIcon(5)></div>","<div style=display:inline-block class=i6 onclick=p10setIcon(6)></div></table>",setDialogMode(2,"Icon Selection",0,null,"<table align=center><td><div style=display:inline-block class=i1 onclick=p10setIcon(1)></div><div style=display:inline-block class=i2 onclick=p10setIcon(2)></div><div style=display:inline-block class=i3 onclick=p10setIcon(3)></div><br><div style=display:inline-block class=i4 onclick=p10setIcon(4)></div><div style=display:inline-block class=i5 onclick=p10setIcon(5)></div><div style=display:inline-block class=i6 onclick=p10setIcon(6)></div></table>"),QV("id_dialogclose",!0)}}function p10setIcon(e){setDialogMode(0),meshserver.send({action:"changedevice",nodeid:currentNode._id,icon:e})}var desktop,desktopNode,showEditNodeValueDialog_modes=["Device Name","Hostname","Description","Tags"],showEditNodeValueDialog_modes2=["name","host","desc","tags"],showEditNodeValueDialog_modes3=["","","","Group1, Group2, Group3"];function showEditNodeValueDialog(e){if(!xxdialogMode){setDialogMode(2,"Edit Device",3,showEditNodeValueDialogEx,addHtmlValue(showEditNodeValueDialog_modes[e],'<input id=dp10devicevalue style=width:170px maxlength=64 placeholder="'+showEditNodeValueDialog_modes3[e]+'" onchange=p10editdevicevalueValidate('+e+",event) onkeyup=p10editdevicevalueValidate("+e+",event) />"),e);var t=currentNode[showEditNodeValueDialog_modes2[e]];null==t&&(t=""),Array.isArray(t)&&(t=t.join(", ")),Q("dp10devicevalue").value=t,p10editdevicevalueValidate(),Q("dp10devicevalue").focus()}}function showEditNodeValueDialogEx(e,t){var o={action:"changedevice",nodeid:currentNode._id};o[showEditNodeValueDialog_modes2[t]]=Q("dp10devicevalue").value,meshserver.send(o)}function p10editdevicevalueValidate(e,t){var o=1<e||0<Q("dp10devicevalue").value.length;QE("idx_dlgOkButton",o),null!=t&&1==o&&13==t.keyCode&&dialogclose(1)}var desktopsettings={encoding:2,showfocus:!1,showmouse:!0,showcad:!0,quality:40,scaling:1024,framerate:50};function setupDesktop(){desktopNode!=currentNode&&null!=desktop&&(desktop.Stop(),desktop=desktopNode=null),desktopNode==currentNode&&null!=desktop||(QH("DeskParent",'<canvas id=Desk width=640 height=200 style="width:100%;-ms-touch-action:none;margin-left:0px" oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event)></canvas>'),desktopNode=currentNode,Q("Desk").addEventListener("DOMMouseScroll",function(e){return dmousewheel(e)}),Q("Desk").addEventListener("mousewheel",function(e){return dmousewheel(e)})),desktopNode=currentNode,updateDesktopButtons(),Q("Desk").toBlob||QV("deskSaveBtn",!1)}function updateDesktopButtons(){var e=meshes[currentNode.meshid],t=0;null!=desktop&&(t=desktop.State);var o=e.links[userinfo._id].rights;QV("disconnectbutton1",0!=t),QV("connectbutton1",0==t&&2==e.mtype&&(8&o||256&o)),QV("connectbutton1h",0==t&&8&o&&(1==e.mtype||null!=currentNode.intelamt&&2==currentNode.intelamt.state&&null!=currentNode.intelamt.ver&&"number"==typeof currentNode.intelamt.sku&&0!=(8&currentNode.intelamt.sku))),QV("d7amtkvm",!(null==currentNode.intelamt||null==currentNode.intelamt.ver&&1!=e.mtype||0!=t&&2!=desktop.contype)),QV("d7meshkvm",2==e.mtype&&(0==t||1==desktop.contype));var n=0!=(1&currentNode.conn);QE("connectbutton1",n);var i=0!=(6&currentNode.conn);QE("connectbutton1h",i),QV("DeskToastButton",0!=(16384&o)&&currentNode.agent&&currentNode.agent.id<5&&8&o),QV("deskActionsBtn",8&o),Q("DeskControl").checked=0!=(8&o),0==n&&QV("DeskTools",!1)}function connectDesktop(e,t){if(setSessionActivity(),null==desktop)if(desktopNode=currentNode,2==t){if(null==desktopNode.intelamt.user||""==desktopNode.intelamt.user)return void editDeviceAmtSettings(desktopNode._id,connectDesktop);(desktop=CreateAmtRedirect(CreateAmtRemoteDesktop("Desk"),authCookie)).debugmode=debugmode,desktop.onStateChanged=onDesktopStateChange,desktop.m.bpp=1==desktopsettings.encoding||3==desktopsettings.encoding?1:2,desktop.m.useZRLE=desktopsettings.encoding<3,desktop.m.showmouse=desktopsettings.showmouse,desktop.m.onScreenSizeChange=deskAdjust,desktop.Start(desktopNode._id,16994,"*","*",0),desktop.contype=2}else(desktop=CreateAgentRedirect(meshserver,CreateAgentRemoteDesktop("Desk"),serverPublicNamePort,authCookie,authRelayCookie,domainUrl)).debugmode=debugmode,desktop.m.debugmode=debugmode,desktop.attemptWebRTC=attemptWebRTC,desktop.onStateChanged=onDesktopStateChange,desktop.m.CompressionLevel=desktopsettings.quality,desktop.m.ScalingLevel=desktopsettings.scaling,desktop.m.FrameRateTimer=desktopsettings.framerate,desktop.m.onDisplayinfo=deskDisplayInfo,desktop.m.onScreenSizeChange=deskAdjust,desktop.Start(desktopNode._id),desktop.contype=1;else desktop.Stop(),desktopNode=desktop=null}function onDesktopStateChange(e,t){var o=t;3==o&&2==e.contype&&o++;var n=StatusStrs[o];switch(null!=desktop&&1==desktop.webRtcActive&&(n+=", WebRTC"),QH("deskstatus",n),t){case 0:desktop.Stop(),desktopNode=desktop=null,QV("termdisplays",!1),1==fullscreen&&deskToggleFull()}updateDesktopButtons(),deskAdjust(),setTimeout(deskAdjust,50)}function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),updateDesktopButtons(),setDialogMode(7,"Remote Desktop Settings",3,showDesktopSettingsChanged))}function showDesktopSettingsChanged(){desktopsettings.encoding=d7desktopmode.value,desktopsettings.showfocus=d7showfocus.checked,desktopsettings.showmouse=d7showcursor.checked,desktopsettings.quality=d7bitmapquality.value,desktopsettings.scaling=d7bitmapscaling.value,desktopsettings.framerate=d7framelimiter.value,localStorage.setItem("desktopsettings",JSON.stringify(desktopsettings)),applyDesktopSettings(),desktop&&(1==desktop.contype&&0!=desktop.State&&desktop.m.SendCompressionLevel(1,desktopsettings.quality,desktopsettings.scaling,desktopsettings.framerate),2==desktop.contype&&0!=desktop.State&&(desktop.Stop(),setTimeout(function(){connectDesktop(null,2)},50)))}function applyDesktopSettings(){var e="",t=512&features?[90,70,50,40,30,20,10,5,1]:[50,40,30,20,10,5,1];for(var o in t)e+="<option value="+t[o]+">"+t[o]+"%</option>";QH("d7bitmapquality",e),d7desktopmode.value=desktopsettings.encoding,d7showfocus.checked=desktopsettings.showfocus,d7showcursor.checked=desktopsettings.showmouse,d7bitmapquality.value=40,0<=t.indexOf(parseInt(desktopsettings.quality))&&(d7bitmapquality.value=desktopsettings.quality),d7bitmapscaling.value=desktopsettings.scaling,desktopsettings.framerate&&(d7framelimiter.value=desktopsettings.framerate)}var fullscreen=!1;function deskAdjust(){var e=(Q("DeskParent").clientHeight-Q("Desk").clientHeight)/2;if(e<0){var t=Q("DeskParent").clientHeight,o=9999;desktop&&(o=desktop.m.width/desktop.m.height*t),QS("Desk")["max-height"]=t+"px",QS("Desk")["max-width"]=o+"px",e=0}else QS("Desk")["max-height"]=null,QS("Desk")["max-width"]=null;QS("Desk")["margin-top"]=e+"px",QS("Desk")["margin-bottom"]=e+"px"}function deskSendKeys(){if(!xxdialogMode&&null!=desktop&&3==desktop.State){var e=Q("deskkeys").value;0==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[65364,1],[65364,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,40],[desktop.m.KeyAction.UP,40],[desktop.m.KeyAction.EXUP,91]]):1==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[65362,1],[65362,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,38],[desktop.m.KeyAction.UP,38],[desktop.m.KeyAction.EXUP,91]]):2==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[108,1],[108,0],[65511,0]]):desktop.sendCtrlMsg('{"action":"lock"}'):3==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[109,1],[109,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,77],[desktop.m.KeyAction.UP,77],[desktop.m.KeyAction.EXUP,91]]):4==e?2==desktop.contype?desktop.m.sendkey([[65505,1],[65511,1],[109,1],[109,0],[65511,0],[65505,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.DOWN,16],[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,77],[desktop.m.KeyAction.UP,77],[desktop.m.KeyAction.EXUP,91],[desktop.m.KeyAction.UP,16]]):5==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.EXUP,91]]):6==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[114,1],[114,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,82],[desktop.m.KeyAction.UP,82],[desktop.m.KeyAction.EXUP,91]]):7==e?2==desktop.contype?desktop.m.sendkey([[65513,1],[65473,1],[65473,0],[65513,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,18],[desktop.m.KeyAction.DOWN,115],[desktop.m.KeyAction.UP,115],[desktop.m.KeyAction.EXUP,18]]):8==e?2==desktop.contype?desktop.m.sendkey([[65507,1],[119,1],[119,0],[65507,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,17],[desktop.m.KeyAction.DOWN,87],[desktop.m.KeyAction.UP,87],[desktop.m.KeyAction.EXUP,17]]):9==e?2==desktop.contype?desktop.m.sendkey([[65513,1],[65289,1],[65289,0],[65513,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,18],[desktop.m.KeyAction.DOWN,9],[desktop.m.KeyAction.UP,9],[desktop.m.KeyAction.EXUP,18]]):10==e?desktop.m.sendcad():11==e&&(2==desktop.contype?desktop.m.sendkey([[65289,1],[65289,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.DOWN,9],[desktop.m.KeyAction.UP,9]]))}}function sendSpecialKeys(){xxdialogMode||null==desktop||3!=desktop.State||setDialogMode(3,"Special Keys",3,deskSendKeys)}function toggleSoftKeys(e){QV("DeskSoftInput",1==e),1==e&&Q("DeskSoftInput").focus()}function toggleDeskTools(){setSessionActivity(),xxdialogMode||("none"==QS("DeskTools").display?(QV("DeskTools",!0),Q("DeskTools").nodeid=currentNode._id,refreshDeskTools()):QV("DeskTools",!1))}function refreshDeskTools(){setSessionActivity(),QV("DeskToolsRefreshButton",!1),setTimeout(refreshDeskToolsEx,500),meshserver.send({action:"msg",type:"ps",nodeid:currentNode._id})}function refreshDeskToolsEx(){QV("DeskToolsRefreshButton",!0)}var filesNode,deskTools={sort:1,msg:null};function sortProcess(e){deskTools.sort=e,showDeskToolsProcesses(deskTools.msg)}function sortProcessPid(e,t){return e.p>t.p?1:e.p<t.p?-1:0}function sortProcessName(e,t){return e.d>t.d?1:e.d<t.d?-1:0}function showDeskToolsProcesses(e){if(null!=(deskTools.msg=e)){if(Q("DeskTools").nodeid==e.nodeid){var t=[],o=null;try{o=JSON.parse(e.value)}catch(e){}if(console.log(o),null!=o){for(var n in o)t.push({p:parseInt(n),c:o[n].cmd,d:o[n].cmd.toLowerCase(),u:o[n].user});0==deskTools.sort?t.sort(sortProcessPid):1==deskTools.sort&&t.sort(sortProcessName);var i="";for(var a in t)0!=t[a].p&&(i+="<div class=deskToolsBar><div style=width:50px;float:left;text-align:right;padding-right:5px>"+t[a].p+"</div><a style=float:right;padding-right:5px;cursor:pointer onclick=stopProcess("+t[a].p+',"'+t[a].c+'")><img width=10 height=10 src="images/trash.png"></a><div style=float:right;padding-right:5px>'+(t[a].u?t[a].u:"")+"</div><div>"+t[a].c+"</div></div>");QH("DeskToolsProcesses",i)}}}else QH("DeskToolsProcesses","")}function deskSaveImage(){if(setSessionActivity(),!xxdialogMode&&null!=desktop&&3==desktop.State){var e=new Date,t="Desktop-"+currentNode.name+"-"+e.getFullYear()+"-"+("0"+(e.getMonth()+1)).slice(-2)+"-"+("0"+e.getDate()).slice(-2)+"-"+("0"+e.getHours()).slice(-2)+"-"+("0"+e.getMinutes()).slice(-2);Q("Desk").toBlob(function(e){saveAs(e,t+".jpg")})}}function deskDisplayInfo(e,t,o,n){var i=Q("termdisplays").value;if(0<t.length){var a="";for(var s in t)a+="<option"+(i==t[s]?" selected":"")+">"+t[s]+"</option>";QH("termdisplays",a)}QV("termdisplays",0<t.length)}function deskGetDisplayNumbers(e){desktop.m.GetDisplayNumbers()}function deskSetDisplay(e){setSessionActivity();var t=0,o=Q("termdisplays").value;t="All Displays"==o?65535:parseInt(o.substring(8)),desktop.m.SetDisplay(t)}function dmousedown(e){setSessionActivity(),xxdialogMode||null==desktop||desktop.m.mousedown(e)}function dmouseup(e){setSessionActivity(),xxdialogMode||null==desktop||desktop.m.mouseup(e)}function dmousemove(e){setSessionActivity(),xxdialogMode||null==desktop||desktop.m.mousemove(e)}function dmousewheel(e){return setSessionActivity(),!(xxdialogMode||null==desktop||!desktop.m.mousewheel)&&(desktop.m.mousewheel(e),haltEvent(e),!0)}function drotate(e){xxdialogMode||null==desktop||(desktop.m.setRotation(desktop.m.rotation+e),deskAdjust(),deskAdjust())}function stopProcess(e,t){return setDialogMode(2,"Process Control",3,stopProcessEx,format('Stop process #{0} "{1}"?',e,t),e),!1}function stopProcessEx(e,t){meshserver.send({action:"msg",type:"pskill",nodeid:currentNode._id,value:t}),setTimeout(refreshDeskTools,300)}function setupFiles(){var e=filesNode==currentNode,t=0!=(1&(filesNode=currentNode).conn);QE("p13Connect",t),0!=e&&0!=t||!files||(files.Stop(),files=null)}function onFilesStateChange(e,t){setSessionActivity(),p13Connect.value=0==t?"Connect":"Disconnect";var o=StatusStrs[t];switch(1==files.webRtcActive&&(o+=", WebRTC"),Q("p13Status").textContent=o,t){case 0:QH("p13files",""),p13filetree=null,p13filetreelocation=[],QH("p13currentpath",""),QE("p13FolderUp",!1),p13setActions(),null!=files&&(files.Stop(),files=null);break;case 3:p13targetpath="",files.sendText({action:"ls",reqid:1,path:""})}}function CreateRemoteFiles(e){var t={protocol:5};return t.onFileUpdate=e,t.xxStateChange=function(e){},t.ProcessData=function(e){t.onFileUpdate(e)},t}var autoConnectFilesTimer=null;function autoConnectFiles(e){autoConnectFilesTimer=null==autoConnectFilesTimer?setInterval(connectFiles,100):(clearInterval(autoConnectFilesTimer),null)}function connectFiles(e){files?(files.Stop(),files=null):((files=CreateAgentRedirect(meshserver,CreateRemoteFiles(p13gotFiles),serverPublicNamePort,authCookie,authRelayCookie,domainUrl)).attemptWebRTC=attemptWebRTC,files.onStateChanged=onFilesStateChange,files.Start(filesNode._id)),p13clipboard=p13clipboardFolder=null,p13clipboardCut=0,p13updateClipview()}var p13sortorder,p13filetree=null,p13targetpath=null,p13filetreelocation=[];function p13gotFiles(e){if(setSessionActivity(),0<e.length&&123!=e.charCodeAt(0))p13gotDownloadBinaryData(e);else if("download"!=(e=JSON.parse(decode_utf8(e))).action)if(e.path=e.path.replace(/\//g,"\\"),null!=p13filetree&&e.path==p13filetree.path){var t=p13getCheckedNames();p13filetree=e,p13updateFiles(t)}else{for(var o=e.path.replace(/\//g,"\\"),n=p13targetpath.replace(/\//g,"\\");0<o.length&&"\\"==o[0];)o=o.substring(1);for(;0<n.length&&"\\"==n[0];)n=n.substring(1);(o==n||"\\"==e.path&&""==p13targetpath)&&(p13filetree=e,p13updateFiles())}else p13gotDownloadCommand(e)}function p13getCheckedNames(){for(var e=[],t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked&&e.push(p13filetree.dir[t[o].value].n);return e}function p13updateFiles(e){var t="",o="",n="<a style=cursor:pointer onclick=p13folderup(0)>Root</a>",i=p13filetree.path.split("\\");for(var a in p13filetreelocation=[],i)""!=i[a]&&p13filetreelocation.push(i[a]);for(var a in p13filetreelocation)n+=" / <a style=cursor:pointer onclick=p13folderup("+(parseInt(a)+1)+")>"+p13filetreelocation[a]+"</a>";var s=p13filetreelocation.join("/"),l=p13sort_files(p13filetree.dir);for(var a in l){var r,d=l[a],p=d.n;r=70<(r=p).length?EscapeHtml(p.substring(0,70))+"...":EscapeHtml(p),p=EscapeHtml(p);var c="";null!=d.s&&(c=getFileSizeStr(d.s));var u="";if(d.t<3){u="<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p13setActions() value='"+d.nx+"'>&nbsp;<span style=float:right></span><span><div class=fileIcon"+d.t+'></div><a style=cursor:pointer onclick=p13folderset("'+encodeURIComponent(d.nx)+'")>'+r+"</a></span></div>"}else{var m=r;0<d.s&&(m='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick="p13downloadfile(\''+encodeURIComponent(s+"/"+p)+"','"+encodeURIComponent(p)+"',"+d.s+')">'+r+"</a>"),u="<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p13setActions() value='"+d.nx+"'>&nbsp;<span style=float:right;padding-right:4px>"+c+"</span><span><div class=fileIcon"+d.t+"></div>"+m+"</span></div>"}d.t<3?t+=u:o+=u}if(QH("p13files",t+o),QH("p13currentpath",n),QE("p13FolderUp",0!=p13filetreelocation.length),null!=e){var h=document.getElementsByName("fd");for(a=0;a<h.length;a++)0<=e.indexOf(p13filetree.dir[h[a].value].n)&&(h[a].checked=!0)}p13setActions()}function p13folderset(e){p13targetpath=joinPaths(p13filetree.path,p13filetree.dir[e].n).split("\\").join("/"),files.sendText({action:"ls",reqid:1,path:p13targetpath})}function p13folderup(e){if(null==e)p13filetreelocation.pop();else for(;p13filetreelocation.length>e;)p13filetreelocation.pop();p13targetpath=p13filetreelocation.join("/"),files.sendText({action:"ls",reqid:1,path:p13targetpath})}function p13sort_filename(e,t){return e.ln>t.ln?1*p13sortorder:e.ln<t.ln?-1*p13sortorder:0}function p13sort_timestamp(e,t){return e.d>t.d?1*p13sortorder:e.d<t.d?-1*p13sortorder:0}function p13sort_bysize(e,t){return e.s==t.s?p13sort_filename(e,t):(e.s-t.s)*p13sortorder}function p13sort_files(e){var t=[],o=Q("p13sortdropdown").value;for(var n in e)e[n].nx=n,null==e[n].s&&(e[n].s=0),null==e[n].n&&(e[n].n=n),e[n].ln=e[n].n.toLowerCase(),t.push(e[n]);return p13sortorder=1,3<o&&(p13sortorder=-1,o-=3),1==o?t.sort(p13sort_filename):2==o?t.sort(p13sort_bysize):3==o&&t.sort(p13sort_timestamp),t}function p13setActions(){if(null==p13filetree)QE("p13DeleteFileButton",!1),QE("p13NewFolderButton",!1),QE("p13UploadButton",!1),QE("p13RenameFileButton",!1),QE("p13SelectAllButton",!1),Q("p13SelectAllButton").value="All",QE("p13RefreshButton",!1),QE("p13CutButton",!1),QE("p13CopyButton",!1),QE("p13PasteButton",!1);else{var e=p13getFileSelCount(),t=p13getFileCount(),o=p13getFileSelCount(!1),n=0<currentNode.agent.id&&currentNode.agent.id<5;QE("p13DeleteFileButton",0<e&&(0<p13filetreelocation.length||0==n)),QE("p13NewFolderButton",0<p13filetreelocation.length||0==n),QE("p13UploadButton",0<p13filetreelocation.length||0==n),QE("p13RenameFileButton",1==e&&(0<p13filetreelocation.length||0==n)),QE("p13SelectAllButton",0<t),Q("p13SelectAllButton").value=0<e?"None":"All",QE("p13RefreshButton",!0),QE("p13CutButton",0<e&&e==o&&(0<p13filetreelocation.length||0==n)),QE("p13CopyButton",0<e&&e==o&&(0<p13filetreelocation.length||0==n)),QE("p13PasteButton",(0<p13filetreelocation.length||0==n)&&null!=p13clipboard&&0<p13clipboard.length)}}function p13getFileSelCount(e){for(var t=0,o=document.getElementsByName("fd"),n=0;n<o.length;n++)!o[n].checked||0==e&&"3"!=o[n].attributes.file.value||t++;return t}function p13getFileSelDirCount(){for(var e=0,t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked&&"999"==t[o].attributes.file.value&&e++;return e}function p13getFileCount(){return document.getElementsByName("fd").length}function p13selectallfile(){for(var e=0==p13getFileSelCount(),t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked=e;p13setActions()}function p13createfolder(){setDialogMode(2,"New Folder",3,p13createfolderEx,"<input type=text id=p13renameinput maxlength=64 onkeyup=p13fileNameCheck(event) style=width:100% />"),focusTextBox("p13renameinput"),p13fileNameCheck()}function p13createfolderEx(){files.sendText({action:"mkdir",reqid:1,path:p13filetreelocation.join("/")+"/"+Q("p13renameinput").value}),p13folderup(999)}function p13deletefile(){var e=p13getFileSelCount(),t=0<p13getFileSelDirCount()?"<br /><br /><label><input type=checkbox id=p13recdeleteinput>Recursive delete</label><br>":"<input type=checkbox id=p13recdeleteinput style='display:none'>";setDialogMode(2,"Delete",3,p13deletefileEx,1<e?format("Delete {0} selected items?",e)+t:"Delete selected item?"+t)}function p13deletefileEx(){for(var e=[],t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked&&e.push(p13filetree.dir[t[o].value].n);files.sendText({action:"rm",reqid:1,path:p13filetreelocation.join("/"),delfiles:e,rec:Q("p13recdeleteinput").checked}),p13folderup(999)}function p13renamefile(){for(var e,t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked&&(e=p13filetree.dir[t[o].value].n);setDialogMode(2,"Rename",3,p13renamefileEx,'<input type=text id=p13renameinput maxlength=64 onkeyup=p13fileNameCheck(event) style=width:100% value="'+e+'" />',{action:"rename",path:p13filetreelocation.join("/"),oldname:e}),focusTextBox("p13renameinput"),p13fileNameCheck()}function p13renamefileEx(e,t){t.newname=Q("p13renameinput").value,files.sendText(t),p13folderup(999)}function p13fileNameCheck(e){var t=isFilenameValid(Q("p13renameinput").value);QE("idx_dlgOkButton",t),1==t&&null!=e&&13==e.keyCode&&dialogclose(1)}function p13uploadFile(){setDialogMode(2,"Upload File",3,p13uploadFileEx,"<input type=file name=files id=p13uploadinput style=width:100% multiple=multiple onchange=\"updateUploadDialogOk('p13uploadinput')\" />"),updateUploadDialogOk("p13uploadinput")}function p13uploadFileEx(){p13doUploadFiles(Q("p13uploadinput").files)}function p13viewfile(){for(var e=document.getElementsByName("fd"),t=0;t<e.length;t++)if(e[t].checked){p13filetree.dir[e[t].value].s<=204800?p13downloadfile(encodeURIComponent(p13filetreelocation.join("/")+"/"+p13filetree.dir[e[t].value].n),encodeURIComponent(p13filetree.dir[e[t].value].n),p13filetree.dir[e[t].value].s,"viewer"):messagebox("File Editor","Only files less than 200k can be edited.");break}}var downloadFile,uploadFile,currentMesh,p13clipboard=null,p13clipboardFolder=null,p13clipboardCut=0;function p13copyFile(e){var t=document.getElementsByName("fd");p13clipboard=[],p13clipboardCut=e,p13clipboardFolder=p13targetpath;for(var o=0;o<t.length;o++)t[o].checked&&"3"==t[o].attributes.file.value&&p13clipboard.push(p13filetree.dir[t[o].value].n);p13updateClipview()}function p13pasteFile(){var e="";null!=p13clipboard&&0<p13clipboard.length&&(e=0==p13clipboardCut?1<p13clipboard.length?format("Confirm copy of {0} entries's to this location?",p13clipboard.length):format("Confirm copy of 1 entrie to this location?"):1<p13clipboard.length?format("Confirm move of {0} entries's to this location?",p13clipboard.length):format("Confirm move of 1 entrie to this location?")),setDialogMode(2,"Paste",3,p13pasteFileEx,e)}function p13pasteFileEx(){files.sendText({action:0==p13clipboardCut?"copy":"move",reqid:1,scpath:p13clipboardFolder,dspath:p13targetpath,names:p13clipboard}),p13folderup(999),1==p13clipboardCut&&(p13clipboardFolder=p13clipboard=null,p13clipboardCut=0,p13updateClipview())}function p13updateClipview(){var e="";null!=p13clipboard&&0<p13clipboard.length&&(e=0==p13clipboardCut?1<p13clipboard.length?format('Holding {0} entries for copy, <a href=# onclick="return p13clearClip()" style=cursor:pointer>Clear</a>.',p13clipboard.length):format('Holding 1 entrie for copy, <a href=# onclick="return p13clearClip()" style=cursor:pointer>Clear</a>.'):1<p13clipboard.length?format('Holding {0} entries for move, <a href=# onclick="return p13clearClip()" style=cursor:pointer>Clear</a>.',p13clipboard.length):format('Holding 1 entrie for move, <a href=# onclick="return p13clearClip()" style=cursor:pointer>Clear</a>.')),QH("p13bottomstatus",e),p13setActions()}function p13clearClip(){return p13clipboardFolder=p13clipboard=null,p13clipboardCut=0,p13updateClipview(),!1}function updateUploadDialogOk(e){QE("idx_dlgOkButton",""!=Q(e).value)}function getFileSelCount(e){for(var t=0,o=document.getElementsByName("fc"),n=0;n<o.length;n++)!o[n].checked||0==e&&"3"!=o[n].attributes.file.value||t++;return t}function getFileCount(){return document.getElementsByName("fc").length}function p13downloadfile(e,t,o){xxdialogMode||downloadFile||!files||(downloadFile={path:decodeURIComponent(e),file:decodeURIComponent(t),size:o,tsize:0,data:"",state:0,id:Math.random()},files.sendText({action:"download",sub:"start",id:downloadFile.id,path:downloadFile.path}),setDialogMode(2,"Download File",10,p13downloadFileCancel,"<div>"+downloadFile.file+"</div><br /><progress id=d2progressBar style=width:100% value=0 max="+o+" />"))}function p13downloadFileCancel(){setDialogMode(0),files.sendText({action:"download",sub:"cancel",id:downloadFile.id}),downloadFile=null}function p13gotDownloadCommand(e){null!=downloadFile&&e.id==downloadFile.id&&("start"==e.sub?(downloadFile.state=1,files.sendText({action:"download",sub:"startack",id:downloadFile.id})):"cancel"==e.sub&&(downloadFile=null,setDialogMode(0)))}function p13gotDownloadBinaryData(e){downloadFile&&0!=downloadFile.state&&(4<e.length&&(downloadFile.tsize+=e.length-4,downloadFile.data+=e.substring(4),Q("d2progressBar").value=downloadFile.tsize),0!=(1&ReadInt(e,0))?(saveAs(data2blob(downloadFile.data),downloadFile.file),downloadFile=null,setDialogMode(0)):files.sendText({action:"download",sub:"ack",id:downloadFile.id}))}function p13doUploadFiles(e){xxdialogMode||((uploadFile={}).xpath=p13filetreelocation.join("/"),uploadFile.xfiles=e,uploadFile.xfilePtr=-1,setDialogMode(2,"Upload File",10,p13uploadFileCancel,"<div id=p13dfileName>Connecting...</div><br /><progress id=d2progressBar style=width:100% value=0 max=0 />"),p13uploadReconnect())}function onFileUploadStateChange(e,t){switch(t){case 0:p13folderup(9999);break;case 3:p13uploadNextFile();break;default:console.log("Unknown onFileUploadStateChange state",t)}}function p13uploadReconnect(){uploadFile.ws=CreateAgentRedirect(meshserver,CreateRemoteFiles(p13gotUploadData),serverPublicNamePort,authCookie,authRelayCookie,domainUrl),uploadFile.ws.attemptWebRTC=!1,uploadFile.ws.ctrlMsgAllowed=!1,uploadFile.ws.onStateChanged=onFileUploadStateChange,uploadFile.ws.Start(filesNode._id)}function p13uploadNextFile(){if(uploadFile.xfilePtr++,uploadFile.xfiles.length>uploadFile.xfilePtr){uploadFile.xptr=0;var e=uploadFile.xfiles[uploadFile.xfilePtr];QH("p13dfileName",e.name),Q("d2progressBar").max=e.size,Q("d2progressBar").value=0,uploadFile.xreader=new FileReader,uploadFile.xreader.onload=function(){uploadFile.xdata=uploadFile.xreader.result,uploadFile.ws.sendText({action:"upload",reqid:uploadFile.xfilePtr,path:uploadFile.xpath,name:e.name,size:uploadFile.xdata.byteLength})},uploadFile.xreader.readAsArrayBuffer(e)}else p13uploadFileCancel()}function p13uploadFileCancel(e,t){null!=uploadFile&&(null!=uploadFile.ws&&(uploadFile.ws.Stop(),uploadFile.ws=null),uploadFile=null),setDialogMode(0)}function p13gotUploadData(e){var t=JSON.parse(e);if(null!=uploadFile&&parseInt(uploadFile.xfilePtr)==parseInt(t.reqid))if("uploadstart"==t.action){p13uploadNextPart(!1);for(var o=0;o<8;o++)p13uploadNextPart(!0)}else"uploadack"==t.action?p13uploadNextPart(!1):"uploaderror"==t.action&&p13uploadFileCancel()}function p13uploadNextPart(e){var t=uploadFile.xdata,o=uploadFile.xptr,n=uploadFile.xptr+4096;if(n>t.byteLength){if(1==e)return;n=t.byteLength}if(o==t.byteLength)null!=uploadFile.ws&&(uploadFile.ws.Stop(),uploadFile.ws=null),uploadFile.xfiles.length>uploadFile.xfilePtr+1?p13uploadReconnect():p13uploadFileCancel();else{var i=t.slice(o,n);uploadFile.ws.send(i),uploadFile.xptr=n,Q("d2progressBar").value=n}}function p20updateMesh(){if(null!=currentMesh){QH("p20meshName",EscapeHtml(currentMesh.name));var e=format("Unknown #{0}",currentMesh.mtype),t=currentMesh.links[userinfo._id].rights;1==currentMesh.mtype&&(e="Intel&reg; AMT only, no agent"),2==currentMesh.mtype&&(e="Managed using a software agent");var o="";o+=addHtmlValue("Name",addLinkConditional(EscapeHtml(currentMesh.name),"p20editmesh(1)",0!=(1&t))),o+=addHtmlValue("Description",addLinkConditional(currentMesh.desc&&""!=currentMesh.desc?EscapeHtml(currentMesh.desc):"<i>None</i>","p20editmesh(2)",0!=(1&t))),o+=addHtmlValue("Type",e),o+="<br style=clear:both><br>";var n=currentMesh.links[userinfo._id];n&&0!=(2&n.rights)&&(o+="<div style=margin-bottom:6px><a onclick=p20showAddMeshUserDialog() style=cursor:pointer><img src=images/icon-addnew.png border=0 height=12 width=12> Add User</a></div>"),o+='<table style="color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse" border=0 cellpadding=2 cellspacing=0 width=100%><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:left;width:430px>User Authorizations</th></tr>';var i=1,a=[];for(var s in currentMesh.links)a.push({id:s,name:s.split("/")[2],rights:currentMesh.links[s].rights});for(var s in a.sort(function(e,t){return e.name>t.name?1:e.name<t.name?-1:0}),a){var l="",r="Partial Rights",d=a[s].rights;4294967295==d?r="Full Administrator":0==d&&(r="No Rights"),s==userinfo._id||4294967295!=t&&0==(2&t)||(l='<a onclick=p20deleteUser(event,"'+encodeURIComponent(a[s].id)+'") style=cursor:pointer><img src=images/trash.png border=0 height=10 width=10></a>'),o+='<tr onclick=p20viewuser("'+encodeURIComponent(a[s].id)+'") style=height:32px;cursor:pointer'+(i%2==0?";background-color:#DDD":"")+"><td>",o+="<div style=float:right>"+l+"</div><div style=float:right;padding-right:4px>"+r+"</div><div class=m2></div><div>&nbsp;"+EscapeHtml(decodeURIComponent(a[s].name))+"<div></div></div>",o+="</td></tr>",++i}o+="</tbody></table>",4294967295==t&&(o+="<div style=font-size:small;text-align:right;margin-top:6px><span><a onclick=p20showDeleteMeshDialog() style=cursor:pointer>Delete Group</a></span></div>"),QH("p20info",o)}}function p20showDeleteMeshDialog(){if(xxdialogMode)return!1;var e=format("Are you sure you want to delete group {0}? Deleting the device group will also delete all information about devices within this group.",EscapeHtml(currentMesh.name))+"<br /><br />";return setDialogMode(2,"Delete Group",3,p20showDeleteMeshDialogEx,e+="<label><input id=p20check type=checkbox onchange=p20validateDeleteMeshDialog() />Confirm</label>"),p20validateDeleteMeshDialog(),!1}function p20validateDeleteMeshDialog(){QE("idx_dlgOkButton",Q("p20check").checked)}function p20showDeleteMeshDialogEx(e,t){meshserver.send({action:"deletemesh",meshid:currentMesh._id,meshname:currentMesh.name})}function p20editmesh(e){if(!xxdialogMode){var t=addHtmlValue("Name","<input id=dp20meshname style=width:170px maxlength=32 onchange=p20editmeshValidate() onkeyup=p20editmeshValidate() />");setDialogMode(2,"Edit Device Group",3,p20editmeshEx,t+=addHtmlValue("Description","<input id=dp20meshdesc style=width:170px maxlength=1024 onkeyup=p20editmeshValidate() />")),Q("dp20meshname").value=currentMesh.name,currentMesh.desc&&(Q("dp20meshdesc").value=currentMesh.desc),p20editmeshValidate(),2==e?Q("dp20meshdesc").focus():Q("dp20meshname").focus()}}function p20editmeshEx(){meshserver.send({action:"editmesh",meshid:currentMesh._id,meshname:Q("dp20meshname").value,desc:Q("dp20meshdesc").value})}function p20editmeshValidate(){QE("idx_dlgOkButton",0<Q("dp20meshname").value.length)}function p20showAddMeshUserDialog(){if(!xxdialogMode){var e=addHtmlValue("User","<input id=dp20username style=width:170px maxlength=32 onchange=p20validateAddMeshUserDialog() onkeyup=p20validateAddMeshUserDialog() />");e+='<div style="border:2px groove gray;background-color:white;max-height:120px;overflow-y:scroll">',e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20fulladmin>Full Administrator</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20editmesh>Edit Device Group</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20manageusers>Manage Device Group Users</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20managecomputers>Manage Device Group Computers</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20remotecontrol>Remote Control</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20remoteview style=margin-left:12px>Remote View Only</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20remotelimitedinput style=margin-left:12px>Limited Input Only</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20noterminal style=margin-left:12px>No Terminal Access</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20nofiles style=margin-left:12px>No File Access</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20noamt style=margin-left:12px>No Intel&reg; AMT</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20meshagentconsole>Mesh Agent Console</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20meshserverfiles>Server Files</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20wakedevices>Wake Devices</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20editnotes>Edit Device Notes</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20limitevents>Show Only Own Events</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20chatnotify>Chat & Notify</label><br>",setDialogMode(2,"Add User to Mesh",3,p20showAddMeshUserDialogEx,e+="</div>"),p20validateAddMeshUserDialog(),Q("dp20username").focus()}}function p20validateAddMeshUserDialog(){var e=currentMesh.links[userinfo._id].rights;QE("idx_dlgOkButton",0<Q("dp20username").value.length),QE("p20fulladmin",4294967295==e),QE("p20editmesh",!Q("p20fulladmin").checked&&4294967295==e),QE("p20manageusers",!Q("p20fulladmin").checked),QE("p20managecomputers",!Q("p20fulladmin").checked),QE("p20remotecontrol",!Q("p20fulladmin").checked),QE("p20meshagentconsole",!Q("p20fulladmin").checked),QE("p20meshserverfiles",!Q("p20fulladmin").checked),QE("p20wakedevices",!Q("p20fulladmin").checked),QE("p20editnotes",!Q("p20fulladmin").checked),QE("p20remoteview",!Q("p20fulladmin").checked&&Q("p20remotecontrol").checked),QE("p20noterminal",!Q("p20fulladmin").checked&&Q("p20remotecontrol").checked),QE("p20nofiles",!Q("p20fulladmin").checked&&Q("p20remotecontrol").checked),QE("p20noamt",!Q("p20fulladmin").checked&&Q("p20remotecontrol").checked)}function p20showAddMeshUserDialogEx(){var e=0;1==Q("p20fulladmin").checked?e=4294967295:(1==Q("p20editmesh").checked&&(e+=1),1==Q("p20manageusers").checked&&(e+=2),1==Q("p20managecomputers").checked&&(e+=4),1==Q("p20remotecontrol").checked&&(e+=8),1==Q("p20meshagentconsole").checked&&(e+=16),1==Q("p20meshserverfiles").checked&&(e+=32),1==Q("p20wakedevices").checked&&(e+=64),1==Q("p20editnotes").checked&&(e+=128),1==Q("p20remoteview").checked&&(e+=256),1==Q("p20noterminal").checked&&(e+=512),1==Q("p20nofiles").checked&&(e+=1024),1==Q("p20noamt").checked&&(e+=2048)),meshserver.send({action:"addmeshuser",meshid:currentMesh._id,meshname:currentMesh.name,username:Q("dp20username").value,meshadmin:e})}function p20viewuser(e){if(!xxdialogMode){e=decodeURIComponent(e);var t=[],o=currentMesh.links[userinfo._id].rights,n=currentMesh.links[e].rights;4294967295==n?t.push("Full Administrator"):(0!=(1&n)&&t.push("Edit Device Group"),0!=(2&n)&&t.push("Manage Device Group Users"),0!=(4&n)&&t.push("Manage Device Group Computers"),0!=(8&n)&&t.push("Remote Control"),0!=(16&n)&&t.push("Agent Console"),0!=(32&n)&&t.push("Server Files"),0!=(64&n)&&t.push("Wake Devices"),0!=(128&n)&&t.push("Edit Notes"),0!=(256&n)&&t.push("Remote View Only"),0!=(512&n)&&t.push("No Terminal"),0!=(1024&n)&&t.push("No Files"),0!=(2048&n)&&t.push("No Intel&reg; AMT"),0!=(8&n)&&0!=(4096&n)&&0==(256&n)&&t.push("Limited Input"),0!=(8192&n)&&t.push("Self Events Only"),0!=(16384&n)&&t.push("Chat & Notify")),0==t.length&&t.push("No Rights");var i=1,a=addHtmlValue("User",EscapeHtml(decodeURIComponent(e.split("/")[2])));a+=addHtmlValue("Permissions",t.join(", ")),userinfo._id!=e&&(4294967295==o||0!=(2&o)&&4294967295!=n)&&(i+=4),setDialogMode(2,"Device Group User",i,p20viewuserEx,a,e)}}function p20viewuserEx(e,t){2==e&&setDialogMode(2,"Remote Mesh User",3,p20viewuserEx2,format("Confirm removal of user {0}?",t.split("/")[2]),t)}function p20deleteUser(e,t){haltEvent(e),p20viewuserEx(2,decodeURIComponent(t))}function p20viewuserEx2(e,t){meshserver.send({action:"removemeshuser",meshid:currentMesh._id,meshname:currentMesh.name,userid:t})}var xxdialogMode,xxdialogFunc,xxdialogButtons,xxdialogTag,xxcurrentView=-1;function go(e){if(setSessionActivity(),!xxdialogMode&&xxcurrentView!=e){updateFooterMenu(),setDialogMode(0);for(var t=0;t<32;t++)QV("p"+t,t==e);xxcurrentView=e}}function setDialogMode(e,t,o,n,i,a){setSessionActivity(),xxdialogMode=e,xxdialogFunc=n,xxdialogButtons=o,xxdialogTag=a,QE("idx_dlgOkButton",!0),QV("idx_dlgOkButton",1&o),QV("idx_dlgCancelButton",2&o),QV("id_dialogclose",2&o||8&o),QV("idx_dlgButtonBar",7&o),t&&QH("id_dialogtitle",t);for(var s=1;s<24;s++)QV("dialog"+s,s==e);QV("dialog",e),i&&(2==e?QH("id_dialogOptions",i):QH("id_dialogMessage",i))}function dialogclose(e){setSessionActivity();var t=xxdialogFunc,o=xxdialogButtons,n=xxdialogTag;setDialogMode(),(8&o||e)&&t&&t(e,n)}function putstore(e,t){try{if("undefined"==typeof localStorage||localStorage.getItem(e)==t)return;null==t?localStorage.removeItem(e):localStorage.setItem(e,t)}catch(e){}if("_"!=e[0]){for(var o={},n=0,i=localStorage.length;n<i;++n){var a=localStorage.key(n);"_"!=a[0]&&(o[a]=localStorage.getItem(a))}meshserver.send({action:"userWebState",state:JSON.stringify(o)})}}function getstore(e,t){try{if("undefined"==typeof localStorage)return t;var o=localStorage.getItem(e);return null==o||null==o?t:o}catch(e){return t}}function center(){QS("dialog").left=(getDocWidth()-300)/2+"px",deskAdjust(),deskAdjust()}function messagebox(e,t){QH("id_dialogMessage",t),setDialogMode(1,e,1)}function statusbox(e,t){QH("id_dialogMessage",t),setDialogMode(1,e)}function getDocWidth(){return window.innerWidth?window.innerWidth:document.documentElement&&document.documentElement.clientWidth&&0!=document.documentElement.clientWidth?document.documentElement.clientWidth:document.getElementsByTagName("body")[0].clientWidth}function haltEvent(e){return e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1}function haltReturn(e){13==e.keyCode&&haltEvent(e)}function validateEmail(e){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function reload(){window.location.href=window.location.href}function getNodeFromId(e){for(var t in nodes)if(nodes[t]._id==e)return nodes[t];return null}function addHtmlValue(e,t){return"<table><td style=width:120px>"+e+"<td><b>"+t+"</b></table>"}function addHtmlValue2(e,t){return"<div><div style=display:inline-block;float:right>"+t+"</div><div style=display:inline-block>"+e+"</div></div>"}function addLink(e,t){return"<a style=cursor:pointer;color:darkblue;text-decoration:none onclick='"+t+"'>&diams; "+e+"</a>"}function addLinkConditional(e,t,o){return o?addLink(e,t):e}function passwordcheck(e){return/(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%^&*()]).{8,}/.test(e)}function getFileSizeStr(e){return 1==e?"1 byte":format("{0} bytes",e)}function joinPaths(){var e=[];for(var t in arguments){var o=arguments[t];if(null!=o&&""!=o){for(;o.endsWith("/")||o.endsWith("\\");)o=o.substring(0,o.length-1);for(;o.startsWith("/")||o.startsWith("\\");)o=o.substring(1);e.push(o)}}return e.join("/")}function focusTextBox(e){setTimeout(function(){Q(e).selectionStart=Q(e).selectionEnd=65535,Q(e).focus()},0)}isFilenameValid=function(){var t=/^[^\\/:\*\?"<>\|]+$/,o=/^\./,n=/^(nul|prn|con|lpt[0-9]|com[0-9])(\.|$)/i;return function(e){return t.test(e)&&!o.test(e)&&!n.test(e)&&"."!=e[0]}}();function parseUriArgs(){var e,t={},o=window.document.location.href.split(/[\?&|\=]/);for(n in o.splice(0,1),o)switch(n%2){case 0:e=decodeURIComponent(o[n]);break;case 1:t[e]=decodeURIComponent(o[n]);var n=parseInt(t[e]);n==t[e]&&(t[e]=n)}return t}function printDate(e){return e.toLocaleDateString(args.locale)}function printTime(e){return e.toLocaleTimeString(args.locale)}function printDateTime(e){return e.toLocaleString(args.locale)}function format(e){var o=Array.prototype.slice.call(arguments,1);return e.replace(/{(\d+)}/g,function(e,t){return void 0!==o[t]?o[t]:e})}function nobreak(e){return e.split(" ").join("&nbsp;")}</script>
\ No newline at end of file
1 +<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link rel="shortcut icon"type=image/x-icon href={{{domainurl}}}favicon.ico><script src=scripts/common-0.0.1.js></script><script src=scripts/meshcentral.js></script><script src=scripts/agent-redir-ws-0.1.1.js></script><script src=scripts/agent-desktop-0.0.2.js></script><script src=scripts/amt-0.2.0.js></script><script src=scripts/amt-redir-ws-0.1.0.js></script><script src=scripts/amt-desktop-0.0.2.js></script><script src=scripts/zlib.js></script><script src=scripts/zlib-inflate.js></script><script src=scripts/zlib-adler32.js></script><script src=scripts/zlib-crc32.js></script><script keeplink=1 src=scripts/filesaver.js></script><title>{{{title}}}</title><style>a{color:#036;text-decoration:underline}#footer a{color:#fff;text-decoration:underline}#footer a:hover{color:#fff;text-decoration:none}.i1{background:url(../images/icons50.png) 0 0;height:50px;width:50px;border:none}.i2{background:url(../images/icons50.png) -50px 0;height:50px;width:50px;border:none}.i3{background:url(../images/icons50.png) -100px 0;height:50px;width:50px;border:none}.i4{background:url(../images/icons50.png) -150px 0;height:50px;width:50px;border:none}.i5{background:url(../images/icons50.png) -200px 0;height:50px;width:50px;border:none}.i6{background:url(../images/icons50.png) -250px 0;height:50px;width:50px;border:none}.m0{background:url(../images/images16.png) -32px 0;height:16px;width:16px;border:none;float:left}.m1{background:url(../images/images16.png) -16px 0;height:16px;width:16px;border:none;float:left}.m2{background:url(../images/images16.png) -96px 0;height:16px;width:16px;border:none;float:left}.m3{background:url(../images/images16.png) -112px 0;height:16px;width:16px;border:none;float:left}.gray{filter:gray;-webkit-filter:grayscale(100%) opacity(60%)}.DevSt{padding-left:5px;border-bottom-style:solid;border-bottom-width:1px;border-bottom-color:#ddd}.noselect{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.fileIcon4{background:url(../images/meshicon16.png);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:#fff;clear:both}</style><body onload='"undefined"!=typeof startup&&startup()'style="overflow-y:hidden;margin:0;padding:0;border:0;color:#000;font-size:13px;font-family:\'Trebuchet MS\',Arial,Helvetica,sans-serif"><div id=container><div id=mastheadx></div><div id=masthead style="background:url(logo.png) 0 0;background-size:341px 50px;background-color:#036;background-repeat:no-repeat;height:50px;width:100%;overflow:hidden"><div style="width:calc(100% - 50px);overflow:hidden"><div style=float:left;height:66px;color:#c8c8c8;padding-left:10px;padding-top:6px><strong><font style=font-size:36px;font-family:Arial,Helvetica,sans-serif>{{{title}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:10px><strong><font style=font-size:12px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><img id=topMenuIcon class=noselect style=position:absolute;right:0;top:10px;bottom:50px;color:#c8c8c8;font-size:44px;margin-right:8px;cursor:pointer;display:none onclick=topMenu() src=/images/3bars-30.png width=30 height=30></div><div id=page_content style=overflow-y:scroll;position:absolute;bottom:32px;top:50px;width:100%><div id=column_l style=width:100%;padding:0;position:absolute;bottom:0;top:0><div id=p0 style=display:none;width:100%;height:100%><div style=display:flex;align-items:center;width:100%;height:100%><div id=p0message style=text-align:center;width:100%><span id=p0span>Server disconnected</span>,<href onclick=reload() style=cursor:pointer><u>click to reconnect</u></href>.</div></div></div><div id=p1 style=display:none;width:100%;height:100%><div style=display:flex;align-items:center;width:100%;height:100%><div id=p1message style=text-align:center;width:100%></div></div></div><div id=p2 style=display:none><div id=xdevices></div></div><div id=p3 style=display:none;position:absolute;bottom:0;top:0;width:100%><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">&#9664;</div><td><img src=/images/user-50.png width=50 height=50><td><div style=margin-left:5px><strong style=font-size:large><span id=p3userName></span></strong><br></div></table><div id=p3info style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%><div style=margin-left:8px><div id=p3AccountActions><p><strong>Account Security</strong><div style=margin-left:9px;margin-bottom:8px><div id=manageAuthApp style=margin-top:5px;display:none><a onclick=account_manageAuthApp() style=cursor:pointer>Manage authenticator app</a></div><div id=manageOtp style=margin-top:5px;display:none><a onclick=account_manageOtp(0) style=cursor:pointer>Manage backup codes</a></div></div><p><strong>Account Actions</strong><div style=margin-left:9px;margin-bottom:8px><div style=margin-top:5px><span id=verifyEmailId style=display:none><a onclick=account_showVerifyEmail() style=cursor:pointer>Verify email</a></span></div><div style=margin-top:5px><span id=changeEmailId style=display:none><a onclick=account_showChangeEmail() style=cursor:pointer>Change email address</a></span></div><div style=margin-top:5px><a onclick=account_showChangePassword() style=cursor:pointer>Change password</a><span id=p2nextPasswordUpdateTime></span></div><div style=margin-top:5px><a onclick=account_showDeleteAccount() style=cursor:pointer>Delete account</a></div></div><br style=clear:both></div><strong>Device Groups</strong> <span id=p3createMeshLink1>( <a onclick=account_createMesh() style=cursor:pointer><img src=images/icon-addnew.png width=12 height=12 border=0> New</a> )</span><br><br><div id=p3meshes></div><div id=p3noMeshFound style=margin-left:9px;display:none>No device groups.<span id=p3createMeshLink2> <a onclick=account_createMesh() style=cursor:pointer><strong>Get started here!</strong></a></span></div><br style=clear:both></div></div></div><div id=p5 style=display:none><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">&#9664;</div><td><img src=/images/user-50.png width=50 height=50><td><div style=margin-left:5px><strong style=font-size:large>My Files</strong><br></div></table><div id=p5myfiles style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%><table id=p5toolbar style=width:100%;height:78px cellpadding=0 cellspacing=0><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign=bottom><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p5FolderUp disabled onclick=p5folderup() value=Up> <input type=button style="width:calc(100%/5 - 5px)"id=p5SelectAllButton disabled onclick=p5selectallfile() value=SelectAll onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5RenameFileButton disabled value=Rename onclick=p5renamefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5DeleteFileButton disabled value=Delete onclick=p5deletefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5NewFolderButton disabled value=Folder onclick=p5createfolder() onkeypress=return!1 onkeydown=return!1></div><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p5UploadButton disabled value=Upload onclick=p5uploadFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5CutButton disabled value=Cut onclick=p5copyFile(1) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5CopyButton disabled value=Copy onclick=p5copyFile(0) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5PasteButton disabled value=Paste onclick=p5pasteFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5RefreshButton value=Refresh onclick=p5refreshFiles() onkeypress=return!1 onkeydown=return!1></div><tr><td style=background-color:#e4e9e7;height:28px><table style=width:100%><tr><td id=p5currentpath style=overflow:hidden;padding-left:4px;padding-top:2px><td style=text-align:right;padding-right:4px><select id=p5sortdropdown onchange=updateFiles()><option value=1 selected>Sort by name<option value=2>Sort by size<option value=3>Sort by date<option value=4>Descend by name<option value=5>Descend by size<option value=6>Descend by date</select></table></table><div id=p5filetable style="width:100%;height:calc(100% - 133px);overflow:auto;-webkit-user-select:none"><span id=p5files></span></div><table id=p5toolbarBottom style=width:100%;height:22px;position:absolute;bottom:0;background-color:#d3d9d6 cellpadding=0 cellspacing=0><tr><td style=text-align:left;padding:3px>&nbsp;<span id=p5bottomstatus></span><td id=p5rightOfButtons style=text-align:right;padding:3px></table></div></div><div id=p10 style=display:none;position:absolute;bottom:0;top:0;width:100%;overflow:hidden><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0;position:absolute;top:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">&#9664;</div><td><a id=MainComputerImage style=cursor:pointer onclick=p10showiconselector()></a><td><div style=margin-left:5px><strong><span id=p10deviceName></span></strong><br><span id=MainComputerState></span></div></table><div id=p10general style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%><div id=p10html style=margin-left:8px;margin-right:8px></div><div id=p10html2></div><div id=p10html3></div></div><div id=p10desktop style=overflow:hidden;position:absolute;top:55px;bottom:0;width:100%;display:none><div id=deskarea1 style=position:absolute;top:0;width:100%;height:25px><div style=padding-top:2px;padding-bottom:2px;background:silver><div style=float:right;text-align:right><span id=p14power></span>&nbsp; <input id=DeskSoftInput style=width:25px;display:none;opacity:.2 onblur=toggleSoftKeys(0) onkeypress="return ondeskkeypress(event)"onkeydown="return ondeskkeydown(event)"onkeyup="return ondeskkeyup(event)"></div><div style=margin-left:3px><input type=button id=connectbutton1 value=Connect onclick=connectDesktop(event,1) onkeypress=return!1 onkeydown=return!1 disabled> <input type=button id=connectbutton1h value="HW Connect"onclick=connectDesktop(event,2) onkeypress=return!1 onkeydown=return!1 disabled> <input type=button id=disconnectbutton1 value=Disconnect onclick=connectDesktop(event,0) onkeypress=return!1 onkeydown=return!1> <span id=deskstatus>Disconnected</span></div></div></div><div id=deskarea3 style="position:absolute;top:25px;width:100%;height:calc(100% - 50px)"><div id=deskarea3x style=background:#000;text-align:center;height:100%;position:relative><div id=DeskParent style=height:100%><canvas id=Desk width=640 height=200 style=width:100%;-ms-touch-action:none;margin-left:0 oncontextmenu=return!1 onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel=dmousewheel(event)></canvas></div><div id=DeskTools style="position:absolute;width:400px;height:100%;background-color:gray;top:0;right:0;border-left:2px solid #d3d3d3;display:none"><a id=DeskToolsRefreshButton style=float:right;padding:3px;cursor:pointer onclick=refreshDeskTools()>Refresh</a><div id=DeskToolsBar style="position:absolute;padding:3px;border-radius:3px 3px 0 0;top:5px;left:4px;bottom:26px;background-color:#d3d3d3;cursor:pointer">Processes</div><div style=position:absolute;top:26px;left:4px;right:4px;bottom:4px;background-color:#d3d3d3;text-align:left><div style="border-bottom:1px solid #a9a9a9;padding:3px"><a style=width:50px;padding-right:5px;float:left;cursor:pointer onclick=sortProcess(0)>PID</a><a style=cursor:pointer onclick=sortProcess(1)>Name</a></div><div id=DeskToolsProcesses style=overflow-y:scroll;position:absolute;top:24px;bottom:0;width:100%></div></div></div></div></div><div id=deskarea4 style=position:absolute;bottom:0;width:100%;height:25px><div style=padding-top:2px;padding-bottom:2px;background:silver><div style=float:right;text-align:right><select id=termdisplays style=display:none onchange=deskSetDisplay(event) onclick=deskGetDisplayNumbers(event)></select>&nbsp; <span id=DeskToastButton><img src=images/icon-notify.png onclick=deviceToastFunction() height=16 width=16 style=padding-top:2px></span>&nbsp;</div><div><input id=deskActionsBtn type=button style=margin-left:3px onkeypress=return!1 onkeydown=return!1 value=Actions onclick=deviceActionFunction()> <input type=button value=Settings onkeypress=return!1 onkeydown=return!1 onclick=showDesktopSettings()> <input type=button onkeypress=return!1 onkeydown=return!1 value="Power Actions..."onclick=showPowerActionDlg() style=display:none> <input id=DeskSpecialKeys type=button value="Special Keys"onkeypress=return!1 onkeydown=return!1 onclick=sendSpecialKeys()> <input id=DeskSoftKeys type=button value=Keyboard onkeypress=return!1 onkeydown=return!1 onclick=toggleSoftKeys(1)> <label><span id=DeskControlSpan style=display:none><input id=DeskControl type=checkbox onkeypress=return!1 onkeydown=return!1>Input</span></label></div></div></div></div><div id=p10files style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%;display:none><table id=p13toolbar style=width:100%;height:111px cellpadding=0 cellspacing=0><tr><td style="background-color:silver;border-bottom:2px solid #000;padding:2px"><div style=float:right;text-align:right><input id=filesActionsBtn type=button onkeypress=return!1 onkeydown=return!1 value=Actions onclick=deviceActionFunction() style=margin-right:2px></div><div style=margin-left:2px><input id=p13AutoConnect value=AutoConnect onclick=autoConnectFiles(event) onkeypress=return!1 onkeydown=return!1 type=button style=display:none> <input id=p13Connect value=Connect onclick=connectFiles(event) onkeypress=return!1 onkeydown=return!1 type=button> <span id=p13Status>Disconnected</span></div><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign=bottom><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p13FolderUp disabled onclick=p13folderup() value=Up> <input type=button style="width:calc(100%/5 - 5px)"id=p13SelectAllButton disabled onclick=p13selectallfile() value=SelectAll onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13RenameFileButton disabled value=Rename onclick=p13renamefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13DeleteFileButton disabled value=Delete onclick=p13deletefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13NewFolderButton disabled value=Folder onclick=p13createfolder() onkeypress=return!1 onkeydown=return!1></div><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p13UploadButton disabled value=Upload onclick=p13uploadFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13CutButton disabled value=Cut onclick=p13copyFile(1) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13CopyButton disabled value=Copy onclick=p13copyFile(0) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13PasteButton disabled value=Paste onclick=p13pasteFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13RefreshButton disabled value=Refresh onclick=p13folderup(9999) onkeypress=return!1 onkeydown=return!1></div><tr><td style=background-color:#e4e9e7;height:28px><table style=width:100%><tr><td id=p13currentpath style=overflow:hidden;padding-left:4px;padding-top:2px><td style=text-align:right;padding-right:4px><select id=p13sortdropdown onchange=p13updateFiles()><option value=1 selected>Sort by name<option value=2>Sort by size<option value=3>Sort by date<option value=4>Descend by name<option value=5>Descend by size<option value=6>Descend by date</select></table></table><div id=p13filetable style="width:100%;height:calc(100% - 133px);overflow:auto;-webkit-user-select:none"><span id=p13files></span></div><table id=p13toolbarBottom style=width:100%;height:22px;position:absolute;bottom:0 cellpadding=0 cellspacing=0><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#d3d9d6>&nbsp;<span id=p13bottomstatus></span></table></div></div><div id=p20 style=display:none;position:absolute;bottom:0;top:0;width:100%><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">&#9664;</div><td onclick=p20editmesh(1)><img src=/images/meshicon50.png width=50 height=50><td onclick=p20editmesh(1)><div style=margin-left:5px><strong style=font-size:large><span id=p20meshName></span></strong><br></div></table><div id=p20info style=margin-left:8px;margin-right:8px></div></div></div></div><div id=footer style=height:32px;width:100%;text-align:center;background-color:#113962;position:absolute;bottom:0><table id=footerMenu cellpadding=0 cellspacing=0 style=height:32px;width:100%;color:#fff;cursor:pointer;table-layout:fixed></table></div></div><div id=dialog style="z-index:1000;background-color:#eee;box-shadow:0 0 15px #666;font-family:Arial,Helvetica,sans-serif;border-radius:5px;position:fixed;top:90px;width:300px;display:none"><div style="width:100%;background-color:#036;color:#fff;border-radius:5px 5px 0 0"><div id=id_dialogclose style=float:right;padding:5px;cursor:pointer onclick=setDialogMode()><b>X</b></div><div id=id_dialogtitle style=padding:5px></div><div style=width:100%;margin:6px></div></div><div style=margin-right:16px;margin-left:8px><div id=dialog1 style=margin:auto;text-align:center;margin:3px><div id=id_dialogMessage style=padding:10px></div></div><div id=dialog2 style=margin:auto;margin:3px><div id=id_dialogOptions></div></div><div id=dialog3 style=margin:auto;margin:3px><select id=deskkeys style=width:100%><option value=10>Ctrl+Alt+Del<option value=11>Tab<option value=5>Win<option value=0>Win+Down<option value=1>Win+Up<option value=2>Win+L<option value=3>Win+M<option value=4>Shift+Win+M<option value=6>Win+R<option value=7>Alt-F4<option value=8>Ctrl-W<option value=9>Alt-Tab</select></div><div id=dialog7 style=margin:auto;margin:3px><div id=d7meshkvm><h4 style="width:100%;border-bottom:1px solid gray">Agent Remote Desktop</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir=rtl></select><div style=height:20px>Quality</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir=rtl><option selected value=1024>100%<option value=896>87.5%<option value=768>75%<option value=640>62.5%<option value=512>50%<option value=384>37.5%<option value=256>25%<option value=128>12.5%</select><div style=height:20px>Scaling</div></div><div style="margin:3px 0 3px 0"><select id=d7framelimiter style=float:right;width:200px;height:20px dir=rtl><option selected value=50>Fast<option value=100>Medium<option value=400>Slow<option value=1000>Very slow</select><div style=height:20px>Rate</div></div></div><div id=d7amtkvm><h4 style="width:100%;border-bottom:1px solid gray">Intel&reg; AMT Hardware KVM</h4><div style=height:26px><select id=d7desktopmode style=float:right;width:200px><option value=1>RLE8, Fastest<option value=2>RLE16, Recommended<option value=3>RAW8, Slow<option value=4>RAW16, Very Slow</select><div>Encoding</div></div><div style=height:60px><div style="float:right;border:1px solid #666;width:200px;height:60px;overflow-y:scroll;background-color:#fff"><label><input type=checkbox id=d7showfocus>Show Focus Tool</label><br><label><input type=checkbox id=d7showcursor>Show Local Mouse Cursor</label><br></div><div>Other</div></div></div></div></div><div id=idx_dlgButtonBar style=padding:10px;margin-bottom:20px><input id=idx_dlgCancelButton type=button value=Cancel style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)> <input id=idx_dlgOkButton type=button value=OK style=float:right;width:80px onclick=dialogclose(1)></div></div><div id=topMenu style="z-index:1000;background-color:#eee;box-shadow:0 0 15px #666;font-family:Arial,Helvetica,sans-serif;border-radius:0 0 5px 5px;position:fixed;top:50px;right:5px;width:170px;display:none"><div style="padding:12px;border-top:1px solid gray;color:#000;cursor:pointer"onclick=topMenu(2)>My Files</div><div style="padding:12px;border-top:1px solid gray;color:#000;cursor:pointer"onclick=topMenu(1)>My Account</div><div id=logoutMenuOption><a href=/logout><div style="padding:12px;border-top:1px solid gray;color:#000;cursor:pointer">Logout</div></a></div></div><iframe name=fileUploadFrame style=display:none></iframe><script>"use strict";var webState="{{{webstate}}}";for(var i in""!=webState&&(webState=JSON.parse(decodeURIComponent(webState))),webState)localStorage.setItem(i,webState[i]);webState.loctag||localStorage.removeItem("loctag");var files,args=parseUriArgs(),debugLevel=parseInt("{{{debuglevel}}}"),features=parseInt("{{{features}}}"),sessionTime=parseInt("{{{sessiontime}}}"),domain="{{{domain}}}",domainUrl="{{{domainurl}}}",authCookie="{{{authCookie}}}",authRelayCookie="{{{authRelayCookie}}}",authCookieRenewTimer=null,meshserver=null,xdr=null,serverinfo=null,nodes=[],meshes={},filetree={},userinfo=null,users=(serverinfo=null,null),nodeShortIdent=0,serverPublicNamePort="{{{serverDnsName}}}:{{{serverPublicPort}}}",debugmode=!1,attemptWebRTC=0!=(128&features),StatusStrs=["Disconnected","Connecting...","Setup...","Connected","Intel&reg; AMT Connected"],passRequirements="{{{passRequirements}}}";""!=passRequirements&&(passRequirements=JSON.parse(decodeURIComponent(passRequirements)));var sessionActivity=Date.now();function startup(){if(0==(32&features)){var e=null;try{e=top.location.toString().toLowerCase()}catch(e){}if(top!=self&&(null==e||0==top.active))return void(top.location=self.location)}if(!args.locale){var t=getstore("loctag",0);null!=t&&"*"!=t&&(args.locale=t)}(window.onresize=center)(),QV("changeEmailId",0==(2097152&features)),QH("p1message","Connecting..."),go(1),(meshserver=MeshServerCreateControl(domainUrl,authCookie)).onStateChanged=onStateChanged,meshserver.onMessage=onMessage,meshserver.Start();var o=localStorage.getItem("desktopsettings");null!=o&&(desktopsettings=JSON.parse(o)),applyDesktopSettings()}function onStateChanged(e,t,o,n){if(0==t){if(setDialogMode(0),go(0),"noauth"==n)return void QH("p0span","Unable to perform authentication");2==o?setTimeout(serverPoll,5e3):QH("p0span","Unable to connect web socket"),null!=authCookieRenewTimer&&(clearInterval(authCookieRenewTimer),authCookieRenewTimer=null)}else 2==t&&(meshserver.send({action:"meshes"}),meshserver.send({action:"nodes"}),meshserver.send({action:"files"}),xxcurrentView<2&&go(2),authCookieRenewTimer=setInterval(function(){meshserver.send({action:"authcookie"})},18e5));QV("topMenuIcon",2==t)}function serverPoll(){xdr=null;try{xdr=new XDomainRequest}catch(e){}(xdr=xdr||new XMLHttpRequest).open("HEAD",window.location.href),xdr.timeout=15e3,xdr.onload=function(){reload()},xdr.onerror=xdr.ontimeout=function(){setTimeout(serverPoll,1e4)},xdr.send()}function updateSelf(){if(QV("verifyEmailId",!0!==userinfo.emailVerified&&null!=userinfo.email&&1==serverinfo.emailcheck),QV("manageAuthApp",4096&features),QV("manageOtp",0!=(4096&features)&&(1==userinfo.otpsecret||0<userinfo.otphkeys)),QV("p3createMeshLink1",!1),QV("p3createMeshLink2",!1),"number"==typeof userinfo.passchange)if(-1==userinfo.passchange)QH("p2nextPasswordUpdateTime"," - Reset on next login.");else if(null!=passRequirements&&"number"==typeof passRequirements.reset){var e=userinfo.passchange+86400*passRequirements.reset-Math.floor(Date.now()/1e3);e<0?QH("p2nextPasswordUpdateTime"," - Reset on next login."):e<3600?QH("p2nextPasswordUpdateTime",format(" - Reset in {0} minute{1}.",Math.floor(e/60),addLetterS(Math.floor(e/60)))):e<86400?QH("p2nextPasswordUpdateTime",format(" - Reset in {0} hour{1}.",Math.floor(e/3600),addLetterS(Math.floor(e/3600)))):QH("p2nextPasswordUpdateTime",format(" - Reset in {0} day{1}."),Math.floor(e/86400),addLetterS(Math.floor(e/86400)))}}function addLetterS(e){return 1<e?"s":""}function setSessionActivity(){sessionActivity=Date.now()}function checkIdleSessionTimeout(){Date.now()-sessionActivity>serverinfo.timeout&&(window.location.href="logout")}function onMessage(e,t){switch(t.action){case"serverinfo":(serverinfo=t.serverinfo).timeout&&(setInterval(checkIdleSessionTimeout,1e4),checkIdleSessionTimeout()),QV("p3AccountActions",0==(4&features)&&0==serverinfo.domainauth),QV("logoutMenuOption",0==(4&features)&&0==serverinfo.domainauth);break;case"authcookie":authCookie=t.cookie,authRelayCookie=t.rcookie;break;case"userinfo":userinfo=t.userinfo,QH("p3userName",userinfo.name),updateSelf();break;case"users":for(var o in users={},t.users)users[t.users[o]._id]=t.users[o];updateUsers();break;case"wssessioncount":wssessions=t.wssessions,updateUsers();break;case"meshes":for(var o in meshes={},t.meshes)meshes[t.meshes[o]._id]=t.meshes[o];updateMeshes(),updateDevices();break;case"files":filetree=setupBackPointers(t.filetree),updateFiles();break;case"nodes":for(var o in nodes=[],t.nodes)for(var n in t.nodes[o])meshes[o]?(t.nodes[o][n].namel=t.nodes[o][n].name.toLowerCase(),t.nodes[o][n].rname?t.nodes[o][n].rnamel=t.nodes[o][n].rname.toLowerCase():t.nodes[o][n].rnamel=t.nodes[o][n].namel,t.nodes[o][n].meshnamel=meshes[o].name.toLowerCase(),t.nodes[o][n].meshid=o,t.nodes[o][n].state=t.nodes[o][n].state?t.nodes[o][n].state:0,t.nodes[o][n].desc=t.nodes[o][n].desc,t.nodes[o][n].icon||(t.nodes[o][n].icon=1),t.nodes[o][n].ident=++nodeShortIdent,nodes.push(t.nodes[o][n])):console.log("Invalid mesh (1): "+o);updateDevices(),0==xxcurrentView&&go(parseInt("{{viewmode}}")),gotoDevice("{{currentNode}}",parseInt("{{viewmode}}"));break;case"powertimeline":if(t.nodeid!=powerTimelineReq)break;powerTimelineNode=t.nodeid,powerTimeline=t.timeline,powerTimelineUpdate=Date.now()+3e5,currentNode._id==t.nodeid&&drawDeviceTimeline();break;case"otpauth-request":if(2==xxdialogMode&&"otpauth-request"==xxdialogTag){var i=t.secret;52==i.length?i=i.split(/(.............)/).filter(Boolean).join(" "):32==i.length&&(i=(i=i.split(/(....)/).filter(Boolean).join(" ")).substring(0,20)+"<br/>"+i.substring(20)),QH("d2optinfo",'Install <a href="https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2" rel="noreferrer noopener" target=_blank>Google Authenticator</a> or a compatible application, use <a href="\' + message.url + \'" rel="noreferrer noopener" target=_blank> this link</a> or enter the secret below. Then, enter the current 6 digit token to activate 2-Step login.<br /><br /><div style=width:100%;text-align:center><tt id=d2optsecret secret="'+t.secret+'" style=font-size:15px>'+i+'</tt><br /><br />Token: <input type=text onkeypress="return (event.keyCode == 8) || (event.charCode >= 48 && event.charCode <= 57)" onkeyup=account_addOtpCheck(event) onkeydown=account_addOtpCheck() maxlength=6 id=d2otpauthinput type=text></div>'),QV("idx_dlgOkButton",!0),QE("idx_dlgOkButton",!1),Q("d2otpauthinput").focus()}break;case"otpauth-setup":if(xxdialogMode)return;setDialogMode(2,"Authenticator App",1,null,t.success?"<b style=color:green>2-step login activation successful</b>. You will now need a valid token to login again.":"<b style=color:red>2-step login activation failed</b>. Clear the secret from the application and try again. You only have a few minutes to enter the proper code.");break;case"otpauth-clear":if(xxdialogMode)return;setDialogMode(2,"Authenticator App",1,null,t.success?"<b style=color:green>2-step login activation removed</b>. You can reactivate this feature at any time.":"<b style=color:red>2-step login activation removal failed</b>. Try again.");break;case"otpauth-getpasswords":if(xxdialogMode)return;var a="One time tokens can be used as secondary authentication. Generate a set, print them and keep them in a safe place.";if(a+="<div style='border-radius:6px;border: 2px dashed #888;width:100%;margin-top:8px'><div style='padding:8px;font-family:Arial, Helvetica, sans-serif;font-size:20px;font-weight:bold'><table style=width:100%;text-align:center>",t.passwords){var s=0;for(var l in t.passwords){++s%2&&(a+="<tr>");for(var r=""+t.passwords[l].p;r.length<8;)r="0"+r;!0===t.passwords[l].u?a+="<td>"+r.substring(0,4)+"&nbsp;"+r.substring(4):a+="<td><strike style=color:#BBB>"+r.substring(0,4)+"&nbsp;"+r.substring(4)}}else a+="<tr><td>No Active Tokens";a+="</table></div></div><br />",a+="<div><input type=button value='Close' onclick=setDialogMode(0) style=float:right></input>",a+="<input type=button value='New Tokens' onclick='account_manageOtp(1);'></input>",null!=t.passwords&&(a+="<input type=button value='Clear' onclick='account_manageOtp(2);'></input>"),setDialogMode(2,"Manage Backup Codes",8,null,a+="</div><br />","otpauth-manage");break;case"event":if(t.event.noact)break;switch(t.event.action){case"userWebState":if(null!=localStorage){var d=JSON.parse(t.event.state);for(var l in d)localStorage.setItem(l,d[l]);null!=d.loctag&&d.loctag!=oldLoctag&&(null!=d.loctag?args.locale=d.loctag:delete args.locale,updateDevices(),updateMeshes())}break;case"accountchange":if(userinfo.name==t.event.account.name){var p=t.event.account.siteadmin?t.event.account.siteadmin:0,c=userinfo.siteadmin?userinfo.siteadmin:0;(t.event.account.quota!=userinfo.quota||0==(8&userinfo.siteadmin)&&0!=(8&t.event.account.siteadmin))&&meshserver.send({action:"files"}),userinfo=t.event.account,c!=p&&updateSiteAdmin(),updateSelf()}break;case"createmesh":null!=t.event.links[userinfo._id]&&(meshes[t.event.meshid]={_id:t.event.meshid,name:t.event.name,mtype:t.event.mtype,desc:t.event.desc,links:t.event.links},updateMeshes(),updateDevices(),meshserver.send({action:"files"}));break;case"meshchange":if(null==meshes[t.event.meshid])meshes[t.event.meshid]={_id:t.event.meshid,name:t.event.name,mtype:t.event.mtype,desc:t.event.desc,links:t.event.links},meshserver.send({action:"nodes"});else{if(meshes[t.event.meshid].name!=t.event.name)for(var l in meshes[t.event.meshid].name=t.event.name,nodes)nodes[l].meshid==t.event.meshid&&(nodes[l].meshnamel=t.event.name.toLowerCase());if(meshes[t.event.meshid].desc=t.event.desc,meshes[t.event.meshid].links=t.event.links,null==meshes[t.event.meshid].links[userinfo._id]){20==xxcurrentView&&currentMesh==meshes[t.event.meshid]&&go(2),delete meshes[t.event.meshid];var u=[];for(var l in nodes)nodes[l].meshid!=t.event.meshid&&u.push(nodes[l]);nodes=u,10<=xxcurrentView&&xxcurrentView<20&&currentNode&&currentNode.meshid==t.event.meshid&&(setDialogMode(0),go(2))}}updateMeshes(),updateDevices(),meshserver.send({action:"files"}),20==xxcurrentView&&currentMesh._id==t.event.meshid&&p20updateMesh();break;case"deletemesh":meshes[t.event.meshid]&&(delete meshes[t.event.meshid],updateMeshes(),meshserver.send({action:"files"}));u=[];for(var l in nodes)nodes[l].meshid!=t.event.meshid&&u.push(nodes[l]);nodes=u,updateDevices(),20<=xxcurrentView&&xxcurrentView<30&&currentMesh._id==t.event.meshid&&(setDialogMode(0),go(2)),10<=xxcurrentView&&xxcurrentView<20&&currentNode&&currentNode.meshid==t.event.meshid&&(setDialogMode(0),go(2));break;case"addnode":var m=t.event.node;if(!meshes[m.meshid])break;if(null!=getNodeFromId(m._id))break;m.namel=m.name.toLowerCase(),m.rname?m.rnamel=m.rname.toLowerCase():m.rnamel=m.namel,m.meshnamel=meshes[m.meshid].name.toLowerCase(),m.state=0,m.icon||(m.icon=1),m.ident=++nodeShortIdent,nodes.push(m),updateDevices();break;case"removenode":var h=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){h=l;break}if(-1!=h){m=nodes[h];currentNode==m&&(10<=xxcurrentView&&xxcurrentView<20&&(setDialogMode(0),go(2)),currentNode=null),nodes.splice(h,1),updateDevices()}break;case"changenode":h=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){h=l;break}if(-1!=h)(m=nodes[h]).name=t.event.node.name,m.rname=t.event.node.rname,m.host=t.event.node.host,m.desc=t.event.node.desc,m.publicip=t.event.node.publicip,m.iploc=t.event.node.iploc,m.wifiloc=t.event.node.wifiloc,m.gpsloc=t.event.node.gpsloc,m.tags=t.event.node.tags,m.userloc=t.event.node.userloc,null!=t.event.node.agent&&(null==m.agent&&(m.agent={}),null!=t.event.node.agent.ver&&(m.agent.ver=t.event.node.agent.ver),null!=t.event.node.agent.id&&(m.agent.id=t.event.node.agent.id),null!=t.event.node.agent.caps&&(m.agent.caps=t.event.node.agent.caps),null!=t.event.node.agent.core?m.agent.core=t.event.node.agent.core:m.agent.core&&delete m.agent.core,m.agent.tag=t.event.node.agent.tag),null!=t.event.node.intelamt&&(null==m.intelamt&&(m.intelamt={}),null!=t.event.node.intelamt.state&&(m.intelamt.state=t.event.node.intelamt.state),null!=t.event.node.intelamt.host&&(m.intelamt.user=t.event.node.intelamt.host),null!=t.event.node.intelamt.user&&(m.intelamt.user=t.event.node.intelamt.user),null!=t.event.node.intelamt.tls&&(m.intelamt.tls=t.event.node.intelamt.tls),null!=t.event.node.intelamt.ver&&(m.intelamt.ver=t.event.node.intelamt.ver),null!=t.event.node.intelamt.tag&&(m.intelamt.tag=t.event.node.intelamt.tag),null!=t.event.node.intelamt.uuid&&(m.intelamt.uuid=t.event.node.intelamt.uuid),null!=t.event.node.intelamt.realm&&(m.intelamt.realm=t.event.node.intelamt.realm)),m.namel=m.name.toLowerCase(),m.rname?m.rnamel=m.rname.toLowerCase():m.rnamel=m.namel,t.event.node.icon&&(m.icon=t.event.node.icon),refreshDevice(m._id),updateDevices();break;case"nodemeshchange":h=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){h=l;break}if(-1!=h){m=nodes[h];null==meshes[t.event.newMeshId]?(currentNode==m&&(10<=xxcurrentView&&xxcurrentView<20&&(setDialogMode(0),go(2)),currentNode=null),nodes.splice(h,1)):(m.meshid=t.event.newMeshId,m.meshnamel=meshes[t.event.newMeshId].name.toLowerCase()),updateDevices(),refreshDevice(t.event.nodeid)}else{m=t.event.node;if(!meshes[m.meshid])break;m.namel=m.name.toLowerCase(),m.rname?m.rnamel=m.rname.toLowerCase():m.rnamel=m.namel,m.meshnamel=meshes[m.meshid].name.toLowerCase(),m.state=0,m.icon||(m.icon=1),m.ident=++nodeShortIdent,nodes.push(m),updateDevices()}break;case"nodeconnect":h=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){h=l;break}if(-1!=h)(m=nodes[h]).conn=t.event.conn,m.pwr=t.event.pwr,updateDevices();break;case"login":null!=users&&users["user/"+domain+"/"+t.event.username.toLowerCase()]&&(users["user/"+domain+"/"+t.event.username.toLowerCase()].login=t.event.time)}}}function topMenu(e){null!=xxdialogMode&&0!=xxdialogMode&&999!=xxdialogMode||(void 0===e?1==("none"==QS("topMenu").display)?0!=xxdialogMode&&null!=xxdialogMode||(QV("topMenu",!0),xxdialogMode=999):(QV("topMenu",!1),xxdialogMode=0):(QV("topMenu",!1),xxdialogMode=0,1==e&&3!=xxcurrentView&&goForward("account"),2==e&&5!=xxcurrentView&&goForward("files")))}var filetreelinkpath,backStack=[];function goBack(){xxdialogMode||(0<backStack.length&&backStack.pop(),goStack())}function goForward(e){xxdialogMode||(backStack.push(e),goStack())}function goStack(){if(0!=backStack.length){var e=backStack[backStack.length-1],t=e.split("/")[0];"node"==t&&(setupDeviceMenu(0),gotoDevice(e)),"mesh"==t&&gotoMesh(e),"account"==t&&go(3),"devices"==t&&go(2),"files"==t&&go(5)}else go(2)}function updateFooterMenu(e){for(;null!=e&&e.length<3;)e.push({n:""});var t="",o="";if(null!=e)for(var n in e)t+='<td style="cursor:pointer'+(""==o?"":";border-left:solid 1px white")+'" onclick="'+e[n].f+'">'+e[n].n,o=e[n].n;QH("footerMenu","<tr>"+t)}function account_manageAuthApp(){xxdialogMode||0==(4096&features)||(1==userinfo.otpsecret?account_removeOtp():account_addOtp())}function account_addOtp(){xxdialogMode||1==userinfo.otpsecret||0==(4096&features)||(setDialogMode(2,"Authenticator App",2,function(){meshserver.send({action:"otpauth-setup",secret:Q("d2optsecret").attributes.secret.value,token:Q("d2otpauthinput").value})},"<div id=d2optinfo>Loading...</div>","otpauth-request"),meshserver.send({action:"otpauth-request"}))}function account_addOtpCheck(e){var t=6==Q("d2otpauthinput").value.length;QE("idx_dlgOkButton",t),e&&13==e.keyCode&&t&&dialogclose(1)}function account_removeOtp(){xxdialogMode||1!=userinfo.otpsecret||0==(4096&features)||setDialogMode(2,"Authenticator App",3,function(){meshserver.send({action:"otpauth-clear"})},"Confirm removal of authenticator application 2-step login?")}function account_manageOtp(e){2==xxdialogMode&&"otpauth-manage"==xxdialogTag&&dialogclose(0),xxdialogMode||1!=userinfo.otpsecret||0==(4096&features)||meshserver.send({action:"otpauth-getpasswords",subaction:e})}function account_showVerifyEmail(){xxdialogMode||1==userinfo.emailVerified||1!=serverinfo.emailcheck||setDialogMode(2,"Email Verification",3,account_showVerifyEmailEx,"Click ok to send a verification mail to:<br /><div style=padding:8px><b>"+EscapeHtml(userinfo.email)+"</b></div>Please wait a few minute to receive the verification.")}function account_showVerifyEmailEx(){meshserver.send({action:"verifyemail",email:userinfo.email})}function account_showChangeEmail(){xxdialogMode||(setDialogMode(2,"Email Address Change",3,account_changeEmail,addHtmlValue("Email","<input id=dp3email style=width:170px maxlength=256 onchange=account_validateEmail() onkeyup=account_validateEmail(event) />")),null!=userinfo.email&&(Q("dp3email").value=userinfo.email),account_validateEmail(),Q("dp3email").focus())}function account_validateEmail(e,t){QE("idx_dlgOkButton",validateEmail(Q("dp3email").value)&&Q("dp3email").value!=userinfo.email),null!=e&&13==e.keyCode&&dialogclose(1)}function account_changeEmail(){meshserver.send({action:"changeemail",email:Q("dp3email").value})}function account_showDeleteAccount(){if(!xxdialogMode){var e="<form method=post><table style=margin-left:10px><input type=hidden name=action value=deleteaccount /><input type=hidden name=authcookie value="+authCookie+" /><tr>";e+="<td align=right>Password:</td><td><input id=apassword1 type=password name=apassword1 autocomplete=off onchange=account_validateDeleteAccount() onkeyup=account_validateDeleteAccount() /></td>",e+="</tr><tr><td align=right>Password:</td><td><input id=apassword2 type=password name=apassword2 autocomplete=off onchange=account_validateDeleteAccount() onkeyup=account_validateDeleteAccount() /></td>",e+="</tr></table><div style=padding:10px;margin-bottom:4px>",e+='<input id=account_dlgCancelButton type=button value="Cancel" style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)>',e+='<input id=account_dlgOkButton type=submit value="OK" style="float:right;width:80px" onclick=dialogclose(1)>',setDialogMode(2,"Delete Account",0,null,e+="</div><br /></form>"),account_validateDeleteAccount(),Q("apassword1").focus()}}function account_showChangePassword(){if(xxdialogMode)return!1;var e="<table style=margin-left:10px>";if(e+="<tr><td align=right>"+nobreak("Old password:")+"</td><td><input id=apassword0 type=password name=apassword0 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /> <b></b></td></tr>",e+="<tr><td align=right>"+nobreak("New password:")+"</td><td><input id=apassword1 type=password name=apassword1 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /> <b><span id=dxPassWarn></span></b></td></tr>",e+="<tr><td align=right>"+nobreak("New password:")+"</td><td><input id=apassword2 type=password name=apassword2 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /></td></tr>",65536&features&&(e+="<tr><td align=right>Password hint:</td><td><input id=apasswordhint name=apasswordhint maxlength=250 type=text autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /></td></tr>"),e+="</table>",passRequirements){var t=[],o=0;for(var n in passRequirements)"reset"!=n&&"hint"!=n&&(t.push(n+":"+passRequirements[n]),o++);0<o&&(e+="<br /><span style=font-size:x-small>"+format("Requirements: {0}.",t.join(", "))+"</span>")}return setDialogMode(2,"Change Password",3,account_showChangePasswordEx,e+="<br />"),Q("apassword0").focus(),account_validateNewPassword(),!1}function account_showChangePasswordEx(){if(Q("apassword1").value==Q("apassword2").value){var e={action:"changepassword",oldpass:Q("apassword0").value,newpass:Q("apassword1").value};65536&features&&(e.hint=Q("apasswordhint").value),meshserver.send(e)}}function account_createMesh(){if(!xxdialogMode)if(4294967295==userinfo.siteadmin||0==(64&userinfo.siteadmin))if(!0===userinfo.emailVerified||1!=serverinfo.emailcheck||4294967295==userinfo.siteadmin)if(!(262144&features)||1==userinfo.otpsecret||0<userinfo.otphkeys||0<userinfo.otpkeys){var e=addHtmlValue("Name","<input id=dp3meshname style=width:170px maxlength=64 onchange=account_validateMeshCreate() onkeyup=account_validateMeshCreate() />");e+=addHtmlValue("Type","<div style=width:170px;margin:0;padding:0><select id=dp3meshtype style=width:100% onchange=account_validateMeshCreate() ><option value=2>Software Agent Group</option><option value=1>Intel&reg; AMT only</option></select></div>"),setDialogMode(2,"Create Device Group",3,account_createMeshEx,e+=addHtmlValue("Description","<div style=width:170px;margin:0;padding:0><textarea id=dp3meshdesc maxlength=1024 style=width:100%;resize:none></textarea></div>")),account_validateMeshCreate(),Q("dp3meshname").focus()}else setDialogMode(2,"Account Security",1,null,'Unable to access a device until two-factor authentication is enabled. This is required for extra security. Go to the "My Account" and look at the "Account Security" section.');else setDialogMode(2,"Account Security",1,null,'Unable to access a device until a email address is verified. This is required for password recovery. Go to the "My Account" to change and verify an email address.');else setDialogMode(2,"New Device Group",1,null,"This account does not have the rights to create a new device group.")}function account_validateMeshCreate(){QE("idx_dlgOkButton",0<Q("dp3meshname").value.length)}function account_createMeshEx(e,t){meshserver.send({action:"createmesh",meshname:Q("dp3meshname").value,meshtype:Q("dp3meshtype").value,desc:Q("dp3meshdesc").value})}function account_validateDeleteAccount(){QE("account_dlgOkButton",0<Q("apassword1").value.length&&Q("apassword1").value==Q("apassword2").value)}function account_validateNewPassword(){var e="",t=0<Q("apassword0").value.length&&0<Q("apassword1").value.length&&Q("apassword1").value==Q("apassword2").value&&Q("apassword0").value!=Q("apassword1").value;if(65536&features&&Q("apasswordhint").value==Q("apassword1").value&&(t=!1),""!=Q("apassword1").value)if(null==passRequirements||""==passRequirements){var o=checkPasswordStrength(Q("apassword1").value);e=80<=o?"<span style=color:green>Strong<span>":60<=o?"<span style=color:blue>&#9679;<span>":"<span style=color:red>&#9679;<span>"}else{0==checkPasswordRequirements(Q("apassword1").value,passRequirements)&&(t=!1,e="<span style=color:red>Policy<span>")}QH("dxPassWarn",e),QE("idx_dlgOkButton",t)}function checkPasswordStrength(e){var t=0,o={},n=0,i={digits:/\d/.test(e),lower:/[a-z]/.test(e),upper:/[A-Z]/.test(e),nonWords:/\W/.test(e)};if(!e)return 0;for(var a=0;a<e.length;a++)o[e[a]]=(o[e[a]]||0)+1,t+=5/o[e[a]];for(var s in i)n+=1==i[s]?1:0;return parseInt(t+10*(n-1))}function checkPasswordRequirements(e,t){if(null==t||""==t||"object"!=typeof t)return!0;if(t.min&&e.length<t.min)return!1;if(t.max&&e.length>t.max)return!1;for(var o=0,n=0,i=0,a=0,s=0;s<e.length;s++)/\d/.test(e[s])&&o++,/[a-z]/.test(e[s])&&n++,/[A-Z]/.test(e[s])&&i++,/\W/.test(e[s])&&a++;return!(t.num&&o<t.num)&&(!(t.lower&&n<t.lower)&&(!(t.upper&&i<t.upper)&&!(t.nonalpha&&a<t.nonalpha)))}function updateMeshes(){var e="",t=0;for(i in meshes){t++;var o=meshes[i].links[userinfo._id].rights,n="Partial Rights";4294967295==o?n="Full Administrator":0==o&&(n="No Rights"),e+="<div style=cursor:pointer onclick=goForward('"+i+"')>",e+='<div style="float:left;margin-left:4px"><img src="/images/meshicon50.png" width=50 height=50 /></div>',e+='<div style="width:auto;height:40px;background-color:lightgray;margin-top:5px;margin-bottom:5px;margin-left:60px;padding-top:5px;padding-bottom:5px;border-radius:8px 0px 0px 8px">',e+="<div><div style=padding-left:12px;padding-top:2px><b>"+EscapeHtml(meshes[i].name)+"</b></div><div style=padding-left:12px;padding-top:3px;color:gray>"+n+"</div></div>",e+="</div></div>"}QH("p3meshes",e),QV("p3noMeshFound",0==t)}function gotoMesh(e){null==(currentMesh=meshes[e])&&goBack(),p20updateMesh(),go(20)}var sortorder,filetreelocation=[];function p5refreshFiles(){meshserver.send({action:"files"})}function updateFiles(){if(QV("MainMenuMyFiles",0==(8&features)),0==(8&features)){for(var e,t="",o="",n="<a style=cursor:pointer onclick=p5folderup(0)>Root</a>",i="Root",a=filetree,s=1,l=[],r=filetreelinkpath,d=[],p=document.getElementsByName("fc"),c=0;c<p.length;c++)p[c].checked&&d.push(p[c].value);for(var c in filetreelinkpath="",filetreelocation){if(null==a.f||null==a.f[filetreelocation[c]])break;if(l.push(filetreelocation[c]),i+=" / "+filetreelocation[c],1==s){var u=filetreelocation[c].split("/");e=window.location+u[0]+"files/"+u[2],filetreelinkpath+=filetreelocation[c]}else""!=filetreelinkpath&&(filetreelinkpath+="/"+filetreelocation[c],2<s&&(e+="/"+filetreelocation[c]));n+=" / <a style=cursor:pointer onclick=p5folderup("+s+")>"+(null!=(a=a.f[filetreelocation[c]]).n?a.n:filetreelocation[c])+"</a>",s++}filetreelocation=l;var m=i.toLowerCase().startsWith("root / "+userinfo._id+" / public"),h=p5sort_files(a.f);for(var c in h){var f,g=h[c],v=g.n;f=40<(f=v).length?EscapeHtml(v.substring(0,40))+"...":EscapeHtml(v),v=EscapeHtml(v);var k="";null!=g.s&&(k=getFileSizeStr(g.s));var y="";if(g.t<3||4==g.t){y="<div class=filelist file=999><input file=999 style=float:left name=fc class=fcb type=checkbox onchange=p5setActions() value='"+v+"'>&nbsp;<span style=float:right;padding-right:4px>"+(1==g.t||4==g.t?p5getQuotabar(g):"")+"</span><span><div class=fileIcon"+g.t+'></div><a style=cursor:pointer onclick=p5folderset("'+encodeURIComponent(g.nx)+'")>'+f+"</a></span></div>"}else{var w=f,x="";m&&(x=" (<a style=cursor:pointer onclick='p5showPublicLink(\""+e+"/"+g.nx+"\")'>Link</a>)"),0<g.s&&(w='<a rel="noreferrer noopener" target="_blank" href="downloadfile.ashx?link='+encodeURIComponent(filetreelinkpath+"/"+g.nx)+'">'+f+"</a>"+x),y="<div class=filelist file=3><input file=3 style=float:left name=fc class=fcb type=checkbox onchange=p5setActions() value='"+g.nx+"'>&nbsp;<span style=float:right;padding-right:4px>"+k+"</span><span><div class=fileIcon"+g.t+"></div>"+w+"</span></div>"}g.t<3?t+=y:o+=y}if(QH("p5rightOfButtons",p5getQuotabar(a)),QH("p5files",t+o),QH("p5currentpath",n),QE("p5FolderUp",0!=filetreelocation.length),QV("p5PublicShare",m),r==filetreelinkpath){p=document.getElementsByName("fc");for(c=0;c<p.length;c++)p[c].checked=0<=d.indexOf(p[c].value)}p5setActions()}}function getNiceSize(e){return e<=0?"Storage exceed":e<2048?format("{0}b left",e):e<2097152?format("{0}k left",Math.round(e/1024)):e<2147483648?format("{0}m left",Math.round(e/1024/1024)):format("{0}g left",Math.round(e/1024/1024/1024))}function p5getQuotabar(e){for(;1<e.t&&4!=e.t;)e=e.parent;return 1!=e.t&&4!=e.t||null==e.maxbytes?"":getNiceSize(e.maxbytes-e.s)+" <progress style=height:10px;width:100px value="+e.s+" max="+e.maxbytes+" />"}function p5showPublicLink(e){setDialogMode(2,"Public Link",1,null,'<input type=text style=width:100% value="'+e+'" readonly />')}function p5sort_filename(e,t){return e.ln>t.ln?1*sortorder:e.ln<t.ln?-1*sortorder:0}function p5sort_timestamp(e,t){return e.d>t.d?1*sortorder:e.d<t.d?-1*sortorder:0}function p5sort_bysize(e,t){return e.s==t.s?p5sort_filename(e,t):(e.s-t.s)*sortorder}function p5sort_files(e){var t=[],o=Q("p5sortdropdown").value;for(var n in e)e[n].nx=n,null==e[n].n&&(e[n].n=n),e[n].ln=e[n].n.toLowerCase(),t.push(e[n]);return sortorder=1,3<o&&(sortorder=-1,o-=3),1==o?t.sort(p5sort_filename):2==o?t.sort(p5sort_bysize):3==o&&t.sort(p5sort_timestamp),t}function p5setActions(){var e=getFileSelCount(),t=getFileCount(),o=getFileSelCount(!1);QE("p5DeleteFileButton",0<e&&0<filetreelocation.length),QE("p5NewFolderButton",0<filetreelocation.length),QE("p5UploadButton",0<filetreelocation.length),QE("p5RenameFileButton",1==e&&0<filetreelocation.length),QE("p5SelectAllButton",0<t),Q("p5SelectAllButton").value=0<e?"None":"All",QE("p5CutButton",0<o&&e==o),QE("p5CopyButton",0<o&&e==o),QE("p5PasteButton",null!=p5clipboard&&0<p5clipboard.length&&0<filetreelocation.length)}function getFileSelCount(e){for(var t=0,o=document.getElementsByName("fc"),n=0;n<o.length;n++)!o[n].checked||0==e&&"3"!=o[n].attributes.file.value||t++;return t}function getFileSelDirCount(){for(var e=0,t=document.getElementsByName("fc"),o=0;o<t.length;o++)t[o].checked&&"999"==t[o].attributes.file.value&&e++;return e}function getFileCount(){return document.getElementsByName("fc").length}function p5selectallfile(){for(var e=0==getFileSelCount(),t=document.getElementsByName("fc"),o=0;o<t.length;o++)t[o].checked=e;p5setActions()}function setupBackPointers(e){if(null!=e.f){var t=0,o=0;for(var n in e.f)setupBackPointers(e.f[n]),(e.f[n].parent=e).f[n].s&&(t+=e.f[n].s),e.f[n].c&&(o+=e.f[n].c),3==e.f[n].t&&o++;e.s=t,e.c=o}return e}function getFileSizeStr(e){return 1==e?"1 byte":format("{0} bytes",e)}function p5folderup(e){if(null==e)filetreelocation.pop();else for(;filetreelocation.length>e;)filetreelocation.pop();return updateFiles(),!1}function p5folderset(e){return filetreelocation.push(decodeURIComponent(e)),updateFiles(),!1}function p5createfolder(){setDialogMode(2,"New Folder",3,p5createfolderEx,"<input type=text id=p5renameinput maxlength=64 onkeyup=p5fileNameCheck(event) style=width:100% />"),focusTextBox("p5renameinput"),p5fileNameCheck()}function p5createfolderEx(){meshserver.send({action:"fileoperation",fileop:"createfolder",path:filetreelocation,newfolder:Q("p5renameinput").value})}function p5deletefile(){var e=getFileSelCount(),t=0<getFileSelDirCount()?"<br /><br /><label><input type=checkbox id=p5recdeleteinput>Recursive delete</label><br>":"<input type=checkbox id=p5recdeleteinput style='display:none'>";setDialogMode(2,"Delete",3,p5deletefileEx,1<e?format("Delete {0} selected items?",e)+t:"Delete selected item?"+t)}function p5deletefileEx(){for(var e=[],t=document.getElementsByName("fc"),o=0;o<t.length;o++)t[o].checked&&e.push(t[o].value);meshserver.send({action:"fileoperation",fileop:"delete",path:filetreelocation,delfiles:e,rec:Q("p5recdeleteinput").checked})}function p5renamefile(){for(var e,t=document.getElementsByName("fc"),o=0;o<t.length;o++)t[o].checked&&(e=t[o].value);setDialogMode(2,"Rename",3,p5renamefileEx,'<input type=text id=p5renameinput maxlength=64 onkeyup=p5fileNameCheck(event) style=width:100% value="'+e+'" />',{action:"fileoperation",fileop:"rename",path:filetreelocation,oldname:e}),focusTextBox("p5renameinput"),p5fileNameCheck()}function p5renamefileEx(e,t){t.newname=Q("p5renameinput").value,meshserver.send(t)}function p5fileNameCheck(e){var t=isFilenameValid(Q("p5renameinput").value);QE("idx_dlgOkButton",t),1==t&&e&&13==e.keyCode&&dialogclose(1)}var isFilenameValid=function(){var t=/^[^\\/:\*\?"<>\|]+$/,o=/^\./,n=/^(nul|prn|con|lpt[0-9]|com[0-9])(\.|$)/i;return function(e){return t.test(e)&&!o.test(e)&&!n.test(e)&&"."!=e[0]}}();function p5uploadFile(){setDialogMode(2,"Upload File",3,p5uploadFileEx,'<form method=post enctype=multipart/form-data action=uploadfile.ashx target=fileUploadFrame><input type=text name=link style=display:none id=p5uploadpath value="'+encodeURIComponent(filetreelinkpath)+'" /><input type=file name=files id=p5uploadinput style=width:100% multiple=multiple onchange="updateUploadDialogOk(\'p5uploadinput\')" /><input type=hidden name=authCookie value='+authCookie+" /><input type=submit id=p5loginSubmit style=display:none /></form>"),updateUploadDialogOk("p5uploadinput")}function p5uploadFileEx(){Q("p5loginSubmit").click()}function updateUploadDialogOk(e){QE("idx_dlgOkButton",""!=Q(e).value)}var p5clipboard=null,p5clipboardFolder=null,p5clipboardCut=0;function p5copyFile(e){var t=document.getElementsByName("fc");p5clipboard=[],p5clipboardCut=e,p5clipboardFolder=Clone(filetreelocation);for(var o=0;o<t.length;o++)t[o].checked&&"3"==t[o].attributes.file.value&&p5clipboard.push(t[o].value);p5updateClipview()}function p5pasteFile(){var e="";null!=p5clipboard&&0<p5clipboard.length&&(e=format("Confim {0} of {1} entrie{2} to this location?",0==p5clipboardCut?"copy":"move",p5clipboard.length,1<p5clipboard.length?"s":"")),setDialogMode(2,"Paste",3,p5pasteFileEx,e)}function p5pasteFileEx(){meshserver.send({action:"fileoperation",fileop:0==p5clipboardCut?"copy":"move",scpath:p5clipboardFolder,path:filetreelocation,names:p5clipboard}),p5folderup(999),1==p5clipboardCut&&(p5clipboardFolder=p5clipboard=null,p5clipboardCut=0,p5updateClipview())}function p5updateClipview(){var e="";null!=p5clipboard&&0<p5clipboard.length&&(e=format("Holding {0} entrie{1} for {2}",p5clipboard.length,1<p5clipboard.length?"s":"",0==p5clipboardCut?"copy":"move")+', <a href=# onclick="return p5clearClip()" style=cursor:pointer>Clear</a>.'),QH("p5bottomstatus",e),p5setActions()}function p5clearClip(){return p5clipboardFolder=p5clipboard=null,p5clipboardCut=0,p5updateClipview(),!1}function p5fileDragDrop(e){if(haltEvent(e),QV("bigfail",!1),QV("bigok",!1),null!=e.dataTransfer&&0!=e.dataTransfer.files.length&&0!=filetreelocation.length)for(var t=[],o=[],n=[],i=[],a=e.dataTransfer.files.length,s=0;s<e.dataTransfer.files.length;s++){var l=new FileReader,r=e.dataTransfer.files[s];t.push(r.name),o.push(r.size),n.push(r.type),l.onload=function(e){i.push(e.target.result),0==--a&&(Q("p5fileDragName").value=t.join("*"),Q("p5fileDragSize").value=o.join("*"),Q("p5fileDragType").value=n.join("*"),Q("p5fileDragData").value=i.join("*"),Q("p5fileDragLink").value=encodeURIComponent(filetreelinkpath),Q("p5loginSubmit2").click())},l.readAsDataURL(r)}}var p5dragtimer=null;function p5fileDragOver(e){haltEvent(e),null!=p5dragtimer&&(clearTimeout(p5dragtimer),p5dragtimer=null);var t=!0;0==filetreelocation.length&&(t=!1),QV("bigok",t),QV("bigfail",!t)}function p5fileDragLeave(e){haltEvent(e),"p5filetable"!=e.target.id?(QV("bigfail",!1),QV("bigok",!1)):p5dragtimer=setTimeout("QV('bigfail',false);QV('bigok',false);p5dragtimer=null;",200)}function ondeskkeypress(e){if(toggleSoftKeys(0),Q("DeskSoftInput").value="",setSessionActivity(),desktop&&!xxdialogMode&&10==xxcurrentView){if(null!=currentNode){var t=meshes[currentNode.meshid].links[userinfo._id].rights;if(0==(4294967295==t||0!=(8&t)&&0==(256&t)))return!1;if(1==(4294967295!=t&&0!=(8&t)&&0==(256&t)&&0!=(4096&t))&&(1==e.altKey||1==e.ctrlKey||e.keyCode<32&&8!=e.keyCode&&13!=e.keyCode||90<e.keyCode))return!1}return desktop.m.handleKeys(e)}}function ondeskkeydown(e){if(toggleSoftKeys(0),Q("DeskSoftInput").value="",setSessionActivity(),desktop&&!xxdialogMode&&10==xxcurrentView){if(null!=currentNode){var t=meshes[currentNode.meshid].links[userinfo._id].rights;if(0==(4294967295==t||0!=(8&t)&&0==(256&t)))return!1;if(1==(4294967295!=t&&0!=(8&t)&&0==(256&t)&&0!=(4096&t))&&(1==e.altKey||1==e.ctrlKey||e.keyCode<32&&8!=e.keyCode&&13!=e.keyCode||90<e.keyCode))return!1}return desktop.m.handleKeyDown(e)}}function ondeskkeyup(e){if(toggleSoftKeys(0),Q("DeskSoftInput").value="",setSessionActivity(),desktop&&!xxdialogMode&&10==xxcurrentView){if(null!=currentNode){var t=meshes[currentNode.meshid].links[userinfo._id].rights;if(0==(4294967295==t||0!=(8&t)&&0==(256&t)))return!1;if(1==(4294967295!=t&&0!=(8&t)&&0==(256&t)&&0!=(4096&t))&&(1==e.altKey||1==e.ctrlKey||e.keyCode<32&&8!=e.keyCode&&13!=e.keyCode||90<e.keyCode))return!1}return desktop.m.handleKeyUp(e)}}var updateDevicesTimer=null;function updateDevices(){null==updateDevicesTimer&&(updateDevicesTimer=setTimeout(updateDevicesEx,200))}var deviceHeaderCount,sort=0,deviceHeaderId=0,deviceHeaders={},showRealNames=!1,deviceHeaderTotal=0,deviceHeadersTitles=(deviceHeaders={},{});function updateDevicesEx(){null!=updateDevicesTimer&&(clearTimeout(updateDevicesTimer),updateDevicesTimer=null);var e="",t=0,o=null,n=0,i={};for(var a in deviceHeaderCount={},deviceHeaders={},deviceHeadersTitles={},(deviceHeaderTotal=deviceHeaderId=0)==sort?nodes.sort(meshSort):1==sort?nodes.sort(powerSort):2==sort&&(1==showRealNames?nodes.sort(deviceHostSort):nodes.sort(deviceSort)),nodes)if(0!=nodes[a].v){var s=meshes[nodes[a].meshid].links[userinfo._id];if(null!=s){s.rights;if(0==sort){if(nodes.sort(meshSort),nodes[a].meshid!=o){deviceHeaderSet();var l="";1==meshes[nodes[a].meshid].mtype&&(l="<span style=color:lightgray>, Intel&reg; AMT only</span>"),null!=o&&(2==t&&(e+="<td><div style=width:301px></div></td>"),""!=e&&(e+="</tr></table>")),e+="<div class=DevSt style=padding-top:4px><span style=float:right>",e+='</span><span id=MxMESH style=cursor:pointer onclick=goForward("'+nodes[a].meshid+'")>'+EscapeHtml(meshes[nodes[a].meshid].name)+"</span>"+l+"<span id=DevxHeader"+deviceHeaderId+" style=color:lightgray></span></div>",i[o=nodes[a].meshid]=1,t=0}}else 1==sort?nodes[a].pwr!==o&&(deviceHeaderSet(),null!==o&&(2==t&&(e+="<td><div style=width:301px></div></td>"),""!=e&&(e+="</tr></table>")),e+="<div class=DevSt style=width:100%;padding-top:4px><span>"+PowerStateStr2(nodes[a].pwr)+"</span><span id=DevxHeader"+deviceHeaderId+" style=color:lightgray></span></div>",o=nodes[a].pwr,t=0):2==sort&&null==o&&(o="1");n++;var r=EscapeHtml(nodes[a].name);0==r.length&&(r="<i>None</i>"),null!=nodes[a].rname&&0<nodes[a].rname.length&&(r+=" / "+EscapeHtml(nodes[a].rname));var d=EscapeHtml(nodes[a].name);1==showRealNames&&null!=nodes[a].rname&&(d=EscapeHtml(nodes[a].rname)),0==d.length&&(d="<i>None</i>");var p=nodes[a].icon,c=NodeStateStr(nodes[a]);nodes[a].conn&&0!=nodes[a].conn||(p+=" gray"),e+="<div style=cursor:pointer onclick=goForward('"+nodes[a]._id+"')>",e+='<div class="i'+p+'" style="float:left;margin-left:4px"></div>',e+='<div style="width:auto;height:40px;background-color:lightgray;margin-top:5px;margin-bottom:5px;margin-left:60px;padding-top:5px;padding-bottom:5px;border-radius:8px 0px 0px 8px">',e+="<div><div style=padding-left:12px;padding-top:2px><b>"+d+"</b></div><div style=padding-left:12px;padding-top:3px;color:gray>"+c+"</div></div>",e+="</div></div>",deviceHeaderTotal++,void 0===deviceHeaderCount[nodes[a].state]?deviceHeaderCount[nodes[a].state]=1:deviceHeaderCount[nodes[a].state]++}}if(0==sort)for(var a in meshes){var u=meshes[a],m=u.links[userinfo._id];if(null!=m){m.rights;null==i[u._id]&&(""!=o&&""!=e&&(e+="</tr></table>"),e+="<div><div colspan=3 class=DevSt><span style=float:right>",e+='</span><span id=MxMESH style=cursor:pointer onclick=goForward("'+u._id+'")>'+EscapeHtml(u.name)+"</span></div>",1==u.mtype&&(e+="<div style=padding:10px><i>No Intel&reg; AMT devices in this group"),2==u.mtype&&(e+="<div style=padding:10px><i>No devices in this group"),e+=".</i></div></div>",o=u._id,n++)}}for(var a in 0==n?QH("xdevices",'<div style="margin-top:50px;text-align:center"><span style="font-size:30px">No devices</span><br /><br />Use the desktop version of this website to add devices.</div>'):QH("xdevices",e),deviceHeaderSet(),deviceHeaders)QH(a,deviceHeaders[a]);for(var a in deviceHeadersTitles)Q(a).title=deviceHeadersTitles[a]}var powerStatetable=["","Powered","Sleep","Sleep","Sleep","Hibernating","Power off","Present"],powerStateStrings=["","Powered","Sleeping","Sleeping","Deep Sleep","Hibernating","Soft-Off","Present"],powerStateStrings2=["","Device is powered","Device is in sleep state (S1)","Device is in sleep state (S2)","Device is in deep sleep state (S3)","Device is hibernating (S4)","Device is in soft-off state (S5)","Device is present, but power state cannot be determined"],powerColorTable=["#00000000","black","blue","blue","lightblue","blueviolet","darkgreen","lightseagreen","lightseagreen"];function NodeStateStr(e){var t=[];return 0<e.state&&e.state<powerStatetable.length&&state.push(powerStatetable[e.state]),e.conn&&(0!=(1&e.conn)&&t.push("<span>Agent</span>"),0!=(2&e.conn)?t.push("<span>CIRA</span>"):0!=(4&e.conn)&&t.push("<span>Intel&reg; AMT</span>"),0!=(8&e.conn)&&t.push("<span>Relay</span>"),0!=(16&e.conn)&&t.push("<span>MQTT</span>")),null!=e.pwr&&0!=e.pwr&&t.push(powerStateStrings[e.pwr]),t.join(", ")}function PowerStateStr(e){return e<powerStatetable.length?powerStatetable[e]:""}function PowerStateStr2(e){return 0!=e&&e<powerStatetable.length?powerStatetable[e]:"Unknown"}function onSortSelectChange(e){sort=document.getElementById("sortselect").selectedIndex,e||putstore("sort",sort),updateDevicesEx()}function deviceHeaderSet(){if(0!=deviceHeaderId){deviceHeaders["DevxHeader"+deviceHeaderId]=", "+deviceHeaderTotal+(1==deviceHeaderTotal?" node":" nodes");var e="";for(var t in deviceHeaderCount)0<e.length&&(e+=", "),e+=deviceHeaderCount[t]+" "+PowerStateStr2(t);deviceHeadersTitles["DevxHeader"+deviceHeaderId]=e,deviceHeaderId++,deviceHeaderCount={},deviceHeaderTotal=0}else deviceHeaderId=1}function meshSort(e,t){return e.meshnamel>t.meshnamel?1:e.meshnamel<t.meshnamel?-1:e.meshid==t.meshid?1==showRealNames?e.rnamel>t.rnamel?1:e.rnamel<t.rnamel?-1:0:e.namel>t.namel?1:e.namel<t.namel?-1:0:0}function powerSort(e,t){var o=e.pwr?e.pwr:0,n=t.pwr?t.pwr:0;return o==n?1==showRealNames?e.rnamel>t.rnamel?1:e.rnamel<t.rnamel?-1:0:e.namel>t.namel?1:e.namel<t.namel?-1:0:n<o?1:o<n?-1:0}function deviceSort(e,t){return e.namel>t.namel?1:e.namel<t.namel?-1:0}function deviceHostSort(e,t){return e.rnamel>t.rnamel?1:e.rnamel<t.rnamel?-1:0}function refreshDevice(e){currentNode&&currentNode._id==e&&gotoDevice(e,xxcurrentView,!0)}function getNodeRights(e){var t=getNodeFromId(e);return meshes[t.meshid].links[userinfo._id].rights}var currentNode,currentDevicePanel=0,powerTimelineNode=null,powerTimelineReq=null,powerTimelineUpdate=null,powerTimeline=null;function getCurrentNode(){return currentNode}function gotoDevice(e,t,o){if(!0===userinfo.emailVerified||1!=serverinfo.emailcheck||4294967295==userinfo.siteadmin)if(!(262144&features)||1==userinfo.otpsecret||0<userinfo.otphkeys||0<userinfo.otpkeys){var n=getNodeFromId(e);if(null!=n){var i=meshes[n.meshid];if(null!=i){var a=i.links[userinfo._id].rights;if(!currentNode||currentNode._id!=n._id||1==o){currentNode=n;var s=EscapeHtml(n.name);0==s.length&&(s="<i>None</i>"),0!=(4&a)&&(s="<span onclick=showEditNodeValueDialog(0) style=cursor:pointer>"+s+"</span>"),QH("p10deviceName",s);var l="<table style=width:100%>";l+=addDeviceAttribute("<span>Group</span>",'<a onclick=goForward("'+n.meshid+'") style=cursor:pointer>'+EscapeHtml(meshes[n.meshid].name)+"</a>"),null!=n.rname&&(l+=addDeviceAttribute("<span>Name</span>","<span>"+EscapeHtml(n.rname)+"</span>")),1!=i.mtype&&n.name==n.host||(0!=(4&a)?n.host?l+=addDeviceAttribute("Hostname","<span onclick=showEditNodeValueDialog(1) style=cursor:pointer>"+EscapeHtml(n.host)+"</span>"):l+=addDeviceAttribute("Hostname","<span onclick=showEditNodeValueDialog(1) style=cursor:pointer><i>None</i></span>"):l+=addDeviceAttribute("Hostname",EscapeHtml(n.host)));var r=n.desc?EscapeHtml(n.desc):"<i>None</i>";l+=addDeviceAttribute("Description",0!=(4&a)?"<span onclick=showEditNodeValueDialog(2) style=cursor:pointer>"+r+"</span>":r);var d=["Unknown","Windows 32bit console","Windows 64bit console","Windows 32bit service","Windows 64bit service","Linux 32bit","Linux 64bit","MIPS","XENx86","Android ARM","Linux ARM","MacOS 32bit","Android x86","PogoPlug ARM","Android APK","Linux Poky x86-32bit","MacOS 64bit","ChromeOS","Linux Poky x86-64bit","Linux NoKVM x86-32bit","Linux NoKVM x86-64bit","Windows MinCore console","Windows MinCore service","NodeJS","ARM-Linaro","ARMv6l / ARMv7l","ARMv8 64bit","ARMv6l / ARMv7l / NoKVM","Unknown","Unknown","FreeBSD x86-64"];if(null!=n.agent&&null!=n.agent.id&&null!=n.agent.ver){var p="";p=n.agent.id<=d.length?d[n.agent.id]:d[0],0!=n.agent.ver&&(p+=" v"+n.agent.ver),l+=addDeviceAttribute("Agent",p)}if(null!=n.intelamt){p="";var c={0:nobreak("Not Activated (Pre)"),1:nobreak("Not Activated (In)"),2:nobreak("Activated")};null!=n.intelamt.ver&&null==n.intelamt.state?p+="<i>"+nobreak("Unknown State")+"</i>, v"+n.intelamt.ver:null==n.intelamt.ver&&2==n.intelamt.state?p+="<i>Activated</i>":null==n.intelamt.ver||null==n.intelamt.state?p+="<i>Unknown Version & State</i>":(p+=c[n.intelamt.state],n.intelamt.flags&&(2&n.intelamt.flags?p=" <span>CCM</span>":4&n.intelamt.flags&&(p=" <span>ACM</span>")),p+=", v"+n.intelamt.ver),1==n.intelamt.tls&&(p+=", <span>TLS</span>"),2==n.intelamt.state&&(null!=n.intelamt.user&&""!=n.intelamt.user||(p+=0!=(4&a)?', <i style=color:#FF0000;cursor:pointer onclick=editDeviceAmtSettings("'+n._id+'")>'+nobreak("No Credentials")+"</i>":", <i style=color:#FF0000>No Credentials</i>"),p+=" ",0!=(4&a)&&(p+='<img src=images/link4.png height=10 width=10 style=cursor:pointer onclick=editDeviceAmtSettings("'+n._id+'")>'));var u="Intel&reg; ME";"number"==typeof n.intelamt.sku&&(0!=(8&n.intelamt.sku)?u="Intel&reg; AMT":0!=(16&n.intelamt.sku)&&(u="Intel&reg; SM")),l+=addDeviceAttribute(u,p)}if(null!=n.agent&&null!=n.agent.tag&&"mailto:"!=n.agent.tag){var m=EscapeHtml(n.agent.tag);m.startsWith("mailto:")&&(m='<a href="'+m+'">'+m.substring(7)+"</a>"),l+=addDeviceAttribute("Agent Tag",m)}var h=n.conn;if(h&&1<h){var f=[];0!=(1&n.conn)&&f.push("<span>Agent</span>"),0!=(2&n.conn)?f.push("<span>Intel&reg; AMT CIRA</span>"):0!=(4&n.conn)&&f.push("<span>Intel&reg; AMT</span>"),0!=(8&n.conn)&&f.push("<span>Agent Relay</span>"),0!=(16&n.conn)&&f.push("<span>MQTT</span>"),l+=addDeviceAttribute("Connectivity",f.join(", "))}var g="<i>None</i>";if(null!=n.tags)for(var v in g="",n.tags)g+='<span style="background-color:lightgray;padding:3px;margin-right:4px;border-radius:5px">'+n.tags[v]+"</span>";l+=addDeviceAttribute("Tags",0!=(4&a)?"<span onclick=showEditNodeValueDialog(3) style=cursor:pointer>"+g+"</span>":g),l+="</table><br />",0!=(76&a)&&(l+="<input type=button value=Actions onclick=deviceActionFunction() />"),QH("p10html",l),setupFiles(),l="<div style=float:right;font-size:x-small;margin-right:10px>",0!=(4&a)&&(l+='<a style=cursor:pointer onclick=p10showDeleteNodeDialog("'+n._id+'")>Delete Device</a>'),l+="</div><div style=font-size:x-small>",l+="</div><br>",QH("p10html3",l);var k=PowerStateStr(n.state);0!=(1&h)&&(0<k.length&&(k+=", "),k+="<span style=font-size:10px>Mesh Agent</span>"),0!=(2&h)?(0<k.length&&(k+=", "),k+="<span style=font-size:10px>Intel&reg; AMT connected</span>"):0!=(4&h)&&(0<k.length&&(k+=", "),k+="<span style=font-size:10px>Intel&reg; AMT detected</span>"),0!=(16&h)&&(0<k.length&&(k+="<br/>"),k+="<span style=font-size:12px>MQTT channel connected</span>"),QH("MainComputerState",k),QH("MainComputerImage",'<div class="i'+n.icon+'"></div>'),powerTimelineNode!=currentNode._id&&powerTimelineReq!=currentNode._id&&(QH("p10html2",""),powerTimelineReq=currentNode._id,meshserver.send({action:"powertimeline",nodeid:currentNode._id}))}setupDesktop(),go(t=t||10),setupDeviceMenu()}else goBack()}else goBack()}else setDialogMode(2,"Account Security",1,null,'Unable to access a device until two-factor authentication is enabled. This is required for extra security. Go to the "My Account" and look at the "Account Security" section.');else setDialogMode(2,"Account Security",1,null,'Unable to access a device until a email address is verified. This is required for password recovery. Go to the "My Account" to change and verify an email address.')}function deviceToastFunction(){xxdialogMode||setDialogMode(2,"Device Toast",3,deviceToastFunctionEx,"<textarea id=d2devToast style=width:100%;height:80px;resize:none;overflow-y:scroll></textarea>")}function deviceToastFunctionEx(){meshserver.send({action:"toast",nodeids:[currentNode._id],title:"MeshCentral",msg:Q("d2devToast").value})}function setupDeviceMenu(e,t){var o=0;currentNode&&(o=meshes[currentNode.meshid].links[userinfo._id].rights),null!=e&&(currentDevicePanel=e),QV("p10general",0==currentDevicePanel),QV("p10desktop",1==currentDevicePanel),QV("p10files",2==currentDevicePanel);var n=[];0!=currentDevicePanel&&n.push({n:"General",f:"setupDeviceMenu(0)"}),1!=currentDevicePanel&&null!=currentNode&&(8&o||256&o)&&(1==meshes[currentNode.meshid].mtype&&("number"!=typeof currentNode.intelamt.sku||0!=(8&currentNode.intelamt.sku))||currentNode.agent&&1&currentNode.agent.caps)&&n.push({n:"Desktop",f:"setupDeviceMenu(1)"}),2!=currentDevicePanel&&null!=currentNode&&8&o&&(4294967295==o||0==(1024&o))&&2==currentNode.mtype&&4&currentNode.agent.caps&&n.push({n:"Files",f:"setupDeviceMenu(2)"}),updateFooterMenu(n)}function deviceActionFunction(){if(!xxdialogMode){var e=meshes[currentNode.meshid].links[userinfo._id].rights,t="Select an operation to perform on this device.<br /><br />",o="<select id=d2deviceop style=float:right;width:170px>";0!=(64&e)&&(o+="<option value=100>Wake-up</option>"),0!=(8&e)&&(o+="<option value=4>Sleep</option><option value=3>Reset</option><option value=2>Power off</option>"),setDialogMode(2,"Device Action",3,deviceActionFunctionEx,t+=addHtmlValue("Operation",o+="</select>"))}}function deviceActionFunctionEx(){var e=Q("d2deviceop").value;100==e?meshserver.send({action:"wakedevices",nodeids:[currentNode._id]}):meshserver.send({action:"poweraction",nodeids:[currentNode._id],actiontype:e})}function updateDeviceTimeline(){2==meshserver.State&&null!=powerTimelineNode&&null!=powerTimelineUpdate&&null!=currentNode&&powerTimelineNode==powerTimelineReq&&currentNode._id==powerTimelineNode&&powerTimelineUpdate<Date.now()&&(powerTimelineUpdate=null,meshserver.send({action:"powertimeline",nodeid:currentNode._id}))}function drawDeviceTimeline(){var e=null,t=Date.now();currentNode._id==powerTimelineNode&&(e=powerTimeline);var o=new Date;o.setHours(0,0,0,0);(o=new Date(o.getTime()-5184e5)).getTime();var n=[];if(null!=e&&1<e.length){n.push([0,e[1],e[0]]);for(var i=e[1],a=2;a<e.length;a+=2){var s=e[a],l=t;e.length>a+1&&(l=e[a+1]),n.push([i,i+l,s]),i+=l}}var r="",d=1,p=new Date,c=Q("masthead").offsetWidth-122;p.setHours(0,0,0,0);for(a=0;a<7;a++){var u="",m=p.getTime(),h=m+864e5;for(var f in n){var g=n[f];if(1==isTimeBlockInside(m,h,g[0],g[1])){var v=Math.max(m,g[0]),k=Math.min(Math.min(h,g[1]),t),y=Math.round((k-v)*c/864e5);0<y&&(u+="<div style=display:table-cell;width:"+y+"px;background-color:"+powerColor(g[2])+";height:16px></div>")}}r+="<tr style="+(d%2==0?"background-color:#DDD":"")+"><td><div>&nbsp;"+printDate(p)+"<div></div></div></td><td><div>"+u+"</div></td></tr>",++d,p=new Date(p.getTime()-864e5)}QH("p10html2",'<table style="color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse;width:calc(100% - 18px);margin:9px" border=0 cellpadding=2 cellspacing=0><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:center;width:90px>Day</th><th scope=col style=text-align:center>Power State</th></tr>'+r+"</tbody></table>")}function powerColor(e){return e<powerColorTable.length?powerColorTable[e]:"yellow"}function isTimeBlockInside(e,t,o,n){return o<e&&t<n||(e<o&&o<t||e<n&&n<t)}function addDeviceAttribute(e,t){return"<tr><td style=width:100px;color:gray>"+e+"</td><td style=overflow:hidden>"+t+"</td></tr>"}function editDeviceAmtSettings(e,t){if(!xxdialogMode){var o="",n=getNodeFromId(e),i=3;0!=(4&getNodeRights(e))&&(o+=addHtmlValue("Username",'<input id=dp10username style=width:170px maxlength=32 autocomplete=nope placeholder="admin" onchange=validateDeviceAmtSettings() onkeyup=validateDeviceAmtSettings() />'),o+=addHtmlValue("Password","<input id=dp10password type=password style=width:170px autocomplete=nope maxlength=32 onchange=validateDeviceAmtSettings() onkeyup=validateDeviceAmtSettings() />"),o+=addHtmlValue("Security","<select id=dp10tls style=width:176px><option value=0>No TLS security</option><option value=1>TLS security required</option></select>"),null!=n.intelamt.user&&""!=n.intelamt.user&&(i=7),setDialogMode(2,"Edit Intel&reg; AMT credentials",i,editDeviceAmtSettingsEx,o,{node:n,func:t}),null!=n.intelamt.user&&""!=n.intelamt.user?Q("dp10username").value=n.intelamt.user:Q("dp10username").value="admin",Q("dp10tls").value=n.intelamt.tls,validateDeviceAmtSettings())}}function validateDeviceAmtSettings(){QE("idx_dlgOkButton",passwordcheck(Q("dp10password").value))}function editDeviceAmtSettingsEx(e,t){if(2==e)meshserver.send({action:"changedevice",nodeid:t.node._id,intelamt:{user:"",pass:""}});else{var o=Q("dp10username").value;""==o&&(o="admin");var n=Q("dp10password").value;""==n&&(o=""),meshserver.send({action:"changedevice",nodeid:t.node._id,intelamt:{user:o,pass:n,tls:Q("dp10tls").value}}),t.node.intelamt.user=o,t.node.intelamt.tls=Q("dp10tls").value,t.func&&setTimeout(t.func,300)}}function p10showDeleteNodeDialog(e){xxdialogMode||(setDialogMode(2,"Delete Node",3,p10showDeleteNodeDialogEx,format("Delete {0}?",EscapeHtml(currentNode.name))+"<br /><br /><input id=p10check type=checkbox onchange=p10validateDeleteNodeDialog() />Confirm",e),p10validateDeleteNodeDialog())}function p10validateDeleteNodeDialog(){QE("idx_dlgOkButton",Q("p10check").checked)}function p10showDeleteNodeDialogEx(e,t){meshserver.send({action:"removedevices",nodeids:[t]})}function p10showiconselector(){if(!xxdialogMode&&0!=(4&meshes[currentNode.meshid].links[userinfo._id].rights)){"<div style=display:inline-block class=i1 onclick=p10setIcon(1)></div>","<div style=display:inline-block class=i2 onclick=p10setIcon(2)></div>","<div style=display:inline-block class=i3 onclick=p10setIcon(3)></div><br>","<div style=display:inline-block class=i4 onclick=p10setIcon(4)></div>","<div style=display:inline-block class=i5 onclick=p10setIcon(5)></div>","<div style=display:inline-block class=i6 onclick=p10setIcon(6)></div></table>",setDialogMode(2,"Icon Selection",0,null,"<table align=center><td><div style=display:inline-block class=i1 onclick=p10setIcon(1)></div><div style=display:inline-block class=i2 onclick=p10setIcon(2)></div><div style=display:inline-block class=i3 onclick=p10setIcon(3)></div><br><div style=display:inline-block class=i4 onclick=p10setIcon(4)></div><div style=display:inline-block class=i5 onclick=p10setIcon(5)></div><div style=display:inline-block class=i6 onclick=p10setIcon(6)></div></table>"),QV("id_dialogclose",!0)}}function p10setIcon(e){setDialogMode(0),meshserver.send({action:"changedevice",nodeid:currentNode._id,icon:e})}var desktop,desktopNode,showEditNodeValueDialog_modes=["Device Name","Hostname","Description","Tags"],showEditNodeValueDialog_modes2=["name","host","desc","tags"],showEditNodeValueDialog_modes3=["","","","Group1, Group2, Group3"];function showEditNodeValueDialog(e){if(!xxdialogMode){setDialogMode(2,"Edit Device",3,showEditNodeValueDialogEx,addHtmlValue(showEditNodeValueDialog_modes[e],'<input id=dp10devicevalue style=width:170px maxlength=64 placeholder="'+showEditNodeValueDialog_modes3[e]+'" onchange=p10editdevicevalueValidate('+e+",event) onkeyup=p10editdevicevalueValidate("+e+",event) />"),e);var t=currentNode[showEditNodeValueDialog_modes2[e]];null==t&&(t=""),Array.isArray(t)&&(t=t.join(", ")),Q("dp10devicevalue").value=t,p10editdevicevalueValidate(),Q("dp10devicevalue").focus()}}function showEditNodeValueDialogEx(e,t){var o={action:"changedevice",nodeid:currentNode._id};o[showEditNodeValueDialog_modes2[t]]=Q("dp10devicevalue").value,meshserver.send(o)}function p10editdevicevalueValidate(e,t){var o=1<e||0<Q("dp10devicevalue").value.length;QE("idx_dlgOkButton",o),null!=t&&1==o&&13==t.keyCode&&dialogclose(1)}var desktopsettings={encoding:2,showfocus:!1,showmouse:!0,showcad:!0,quality:40,scaling:1024,framerate:50};function setupDesktop(){desktopNode!=currentNode&&null!=desktop&&(desktop.Stop(),desktop=desktopNode=null),desktopNode==currentNode&&null!=desktop||(QH("DeskParent",'<canvas id=Desk width=640 height=200 style="width:100%;-ms-touch-action:none;margin-left:0px" oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event)></canvas>'),desktopNode=currentNode,Q("Desk").addEventListener("DOMMouseScroll",function(e){return dmousewheel(e)}),Q("Desk").addEventListener("mousewheel",function(e){return dmousewheel(e)})),desktopNode=currentNode,updateDesktopButtons(),Q("Desk").toBlob||QV("deskSaveBtn",!1)}function updateDesktopButtons(){var e=meshes[currentNode.meshid],t=0;null!=desktop&&(t=desktop.State);var o=e.links[userinfo._id].rights;QV("disconnectbutton1",0!=t),QV("connectbutton1",0==t&&2==e.mtype&&(8&o||256&o)),QV("connectbutton1h",0==t&&8&o&&(1==e.mtype||null!=currentNode.intelamt&&2==currentNode.intelamt.state&&null!=currentNode.intelamt.ver&&"number"==typeof currentNode.intelamt.sku&&0!=(8&currentNode.intelamt.sku))),QV("d7amtkvm",!(null==currentNode.intelamt||null==currentNode.intelamt.ver&&1!=e.mtype||0!=t&&2!=desktop.contype)),QV("d7meshkvm",2==e.mtype&&(0==t||1==desktop.contype));var n=0!=(1&currentNode.conn);QE("connectbutton1",n);var i=0!=(6&currentNode.conn);QE("connectbutton1h",i),QV("DeskToastButton",0!=(16384&o)&&currentNode.agent&&currentNode.agent.id<5&&8&o),QV("deskActionsBtn",8&o),Q("DeskControl").checked=0!=(8&o),0==n&&QV("DeskTools",!1)}function connectDesktop(e,t){if(setSessionActivity(),null==desktop)if(desktopNode=currentNode,2==t){if(null==desktopNode.intelamt.user||""==desktopNode.intelamt.user)return void editDeviceAmtSettings(desktopNode._id,connectDesktop);(desktop=CreateAmtRedirect(CreateAmtRemoteDesktop("Desk"),authCookie)).debugmode=debugmode,desktop.onStateChanged=onDesktopStateChange,desktop.m.bpp=1==desktopsettings.encoding||3==desktopsettings.encoding?1:2,desktop.m.useZRLE=desktopsettings.encoding<3,desktop.m.showmouse=desktopsettings.showmouse,desktop.m.onScreenSizeChange=deskAdjust,desktop.Start(desktopNode._id,16994,"*","*",0),desktop.contype=2}else(desktop=CreateAgentRedirect(meshserver,CreateAgentRemoteDesktop("Desk"),serverPublicNamePort,authCookie,authRelayCookie,domainUrl)).debugmode=debugmode,desktop.m.debugmode=debugmode,desktop.attemptWebRTC=attemptWebRTC,desktop.onStateChanged=onDesktopStateChange,desktop.m.CompressionLevel=desktopsettings.quality,desktop.m.ScalingLevel=desktopsettings.scaling,desktop.m.FrameRateTimer=desktopsettings.framerate,desktop.m.onDisplayinfo=deskDisplayInfo,desktop.m.onScreenSizeChange=deskAdjust,desktop.Start(desktopNode._id),desktop.contype=1;else desktop.Stop(),desktopNode=desktop=null}function onDesktopStateChange(e,t){var o=t;3==o&&2==e.contype&&o++;var n=StatusStrs[o];switch(null!=desktop&&1==desktop.webRtcActive&&(n+=", WebRTC"),QH("deskstatus",n),t){case 0:desktop.Stop(),desktopNode=desktop=null,QV("termdisplays",!1),1==fullscreen&&deskToggleFull()}updateDesktopButtons(),deskAdjust(),setTimeout(deskAdjust,50)}function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),updateDesktopButtons(),setDialogMode(7,"Remote Desktop Settings",3,showDesktopSettingsChanged))}function showDesktopSettingsChanged(){desktopsettings.encoding=d7desktopmode.value,desktopsettings.showfocus=d7showfocus.checked,desktopsettings.showmouse=d7showcursor.checked,desktopsettings.quality=d7bitmapquality.value,desktopsettings.scaling=d7bitmapscaling.value,desktopsettings.framerate=d7framelimiter.value,localStorage.setItem("desktopsettings",JSON.stringify(desktopsettings)),applyDesktopSettings(),desktop&&(1==desktop.contype&&0!=desktop.State&&desktop.m.SendCompressionLevel(1,desktopsettings.quality,desktopsettings.scaling,desktopsettings.framerate),2==desktop.contype&&0!=desktop.State&&(desktop.Stop(),setTimeout(function(){connectDesktop(null,2)},50)))}function applyDesktopSettings(){var e="",t=512&features?[90,70,50,40,30,20,10,5,1]:[50,40,30,20,10,5,1];for(var o in t)e+="<option value="+t[o]+">"+t[o]+"%</option>";QH("d7bitmapquality",e),d7desktopmode.value=desktopsettings.encoding,d7showfocus.checked=desktopsettings.showfocus,d7showcursor.checked=desktopsettings.showmouse,d7bitmapquality.value=40,0<=t.indexOf(parseInt(desktopsettings.quality))&&(d7bitmapquality.value=desktopsettings.quality),d7bitmapscaling.value=desktopsettings.scaling,desktopsettings.framerate&&(d7framelimiter.value=desktopsettings.framerate)}var fullscreen=!1;function deskAdjust(){var e=(Q("DeskParent").clientHeight-Q("Desk").clientHeight)/2;if(e<0){var t=Q("DeskParent").clientHeight,o=9999;desktop&&(o=desktop.m.width/desktop.m.height*t),QS("Desk")["max-height"]=t+"px",QS("Desk")["max-width"]=o+"px",e=0}else QS("Desk")["max-height"]=null,QS("Desk")["max-width"]=null;QS("Desk")["margin-top"]=e+"px",QS("Desk")["margin-bottom"]=e+"px"}function deskSendKeys(){if(!xxdialogMode&&null!=desktop&&3==desktop.State){var e=Q("deskkeys").value;0==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[65364,1],[65364,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,40],[desktop.m.KeyAction.UP,40],[desktop.m.KeyAction.EXUP,91]]):1==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[65362,1],[65362,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,38],[desktop.m.KeyAction.UP,38],[desktop.m.KeyAction.EXUP,91]]):2==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[108,1],[108,0],[65511,0]]):desktop.sendCtrlMsg('{"action":"lock"}'):3==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[109,1],[109,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,77],[desktop.m.KeyAction.UP,77],[desktop.m.KeyAction.EXUP,91]]):4==e?2==desktop.contype?desktop.m.sendkey([[65505,1],[65511,1],[109,1],[109,0],[65511,0],[65505,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.DOWN,16],[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,77],[desktop.m.KeyAction.UP,77],[desktop.m.KeyAction.EXUP,91],[desktop.m.KeyAction.UP,16]]):5==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.EXUP,91]]):6==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[114,1],[114,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,82],[desktop.m.KeyAction.UP,82],[desktop.m.KeyAction.EXUP,91]]):7==e?2==desktop.contype?desktop.m.sendkey([[65513,1],[65473,1],[65473,0],[65513,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,18],[desktop.m.KeyAction.DOWN,115],[desktop.m.KeyAction.UP,115],[desktop.m.KeyAction.EXUP,18]]):8==e?2==desktop.contype?desktop.m.sendkey([[65507,1],[119,1],[119,0],[65507,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,17],[desktop.m.KeyAction.DOWN,87],[desktop.m.KeyAction.UP,87],[desktop.m.KeyAction.EXUP,17]]):9==e?2==desktop.contype?desktop.m.sendkey([[65513,1],[65289,1],[65289,0],[65513,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,18],[desktop.m.KeyAction.DOWN,9],[desktop.m.KeyAction.UP,9],[desktop.m.KeyAction.EXUP,18]]):10==e?desktop.m.sendcad():11==e&&(2==desktop.contype?desktop.m.sendkey([[65289,1],[65289,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.DOWN,9],[desktop.m.KeyAction.UP,9]]))}}function sendSpecialKeys(){xxdialogMode||null==desktop||3!=desktop.State||setDialogMode(3,"Special Keys",3,deskSendKeys)}function toggleSoftKeys(e){QV("DeskSoftInput",1==e),1==e&&Q("DeskSoftInput").focus()}function toggleDeskTools(){setSessionActivity(),xxdialogMode||("none"==QS("DeskTools").display?(QV("DeskTools",!0),Q("DeskTools").nodeid=currentNode._id,refreshDeskTools()):QV("DeskTools",!1))}function refreshDeskTools(){setSessionActivity(),QV("DeskToolsRefreshButton",!1),setTimeout(refreshDeskToolsEx,500),meshserver.send({action:"msg",type:"ps",nodeid:currentNode._id})}function refreshDeskToolsEx(){QV("DeskToolsRefreshButton",!0)}var filesNode,deskTools={sort:1,msg:null};function sortProcess(e){deskTools.sort=e,showDeskToolsProcesses(deskTools.msg)}function sortProcessPid(e,t){return e.p>t.p?1:e.p<t.p?-1:0}function sortProcessName(e,t){return e.d>t.d?1:e.d<t.d?-1:0}function showDeskToolsProcesses(e){if(null!=(deskTools.msg=e)){if(Q("DeskTools").nodeid==e.nodeid){var t=[],o=null;try{o=JSON.parse(e.value)}catch(e){}if(console.log(o),null!=o){for(var n in o)t.push({p:parseInt(n),c:o[n].cmd,d:o[n].cmd.toLowerCase(),u:o[n].user});0==deskTools.sort?t.sort(sortProcessPid):1==deskTools.sort&&t.sort(sortProcessName);var i="";for(var a in t)0!=t[a].p&&(i+="<div class=deskToolsBar><div style=width:50px;float:left;text-align:right;padding-right:5px>"+t[a].p+"</div><a style=float:right;padding-right:5px;cursor:pointer onclick=stopProcess("+t[a].p+',"'+t[a].c+'")><img width=10 height=10 src="images/trash.png"></a><div style=float:right;padding-right:5px>'+(t[a].u?t[a].u:"")+"</div><div>"+t[a].c+"</div></div>");QH("DeskToolsProcesses",i)}}}else QH("DeskToolsProcesses","")}function deskSaveImage(){if(setSessionActivity(),!xxdialogMode&&null!=desktop&&3==desktop.State){var e=new Date,t="Desktop-"+currentNode.name+"-"+e.getFullYear()+"-"+("0"+(e.getMonth()+1)).slice(-2)+"-"+("0"+e.getDate()).slice(-2)+"-"+("0"+e.getHours()).slice(-2)+"-"+("0"+e.getMinutes()).slice(-2);Q("Desk").toBlob(function(e){saveAs(e,t+".jpg")})}}function deskDisplayInfo(e,t,o,n){var i=Q("termdisplays").value;if(0<t.length){var a="";for(var s in t)a+="<option"+(i==t[s]?" selected":"")+">"+t[s]+"</option>";QH("termdisplays",a)}QV("termdisplays",0<t.length)}function deskGetDisplayNumbers(e){desktop.m.GetDisplayNumbers()}function deskSetDisplay(e){setSessionActivity();var t=0,o=Q("termdisplays").value;t="All Displays"==o?65535:parseInt(o.substring(8)),desktop.m.SetDisplay(t)}function dmousedown(e){setSessionActivity(),xxdialogMode||null==desktop||desktop.m.mousedown(e)}function dmouseup(e){setSessionActivity(),xxdialogMode||null==desktop||desktop.m.mouseup(e)}function dmousemove(e){setSessionActivity(),xxdialogMode||null==desktop||desktop.m.mousemove(e)}function dmousewheel(e){return setSessionActivity(),!(xxdialogMode||null==desktop||!desktop.m.mousewheel)&&(desktop.m.mousewheel(e),haltEvent(e),!0)}function drotate(e){xxdialogMode||null==desktop||(desktop.m.setRotation(desktop.m.rotation+e),deskAdjust(),deskAdjust())}function stopProcess(e,t){return setDialogMode(2,"Process Control",3,stopProcessEx,format('Stop process #{0} "{1}"?',e,t),e),!1}function stopProcessEx(e,t){meshserver.send({action:"msg",type:"pskill",nodeid:currentNode._id,value:t}),setTimeout(refreshDeskTools,300)}function setupFiles(){var e=filesNode==currentNode,t=0!=(1&(filesNode=currentNode).conn);QE("p13Connect",t),0!=e&&0!=t||!files||(files.Stop(),files=null)}function onFilesStateChange(e,t){setSessionActivity(),p13Connect.value=0==t?"Connect":"Disconnect";var o=StatusStrs[t];switch(1==files.webRtcActive&&(o+=", WebRTC"),Q("p13Status").textContent=o,t){case 0:QH("p13files",""),p13filetree=null,p13filetreelocation=[],QH("p13currentpath",""),QE("p13FolderUp",!1),p13setActions(),null!=files&&(files.Stop(),files=null);break;case 3:p13targetpath="",files.sendText({action:"ls",reqid:1,path:""})}}function CreateRemoteFiles(e){var t={protocol:5};return t.onFileUpdate=e,t.xxStateChange=function(e){},t.ProcessData=function(e){t.onFileUpdate(e)},t}var autoConnectFilesTimer=null;function autoConnectFiles(e){autoConnectFilesTimer=null==autoConnectFilesTimer?setInterval(connectFiles,100):(clearInterval(autoConnectFilesTimer),null)}function connectFiles(e){files?(files.Stop(),files=null):((files=CreateAgentRedirect(meshserver,CreateRemoteFiles(p13gotFiles),serverPublicNamePort,authCookie,authRelayCookie,domainUrl)).attemptWebRTC=attemptWebRTC,files.onStateChanged=onFilesStateChange,files.Start(filesNode._id)),p13clipboard=p13clipboardFolder=null,p13clipboardCut=0,p13updateClipview()}var p13sortorder,p13filetree=null,p13targetpath=null,p13filetreelocation=[];function p13gotFiles(e){if(setSessionActivity(),0<e.length&&123!=e.charCodeAt(0))p13gotDownloadBinaryData(e);else if("download"!=(e=JSON.parse(decode_utf8(e))).action)if(e.path=e.path.replace(/\//g,"\\"),null!=p13filetree&&e.path==p13filetree.path){var t=p13getCheckedNames();p13filetree=e,p13updateFiles(t)}else{for(var o=e.path.replace(/\//g,"\\"),n=p13targetpath.replace(/\//g,"\\");0<o.length&&"\\"==o[0];)o=o.substring(1);for(;0<n.length&&"\\"==n[0];)n=n.substring(1);(o==n||"\\"==e.path&&""==p13targetpath)&&(p13filetree=e,p13updateFiles())}else p13gotDownloadCommand(e)}function p13getCheckedNames(){for(var e=[],t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked&&e.push(p13filetree.dir[t[o].value].n);return e}function p13updateFiles(e){var t="",o="",n="<a style=cursor:pointer onclick=p13folderup(0)>Root</a>",i=p13filetree.path.split("\\");for(var a in p13filetreelocation=[],i)""!=i[a]&&p13filetreelocation.push(i[a]);for(var a in p13filetreelocation)n+=" / <a style=cursor:pointer onclick=p13folderup("+(parseInt(a)+1)+")>"+p13filetreelocation[a]+"</a>";var s=p13filetreelocation.join("/"),l=p13sort_files(p13filetree.dir);for(var a in l){var r,d=l[a],p=d.n;r=70<(r=p).length?EscapeHtml(p.substring(0,70))+"...":EscapeHtml(p),p=EscapeHtml(p);var c="";null!=d.s&&(c=getFileSizeStr(d.s));var u="";if(d.t<3){u="<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p13setActions() value='"+d.nx+"'>&nbsp;<span style=float:right></span><span><div class=fileIcon"+d.t+'></div><a style=cursor:pointer onclick=p13folderset("'+encodeURIComponent(d.nx)+'")>'+r+"</a></span></div>"}else{var m=r;0<d.s&&(m='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick="p13downloadfile(\''+encodeURIComponent(s+"/"+p)+"','"+encodeURIComponent(p)+"',"+d.s+')">'+r+"</a>"),u="<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p13setActions() value='"+d.nx+"'>&nbsp;<span style=float:right;padding-right:4px>"+c+"</span><span><div class=fileIcon"+d.t+"></div>"+m+"</span></div>"}d.t<3?t+=u:o+=u}if(QH("p13files",t+o),QH("p13currentpath",n),QE("p13FolderUp",0!=p13filetreelocation.length),null!=e){var h=document.getElementsByName("fd");for(a=0;a<h.length;a++)0<=e.indexOf(p13filetree.dir[h[a].value].n)&&(h[a].checked=!0)}p13setActions()}function p13folderset(e){p13targetpath=joinPaths(p13filetree.path,p13filetree.dir[e].n).split("\\").join("/"),files.sendText({action:"ls",reqid:1,path:p13targetpath})}function p13folderup(e){if(null==e)p13filetreelocation.pop();else for(;p13filetreelocation.length>e;)p13filetreelocation.pop();p13targetpath=p13filetreelocation.join("/"),files.sendText({action:"ls",reqid:1,path:p13targetpath})}function p13sort_filename(e,t){return e.ln>t.ln?1*p13sortorder:e.ln<t.ln?-1*p13sortorder:0}function p13sort_timestamp(e,t){return e.d>t.d?1*p13sortorder:e.d<t.d?-1*p13sortorder:0}function p13sort_bysize(e,t){return e.s==t.s?p13sort_filename(e,t):(e.s-t.s)*p13sortorder}function p13sort_files(e){var t=[],o=Q("p13sortdropdown").value;for(var n in e)e[n].nx=n,null==e[n].s&&(e[n].s=0),null==e[n].n&&(e[n].n=n),e[n].ln=e[n].n.toLowerCase(),t.push(e[n]);return p13sortorder=1,3<o&&(p13sortorder=-1,o-=3),1==o?t.sort(p13sort_filename):2==o?t.sort(p13sort_bysize):3==o&&t.sort(p13sort_timestamp),t}function p13setActions(){if(null==p13filetree)QE("p13DeleteFileButton",!1),QE("p13NewFolderButton",!1),QE("p13UploadButton",!1),QE("p13RenameFileButton",!1),QE("p13SelectAllButton",!1),Q("p13SelectAllButton").value="All",QE("p13RefreshButton",!1),QE("p13CutButton",!1),QE("p13CopyButton",!1),QE("p13PasteButton",!1);else{var e=p13getFileSelCount(),t=p13getFileCount(),o=p13getFileSelCount(!1),n=0<currentNode.agent.id&&currentNode.agent.id<5;QE("p13DeleteFileButton",0<e&&(0<p13filetreelocation.length||0==n)),QE("p13NewFolderButton",0<p13filetreelocation.length||0==n),QE("p13UploadButton",0<p13filetreelocation.length||0==n),QE("p13RenameFileButton",1==e&&(0<p13filetreelocation.length||0==n)),QE("p13SelectAllButton",0<t),Q("p13SelectAllButton").value=0<e?"None":"All",QE("p13RefreshButton",!0),QE("p13CutButton",0<e&&e==o&&(0<p13filetreelocation.length||0==n)),QE("p13CopyButton",0<e&&e==o&&(0<p13filetreelocation.length||0==n)),QE("p13PasteButton",(0<p13filetreelocation.length||0==n)&&null!=p13clipboard&&0<p13clipboard.length)}}function p13getFileSelCount(e){for(var t=0,o=document.getElementsByName("fd"),n=0;n<o.length;n++)!o[n].checked||0==e&&"3"!=o[n].attributes.file.value||t++;return t}function p13getFileSelDirCount(){for(var e=0,t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked&&"999"==t[o].attributes.file.value&&e++;return e}function p13getFileCount(){return document.getElementsByName("fd").length}function p13selectallfile(){for(var e=0==p13getFileSelCount(),t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked=e;p13setActions()}function p13createfolder(){setDialogMode(2,"New Folder",3,p13createfolderEx,"<input type=text id=p13renameinput maxlength=64 onkeyup=p13fileNameCheck(event) style=width:100% />"),focusTextBox("p13renameinput"),p13fileNameCheck()}function p13createfolderEx(){files.sendText({action:"mkdir",reqid:1,path:p13filetreelocation.join("/")+"/"+Q("p13renameinput").value}),p13folderup(999)}function p13deletefile(){var e=p13getFileSelCount(),t=0<p13getFileSelDirCount()?"<br /><br /><label><input type=checkbox id=p13recdeleteinput>Recursive delete</label><br>":"<input type=checkbox id=p13recdeleteinput style='display:none'>";setDialogMode(2,"Delete",3,p13deletefileEx,1<e?format("Delete {0} selected items?",e)+t:"Delete selected item?"+t)}function p13deletefileEx(){for(var e=[],t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked&&e.push(p13filetree.dir[t[o].value].n);files.sendText({action:"rm",reqid:1,path:p13filetreelocation.join("/"),delfiles:e,rec:Q("p13recdeleteinput").checked}),p13folderup(999)}function p13renamefile(){for(var e,t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked&&(e=p13filetree.dir[t[o].value].n);setDialogMode(2,"Rename",3,p13renamefileEx,'<input type=text id=p13renameinput maxlength=64 onkeyup=p13fileNameCheck(event) style=width:100% value="'+e+'" />',{action:"rename",path:p13filetreelocation.join("/"),oldname:e}),focusTextBox("p13renameinput"),p13fileNameCheck()}function p13renamefileEx(e,t){t.newname=Q("p13renameinput").value,files.sendText(t),p13folderup(999)}function p13fileNameCheck(e){var t=isFilenameValid(Q("p13renameinput").value);QE("idx_dlgOkButton",t),1==t&&null!=e&&13==e.keyCode&&dialogclose(1)}function p13uploadFile(){setDialogMode(2,"Upload File",3,p13uploadFileEx,"<input type=file name=files id=p13uploadinput style=width:100% multiple=multiple onchange=\"updateUploadDialogOk('p13uploadinput')\" />"),updateUploadDialogOk("p13uploadinput")}function p13uploadFileEx(){p13doUploadFiles(Q("p13uploadinput").files)}function p13viewfile(){for(var e=document.getElementsByName("fd"),t=0;t<e.length;t++)if(e[t].checked){p13filetree.dir[e[t].value].s<=204800?p13downloadfile(encodeURIComponent(p13filetreelocation.join("/")+"/"+p13filetree.dir[e[t].value].n),encodeURIComponent(p13filetree.dir[e[t].value].n),p13filetree.dir[e[t].value].s,"viewer"):messagebox("File Editor","Only files less than 200k can be edited.");break}}var downloadFile,uploadFile,currentMesh,p13clipboard=null,p13clipboardFolder=null,p13clipboardCut=0;function p13copyFile(e){var t=document.getElementsByName("fd");p13clipboard=[],p13clipboardCut=e,p13clipboardFolder=p13targetpath;for(var o=0;o<t.length;o++)t[o].checked&&"3"==t[o].attributes.file.value&&p13clipboard.push(p13filetree.dir[t[o].value].n);p13updateClipview()}function p13pasteFile(){var e="";null!=p13clipboard&&0<p13clipboard.length&&(e=0==p13clipboardCut?1<p13clipboard.length?format("Confirm copy of {0} entries's to this location?",p13clipboard.length):format("Confirm copy of 1 entrie to this location?"):1<p13clipboard.length?format("Confirm move of {0} entries's to this location?",p13clipboard.length):format("Confirm move of 1 entrie to this location?")),setDialogMode(2,"Paste",3,p13pasteFileEx,e)}function p13pasteFileEx(){files.sendText({action:0==p13clipboardCut?"copy":"move",reqid:1,scpath:p13clipboardFolder,dspath:p13targetpath,names:p13clipboard}),p13folderup(999),1==p13clipboardCut&&(p13clipboardFolder=p13clipboard=null,p13clipboardCut=0,p13updateClipview())}function p13updateClipview(){var e="";null!=p13clipboard&&0<p13clipboard.length&&(e=0==p13clipboardCut?1<p13clipboard.length?format('Holding {0} entries for copy, <a href=# onclick="return p13clearClip()" style=cursor:pointer>Clear</a>.',p13clipboard.length):format('Holding 1 entrie for copy, <a href=# onclick="return p13clearClip()" style=cursor:pointer>Clear</a>.'):1<p13clipboard.length?format('Holding {0} entries for move, <a href=# onclick="return p13clearClip()" style=cursor:pointer>Clear</a>.',p13clipboard.length):format('Holding 1 entrie for move, <a href=# onclick="return p13clearClip()" style=cursor:pointer>Clear</a>.')),QH("p13bottomstatus",e),p13setActions()}function p13clearClip(){return p13clipboardFolder=p13clipboard=null,p13clipboardCut=0,p13updateClipview(),!1}function updateUploadDialogOk(e){QE("idx_dlgOkButton",""!=Q(e).value)}function getFileSelCount(e){for(var t=0,o=document.getElementsByName("fc"),n=0;n<o.length;n++)!o[n].checked||0==e&&"3"!=o[n].attributes.file.value||t++;return t}function getFileCount(){return document.getElementsByName("fc").length}function p13downloadfile(e,t,o){xxdialogMode||downloadFile||!files||(downloadFile={path:decodeURIComponent(e),file:decodeURIComponent(t),size:o,tsize:0,data:"",state:0,id:Math.random()},files.sendText({action:"download",sub:"start",id:downloadFile.id,path:downloadFile.path}),setDialogMode(2,"Download File",10,p13downloadFileCancel,"<div>"+downloadFile.file+"</div><br /><progress id=d2progressBar style=width:100% value=0 max="+o+" />"))}function p13downloadFileCancel(){setDialogMode(0),files.sendText({action:"download",sub:"cancel",id:downloadFile.id}),downloadFile=null}function p13gotDownloadCommand(e){null!=downloadFile&&e.id==downloadFile.id&&("start"==e.sub?(downloadFile.state=1,files.sendText({action:"download",sub:"startack",id:downloadFile.id})):"cancel"==e.sub&&(downloadFile=null,setDialogMode(0)))}function p13gotDownloadBinaryData(e){downloadFile&&0!=downloadFile.state&&(4<e.length&&(downloadFile.tsize+=e.length-4,downloadFile.data+=e.substring(4),Q("d2progressBar").value=downloadFile.tsize),0!=(1&ReadInt(e,0))?(saveAs(data2blob(downloadFile.data),downloadFile.file),downloadFile=null,setDialogMode(0)):files.sendText({action:"download",sub:"ack",id:downloadFile.id}))}function p13doUploadFiles(e){xxdialogMode||((uploadFile={}).xpath=p13filetreelocation.join("/"),uploadFile.xfiles=e,uploadFile.xfilePtr=-1,setDialogMode(2,"Upload File",10,p13uploadFileCancel,"<div id=p13dfileName>Connecting...</div><br /><progress id=d2progressBar style=width:100% value=0 max=0 />"),p13uploadReconnect())}function onFileUploadStateChange(e,t){switch(t){case 0:p13folderup(9999);break;case 3:p13uploadNextFile();break;default:console.log("Unknown onFileUploadStateChange state",t)}}function p13uploadReconnect(){uploadFile.ws=CreateAgentRedirect(meshserver,CreateRemoteFiles(p13gotUploadData),serverPublicNamePort,authCookie,authRelayCookie,domainUrl),uploadFile.ws.attemptWebRTC=!1,uploadFile.ws.ctrlMsgAllowed=!1,uploadFile.ws.onStateChanged=onFileUploadStateChange,uploadFile.ws.Start(filesNode._id)}function p13uploadNextFile(){if(uploadFile.xfilePtr++,uploadFile.xfiles.length>uploadFile.xfilePtr){uploadFile.xptr=0;var e=uploadFile.xfiles[uploadFile.xfilePtr];QH("p13dfileName",e.name),Q("d2progressBar").max=e.size,Q("d2progressBar").value=0,uploadFile.xreader=new FileReader,uploadFile.xreader.onload=function(){uploadFile.xdata=uploadFile.xreader.result,uploadFile.ws.sendText({action:"upload",reqid:uploadFile.xfilePtr,path:uploadFile.xpath,name:e.name,size:uploadFile.xdata.byteLength})},uploadFile.xreader.readAsArrayBuffer(e)}else p13uploadFileCancel()}function p13uploadFileCancel(e,t){null!=uploadFile&&(null!=uploadFile.ws&&(uploadFile.ws.Stop(),uploadFile.ws=null),uploadFile=null),setDialogMode(0)}function p13gotUploadData(e){var t=JSON.parse(e);if(null!=uploadFile&&parseInt(uploadFile.xfilePtr)==parseInt(t.reqid))if("uploadstart"==t.action){p13uploadNextPart(!1);for(var o=0;o<8;o++)p13uploadNextPart(!0)}else"uploadack"==t.action?p13uploadNextPart(!1):"uploaderror"==t.action&&p13uploadFileCancel()}function p13uploadNextPart(e){var t=uploadFile.xdata,o=uploadFile.xptr,n=uploadFile.xptr+4096;if(n>t.byteLength){if(1==e)return;n=t.byteLength}if(o==t.byteLength)null!=uploadFile.ws&&(uploadFile.ws.Stop(),uploadFile.ws=null),uploadFile.xfiles.length>uploadFile.xfilePtr+1?p13uploadReconnect():p13uploadFileCancel();else{var i=t.slice(o,n);uploadFile.ws.send(i),uploadFile.xptr=n,Q("d2progressBar").value=n}}function p20updateMesh(){if(null!=currentMesh){QH("p20meshName",EscapeHtml(currentMesh.name));var e=format("Unknown #{0}",currentMesh.mtype),t=currentMesh.links[userinfo._id].rights;1==currentMesh.mtype&&(e="Intel&reg; AMT only, no agent"),2==currentMesh.mtype&&(e="Managed using a software agent");var o="";o+=addHtmlValue("Name",addLinkConditional(EscapeHtml(currentMesh.name),"p20editmesh(1)",0!=(1&t))),o+=addHtmlValue("Description",addLinkConditional(currentMesh.desc&&""!=currentMesh.desc?EscapeHtml(currentMesh.desc):"<i>None</i>","p20editmesh(2)",0!=(1&t))),o+=addHtmlValue("Type",e),o+="<br style=clear:both><br>";var n=currentMesh.links[userinfo._id];n&&0!=(2&n.rights)&&(o+="<div style=margin-bottom:6px><a onclick=p20showAddMeshUserDialog() style=cursor:pointer><img src=images/icon-addnew.png border=0 height=12 width=12> Add User</a></div>"),o+='<table style="color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse" border=0 cellpadding=2 cellspacing=0 width=100%><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:left;width:430px>User Authorizations</th></tr>';var i=1,a=[];for(var s in currentMesh.links)a.push({id:s,name:s.split("/")[2],rights:currentMesh.links[s].rights});for(var s in a.sort(function(e,t){return e.name>t.name?1:e.name<t.name?-1:0}),a){var l="",r="Partial Rights",d=a[s].rights;4294967295==d?r="Full Administrator":0==d&&(r="No Rights"),s==userinfo._id||4294967295!=t&&0==(2&t)||(l='<a onclick=p20deleteUser(event,"'+encodeURIComponent(a[s].id)+'") style=cursor:pointer><img src=images/trash.png border=0 height=10 width=10></a>'),o+='<tr onclick=p20viewuser("'+encodeURIComponent(a[s].id)+'") style=height:32px;cursor:pointer'+(i%2==0?";background-color:#DDD":"")+"><td>",o+="<div style=float:right>"+l+"</div><div style=float:right;padding-right:4px>"+r+"</div><div class=m2></div><div>&nbsp;"+EscapeHtml(decodeURIComponent(a[s].name))+"<div></div></div>",o+="</td></tr>",++i}o+="</tbody></table>",4294967295==t&&(o+="<div style=font-size:small;text-align:right;margin-top:6px><span><a onclick=p20showDeleteMeshDialog() style=cursor:pointer>Delete Group</a></span></div>"),QH("p20info",o)}}function p20showDeleteMeshDialog(){if(xxdialogMode)return!1;var e=format("Are you sure you want to delete group {0}? Deleting the device group will also delete all information about devices within this group.",EscapeHtml(currentMesh.name))+"<br /><br />";return setDialogMode(2,"Delete Group",3,p20showDeleteMeshDialogEx,e+="<label><input id=p20check type=checkbox onchange=p20validateDeleteMeshDialog() />Confirm</label>"),p20validateDeleteMeshDialog(),!1}function p20validateDeleteMeshDialog(){QE("idx_dlgOkButton",Q("p20check").checked)}function p20showDeleteMeshDialogEx(e,t){meshserver.send({action:"deletemesh",meshid:currentMesh._id,meshname:currentMesh.name})}function p20editmesh(e){if(!xxdialogMode){var t=addHtmlValue("Name","<input id=dp20meshname style=width:170px maxlength=32 onchange=p20editmeshValidate() onkeyup=p20editmeshValidate() />");setDialogMode(2,"Edit Device Group",3,p20editmeshEx,t+=addHtmlValue("Description","<input id=dp20meshdesc style=width:170px maxlength=1024 onkeyup=p20editmeshValidate() />")),Q("dp20meshname").value=currentMesh.name,currentMesh.desc&&(Q("dp20meshdesc").value=currentMesh.desc),p20editmeshValidate(),2==e?Q("dp20meshdesc").focus():Q("dp20meshname").focus()}}function p20editmeshEx(){meshserver.send({action:"editmesh",meshid:currentMesh._id,meshname:Q("dp20meshname").value,desc:Q("dp20meshdesc").value})}function p20editmeshValidate(){QE("idx_dlgOkButton",0<Q("dp20meshname").value.length)}function p20showAddMeshUserDialog(){if(!xxdialogMode){var e=addHtmlValue("User","<input id=dp20username style=width:170px maxlength=32 onchange=p20validateAddMeshUserDialog() onkeyup=p20validateAddMeshUserDialog() />");e+='<div style="border:2px groove gray;background-color:white;max-height:120px;overflow-y:scroll">',e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20fulladmin>Full Administrator</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20editmesh>Edit Device Group</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20manageusers>Manage Device Group Users</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20managecomputers>Manage Device Group Computers</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20remotecontrol>Remote Control</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20remoteview style=margin-left:12px>Remote View Only</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20remotelimitedinput style=margin-left:12px>Limited Input Only</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20noterminal style=margin-left:12px>No Terminal Access</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20nofiles style=margin-left:12px>No File Access</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20noamt style=margin-left:12px>No Intel&reg; AMT</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20meshagentconsole>Mesh Agent Console</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20meshserverfiles>Server Files</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20wakedevices>Wake Devices</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20editnotes>Edit Device Notes</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20limitevents>Show Only Own Events</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20chatnotify>Chat & Notify</label><br>",setDialogMode(2,"Add User to Mesh",3,p20showAddMeshUserDialogEx,e+="</div>"),p20validateAddMeshUserDialog(),Q("dp20username").focus()}}function p20validateAddMeshUserDialog(){var e=currentMesh.links[userinfo._id].rights;QE("idx_dlgOkButton",0<Q("dp20username").value.length),QE("p20fulladmin",4294967295==e),QE("p20editmesh",!Q("p20fulladmin").checked&&4294967295==e),QE("p20manageusers",!Q("p20fulladmin").checked),QE("p20managecomputers",!Q("p20fulladmin").checked),QE("p20remotecontrol",!Q("p20fulladmin").checked),QE("p20meshagentconsole",!Q("p20fulladmin").checked),QE("p20meshserverfiles",!Q("p20fulladmin").checked),QE("p20wakedevices",!Q("p20fulladmin").checked),QE("p20editnotes",!Q("p20fulladmin").checked),QE("p20remoteview",!Q("p20fulladmin").checked&&Q("p20remotecontrol").checked),QE("p20noterminal",!Q("p20fulladmin").checked&&Q("p20remotecontrol").checked),QE("p20nofiles",!Q("p20fulladmin").checked&&Q("p20remotecontrol").checked),QE("p20noamt",!Q("p20fulladmin").checked&&Q("p20remotecontrol").checked)}function p20showAddMeshUserDialogEx(){var e=0;1==Q("p20fulladmin").checked?e=4294967295:(1==Q("p20editmesh").checked&&(e+=1),1==Q("p20manageusers").checked&&(e+=2),1==Q("p20managecomputers").checked&&(e+=4),1==Q("p20remotecontrol").checked&&(e+=8),1==Q("p20meshagentconsole").checked&&(e+=16),1==Q("p20meshserverfiles").checked&&(e+=32),1==Q("p20wakedevices").checked&&(e+=64),1==Q("p20editnotes").checked&&(e+=128),1==Q("p20remoteview").checked&&(e+=256),1==Q("p20noterminal").checked&&(e+=512),1==Q("p20nofiles").checked&&(e+=1024),1==Q("p20noamt").checked&&(e+=2048)),meshserver.send({action:"addmeshuser",meshid:currentMesh._id,meshname:currentMesh.name,username:Q("dp20username").value,meshadmin:e})}function p20viewuser(e){if(!xxdialogMode){e=decodeURIComponent(e);var t=[],o=currentMesh.links[userinfo._id].rights,n=currentMesh.links[e].rights;4294967295==n?t.push("Full Administrator"):(0!=(1&n)&&t.push("Edit Device Group"),0!=(2&n)&&t.push("Manage Device Group Users"),0!=(4&n)&&t.push("Manage Device Group Computers"),0!=(8&n)&&t.push("Remote Control"),0!=(16&n)&&t.push("Agent Console"),0!=(32&n)&&t.push("Server Files"),0!=(64&n)&&t.push("Wake Devices"),0!=(128&n)&&t.push("Edit Notes"),0!=(256&n)&&t.push("Remote View Only"),0!=(512&n)&&t.push("No Terminal"),0!=(1024&n)&&t.push("No Files"),0!=(2048&n)&&t.push("No Intel&reg; AMT"),0!=(8&n)&&0!=(4096&n)&&0==(256&n)&&t.push("Limited Input"),0!=(8192&n)&&t.push("Self Events Only"),0!=(16384&n)&&t.push("Chat & Notify")),0==t.length&&t.push("No Rights");var i=1,a=addHtmlValue("User",EscapeHtml(decodeURIComponent(e.split("/")[2])));a+=addHtmlValue("Permissions",t.join(", ")),userinfo._id!=e&&(4294967295==o||0!=(2&o)&&4294967295!=n)&&(i+=4),setDialogMode(2,"Device Group User",i,p20viewuserEx,a,e)}}function p20viewuserEx(e,t){2==e&&setDialogMode(2,"Remote Mesh User",3,p20viewuserEx2,format("Confirm removal of user {0}?",t.split("/")[2]),t)}function p20deleteUser(e,t){haltEvent(e),p20viewuserEx(2,decodeURIComponent(t))}function p20viewuserEx2(e,t){meshserver.send({action:"removemeshuser",meshid:currentMesh._id,meshname:currentMesh.name,userid:t})}var xxdialogMode,xxdialogFunc,xxdialogButtons,xxdialogTag,xxcurrentView=-1;function go(e){if(setSessionActivity(),!xxdialogMode&&xxcurrentView!=e){updateFooterMenu(),setDialogMode(0);for(var t=0;t<32;t++)QV("p"+t,t==e);xxcurrentView=e}}function setDialogMode(e,t,o,n,i,a){setSessionActivity(),xxdialogMode=e,xxdialogFunc=n,xxdialogButtons=o,xxdialogTag=a,QE("idx_dlgOkButton",!0),QV("idx_dlgOkButton",1&o),QV("idx_dlgCancelButton",2&o),QV("id_dialogclose",2&o||8&o),QV("idx_dlgButtonBar",7&o),t&&QH("id_dialogtitle",t);for(var s=1;s<24;s++)QV("dialog"+s,s==e);QV("dialog",e),i&&(2==e?QH("id_dialogOptions",i):QH("id_dialogMessage",i))}function dialogclose(e){setSessionActivity();var t=xxdialogFunc,o=xxdialogButtons,n=xxdialogTag;setDialogMode(),(8&o||e)&&t&&t(e,n)}function putstore(e,t){try{if("undefined"==typeof localStorage||localStorage.getItem(e)==t)return;null==t?localStorage.removeItem(e):localStorage.setItem(e,t)}catch(e){}if("_"!=e[0]){for(var o={},n=0,i=localStorage.length;n<i;++n){var a=localStorage.key(n);"_"!=a[0]&&(o[a]=localStorage.getItem(a))}meshserver.send({action:"userWebState",state:JSON.stringify(o)})}}function getstore(e,t){try{if("undefined"==typeof localStorage)return t;var o=localStorage.getItem(e);return null==o||null==o?t:o}catch(e){return t}}function center(){QS("dialog").left=(getDocWidth()-300)/2+"px",deskAdjust(),deskAdjust()}function messagebox(e,t){QH("id_dialogMessage",t),setDialogMode(1,e,1)}function statusbox(e,t){QH("id_dialogMessage",t),setDialogMode(1,e)}function getDocWidth(){return window.innerWidth?window.innerWidth:document.documentElement&&document.documentElement.clientWidth&&0!=document.documentElement.clientWidth?document.documentElement.clientWidth:document.getElementsByTagName("body")[0].clientWidth}function haltEvent(e){return e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1}function haltReturn(e){13==e.keyCode&&haltEvent(e)}function validateEmail(e){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function reload(){window.location.href=window.location.href}function getNodeFromId(e){for(var t in nodes)if(nodes[t]._id==e)return nodes[t];return null}function addHtmlValue(e,t){return"<table><td style=width:120px>"+e+"<td><b>"+t+"</b></table>"}function addHtmlValue2(e,t){return"<div><div style=display:inline-block;float:right>"+t+"</div><div style=display:inline-block>"+e+"</div></div>"}function addLink(e,t){return"<a style=cursor:pointer;color:darkblue;text-decoration:none onclick='"+t+"'>&diams; "+e+"</a>"}function addLinkConditional(e,t,o){return o?addLink(e,t):e}function passwordcheck(e){return/(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%^&*()]).{8,}/.test(e)}function getFileSizeStr(e){return 1==e?"1 byte":format("{0} bytes",e)}function joinPaths(){var e=[];for(var t in arguments){var o=arguments[t];if(null!=o&&""!=o){for(;o.endsWith("/")||o.endsWith("\\");)o=o.substring(0,o.length-1);for(;o.startsWith("/")||o.startsWith("\\");)o=o.substring(1);e.push(o)}}return e.join("/")}function focusTextBox(e){setTimeout(function(){Q(e).selectionStart=Q(e).selectionEnd=65535,Q(e).focus()},0)}isFilenameValid=function(){var t=/^[^\\/:\*\?"<>\|]+$/,o=/^\./,n=/^(nul|prn|con|lpt[0-9]|com[0-9])(\.|$)/i;return function(e){return t.test(e)&&!o.test(e)&&!n.test(e)&&"."!=e[0]}}();function parseUriArgs(){var e,t={},o=window.document.location.href.split(/[\?&|\=]/);for(n in o.splice(0,1),o)switch(n%2){case 0:e=decodeURIComponent(o[n]);break;case 1:t[e]=decodeURIComponent(o[n]);var n=parseInt(t[e]);n==t[e]&&(t[e]=n)}return t}function printDate(e){return e.toLocaleDateString(args.locale)}function printTime(e){return e.toLocaleTimeString(args.locale)}function printDateTime(e){return e.toLocaleString(args.locale)}function format(e){var o=Array.prototype.slice.call(arguments,1);return e.replace(/{(\d+)}/g,function(e,t){return void 0!==o[t]?o[t]:e})}function nobreak(e){return e.split(" ").join("&nbsp;")}</script>
\ No newline at end of file
views/login-min.handlebars
+1 -1
@@ -1 +1 @@
1 -<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link rel="shortcut icon"type=image/x-icon href={{{domainurl}}}favicon.ico><link keeplink=1 type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><script keeplink=1 src=scripts/u2f-api.js></script><title>{{{title}}} - Login</title><body id=body onload='"undefined"!=typeof startup&&startup()'class="arg_hide login"><div id=container><div id=masthead><div class=title>{{{title}}}</div><div class=title2>{{{title2}}}</div></div><div id=topbar class="noselect style3"style=height:24px><div id=uiMenuButton title="User interface selection"onclick=showUserInterfaceSelectMenu()>&diams;<div id=uiMenu style=display:none><div id=uiViewButton1 class=uiSelector onclick=userInterfaceSelectMenu(1) title="Left bar interface"><div class=uiSelector1></div></div><div id=uiViewButton2 class=uiSelector onclick=userInterfaceSelectMenu(2) title="Top bar interface"><div class=uiSelector2></div></div><div id=uiViewButton3 class=uiSelector onclick=userInterfaceSelectMenu(3) title="Fixed width interface"><div class=uiSelector3></div></div><div id=uiViewButton4 class=uiSelector onclick=toggleNightMode() title="Toggle night mode"><div class=uiSelector4></div></div></div></div></div><div id=column_l><h1>Welcome</h1><div id=welcomeText style=display:none>Connect to your home or office devices from anywhere in the world using<a href=http://www.meshcommander.com/meshcentral2>MeshCentral</a>, the real time, open source remote monitoring and management web site. You will need to download and install a management agent on your computers. Once installed, computers will show up in the &quot;My Devices&quot; section of this web site and you will be able to monitor them and take control of them.</div><table id=centralTable><tr><td id=welcomeimage><picture><img alt=""src=welcome.jpg style=border-radius:20px></picture><td id=logincell><div id=loginpanel style=display:none><form method=post><input type=hidden name=action value=login><div id=message1>{{{message}}}</div><div><b>Log In</b></div><table><tr><td id=loginusername align=right width=100>Username:<td><input id=username maxlength=64 name=username onchange=validateLogin(1) onkeyup=validateLogin(1,event)><tr><td align=right>Password:<td><input id=password type=password maxlength=256 name=password autocomplete=off onchange=validateLogin(2) onkeyup=validateLogin(2,event)><tr><td><div id=showPassHintLink style=display:none><a onclick="return showPassHint(event)"href=# style=cursor:pointer>Show Hint</a></div><td align=right><input id=loginButton type=submit value="Log In"disabled></table><div id=hrAccountDiv style=display:none><hr></div><div id=resetAccountDiv style=display:none;padding:2px><span id=resetAccountSpan>Forgot username/password?</span><a onclick="return xgo(3,event)"href=# style=cursor:pointer>Reset account</a>.</div><div id=newAccountDiv style=display:none;padding:2px>Don&#39;t have an account?<a onclick="return xgo(2,event)"href=# style=cursor:pointer>Create one</a>.</div><input id=loginformargs name=urlargs type=hidden></form></div><div id=createpanel style=display:none;position:relative><form method=post><input type=hidden name=action value=createaccount><div id=message2>{{{message}}}</div><div><b>Account Creation</b></div><div id=passwordPolicyCallout style=display:none></div><table><tr id=nuUserRow><td id=nuUser align=right width=100>Username:<td><input id=ausername name=username onchange=validateCreate(1) maxlength=64 onkeydown=haltReturn(event) onkeyup=validateCreate(1,event)><tr><td id=nuEmail align=right width=100>Email:<td><input id=aemail name=email onchange=validateCreate(2) maxlength=256 onkeydown=haltReturn(event) onkeyup=validateCreate(2,event)><tr><td id=nuPass1 align=right>Password:<td><input id=apassword1 type=password name=password1 autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validateCreate(3,event) onkeyup=validateCreate(3,event)><tr><td id=nuPass2 align=right>Password:<td><input id=apassword2 type=password name=password2 autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validateCreate(4,event) onkeyup=validateCreate(4,event)><tr id=createPanelHint style=display:none><td id=nuHint align=right>Password Hint:<td><input id=apasswordhint name=apasswordhint autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validateCreate(5,event) onkeyup=validateCreate(5,event)><tr id=newAccountPass title="Enter the account creation token"><td id=nuToken align=right>Creation Token:<td><input id=anewaccountpass type=password name=anewaccountpass autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validateCreate(6,event) onkeyup=validateCreate(6,event)><tr><td colspan=2><div style=float:right><input id=createButton type=submit value="Create Account"disabled></div><div id=passWarning style=padding-top:6px></div></table><hr><a onclick="return xgo(1,event)"href=# style=cursor:pointer>Back to login</a><input id=createformargs name=urlargs type=hidden></form></div><div id=resetpanel style=display:none><form method=post><input type=hidden name=action value=resetaccount><div id=message3>{{{message}}}</div><div><b>Account Reset</b></div><table><tr><td align=right width=100>Email:<td><input id=remail name=email maxlength=256 onchange=validateReset() onkeyup=validateReset(event)><tr><td colspan=2><div style=float:right><input id=eresetButton type=submit value="Reset Account"disabled></div><div id=passWarning style=padding-top:6px></div></table><hr><a onclick="return xgo(1,event)"href=# style=cursor:pointer>Back to login</a><input id=resetformargs name=urlargs type=hidden></form></div><div id=tokenpanel style=display:none><form method=post autocomplete=off><input type=hidden name=action value=tokenlogin> <input type=hidden name=hwstate value={{{hwstate}}}><div id=message4>{{{message}}}</div><table><tr><td align=right width=100>Login token:<td><input id=tokenInput name=token maxlength=50 onchange=checkToken(event) onpaste=resetCheckToken(event) onkeyup=checkToken(event) onkeydown=checkToken(event)> <input id=hwtokenInput name=hwtoken style=display:none><tr><td colspan=2><div style=float:right><input id=tokenOkButton type=submit value=Login disabled></div></table><hr><a onclick="return xgo(1,event)"href=# style=cursor:pointer>Back to login</a><input id=tokenformargs name=urlargs type=hidden></form></div><div id=resettokenpanel style=display:none><form method=post><input type=hidden name=action value=resetaccount><div id=message5>{{{message}}}</div><table><tr><td align=right width=100>Login token:<td><input id=resetTokenInput name=token maxlength=50 onchange=resetCheckToken(event) onkeyup=resetCheckToken(event) onkeydown=resetCheckToken(event)> <input id=resetHwtokenInput name=hwtoken style=display:none><tr><td colspan=2><div style=float:right><input id=resetTokenOkButton type=submit value=Login disabled></div></table><hr><a onclick="return xgo(1,event)"href=# style=cursor:pointer>Back to login</a><input id=resettokenformargs name=urlargs type=hidden></form></div><div id=resetpasswordpanel style=display:none;position:relative><form method=post><input type=hidden name=action value=resetpassword><div id=message6>{{{message}}}</div><div id=rpasswordPolicyCallout style=display:none></div><table><tr><td id=rnuPass1 width=100 align=right>Password:<td><input id=rapassword1 type=password name=rpassword1 autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validatePassReset(3,event) onkeyup=validatePassReset(3,event)><tr><td id=rnuPass2 align=right>Password:<td><input id=rapassword2 type=password name=rpassword2 autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validatePassReset(4,event) onkeyup=validatePassReset(4,event)><tr id=resetpasswordpanelHint style=display:none><td id=rnuHint align=right>Password Hint:<td><input id=rapasswordhint name=rpasswordhint autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validatePassReset(5,event) onkeyup=validatePassReset(5,event)><tr><td colspan=2><div style=float:right><input id=resetPassButton type=submit value="Reset Password"disabled></div><div id=rpassWarning style=padding-top:6px></div></table><hr><a onclick="return xgo(1,event)"href=# style=cursor:pointer>Back to login</a><input id=resetpasswordformargs name=urlargs type=hidden></form></div></table><br></div><div id=footer><div class=footer1>{{{footer}}}</div><div class=footer2>{{{rootCertLink}}} &nbsp;<a href=terms>Terms &amp; Privacy</a></div></div></div><div id=dialog style=display:none><div id=dialogHeader><div id=id_dialogclose style=float:right;padding:5px;cursor:pointer onclick=setDialogMode()><b>X</b></div><div id=id_dialogtitle style=padding:5px></div><div style=width:100%;margin:6px></div></div><div id=dialogBody><div id=dialog1><div id=id_dialogMessage></div></div><div id=dialog2><div id=id_dialogOptions></div></div></div><div id=idx_dlgButtonBar><input id=idx_dlgCancelButton type=button value=Cancel onclick=dialogclose(0)> <input id=idx_dlgOkButton type=button value=OK onclick=dialogclose(1)></div></div><script>"use strict";var xxdialogMode,xxdialogFunc,xxdialogButtons,xxdialogTag,passhint="{{{passhint}}}",newAccountPass=parseInt("{{{newAccountPass}}}"),emailCheck=!1,passRequirements="{{{passRequirements}}}",hardwareKeyChallenge=decodeURIComponent("{{{hkey}}}"),passRequirementsEx=null!=(passRequirements=""!=passRequirements?JSON.parse(decodeURIComponent(passRequirements)):{}).min||null!=passRequirements.max||null!=passRequirements.upper||null!=passRequirements.lower||null!=passRequirements.numeric||null!=passRequirements.nonalpha,features=parseInt("{{{features}}}"),welcomeText=decodeURIComponent("{{{welcometext}}}"),currentpanel=0,uiMode=parseInt(getstore("uiMode","1")),webPageFullScreen=!0,nightMode="1"==getstore("_nightMode","0"),publicKeyCredentialRequestOptions=null;if(0<window.location.href.indexOf("?")){var urlargs=window.location.href.substring(window.location.href.indexOf("?"));Q("loginformargs").value=urlargs,Q("createformargs").value=urlargs,Q("resetformargs").value=urlargs,Q("tokenformargs").value=urlargs,Q("resettokenformargs").value=urlargs,Q("resetpasswordformargs").value=urlargs}function startup(){if(0==(32&features)){var e=null;try{e=top.location.toString().toLowerCase()}catch(e){}if(top!=self&&(null==e||0==top.active))return void(top.location=self.location)}2097152&features&&(QH("loginusername","Email:"),QH("resetAccountSpan","Forgot password?"),QV("nuUserRow",!1)),nightMode&&QC("body").add("night"),QV("createPanelHint",!0===passRequirements.hint),QV("resetpasswordpanelHint",!0===passRequirements.hint),welcomeText&&QH("welcomeText",welcomeText),QV("welcomeText",!0),(window.onresize=center)(),validateLogin(),validateCreate(),go(parseInt("{{loginmode}}")),QV("newAccountDiv",!1),null!=passhint&&0<passhint.length&&QV("showPassHintLink",!0),QV("newAccountPass",1==newAccountPass),QV("resetAccountDiv",1==emailCheck),QV("hrAccountDiv",1==emailCheck||1==newAccountPass),userInterfaceSelectMenu()}function showPassHint(e){return messagebox("Password Hint",passhint),haltEvent(e),!1}function xgo(e,n){return QV("message1",!1),QV("message2",!1),QV("message3",!1),QV("message4",!1),QV("message5",!1),QV("message6",!1),go(e),haltEvent(n),!1}function go(e){currentpanel=e,setDialogMode(0),QV("showPassHintLink",!1),QV("loginpanel",1==e),QV("createpanel",2==e),QV("resetpanel",3==e),QV("tokenpanel",4==e),QV("resettokenpanel",5==e),QV("resetpasswordpanel",6==e),1==e&&Q("username").focus(),2==e&&(2097152&features?Q("aemail").focus():Q("ausername").focus()),3==e&&Q("remail").focus(),4==e&&Q("tokenInput").focus(),5==e&&Q("resetTokenInput").focus(),6==e&&Q("rapassword1").focus()}function validateLogin(e,n){var s=0<Q("username").value.length&&-1==Q("username").value.indexOf(" ")&&0<Q("password").value.length;QE("loginButton",s),setDialogMode(0),null!=n&&13==n.keyCode&&(1==e&&""!=Q("username").value?Q("password").focus():2==e&&""!=Q("password").value&&Q("loginButton").click()),null!=n&&haltEvent(n)}function validateCreate(e,n){setDialogMode(0);var s=!1;s=!!(2097152&features)||0<Q("ausername").value.length&&-1==Q("ausername").value.indexOf(" ")&&-1==Q("ausername").value.indexOf('"')&&-1==Q("ausername").value.indexOf(",");var a=1==validateEmail(Q("aemail").value),t=0<Q("apassword1").value.length,o=0<Q("apassword2").value.length&&Q("apassword2").value==Q("apassword1").value,r=0==newAccountPass||0<Q("anewaccountpass").value.length,l=s&&a&&t&&o&&r;if(QS("nuUser").color=s?"black":"#7b241c",QS("nuEmail").color=a?"black":"#7b241c",QS("nuPass1").color=t?"black":"#7b241c",QS("nuPass2").color=o?"black":"#7b241c",QS("nuToken").color=r?"black":"#7b241c",""==Q("apassword1").value)QH("passWarning",""),QV("passwordPolicyCallout",!1);else if(passRequirementsEx){0==checkPasswordRequirements(Q("apassword1").value,passRequirements)?(l=!1,QS("nuPass1").color="#7b241c",QS("nuPass2").color="#7b241c",QH("passWarning","<div style=color:red;cursor:pointer onclick=showPasswordPolicy()><b>Password Policy</b><div>"),QV("passwordPolicyCallout",!0),QH("passwordPolicyCallout",passwordPolicyText(Q("apassword1").value))):(QH("passWarning",""),QV("passwordPolicyCallout",!1))}else{var u=checkPasswordStrength(Q("apassword1").value);80<=u?QH("passWarning","<span style=color:green><b>Strong Password</b><span>"):60<=u?QH("passWarning","<span style=color:blue><b>Good Password</b><span>"):QH("passWarning","<span style=color:red><b>Weak Password</b><span>")}null!=n&&13==n.keyCode&&(1==e&&s&&Q("aemail").focus(),2==e&&a&&Q("apassword1").focus(),3==e&&t&&Q("apassword2").focus(),4==e&&o&&(!0===passRequirements.hint?Q("apasswordhint").focus():e=5),5==e&&(1==newAccountPass?Q("anewaccountpass").focus():e=6),6==e&&Q("createButton").click()),null!=n&&haltEvent(n),QE("createButton",l)}function validatePassReset(e,n){setDialogMode(0);var s=0<Q("rapassword1").value.length,a=0<Q("rapassword2").value.length&&Q("rapassword2").value==Q("rapassword1").value,t=s&&a;if(QS("rnuPass1").color=s?"black":"#7b241c",QS("rnuPass2").color=a?"black":"#7b241c",""==Q("rapassword1").value)QH("rpassWarning",""),QV("rpasswordPolicyCallout",!1);else if(passRequirementsEx){0==checkPasswordRequirements(Q("rapassword1").value,passRequirements)?(t=!1,QS("rnuPass1").color="#7b241c",QS("rnuPass2").color="#7b241c",QH("rpassWarning","<div style=color:red;cursor:pointer onclick=showPasswordPolicy()><b>Password Policy</b><div>"),QV("rpasswordPolicyCallout",!0),QH("rpasswordPolicyCallout",passwordPolicyText(Q("rapassword1").value))):(QH("rpassWarning",""),QV("rpasswordPolicyCallout",!1))}else{var o=checkPasswordStrength(Q("rapassword1").value);80<=o?QH("rpassWarning","<span style=color:green><b>Strong Password</b><span>"):60<=o?QH("rpassWarning","<span style=color:blue><b>Good Password</b><span>"):QH("rpassWarning","<span style=color:red><b>Weak Password</b><span>")}null!=n&&13==n.keyCode&&(2==e&&Q("rapassword1").focus(),3==e&&Q("rapassword2").focus(),4==e&&Q("rapasswordhint").focus(),6==e&&Q("resetPassButton").click()),null!=n&&haltEvent(n),QE("resetPassButton",t)}function passwordPolicyText(e){var n="<div style=text-align:left>",s=strCount(e);return passRequirements.min&&(null==e||e.length<passRequirements.min)&&(n+=format("Minimum length of {0}",passRequirements.min)+"<br />"),passRequirements.max&&(null==e||e.length>passRequirements.max)&&(n+=format("Maximum length of {0}",passRequirements.max)+"<br />"),passRequirements.upper&&(null==e||s.upper<passRequirements.upper)&&(n+=format("{0} upper case",passRequirements.upper)+"<br />"),passRequirements.lower&&(null==e||s.lower<passRequirements.lower)&&(n+=format("{0} lower case",passRequirements.lower)+"<br />"),passRequirements.numeric&&(null==e||s.numeric<passRequirements.numeric)&&(n+=format("{0} numeric",passRequirements.numeric)+"<br />"),passRequirements.nonalpha&&(null==e||s.nonalpha<passRequirements.nonalpha)&&(n+=format("{0} non-alphanumeric",passRequirements.nonalpha)+"<br />"),n+="</div>"}function showPasswordPolicy(){messagebox("Password Policy",passwordPolicyText())}function validateReset(e){setDialogMode(0);var n=validateEmail(Q("remail").value);QE("eresetButton",n),null!=e&&13==e.keyCode&&1==n&&Q("eresetButton").click(),null!=e&&haltEvent(e)}function checkPasswordStrength(e){var n=0,s={},a=0,t={digits:/\d/.test(e),lower:/[a-z]/.test(e),upper:/[A-Z]/.test(e),nonWords:/\W/.test(e)};if(!e)return 0;for(var o=0;o<e.length;o++)s[e[o]]=(s[e[o]]||0)+1,n+=5/s[e[o]];for(var r in t)a+=1==t[r]?1:0;return parseInt(n+10*(a-1))}function checkPasswordRequirements(e,n){if(null==n||""==n||"object"!=typeof n)return!0;if(n.min&&e.length<n.min)return!1;if(n.max&&e.length>n.max)return!1;var s=strCount(e);return!(n.numeric&&s.numeric<n.numeric)&&(!(n.lower&&s.lower<n.lower)&&(!(n.upper&&s.upper<n.upper)&&!(n.nonalpha&&s.nonalpha<n.nonalpha)))}function strCount(e){var n={numeric:0,lower:0,upper:0,nonalpha:0};if("string"!=typeof e)return n;for(var s=0;s<e.length;s++)/\d/.test(e[s])&&n.numeric++,/[a-z]/.test(e[s])&&n.lower++,/[A-Z]/.test(e[s])&&n.upper++,/\W/.test(e[s])&&n.nonalpha++;return n}function checkToken(){var e=Q("tokenInput").value,n=e.split(" ").join("");e!=n&&(Q("tokenInput").value=n),QE("tokenOkButton",6==Q("tokenInput").value.length||8==Q("tokenInput").value.length||44==Q("tokenInput").value.length)}function resetCheckToken(){var e=Q("resetTokenInput").value,n=e.split(" ").join("");e!=n&&(Q("resetTokenInput").value=n),QE("resetTokenOkButton",6==Q("resetTokenInput").value.length||8==Q("resetTokenInput").value.length||44==Q("resetTokenInput").value.length)}var xxcurrentView=0;function setDialogMode(e,n,s,a,t,o){xxdialogMode=e,xxdialogFunc=a,xxdialogButtons=s,xxdialogTag=o,QE("idx_dlgOkButton",!0),QV("idx_dlgOkButton",1&s),QV("idx_dlgCancelButton",2&s),QV("id_dialogclose",2&s||8&s),QV("idx_dlgButtonBar",7&s),n&&QH("id_dialogtitle",n);for(var r=1;r<24;r++)QV("dialog"+r,r==e);QV("dialog",e),t&&(2==e?QH("id_dialogOptions",t):QH("id_dialogMessage",t))}function dialogclose(e){var n=xxdialogFunc,s=xxdialogButtons,a=xxdialogTag;setDialogMode(),(8&s||e)&&n&&n(e,a)}function toggleFullScreen(e){0==webPageFullScreen?QC("body").remove("fullscreen"):QC("body").add("fullscreen"),QV("body",!0),center()}function showUserInterfaceSelectMenu(){Q("uiViewButton1").classList.remove("uiSelectorSel"),Q("uiViewButton2").classList.remove("uiSelectorSel"),Q("uiViewButton3").classList.remove("uiSelectorSel");try{Q("uiViewButton"+uiMode).classList.add("uiSelectorSel")}catch(e){}QV("uiMenu","none"==QS("uiMenu").display),nightMode&&Q("uiViewButton4").classList.add("uiSelectorSel")}function userInterfaceSelectMenu(e){e&&putstore("uiMode",uiMode=e),webPageFullScreen=uiMode<3,toggleFullScreen(0)}function toggleNightMode(){(nightMode=!nightMode)?QC("body").add("night"):QC("body").remove("night"),putstore("_nightMode",nightMode?"1":"0")}function center(){if(0==webPageFullScreen)QS("centralTable")["margin-top"]="";else{var e=Q("column_l").clientHeight/2-220;e<0&&(e=0),QS("centralTable")["margin-top"]=e+"px"}}function messagebox(e,n){QH("id_dialogMessage",n),setDialogMode(1,e,1)}function statusbox(e,n){QH("id_dialogMessage",n),setDialogMode(1,e)}function getDocWidth(){return window.innerWidth?window.innerWidth:document.documentElement&&document.documentElement.clientWidth&&0!=document.documentElement.clientWidth?document.documentElement.clientWidth:document.getElementsByTagName("body")[0].clientWidth}function haltEvent(e){return e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1}function haltReturn(e){13==e.keyCode&&haltEvent(e)}function validateEmail(e){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function putstore(e,n){try{if("undefined"==typeof localStorage)return;localStorage.setItem(e,n)}catch(e){}}function getstore(e,n){try{if("undefined"==typeof localStorage)return n;var s=localStorage.getItem(e);return null==s||null==s?n:s}catch(e){return n}}function format(e){var s=Array.prototype.slice.call(arguments,1);return e.replace(/{(\d+)}/g,function(e,n){return void 0!==s[n]?s[n]:e})}</script>
\ No newline at end of file
1 +<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link rel="shortcut icon"type=image/x-icon href={{{domainurl}}}favicon.ico><link keeplink=1 type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><script keeplink=1 src=scripts/u2f-api.js></script><title>{{{title}}} - Login</title><body id=body onload='"undefined"!=typeof startup&&startup()'class="arg_hide login"><div id=container><div id=masthead><div class=title>{{{title}}}</div><div class=title2>{{{title2}}}</div></div><div id=topbar class="noselect style3"style=height:24px><div id=uiMenuButton title="User interface selection"onclick=showUserInterfaceSelectMenu()>&diams;<div id=uiMenu style=display:none><div id=uiViewButton1 class=uiSelector onclick=userInterfaceSelectMenu(1) title="Left bar interface"><div class=uiSelector1></div></div><div id=uiViewButton2 class=uiSelector onclick=userInterfaceSelectMenu(2) title="Top bar interface"><div class=uiSelector2></div></div><div id=uiViewButton3 class=uiSelector onclick=userInterfaceSelectMenu(3) title="Fixed width interface"><div class=uiSelector3></div></div><div id=uiViewButton4 class=uiSelector onclick=toggleNightMode() title="Toggle night mode"><div class=uiSelector4></div></div></div></div></div><div id=column_l><h1>Welcome</h1><div id=welcomeText style=display:none>Connect to your home or office devices from anywhere in the world using <a href=http://www.meshcommander.com/meshcentral2>MeshCentral</a>, the real time, open source remote monitoring and management web site. You will need to download and install a management agent on your computers. Once installed, computers will show up in the &quot;My Devices&quot; section of this web site and you will be able to monitor them and take control of them.</div><table id=centralTable><tr><td id=welcomeimage><picture><img alt=""src=welcome.jpg style=border-radius:20px></picture><td id=logincell><div id=loginpanel style=display:none><form method=post><input type=hidden name=action value=login><div id=message1>{{{message}}}</div><div><b>Log In</b></div><table><tr><td id=loginusername align=right width=100>Username:<td><input id=username maxlength=64 name=username onchange=validateLogin(1) onkeyup=validateLogin(1,event)><tr><td align=right>Password:<td><input id=password type=password maxlength=256 name=password autocomplete=off onchange=validateLogin(2) onkeyup=validateLogin(2,event)><tr><td><div id=showPassHintLink style=display:none><a onclick="return showPassHint(event)"href=# style=cursor:pointer>Show Hint</a></div><td align=right><input id=loginButton type=submit value="Log In"disabled></table><div id=hrAccountDiv style=display:none><hr></div><div id=resetAccountDiv style=display:none;padding:2px><span id=resetAccountSpan>Forgot username/password?</span> <a onclick="return xgo(3,event)"href=# style=cursor:pointer>Reset account</a>.</div><div id=newAccountDiv style=display:none;padding:2px>Don&#39;t have an account? <a onclick="return xgo(2,event)"href=# style=cursor:pointer>Create one</a>.</div><input id=loginformargs name=urlargs type=hidden></form></div><div id=createpanel style=display:none;position:relative><form method=post><input type=hidden name=action value=createaccount><div id=message2>{{{message}}}</div><div><b>Account Creation</b></div><div id=passwordPolicyCallout style=display:none></div><table><tr id=nuUserRow><td id=nuUser align=right width=100>Username:<td><input id=ausername name=username onchange=validateCreate(1) maxlength=64 onkeydown=haltReturn(event) onkeyup=validateCreate(1,event)><tr><td id=nuEmail align=right width=100>Email:<td><input id=aemail name=email onchange=validateCreate(2) maxlength=256 onkeydown=haltReturn(event) onkeyup=validateCreate(2,event)><tr><td id=nuPass1 align=right>Password:<td><input id=apassword1 type=password name=password1 autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validateCreate(3,event) onkeyup=validateCreate(3,event)><tr><td id=nuPass2 align=right>Password:<td><input id=apassword2 type=password name=password2 autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validateCreate(4,event) onkeyup=validateCreate(4,event)><tr id=createPanelHint style=display:none><td id=nuHint align=right>Password Hint:<td><input id=apasswordhint name=apasswordhint autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validateCreate(5,event) onkeyup=validateCreate(5,event)><tr id=newAccountPass title="Enter the account creation token"><td id=nuToken align=right>Creation Token:<td><input id=anewaccountpass type=password name=anewaccountpass autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validateCreate(6,event) onkeyup=validateCreate(6,event)><tr><td colspan=2><div style=float:right><input id=createButton type=submit value="Create Account"disabled></div><div id=passWarning style=padding-top:6px></div></table><hr><a onclick="return xgo(1,event)"href=# style=cursor:pointer>Back to login</a> <input id=createformargs name=urlargs type=hidden></form></div><div id=resetpanel style=display:none><form method=post><input type=hidden name=action value=resetaccount><div id=message3>{{{message}}}</div><div><b>Account Reset</b></div><table><tr><td align=right width=100>Email:<td><input id=remail name=email maxlength=256 onchange=validateReset() onkeyup=validateReset(event)><tr><td colspan=2><div style=float:right><input id=eresetButton type=submit value="Reset Account"disabled></div><div id=passWarning style=padding-top:6px></div></table><hr><a onclick="return xgo(1,event)"href=# style=cursor:pointer>Back to login</a> <input id=resetformargs name=urlargs type=hidden></form></div><div id=tokenpanel style=display:none><form method=post autocomplete=off><input type=hidden name=action value=tokenlogin> <input type=hidden name=hwstate value={{{hwstate}}}><div id=message4>{{{message}}}</div><table><tr><td align=right width=100>Login token:<td><input id=tokenInput name=token maxlength=50 onchange=checkToken(event) onpaste=resetCheckToken(event) onkeyup=checkToken(event) onkeydown=checkToken(event)> <input id=hwtokenInput name=hwtoken style=display:none><tr><td colspan=2><div style=float:right><input id=tokenOkButton type=submit value=Login disabled></div></table><hr><a onclick="return xgo(1,event)"href=# style=cursor:pointer>Back to login</a> <input id=tokenformargs name=urlargs type=hidden></form></div><div id=resettokenpanel style=display:none><form method=post><input type=hidden name=action value=resetaccount><div id=message5>{{{message}}}</div><table><tr><td align=right width=100>Login token:<td><input id=resetTokenInput name=token maxlength=50 onchange=resetCheckToken(event) onkeyup=resetCheckToken(event) onkeydown=resetCheckToken(event)> <input id=resetHwtokenInput name=hwtoken style=display:none><tr><td colspan=2><div style=float:right><input id=resetTokenOkButton type=submit value=Login disabled></div></table><hr><a onclick="return xgo(1,event)"href=# style=cursor:pointer>Back to login</a> <input id=resettokenformargs name=urlargs type=hidden></form></div><div id=resetpasswordpanel style=display:none;position:relative><form method=post><input type=hidden name=action value=resetpassword><div id=message6>{{{message}}}</div><div id=rpasswordPolicyCallout style=display:none></div><table><tr><td id=rnuPass1 width=100 align=right>Password:<td><input id=rapassword1 type=password name=rpassword1 autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validatePassReset(3,event) onkeyup=validatePassReset(3,event)><tr><td id=rnuPass2 align=right>Password:<td><input id=rapassword2 type=password name=rpassword2 autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validatePassReset(4,event) onkeyup=validatePassReset(4,event)><tr id=resetpasswordpanelHint style=display:none><td id=rnuHint align=right>Password Hint:<td><input id=rapasswordhint name=rpasswordhint autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validatePassReset(5,event) onkeyup=validatePassReset(5,event)><tr><td colspan=2><div style=float:right><input id=resetPassButton type=submit value="Reset Password"disabled></div><div id=rpassWarning style=padding-top:6px></div></table><hr><a onclick="return xgo(1,event)"href=# style=cursor:pointer>Back to login</a> <input id=resetpasswordformargs name=urlargs type=hidden></form></div></table><br></div><div id=footer><div class=footer1>{{{footer}}}</div><div class=footer2>{{{rootCertLink}}} &nbsp;<a href=terms>Terms &amp; Privacy</a></div></div></div><div id=dialog style=display:none><div id=dialogHeader><div id=id_dialogclose style=float:right;padding:5px;cursor:pointer onclick=setDialogMode()><b>X</b></div><div id=id_dialogtitle style=padding:5px></div><div style=width:100%;margin:6px></div></div><div id=dialogBody><div id=dialog1><div id=id_dialogMessage></div></div><div id=dialog2><div id=id_dialogOptions></div></div></div><div id=idx_dlgButtonBar><input id=idx_dlgCancelButton type=button value=Cancel onclick=dialogclose(0)> <input id=idx_dlgOkButton type=button value=OK onclick=dialogclose(1)></div></div><script>"use strict";var xxdialogMode,xxdialogFunc,xxdialogButtons,xxdialogTag,passhint="{{{passhint}}}",loginMode="{{{loginmode}}}",newAccount="{{{newAccount}}}",newAccountPass=parseInt("{{{newAccountPass}}}"),emailCheck=!1,passRequirements="{{{passRequirements}}}",hardwareKeyChallenge=decodeURIComponent("{{{hkey}}}"),passRequirementsEx=null!=(passRequirements=""!=passRequirements?JSON.parse(decodeURIComponent(passRequirements)):{}).min||null!=passRequirements.max||null!=passRequirements.upper||null!=passRequirements.lower||null!=passRequirements.numeric||null!=passRequirements.nonalpha,features=parseInt("{{{features}}}"),welcomeText=decodeURIComponent("{{{welcometext}}}"),currentpanel=0,uiMode=parseInt(getstore("uiMode","1")),webPageFullScreen=!0,nightMode="1"==getstore("_nightMode","0"),publicKeyCredentialRequestOptions=null;if(0<window.location.href.indexOf("?")){var urlargs=window.location.href.substring(window.location.href.indexOf("?"));Q("loginformargs").value=urlargs,Q("createformargs").value=urlargs,Q("resetformargs").value=urlargs,Q("tokenformargs").value=urlargs,Q("resettokenformargs").value=urlargs,Q("resetpasswordformargs").value=urlargs}function startup(){if(0==(32&features)){var e=null;try{e=top.location.toString().toLowerCase()}catch(e){}if(top!=self&&(null==e||0==top.active))return void(top.location=self.location)}if(2097152&features&&(QH("loginusername","Email:"),QH("resetAccountSpan","Forgot password?"),QV("nuUserRow",!1)),nightMode&&QC("body").add("night"),QV("createPanelHint",!0===passRequirements.hint),QV("resetpasswordpanelHint",!0===passRequirements.hint),welcomeText&&QH("welcomeText",welcomeText),QV("welcomeText",!0),(window.onresize=center)(),validateLogin(),validateCreate(),0!=loginMode.length?go(parseInt(loginMode)):go(1),QV("newAccountDiv","1"===newAccount||"true"===newAccount),null!=passhint&&0<passhint.length&&QV("showPassHintLink",!0),QV("newAccountPass",1==newAccountPass),QV("resetAccountDiv",1==emailCheck),QV("hrAccountDiv",1==emailCheck||1==newAccountPass),"4"==loginMode){try{hardwareKeyChallenge=0<hardwareKeyChallenge.length?JSON.parse(hardwareKeyChallenge):null}catch(e){hardwareKeyChallenge=null}if(null!=hardwareKeyChallenge&&"webAuthn"==hardwareKeyChallenge.type){hardwareKeyChallenge.challenge=Uint8Array.from(atob(hardwareKeyChallenge.challenge),function(e){return e.charCodeAt(0)}).buffer,publicKeyCredentialRequestOptions={challenge:hardwareKeyChallenge.challenge,allowCredentials:[],timeout:hardwareKeyChallenge.timeout};for(var a=0;a<hardwareKeyChallenge.keyIds.length;a++)publicKeyCredentialRequestOptions.allowCredentials.push({id:Uint8Array.from(atob(hardwareKeyChallenge.keyIds[a]),function(e){return e.charCodeAt(0)}),type:"public-key",transports:["usb","ble","nfc"]});navigator.credentials.get({publicKey:publicKeyCredentialRequestOptions}).then(function(e){var a={id:btoa(String.fromCharCode.apply(null,new Uint8Array(e.rawId))),clientDataJSON:btoa(String.fromCharCode.apply(null,new Uint8Array(e.response.clientDataJSON))),userHandle:btoa(String.fromCharCode.apply(null,new Uint8Array(e.response.userHandle))),signature:btoa(String.fromCharCode.apply(null,new Uint8Array(e.response.signature))),authenticatorData:btoa(String.fromCharCode.apply(null,new Uint8Array(e.response.authenticatorData)))};Q("hwtokenInput").value=JSON.stringify(a),QE("tokenOkButton",!0),Q("tokenOkButton").click()},function(e){console.log("credentials-get error",e)})}}if("5"==loginMode){try{hardwareKeyChallenge=0<hardwareKeyChallenge.length?JSON.parse(hardwareKeyChallenge):null}catch(e){hardwareKeyChallenge=null}if(null!=hardwareKeyChallenge&&"webAuthn"==hardwareKeyChallenge.type){hardwareKeyChallenge.challenge=Uint8Array.from(atob(hardwareKeyChallenge.challenge),function(e){return e.charCodeAt(0)}).buffer,publicKeyCredentialRequestOptions={challenge:hardwareKeyChallenge.challenge,allowCredentials:[],timeout:hardwareKeyChallenge.timeout};for(a=0;a<hardwareKeyChallenge.keyIds.length;a++)publicKeyCredentialRequestOptions.allowCredentials.push({id:Uint8Array.from(atob(hardwareKeyChallenge.keyIds[a]),function(e){return e.charCodeAt(0)}),type:"public-key",transports:["usb","ble","nfc"]});navigator.credentials.get({publicKey:publicKeyCredentialRequestOptions}).then(function(e){var a={id:btoa(String.fromCharCode.apply(null,new Uint8Array(e.rawId))),clientDataJSON:btoa(String.fromCharCode.apply(null,new Uint8Array(e.response.clientDataJSON))),userHandle:btoa(String.fromCharCode.apply(null,new Uint8Array(e.response.userHandle))),signature:btoa(String.fromCharCode.apply(null,new Uint8Array(e.response.signature))),authenticatorData:btoa(String.fromCharCode.apply(null,new Uint8Array(e.response.authenticatorData)))};Q("resetHwtokenInput").value=JSON.stringify(a),QE("resetTokenOkButton",!0),Q("resetTokenOkButton").click()},function(e){console.log("credentials-get error",e)})}}userInterfaceSelectMenu()}function showPassHint(e){return messagebox("Password Hint",passhint),haltEvent(e),!1}function xgo(e,a){return QV("message1",!1),QV("message2",!1),QV("message3",!1),QV("message4",!1),QV("message5",!1),QV("message6",!1),go(e),haltEvent(a),!1}function go(e){currentpanel=e,setDialogMode(0),QV("showPassHintLink",!1),QV("loginpanel",1==e),QV("createpanel",2==e),QV("resetpanel",3==e),QV("tokenpanel",4==e),QV("resettokenpanel",5==e),QV("resetpasswordpanel",6==e),1==e&&Q("username").focus(),2==e&&(2097152&features?Q("aemail").focus():Q("ausername").focus()),3==e&&Q("remail").focus(),4==e&&Q("tokenInput").focus(),5==e&&Q("resetTokenInput").focus(),6==e&&Q("rapassword1").focus()}function validateLogin(e,a){var n=0<Q("username").value.length&&-1==Q("username").value.indexOf(" ")&&0<Q("password").value.length;QE("loginButton",n),setDialogMode(0),null!=a&&13==a.keyCode&&(1==e&&""!=Q("username").value?Q("password").focus():2==e&&""!=Q("password").value&&Q("loginButton").click()),null!=a&&haltEvent(a)}function validateCreate(e,a){setDialogMode(0);var n=!1;n=!!(2097152&features)||0<Q("ausername").value.length&&-1==Q("ausername").value.indexOf(" ")&&-1==Q("ausername").value.indexOf('"')&&-1==Q("ausername").value.indexOf(",");var t=1==validateEmail(Q("aemail").value),r=0<Q("apassword1").value.length,o=0<Q("apassword2").value.length&&Q("apassword2").value==Q("apassword1").value,s=0==newAccountPass||0<Q("anewaccountpass").value.length,l=n&&t&&r&&o&&s;if(QS("nuUser").color=n?"black":"#7b241c",QS("nuEmail").color=t?"black":"#7b241c",QS("nuPass1").color=r?"black":"#7b241c",QS("nuPass2").color=o?"black":"#7b241c",QS("nuToken").color=s?"black":"#7b241c",""==Q("apassword1").value)QH("passWarning",""),QV("passwordPolicyCallout",!1);else if(passRequirementsEx){0==checkPasswordRequirements(Q("apassword1").value,passRequirements)?(l=!1,QS("nuPass1").color="#7b241c",QS("nuPass2").color="#7b241c",QH("passWarning","<div style=color:red;cursor:pointer onclick=showPasswordPolicy()><b>Password Policy</b><div>"),QV("passwordPolicyCallout",!0),QH("passwordPolicyCallout",passwordPolicyText(Q("apassword1").value))):(QH("passWarning",""),QV("passwordPolicyCallout",!1))}else{var u=checkPasswordStrength(Q("apassword1").value);80<=u?QH("passWarning","<span style=color:green><b>Strong Password</b><span>"):60<=u?QH("passWarning","<span style=color:blue><b>Good Password</b><span>"):QH("passWarning","<span style=color:red><b>Weak Password</b><span>")}null!=a&&13==a.keyCode&&(1==e&&n&&Q("aemail").focus(),2==e&&t&&Q("apassword1").focus(),3==e&&r&&Q("apassword2").focus(),4==e&&o&&(!0===passRequirements.hint?Q("apasswordhint").focus():e=5),5==e&&(1==newAccountPass?Q("anewaccountpass").focus():e=6),6==e&&Q("createButton").click()),null!=a&&haltEvent(a),QE("createButton",l)}function validatePassReset(e,a){setDialogMode(0);var n=0<Q("rapassword1").value.length,t=0<Q("rapassword2").value.length&&Q("rapassword2").value==Q("rapassword1").value,r=n&&t;if(QS("rnuPass1").color=n?"black":"#7b241c",QS("rnuPass2").color=t?"black":"#7b241c",""==Q("rapassword1").value)QH("rpassWarning",""),QV("rpasswordPolicyCallout",!1);else if(passRequirementsEx){0==checkPasswordRequirements(Q("rapassword1").value,passRequirements)?(r=!1,QS("rnuPass1").color="#7b241c",QS("rnuPass2").color="#7b241c",QH("rpassWarning","<div style=color:red;cursor:pointer onclick=showPasswordPolicy()><b>Password Policy</b><div>"),QV("rpasswordPolicyCallout",!0),QH("rpasswordPolicyCallout",passwordPolicyText(Q("rapassword1").value))):(QH("rpassWarning",""),QV("rpasswordPolicyCallout",!1))}else{var o=checkPasswordStrength(Q("rapassword1").value);80<=o?QH("rpassWarning","<span style=color:green><b>Strong Password</b><span>"):60<=o?QH("rpassWarning","<span style=color:blue><b>Good Password</b><span>"):QH("rpassWarning","<span style=color:red><b>Weak Password</b><span>")}null!=a&&13==a.keyCode&&(2==e&&Q("rapassword1").focus(),3==e&&Q("rapassword2").focus(),4==e&&Q("rapasswordhint").focus(),6==e&&Q("resetPassButton").click()),null!=a&&haltEvent(a),QE("resetPassButton",r)}function passwordPolicyText(e){var a="<div style=text-align:left>",n=strCount(e);return passRequirements.min&&(null==e||e.length<passRequirements.min)&&(a+=format("Minimum length of {0}",passRequirements.min)+"<br />"),passRequirements.max&&(null==e||e.length>passRequirements.max)&&(a+=format("Maximum length of {0}",passRequirements.max)+"<br />"),passRequirements.upper&&(null==e||n.upper<passRequirements.upper)&&(a+=format("{0} upper case",passRequirements.upper)+"<br />"),passRequirements.lower&&(null==e||n.lower<passRequirements.lower)&&(a+=format("{0} lower case",passRequirements.lower)+"<br />"),passRequirements.numeric&&(null==e||n.numeric<passRequirements.numeric)&&(a+=format("{0} numeric",passRequirements.numeric)+"<br />"),passRequirements.nonalpha&&(null==e||n.nonalpha<passRequirements.nonalpha)&&(a+=format("{0} non-alphanumeric",passRequirements.nonalpha)+"<br />"),a+="</div>"}function showPasswordPolicy(){messagebox("Password Policy",passwordPolicyText())}function validateReset(e){setDialogMode(0);var a=validateEmail(Q("remail").value);QE("eresetButton",a),null!=e&&13==e.keyCode&&1==a&&Q("eresetButton").click(),null!=e&&haltEvent(e)}function checkPasswordStrength(e){var a=0,n={},t=0,r={digits:/\d/.test(e),lower:/[a-z]/.test(e),upper:/[A-Z]/.test(e),nonWords:/\W/.test(e)};if(!e)return 0;for(var o=0;o<e.length;o++)n[e[o]]=(n[e[o]]||0)+1,a+=5/n[e[o]];for(var s in r)t+=1==r[s]?1:0;return parseInt(a+10*(t-1))}function checkPasswordRequirements(e,a){if(null==a||""==a||"object"!=typeof a)return!0;if(a.min&&e.length<a.min)return!1;if(a.max&&e.length>a.max)return!1;var n=strCount(e);return!(a.numeric&&n.numeric<a.numeric)&&(!(a.lower&&n.lower<a.lower)&&(!(a.upper&&n.upper<a.upper)&&!(a.nonalpha&&n.nonalpha<a.nonalpha)))}function strCount(e){var a={numeric:0,lower:0,upper:0,nonalpha:0};if("string"!=typeof e)return a;for(var n=0;n<e.length;n++)/\d/.test(e[n])&&a.numeric++,/[a-z]/.test(e[n])&&a.lower++,/[A-Z]/.test(e[n])&&a.upper++,/\W/.test(e[n])&&a.nonalpha++;return a}function checkToken(){var e=Q("tokenInput").value,a=e.split(" ").join("");e!=a&&(Q("tokenInput").value=a),QE("tokenOkButton",6==Q("tokenInput").value.length||8==Q("tokenInput").value.length||44==Q("tokenInput").value.length)}function resetCheckToken(){var e=Q("resetTokenInput").value,a=e.split(" ").join("");e!=a&&(Q("resetTokenInput").value=a),QE("resetTokenOkButton",6==Q("resetTokenInput").value.length||8==Q("resetTokenInput").value.length||44==Q("resetTokenInput").value.length)}var xxcurrentView=0;function setDialogMode(e,a,n,t,r,o){xxdialogMode=e,xxdialogFunc=t,xxdialogButtons=n,xxdialogTag=o,QE("idx_dlgOkButton",!0),QV("idx_dlgOkButton",1&n),QV("idx_dlgCancelButton",2&n),QV("id_dialogclose",2&n||8&n),QV("idx_dlgButtonBar",7&n),a&&QH("id_dialogtitle",a);for(var s=1;s<24;s++)QV("dialog"+s,s==e);QV("dialog",e),r&&(2==e?QH("id_dialogOptions",r):QH("id_dialogMessage",r))}function dialogclose(e){var a=xxdialogFunc,n=xxdialogButtons,t=xxdialogTag;setDialogMode(),(8&n||e)&&a&&a(e,t)}function toggleFullScreen(e){0==webPageFullScreen?QC("body").remove("fullscreen"):QC("body").add("fullscreen"),QV("body",!0),center()}function showUserInterfaceSelectMenu(){Q("uiViewButton1").classList.remove("uiSelectorSel"),Q("uiViewButton2").classList.remove("uiSelectorSel"),Q("uiViewButton3").classList.remove("uiSelectorSel");try{Q("uiViewButton"+uiMode).classList.add("uiSelectorSel")}catch(e){}QV("uiMenu","none"==QS("uiMenu").display),nightMode&&Q("uiViewButton4").classList.add("uiSelectorSel")}function userInterfaceSelectMenu(e){e&&putstore("uiMode",uiMode=e),webPageFullScreen=uiMode<3,toggleFullScreen(0)}function toggleNightMode(){(nightMode=!nightMode)?QC("body").add("night"):QC("body").remove("night"),putstore("_nightMode",nightMode?"1":"0")}function center(){if(0==webPageFullScreen)QS("centralTable")["margin-top"]="";else{var e=Q("column_l").clientHeight/2-220;e<0&&(e=0),QS("centralTable")["margin-top"]=e+"px"}}function messagebox(e,a){QH("id_dialogMessage",a),setDialogMode(1,e,1)}function statusbox(e,a){QH("id_dialogMessage",a),setDialogMode(1,e)}function getDocWidth(){return window.innerWidth?window.innerWidth:document.documentElement&&document.documentElement.clientWidth&&0!=document.documentElement.clientWidth?document.documentElement.clientWidth:document.getElementsByTagName("body")[0].clientWidth}function haltEvent(e){return e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1}function haltReturn(e){13==e.keyCode&&haltEvent(e)}function validateEmail(e){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function putstore(e,a){try{if("undefined"==typeof localStorage)return;localStorage.setItem(e,a)}catch(e){}}function getstore(e,a){try{if("undefined"==typeof localStorage)return a;var n=localStorage.getItem(e);return null==n||null==n?a:n}catch(e){return a}}function format(e){var n=Array.prototype.slice.call(arguments,1);return e.replace(/{(\d+)}/g,function(e,a){return void 0!==n[a]?n[a]:e})}</script>
\ No newline at end of file
views/login-mobile-min.handlebars
+1 -1
@@ -1 +1 @@
1 -<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link rel="shortcut icon"type=image/x-icon href={{{domainurl}}}favicon.ico><script src=scripts/common-0.0.1.js></script><script src=scripts/u2f-api.js></script><title>MeshCentral - Login</title><style>a{color:#036;text-decoration:underline}#footer a{color:#fff;text-decoration:underline}#footer a:hover{color:#fff;text-decoration:none}</style><body onload='"undefined"!=typeof startup&&startup()'style="overflow-y:hidden;margin:0;padding:0;border:0;color:#000;font-size:13px;font-family:\'Trebuchet MS\',Arial,Helvetica,sans-serif"><div id=container><div id=mastheadx></div><div id=masthead style="background:url(logo.png) 0 0;background-size:341px 50px;background-color:#036;background-repeat:no-repeat;height:50px;width:100%;overflow:hidden"><div style=float:left;height:66px;color:#c8c8c8;padding-left:10px;padding-top:6px><strong><font style=font-size:36px;font-family:Arial,Helvetica,sans-serif>{{{title}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:10px><strong><font style=font-size:12px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><div id=page_content style=overflow-y:scroll;position:absolute;bottom:32px;top:50px;width:100%;display:flex;align-items:center><div id=column_l style=padding:10px;width:100%><table style=width:100%><tr><td align=center><div id=loginpanel style=background-color:#979797;border-radius:16px;width:260px;padding:16px;text-align:center;clear:both;display:none><form method=post><input type=hidden name=action value=login><div id=message1>{{{message}}}</div><div><b>Log In</b></div><table><tr><td id=loginusername align=right width=100>Username:<td><input id=username maxlength=64 name=username onchange=validateLogin(1) onkeyup=validateLogin(1,event)><tr><td align=right>Password:<td><input id=password type=password maxlength=256 name=password autocomplete=off onchange=validateLogin(2) onkeyup=validateLogin(2,event)><tr><td><div id=showPassHintLink style=display:none><a onclick=showPassHint() style=cursor:pointer>Show Hint</a></div><td align=right><input id=loginButton type=submit value="Log In"disabled></table><div id=hrAccountDiv style=display:none><hr></div><div id=resetAccountDiv style=display:none;padding:2px><span id=resetAccountSpan>Forgot user/password?</span><a onclick=xgo(3) style=cursor:pointer>Reset account</a>.</div><div id=newAccountDiv style=display:none;padding:2px>Don&#39;t have an account?<a onclick=xgo(2) style=cursor:pointer>Create one</a>.</div><input id=loginformargs name=urlargs type=hidden></form></div><div id=createpanel style=display:none><div style=background-color:#979797;border-radius:16px;width:260px;padding:16px;text-align:center;clear:both;position:relative><form method=post><input type=hidden name=action value=createaccount><div id=message2>{{{message}}}</div><div><b>Account Creation</b></div><div id=passwordPolicyCallout style="left:-5px;top:10px;width:100px;position:absolute;background-color:#ffc;border-radius:5px;padding:5px;box-shadow:0 0 15px #666;font-size:10px"></div><table><tr id=nuUserRow><td align=right width=100>Username:<td><input id=ausername name=username onchange=validateCreate(1) maxlength=64 onkeydown=haltReturn(event) onkeyup=validateCreate(1,event)><tr><td align=right width=100>Email:<td><input id=aemail name=email onchange=validateCreate(2) maxlength=256 onkeydown=haltReturn(event) onkeyup=validateCreate(2,event)><tr><td align=right>Password:<td><input id=apassword1 type=password name=password1 autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validateCreate(3) onkeyup=validateCreate(3,event)><tr><td align=right>Password:<td><input id=apassword2 type=password name=password2 autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validateCreate(4) onkeyup=validateCreate(4,event)><tr id=createPanelHint style=display:none><td align=right>Pass Hint:<td><input id=apasswordhint name=apasswordhint autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validateCreate(5) onkeyup=validateCreate(5,event)><tr id=newAccountPass title="Enter the account creation token"><td align=right>Creation Token:<td><input id=anewaccountpass type=password name=anewaccountpass autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validateCreate(6) onkeyup=validateCreate(6,event)><tr><td colspan=2><div style=float:right><input id=createButton type=submit value="Create Account"disabled></div><div id=passWarning style=padding-top:6px></div></table><hr><a onclick=xgo(1) style=cursor:pointer>Back to login</a><input id=createformargs name=urlargs type=hidden></form></div></div><div id=resetpanel style=background-color:#979797;border-radius:16px;width:260px;padding:16px;text-align:center;display:none;clear:both><form method=post><input type=hidden name=action value=resetaccount><div id=message3>{{{message}}}</div><div><b>Account Reset</b></div><table><tr><td align=right width=100>Email:<td><input id=remail name=email maxlength=256 onchange=validateReset() onkeyup=validateReset(event)><tr><td colspan=2><div style=float:right><input id=eresetButton type=submit value="Reset Account"disabled></div><div id=passWarning style=padding-top:6px></div></table><hr><a onclick=xgo(1) style=cursor:pointer>Back to login</a><input id=resetformargs name=urlargs type=hidden></form></div><div id=tokenpanel style=background-color:#979797;border-radius:16px;width:260px;padding:16px;text-align:center;display:none;clear:both><form method=post autocomplete=off><input type=hidden name=action value=tokenlogin> <input type=hidden name=hwstate value={{{hwstate}}}><div id=message4>{{{message}}}</div><table><tr><td align=right width=100>Login token:<td><input id=tokenInput name=token maxlength=50 onchange=checkToken(event) onkeyup=checkToken(event) onkeydown=checkToken(event) onfocus=checkTokenTimer(1) onblur=checkTokenTimer(0)> <input id=hwtokenInput name=hwtoken style=display:none><tr><td colspan=2><div style=float:right><input id=tokenOkButton type=submit value=Login disabled></div></table><hr><a onclick=xgo(1) style=cursor:pointer>Back to login</a><input id=tokenformargs name=urlargs type=hidden></form></div><div id=resettokenpanel style=background-color:#979797;border-radius:16px;width:260px;padding:16px;text-align:center;display:none;clear:both><form method=post autocomplete=off><input type=hidden name=action value=resetaccount><div id=message5>{{{message}}}</div><table><tr><td align=right width=100>Login token:<td><input id=resetTokenInput name=token maxlength=50 onchange=resetCheckToken(event) onpaste=resetCheckToken(event) onkeyup=resetCheckToken(event) onkeydown=resetCheckToken(event)> <input id=resetHwtokenInput name=hwtoken style=display:none><tr><td colspan=2><div style=float:right><input id=resetTokenOkButton type=submit value=Login disabled></div></table><hr><a onclick=xgo(1) style=cursor:pointer>Back to login</a><input id=resettokenformargs name=urlargs type=hidden></form></div><div id=resetpasswordpanel style=position:relative;background-color:#979797;border-radius:16px;width:300px;padding:16px;text-align:center;display:none><form method=post><input type=hidden name=action value=resetpassword><div id=message6>{{{message}}}</div><div id=rpasswordPolicyCallout style="left:-10px;width:100px;display:none;position:absolute;background-color:#ffc;border-radius:5px;padding:5px;box-shadow:0 0 15px #666;font-size:10px"></div><table><tr><td id=rnuPass1 width=100 align=right>Password:<td><input id=rapassword1 type=password name=rpassword1 autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validatePassReset(3,event) onkeyup=validatePassReset(3,event)><tr><td id=rnuPass2 align=right>Password:<td><input id=rapassword2 type=password name=rpassword2 autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validatePassReset(4,event) onkeyup=validatePassReset(4,event)><tr id=resetpasswordpanelHint style=display:none><td id=rnuHint align=right>Password Hint:<td><input id=rapasswordhint name=rpasswordhint autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validatePassReset(5,event) onkeyup=validatePassReset(5,event)><tr><td colspan=2><div style=float:right><input id=resetPassButton type=submit value="Reset Password"disabled></div><div id=rpassWarning style=padding-top:6px></div></table><hr><a onclick=xgo(1) style=cursor:pointer>Back to login</a><input id=resetpasswordformargs name=urlargs type=hidden></form></div></table></div></div><div id=footer style=height:32px;width:100%;text-align:center;background-color:#113962;position:absolute;bottom:0><table cellpadding=0 cellspacing=6 style=width:100%><tr><td style=text-align:left;color:#fff>{{{footer}}}<td style=text-align:right>{{{rootCertLink}}}&nbsp;<a href=terms>Terms &amp; Privacy</a></table></div></div><div id=dialog style="z-index:1000;background-color:#eee;box-shadow:0 0 15px #666;font-family:Arial,Helvetica,sans-serif;border-radius:5px;position:fixed;top:180px;width:400px;display:none"><div style="width:100%;background-color:#036;color:#fff;border-radius:5px 5px 0 0"><div id=id_dialogclose style=float:right;padding:5px;cursor:pointer onclick=setDialogMode()><b>X</b></div><div id=id_dialogtitle style=padding:5px></div><div style=width:100%;margin:6px></div></div><div style=margin-right:16px;margin-left:8px><div id=dialog1 style=margin:auto;text-align:center;margin:3px><div id=id_dialogMessage style=padding:10px></div></div><div id=dialog2 style=margin:auto;margin:3px><div id=id_dialogOptions></div></div></div><div id=idx_dlgButtonBar style=padding:10px;margin-bottom:20px><input id=idx_dlgCancelButton type=button value=Cancel style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)> <input id=idx_dlgOkButton type=button value=OK style=float:right;width:80px onclick=dialogclose(1)></div></div><script>"use strict";var passhint="{{{passhint}}}",newAccountPass=parseInt("{{{newAccountPass}}}"),emailCheck=!1,features=parseInt("{{{features}}}"),passRequirements="{{{passRequirements}}}",passRequirementsEx=null!=(passRequirements=""!=passRequirements?JSON.parse(decodeURIComponent(passRequirements)):{}).min||null!=passRequirements.max||null!=passRequirements.upper||null!=passRequirements.lower||null!=passRequirements.numeric||null!=passRequirements.nonalpha,hardwareKeyChallenge=decodeURIComponent("{{{hkey}}}"),currentpanel=0;if(0<window.location.href.indexOf("?")){var urlargs=window.location.href.substring(window.location.href.indexOf("?"));Q("loginformargs").value=urlargs,Q("createformargs").value=urlargs,Q("resetformargs").value=urlargs,Q("tokenformargs").value=urlargs,Q("resettokenformargs").value=urlargs,Q("resetpasswordformargs").value=urlargs}function startup(){if(0==(32&features)){var e=null;try{e=top.location.toString().toLowerCase()}catch(e){}if(top!=self&&(null==e||0==top.active))return void(top.location=self.location)}2097152&features&&(QH("loginusername","Email:"),QH("resetAccountSpan","Forgot password?"),QV("nuUserRow",!1)),QV("createPanelHint",!0===passRequirements.hint),QV("resetpasswordpanelHint",!0===passRequirements.hint),(window.onresize=center)(),validateLogin(),validateCreate(),go(parseInt("{{loginmode}}")),QV("newAccountDiv",!1),!0===passRequirements.hint&&null!=passhint&&0<passhint.length&&QV("showPassHintLink",!0),QV("newAccountPass",1==newAccountPass),QV("resetAccountDiv",1==emailCheck),QV("hrAccountDiv",1==emailCheck||1==newAccountPass)}function showPassHint(){!0===passRequirements.hint&&messagebox("Password Hint",passhint)}function xgo(e){QV("message1",!1),QV("message2",!1),QV("message3",!1),QV("message4",!1),QV("message5",!1),QV("message6",!1),go(e)}function go(e){currentpanel=e,setDialogMode(0),QV("showPassHintLink",!1),QV("loginpanel",1==e),QV("createpanel",2==e),QV("resetpanel",3==e),QV("tokenpanel",4==e),QV("resettokenpanel",5==e),QV("resetpasswordpanel",6==e),1==e&&Q("username").focus(),2==e&&(2097152&features?Q("aemail").focus():Q("ausername").focus()),3==e&&Q("remail").focus(),4==e&&Q("tokenInput").focus(),5==e&&Q("resetTokenInput").focus(),6==e&&Q("rapassword1").focus()}function validateLogin(e,s){var a=0<Q("username").value.length&&-1==Q("username").value.indexOf(" ")&&0<Q("password").value.length;QE("loginButton",a),setDialogMode(0),null!=s&&13==s.keyCode&&(1==e?Q("password").focus():2==e&&Q("loginButton").click()),null!=s&&haltEvent(s)}function validateCreate(e,s){setDialogMode(0);var a=!1;if(a=!!(2097152&features)||0<Q("ausername").value.length&&-1==Q("ausername").value.indexOf(" ")&&-1==Q("ausername").value.indexOf('"')&&-1==Q("ausername").value.indexOf(","),a&=1==validateEmail(Q("aemail").value)&&0<Q("apassword1").value.length&&Q("apassword2").value==Q("apassword1").value,1==newAccountPass&&0==Q("anewaccountpass").value.length&&(a=!1),""==Q("apassword1").value)QH("passWarning",""),QV("passwordPolicyCallout",!1);else if(passRequirementsEx){0==checkPasswordRequirements(Q("apassword1").value,passRequirements)?(a=!1,QH("passWarning","<span style=color:red><b>Password Policy</b><span>"),QV("passwordPolicyCallout",!0),QH("passwordPolicyCallout",passwordPolicyText(Q("apassword1").value))):(QH("passWarning",""),QV("passwordPolicyCallout",!1))}else{var n=checkPasswordStrength(Q("apassword1").value);80<=n?QH("passWarning","<span style=color:green><b>Strong Password</b><span>"):60<=n?QH("passWarning","<span style=color:blue><b>Good Password</b><span>"):QH("passWarning","<span style=color:red><b>Weak Password</b><span>")}QE("createButton",a),null!=s&&13==s.keyCode&&(1==e&&Q("aemail").focus(),2==e&&Q("apassword1").focus(),3==e&&Q("apassword2").focus(),4==e&&Q("apasswordhint").focus(),5==e&&(1==newAccountPass?Q("anewaccountpass").focus():Q("createButton").click()),6==e&&Q("createButton").click()),null!=s&&haltEvent(s)}function validatePassReset(e,s){setDialogMode(0);var a=0<Q("rapassword1").value.length,n=0<Q("rapassword2").value.length&&Q("rapassword2").value==Q("rapassword1").value,t=a&&n;if(QS("rnuPass1").color=a?"black":"#7b241c",QS("rnuPass2").color=n?"black":"#7b241c",""==Q("rapassword1").value)QH("rpassWarning",""),QV("rpasswordPolicyCallout",!1);else if(passRequirementsEx){0==checkPasswordRequirements(Q("rapassword1").value,passRequirements)?(t=!1,QS("rnuPass1").color="#7b241c",QS("rnuPass2").color="#7b241c",QH("rpassWarning","<div style=color:red;cursor:pointer onclick=showPasswordPolicy()><b>Password Policy</b><div>"),QV("rpasswordPolicyCallout",!0),QH("rpasswordPolicyCallout",passwordPolicyText(Q("rapassword1").value))):(QH("rpassWarning",""),QV("rpasswordPolicyCallout",!1))}else{var r=checkPasswordStrength(Q("rapassword1").value);80<=r?QH("rpassWarning","<span style=color:green><b>Strong Password</b><span>"):60<=r?QH("rpassWarning","<span style=color:blue><b>Good Password</b><span>"):QH("rpassWarning","<span style=color:red><b>Weak Password</b><span>")}null!=s&&13==s.keyCode&&(2==e&&Q("rapassword1").focus(),3==e&&Q("rapassword2").focus(),4==e&&Q("rapasswordhint").focus(),6==e&&Q("resetPassButton").click()),null!=s&&haltEvent(s),QE("resetPassButton",t)}function validateReset(e){setDialogMode(0);var s=validateEmail(Q("remail").value);QE("eresetButton",s),null!=e&&13==e.keyCode&&1==s&&Q("eresetButton").click(),null!=e&&haltEvent(e)}function passwordPolicyText(e){var s="<div style=text-align:left>",a=strCount(e);return passRequirements.min&&(null==e||e.length<passRequirements.min)&&(s+=format("Minimum length of {0}",passRequirements.min)+"<br />"),passRequirements.max&&(null==e||e.length>passRequirements.max)&&(s+=format("Maximum length of {0}",passRequirements.max)+"<br />"),passRequirements.upper&&(null==e||a.upper<passRequirements.upper)&&(s+=format("{0} upper case",passRequirements.upper)+"<br />"),passRequirements.lower&&(null==e||a.lower<passRequirements.lower)&&(s+=format("{0} lower case",passRequirements.lower)+"<br />"),passRequirements.numeric&&(null==e||a.numeric<passRequirements.numeric)&&(s+=format("{0} numeric",passRequirements.numeric)+"<br />"),passRequirements.nonalpha&&(null==e||a.nonalpha<passRequirements.nonalpha)&&(s+=format("{0} non-alphanumeric",passRequirements.nonalpha)+"<br />"),s+="</div>"}function checkPasswordStrength(e){var s=0,a={},n=0,t={digits:/\d/.test(e),lower:/[a-z]/.test(e),upper:/[A-Z]/.test(e),nonWords:/\W/.test(e)};if(!e)return 0;for(var r=0;r<e.length;r++)a[e[r]]=(a[e[r]]||0)+1,s+=5/a[e[r]];for(var o in t)n+=1==t[o]?1:0;return parseInt(s+10*(n-1))}function checkPasswordRequirements(e,s){if(null==s||""==s||"object"!=typeof s)return!0;if(s.min&&e.length<s.min)return!1;if(s.max&&e.length>s.max)return!1;var a=strCount(e);return!(s.numeric&&a.numeric<s.numeric)&&(!(s.lower&&a.lower<s.lower)&&(!(s.upper&&a.upper<s.upper)&&!(s.nonalpha&&a.nonalpha<s.nonalpha)))}function strCount(e){var s={numeric:0,lower:0,upper:0,nonalpha:0};if("string"!=typeof e)return s;for(var a=0;a<e.length;a++)/\d/.test(e[a])&&s.numeric++,/[a-z]/.test(e[a])&&s.lower++,/[A-Z]/.test(e[a])&&s.upper++,/\W/.test(e[a])&&s.nonalpha++;return s}var xxdialogMode,xxdialogFunc,xxdialogButtons,xxdialogTag,xcheckTokenTimer=null;function checkTokenTimer(e){0==e&&null!=xcheckTokenTimer&&(clearInterval(xcheckTokenTimer),xcheckTokenTimer=null),1==e&&null==xcheckTokenTimer&&(xcheckTokenTimer=setInterval(checkToken,200))}function checkToken(){var e=Q("tokenInput").value,s=e.split(" ").join("");e!=s&&(Q("tokenInput").value=s),QE("tokenOkButton",6==Q("tokenInput").value.length||8==Q("tokenInput").value.length||44==Q("tokenInput").value.length)}function resetCheckToken(){var e=Q("resetTokenInput").value,s=e.split(" ").join("");e!=s&&(Q("resetTokenInput").value=s),QE("resetTokenOkButton",6==Q("resetTokenInput").value.length||8==Q("resetTokenInput").value.length||44==Q("resetTokenInput").value.length)}var xxcurrentView=0;function setDialogMode(e,s,a,n,t,r){xxdialogMode=e,xxdialogFunc=n,xxdialogButtons=a,xxdialogTag=r,QE("idx_dlgOkButton",!0),QV("idx_dlgOkButton",1&a),QV("idx_dlgCancelButton",2&a),QV("id_dialogclose",2&a||8&a),QV("idx_dlgButtonBar",7&a),s&&QH("id_dialogtitle",s);for(var o=1;o<24;o++)QV("dialog"+o,o==e);QV("dialog",e),t&&(2==e?QH("id_dialogOptions",t):QH("id_dialogMessage",t))}function dialogclose(e){var s=xxdialogFunc,a=xxdialogButtons,n=xxdialogTag;setDialogMode(),(8&a||e)&&s&&s(e,n)}function center(){QS("dialog").left=(getDocWidth()-400)/2+"px"}function messagebox(e,s){QH("id_dialogMessage",s),setDialogMode(1,e,1)}function statusbox(e,s){QH("id_dialogMessage",s),setDialogMode(1,e)}function getDocWidth(){return window.innerWidth?window.innerWidth:document.documentElement&&document.documentElement.clientWidth&&0!=document.documentElement.clientWidth?document.documentElement.clientWidth:document.getElementsByTagName("body")[0].clientWidth}function haltEvent(e){return e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1}function haltReturn(e){13==e.keyCode&&haltEvent(e)}function validateEmail(e){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function format(e){var a=Array.prototype.slice.call(arguments,1);return e.replace(/{(\d+)}/g,function(e,s){return void 0!==a[s]?a[s]:e})}</script>
\ No newline at end of file
1 +<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link rel="shortcut icon"type=image/x-icon href={{{domainurl}}}favicon.ico><script src=scripts/common-0.0.1.js></script><script src=scripts/u2f-api.js></script><title>MeshCentral - Login</title><style>a{color:#036;text-decoration:underline}#footer a{color:#fff;text-decoration:underline}#footer a:hover{color:#fff;text-decoration:none}</style><body onload='"undefined"!=typeof startup&&startup()'style="overflow-y:hidden;margin:0;padding:0;border:0;color:#000;font-size:13px;font-family:\'Trebuchet MS\',Arial,Helvetica,sans-serif"><div id=container><div id=mastheadx></div><div id=masthead style="background:url(logo.png) 0 0;background-size:341px 50px;background-color:#036;background-repeat:no-repeat;height:50px;width:100%;overflow:hidden"><div style=float:left;height:66px;color:#c8c8c8;padding-left:10px;padding-top:6px><strong><font style=font-size:36px;font-family:Arial,Helvetica,sans-serif>{{{title}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:10px><strong><font style=font-size:12px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><div id=page_content style=overflow-y:scroll;position:absolute;bottom:32px;top:50px;width:100%;display:flex;align-items:center><div id=column_l style=padding:10px;width:100%><table style=width:100%><tr><td align=center><div id=loginpanel style=background-color:#979797;border-radius:16px;width:260px;padding:16px;text-align:center;clear:both;display:none><form method=post><input type=hidden name=action value=login><div id=message1>{{{message}}}</div><div><b>Log In</b></div><table><tr><td id=loginusername align=right width=100>Username:<td><input id=username maxlength=64 name=username onchange=validateLogin(1) onkeyup=validateLogin(1,event)><tr><td align=right>Password:<td><input id=password type=password maxlength=256 name=password autocomplete=off onchange=validateLogin(2) onkeyup=validateLogin(2,event)><tr><td><div id=showPassHintLink style=display:none><a onclick=showPassHint() style=cursor:pointer>Show Hint</a></div><td align=right><input id=loginButton type=submit value="Log In"disabled></table><div id=hrAccountDiv style=display:none><hr></div><div id=resetAccountDiv style=display:none;padding:2px><span id=resetAccountSpan>Forgot user/password?</span> <a onclick=xgo(3) style=cursor:pointer>Reset account</a>.</div><div id=newAccountDiv style=display:none;padding:2px>Don&#39;t have an account? <a onclick=xgo(2) style=cursor:pointer>Create one</a>.</div><input id=loginformargs name=urlargs type=hidden></form></div><div id=createpanel style=display:none><div style=background-color:#979797;border-radius:16px;width:260px;padding:16px;text-align:center;clear:both;position:relative><form method=post><input type=hidden name=action value=createaccount><div id=message2>{{{message}}}</div><div><b>Account Creation</b></div><div id=passwordPolicyCallout style="left:-5px;top:10px;width:100px;position:absolute;background-color:#ffc;border-radius:5px;padding:5px;box-shadow:0 0 15px #666;font-size:10px"></div><table><tr id=nuUserRow><td align=right width=100>Username:<td><input id=ausername name=username onchange=validateCreate(1) maxlength=64 onkeydown=haltReturn(event) onkeyup=validateCreate(1,event)><tr><td align=right width=100>Email:<td><input id=aemail name=email onchange=validateCreate(2) maxlength=256 onkeydown=haltReturn(event) onkeyup=validateCreate(2,event)><tr><td align=right>Password:<td><input id=apassword1 type=password name=password1 autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validateCreate(3) onkeyup=validateCreate(3,event)><tr><td align=right>Password:<td><input id=apassword2 type=password name=password2 autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validateCreate(4) onkeyup=validateCreate(4,event)><tr id=createPanelHint style=display:none><td align=right>Pass Hint:<td><input id=apasswordhint name=apasswordhint autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validateCreate(5) onkeyup=validateCreate(5,event)><tr id=newAccountPass title="Enter the account creation token"><td align=right>Creation Token:<td><input id=anewaccountpass type=password name=anewaccountpass autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validateCreate(6) onkeyup=validateCreate(6,event)><tr><td colspan=2><div style=float:right><input id=createButton type=submit value="Create Account"disabled></div><div id=passWarning style=padding-top:6px></div></table><hr><a onclick=xgo(1) style=cursor:pointer>Back to login</a> <input id=createformargs name=urlargs type=hidden></form></div></div><div id=resetpanel style=background-color:#979797;border-radius:16px;width:260px;padding:16px;text-align:center;display:none;clear:both><form method=post><input type=hidden name=action value=resetaccount><div id=message3>{{{message}}}</div><div><b>Account Reset</b></div><table><tr><td align=right width=100>Email:<td><input id=remail name=email maxlength=256 onchange=validateReset() onkeyup=validateReset(event)><tr><td colspan=2><div style=float:right><input id=eresetButton type=submit value="Reset Account"disabled></div><div id=passWarning style=padding-top:6px></div></table><hr><a onclick=xgo(1) style=cursor:pointer>Back to login</a> <input id=resetformargs name=urlargs type=hidden></form></div><div id=tokenpanel style=background-color:#979797;border-radius:16px;width:260px;padding:16px;text-align:center;display:none;clear:both><form method=post autocomplete=off><input type=hidden name=action value=tokenlogin> <input type=hidden name=hwstate value={{{hwstate}}}><div id=message4>{{{message}}}</div><table><tr><td align=right width=100>Login token:<td><input id=tokenInput name=token maxlength=50 onchange=checkToken(event) onkeyup=checkToken(event) onkeydown=checkToken(event) onfocus=checkTokenTimer(1) onblur=checkTokenTimer(0)> <input id=hwtokenInput name=hwtoken style=display:none><tr><td colspan=2><div style=float:right><input id=tokenOkButton type=submit value=Login disabled></div></table><hr><a onclick=xgo(1) style=cursor:pointer>Back to login</a> <input id=tokenformargs name=urlargs type=hidden></form></div><div id=resettokenpanel style=background-color:#979797;border-radius:16px;width:260px;padding:16px;text-align:center;display:none;clear:both><form method=post autocomplete=off><input type=hidden name=action value=resetaccount><div id=message5>{{{message}}}</div><table><tr><td align=right width=100>Login token:<td><input id=resetTokenInput name=token maxlength=50 onchange=resetCheckToken(event) onpaste=resetCheckToken(event) onkeyup=resetCheckToken(event) onkeydown=resetCheckToken(event)> <input id=resetHwtokenInput name=hwtoken style=display:none><tr><td colspan=2><div style=float:right><input id=resetTokenOkButton type=submit value=Login disabled></div></table><hr><a onclick=xgo(1) style=cursor:pointer>Back to login</a> <input id=resettokenformargs name=urlargs type=hidden></form></div><div id=resetpasswordpanel style=position:relative;background-color:#979797;border-radius:16px;width:300px;padding:16px;text-align:center;display:none><form method=post><input type=hidden name=action value=resetpassword><div id=message6>{{{message}}}</div><div id=rpasswordPolicyCallout style="left:-10px;width:100px;display:none;position:absolute;background-color:#ffc;border-radius:5px;padding:5px;box-shadow:0 0 15px #666;font-size:10px"></div><table><tr><td id=rnuPass1 width=100 align=right>Password:<td><input id=rapassword1 type=password name=rpassword1 autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validatePassReset(3,event) onkeyup=validatePassReset(3,event)><tr><td id=rnuPass2 align=right>Password:<td><input id=rapassword2 type=password name=rpassword2 autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validatePassReset(4,event) onkeyup=validatePassReset(4,event)><tr id=resetpasswordpanelHint style=display:none><td id=rnuHint align=right>Password Hint:<td><input id=rapasswordhint name=rpasswordhint autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validatePassReset(5,event) onkeyup=validatePassReset(5,event)><tr><td colspan=2><div style=float:right><input id=resetPassButton type=submit value="Reset Password"disabled></div><div id=rpassWarning style=padding-top:6px></div></table><hr><a onclick=xgo(1) style=cursor:pointer>Back to login</a> <input id=resetpasswordformargs name=urlargs type=hidden></form></div></table></div></div><div id=footer style=height:32px;width:100%;text-align:center;background-color:#113962;position:absolute;bottom:0><table cellpadding=0 cellspacing=6 style=width:100%><tr><td style=text-align:left;color:#fff>{{{footer}}}<td style=text-align:right>{{{rootCertLink}}}&nbsp;<a href=terms>Terms &amp; Privacy</a></table></div></div><div id=dialog style="z-index:1000;background-color:#eee;box-shadow:0 0 15px #666;font-family:Arial,Helvetica,sans-serif;border-radius:5px;position:fixed;top:180px;width:400px;display:none"><div style="width:100%;background-color:#036;color:#fff;border-radius:5px 5px 0 0"><div id=id_dialogclose style=float:right;padding:5px;cursor:pointer onclick=setDialogMode()><b>X</b></div><div id=id_dialogtitle style=padding:5px></div><div style=width:100%;margin:6px></div></div><div style=margin-right:16px;margin-left:8px><div id=dialog1 style=margin:auto;text-align:center;margin:3px><div id=id_dialogMessage style=padding:10px></div></div><div id=dialog2 style=margin:auto;margin:3px><div id=id_dialogOptions></div></div></div><div id=idx_dlgButtonBar style=padding:10px;margin-bottom:20px><input id=idx_dlgCancelButton type=button value=Cancel style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)> <input id=idx_dlgOkButton type=button value=OK style=float:right;width:80px onclick=dialogclose(1)></div></div><script>"use strict";var loginMode="{{{loginmode}}}",newAccount="{{{newAccount}}}",passhint="{{{passhint}}}",newAccountPass=parseInt("{{{newAccountPass}}}"),emailCheck=!1,features=parseInt("{{{features}}}"),passRequirements="{{{passRequirements}}}",passRequirementsEx=null!=(passRequirements=""!=passRequirements?JSON.parse(decodeURIComponent(passRequirements)):{}).min||null!=passRequirements.max||null!=passRequirements.upper||null!=passRequirements.lower||null!=passRequirements.numeric||null!=passRequirements.nonalpha,hardwareKeyChallenge=decodeURIComponent("{{{hkey}}}"),currentpanel=0;if(0<window.location.href.indexOf("?")){var urlargs=window.location.href.substring(window.location.href.indexOf("?"));Q("loginformargs").value=urlargs,Q("createformargs").value=urlargs,Q("resetformargs").value=urlargs,Q("tokenformargs").value=urlargs,Q("resettokenformargs").value=urlargs,Q("resetpasswordformargs").value=urlargs}function startup(){if(0==(32&features)){var e=null;try{e=top.location.toString().toLowerCase()}catch(e){}if(top!=self&&(null==e||0==top.active))return void(top.location=self.location)}if(2097152&features&&(QH("loginusername","Email:"),QH("resetAccountSpan","Forgot password?"),QV("nuUserRow",!1)),QV("createPanelHint",!0===passRequirements.hint),QV("resetpasswordpanelHint",!0===passRequirements.hint),(window.onresize=center)(),validateLogin(),validateCreate(),0!=loginMode.length?go(parseInt(loginMode)):go(1),QV("newAccountDiv","1"===newAccount||"true"===newAccount),!0===passRequirements.hint&&null!=passhint&&0<passhint.length&&QV("showPassHintLink",!0),QV("newAccountPass",1==newAccountPass),QV("resetAccountDiv",1==emailCheck),QV("hrAccountDiv",1==emailCheck||1==newAccountPass),"4"==loginMode){try{hardwareKeyChallenge=0<hardwareKeyChallenge.length?JSON.parse(hardwareKeyChallenge):null}catch(e){hardwareKeyChallenge=null}if(null!=hardwareKeyChallenge&&"webAuthn"==hardwareKeyChallenge.type){hardwareKeyChallenge.challenge=Uint8Array.from(atob(hardwareKeyChallenge.challenge),function(e){return e.charCodeAt(0)}).buffer;for(var a={challenge:hardwareKeyChallenge.challenge,allowCredentials:[],timeout:hardwareKeyChallenge.timeout},n=0;n<hardwareKeyChallenge.keyIds.length;n++)a.allowCredentials.push({id:Uint8Array.from(atob(hardwareKeyChallenge.keyIds[n]),function(e){return e.charCodeAt(0)}),type:"public-key",transports:["usb","ble","nfc"]});navigator.credentials.get({publicKey:a}).then(function(e){var a={id:btoa(String.fromCharCode.apply(null,new Uint8Array(e.rawId))),clientDataJSON:btoa(String.fromCharCode.apply(null,new Uint8Array(e.response.clientDataJSON))),userHandle:btoa(String.fromCharCode.apply(null,new Uint8Array(e.response.userHandle))),signature:btoa(String.fromCharCode.apply(null,new Uint8Array(e.response.signature))),authenticatorData:btoa(String.fromCharCode.apply(null,new Uint8Array(e.response.authenticatorData)))};Q("hwtokenInput").value=JSON.stringify(a),QE("tokenOkButton",!0),Q("tokenOkButton").click()},function(e){console.log("credentials-get error",e)})}}if("5"==loginMode){try{hardwareKeyChallenge=0<hardwareKeyChallenge.length?JSON.parse(hardwareKeyChallenge):null}catch(e){hardwareKeyChallenge=null}if(null!=hardwareKeyChallenge&&"webAuthn"==hardwareKeyChallenge.type){hardwareKeyChallenge.challenge=Uint8Array.from(atob(hardwareKeyChallenge.challenge),function(e){return e.charCodeAt(0)}).buffer;for(a={challenge:hardwareKeyChallenge.challenge,allowCredentials:[],timeout:hardwareKeyChallenge.timeout},n=0;n<hardwareKeyChallenge.keyIds.length;n++)a.allowCredentials.push({id:Uint8Array.from(atob(hardwareKeyChallenge.keyIds[n]),function(e){return e.charCodeAt(0)}),type:"public-key",transports:["usb","ble","nfc"]});navigator.credentials.get({publicKey:a}).then(function(e){var a={id:btoa(String.fromCharCode.apply(null,new Uint8Array(e.rawId))),clientDataJSON:btoa(String.fromCharCode.apply(null,new Uint8Array(e.response.clientDataJSON))),userHandle:btoa(String.fromCharCode.apply(null,new Uint8Array(e.response.userHandle))),signature:btoa(String.fromCharCode.apply(null,new Uint8Array(e.response.signature))),authenticatorData:btoa(String.fromCharCode.apply(null,new Uint8Array(e.response.authenticatorData)))};Q("resetHwtokenInput").value=JSON.stringify(a),QE("resetTokenOkButton",!0),Q("resetTokenOkButton").click()},function(e){console.log("credentials-get error",e)})}}}function showPassHint(){!0===passRequirements.hint&&messagebox("Password Hint",passhint)}function xgo(e){QV("message1",!1),QV("message2",!1),QV("message3",!1),QV("message4",!1),QV("message5",!1),QV("message6",!1),go(e)}function go(e){currentpanel=e,setDialogMode(0),QV("showPassHintLink",!1),QV("loginpanel",1==e),QV("createpanel",2==e),QV("resetpanel",3==e),QV("tokenpanel",4==e),QV("resettokenpanel",5==e),QV("resetpasswordpanel",6==e),1==e&&Q("username").focus(),2==e&&(2097152&features?Q("aemail").focus():Q("ausername").focus()),3==e&&Q("remail").focus(),4==e&&Q("tokenInput").focus(),5==e&&Q("resetTokenInput").focus(),6==e&&Q("rapassword1").focus()}function validateLogin(e,a){var n=0<Q("username").value.length&&-1==Q("username").value.indexOf(" ")&&0<Q("password").value.length;QE("loginButton",n),setDialogMode(0),null!=a&&13==a.keyCode&&(1==e?Q("password").focus():2==e&&Q("loginButton").click()),null!=a&&haltEvent(a)}function validateCreate(e,a){setDialogMode(0);var n=!1;if(n=!!(2097152&features)||0<Q("ausername").value.length&&-1==Q("ausername").value.indexOf(" ")&&-1==Q("ausername").value.indexOf('"')&&-1==Q("ausername").value.indexOf(","),n&=1==validateEmail(Q("aemail").value)&&0<Q("apassword1").value.length&&Q("apassword2").value==Q("apassword1").value,1==newAccountPass&&0==Q("anewaccountpass").value.length&&(n=!1),""==Q("apassword1").value)QH("passWarning",""),QV("passwordPolicyCallout",!1);else if(passRequirementsEx){0==checkPasswordRequirements(Q("apassword1").value,passRequirements)?(n=!1,QH("passWarning","<span style=color:red><b>Password Policy</b><span>"),QV("passwordPolicyCallout",!0),QH("passwordPolicyCallout",passwordPolicyText(Q("apassword1").value))):(QH("passWarning",""),QV("passwordPolicyCallout",!1))}else{var r=checkPasswordStrength(Q("apassword1").value);80<=r?QH("passWarning","<span style=color:green><b>Strong Password</b><span>"):60<=r?QH("passWarning","<span style=color:blue><b>Good Password</b><span>"):QH("passWarning","<span style=color:red><b>Weak Password</b><span>")}QE("createButton",n),null!=a&&13==a.keyCode&&(1==e&&Q("aemail").focus(),2==e&&Q("apassword1").focus(),3==e&&Q("apassword2").focus(),4==e&&Q("apasswordhint").focus(),5==e&&(1==newAccountPass?Q("anewaccountpass").focus():Q("createButton").click()),6==e&&Q("createButton").click()),null!=a&&haltEvent(a)}function validatePassReset(e,a){setDialogMode(0);var n=0<Q("rapassword1").value.length,r=0<Q("rapassword2").value.length&&Q("rapassword2").value==Q("rapassword1").value,t=n&&r;if(QS("rnuPass1").color=n?"black":"#7b241c",QS("rnuPass2").color=r?"black":"#7b241c",""==Q("rapassword1").value)QH("rpassWarning",""),QV("rpasswordPolicyCallout",!1);else if(passRequirementsEx){0==checkPasswordRequirements(Q("rapassword1").value,passRequirements)?(t=!1,QS("rnuPass1").color="#7b241c",QS("rnuPass2").color="#7b241c",QH("rpassWarning","<div style=color:red;cursor:pointer onclick=showPasswordPolicy()><b>Password Policy</b><div>"),QV("rpasswordPolicyCallout",!0),QH("rpasswordPolicyCallout",passwordPolicyText(Q("rapassword1").value))):(QH("rpassWarning",""),QV("rpasswordPolicyCallout",!1))}else{var s=checkPasswordStrength(Q("rapassword1").value);80<=s?QH("rpassWarning","<span style=color:green><b>Strong Password</b><span>"):60<=s?QH("rpassWarning","<span style=color:blue><b>Good Password</b><span>"):QH("rpassWarning","<span style=color:red><b>Weak Password</b><span>")}null!=a&&13==a.keyCode&&(2==e&&Q("rapassword1").focus(),3==e&&Q("rapassword2").focus(),4==e&&Q("rapasswordhint").focus(),6==e&&Q("resetPassButton").click()),null!=a&&haltEvent(a),QE("resetPassButton",t)}function validateReset(e){setDialogMode(0);var a=validateEmail(Q("remail").value);QE("eresetButton",a),null!=e&&13==e.keyCode&&1==a&&Q("eresetButton").click(),null!=e&&haltEvent(e)}function passwordPolicyText(e){var a="<div style=text-align:left>",n=strCount(e);return passRequirements.min&&(null==e||e.length<passRequirements.min)&&(a+=format("Minimum length of {0}",passRequirements.min)+"<br />"),passRequirements.max&&(null==e||e.length>passRequirements.max)&&(a+=format("Maximum length of {0}",passRequirements.max)+"<br />"),passRequirements.upper&&(null==e||n.upper<passRequirements.upper)&&(a+=format("{0} upper case",passRequirements.upper)+"<br />"),passRequirements.lower&&(null==e||n.lower<passRequirements.lower)&&(a+=format("{0} lower case",passRequirements.lower)+"<br />"),passRequirements.numeric&&(null==e||n.numeric<passRequirements.numeric)&&(a+=format("{0} numeric",passRequirements.numeric)+"<br />"),passRequirements.nonalpha&&(null==e||n.nonalpha<passRequirements.nonalpha)&&(a+=format("{0} non-alphanumeric",passRequirements.nonalpha)+"<br />"),a+="</div>"}function checkPasswordStrength(e){var a=0,n={},r=0,t={digits:/\d/.test(e),lower:/[a-z]/.test(e),upper:/[A-Z]/.test(e),nonWords:/\W/.test(e)};if(!e)return 0;for(var s=0;s<e.length;s++)n[e[s]]=(n[e[s]]||0)+1,a+=5/n[e[s]];for(var o in t)r+=1==t[o]?1:0;return parseInt(a+10*(r-1))}function checkPasswordRequirements(e,a){if(null==a||""==a||"object"!=typeof a)return!0;if(a.min&&e.length<a.min)return!1;if(a.max&&e.length>a.max)return!1;var n=strCount(e);return!(a.numeric&&n.numeric<a.numeric)&&(!(a.lower&&n.lower<a.lower)&&(!(a.upper&&n.upper<a.upper)&&!(a.nonalpha&&n.nonalpha<a.nonalpha)))}function strCount(e){var a={numeric:0,lower:0,upper:0,nonalpha:0};if("string"!=typeof e)return a;for(var n=0;n<e.length;n++)/\d/.test(e[n])&&a.numeric++,/[a-z]/.test(e[n])&&a.lower++,/[A-Z]/.test(e[n])&&a.upper++,/\W/.test(e[n])&&a.nonalpha++;return a}var xxdialogMode,xxdialogFunc,xxdialogButtons,xxdialogTag,xcheckTokenTimer=null;function checkTokenTimer(e){0==e&&null!=xcheckTokenTimer&&(clearInterval(xcheckTokenTimer),xcheckTokenTimer=null),1==e&&null==xcheckTokenTimer&&(xcheckTokenTimer=setInterval(checkToken,200))}function checkToken(){var e=Q("tokenInput").value,a=e.split(" ").join("");e!=a&&(Q("tokenInput").value=a),QE("tokenOkButton",6==Q("tokenInput").value.length||8==Q("tokenInput").value.length||44==Q("tokenInput").value.length)}function resetCheckToken(){var e=Q("resetTokenInput").value,a=e.split(" ").join("");e!=a&&(Q("resetTokenInput").value=a),QE("resetTokenOkButton",6==Q("resetTokenInput").value.length||8==Q("resetTokenInput").value.length||44==Q("resetTokenInput").value.length)}var xxcurrentView=0;function setDialogMode(e,a,n,r,t,s){xxdialogMode=e,xxdialogFunc=r,xxdialogButtons=n,xxdialogTag=s,QE("idx_dlgOkButton",!0),QV("idx_dlgOkButton",1&n),QV("idx_dlgCancelButton",2&n),QV("id_dialogclose",2&n||8&n),QV("idx_dlgButtonBar",7&n),a&&QH("id_dialogtitle",a);for(var o=1;o<24;o++)QV("dialog"+o,o==e);QV("dialog",e),t&&(2==e?QH("id_dialogOptions",t):QH("id_dialogMessage",t))}function dialogclose(e){var a=xxdialogFunc,n=xxdialogButtons,r=xxdialogTag;setDialogMode(),(8&n||e)&&a&&a(e,r)}function center(){QS("dialog").left=(getDocWidth()-400)/2+"px"}function messagebox(e,a){QH("id_dialogMessage",a),setDialogMode(1,e,1)}function statusbox(e,a){QH("id_dialogMessage",a),setDialogMode(1,e)}function getDocWidth(){return window.innerWidth?window.innerWidth:document.documentElement&&document.documentElement.clientWidth&&0!=document.documentElement.clientWidth?document.documentElement.clientWidth:document.getElementsByTagName("body")[0].clientWidth}function haltEvent(e){return e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1}function haltReturn(e){13==e.keyCode&&haltEvent(e)}function validateEmail(e){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function format(e){var n=Array.prototype.slice.call(arguments,1);return e.replace(/{(\d+)}/g,function(e,a){return void 0!==n[a]?n[a]:e})}</script>
\ No newline at end of file
views/login-mobile.handlebars
+6 -4
@@ -267,6 +267,8 @@
267 </div>
268 <script>
269 'use strict';
270 + var loginMode = '{{{loginmode}}}';
271 + var newAccount = '{{{newAccount}}}';
272 var passhint = '{{{passhint}}}';
273 var newAccountPass = parseInt('{{{newAccountPass}}}');
274 var emailCheck = ('{{{emailcheck}}}' == 'true');
@@ -309,14 +311,14 @@
311 center();
312 validateLogin();
313 validateCreate();
312 - if ('{{loginmode}}' != '') { go(parseInt('{{loginmode}}')); } else { go(1); }
313 - QV('newAccountDiv', ('{{{newAccount}}}' === '1') || ('{{{newAccount}}}' === 'true')); // If new accounts are not allowed, don't display the new account link.
314 + if (loginMode.length != 0) { go(parseInt(loginMode)); } else { go(1); }
315 + QV('newAccountDiv', (newAccount === '1') || (newAccount === 'true')); // If new accounts are not allowed, don't display the new account link.
316 if ((passRequirements.hint === true) && (passhint != null) && (passhint.length > 0)) { QV('showPassHintLink', true); }
317 QV('newAccountPass', (newAccountPass == 1));
318 QV('resetAccountDiv', (emailCheck == true));
319 QV('hrAccountDiv', (emailCheck == true) || (newAccountPass == 1));
320
319 - if ('{{loginmode}}' == '4') {
321 + if (loginMode == '4') {
322 try { if (hardwareKeyChallenge.length > 0) { hardwareKeyChallenge = JSON.parse(hardwareKeyChallenge); } else { hardwareKeyChallenge = null; } } catch (ex) { hardwareKeyChallenge = null }
323 if ((hardwareKeyChallenge != null) && (hardwareKeyChallenge.type == 'webAuthn')) {
324 hardwareKeyChallenge.challenge = Uint8Array.from(atob(hardwareKeyChallenge.challenge), function (c) { return c.charCodeAt(0) }).buffer;
@@ -347,7 +349,7 @@
349 }
350 }
351
350 - if ('{{loginmode}}' == '5') {
352 + if (loginMode == '5') {
353 try { if (hardwareKeyChallenge.length > 0) { hardwareKeyChallenge = JSON.parse(hardwareKeyChallenge); } else { hardwareKeyChallenge = null; } } catch (ex) { hardwareKeyChallenge = null }
354 if ((hardwareKeyChallenge != null) && (hardwareKeyChallenge.type == 'webAuthn')) {
355 hardwareKeyChallenge.challenge = Uint8Array.from(atob(hardwareKeyChallenge.challenge), function (c) { return c.charCodeAt(0) }).buffer;
views/login.handlebars
+6 -4
@@ -260,6 +260,8 @@
260 <script>
261 'use strict';
262 var passhint = '{{{passhint}}}';
263 + var loginMode = '{{{loginmode}}}';
264 + var newAccount = '{{{newAccount}}}';
265 var newAccountPass = parseInt('{{{newAccountPass}}}');
266 var emailCheck = ('{{{emailcheck}}}' == 'true');
267 var passRequirements = '{{{passRequirements}}}';
@@ -318,14 +320,14 @@
320
321 validateLogin();
322 validateCreate();
321 - if ('{{loginmode}}' != '') { go(parseInt('{{loginmode}}')); } else { go(1); }
322 - QV('newAccountDiv', ('{{{newAccount}}}' === '1') || ('{{{newAccount}}}' === 'true')); // If new accounts are not allowed, don't display the new account link.
323 + if (loginMode.length != 0) { go(parseInt(loginMode)); } else { go(1); }
324 + QV('newAccountDiv', (newAccount === '1') || (newAccount === 'true')); // If new accounts are not allowed, don't display the new account link.
325 if ((passhint != null) && (passhint.length > 0)) { QV('showPassHintLink', true); }
326 QV('newAccountPass', (newAccountPass == 1));
327 QV('resetAccountDiv', (emailCheck == true));
328 QV('hrAccountDiv', (emailCheck == true) || (newAccountPass == 1));
329
328 - if ('{{loginmode}}' == '4') {
330 + if (loginMode == '4') {
331 try { if (hardwareKeyChallenge.length > 0) { hardwareKeyChallenge = JSON.parse(hardwareKeyChallenge); } else { hardwareKeyChallenge = null; } } catch (ex) { hardwareKeyChallenge = null }
332 if ((hardwareKeyChallenge != null) && (hardwareKeyChallenge.type == 'webAuthn')) {
333 hardwareKeyChallenge.challenge = Uint8Array.from(atob(hardwareKeyChallenge.challenge), function (c) { return c.charCodeAt(0) }).buffer;
@@ -358,7 +360,7 @@
360 }
361 }
362
361 - if ('{{loginmode}}' == '5') {
363 + if (loginMode == '5') {
364 try { if (hardwareKeyChallenge.length > 0) { hardwareKeyChallenge = JSON.parse(hardwareKeyChallenge); } else { hardwareKeyChallenge = null; } } catch (ex) { hardwareKeyChallenge = null }
365 if ((hardwareKeyChallenge != null) && (hardwareKeyChallenge.type == 'webAuthn')) {
366 hardwareKeyChallenge.challenge = Uint8Array.from(atob(hardwareKeyChallenge.challenge), function (c) { return c.charCodeAt(0) }).buffer;
views/translations/agentinvite-min_fr.handlebars
+1 -1
@@ -1 +1 @@
1 -<!doctypehtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><title>MeshCentral - Agent Installation</title><style>.tab{overflow:hidden;border:1px solid #ccc;background-color:#f1f1f1}.tab button{background-color:inherit;float:left;border:none;outline:0;cursor:pointer;padding:14px 16px;transition:.3s}.tab button:hover{background-color:#ddd}.tab button.active{background-color:#8f8}.tabcontent{display:none;padding:6px 12px;border:1px solid #ccc;border-top:none}</style><body id=body onload='"undefined"!=typeof startup&&startup()'style=display:none;overflow:hidden><div id=container><div id=masthead class=noselect style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left;height:66px;color:#c8c8c8;padding-left:20px;padding-top:8px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div><p id=logoutControl style="color:#fff;font-size:11px;margin:10px 10px 0">{{{logoutControl}}}</div><div id=page_leftbar><div style=height:16px></div></div><div id=topbar class="noselect style3"style=height:24px;position:relative><div id=uiMenuButton title="User interface selection"onclick=showUserInterfaceSelectMenu()>♦<div id=uiMenu style=display:none><div id=uiViewButton1 class=uiSelector onclick=userInterfaceSelectMenu(1) title="Left bar interface"><div class=uiSelector1></div></div><div id=uiViewButton2 class=uiSelector onclick=userInterfaceSelectMenu(2) title="Top bar interface"><div class=uiSelector2></div></div><div id=uiViewButton3 class=uiSelector onclick=userInterfaceSelectMenu(3) title="Fixed width interface"><div class=uiSelector3></div></div><div id=uiViewButton4 class=uiSelector onclick=toggleNightMode() title="Basculer mode nuit"><div class=uiSelector4></div></div></div></div></div><div id=column_l style="max-height:calc(100vh - 135px);overflow-y:auto"><h1>Remote Agent Installation<span id=groupname></span></h1><p>You have been invited to install a software that will allow a remote operator to fully access your computer remotely including the desktop and files. Only follow the instructions below if this invitation was expected and you know who will be accessing your computer. Selecting your operation system and follow the instructions below.<div><div class=tab><button id=twintab64 class=tablinks onclick='openTab(event,"wintab64")'>Windows 64bit</button><button id=twintab32 class=tablinks onclick='openTab(event,"wintab32")'>Windows 32bit</button><button id=tlinuxtab class=tablinks onclick='openTab(event,"linuxtab")'>Linux</button><button id=tmacostab class=tablinks onclick='openTab(event,"macostab")'>MacOS</button></div><div id=wintab64 class=tabcontent style=background-color:#fff;color:#000><h3>Microsoft™ Windows 64bit</h3><p><a id=win64url>Download the software here</a>, run it and press "Install" or "Connect".<div style=text-align:center><img class=winagent-img src=images/winagent.png></div></div><div id=wintab32 class=tabcontent style=background-color:#fff;color:#000><h3>Microsoft™ Windows 32bit</h3><p><a id=win32url>Download the software here</a>, run it and press "Install" or "Connect".<div style=text-align:center><img class=winagent-img src=images/winagent.png></div></div><div id=linuxtab class=tabcontent style=background-color:#fff;color:#000><h3>Linux</h3><p>To install, cut and paste the following command in a root terminal.<div id=linuxinstall style="font-family:courier,'courier new',monospace;margin-left:30px"></div><input type=button value="Copy to clipboard"style=margin-left:30px;margin-top:4px onclick=copyToClipLinuxInstall()><p>To uninstall, cut and paste the following command as root.<div id=unlinuxinstall style="font-family:courier,'courier new',monospace;margin-left:30px"></div><input type=button value="Copy to clipboard"style=margin-left:30px;margin-top:4px onclick=copyToClipLinuxUnInstall()><br><br></div><div id=macostab class=tabcontent style=background-color:#fff;color:#000><h3>Apple™ MacOS</h3><p><a id=macosurl>Download the installer here</a>, right click on it or press "control" and click on the file. Then select "Open" and follow the instructions.<div style=text-align:center><img src=images/macosagent.png></div></div></div></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right></table></div></div><script>"use strict";var linuxInstall,linuxUnInstall,uiMode=parseInt(getstore("uiMode",1)),webPageStackMenu=!1,webPageFullScreen=!0,nightMode="1"==getstore("_nightMode","0"),domain="{{{domain}}}",domainUrl="{{{domainurl}}}",meshid="{{{meshid}}}",serverPort="{{{serverport}}}",serverHttps="{{{serverhttps}}}",serverNoProxy="{{{servernoproxy}}}",installFlags="{{{installflags}}}",groupName=decodeURIComponent("{{{meshname}}}");function showUserInterfaceSelectMenu(){Q("uiViewButton1").classList.remove("uiSelectorSel"),Q("uiViewButton2").classList.remove("uiSelectorSel"),Q("uiViewButton3").classList.remove("uiSelectorSel"),Q("uiViewButton4").classList.remove("uiSelectorSel");try{Q("uiViewButton"+uiMode).classList.add("uiSelectorSel")}catch(e){}QV("uiMenu","none"==QS("uiMenu").display),nightMode&&Q("uiViewButton4").classList.add("uiSelectorSel")}function userInterfaceSelectMenu(e){e&&putstore("uiMode",uiMode=e),webPageFullScreen=uiMode<3,webPageStackMenu=!0,toggleFullScreen(0),toggleStackMenu(0),QC("column_l").add("room4submenu")}function toggleNightMode(){(nightMode=!nightMode)?QC("body").add("night"):QC("body").remove("night"),putstore("_nightMode",nightMode?"1":"0")}function toggleFullScreen(e){1===e&&putstore("webPageFullScreen",webPageFullScreen=!webPageFullScreen);0==webPageFullScreen?(QC("body").remove("menu_stack"),QC("body").remove("fullscreen"),QC("body").remove("arg_hide")):QC("body").add("fullscreen"),QV("body",!0)}function toggleStackMenu(e){1==webPageFullScreen&&(1===e&&putstore("webPageStackMenu",webPageStackMenu=!webPageStackMenu),0==webPageStackMenu?QC("body").remove("menu_stack"):QC("body").add("menu_stack"))}function putstore(e,t){try{if("undefined"==typeof localStorage)return;localStorage.setItem(e,t)}catch(e){}}function getstore(e,t){try{if("undefined"==typeof localStorage)return t;var n=localStorage.getItem(e);return null==n||null==n?t:n}catch(e){return t}}function openTab(e,t){var n,s,l;for(s=document.getElementsByClassName("tabcontent"),n=0;n<s.length;n++)s[n].style.display="none";for(l=document.getElementsByClassName("tablinks"),n=0;n<l.length;n++)l[n].className=l[n].className.replace("actif","");document.getElementById(t).style.display="block",null!=e?e.currentTarget.className+="actif":document.getElementById("t"+t).className+="actif"}function setup(){var e=window.location.hostname,t=domainUrl.substring(0,domainUrl.length-1),n="meshagents?id=4&meshid="+meshid;if(0!=installFlags&&(n+="&installflags="+installFlags),Q("win64url").href=n,n="meshagents?id=3&meshid="+meshid,0!=installFlags&&(n+="&installflags="+installFlags),Q("win32url").href=n,n="meshosxagent?id=16&meshid="+meshid,Q("macosurl").href=n,1==serverHttps){var s=443==serverPort?"":":"+serverPort;linuxUnInstall=0==serverNoProxy?(linuxInstall="(wget https://"+e+s+domainUrl+"meshagents?script=1 --no-check-certificate -O ./meshinstall.sh || wget https://"+e+s+domainUrl+"meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh https://"+e+s+t+" '"+meshid+"'\r\n","(wget https://"+e+s+domainUrl+"meshagents?script=1 --no-check-certificate -O ./meshinstall.sh || wget https://"+e+s+domainUrl+"meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n"):(linuxInstall="wget https://"+e+s+domainUrl+"meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh https://"+e+s+t+" '"+meshid+"'\r\n","wget https://"+e+s+domainUrl+"meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n")}else{s=80==serverPort?"":":"+serverPort;linuxUnInstall=0==serverNoProxy?(linuxInstall="(wget http://"+e+s+domainUrl+"meshagents?script=1 -O ./meshinstall.sh || wget http://"+e+s+domainUrl+"meshagents?script=1 --no-proxy -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh http://"+e+s+t+" '"+meshid+"'\r\n","(wget http://"+e+s+domainUrl+"meshagents?script=1 -O ./meshinstall.sh || wget http://"+e+s+domainUrl+"meshagents?script=1 --no-proxy -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n"):(linuxInstall="wget http://"+e+s+domainUrl+"meshagents?script=1 --no-proxy -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh http://"+e+s+t+" '"+meshid+"'\r\n","wget http://"+e+s+domainUrl+"meshagents?script=1 --no-proxy -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n")}QH("linuxinstall",linuxInstall),QH("unlinuxinstall",linuxUnInstall),0<=navigator.userAgent.indexOf("Win64")?openTab(null,"wintab64"):0<=navigator.userAgent.indexOf("Windows")?openTab(null,"wintab32"):0<=navigator.userAgent.indexOf("Linux")?openTab(null,"linuxtab"):0<=navigator.userAgent.indexOf("Macintosh")?openTab(null,"macostab"):openTab(null,"wintab64")}function copyToClipLinuxInstall(){copyTextToClip(linuxInstall)}function copyToClipLinuxUnInstall(){copyTextToClip(linuxUnInstall)}function copyTextToClip(e){var t=document.createElement("DIV");t.textContent=e,document.body.appendChild(t),function(e){if(document.selection)(t=document.body.createTextRange()).moveToElementText(e),t.select();else if(window.getSelection){var t;(t=document.createRange()).selectNode(e),window.getSelection().removeAllRanges(),window.getSelection().addRange(t)}}(t),document.execCommand("copy"),t.remove()}""!=groupName&&QH("groupname"," for "+groupName),userInterfaceSelectMenu(),setup()</script>
\ No newline at end of file
1 +<!doctypehtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><title>MeshCentral - Agent Installation</title><style>.tab{overflow:hidden;border:1px solid #ccc;background-color:#f1f1f1}.tab button{background-color:inherit;float:left;border:none;outline:0;cursor:pointer;padding:14px 16px;transition:.3s}.tab button:hover{background-color:#ddd}.tab button.active{background-color:#8f8}.tabcontent{display:none;padding:6px 12px;border:1px solid #ccc;border-top:none}</style><body id=body onload='"undefined"!=typeof startup&&startup()'style=display:none;overflow:hidden><div id=container><div id=masthead class=noselect style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left;height:66px;color:#c8c8c8;padding-left:20px;padding-top:8px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div><p id=logoutControl style="color:#fff;font-size:11px;margin:10px 10px 0">{{{logoutControl}}}</div><div id=page_leftbar><div style=height:16px></div></div><div id=topbar class="noselect style3"style=height:24px;position:relative><div id=uiMenuButton title="User interface selection"onclick=showUserInterfaceSelectMenu()>♦<div id=uiMenu style=display:none><div id=uiViewButton1 class=uiSelector onclick=userInterfaceSelectMenu(1) title="Left bar interface"><div class=uiSelector1></div></div><div id=uiViewButton2 class=uiSelector onclick=userInterfaceSelectMenu(2) title="Top bar interface"><div class=uiSelector2></div></div><div id=uiViewButton3 class=uiSelector onclick=userInterfaceSelectMenu(3) title="Fixed width interface"><div class=uiSelector3></div></div><div id=uiViewButton4 class=uiSelector onclick=toggleNightMode() title="Basculer mode nuit"><div class=uiSelector4></div></div></div></div></div><div id=column_l style="max-height:calc(100vh - 135px);overflow-y:auto"><h1>Remote Agent Installation<span id=groupname></span></h1><p>You have been invited to install a software that will allow a remote operator to fully access your computer remotely including the desktop and files. Only follow the instructions below if this invitation was expected and you know who will be accessing your computer. Selecting your operation system and follow the instructions below.<div><div class=tab><button id=twintab64 class=tablinks onclick='openTab(event,"wintab64")'>Windows 64bit</button> <button id=twintab32 class=tablinks onclick='openTab(event,"wintab32")'>Windows 32bit</button> <button id=tlinuxtab class=tablinks onclick='openTab(event,"linuxtab")'>Linux</button> <button id=tmacostab class=tablinks onclick='openTab(event,"macostab")'>MacOS</button></div><div id=wintab64 class=tabcontent style=background-color:#fff;color:#000><h3>Microsoft™ Windows 64bit</h3><p><a id=win64url>Download the software here</a>, run it and press "Install" or "Connect".<div style=text-align:center><img class=winagent-img src=images/winagent.png></div></div><div id=wintab32 class=tabcontent style=background-color:#fff;color:#000><h3>Microsoft™ Windows 32bit</h3><p><a id=win32url>Download the software here</a>, run it and press "Install" or "Connect".<div style=text-align:center><img class=winagent-img src=images/winagent.png></div></div><div id=linuxtab class=tabcontent style=background-color:#fff;color:#000><h3>Linux</h3><p>To install, cut and paste the following command in a root terminal.<div id=linuxinstall style="font-family:courier,'courier new',monospace;margin-left:30px"></div><input type=button value="Copy to clipboard"style=margin-left:30px;margin-top:4px onclick=copyToClipLinuxInstall()><p>To uninstall, cut and paste the following command as root.<div id=unlinuxinstall style="font-family:courier,'courier new',monospace;margin-left:30px"></div><input type=button value="Copy to clipboard"style=margin-left:30px;margin-top:4px onclick=copyToClipLinuxUnInstall()><br><br></div><div id=macostab class=tabcontent style=background-color:#fff;color:#000><h3>Apple™ MacOS</h3><p><a id=macosurl>Download the installer here</a>, right click on it or press "control" and click on the file. Then select "Open" and follow the instructions.<div style=text-align:center><img src=images/macosagent.png></div></div></div></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right></table></div></div><script>"use strict";var linuxInstall,linuxUnInstall,uiMode=parseInt(getstore("uiMode",1)),webPageStackMenu=!1,webPageFullScreen=!0,nightMode="1"==getstore("_nightMode","0"),domain="{{{domain}}}",domainUrl="{{{domainurl}}}",meshid="{{{meshid}}}",serverPort="{{{serverport}}}",serverHttps="{{{serverhttps}}}",serverNoProxy="{{{servernoproxy}}}",installFlags="{{{installflags}}}",groupName=decodeURIComponent("{{{meshname}}}");function showUserInterfaceSelectMenu(){Q("uiViewButton1").classList.remove("uiSelectorSel"),Q("uiViewButton2").classList.remove("uiSelectorSel"),Q("uiViewButton3").classList.remove("uiSelectorSel"),Q("uiViewButton4").classList.remove("uiSelectorSel");try{Q("uiViewButton"+uiMode).classList.add("uiSelectorSel")}catch(e){}QV("uiMenu","none"==QS("uiMenu").display),nightMode&&Q("uiViewButton4").classList.add("uiSelectorSel")}function userInterfaceSelectMenu(e){e&&putstore("uiMode",uiMode=e),webPageFullScreen=uiMode<3,webPageStackMenu=!0,toggleFullScreen(0),toggleStackMenu(0),QC("column_l").add("room4submenu")}function toggleNightMode(){(nightMode=!nightMode)?QC("body").add("night"):QC("body").remove("night"),putstore("_nightMode",nightMode?"1":"0")}function toggleFullScreen(e){1===e&&putstore("webPageFullScreen",webPageFullScreen=!webPageFullScreen);0==webPageFullScreen?(QC("body").remove("menu_stack"),QC("body").remove("fullscreen"),QC("body").remove("arg_hide")):QC("body").add("fullscreen"),QV("body",!0)}function toggleStackMenu(e){1==webPageFullScreen&&(1===e&&putstore("webPageStackMenu",webPageStackMenu=!webPageStackMenu),0==webPageStackMenu?QC("body").remove("menu_stack"):QC("body").add("menu_stack"))}function putstore(e,t){try{if("undefined"==typeof localStorage)return;localStorage.setItem(e,t)}catch(e){}}function getstore(e,t){try{if("undefined"==typeof localStorage)return t;var n=localStorage.getItem(e);return null==n||null==n?t:n}catch(e){return t}}function openTab(e,t){var n,s,l;for(s=document.getElementsByClassName("tabcontent"),n=0;n<s.length;n++)s[n].style.display="none";for(l=document.getElementsByClassName("tablinks"),n=0;n<l.length;n++)l[n].className=l[n].className.replace("actif","");document.getElementById(t).style.display="block",null!=e?e.currentTarget.className+="actif":document.getElementById("t"+t).className+="actif"}function setup(){var e=window.location.hostname,t=domainUrl.substring(0,domainUrl.length-1),n="meshagents?id=4&meshid="+meshid;if(0!=installFlags&&(n+="&installflags="+installFlags),Q("win64url").href=n,n="meshagents?id=3&meshid="+meshid,0!=installFlags&&(n+="&installflags="+installFlags),Q("win32url").href=n,n="meshosxagent?id=16&meshid="+meshid,Q("macosurl").href=n,1==serverHttps){var s=443==serverPort?"":":"+serverPort;linuxUnInstall=0==serverNoProxy?(linuxInstall="(wget https://"+e+s+domainUrl+"meshagents?script=1 --no-check-certificate -O ./meshinstall.sh || wget https://"+e+s+domainUrl+"meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh https://"+e+s+t+" '"+meshid+"'\r\n","(wget https://"+e+s+domainUrl+"meshagents?script=1 --no-check-certificate -O ./meshinstall.sh || wget https://"+e+s+domainUrl+"meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n"):(linuxInstall="wget https://"+e+s+domainUrl+"meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh https://"+e+s+t+" '"+meshid+"'\r\n","wget https://"+e+s+domainUrl+"meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n")}else{s=80==serverPort?"":":"+serverPort;linuxUnInstall=0==serverNoProxy?(linuxInstall="(wget http://"+e+s+domainUrl+"meshagents?script=1 -O ./meshinstall.sh || wget http://"+e+s+domainUrl+"meshagents?script=1 --no-proxy -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh http://"+e+s+t+" '"+meshid+"'\r\n","(wget http://"+e+s+domainUrl+"meshagents?script=1 -O ./meshinstall.sh || wget http://"+e+s+domainUrl+"meshagents?script=1 --no-proxy -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n"):(linuxInstall="wget http://"+e+s+domainUrl+"meshagents?script=1 --no-proxy -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh http://"+e+s+t+" '"+meshid+"'\r\n","wget http://"+e+s+domainUrl+"meshagents?script=1 --no-proxy -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n")}QH("linuxinstall",linuxInstall),QH("unlinuxinstall",linuxUnInstall),0<=navigator.userAgent.indexOf("Win64")?openTab(null,"wintab64"):0<=navigator.userAgent.indexOf("Windows")?openTab(null,"wintab32"):0<=navigator.userAgent.indexOf("Linux")?openTab(null,"linuxtab"):0<=navigator.userAgent.indexOf("Macintosh")?openTab(null,"macostab"):openTab(null,"wintab64")}function copyToClipLinuxInstall(){copyTextToClip(linuxInstall)}function copyToClipLinuxUnInstall(){copyTextToClip(linuxUnInstall)}function copyTextToClip(e){var t=document.createElement("DIV");t.textContent=e,document.body.appendChild(t),function(e){if(document.selection)(t=document.body.createTextRange()).moveToElementText(e),t.select();else if(window.getSelection){var t;(t=document.createRange()).selectNode(e),window.getSelection().removeAllRanges(),window.getSelection().addRange(t)}}(t),document.execCommand("copy"),t.remove()}""!=groupName&&QH("groupname"," for "+groupName),userInterfaceSelectMenu(),setup()</script>
\ No newline at end of file
views/translations/default-min_fr.handlebars
+1 -1
@@ -1,4 +1,4 @@
1 -<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link rel="shortcut icon"type=image/x-icon href={{{domainurl}}}favicon.ico><link keeplink=1 type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><link type=text/css href=styles/ol.css media=screen rel=stylesheet title=CSS><link type=text/css href=styles/ol3-contextmenu.min.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><script src=scripts/meshcentral.js></script><script src=scripts/amt-0.2.0.js></script><script src=scripts/amt-wsman-0.2.0.js></script><script src=scripts/amt-desktop-0.0.2.js></script><script src=scripts/amt-terminal-0.0.2.js></script><script src=scripts/zlib.js></script><script src=scripts/zlib-inflate.js></script><script src=scripts/zlib-adler32.js></script><script src=scripts/zlib-crc32.js></script><script src=scripts/amt-redir-ws-0.1.0.js></script><script src=scripts/amt-wsman-ws-0.2.0.js></script><script src=scripts/agent-redir-ws-0.1.1.js></script><script src=scripts/agent-redir-rtc-0.1.0.js></script><script src=scripts/agent-desktop-0.0.2.js></script><script src=scripts/qrcode.min.js></script><script keeplink=1 src=scripts/u2f-api.js></script><script keeplink=1 src=scripts/charts.js></script><script keeplink=1 src=scripts/filesaver.js></script><script keeplink=1 src=scripts/ol.js></script><script keeplink=1 src=scripts/ol3-contextmenu.js></script><title>{{{title}}}</title><body id=body onload='"undefined"!=typeof startup&&startup()'oncontextmenu=handleContextMenu(event) style=display:none;min-width:495px><div id=contextMenu class="contextMenu noselect"style=display:none><div id=cxinfo class=cmtext onclick=cmaction(1,event)><b>Information</b></div><div id=cxdesktop class=cmtext onclick=cmaction(3,event)>Desktop</div><div id=cxterminal class=cmtext onclick=cmaction(2,event)>Terminal</div><div id=cxfiles class=cmtext onclick=cmaction(4,event)>Files</div><div id=cxevents class=cmtext onclick=cmaction(5,event)>Events</div><div id=cxconsole class=cmtext onclick=cmaction(6,event)>Console</div><hr id=cxmgroupsplit><div id=cxmdesktop class=cmtext onclick=cmaction(7,event) style=display:none>Multi-Desktop</div></div><div id=meshContextMenu class="contextMenu noselect"style=display:none;min-width:0><div id=cxselectall class=cmtext onclick=cmmeshaction(1,event)>Tout Sélectionner</div><div id=cxselectnone class=cmtext onclick=cmmeshaction(2,event)>Rien sélectionner</div></div><div id=termShellContextMenu class="contextMenu noselect"style=display:none;min-width:0><div id=cxtermnorm class=cmtext onclick=cmtermaction(1,event)>Normal Connect</div><div id=cxtermps class=cmtext onclick=cmtermaction(2,event)>PowerShell Connect</div></div><div id=container><div id=notifiyBox class=notifiyBox style=display:none></div><div id=masthead class=noselect><div class=title>{{{title}}}</div><div class=title2>{{{title2}}}</div><div style=float:right><div id=notificationCount onclick=clickNotificationIcon() class=unselectable style=display:none title="Click to view current notifications">0</div></div><p id=logoutControl>{{{logoutControl}}}<span id=idleTimeoutNotify style=color:#ff0></span></div><div id=page_leftbar><div style=height:16px></div><div id=LeftMenuMyDevices tabindex=0 class="lbbutton lbbuttonsel"title="Mes Appareils"onclick=go(1,event) onkeypress='"Enter"==event.key&&go(1)'><div class=lb2></div></div><div id=LeftMenuMyAccount tabindex=0 class=lbbutton title="Mon Compte"onclick=go(2,event) onkeypress='"Enter"==event.key&&go(2)'><div class=lb1></div></div><div id=LeftMenuMyEvents tabindex=0 class=lbbutton title="Mes Événements"onclick=go(3,event) onkeypress='"Enter"==event.key&&go(3)'><div class=lb3></div></div><div id=LeftMenuMyFiles tabindex=0 class=lbbutton style=display:none title="Mes Dossiers"onclick=go(5,event) onkeypress='"Enter"==event.key&&go(5)'><div class=lb4></div></div><div id=LeftMenuMyUsers tabindex=0 class=lbbutton style=display:none title="Mes Utilisateurs"onclick=go(4,event) onkeypress='"Enter"==event.key&&go(4)'><div class=lb5></div></div><div id=LeftMenuMyServer tabindex=0 class=lbbutton style=display:none title="Mon Serveur"onclick=go(6,event) onkeypress='"Enter"==event.key&&go(6)'><div class=lb6></div></div></div><div id=topbar class=noselect><div><div style=position:relative><div tabindex=0 id=uiMenuButton title="User interface selection"onclick=showUserInterfaceSelectMenu() onkeypress='"Enter"==event.key&&showUserInterfaceSelectMenu()'>♦<div id=uiMenu style=display:none><div tabindex=0 id=uiViewButton1 class=uiSelector onclick=userInterfaceSelectMenu(1) title="Left bar interface"onkeypress='"Enter"==event.key&&userInterfaceSelectMenu(1)'><div class=uiSelector1></div></div><div tabindex=0 id=uiViewButton2 class=uiSelector onclick=userInterfaceSelectMenu(2) title="Top bar interface"onkeypress='"Enter"==event.key&&userInterfaceSelectMenu(2)'><div class=uiSelector2></div></div><div tabindex=0 id=uiViewButton3 class=uiSelector onclick=userInterfaceSelectMenu(3) title="Fixed width interface"onkeypress='"Enter"==event.key&&userInterfaceSelectMenu(3)'><div class=uiSelector3></div></div><div tabindex=0 id=uiViewButton4 class=uiSelector onclick=toggleNightMode() title="Basculer mode nuit"onkeypress='"Enter"==event.key&&toggleNightMode()'><div class=uiSelector4></div></div></div></div><table id=MainMenuSpan cellpadding=0 cellspacing=0 class=style1><tr><td tabindex=0 id=MainMenuMyDevices class="topbar_td style3x"onclick=go(1,event) onkeypress='"Enter"==event.key&&go(1)'>Mes Appareils<td tabindex=0 id=MainMenuMyAccount class="topbar_td style3x"onclick=go(2,event) onkeypress='"Enter"==event.key&&go(2)'>Mon Compte<td tabindex=0 id=MainMenuMyEvents class="topbar_td style3x"onclick=go(3,event) onkeypress='"Enter"==event.key&&go(3)'>Mes Événements<td tabindex=0 id=MainMenuMyFiles class="topbar_td style3x"onclick=go(5,event) onkeypress='"Enter"==event.key&&go(5)'>Mes Dossiers<td tabindex=0 id=MainMenuMyUsers class="topbar_td style3x"onclick=go(4,event) onkeypress='"Enter"==event.key&&go(4)'>Mes Utilisateurs<td tabindex=0 id=MainMenuMyServer class="topbar_td style3x"onclick=go(6,event) onkeypress='"Enter"==event.key&&go(6)'>Mon Serveur<td class="topbar_td_end style3">&nbsp;</table><div id=MainSubMenuSpan style=display:none><table id=MainSubMenu cellpadding=0 cellspacing=0 class=style1><tr><td tabindex=0 id=MainDev class="topbar_td style3x"onclick=go(10,event) onkeypress='"Enter"==event.key&&go(10)'>General<td tabindex=0 id=MainDevDesktop class="topbar_td style3x"onclick=go(11,event) onkeypress='"Enter"==event.key&&go(11)'>Desktop<td tabindex=0 id=MainDevTerminal class="topbar_td style3x"onclick=go(12,event) onkeypress='"Enter"==event.key&&go(12)'>Terminal<td tabindex=0 id=MainDevFiles class="topbar_td style3x"onclick=go(13,event) onkeypress='"Enter"==event.key&&go(13)'>Files<td tabindex=0 id=MainDevEvents class="topbar_td style3x"onclick=go(16,event) onkeypress='"Enter"==event.key&&go(16)'>Events<td tabindex=0 id=MainDevInfo class="topbar_td style3x"onclick=go(17,event) onkeypress='"Enter"==event.key&&go(17)'>Details<td tabindex=0 id=MainDevAmt class="topbar_td style3x"onclick=go(14,event) onkeypress='"Enter"==event.key&&go(14)'>Intel® AMT<td tabindex=0 id=MainDevConsole class="topbar_td style3x"onclick=go(15,event) onkeypress='"Enter"==event.key&&go(15)'>Console<td tabindex=0 id=MainDevPlugins class="topbar_td style3x"onclick=go(19,event) onkeypress='"Enter"==event.key&&go(19)'>Plugins<td class="topbar_td_end style3">&nbsp;</table></div><div id=MeshSubMenuSpan style=display:none><table id=MeshSubMenu cellpadding=0 cellspacing=0 class=style1><tr><td tabindex=0 id=MeshGeneral class="topbar_td style3x"onclick=go(20,event) onkeypress='"Enter"==event.key&&go(20)'>General<td class="topbar_td_end style3">&nbsp;</table></div><div id=UserSubMenuSpan style=display:none><table id=UserSubMenu cellpadding=0 cellspacing=0 class=style1><tr><td tabindex=0 id=UserGeneral class="topbar_td style3x"onclick=go(30,event) onkeypress='"Enter"==event.key&&go(30)'>General<td tabindex=0 id=UserEvents class="topbar_td style3x"onclick=go(31,event) onkeypress='"Enter"==event.key&&go(31)'>Events<td class="topbar_td_end style3">&nbsp;</table></div><div id=ServerSubMenuSpan style=display:none><table id=ServerSubMenu cellpadding=0 cellspacing=0 class=style1><tr><td tabindex=0 id=ServerGeneral class="topbar_td style3x"onclick=go(6,event) onkeypress='"Enter"==event.key&&go(6)'>General<td tabindex=0 id=ServerStats class="topbar_td style3x"onclick=go(40,event) onkeypress='"Enter"==event.key&&go(40)'>Stats<td tabindex=0 id=ServerConsole class="topbar_td style3x"onclick=go(115,event) onkeypress='"Enter"==event.key&&go(115)'>Console<td tabindex=0 id=ServerTrace class="topbar_td style3x"onclick=go(41,event) onkeypress='"Enter"==event.key&&go(41)'>Trace<td class="topbar_td_end style3">&nbsp;</table></div><div id=UserDummyMenuSpan><table id=UserDummyMenu cellpadding=0 cellspacing=0 class=style1><tr><td class=style3>&nbsp;</table></div></div></div></div><div id=column_l><div id=p0 style=display:none><div id=p0message><span id=p0span>Server disconnected</span>,<href onclick=reload() style=cursor:pointer><u>click to reconnect</u></href>.</div></div><div id=p1 style=display:none><div style=display:none id=devListToolbarViewIcons><div tabindex=0 id=devViewButton1 class=viewSelector onclick=onDeviceViewChange(1) onkeypress='"Enter"==event.key&&onDeviceViewChange(1)'title=Columns><div class=viewSelector2></div></div><div tabindex=0 id=devViewButton2 class=viewSelector onclick=onDeviceViewChange(2) onkeypress='"Enter"==event.key&&onDeviceViewChange(2)'title=List><div class=viewSelector1></div></div><div tabindex=0 id=devViewButton3 class=viewSelector onclick=onDeviceViewChange(3) onkeypress='"Enter"==event.key&&onDeviceViewChange(3)'title=Desktops><div class=viewSelector3></div></div><div tabindex=0 id=devViewButton4 class=viewSelector onclick=onDeviceViewChange(4) onkeypress='"Enter"==event.key&&onDeviceViewChange(4)'title=Carte><div class=viewSelector4></div></div></div><div><h1>Mes Appareils</h1></div><table id=devListToolbarSpan class=noselect><tr><td class=h1><td id=devListToolbar class=style14 style=display:none>&nbsp;&nbsp;<input type=button id=SelectAllButton onclick=selectallButtonFunction() value="Tout Sélectionner">&nbsp; <input type=button id=GroupActionButton disabled value="Action de groupe"onclick=groupActionFunction()>&nbsp; <input id=SearchInput placeholder=Filter onchange=masterUpdate(5) onkeyup=masterUpdate(5) autocomplete=off onfocus=onSearchFocus(1) onblur=onSearchFocus(0)>&nbsp;<label><input type=checkbox id=RealNameCheckBox onclick=onRealNameCheckBox()><span title="Show devices operating system name">Nom du système</span></label><td id=kvmListToolbar class=style14 style=display:none>&nbsp;&nbsp;<span id=kvmMultiConnectButtonSpan><input type=button onclick=connectAllKvmFunction() value="Connect All">&nbsp;</span><input type=button onclick=disconnectAllKvmFunction() value="Disconnect All">&nbsp;<span id=kvmAutoConnectButtonSpan><label><input type=checkbox id=autoConnectDesktopCheckbox onclick=autoConnectDesktops(event) title="Connexion automatique">Automatique&nbsp;</label></span><input type=button onclick=showMultiDesktopSettings() value=Settings>&nbsp;<td id=devMapToolbar class=style14 style=display:none>&nbsp;&nbsp;<input id=mapSearchLocation placeholder="Recherche de lieu"onfocus=onMapSearchFocus(1) onblur=onMapSearchFocus(0)> <input type=button value=Chercher title="Recherche de lieu"onclick=getSearchLocation()> <input type=button id=refreshmap title="Reset map view"value=Réinitialiser onclick=refreshMap(!1,!0)><td class=auto-style1 style=height:100%><div style=display:none id=devListToolbarView>View<select id=viewselect onchange=onDeviceViewChange()><option value=1>Columns<option value=2>List<option value=3>Desktops<option id=viewselectmapoption value=4>Carte</select></div><div style=display:none id=devListToolbarSort>Trier<select id=sortselect onchange=masterUpdate(6)><option>Groupe<option>Power<option>Device<option>Tags</select>&nbsp;</div><div style=display:none id=devListToolbarSize>Taille<select id=sizeselect onchange=onDeviceViewChange()><option value=0>Petit<option value=1>Medium<option value=2>Grand</select>&nbsp;</div><td class=h2></table><div id=NoMeshesPanel style=display:none><table><tr><td valign=top style=width:50px><img src=images/info.png><td><div id=getStarted1>To get started,<a href=# onclick="return account_createMesh()"><strong>click here to create a device group</strong></a>.</div><div id=getStarted2>Aucun groupe d'appareils.</div></table></div><div id=xdevices class=noselect style=display:none></div><div id=xdevicesmap style=display:none><div id=xmapSearchResultsDlg style=display:none><div id=xmapSearchResultsBck><div id=xmapSearchClose onclick=mapCloseSearchWindow()><b>X</b></div><div style=padding:5px>Location Results</div><div style=width:100%;margin:6px></div></div><div id=xmapSearchResults style=margin:6px></div></div></div><div id=xmap-info-window></div></div><div id=p2 style=display:none><h1>Mon Compte</h1><img id=p2AccountImage alt=""src=images/clipboard-128.png><div id=p2AccountSecurity style=display:none><p><strong>Account security</strong><div style=margin-left:25px><div id=manageAuthApp><div class=p2AccountActions><span id=authAppSetupCheck><strong>✓</strong></span></div><span><a href=# onclick="return account_manageAuthApp()">Manage authenticator app</a><br></span></div><div id=manageHardwareOtp><div class=p2AccountActions><span id=authKeySetupCheck><strong>✓</strong></span></div><span><a href=# onclick="return account_manageHardwareOtp(0)">Manage security keys</a><br></span></div><div id=manageOtp><div class=p2AccountActions><span id=authCodesSetupCheck><strong>✓</strong></span></div><span><a href=# onclick="return account_manageOtp(0)">Manage backup codes</a><br></span></div></div></div><div id=p2AccountActions><p><strong>Account actions</strong><p class=mL><span id=verifyEmailId style=display:none><a href=# onclick="return account_showVerifyEmail()">Verify email</a><br></span><span id=accountEnableNotificationsSpan style=display:none><a href=# onclick="return account_enableNotifications()">Enable web notifications</a><br></span><a href=# onclick="return account_showLocalizationSettings()">Localization Settings</a><br><a href=# onclick="return account_showAccountNotifySettings()">Notification Settings</a><br><span id=accountChangeEmailAddressSpan style=display:none><a href=# onclick="return account_showChangeEmail()">Change email address</a><br></span><a href=# onclick="return account_showChangePassword()">Change password</a><span id=p2nextPasswordUpdateTime></span><br><a href=# onclick="return account_showDeleteAccount()">Delete account</a><br></p><br style=clear:both></div><strong>Device Groups</strong><span id=p2createMeshLink1>(<a href=# onclick="return account_createMesh()"class=newMeshBtn>Nouveau</a>)</span><br><br><div id=p2meshes></div><div id=p2noMeshFound style=display:none>Aucun groupe d'appareils.<span id=p2createMeshLink2><a href=# onclick="return account_createMesh()"><strong>Get started here!</strong></a></span></div><br style=clear:both></div><div id=p3 style=display:none><h1>Mes Événements</h1><table class=pTable><tr><td class=h1><td class=auto-style1>Show<select id=p3limitdropdown onchange=refreshEvents()><option value=60>60 dernières<option value=120>120 dernières<option value=250>250 dernières<option value=500>500 dernières<option value=1000>1000 derniers</select>&nbsp;<a href=# onclick=p3showDownloadEventsDialog(2)><img src=images/link4.png height=10 width=10 title="Download Events"style=cursor:pointer></a>&nbsp;<td class=h2></table><div id=p3events></div></div><div id=p4 style=display:none><h1>Mes Utilisateurs</h1><table class=pTable><tr><td class=h1><td class=style14><div style=float:right><input type=button onclick=showUserBroadcastDialog() style=margin-right:6px value=Diffuser><a href=# onclick=p4downloadUserInfo()><img style=cursor:pointer title="Download user information"src=images/link4.png></a><a href=# onclick=p4batchAccountCreate()><img id=p4UserBatchCreate style=cursor:pointer;display:none title="Batch create many user accounts"src=images/link6.png></a></div><div><input id=UserNewAccountButton type=button style=margin-left:6px onclick=showCreateNewAccountDialog() value="Nouveau Compte..."> <input id=UserSearchInput style=width:120px;margin-left:6px placeholder=Filter onchange=onUserSearchInputChanged() onkeyup=onUserSearchInputChanged() autocomplete=off onfocus=onUserSearchFocus(1) onblur=onUserSearchFocus(0)></div><td class=h2></table><div id=p3users></div></div><div id=p5 style=display:none><h1>Mes Dossiers</h1><table id=p5toolbar cellpadding=0 cellspacing=0><tr><td id=p5filehead valign=bottom><div id=p5rightOfButtons></div><div><input type=button id=p5FolderUp disabled onclick="return p5folderup()"value=Up>&nbsp; <input type=button id=p5SelectAllButton disabled onclick=p5selectallfile() value="Tout Sélectionner">&nbsp; <input type=button id=p5RenameFileButton disabled value=Renommer onclick=p5renamefile()>&nbsp; <input type=button id=p5DeleteFileButton disabled value=Delete onclick=p5deletefile()>&nbsp; <input type=button id=p5NewFolderButton disabled value="Nouveau Dossier"onclick=p5createfolder()>&nbsp; <input type=button id=p5UploadButton disabled value=Télécharger onclick=p5uploadFile()>&nbsp; <input type=button id=p5CutButton disabled value=Cut onclick=p5copyFile(1)>&nbsp; <input type=button id=p5CopyButton disabled value=Copy onclick=p5copyFile(0)>&nbsp; <input type=button id=p5PasteButton disabled value=Paste onclick=p5pasteFile()>&nbsp;</div><tr><td id=p5filesubhead><div style=float:right><select id=p5sortdropdown onchange=updateFiles()><option value=1 selected>Trier par nom<option value=2>Trier par taille<option value=3>Trier par date<option value=4>Descend by name<option value=5>Descend by size<option value=6>Descend by date</select></div><div>&nbsp;&nbsp;<span id=p5currentpath></span></div></table><div id=p5filetable><div id=p5PublicShare><div>Ces fichiers sont partagés publiquement, cliquez sur "lien" pour obtenir une URL publique.</div></div><div id=bigok style=display:none><b>✓</b></div><div id=bigfail style=display:none><b>✗</b></div><span id=p5files></span></div><table id=p5toolbarBottom style=width:100% cellpadding=0 cellspacing=0><tr><td class=style6>&nbsp;<span id=p5bottomstatus></span></table></div><div id=p6 style=display:none><img id=MainMeshImage src=serverpic.ashx><h1>Mon Serveur</h1><div id=p2ServerActions><p><strong>Server actions</strong><div class=mL><div id=p2ServerActionsBackup><a href={{{domainurl}}}backup.zip rel="noreferrer noopener"target=_blank>Download server backup</a></div><div id=p2ServerActionsRestore><a href=# onclick="return server_showRestoreDlg()">Restaurer le serveur avec sauvegarde</a></div><div id=p2ServerActionsVersion><a href=# onclick="return server_showVersionDlg()">Check server version</a></div><div id=p2ServerActionsErrors><a href=# onclick="return server_showErrorsDlg()">Afficher le journal des erreurs du serveur</a></div></div></div><br><strong>Server Statistics</strong><br><br><div id=serverStats><div id=serverCpuChartView style=display:none><div class=chartViewCanvas><canvas id=serverCpuChart></canvas></div><div class=chartViewText id=serverCpuChartText></div></div><div id=serverMemoryChartView style=display:none><div class=chartViewCanvas><canvas id=serverMemoryChart></canvas></div><div class=chartViewText id=serverMemoryChartText></div></div><br><br><div id=serverStatsTable></div></div></div><div id=p10 style=display:none><table style=width:100% cellpadding=0 cellspacing=0><tr><td style=width:auto valign=top><div id=p10title><div id=p10BackButton><div class=backButton tabindex=0 onclick=goBack() title=Retour onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><h1>General -<span id=p10deviceName></span></h1></div><div id=p10html></div><td style=width:20px><td style=width:200px><a href=# onclick=p10showiconselector()><img id=MainComputerImage></a><div id=MainComputerState></div></table><br><div id=p10html2></div><div id=p10html3></div></div><div id=p11 class=noselect style=display:none><div id=p11title><div id=p11deviceNameHeader><div id=p11BackButton><div class=backButton tabindex=0 onclick=goBack() title=Retour onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><div id=devListToolbarViewIcons><div class=viewSelector onclick=deskToggleFull(event) title="Full Screen. Hold shift to browser full screen."><div class=viewSelector5></div></div></div><h1>Desktop -<span id=p11deviceName></span></h1></div></div><div id=p11warning onclick=showFeaturesDlg()><div class=icon2></div><div class=warningbox>Intel® AMT Redirection port or KVM feature is disabled<span id=p11warninga>, click here to enable it.</span></div></div><div id=p11warning2 onclick=showPowerActionDlg()><div class=icon2></div><div class=warningbox>Remote computer is not powered on, click here to issue a power command.</div></div><div id=deskarea0 cellpadding=0 cellspacing=0><div id=deskarea1 class=areaHead><div class=toright2><span id=p11power></span>&nbsp;<div class=deskareaicon title="Toggle View Mode"onclick=toggleAspectRatio(1)>⇲</div><div class=deskareaicon title="Tourne à gauche"onclick=drotate(-1)>↺</div><div class=deskareaicon title="Tourner à droite"onclick=drotate(1)>↻</div><div id=deskRecordIcon class=deskareaicon title="Server is recording this session"style=display:none;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px></div><input id=deskFocusBtn type=button title="Toggle focus mode, when active only the region around the mouse is updated"onkeypress=return!1 onkeydown=return!1 value="Focus All"onclick=deskToggleFocus() style=margin-right:3px;display:none> <input id=deskSaveBtn type=button title="Enregistrer une capture d'écran du bureau distant"onkeypress=return!1 onkeydown=return!1 value=Sauver... onclick=deskSaveImage() class=mR> <input id=deskActionsBtn type=button title="Effectuer des actions d'alimentation sur le périphérique"onkeypress=return!1 onkeydown=return!1 value=Actions onclick=deviceActionFunction() class=mR> <input id=deskActionsSettings type=button value=Paramètres... title="Edit remote desktop settings"onkeypress=return!1 onkeydown=return!1 onclick=showDesktopSettings() class=mR> <input type=button title="Change the power state of the remote machine"onkeypress=return!1 onkeydown=return!1 value="Power Actions..."onclick=showPowerActionDlg() style=display:none></div><div><div id=idx_deskFullBtn2 onclick=deskToggleFull(event)>&nbsp;✖</div><input type=button id=autoconnectbutton1 value=AutoConnect onclick=autoConnectDesktop(event) onkeypress=return!1 onkeydown=return!1 style=display:none><span id=connectbutton1span><input type=button id=connectbutton1 value=Connect onclick=connectDesktop(event,1) onkeypress=return!1 onkeydown=return!1 disabled></span><span id=connectbutton1hspan>&nbsp;<input type=button id=connectbutton1h value="HW Connect"onclick=connectDesktop(event,2) onkeypress=return!1 onkeydown=return!1 disabled></span><span id=disconnectbutton1span>&nbsp;<input type=button id=disconnectbutton1 value=Disconnect onclick=connectDesktop(event,0) onkeypress=return!1 onkeydown=return!1></span>&nbsp;<span id=deskstatus>Disconnected</span></div></div><div id=deskarea2><div class=areaProgress><div id=progressbar></div></div></div><div id=deskarea3x><div id=DeskFocus oncontextmenu=return!1 onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event)></div><div id=DeskParent><canvas id=Desk width=640 height=480 oncontextmenu=return!1 onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel=dmousewheel(event)></canvas></div><div id=DeskTools><div id=deskToolsAreaTop><a id=DeskToolsRefreshButton style=right:2px onclick=refreshDeskTools()>Rafraîchir</a><div id=deskToolsTopTabProcess class=deskToolsTopTab onclick=changeDeskToolTab(0) style=left:0;bottom:0>Processes</div><div id=deskToolsTopTabService class=deskToolsTopTab onclick=changeDeskToolTab(1) style=display:none;left:90px;color:gray>Services</div></div><div id=deskToolsArea><div id=DeskToolsProcessTab><div id=deskToolsHeader><a class=colmn1 title="Trier par identifiant de processus"onclick=sortProcess(0)>PID</a><a class=colmn2 title="Trier par nom"onclick=sortProcess(1)>Nom</a></div><div id=DeskToolsProcesses></div></div><div id=DeskToolsServiceTab style=display:none><div id=deskToolsServiceHeader><a class=colmn1 style=width:70px title="Trier par état"onclick=sortService(0)>State</a><a class=colmn2 title="Trier par nom"onclick=sortService(1)>Nom</a></div><div id=DeskToolsServices></div></div></div></div><div id=p11DeskConsoleMsg style=display:none;cursor:pointer;position:absolute;left:30px;top:17px;color:#ff0;background-color:rgba(0,0,0,.6);padding:10px;border-radius:5px onclick=p11clearConsoleMsg()></div></div><div id=deskarea4 class=areaFoot><div class=toright2><span id=DeskTimer title="Session time"></span>&nbsp;<select id=termdisplays style=display:none onchange=deskSetDisplay(event) onkeypress=return!1 onkeydown=return!1></select>&nbsp; <input id=DeskToolsButton type=button value=Outils title="Toggle tools view"onkeypress=return!1 onkeydown=return!1 onclick=toggleDeskTools()>&nbsp;<span id=DeskChatButton class=deskarea title="Ouvrir la fenêtre de discussion sur cet ordinateur"><img src=images/icon-chat.png onclick=deviceChat() height=16 width=16 style=padding-top:2px></span><span id=DeskNotifyButton title="Display a notification on the remote computer"><img src=images/icon-notify.png onclick=deviceToastFunction() height=16 width=16 style=padding-top:2px></span><span id=DeskOpenWebButton title="Open a web address on remote computer"><img src=images/icon-url2.png onclick=deviceUrlFunction() height=16 width=16 style=padding-top:2px></span></div><div><select id=deskkeys><option value=10>Ctrl+Alt+Del<option value=5>Win<option value=0>Win+Down<option value=1>Win+Up<option value=2>Win+L<option value=3>Win+M<option value=4>Shift+Win+M<option value=6>Win+R<option value=7>Alt-F4<option value=8>Ctrl-W<option value=9>Alt-Tab<option value=11>Win+Left<option value=12>Win+Right</select><input id=DeskWD type=button value=Envoyer onkeypress=return!1 onkeydown=return!1 onclick=deskSendKeys()> <input id=DeskClip type=button value=Clipboard onkeypress=return!1 onkeydown=return!1 onclick=showDeskClip()> <input id=DeskType type=button value=Type onkeypress=return!1 onkeydown=return!1 onclick=showDeskType()><label><span id=DeskControlSpan title="Basculer la souris et le clavier"><input id=DeskControl type=checkbox onkeypress=return!1 onkeydown=return!1 onclick=toggleKvmControl()>Input</span></label>&nbsp;</div></div></div></div><div id=p12 style=display:none><div id=p12title><div id=p12BackButton><div class=backButton tabindex=0 onclick=goBack() title=Retour onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><h1>Terminal -<span id=p12deviceName></span></h1></div><div id=p12warning onclick=showFeaturesDlg()><div class=icon2></div><div class=warningbox>Intel® AMT Redirection port or KVM feature is disabled<span id=p12warninga>, click here to enable it.</span></div></div><div id=p12warning2 onclick=showPowerActionDlg()><div class=icon2></div><div class=warningbox>Remote computer is not powered on, click here to issue a power command.</div></div><div id=termTable style=position:relative><table style=width:100% cellpadding=0 cellspacing=0><tr><td class=areaHead><div class=toright2><div id=termRecordIcon class=deskareaicon title="Server is recording this session"style=display:none;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-left:5px></div><input id=termActionsBtn type=button title="Effectuer des actions d'alimentation sur le périphérique"onkeypress=return!1 onkeydown=return!1 value=Actions onclick=deviceActionFunction()></div><div><input type=button id=autoconnectbutton2 value=AutoConnect onclick=autoConnectTerminal(event) onkeypress=return!1 onkeydown=return!1 style=display:none><span id=connectbutton2span><input type=button id=connectbutton2 value=Connect onclick=connectTerminal(event,1) onkeypress=return!1 onkeydown=return!1 disabled></span><span id=connectbutton2hspan>&nbsp;<input type=button id=connectbutton2h value="HW Connect"onclick=connectTerminal(event,2) onkeypress=return!1 onkeydown=return!1 disabled></span><span id=disconnectbutton2span>&nbsp;<input type=button id=disconnectbutton2 value=Disconnect onclick=connectTerminal(event,0) onkeypress=return!1 onkeydown=return!1></span>&nbsp;<span id=termstatus>Disconnected</span><span id=termtitle></span></div><tr><td><div class=areaProgress><div id=termprogressbar></div></div><tr><td id=termarea3x><pre id=Term></pre><tr><td class=areaFoot><div class=toright2><span id=TermTimer title="Session time"></span>&nbsp;<span id=terminalSettingsButtons style=display:none><input id=id_tcrbutton type=button onkeypress=return!1 onkeydown=return!1 class=bottombutton value=CR+LF title="Toggle what the return key will send"onclick=termToggleCr()> <input id=id_tfxkeysbutton type=button onkeypress=return!1 onkeydown=return!1 class=bottombutton value="Intel (F10 = ESC+[OM)"title="Toggle F1 to F10 keys emulation type"onclick=termToggleFx()> <input id=id_ttypebutton type=button onkeypress=return!1 onkeydown=return!1 class=bottombutton value="Extended Ascii"title="Basculer le type d'émulation de terminal"onclick=termToggleType()></span><span id=terminalSizeDropDown><select id=termSizeList onkeypress=return!1><option value=1>80x25<option value=2>100x30<option value=3 selected>Automatique</select></span><select id=specialkeylist onkeypress=return!1></select><input id=specialkeylistinput type=button onkeypress=return!1 class=bottombutton value=Envoyer title="Send the selected special key"onclick=sendSpecialKey()></div><div>&nbsp; <input type=button onkeypress=return!1 onkeydown=return!1 class=bottombutton id=ctrlcbutton value=Ctl-C onclick='termSendKey(3,"ctrlcbutton")'> <input type=button onkeypress=return!1 onkeydown=return!1 class=bottombutton id=ctrlxbutton value=Ctl-X onclick='termSendKey(24,"ctrlxbutton")'> <input type=button onkeypress=return!1 onkeydown=return!1 class=bottombutton id=escbutton value=ESC onclick='termSendKey(27,"escbutton")'> <input type=button onkeypress=return!1 onkeydown=return!1 class=bottombutton id=bsbutton value="Retour arrière"onclick='termSendKey(8,"bsbutton")'> <input type=button onkeypress=return!1 onkeydown=return!1 class=bottombutton id=pastebutton value=Paste title="Paste text into the terminal"onclick=showTermPasteDialog()></div></table><div id=p12TermConsoleMsg style=display:none;cursor:pointer;position:absolute;left:30px;top:45px;color:#ff0;background-color:rgba(0,0,0,.6);padding:10px;border-radius:5px onclick=p12clearConsoleMsg()></div></div></div><div id=p13 style=display:none><div id=p13title><div id=p13BackButton style=float:left><div class=backButton tabindex=0 onclick=goBack() title=Retour onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><h1>Files -<span id=p13deviceName></span></h1></div><table id=p13toolbar cellpadding=0 cellspacing=0><tr><td class=areaHead><div class=toright2><input id=filesActionsBtn type=button title="Effectuer des actions d'alimentation sur le périphérique"value=Actions onclick=deviceActionFunction()><div id=filesRecordIcon class=deskareaicon title="Server is recording this session"style=display:none;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-left:5px></div></div><div><input id=p13AutoConnect value=AutoConnect onclick=autoConnectFiles(event) type=button style=display:none> <input id=p13Connect value=Connect onclick=connectFiles(event) type=button><span id=p13Status>Disconnected</span></div><tr><td class=areaHead2 valign=bottom><div id=p13rightOfButtons class=toright2></div><div><input type=button id=p13FolderUp disabled onclick=p13folderup() value=Up>&nbsp; <input type=button id=p13SelectAllButton disabled onclick=p13selectallfile() value="Tout Sélectionner">&nbsp; <input type=button id=p13RenameFileButton disabled value=Renommer onclick=p13renamefile()>&nbsp; <input type=button id=p13DeleteFileButton disabled value=Delete onclick=p13deletefile()>&nbsp; <input type=button id=p13ViewFileButton disabled value=Edit onclick=p13viewfile()>&nbsp; <input type=button id=p13NewFolderButton disabled value="Nouveau Dossier"onclick=p13createfolder()>&nbsp; <input type=button id=p13UploadButton disabled value=Télécharger onclick=p13uploadFile()>&nbsp; <input type=button id=p13CutButton disabled value=Cut onclick=p13copyFile(1)>&nbsp; <input type=button id=p13CopyButton disabled value=Copy onclick=p13copyFile(0)>&nbsp; <input type=button id=p13PasteButton disabled value=Paste onclick=p13pasteFile()>&nbsp; <input type=button id=p13RefreshButton disabled value=Rafraîchir onclick=p13folderup(9999)>&nbsp;</div><tr><td class=areaHead3><div class=toright2><select id=p13sortdropdown onchange=p13updateFiles()><option value=1 selected>Trier par nom<option value=2>Trier par taille<option value=3>Trier par date<option value=4>Descend by name<option value=5>Descend by size<option value=6>Descend by date</select></div><div>&nbsp;&nbsp;<span id=p13currentpath></span></div></table><div id=p13FilesConsoleMsg style=display:none;cursor:pointer;position:absolute;left:30px;top:165px;color:#ff0;background-color:rgba(0,0,0,.6);padding:10px;border-radius:5px onclick=p13clearConsoleMsg()></div><div id=p13filetable><div id=p13bigok style=display:none><b>✓</b></div><div id=p13bigfail style=display:none><b>✗</b></div><span id=p13files></span></div><table id=p13toolbarBottom cellpadding=0 cellspacing=0><tr><td class=style6>&nbsp;<span id=p13bottomstatus></span></table></div><div id=p14 style=display:none><div id=p14title><div id=p14BackButton style=float:left><div class=backButton tabindex=0 onclick=goBack() title=Retour onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><div id=devListToolbarViewIcons><div class=viewSelector onclick=deskToggleFull(event) title="Full Screen. Hold shift to browser full screen."><div class=viewSelector5></div></div></div><h1>Intel® AMT -<span id=p14deviceName></span></h1></div><iframe id=p14iframe src={{{domainurl}}}commander.htm></iframe></div><div id=p15 style=display:none><div id=p15title><div id=p15BackButton style=float:left><div class=backButton tabindex=0 onclick=goBack() title=Retour onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><h1><span id=p15deviceName></span></h1></div><table id=consoleTable cellpadding=0 cellspacing=0><tr><td class=areaHead><div class=toright2><div id=p15coreName title="Information about current core running on this agent"></div><input type=button id=p15uploadCore value="Agent Action"onclick=p15uploadCore(event) title="Change the agent Java Script code module"> <img onclick=p15downloadConsoleText() style=cursor:pointer;margin-top:6px title="Download console text"src=images/link4.png></div><div id=p15statetext></div><tr><td><div class=areaProgress><div id=consoleprogressbar></div></div><tr><td id=p15agentConsole><pre id=p15agentConsoleText></pre><tr><td class=areaFoot><table style=width:100%><tr><td style=width:99%><input id=p15consoleText style=width:100% onkeyup=p15consoleSend(event) onfocus=onConsoleFocus(1) onblur=onConsoleFocus(0)><td>&nbsp;<td id=p15outputselecttd><select id=p15outputselect><option value=1>Agent<option value=2>MQTT</select><td style=width:1%><input id=id_p15consoleClear type=button class=bottombutton value=Clear onclick=p15consoleClear()></table></table></div><div id=p16 style=display:none><div id=p16title><div id=p16BackButton style=float:left><div class=backButton tabindex=0 onclick=goBack() title=Retour onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><h1>Events -<span id=p16deviceName></span></h1></div><table class=pTable><tr><td class=h1><td class=auto-style1>Show<select id=p16limitdropdown onchange=refreshDeviceEvents()><option value=60>60 dernières<option value=120>120 dernières<option value=250>250 dernières<option value=500>500 dernières<option value=1000>1000 derniers</select><a href=# onclick=p3showDownloadEventsDialog(1)><img src=images/link4.png height=10 width=10 title="Download Events"style=cursor:pointer></a>&nbsp;<td class=h2></table><div id=p16events></div></div><div id=p17 style=display:none><div id=p17title><div id=p17BackButton style=float:left><div class=backButton tabindex=0 onclick=goBack() title=Retour onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><h1>Details -<span id=p17deviceName></span></h1></div><div id=p17info></div></div><div id=p20 style=display:none><picture id=MainMeshImage style=border-width:0;height:200px;width:200px;float:right><source type=image/webp width=200 height=200 srcset=images/webp/mesh-256.webp><img alt=""width=200 height=200 src=images/mesh-256.png></picture><div style=float:left><div class=backButton tabindex=0 onclick=goBack() title=Retour onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><h1>General -<span id=p20meshName></span></h1><p id=p20info></div><div id=p30 style=display:none><table style=width:100% cellpadding=0 cellspacing=0><tr><td style=width:auto valign=top><div id=p30title><div style=float:left><div class=backButton tabindex=0 onclick=goBack() title=Retour onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><h1>General -<span id=p30userName></span></h1></div><div id=p30html></div><td style=width:20px><td style=width:200px><picture id=MainUserImage style=border-width:0;height:200px;width:200px;float:right><source type=image/webp width=200 height=200 srcset=images/webp/user-256.webp><img alt=""width=200 height=200 src=images/user-256.png></picture><div style=width:100%;text-align:center><strong><span id=MainUserState></span></strong></div></table><br><div id=p30html2></div><div id=p30html3></div></div><div id=p31 style=display:none><div style=float:left><div class=backButton tabindex=0 onclick=goBack() title=Retour onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><h1>Events -<span id=p31userName></span></h1><table class=pTable><tr><td class=h1><td class=auto-style1>Show<select id=p31limitdropdown onchange=refreshUsersEvents()><option value=60>60 dernières<option value=120>120 dernières<option value=250>250 dernières<option value=500>500 dernières<option value=1000>1000 derniers</select><a href=# onclick=p3showDownloadEventsDialog(3)><img src=images/link4.png height=10 width=10 title="Download Events"style=cursor:pointer></a>&nbsp;<td class=h2></table><div id=p31events></div></div><div id=p40 style=display:none><h1>My Server Stats</h1><div class=areaHead><div class=toright2><select id=p40type onchange=updateServerTimelineStats()><option value=0>Connections<option value=1>Mémoire</select>&nbsp;<select id=p40time onchange=updateServerTimelineHours()><option value=3>3 dernières heures<option value=8>8 dernières heures<option value=24>Dernier jour<option value=168>Dernière semaine<option value=720>30 derniers jours</select>&nbsp; <img src=images/link4.png height=10 width=10 title="Download data points (.csv)"style=cursor:pointer onclick=p40downloadEvents()>&nbsp;</div><div><input value=Rafraîchir type=button onclick=refreshServerTimelineStats()> &nbsp;<label><input id=p40log type=checkbox onclick=updateServerTimelineHours()>Log-X</label></div></div><canvas id=serverMainStats></canvas></div><div id=p41 style=display:none><h1>My Server Tracing</h1><div class=areaHead><div class=toright2>Show<select id=p41limitdropdown onchange=displayServerTrace()><option value=100>100 dernières<option value=250>250 dernières<option value=500>500 dernières<option value=1000>1000 derniers</select><input value=Clear type=button onclick=clearServerTracing()> <img src=images/link4.png height=10 width=10 title="Download trace (.csv)"style=cursor:pointer onclick=p41downloadServerTrace()>&nbsp;</div><div><input value=Tracing type=button onclick=setServerTracing()><span id=p41traceStatus>None</span></div></div><div id=p41events></div></div><div id=p19 style=display:none><h1>Plugins -<span id=p19deviceName></span></h1><style>#p19headers{padding-right:7px;padding-bottom:10px;font-weight:700;border-bottom:1px dotted #00f}#p19headers>span:nth-child(n+2){border-left:1px solid #000}#p19headers>span{padding-left:4px;padding-right:4px}</style><div id=p19headers></div><div id=p19pages></div></div><br id=column_l_bottomgap></div><div id=footer><div class=footer1>{{{footer}}}</div><div class=footer2><a id=verifyEmailId2 style=display:none href=# onclick=account_showVerifyEmail()>Verify Email</a>&nbsp;<a href=terms>Terms &amp; Privacy</a></div></div><div id=dialog class=noselect style=display:none><div id=dialogHeader><div tabindex=0 id=id_dialogclose onclick=setDialogMode() onkeypress='"Enter"==event.key&&setDialogMode()'>✖</div><div id=id_dialogtitle></div></div><div id=dialogBody><div id=dialog1><div id=id_dialogMessage></div></div><div id=dialog2><div id=id_dialogOptions></div></div><div id=dialog3><div id=d3upload><div>File Selection</div><select id=d3uploadMode onchange=d3modechange()><option value=1>Local file upload<option value=2>Server file selection</select></div><div id=d3localmode style=display:none><div>Upload File</div><form id=d3localmodeform method=post enctype=multipart/form-data action=uploadfile.ashx target=fileUploadFrame><input id=d3auth name=auth style=display:none> <input id=d3attrib name=attrib style=display:none> <input type=file id=d3localFile name=files onchange=d3setActions()> <input type=submit id=d3submit style=display:none></form></div><div id=d3servermode><div id=d3serveraction valign=bottom><input type=button id=p3FolderUp disabled onclick=d3folderup() value=Up>&nbsp;</div><div id=d3serverfiles></div></div></div><div id=dialog7><div id=d7meshkvm><h4>Agent Remote Desktop</h4><div><div>Qualité</div><select id=d7bitmapquality dir=rtl></select></div><div><div>Mise à l'échelle</div><select id=d7bitmapscaling dir=rtl><option selected value=1024>100%<option value=896>87.5%<option value=768>75%<option value=640>62.5%<option value=512>50%<option value=384>37.5%<option value=256>25%<option value=128>12.5%</select></div><div><div>Frame rate</div><select id=d7framelimiter dir=rtl><option selected value=50>Fast<option value=100>Medium<option value=400>Lent<option value=1000>Very slow</select></div></div><div id=d7amtkvm><h4>Intel® AMT Hardware KVM</h4><div><div>Image Encoding</div><select id=d7desktopmode><option value=1>RLE8, le plus rapide<option value=2>RLE16, recommandé<option value=3>RAW8, Slow<option value=4>RAW16, Very Slow</select></div><div><div>Other Settings</div><div id=d7otherset style=display:block><label style=display:block><input type=checkbox id=d7showfocus>Show Focus Tool</label><label style=display:block><input type=checkbox id=d7showcursor>Show Local Mouse Cursor</label><label style=display:block><input type=checkbox id=d7localKeyMap>Local Keyboard Map</label></div></div></div></div></div><div id=idx_dlgButtonBar><input id=idx_dlgCancelButton type=button value=Annuler onclick=dialogclose(0)> <input id=idx_dlgOkButton type=button value=OK onclick=dialogclose(1)><div><input id=idx_dlgDeleteButton type=button value=Delete style=display:none onclick=dialogclose(2)></div></div></div><iframe name=fileUploadFrame style=display:none></iframe><form style=display:none method=post action=uploadfile.ashx enctype=multipart/form-data target=fileUploadFrame><input id=p5fileDragName name=name><input id=p5fileDragAuthCookie name=auth><input id=p5fileDragSize name=size><input id=p5fileDragType name=type><input id=p5fileDragData name=data><input id=p5fileDragLink name=link><input type=submit id=p5loginSubmit2 style=display:none></form><form style=display:none method=post action=uploadnodefile.ashx enctype=multipart/form-data target=fileUploadFrame><input id=p13fileDragName name=name><input id=p13fileDragSize name=size><input id=p13fileDragType name=type><input id=p13fileDragData name=data><input id=p13fileDragLink name=link><input type=submit id=p13loginSubmit2 style=display:none></form><audio id=chimes><source src=sounds/chimes.mp3 type=audio/mp3></audio></div><script>'use strict';
1 +<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link rel="shortcut icon"type=image/x-icon href={{{domainurl}}}favicon.ico><link keeplink=1 type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><link type=text/css href=styles/ol.css media=screen rel=stylesheet title=CSS><link type=text/css href=styles/ol3-contextmenu.min.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><script src=scripts/meshcentral.js></script><script src=scripts/amt-0.2.0.js></script><script src=scripts/amt-wsman-0.2.0.js></script><script src=scripts/amt-desktop-0.0.2.js></script><script src=scripts/amt-terminal-0.0.2.js></script><script src=scripts/zlib.js></script><script src=scripts/zlib-inflate.js></script><script src=scripts/zlib-adler32.js></script><script src=scripts/zlib-crc32.js></script><script src=scripts/amt-redir-ws-0.1.0.js></script><script src=scripts/amt-wsman-ws-0.2.0.js></script><script src=scripts/agent-redir-ws-0.1.1.js></script><script src=scripts/agent-redir-rtc-0.1.0.js></script><script src=scripts/agent-desktop-0.0.2.js></script><script src=scripts/qrcode.min.js></script><script keeplink=1 src=scripts/u2f-api.js></script><script keeplink=1 src=scripts/charts.js></script><script keeplink=1 src=scripts/filesaver.js></script><script keeplink=1 src=scripts/ol.js></script><script keeplink=1 src=scripts/ol3-contextmenu.js></script><title>{{{title}}}</title><body id=body onload='"undefined"!=typeof startup&&startup()'oncontextmenu=handleContextMenu(event) style=display:none;min-width:495px><div id=contextMenu class="contextMenu noselect"style=display:none><div id=cxinfo class=cmtext onclick=cmaction(1,event)><b>Information</b></div><div id=cxdesktop class=cmtext onclick=cmaction(3,event)>Desktop</div><div id=cxterminal class=cmtext onclick=cmaction(2,event)>Terminal</div><div id=cxfiles class=cmtext onclick=cmaction(4,event)>Files</div><div id=cxevents class=cmtext onclick=cmaction(5,event)>Events</div><div id=cxconsole class=cmtext onclick=cmaction(6,event)>Console</div><hr id=cxmgroupsplit><div id=cxmdesktop class=cmtext onclick=cmaction(7,event) style=display:none>Multi-Desktop</div></div><div id=meshContextMenu class="contextMenu noselect"style=display:none;min-width:0><div id=cxselectall class=cmtext onclick=cmmeshaction(1,event)>Tout Sélectionner</div><div id=cxselectnone class=cmtext onclick=cmmeshaction(2,event)>Rien sélectionner</div></div><div id=termShellContextMenu class="contextMenu noselect"style=display:none;min-width:0><div id=cxtermnorm class=cmtext onclick=cmtermaction(1,event)>Normal Connect</div><div id=cxtermps class=cmtext onclick=cmtermaction(2,event)>PowerShell Connect</div></div><div id=container><div id=notifiyBox class=notifiyBox style=display:none></div><div id=masthead class=noselect><div class=title>{{{title}}}</div><div class=title2>{{{title2}}}</div><div style=float:right><div id=notificationCount onclick=clickNotificationIcon() class=unselectable style=display:none title="Click to view current notifications">0</div></div><p id=logoutControl>{{{logoutControl}}}<span id=idleTimeoutNotify style=color:#ff0></span></div><div id=page_leftbar><div style=height:16px></div><div id=LeftMenuMyDevices tabindex=0 class="lbbutton lbbuttonsel"title="Mes Appareils"onclick=go(1,event) onkeypress='"Enter"==event.key&&go(1)'><div class=lb2></div></div><div id=LeftMenuMyAccount tabindex=0 class=lbbutton title="Mon Compte"onclick=go(2,event) onkeypress='"Enter"==event.key&&go(2)'><div class=lb1></div></div><div id=LeftMenuMyEvents tabindex=0 class=lbbutton title="Mes Événements"onclick=go(3,event) onkeypress='"Enter"==event.key&&go(3)'><div class=lb3></div></div><div id=LeftMenuMyFiles tabindex=0 class=lbbutton style=display:none title="Mes Dossiers"onclick=go(5,event) onkeypress='"Enter"==event.key&&go(5)'><div class=lb4></div></div><div id=LeftMenuMyUsers tabindex=0 class=lbbutton style=display:none title="Mes Utilisateurs"onclick=go(4,event) onkeypress='"Enter"==event.key&&go(4)'><div class=lb5></div></div><div id=LeftMenuMyServer tabindex=0 class=lbbutton style=display:none title="Mon Serveur"onclick=go(6,event) onkeypress='"Enter"==event.key&&go(6)'><div class=lb6></div></div></div><div id=topbar class=noselect><div><div style=position:relative><div tabindex=0 id=uiMenuButton title="User interface selection"onclick=showUserInterfaceSelectMenu() onkeypress='"Enter"==event.key&&showUserInterfaceSelectMenu()'>♦<div id=uiMenu style=display:none><div tabindex=0 id=uiViewButton1 class=uiSelector onclick=userInterfaceSelectMenu(1) title="Left bar interface"onkeypress='"Enter"==event.key&&userInterfaceSelectMenu(1)'><div class=uiSelector1></div></div><div tabindex=0 id=uiViewButton2 class=uiSelector onclick=userInterfaceSelectMenu(2) title="Top bar interface"onkeypress='"Enter"==event.key&&userInterfaceSelectMenu(2)'><div class=uiSelector2></div></div><div tabindex=0 id=uiViewButton3 class=uiSelector onclick=userInterfaceSelectMenu(3) title="Fixed width interface"onkeypress='"Enter"==event.key&&userInterfaceSelectMenu(3)'><div class=uiSelector3></div></div><div tabindex=0 id=uiViewButton4 class=uiSelector onclick=toggleNightMode() title="Basculer mode nuit"onkeypress='"Enter"==event.key&&toggleNightMode()'><div class=uiSelector4></div></div></div></div><table id=MainMenuSpan cellpadding=0 cellspacing=0 class=style1><tr><td tabindex=0 id=MainMenuMyDevices class="topbar_td style3x"onclick=go(1,event) onkeypress='"Enter"==event.key&&go(1)'>Mes Appareils<td tabindex=0 id=MainMenuMyAccount class="topbar_td style3x"onclick=go(2,event) onkeypress='"Enter"==event.key&&go(2)'>Mon Compte<td tabindex=0 id=MainMenuMyEvents class="topbar_td style3x"onclick=go(3,event) onkeypress='"Enter"==event.key&&go(3)'>Mes Événements<td tabindex=0 id=MainMenuMyFiles class="topbar_td style3x"onclick=go(5,event) onkeypress='"Enter"==event.key&&go(5)'>Mes Dossiers<td tabindex=0 id=MainMenuMyUsers class="topbar_td style3x"onclick=go(4,event) onkeypress='"Enter"==event.key&&go(4)'>Mes Utilisateurs<td tabindex=0 id=MainMenuMyServer class="topbar_td style3x"onclick=go(6,event) onkeypress='"Enter"==event.key&&go(6)'>Mon Serveur<td class="topbar_td_end style3">&nbsp;</table><div id=MainSubMenuSpan style=display:none><table id=MainSubMenu cellpadding=0 cellspacing=0 class=style1><tr><td tabindex=0 id=MainDev class="topbar_td style3x"onclick=go(10,event) onkeypress='"Enter"==event.key&&go(10)'>General<td tabindex=0 id=MainDevDesktop class="topbar_td style3x"onclick=go(11,event) onkeypress='"Enter"==event.key&&go(11)'>Desktop<td tabindex=0 id=MainDevTerminal class="topbar_td style3x"onclick=go(12,event) onkeypress='"Enter"==event.key&&go(12)'>Terminal<td tabindex=0 id=MainDevFiles class="topbar_td style3x"onclick=go(13,event) onkeypress='"Enter"==event.key&&go(13)'>Files<td tabindex=0 id=MainDevEvents class="topbar_td style3x"onclick=go(16,event) onkeypress='"Enter"==event.key&&go(16)'>Events<td tabindex=0 id=MainDevInfo class="topbar_td style3x"onclick=go(17,event) onkeypress='"Enter"==event.key&&go(17)'>Details<td tabindex=0 id=MainDevAmt class="topbar_td style3x"onclick=go(14,event) onkeypress='"Enter"==event.key&&go(14)'>Intel® AMT<td tabindex=0 id=MainDevConsole class="topbar_td style3x"onclick=go(15,event) onkeypress='"Enter"==event.key&&go(15)'>Console<td tabindex=0 id=MainDevPlugins class="topbar_td style3x"onclick=go(19,event) onkeypress='"Enter"==event.key&&go(19)'>Plugins<td class="topbar_td_end style3">&nbsp;</table></div><div id=MeshSubMenuSpan style=display:none><table id=MeshSubMenu cellpadding=0 cellspacing=0 class=style1><tr><td tabindex=0 id=MeshGeneral class="topbar_td style3x"onclick=go(20,event) onkeypress='"Enter"==event.key&&go(20)'>General<td class="topbar_td_end style3">&nbsp;</table></div><div id=UserSubMenuSpan style=display:none><table id=UserSubMenu cellpadding=0 cellspacing=0 class=style1><tr><td tabindex=0 id=UserGeneral class="topbar_td style3x"onclick=go(30,event) onkeypress='"Enter"==event.key&&go(30)'>General<td tabindex=0 id=UserEvents class="topbar_td style3x"onclick=go(31,event) onkeypress='"Enter"==event.key&&go(31)'>Events<td class="topbar_td_end style3">&nbsp;</table></div><div id=ServerSubMenuSpan style=display:none><table id=ServerSubMenu cellpadding=0 cellspacing=0 class=style1><tr><td tabindex=0 id=ServerGeneral class="topbar_td style3x"onclick=go(6,event) onkeypress='"Enter"==event.key&&go(6)'>General<td tabindex=0 id=ServerStats class="topbar_td style3x"onclick=go(40,event) onkeypress='"Enter"==event.key&&go(40)'>Stats<td tabindex=0 id=ServerConsole class="topbar_td style3x"onclick=go(115,event) onkeypress='"Enter"==event.key&&go(115)'>Console<td tabindex=0 id=ServerTrace class="topbar_td style3x"onclick=go(41,event) onkeypress='"Enter"==event.key&&go(41)'>Trace<td class="topbar_td_end style3">&nbsp;</table></div><div id=UserDummyMenuSpan><table id=UserDummyMenu cellpadding=0 cellspacing=0 class=style1><tr><td class=style3>&nbsp;</table></div></div></div></div><div id=column_l><div id=p0 style=display:none><div id=p0message><span id=p0span>Server disconnected</span>,<href onclick=reload() style=cursor:pointer><u>click to reconnect</u></href>.</div></div><div id=p1 style=display:none><div style=display:none id=devListToolbarViewIcons><div tabindex=0 id=devViewButton1 class=viewSelector onclick=onDeviceViewChange(1) onkeypress='"Enter"==event.key&&onDeviceViewChange(1)'title=Columns><div class=viewSelector2></div></div><div tabindex=0 id=devViewButton2 class=viewSelector onclick=onDeviceViewChange(2) onkeypress='"Enter"==event.key&&onDeviceViewChange(2)'title=List><div class=viewSelector1></div></div><div tabindex=0 id=devViewButton3 class=viewSelector onclick=onDeviceViewChange(3) onkeypress='"Enter"==event.key&&onDeviceViewChange(3)'title=Desktops><div class=viewSelector3></div></div><div tabindex=0 id=devViewButton4 class=viewSelector onclick=onDeviceViewChange(4) onkeypress='"Enter"==event.key&&onDeviceViewChange(4)'title=Carte><div class=viewSelector4></div></div></div><div><h1>Mes Appareils</h1></div><table id=devListToolbarSpan class=noselect><tr><td class=h1><td id=devListToolbar class=style14 style=display:none>&nbsp;&nbsp;<input type=button id=SelectAllButton onclick=selectallButtonFunction() value="Tout Sélectionner">&nbsp; <input type=button id=GroupActionButton disabled value="Action de groupe"onclick=groupActionFunction()>&nbsp; <input id=SearchInput placeholder=Filter onchange=masterUpdate(5) onkeyup=masterUpdate(5) autocomplete=off onfocus=onSearchFocus(1) onblur=onSearchFocus(0)>&nbsp; <label><input type=checkbox id=RealNameCheckBox onclick=onRealNameCheckBox()><span title="Show devices operating system name">Nom du système</span></label><td id=kvmListToolbar class=style14 style=display:none>&nbsp;&nbsp;<span id=kvmMultiConnectButtonSpan><input type=button onclick=connectAllKvmFunction() value="Connect All">&nbsp;</span> <input type=button onclick=disconnectAllKvmFunction() value="Disconnect All">&nbsp; <span id=kvmAutoConnectButtonSpan><label><input type=checkbox id=autoConnectDesktopCheckbox onclick=autoConnectDesktops(event) title="Connexion automatique">Automatique&nbsp;</label></span> <input type=button onclick=showMultiDesktopSettings() value=Settings>&nbsp;<td id=devMapToolbar class=style14 style=display:none>&nbsp;&nbsp;<input id=mapSearchLocation placeholder="Recherche de lieu"onfocus=onMapSearchFocus(1) onblur=onMapSearchFocus(0)> <input type=button value=Chercher title="Recherche de lieu"onclick=getSearchLocation()> <input type=button id=refreshmap title="Reset map view"value=Réinitialiser onclick=refreshMap(!1,!0)><td class=auto-style1 style=height:100%><div style=display:none id=devListToolbarView>View <select id=viewselect onchange=onDeviceViewChange()><option value=1>Columns<option value=2>List<option value=3>Desktops<option id=viewselectmapoption value=4>Carte</select></div><div style=display:none id=devListToolbarSort>Trier <select id=sortselect onchange=masterUpdate(6)><option>Groupe<option>Power<option>Device<option>Tags</select> &nbsp;</div><div style=display:none id=devListToolbarSize>Taille <select id=sizeselect onchange=onDeviceViewChange()><option value=0>Petit<option value=1>Medium<option value=2>Grand</select> &nbsp;</div><td class=h2></table><div id=NoMeshesPanel style=display:none><table><tr><td valign=top style=width:50px><img src=images/info.png><td><div id=getStarted1>To get started, <a href=# onclick="return account_createMesh()"><strong>click here to create a device group</strong></a>.</div><div id=getStarted2>Aucun groupe d'appareils.</div></table></div><div id=xdevices class=noselect style=display:none></div><div id=xdevicesmap style=display:none><div id=xmapSearchResultsDlg style=display:none><div id=xmapSearchResultsBck><div id=xmapSearchClose onclick=mapCloseSearchWindow()><b>X</b></div><div style=padding:5px>Location Results</div><div style=width:100%;margin:6px></div></div><div id=xmapSearchResults style=margin:6px></div></div></div><div id=xmap-info-window></div></div><div id=p2 style=display:none><h1>Mon Compte</h1><img id=p2AccountImage alt=""src=images/clipboard-128.png><div id=p2AccountSecurity style=display:none><p><strong>Account security</strong><div style=margin-left:25px><div id=manageAuthApp><div class=p2AccountActions><span id=authAppSetupCheck><strong>✓</strong></span></div><span><a href=# onclick="return account_manageAuthApp()">Manage authenticator app</a><br></span></div><div id=manageHardwareOtp><div class=p2AccountActions><span id=authKeySetupCheck><strong>✓</strong></span></div><span><a href=# onclick="return account_manageHardwareOtp(0)">Manage security keys</a><br></span></div><div id=manageOtp><div class=p2AccountActions><span id=authCodesSetupCheck><strong>✓</strong></span></div><span><a href=# onclick="return account_manageOtp(0)">Manage backup codes</a><br></span></div></div></div><div id=p2AccountActions><p><strong>Account actions</strong><p class=mL><span id=verifyEmailId style=display:none><a href=# onclick="return account_showVerifyEmail()">Verify email</a><br></span><span id=accountEnableNotificationsSpan style=display:none><a href=# onclick="return account_enableNotifications()">Enable web notifications</a><br></span><a href=# onclick="return account_showLocalizationSettings()">Localization Settings</a><br><a href=# onclick="return account_showAccountNotifySettings()">Notification Settings</a><br><span id=accountChangeEmailAddressSpan style=display:none><a href=# onclick="return account_showChangeEmail()">Change email address</a><br></span><a href=# onclick="return account_showChangePassword()">Change password</a><span id=p2nextPasswordUpdateTime></span><br><a href=# onclick="return account_showDeleteAccount()">Delete account</a><br></p><br style=clear:both></div><strong>Device Groups</strong> <span id=p2createMeshLink1>( <a href=# onclick="return account_createMesh()"class=newMeshBtn>Nouveau</a> )</span><br><br><div id=p2meshes></div><div id=p2noMeshFound style=display:none>Aucun groupe d'appareils.<span id=p2createMeshLink2> <a href=# onclick="return account_createMesh()"><strong>Get started here!</strong></a></span></div><br style=clear:both></div><div id=p3 style=display:none><h1>Mes Événements</h1><table class=pTable><tr><td class=h1><td class=auto-style1>Show <select id=p3limitdropdown onchange=refreshEvents()><option value=60>60 dernières<option value=120>120 dernières<option value=250>250 dernières<option value=500>500 dernières<option value=1000>1000 derniers</select>&nbsp; <a href=# onclick=p3showDownloadEventsDialog(2)><img src=images/link4.png height=10 width=10 title="Download Events"style=cursor:pointer></a>&nbsp;<td class=h2></table><div id=p3events></div></div><div id=p4 style=display:none><h1>Mes Utilisateurs</h1><table class=pTable><tr><td class=h1><td class=style14><div style=float:right><input type=button onclick=showUserBroadcastDialog() style=margin-right:6px value=Diffuser> <a href=# onclick=p4downloadUserInfo()><img style=cursor:pointer title="Download user information"src=images/link4.png></a><a href=# onclick=p4batchAccountCreate()><img id=p4UserBatchCreate style=cursor:pointer;display:none title="Batch create many user accounts"src=images/link6.png></a></div><div><input id=UserNewAccountButton type=button style=margin-left:6px onclick=showCreateNewAccountDialog() value="Nouveau Compte..."> <input id=UserSearchInput style=width:120px;margin-left:6px placeholder=Filter onchange=onUserSearchInputChanged() onkeyup=onUserSearchInputChanged() autocomplete=off onfocus=onUserSearchFocus(1) onblur=onUserSearchFocus(0)></div><td class=h2></table><div id=p3users></div></div><div id=p5 style=display:none><h1>Mes Dossiers</h1><table id=p5toolbar cellpadding=0 cellspacing=0><tr><td id=p5filehead valign=bottom><div id=p5rightOfButtons></div><div><input type=button id=p5FolderUp disabled onclick="return p5folderup()"value=Up>&nbsp; <input type=button id=p5SelectAllButton disabled onclick=p5selectallfile() value="Tout Sélectionner">&nbsp; <input type=button id=p5RenameFileButton disabled value=Renommer onclick=p5renamefile()>&nbsp; <input type=button id=p5DeleteFileButton disabled value=Delete onclick=p5deletefile()>&nbsp; <input type=button id=p5NewFolderButton disabled value="Nouveau Dossier"onclick=p5createfolder()>&nbsp; <input type=button id=p5UploadButton disabled value=Télécharger onclick=p5uploadFile()>&nbsp; <input type=button id=p5CutButton disabled value=Cut onclick=p5copyFile(1)>&nbsp; <input type=button id=p5CopyButton disabled value=Copy onclick=p5copyFile(0)>&nbsp; <input type=button id=p5PasteButton disabled value=Paste onclick=p5pasteFile()>&nbsp;</div><tr><td id=p5filesubhead><div style=float:right><select id=p5sortdropdown onchange=updateFiles()><option value=1 selected>Trier par nom<option value=2>Trier par taille<option value=3>Trier par date<option value=4>Descend by name<option value=5>Descend by size<option value=6>Descend by date</select></div><div>&nbsp;&nbsp;<span id=p5currentpath></span></div></table><div id=p5filetable><div id=p5PublicShare><div>Ces fichiers sont partagés publiquement, cliquez sur "lien" pour obtenir une URL publique.</div></div><div id=bigok style=display:none><b>✓</b></div><div id=bigfail style=display:none><b>✗</b></div><span id=p5files></span></div><table id=p5toolbarBottom style=width:100% cellpadding=0 cellspacing=0><tr><td class=style6>&nbsp;<span id=p5bottomstatus></span></table></div><div id=p6 style=display:none><img id=MainMeshImage src=serverpic.ashx><h1>Mon Serveur</h1><div id=p2ServerActions><p><strong>Server actions</strong><div class=mL><div id=p2ServerActionsBackup><a href={{{domainurl}}}backup.zip rel="noreferrer noopener"target=_blank>Download server backup</a></div><div id=p2ServerActionsRestore><a href=# onclick="return server_showRestoreDlg()">Restaurer le serveur avec sauvegarde</a></div><div id=p2ServerActionsVersion><a href=# onclick="return server_showVersionDlg()">Check server version</a></div><div id=p2ServerActionsErrors><a href=# onclick="return server_showErrorsDlg()">Afficher le journal des erreurs du serveur</a></div></div></div><br><strong>Server Statistics</strong><br><br><div id=serverStats><div id=serverCpuChartView style=display:none><div class=chartViewCanvas><canvas id=serverCpuChart></canvas></div><div class=chartViewText id=serverCpuChartText></div></div><div id=serverMemoryChartView style=display:none><div class=chartViewCanvas><canvas id=serverMemoryChart></canvas></div><div class=chartViewText id=serverMemoryChartText></div></div><br><br><div id=serverStatsTable></div></div></div><div id=p10 style=display:none><table style=width:100% cellpadding=0 cellspacing=0><tr><td style=width:auto valign=top><div id=p10title><div id=p10BackButton><div class=backButton tabindex=0 onclick=goBack() title=Retour onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><h1>General - <span id=p10deviceName></span></h1></div><div id=p10html></div><td style=width:20px><td style=width:200px><a href=# onclick=p10showiconselector()><img id=MainComputerImage></a><div id=MainComputerState></div></table><br><div id=p10html2></div><div id=p10html3></div></div><div id=p11 class=noselect style=display:none><div id=p11title><div id=p11deviceNameHeader><div id=p11BackButton><div class=backButton tabindex=0 onclick=goBack() title=Retour onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><div id=devListToolbarViewIcons><div class=viewSelector onclick=deskToggleFull(event) title="Full Screen. Hold shift to browser full screen."><div class=viewSelector5></div></div></div><h1>Desktop - <span id=p11deviceName></span></h1></div></div><div id=p11warning onclick=showFeaturesDlg()><div class=icon2></div><div class=warningbox>Intel® AMT Redirection port or KVM feature is disabled<span id=p11warninga>, click here to enable it.</span></div></div><div id=p11warning2 onclick=showPowerActionDlg()><div class=icon2></div><div class=warningbox>Remote computer is not powered on, click here to issue a power command.</div></div><div id=deskarea0 cellpadding=0 cellspacing=0><div id=deskarea1 class=areaHead><div class=toright2><span id=p11power></span>&nbsp;<div class=deskareaicon title="Toggle View Mode"onclick=toggleAspectRatio(1)>⇲</div><div class=deskareaicon title="Tourne à gauche"onclick=drotate(-1)>↺</div><div class=deskareaicon title="Tourner à droite"onclick=drotate(1)>↻</div><div id=deskRecordIcon class=deskareaicon title="Server is recording this session"style=display:none;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px></div><input id=deskFocusBtn type=button title="Toggle focus mode, when active only the region around the mouse is updated"onkeypress=return!1 onkeydown=return!1 value="Focus All"onclick=deskToggleFocus() style=margin-right:3px;display:none> <input id=deskSaveBtn type=button title="Enregistrer une capture d'écran du bureau distant"onkeypress=return!1 onkeydown=return!1 value=Sauver... onclick=deskSaveImage() class=mR> <input id=deskActionsBtn type=button title="Effectuer des actions d'alimentation sur le périphérique"onkeypress=return!1 onkeydown=return!1 value=Actions onclick=deviceActionFunction() class=mR> <input id=deskActionsSettings type=button value=Paramètres... title="Edit remote desktop settings"onkeypress=return!1 onkeydown=return!1 onclick=showDesktopSettings() class=mR> <input type=button title="Change the power state of the remote machine"onkeypress=return!1 onkeydown=return!1 value="Power Actions..."onclick=showPowerActionDlg() style=display:none></div><div><div id=idx_deskFullBtn2 onclick=deskToggleFull(event)>&nbsp;✖</div><input type=button id=autoconnectbutton1 value=AutoConnect onclick=autoConnectDesktop(event) onkeypress=return!1 onkeydown=return!1 style=display:none> <span id=connectbutton1span><input type=button id=connectbutton1 value=Connect onclick=connectDesktop(event,1) onkeypress=return!1 onkeydown=return!1 disabled></span><span id=connectbutton1hspan>&nbsp;<input type=button id=connectbutton1h value="HW Connect"onclick=connectDesktop(event,2) onkeypress=return!1 onkeydown=return!1 disabled></span><span id=disconnectbutton1span>&nbsp;<input type=button id=disconnectbutton1 value=Disconnect onclick=connectDesktop(event,0) onkeypress=return!1 onkeydown=return!1></span>&nbsp;<span id=deskstatus>Disconnected</span></div></div><div id=deskarea2><div class=areaProgress><div id=progressbar></div></div></div><div id=deskarea3x><div id=DeskFocus oncontextmenu=return!1 onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event)></div><div id=DeskParent><canvas id=Desk width=640 height=480 oncontextmenu=return!1 onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel=dmousewheel(event)></canvas></div><div id=DeskTools><div id=deskToolsAreaTop><a id=DeskToolsRefreshButton style=right:2px onclick=refreshDeskTools()>Rafraîchir</a><div id=deskToolsTopTabProcess class=deskToolsTopTab onclick=changeDeskToolTab(0) style=left:0;bottom:0>Processes</div><div id=deskToolsTopTabService class=deskToolsTopTab onclick=changeDeskToolTab(1) style=display:none;left:90px;color:gray>Services</div></div><div id=deskToolsArea><div id=DeskToolsProcessTab><div id=deskToolsHeader><a class=colmn1 title="Trier par identifiant de processus"onclick=sortProcess(0)>PID</a> <a class=colmn2 title="Trier par nom"onclick=sortProcess(1)>Nom</a></div><div id=DeskToolsProcesses></div></div><div id=DeskToolsServiceTab style=display:none><div id=deskToolsServiceHeader><a class=colmn1 style=width:70px title="Trier par état"onclick=sortService(0)>State</a> <a class=colmn2 title="Trier par nom"onclick=sortService(1)>Nom</a></div><div id=DeskToolsServices></div></div></div></div><div id=p11DeskConsoleMsg style=display:none;cursor:pointer;position:absolute;left:30px;top:17px;color:#ff0;background-color:rgba(0,0,0,.6);padding:10px;border-radius:5px onclick=p11clearConsoleMsg()></div></div><div id=deskarea4 class=areaFoot><div class=toright2><span id=DeskTimer title="Session time"></span>&nbsp; <select id=termdisplays style=display:none onchange=deskSetDisplay(event) onkeypress=return!1 onkeydown=return!1></select>&nbsp; <input id=DeskToolsButton type=button value=Outils title="Toggle tools view"onkeypress=return!1 onkeydown=return!1 onclick=toggleDeskTools()>&nbsp; <span id=DeskChatButton class=deskarea title="Ouvrir la fenêtre de discussion sur cet ordinateur"><img src=images/icon-chat.png onclick=deviceChat() height=16 width=16 style=padding-top:2px></span><span id=DeskNotifyButton title="Display a notification on the remote computer"><img src=images/icon-notify.png onclick=deviceToastFunction() height=16 width=16 style=padding-top:2px></span><span id=DeskOpenWebButton title="Open a web address on remote computer"><img src=images/icon-url2.png onclick=deviceUrlFunction() height=16 width=16 style=padding-top:2px></span></div><div><select id=deskkeys><option value=10>Ctrl+Alt+Del<option value=5>Win<option value=0>Win+Down<option value=1>Win+Up<option value=2>Win+L<option value=3>Win+M<option value=4>Shift+Win+M<option value=6>Win+R<option value=7>Alt-F4<option value=8>Ctrl-W<option value=9>Alt-Tab<option value=11>Win+Left<option value=12>Win+Right</select> <input id=DeskWD type=button value=Envoyer onkeypress=return!1 onkeydown=return!1 onclick=deskSendKeys()> <input id=DeskClip type=button value=Clipboard onkeypress=return!1 onkeydown=return!1 onclick=showDeskClip()> <input id=DeskType type=button value=Type onkeypress=return!1 onkeydown=return!1 onclick=showDeskType()> <label><span id=DeskControlSpan title="Basculer la souris et le clavier"><input id=DeskControl type=checkbox onkeypress=return!1 onkeydown=return!1 onclick=toggleKvmControl()>Input</span></label>&nbsp;</div></div></div></div><div id=p12 style=display:none><div id=p12title><div id=p12BackButton><div class=backButton tabindex=0 onclick=goBack() title=Retour onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><h1>Terminal - <span id=p12deviceName></span></h1></div><div id=p12warning onclick=showFeaturesDlg()><div class=icon2></div><div class=warningbox>Intel® AMT Redirection port or KVM feature is disabled<span id=p12warninga>, click here to enable it.</span></div></div><div id=p12warning2 onclick=showPowerActionDlg()><div class=icon2></div><div class=warningbox>Remote computer is not powered on, click here to issue a power command.</div></div><div id=termTable style=position:relative><table style=width:100% cellpadding=0 cellspacing=0><tr><td class=areaHead><div class=toright2><div id=termRecordIcon class=deskareaicon title="Server is recording this session"style=display:none;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-left:5px></div><input id=termActionsBtn type=button title="Effectuer des actions d'alimentation sur le périphérique"onkeypress=return!1 onkeydown=return!1 value=Actions onclick=deviceActionFunction()></div><div><input type=button id=autoconnectbutton2 value=AutoConnect onclick=autoConnectTerminal(event) onkeypress=return!1 onkeydown=return!1 style=display:none> <span id=connectbutton2span><input type=button id=connectbutton2 value=Connect onclick=connectTerminal(event,1) onkeypress=return!1 onkeydown=return!1 disabled></span><span id=connectbutton2hspan>&nbsp;<input type=button id=connectbutton2h value="HW Connect"onclick=connectTerminal(event,2) onkeypress=return!1 onkeydown=return!1 disabled></span><span id=disconnectbutton2span>&nbsp;<input type=button id=disconnectbutton2 value=Disconnect onclick=connectTerminal(event,0) onkeypress=return!1 onkeydown=return!1></span>&nbsp;<span id=termstatus>Disconnected</span><span id=termtitle></span></div><tr><td><div class=areaProgress><div id=termprogressbar></div></div><tr><td id=termarea3x><pre id=Term></pre><tr><td class=areaFoot><div class=toright2><span id=TermTimer title="Session time"></span>&nbsp; <span id=terminalSettingsButtons style=display:none><input id=id_tcrbutton type=button onkeypress=return!1 onkeydown=return!1 class=bottombutton value=CR+LF title="Toggle what the return key will send"onclick=termToggleCr()> <input id=id_tfxkeysbutton type=button onkeypress=return!1 onkeydown=return!1 class=bottombutton value="Intel (F10 = ESC+[OM)"title="Toggle F1 to F10 keys emulation type"onclick=termToggleFx()> <input id=id_ttypebutton type=button onkeypress=return!1 onkeydown=return!1 class=bottombutton value="Extended Ascii"title="Basculer le type d'émulation de terminal"onclick=termToggleType()> </span><span id=terminalSizeDropDown><select id=termSizeList onkeypress=return!1><option value=1>80x25<option value=2>100x30<option value=3 selected>Automatique</select> </span><select id=specialkeylist onkeypress=return!1></select> <input id=specialkeylistinput type=button onkeypress=return!1 class=bottombutton value=Envoyer title="Send the selected special key"onclick=sendSpecialKey()></div><div>&nbsp; <input type=button onkeypress=return!1 onkeydown=return!1 class=bottombutton id=ctrlcbutton value=Ctl-C onclick='termSendKey(3,"ctrlcbutton")'> <input type=button onkeypress=return!1 onkeydown=return!1 class=bottombutton id=ctrlxbutton value=Ctl-X onclick='termSendKey(24,"ctrlxbutton")'> <input type=button onkeypress=return!1 onkeydown=return!1 class=bottombutton id=escbutton value=ESC onclick='termSendKey(27,"escbutton")'> <input type=button onkeypress=return!1 onkeydown=return!1 class=bottombutton id=bsbutton value="Retour arrière"onclick='termSendKey(8,"bsbutton")'> <input type=button onkeypress=return!1 onkeydown=return!1 class=bottombutton id=pastebutton value=Paste title="Paste text into the terminal"onclick=showTermPasteDialog()></div></table><div id=p12TermConsoleMsg style=display:none;cursor:pointer;position:absolute;left:30px;top:45px;color:#ff0;background-color:rgba(0,0,0,.6);padding:10px;border-radius:5px onclick=p12clearConsoleMsg()></div></div></div><div id=p13 style=display:none><div id=p13title><div id=p13BackButton style=float:left><div class=backButton tabindex=0 onclick=goBack() title=Retour onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><h1>Files - <span id=p13deviceName></span></h1></div><table id=p13toolbar cellpadding=0 cellspacing=0><tr><td class=areaHead><div class=toright2><input id=filesActionsBtn type=button title="Effectuer des actions d'alimentation sur le périphérique"value=Actions onclick=deviceActionFunction()><div id=filesRecordIcon class=deskareaicon title="Server is recording this session"style=display:none;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-left:5px></div></div><div><input id=p13AutoConnect value=AutoConnect onclick=autoConnectFiles(event) type=button style=display:none> <input id=p13Connect value=Connect onclick=connectFiles(event) type=button> <span id=p13Status>Disconnected</span></div><tr><td class=areaHead2 valign=bottom><div id=p13rightOfButtons class=toright2></div><div><input type=button id=p13FolderUp disabled onclick=p13folderup() value=Up>&nbsp; <input type=button id=p13SelectAllButton disabled onclick=p13selectallfile() value="Tout Sélectionner">&nbsp; <input type=button id=p13RenameFileButton disabled value=Renommer onclick=p13renamefile()>&nbsp; <input type=button id=p13DeleteFileButton disabled value=Delete onclick=p13deletefile()>&nbsp; <input type=button id=p13ViewFileButton disabled value=Edit onclick=p13viewfile()>&nbsp; <input type=button id=p13NewFolderButton disabled value="Nouveau Dossier"onclick=p13createfolder()>&nbsp; <input type=button id=p13UploadButton disabled value=Télécharger onclick=p13uploadFile()>&nbsp; <input type=button id=p13CutButton disabled value=Cut onclick=p13copyFile(1)>&nbsp; <input type=button id=p13CopyButton disabled value=Copy onclick=p13copyFile(0)>&nbsp; <input type=button id=p13PasteButton disabled value=Paste onclick=p13pasteFile()>&nbsp; <input type=button id=p13RefreshButton disabled value=Rafraîchir onclick=p13folderup(9999)>&nbsp;</div><tr><td class=areaHead3><div class=toright2><select id=p13sortdropdown onchange=p13updateFiles()><option value=1 selected>Trier par nom<option value=2>Trier par taille<option value=3>Trier par date<option value=4>Descend by name<option value=5>Descend by size<option value=6>Descend by date</select></div><div>&nbsp;&nbsp;<span id=p13currentpath></span></div></table><div id=p13FilesConsoleMsg style=display:none;cursor:pointer;position:absolute;left:30px;top:165px;color:#ff0;background-color:rgba(0,0,0,.6);padding:10px;border-radius:5px onclick=p13clearConsoleMsg()></div><div id=p13filetable><div id=p13bigok style=display:none><b>✓</b></div><div id=p13bigfail style=display:none><b>✗</b></div><span id=p13files></span></div><table id=p13toolbarBottom cellpadding=0 cellspacing=0><tr><td class=style6>&nbsp;<span id=p13bottomstatus></span></table></div><div id=p14 style=display:none><div id=p14title><div id=p14BackButton style=float:left><div class=backButton tabindex=0 onclick=goBack() title=Retour onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><div id=devListToolbarViewIcons><div class=viewSelector onclick=deskToggleFull(event) title="Full Screen. Hold shift to browser full screen."><div class=viewSelector5></div></div></div><h1>Intel® AMT - <span id=p14deviceName></span></h1></div><iframe id=p14iframe src={{{domainurl}}}commander.htm></iframe></div><div id=p15 style=display:none><div id=p15title><div id=p15BackButton style=float:left><div class=backButton tabindex=0 onclick=goBack() title=Retour onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><h1><span id=p15deviceName></span></h1></div><table id=consoleTable cellpadding=0 cellspacing=0><tr><td class=areaHead><div class=toright2><div id=p15coreName title="Information about current core running on this agent"></div><input type=button id=p15uploadCore value="Agent Action"onclick=p15uploadCore(event) title="Change the agent Java Script code module"> <img onclick=p15downloadConsoleText() style=cursor:pointer;margin-top:6px title="Download console text"src=images/link4.png></div><div id=p15statetext></div><tr><td><div class=areaProgress><div id=consoleprogressbar></div></div><tr><td id=p15agentConsole><pre id=p15agentConsoleText></pre><tr><td class=areaFoot><table style=width:100%><tr><td style=width:99%><input id=p15consoleText style=width:100% onkeyup=p15consoleSend(event) onfocus=onConsoleFocus(1) onblur=onConsoleFocus(0)><td>&nbsp;<td id=p15outputselecttd><select id=p15outputselect><option value=1>Agent<option value=2>MQTT</select><td style=width:1%><input id=id_p15consoleClear type=button class=bottombutton value=Clear onclick=p15consoleClear()></table></table></div><div id=p16 style=display:none><div id=p16title><div id=p16BackButton style=float:left><div class=backButton tabindex=0 onclick=goBack() title=Retour onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><h1>Events - <span id=p16deviceName></span></h1></div><table class=pTable><tr><td class=h1><td class=auto-style1>Show <select id=p16limitdropdown onchange=refreshDeviceEvents()><option value=60>60 dernières<option value=120>120 dernières<option value=250>250 dernières<option value=500>500 dernières<option value=1000>1000 derniers</select> <a href=# onclick=p3showDownloadEventsDialog(1)><img src=images/link4.png height=10 width=10 title="Download Events"style=cursor:pointer></a>&nbsp;<td class=h2></table><div id=p16events></div></div><div id=p17 style=display:none><div id=p17title><div id=p17BackButton style=float:left><div class=backButton tabindex=0 onclick=goBack() title=Retour onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><h1>Details - <span id=p17deviceName></span></h1></div><div id=p17info></div></div><div id=p20 style=display:none><picture id=MainMeshImage style=border-width:0;height:200px;width:200px;float:right><source type=image/webp width=200 height=200 srcset=images/webp/mesh-256.webp><img alt=""width=200 height=200 src=images/mesh-256.png></picture><div style=float:left><div class=backButton tabindex=0 onclick=goBack() title=Retour onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><h1>General - <span id=p20meshName></span></h1><p id=p20info></div><div id=p30 style=display:none><table style=width:100% cellpadding=0 cellspacing=0><tr><td style=width:auto valign=top><div id=p30title><div style=float:left><div class=backButton tabindex=0 onclick=goBack() title=Retour onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><h1>General - <span id=p30userName></span></h1></div><div id=p30html></div><td style=width:20px><td style=width:200px><picture id=MainUserImage style=border-width:0;height:200px;width:200px;float:right><source type=image/webp width=200 height=200 srcset=images/webp/user-256.webp><img alt=""width=200 height=200 src=images/user-256.png></picture><div style=width:100%;text-align:center><strong><span id=MainUserState></span></strong></div></table><br><div id=p30html2></div><div id=p30html3></div></div><div id=p31 style=display:none><div style=float:left><div class=backButton tabindex=0 onclick=goBack() title=Retour onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><h1>Events - <span id=p31userName></span></h1><table class=pTable><tr><td class=h1><td class=auto-style1>Show <select id=p31limitdropdown onchange=refreshUsersEvents()><option value=60>60 dernières<option value=120>120 dernières<option value=250>250 dernières<option value=500>500 dernières<option value=1000>1000 derniers</select> <a href=# onclick=p3showDownloadEventsDialog(3)><img src=images/link4.png height=10 width=10 title="Download Events"style=cursor:pointer></a>&nbsp;<td class=h2></table><div id=p31events></div></div><div id=p40 style=display:none><h1>My Server Stats</h1><div class=areaHead><div class=toright2><select id=p40type onchange=updateServerTimelineStats()><option value=0>Connections<option value=1>Mémoire</select>&nbsp; <select id=p40time onchange=updateServerTimelineHours()><option value=3>3 dernières heures<option value=8>8 dernières heures<option value=24>Dernier jour<option value=168>Dernière semaine<option value=720>30 derniers jours</select>&nbsp; <img src=images/link4.png height=10 width=10 title="Download data points (.csv)"style=cursor:pointer onclick=p40downloadEvents()>&nbsp;</div><div><input value=Rafraîchir type=button onclick=refreshServerTimelineStats()> &nbsp;<label><input id=p40log type=checkbox onclick=updateServerTimelineHours()>Log-X</label></div></div><canvas id=serverMainStats></canvas></div><div id=p41 style=display:none><h1>My Server Tracing</h1><div class=areaHead><div class=toright2>Show <select id=p41limitdropdown onchange=displayServerTrace()><option value=100>100 dernières<option value=250>250 dernières<option value=500>500 dernières<option value=1000>1000 derniers</select> <input value=Clear type=button onclick=clearServerTracing()> <img src=images/link4.png height=10 width=10 title="Download trace (.csv)"style=cursor:pointer onclick=p41downloadServerTrace()>&nbsp;</div><div><input value=Tracing type=button onclick=setServerTracing()> <span id=p41traceStatus>None</span></div></div><div id=p41events></div></div><div id=p19 style=display:none><h1>Plugins - <span id=p19deviceName></span></h1><style>#p19headers{padding-right:7px;padding-bottom:10px;font-weight:700;border-bottom:1px dotted #00f}#p19headers>span:nth-child(n+2){border-left:1px solid #000}#p19headers>span{padding-left:4px;padding-right:4px}</style><div id=p19headers></div><div id=p19pages></div></div><br id=column_l_bottomgap></div><div id=footer><div class=footer1>{{{footer}}}</div><div class=footer2><a id=verifyEmailId2 style=display:none href=# onclick=account_showVerifyEmail()>Verify Email</a> &nbsp;<a href=terms>Terms &amp; Privacy</a></div></div><div id=dialog class=noselect style=display:none><div id=dialogHeader><div tabindex=0 id=id_dialogclose onclick=setDialogMode() onkeypress='"Enter"==event.key&&setDialogMode()'>✖</div><div id=id_dialogtitle></div></div><div id=dialogBody><div id=dialog1><div id=id_dialogMessage></div></div><div id=dialog2><div id=id_dialogOptions></div></div><div id=dialog3><div id=d3upload><div>File Selection</div><select id=d3uploadMode onchange=d3modechange()><option value=1>Local file upload<option value=2>Server file selection</select></div><div id=d3localmode style=display:none><div>Upload File</div><form id=d3localmodeform method=post enctype=multipart/form-data action=uploadfile.ashx target=fileUploadFrame><input id=d3auth name=auth style=display:none> <input id=d3attrib name=attrib style=display:none> <input type=file id=d3localFile name=files onchange=d3setActions()> <input type=submit id=d3submit style=display:none></form></div><div id=d3servermode><div id=d3serveraction valign=bottom><input type=button id=p3FolderUp disabled onclick=d3folderup() value=Up>&nbsp;</div><div id=d3serverfiles></div></div></div><div id=dialog7><div id=d7meshkvm><h4>Agent Remote Desktop</h4><div><div>Qualité</div><select id=d7bitmapquality dir=rtl></select></div><div><div>Mise à l'échelle</div><select id=d7bitmapscaling dir=rtl><option selected value=1024>100%<option value=896>87.5%<option value=768>75%<option value=640>62.5%<option value=512>50%<option value=384>37.5%<option value=256>25%<option value=128>12.5%</select></div><div><div>Frame rate</div><select id=d7framelimiter dir=rtl><option selected value=50>Fast<option value=100>Medium<option value=400>Lent<option value=1000>Very slow</select></div></div><div id=d7amtkvm><h4>Intel® AMT Hardware KVM</h4><div><div>Image Encoding</div><select id=d7desktopmode><option value=1>RLE8, le plus rapide<option value=2>RLE16, recommandé<option value=3>RAW8, Slow<option value=4>RAW16, Very Slow</select></div><div><div>Other Settings</div><div id=d7otherset style=display:block><label style=display:block><input type=checkbox id=d7showfocus>Show Focus Tool</label> <label style=display:block><input type=checkbox id=d7showcursor>Show Local Mouse Cursor</label> <label style=display:block><input type=checkbox id=d7localKeyMap>Local Keyboard Map</label></div></div></div></div></div><div id=idx_dlgButtonBar><input id=idx_dlgCancelButton type=button value=Annuler onclick=dialogclose(0)> <input id=idx_dlgOkButton type=button value=OK onclick=dialogclose(1)><div><input id=idx_dlgDeleteButton type=button value=Delete style=display:none onclick=dialogclose(2)></div></div></div><iframe name=fileUploadFrame style=display:none></iframe><form style=display:none method=post action=uploadfile.ashx enctype=multipart/form-data target=fileUploadFrame><input id=p5fileDragName name=name><input id=p5fileDragAuthCookie name=auth><input id=p5fileDragSize name=size><input id=p5fileDragType name=type><input id=p5fileDragData name=data><input id=p5fileDragLink name=link><input type=submit id=p5loginSubmit2 style=display:none></form><form style=display:none method=post action=uploadnodefile.ashx enctype=multipart/form-data target=fileUploadFrame><input id=p13fileDragName name=name><input id=p13fileDragSize name=size><input id=p13fileDragType name=type><input id=p13fileDragData name=data><input id=p13fileDragLink name=link><input type=submit id=p13loginSubmit2 style=display:none></form><audio id=chimes><source src=sounds/chimes.mp3 type=audio/mp3></audio></div><script>'use strict';
2
3 // Process server-side web state
4 var webState = '{{{webstate}}}';
views/translations/default-mobile-min_fr.handlebars
+1 -1
@@ -1 +1 @@
1 -<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link rel="shortcut icon"type=image/x-icon href={{{domainurl}}}favicon.ico><script src=scripts/common-0.0.1.js></script><script src=scripts/meshcentral.js></script><script src=scripts/agent-redir-ws-0.1.1.js></script><script src=scripts/agent-desktop-0.0.2.js></script><script src=scripts/amt-0.2.0.js></script><script src=scripts/amt-redir-ws-0.1.0.js></script><script src=scripts/amt-desktop-0.0.2.js></script><script src=scripts/zlib.js></script><script src=scripts/zlib-inflate.js></script><script src=scripts/zlib-adler32.js></script><script src=scripts/zlib-crc32.js></script><script keeplink=1 src=scripts/filesaver.js></script><title>{{{title}}}</title><style>a{color:#036;text-decoration:underline}#footer a{color:#fff;text-decoration:underline}#footer a:hover{color:#fff;text-decoration:none}.i1{background:url(../images/icons50.png) 0 0;height:50px;width:50px;border:none}.i2{background:url(../images/icons50.png) -50px 0;height:50px;width:50px;border:none}.i3{background:url(../images/icons50.png) -100px 0;height:50px;width:50px;border:none}.i4{background:url(../images/icons50.png) -150px 0;height:50px;width:50px;border:none}.i5{background:url(../images/icons50.png) -200px 0;height:50px;width:50px;border:none}.i6{background:url(../images/icons50.png) -250px 0;height:50px;width:50px;border:none}.m0{background:url(../images/images16.png) -32px 0;height:16px;width:16px;border:none;float:left}.m1{background:url(../images/images16.png) -16px 0;height:16px;width:16px;border:none;float:left}.m2{background:url(../images/images16.png) -96px 0;height:16px;width:16px;border:none;float:left}.m3{background:url(../images/images16.png) -112px 0;height:16px;width:16px;border:none;float:left}.gray{filter:gray;-webkit-filter:grayscale(100%) opacity(60%)}.DevSt{padding-left:5px;border-bottom-style:solid;border-bottom-width:1px;border-bottom-color:#ddd}.noselect{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.fileIcon4{background:url(../images/meshicon16.png);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:#fff;clear:both}</style><body onload='"undefined"!=typeof startup&&startup()'style="overflow-y:hidden;margin:0;padding:0;border:0;color:#000;font-size:13px;font-family:\'Trebuchet MS\',Arial,Helvetica,sans-serif"><div id=container><div id=mastheadx></div><div id=masthead style="background:url(logo.png) 0 0;background-size:341px 50px;background-color:#036;background-repeat:no-repeat;height:50px;width:100%;overflow:hidden"><div style="width:calc(100% - 50px);overflow:hidden"><div style=float:left;height:66px;color:#c8c8c8;padding-left:10px;padding-top:6px><strong><font style=font-size:36px;font-family:Arial,Helvetica,sans-serif>{{{title}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:10px><strong><font style=font-size:12px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><img id=topMenuIcon class=noselect style=position:absolute;right:0;top:10px;bottom:50px;color:#c8c8c8;font-size:44px;margin-right:8px;cursor:pointer;display:none onclick=topMenu() src=/images/3bars-30.png width=30 height=30></div><div id=page_content style=overflow-y:scroll;position:absolute;bottom:32px;top:50px;width:100%><div id=column_l style=width:100%;padding:0;position:absolute;bottom:0;top:0><div id=p0 style=display:none;width:100%;height:100%><div style=display:flex;align-items:center;width:100%;height:100%><div id=p0message style=text-align:center;width:100%><span id=p0span>Server disconnected</span>,<href onclick=reload() style=cursor:pointer><u>click to reconnect</u></href>.</div></div></div><div id=p1 style=display:none;width:100%;height:100%><div style=display:flex;align-items:center;width:100%;height:100%><div id=p1message style=text-align:center;width:100%></div></div></div><div id=p2 style=display:none><div id=xdevices></div></div><div id=p3 style=display:none;position:absolute;bottom:0;top:0;width:100%><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">◀</div><td><img src=/images/user-50.png width=50 height=50><td><div style=margin-left:5px><strong style=font-size:large><span id=p3userName></span></strong><br></div></table><div id=p3info style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%><div style=margin-left:8px><div id=p3AccountActions><p><strong>Account Security</strong><div style=margin-left:9px;margin-bottom:8px><div id=manageAuthApp style=margin-top:5px;display:none><a onclick=account_manageAuthApp() style=cursor:pointer>Manage authenticator app</a></div><div id=manageOtp style=margin-top:5px;display:none><a onclick=account_manageOtp(0) style=cursor:pointer>Manage backup codes</a></div></div><p><strong>Account Actions</strong><div style=margin-left:9px;margin-bottom:8px><div style=margin-top:5px><span id=verifyEmailId style=display:none><a onclick=account_showVerifyEmail() style=cursor:pointer>Verify email</a></span></div><div style=margin-top:5px><span id=changeEmailId style=display:none><a onclick=account_showChangeEmail() style=cursor:pointer>Change email address</a></span></div><div style=margin-top:5px><a onclick=account_showChangePassword() style=cursor:pointer>Change password</a><span id=p2nextPasswordUpdateTime></span></div><div style=margin-top:5px><a onclick=account_showDeleteAccount() style=cursor:pointer>Delete account</a></div></div><br style=clear:both></div><strong>Device Groups</strong><span id=p3createMeshLink1>(<a onclick=account_createMesh() style=cursor:pointer><img src=images/icon-addnew.png width=12 height=12 border=0> Nouveau</a>)</span><br><br><div id=p3meshes></div><div id=p3noMeshFound style=margin-left:9px;display:none>Aucun groupe d'appareils.<span id=p3createMeshLink2><a onclick=account_createMesh() style=cursor:pointer><strong>Get started here!</strong></a></span></div><br style=clear:both></div></div></div><div id=p5 style=display:none><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">◀</div><td><img src=/images/user-50.png width=50 height=50><td><div style=margin-left:5px><strong style=font-size:large>Mes Dossiers</strong><br></div></table><div id=p5myfiles style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%><table id=p5toolbar style=width:100%;height:78px cellpadding=0 cellspacing=0><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign=bottom><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p5FolderUp disabled onclick=p5folderup() value=Up> <input type=button style="width:calc(100%/5 - 5px)"id=p5SelectAllButton disabled onclick=p5selectallfile() value=ToutSélectionner onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5RenameFileButton disabled value=Renommer onclick=p5renamefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5DeleteFileButton disabled value=Delete onclick=p5deletefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5NewFolderButton disabled value=Folder onclick=p5createfolder() onkeypress=return!1 onkeydown=return!1></div><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p5UploadButton disabled value=Télécharger onclick=p5uploadFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5CutButton disabled value=Cut onclick=p5copyFile(1) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5CopyButton disabled value=Copy onclick=p5copyFile(0) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5PasteButton disabled value=Paste onclick=p5pasteFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5RefreshButton value=Rafraîchir onclick=p5refreshFiles() onkeypress=return!1 onkeydown=return!1></div><tr><td style=background-color:#e4e9e7;height:28px><table style=width:100%><tr><td id=p5currentpath style=overflow:hidden;padding-left:4px;padding-top:2px><td style=text-align:right;padding-right:4px><select id=p5sortdropdown onchange=updateFiles()><option value=1 selected>Trier par nom<option value=2>Trier par taille<option value=3>Trier par date<option value=4>Descend by name<option value=5>Descend by size<option value=6>Descend by date</select></table></table><div id=p5filetable style="width:100%;height:calc(100% - 133px);overflow:auto;-webkit-user-select:none"><span id=p5files></span></div><table id=p5toolbarBottom style=width:100%;height:22px;position:absolute;bottom:0;background-color:#d3d9d6 cellpadding=0 cellspacing=0><tr><td style=text-align:left;padding:3px>&nbsp;<span id=p5bottomstatus></span><td id=p5rightOfButtons style=text-align:right;padding:3px></table></div></div><div id=p10 style=display:none;position:absolute;bottom:0;top:0;width:100%;overflow:hidden><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0;position:absolute;top:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">◀</div><td><a id=MainComputerImage style=cursor:pointer onclick=p10showiconselector()></a><td><div style=margin-left:5px><strong><span id=p10deviceName></span></strong><br><span id=MainComputerState></span></div></table><div id=p10general style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%><div id=p10html style=margin-left:8px;margin-right:8px></div><div id=p10html2></div><div id=p10html3></div></div><div id=p10desktop style=overflow:hidden;position:absolute;top:55px;bottom:0;width:100%;display:none><div id=deskarea1 style=position:absolute;top:0;width:100%;height:25px><div style=padding-top:2px;padding-bottom:2px;background:silver><div style=float:right;text-align:right><span id=p14power></span>&nbsp; <input id=DeskSoftInput style=width:25px;display:none;opacity:.2 onblur=toggleSoftKeys(0) onkeypress="return ondeskkeypress(event)"onkeydown="return ondeskkeydown(event)"onkeyup="return ondeskkeyup(event)"></div><div style=margin-left:3px><input type=button id=connectbutton1 value=Connect onclick=connectDesktop(event,1) onkeypress=return!1 onkeydown=return!1 disabled> <input type=button id=connectbutton1h value="HW Connect"onclick=connectDesktop(event,2) onkeypress=return!1 onkeydown=return!1 disabled> <input type=button id=disconnectbutton1 value=Disconnect onclick=connectDesktop(event,0) onkeypress=return!1 onkeydown=return!1><span id=deskstatus>Disconnected</span></div></div></div><div id=deskarea3 style="position:absolute;top:25px;width:100%;height:calc(100% - 50px)"><div id=deskarea3x style=background:#000;text-align:center;height:100%;position:relative><div id=DeskParent style=height:100%><canvas id=Desk width=640 height=200 style=width:100%;-ms-touch-action:none;margin-left:0 oncontextmenu=return!1 onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel=dmousewheel(event)></canvas></div><div id=DeskTools style="position:absolute;width:400px;height:100%;background-color:gray;top:0;right:0;border-left:2px solid #d3d3d3;display:none"><a id=DeskToolsRefreshButton style=float:right;padding:3px;cursor:pointer onclick=refreshDeskTools()>Rafraîchir</a><div id=DeskToolsBar style="position:absolute;padding:3px;border-radius:3px 3px 0 0;top:5px;left:4px;bottom:26px;background-color:#d3d3d3;cursor:pointer">Processes</div><div style=position:absolute;top:26px;left:4px;right:4px;bottom:4px;background-color:#d3d3d3;text-align:left><div style="border-bottom:1px solid #a9a9a9;padding:3px"><a style=width:50px;padding-right:5px;float:left;cursor:pointer onclick=sortProcess(0)>PID</a><a style=cursor:pointer onclick=sortProcess(1)>Nom</a></div><div id=DeskToolsProcesses style=overflow-y:scroll;position:absolute;top:24px;bottom:0;width:100%></div></div></div></div></div><div id=deskarea4 style=position:absolute;bottom:0;width:100%;height:25px><div style=padding-top:2px;padding-bottom:2px;background:silver><div style=float:right;text-align:right><select id=termdisplays style=display:none onchange=deskSetDisplay(event) onclick=deskGetDisplayNumbers(event)></select>&nbsp;<span id=DeskToastButton><img src=images/icon-notify.png onclick=deviceToastFunction() height=16 width=16 style=padding-top:2px></span>&nbsp;</div><div><input id=deskActionsBtn type=button style=margin-left:3px onkeypress=return!1 onkeydown=return!1 value=Actions onclick=deviceActionFunction()> <input type=button value=Settings onkeypress=return!1 onkeydown=return!1 onclick=showDesktopSettings()> <input type=button onkeypress=return!1 onkeydown=return!1 value="Power Actions..."onclick=showPowerActionDlg() style=display:none> <input id=DeskSpecialKeys type=button value="Special Keys"onkeypress=return!1 onkeydown=return!1 onclick=sendSpecialKeys()> <input id=DeskSoftKeys type=button value=Clavier onkeypress=return!1 onkeydown=return!1 onclick=toggleSoftKeys(1)><label><span id=DeskControlSpan style=display:none><input id=DeskControl type=checkbox onkeypress=return!1 onkeydown=return!1>Input</span></label></div></div></div></div><div id=p10files style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%;display:none><table id=p13toolbar style=width:100%;height:111px cellpadding=0 cellspacing=0><tr><td style="background-color:silver;border-bottom:2px solid #000;padding:2px"><div style=float:right;text-align:right><input id=filesActionsBtn type=button onkeypress=return!1 onkeydown=return!1 value=Actions onclick=deviceActionFunction() style=margin-right:2px></div><div style=margin-left:2px><input id=p13AutoConnect value=AutoConnect onclick=autoConnectFiles(event) onkeypress=return!1 onkeydown=return!1 type=button style=display:none> <input id=p13Connect value=Connect onclick=connectFiles(event) onkeypress=return!1 onkeydown=return!1 type=button><span id=p13Status>Disconnected</span></div><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign=bottom><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p13FolderUp disabled onclick=p13folderup() value=Up> <input type=button style="width:calc(100%/5 - 5px)"id=p13SelectAllButton disabled onclick=p13selectallfile() value=ToutSélectionner onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13RenameFileButton disabled value=Renommer onclick=p13renamefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13DeleteFileButton disabled value=Delete onclick=p13deletefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13NewFolderButton disabled value=Folder onclick=p13createfolder() onkeypress=return!1 onkeydown=return!1></div><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p13UploadButton disabled value=Télécharger onclick=p13uploadFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13CutButton disabled value=Cut onclick=p13copyFile(1) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13CopyButton disabled value=Copy onclick=p13copyFile(0) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13PasteButton disabled value=Paste onclick=p13pasteFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13RefreshButton disabled value=Rafraîchir onclick=p13folderup(9999) onkeypress=return!1 onkeydown=return!1></div><tr><td style=background-color:#e4e9e7;height:28px><table style=width:100%><tr><td id=p13currentpath style=overflow:hidden;padding-left:4px;padding-top:2px><td style=text-align:right;padding-right:4px><select id=p13sortdropdown onchange=p13updateFiles()><option value=1 selected>Trier par nom<option value=2>Trier par taille<option value=3>Trier par date<option value=4>Descend by name<option value=5>Descend by size<option value=6>Descend by date</select></table></table><div id=p13filetable style="width:100%;height:calc(100% - 133px);overflow:auto;-webkit-user-select:none"><span id=p13files></span></div><table id=p13toolbarBottom style=width:100%;height:22px;position:absolute;bottom:0 cellpadding=0 cellspacing=0><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#d3d9d6>&nbsp;<span id=p13bottomstatus></span></table></div></div><div id=p20 style=display:none;position:absolute;bottom:0;top:0;width:100%><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">◀</div><td onclick=p20editmesh(1)><img src=/images/meshicon50.png width=50 height=50><td onclick=p20editmesh(1)><div style=margin-left:5px><strong style=font-size:large><span id=p20meshName></span></strong><br></div></table><div id=p20info style=margin-left:8px;margin-right:8px></div></div></div></div><div id=footer style=height:32px;width:100%;text-align:center;background-color:#113962;position:absolute;bottom:0><table id=footerMenu cellpadding=0 cellspacing=0 style=height:32px;width:100%;color:#fff;cursor:pointer;table-layout:fixed></table></div></div><div id=dialog style="z-index:1000;background-color:#eee;box-shadow:0 0 15px #666;font-family:Arial,Helvetica,sans-serif;border-radius:5px;position:fixed;top:90px;width:300px;display:none"><div style="width:100%;background-color:#036;color:#fff;border-radius:5px 5px 0 0"><div id=id_dialogclose style=float:right;padding:5px;cursor:pointer onclick=setDialogMode()><b>X</b></div><div id=id_dialogtitle style=padding:5px></div><div style=width:100%;margin:6px></div></div><div style=margin-right:16px;margin-left:8px><div id=dialog1 style=margin:auto;text-align:center;margin:3px><div id=id_dialogMessage style=padding:10px></div></div><div id=dialog2 style=margin:auto;margin:3px><div id=id_dialogOptions></div></div><div id=dialog3 style=margin:auto;margin:3px><select id=deskkeys style=width:100%><option value=10>Ctrl+Alt+Del<option value=11>Tab<option value=5>Win<option value=0>Win+Down<option value=1>Win+Up<option value=2>Win+L<option value=3>Win+M<option value=4>Shift+Win+M<option value=6>Win+R<option value=7>Alt-F4<option value=8>Ctrl-W<option value=9>Alt-Tab</select></div><div id=dialog7 style=margin:auto;margin:3px><div id=d7meshkvm><h4 style="width:100%;border-bottom:1px solid gray">Agent Remote Desktop</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir=rtl></select><div style=height:20px>Qualité</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir=rtl><option selected value=1024>100%<option value=896>87.5%<option value=768>75%<option value=640>62.5%<option value=512>50%<option value=384>37.5%<option value=256>25%<option value=128>12.5%</select><div style=height:20px>Mise à l'échelle</div></div><div style="margin:3px 0 3px 0"><select id=d7framelimiter style=float:right;width:200px;height:20px dir=rtl><option selected value=50>Fast<option value=100>Medium<option value=400>Lent<option value=1000>Very slow</select><div style=height:20px>Rate</div></div></div><div id=d7amtkvm><h4 style="width:100%;border-bottom:1px solid gray">Intel® AMT Hardware KVM</h4><div style=height:26px><select id=d7desktopmode style=float:right;width:200px><option value=1>RLE8, le plus rapide<option value=2>RLE16, recommandé<option value=3>RAW8, Slow<option value=4>RAW16, Very Slow</select><div>Encoding</div></div><div style=height:60px><div style="float:right;border:1px solid #666;width:200px;height:60px;overflow-y:scroll;background-color:#fff"><label><input type=checkbox id=d7showfocus>Show Focus Tool</label><br><label><input type=checkbox id=d7showcursor>Show Local Mouse Cursor</label><br></div><div>Autre</div></div></div></div></div><div id=idx_dlgButtonBar style=padding:10px;margin-bottom:20px><input id=idx_dlgCancelButton type=button value=Annuler style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)> <input id=idx_dlgOkButton type=button value=OK style=float:right;width:80px onclick=dialogclose(1)></div></div><div id=topMenu style="z-index:1000;background-color:#eee;box-shadow:0 0 15px #666;font-family:Arial,Helvetica,sans-serif;border-radius:0 0 5px 5px;position:fixed;top:50px;right:5px;width:170px;display:none"><div style="padding:12px;border-top:1px solid gray;color:#000;cursor:pointer"onclick=topMenu(2)>Mes Dossiers</div><div style="padding:12px;border-top:1px solid gray;color:#000;cursor:pointer"onclick=topMenu(1)>Mon Compte</div><div id=logoutMenuOption><a href=/logout><div style="padding:12px;border-top:1px solid gray;color:#000;cursor:pointer">Logout</div></a></div></div><iframe name=fileUploadFrame style=display:none></iframe><script>"use strict";var webState="{{{webstate}}}";for(var i in""!=webState&&(webState=JSON.parse(decodeURIComponent(webState))),webState)localStorage.setItem(i,webState[i]);webState.loctag||localStorage.removeItem("loctag");var files,args=parseUriArgs(),debugLevel=parseInt("{{{debuglevel}}}"),features=parseInt("{{{features}}}"),sessionTime=parseInt("{{{sessiontime}}}"),domain="{{{domain}}}",domainUrl="{{{domainurl}}}",authCookie="{{{authCookie}}}",authRelayCookie="{{{authRelayCookie}}}",authCookieRenewTimer=null,meshserver=null,xdr=null,serverinfo=null,nodes=[],meshes={},filetree={},userinfo=null,users=(serverinfo=null,null),nodeShortIdent=0,serverPublicNamePort="{{{serverDnsName}}}:{{{serverPublicPort}}}",debugmode=!1,attemptWebRTC=0!=(128&features),StatusStrs=["Disconnected","Connecting...","Setup...","Connected","Intel&reg; AMT Connected"],passRequirements="{{{passRequirements}}}";""!=passRequirements&&(passRequirements=JSON.parse(decodeURIComponent(passRequirements)));var sessionActivity=Date.now();function startup(){if(0==(32&features)){var e=null;try{e=top.location.toString().toLowerCase()}catch(e){}if(top!=self&&(null==e||0==top.active))return void(top.location=self.location)}if(!args.locale){var t=getstore("loctag",0);null!=t&&"*"!=t&&(args.locale=t)}(window.onresize=center)(),QV("changeEmailId",0==(2097152&features)),QH("p1message","Connecting..."),go(1),(meshserver=MeshServerCreateControl(domainUrl,authCookie)).onStateChanged=onStateChanged,meshserver.onMessage=onMessage,meshserver.Start();var o=localStorage.getItem("desktopsettings");null!=o&&(desktopsettings=JSON.parse(o)),applyDesktopSettings()}function onStateChanged(e,t,o,n){if(0==t){if(setDialogMode(0),go(0),"noauth"==n)return void QH("p0span","Unable to perform authentication");2==o?setTimeout(serverPoll,5e3):QH("p0span","Unable to connect web socket"),null!=authCookieRenewTimer&&(clearInterval(authCookieRenewTimer),authCookieRenewTimer=null)}else 2==t&&(meshserver.send({action:"meshes"}),meshserver.send({action:"nodes"}),meshserver.send({action:"files"}),xxcurrentView<2&&go(2),authCookieRenewTimer=setInterval(function(){meshserver.send({action:"authcookie"})},18e5));QV("topMenuIcon",2==t)}function serverPoll(){xdr=null;try{xdr=new XDomainRequest}catch(e){}(xdr=xdr||new XMLHttpRequest).open("HEAD",window.location.href),xdr.timeout=15e3,xdr.onload=function(){reload()},xdr.onerror=xdr.ontimeout=function(){setTimeout(serverPoll,1e4)},xdr.send()}function updateSelf(){if(QV("verifyEmailId",!0!==userinfo.emailVerified&&null!=userinfo.email&&1==serverinfo.emailcheck),QV("manageAuthApp",4096&features),QV("manageOtp",0!=(4096&features)&&(1==userinfo.otpsecret||0<userinfo.otphkeys)),QV("p3createMeshLink1",!1),QV("p3createMeshLink2",!1),"number"==typeof userinfo.passchange)if(-1==userinfo.passchange)QH("p2nextPasswordUpdateTime","- Réinitialiser à la prochaine connexion.");else if(null!=passRequirements&&"number"==typeof passRequirements.reset){var e=userinfo.passchange+86400*passRequirements.reset-Math.floor(Date.now()/1e3);e<0?QH("p2nextPasswordUpdateTime","- Réinitialiser à la prochaine connexion."):e<3600?QH("p2nextPasswordUpdateTime",format("- Réinitialisation en {0} minute {1}.",Math.floor(e/60),addLetterS(Math.floor(e/60)))):e<86400?QH("p2nextPasswordUpdateTime",format("- Réinitialisation dans {0} heure {1}.",Math.floor(e/3600),addLetterS(Math.floor(e/3600)))):QH("p2nextPasswordUpdateTime",format("- Réinitialiser dans le {0} jour {1}."),Math.floor(e/86400),addLetterS(Math.floor(e/86400)))}}function addLetterS(e){return 1<e?"s":""}function setSessionActivity(){sessionActivity=Date.now()}function checkIdleSessionTimeout(){Date.now()-sessionActivity>serverinfo.timeout&&(window.location.href="logout")}function onMessage(e,t){switch(t.action){case"serverinfo":(serverinfo=t.serverinfo).timeout&&(setInterval(checkIdleSessionTimeout,1e4),checkIdleSessionTimeout()),QV("p3AccountActions",0==(4&features)&&0==serverinfo.domainauth),QV("logoutMenuOption",0==(4&features)&&0==serverinfo.domainauth);break;case"authcookie":authCookie=t.cookie,authRelayCookie=t.rcookie;break;case"userinfo":userinfo=t.userinfo,QH("p3userName",userinfo.name),updateSelf();break;case"users":for(var o in users={},t.users)users[t.users[o]._id]=t.users[o];updateUsers();break;case"wssessioncount":wssessions=t.wssessions,updateUsers();break;case"meshes":for(var o in meshes={},t.meshes)meshes[t.meshes[o]._id]=t.meshes[o];updateMeshes(),updateDevices();break;case"files":filetree=setupBackPointers(t.filetree),updateFiles();break;case"nodes":for(var o in nodes=[],t.nodes)for(var n in t.nodes[o])meshes[o]?(t.nodes[o][n].namel=t.nodes[o][n].name.toLowerCase(),t.nodes[o][n].rname?t.nodes[o][n].rnamel=t.nodes[o][n].rname.toLowerCase():t.nodes[o][n].rnamel=t.nodes[o][n].namel,t.nodes[o][n].meshnamel=meshes[o].name.toLowerCase(),t.nodes[o][n].meshid=o,t.nodes[o][n].state=t.nodes[o][n].state?t.nodes[o][n].state:0,t.nodes[o][n].desc=t.nodes[o][n].desc,t.nodes[o][n].icon||(t.nodes[o][n].icon=1),t.nodes[o][n].ident=++nodeShortIdent,nodes.push(t.nodes[o][n])):console.log("Invalid mesh (1): "+o);updateDevices(),0==xxcurrentView&&go(parseInt("{{viewmode}}")),gotoDevice("{{currentNode}}",parseInt("{{viewmode}}"));break;case"powertimeline":if(t.nodeid!=powerTimelineReq)break;powerTimelineNode=t.nodeid,powerTimeline=t.timeline,powerTimelineUpdate=Date.now()+3e5,currentNode._id==t.nodeid&&drawDeviceTimeline();break;case"otpauth-request":if(2==xxdialogMode&&"otpauth-request"==xxdialogTag){var i=t.secret;52==i.length?i=i.split(/(.............)/).filter(Boolean).join(" "):32==i.length&&(i=(i=i.split(/(....)/).filter(Boolean).join(" ")).substring(0,20)+"<br/>"+i.substring(20)),QH("d2optinfo",'Install <a href="https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2" rel="noreferrer noopener" target=_blank>Google Authenticator</a> or a compatible application, use <a href="\' + message.url + \'" rel="noreferrer noopener" target=_blank> this link</a> or enter the secret below. Then, enter the current 6 digit token to activate 2-Step login.<br /><br /><div style=width:100%;text-align:center><tt id=d2optsecret secret="'+t.secret+'" style=font-size:15px>'+i+'</tt><br /><br />Token: <input type=text onkeypress="return (event.keyCode == 8) || (event.charCode >= 48 && event.charCode <= 57)" onkeyup=account_addOtpCheck(event) onkeydown=account_addOtpCheck() maxlength=6 id=d2otpauthinput type=text></div>'),QV("idx_dlgOkButton",!0),QE("idx_dlgOkButton",!1),Q("d2otpauthinput").focus()}break;case"otpauth-setup":if(xxdialogMode)return;setDialogMode(2,"Authenticator App",1,null,t.success?"<b style=color:green>2-step login activation successful</b>. You will now need a valid token to login again.":"<b style=color:red>2-step login activation failed</b>. Clear the secret from the application and try again. You only have a few minutes to enter the proper code.");break;case"otpauth-clear":if(xxdialogMode)return;setDialogMode(2,"Authenticator App",1,null,t.success?"<b style=color:green>2-step login activation removed</b>. You can reactivate this feature at any time.":"<b style=color:red>2-step login activation removal failed</b>. Try again.");break;case"otpauth-getpasswords":if(xxdialogMode)return;var a="One time tokens can be used as secondary authentication. Generate a set, print them and keep them in a safe place.";if(a+="<div style='border-radius:6px;border: 2px dashed #888;width:100%;margin-top:8px'><div style='padding:8px;font-family:Arial, Helvetica, sans-serif;font-size:20px;font-weight:bold'><table style=width:100%;text-align:center>",t.passwords){var s=0;for(var l in t.passwords){++s%2&&(a+="<tr>");for(var r=""+t.passwords[l].p;r.length<8;)r="0"+r;!0===t.passwords[l].u?a+="<td>"+r.substring(0,4)+"&nbsp;"+r.substring(4):a+="<td><strike style=color:#BBB>"+r.substring(0,4)+"&nbsp;"+r.substring(4)}}else a+="<tr><td>No Active Tokens";a+="</table></div></div><br />",a+="<div><input type=button value='Close' onclick=setDialogMode(0) style=float:right></input>",a+="<input type=button value='Nouveaux Jetons' onclick='account_manageOtp(1);'></input>",null!=t.passwords&&(a+="<input type=button value='Clear' onclick='account_manageOtp(2);'></input>"),setDialogMode(2,"Manage Backup Codes",8,null,a+="</div><br />","otpauth-manage");break;case"event":if(t.event.noact)break;switch(t.event.action){case"userWebState":if(null!=localStorage){var d=JSON.parse(t.event.state);for(var l in d)localStorage.setItem(l,d[l]);null!=d.loctag&&d.loctag!=oldLoctag&&(null!=d.loctag?args.locale=d.loctag:delete args.locale,updateDevices(),updateMeshes())}break;case"accountchange":if(userinfo.name==t.event.account.name){var p=t.event.account.siteadmin?t.event.account.siteadmin:0,c=userinfo.siteadmin?userinfo.siteadmin:0;(t.event.account.quota!=userinfo.quota||0==(8&userinfo.siteadmin)&&0!=(8&t.event.account.siteadmin))&&meshserver.send({action:"files"}),userinfo=t.event.account,c!=p&&updateSiteAdmin(),updateSelf()}break;case"createmesh":null!=t.event.links[userinfo._id]&&(meshes[t.event.meshid]={_id:t.event.meshid,name:t.event.name,mtype:t.event.mtype,desc:t.event.desc,links:t.event.links},updateMeshes(),updateDevices(),meshserver.send({action:"files"}));break;case"meshchange":if(null==meshes[t.event.meshid])meshes[t.event.meshid]={_id:t.event.meshid,name:t.event.name,mtype:t.event.mtype,desc:t.event.desc,links:t.event.links},meshserver.send({action:"nodes"});else{if(meshes[t.event.meshid].name!=t.event.name)for(var l in meshes[t.event.meshid].name=t.event.name,nodes)nodes[l].meshid==t.event.meshid&&(nodes[l].meshnamel=t.event.name.toLowerCase());if(meshes[t.event.meshid].desc=t.event.desc,meshes[t.event.meshid].links=t.event.links,null==meshes[t.event.meshid].links[userinfo._id]){20==xxcurrentView&&currentMesh==meshes[t.event.meshid]&&go(2),delete meshes[t.event.meshid];var u=[];for(var l in nodes)nodes[l].meshid!=t.event.meshid&&u.push(nodes[l]);nodes=u,10<=xxcurrentView&&xxcurrentView<20&&currentNode&&currentNode.meshid==t.event.meshid&&(setDialogMode(0),go(2))}}updateMeshes(),updateDevices(),meshserver.send({action:"files"}),20==xxcurrentView&&currentMesh._id==t.event.meshid&&p20updateMesh();break;case"deletemesh":meshes[t.event.meshid]&&(delete meshes[t.event.meshid],updateMeshes(),meshserver.send({action:"files"}));u=[];for(var l in nodes)nodes[l].meshid!=t.event.meshid&&u.push(nodes[l]);nodes=u,updateDevices(),20<=xxcurrentView&&xxcurrentView<30&&currentMesh._id==t.event.meshid&&(setDialogMode(0),go(2)),10<=xxcurrentView&&xxcurrentView<20&&currentNode&&currentNode.meshid==t.event.meshid&&(setDialogMode(0),go(2));break;case"addnode":var m=t.event.node;if(!meshes[m.meshid])break;if(null!=getNodeFromId(m._id))break;m.namel=m.name.toLowerCase(),m.rname?m.rnamel=m.rname.toLowerCase():m.rnamel=m.namel,m.meshnamel=meshes[m.meshid].name.toLowerCase(),m.state=0,m.icon||(m.icon=1),m.ident=++nodeShortIdent,nodes.push(m),updateDevices();break;case"removenode":var h=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){h=l;break}if(-1!=h){m=nodes[h];currentNode==m&&(10<=xxcurrentView&&xxcurrentView<20&&(setDialogMode(0),go(2)),currentNode=null),nodes.splice(h,1),updateDevices()}break;case"changenode":h=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){h=l;break}if(-1!=h)(m=nodes[h]).name=t.event.node.name,m.rname=t.event.node.rname,m.host=t.event.node.host,m.desc=t.event.node.desc,m.publicip=t.event.node.publicip,m.iploc=t.event.node.iploc,m.wifiloc=t.event.node.wifiloc,m.gpsloc=t.event.node.gpsloc,m.tags=t.event.node.tags,m.userloc=t.event.node.userloc,null!=t.event.node.agent&&(null==m.agent&&(m.agent={}),null!=t.event.node.agent.ver&&(m.agent.ver=t.event.node.agent.ver),null!=t.event.node.agent.id&&(m.agent.id=t.event.node.agent.id),null!=t.event.node.agent.caps&&(m.agent.caps=t.event.node.agent.caps),null!=t.event.node.agent.core?m.agent.core=t.event.node.agent.core:m.agent.core&&delete m.agent.core,m.agent.tag=t.event.node.agent.tag),null!=t.event.node.intelamt&&(null==m.intelamt&&(m.intelamt={}),null!=t.event.node.intelamt.state&&(m.intelamt.state=t.event.node.intelamt.state),null!=t.event.node.intelamt.host&&(m.intelamt.user=t.event.node.intelamt.host),null!=t.event.node.intelamt.user&&(m.intelamt.user=t.event.node.intelamt.user),null!=t.event.node.intelamt.tls&&(m.intelamt.tls=t.event.node.intelamt.tls),null!=t.event.node.intelamt.ver&&(m.intelamt.ver=t.event.node.intelamt.ver),null!=t.event.node.intelamt.tag&&(m.intelamt.tag=t.event.node.intelamt.tag),null!=t.event.node.intelamt.uuid&&(m.intelamt.uuid=t.event.node.intelamt.uuid),null!=t.event.node.intelamt.realm&&(m.intelamt.realm=t.event.node.intelamt.realm)),m.namel=m.name.toLowerCase(),m.rname?m.rnamel=m.rname.toLowerCase():m.rnamel=m.namel,t.event.node.icon&&(m.icon=t.event.node.icon),refreshDevice(m._id),updateDevices();break;case"nodemeshchange":h=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){h=l;break}if(-1!=h){m=nodes[h];null==meshes[t.event.newMeshId]?(currentNode==m&&(10<=xxcurrentView&&xxcurrentView<20&&(setDialogMode(0),go(2)),currentNode=null),nodes.splice(h,1)):(m.meshid=t.event.newMeshId,m.meshnamel=meshes[t.event.newMeshId].name.toLowerCase()),updateDevices(),refreshDevice(t.event.nodeid)}else{m=t.event.node;if(!meshes[m.meshid])break;m.namel=m.name.toLowerCase(),m.rname?m.rnamel=m.rname.toLowerCase():m.rnamel=m.namel,m.meshnamel=meshes[m.meshid].name.toLowerCase(),m.state=0,m.icon||(m.icon=1),m.ident=++nodeShortIdent,nodes.push(m),updateDevices()}break;case"nodeconnect":h=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){h=l;break}if(-1!=h)(m=nodes[h]).conn=t.event.conn,m.pwr=t.event.pwr,updateDevices();break;case"login":null!=users&&users["user/"+domain+"/"+t.event.username.toLowerCase()]&&(users["user/"+domain+"/"+t.event.username.toLowerCase()].login=t.event.time)}}}function topMenu(e){null!=xxdialogMode&&0!=xxdialogMode&&999!=xxdialogMode||(void 0===e?1==("none"==QS("topMenu").display)?0!=xxdialogMode&&null!=xxdialogMode||(QV("topMenu",!0),xxdialogMode=999):(QV("topMenu",!1),xxdialogMode=0):(QV("topMenu",!1),xxdialogMode=0,1==e&&3!=xxcurrentView&&goForward("account"),2==e&&5!=xxcurrentView&&goForward("files")))}var filetreelinkpath,backStack=[];function goBack(){xxdialogMode||(0<backStack.length&&backStack.pop(),goStack())}function goForward(e){xxdialogMode||(backStack.push(e),goStack())}function goStack(){if(0!=backStack.length){var e=backStack[backStack.length-1],t=e.split("/")[0];"node"==t&&(setupDeviceMenu(0),gotoDevice(e)),"mesh"==t&&gotoMesh(e),"account"==t&&go(3),"devices"==t&&go(2),"files"==t&&go(5)}else go(2)}function updateFooterMenu(e){for(;null!=e&&e.length<3;)e.push({n:""});var t="",o="";if(null!=e)for(var n in e)t+='<td style="cursor:pointer'+(""==o?"":";border-left:solid 1px white")+'" onclick="'+e[n].f+'">'+e[n].n,o=e[n].n;QH("footerMenu","<tr>"+t)}function account_manageAuthApp(){xxdialogMode||0==(4096&features)||(1==userinfo.otpsecret?account_removeOtp():account_addOtp())}function account_addOtp(){xxdialogMode||1==userinfo.otpsecret||0==(4096&features)||(setDialogMode(2,"Authenticator App",2,function(){meshserver.send({action:"otpauth-setup",secret:Q("d2optsecret").attributes.secret.value,token:Q("d2otpauthinput").value})},"<div id=d2optinfo>Loading...</div>","otpauth-request"),meshserver.send({action:"otpauth-request"}))}function account_addOtpCheck(e){var t=6==Q("d2otpauthinput").value.length;QE("idx_dlgOkButton",t),e&&13==e.keyCode&&t&&dialogclose(1)}function account_removeOtp(){xxdialogMode||1!=userinfo.otpsecret||0==(4096&features)||setDialogMode(2,"Authenticator App",3,function(){meshserver.send({action:"otpauth-clear"})},"Confirm removal of authenticator application 2-step login?")}function account_manageOtp(e){2==xxdialogMode&&"otpauth-manage"==xxdialogTag&&dialogclose(0),xxdialogMode||1!=userinfo.otpsecret||0==(4096&features)||meshserver.send({action:"otpauth-getpasswords",subaction:e})}function account_showVerifyEmail(){xxdialogMode||1==userinfo.emailVerified||1!=serverinfo.emailcheck||setDialogMode(2,"Email Verification",3,account_showVerifyEmailEx,"Click ok to send a verification mail to:<br /><div style=padding:8px><b>"+EscapeHtml(userinfo.email)+"</b></div>Please wait a few minute to receive the verification.")}function account_showVerifyEmailEx(){meshserver.send({action:"verifyemail",email:userinfo.email})}function account_showChangeEmail(){xxdialogMode||(setDialogMode(2,"Email Address Change",3,account_changeEmail,addHtmlValue("Email","<input id=dp3email style=width:170px maxlength=256 onchange=account_validateEmail() onkeyup=account_validateEmail(event) />")),null!=userinfo.email&&(Q("dp3email").value=userinfo.email),account_validateEmail(),Q("dp3email").focus())}function account_validateEmail(e,t){QE("idx_dlgOkButton",validateEmail(Q("dp3email").value)&&Q("dp3email").value!=userinfo.email),null!=e&&13==e.keyCode&&dialogclose(1)}function account_changeEmail(){meshserver.send({action:"changeemail",email:Q("dp3email").value})}function account_showDeleteAccount(){if(!xxdialogMode){var e="<form method=post><table style=margin-left:10px><input type=hidden name=action value=deleteaccount /><input type=hidden name=authcookie value="+authCookie+" /><tr>";e+="<td align=right>Mot de passe:</td><td><input id=apassword1 type=password name=apassword1 autocomplete=off onchange=account_validateDeleteAccount() onkeyup=account_validateDeleteAccount() /></td>",e+="</tr><tr><td align=right>Mot de passe:</td><td><input id=apassword2 type=password name=apassword2 autocomplete=off onchange=account_validateDeleteAccount() onkeyup=account_validateDeleteAccount() /></td>",e+="</tr></table><div style=padding:10px;margin-bottom:4px>",e+='<input id=account_dlgCancelButton type=button value="Annuler" style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)>',e+='<input id=account_dlgOkButton type=submit value="OK" style="float:right;width:80px" onclick=dialogclose(1)>',setDialogMode(2,"Delete Account",0,null,e+="</div><br /></form>"),account_validateDeleteAccount(),Q("apassword1").focus()}}function account_showChangePassword(){if(xxdialogMode)return!1;var e="<table style=margin-left:10px>";if(e+="<tr><td align=right>"+nobreak("Old password:")+"</td><td><input id=apassword0 type=password name=apassword0 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /> <b></b></td></tr>",e+="<tr><td align=right>"+nobreak("Nouveau mot de passe:")+"</td><td><input id=apassword1 type=password name=apassword1 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /> <b><span id=dxPassWarn></span></b></td></tr>",e+="<tr><td align=right>"+nobreak("Nouveau mot de passe:")+"</td><td><input id=apassword2 type=password name=apassword2 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /></td></tr>",65536&features&&(e+="<tr><td align=right>Password hint:</td><td><input id=apasswordhint name=apasswordhint maxlength=250 type=text autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /></td></tr>"),e+="</table>",passRequirements){var t=[],o=0;for(var n in passRequirements)"reset"!=n&&"hint"!=n&&(t.push(n+":"+passRequirements[n]),o++);0<o&&(e+="<br /><span style=font-size:x-small>"+format("Exigences: {0}.",t.join(", "))+"</span>")}return setDialogMode(2,"Change Password",3,account_showChangePasswordEx,e+="<br />"),Q("apassword0").focus(),account_validateNewPassword(),!1}function account_showChangePasswordEx(){if(Q("apassword1").value==Q("apassword2").value){var e={action:"changepassword",oldpass:Q("apassword0").value,newpass:Q("apassword1").value};65536&features&&(e.hint=Q("apasswordhint").value),meshserver.send(e)}}function account_createMesh(){if(!xxdialogMode)if(4294967295==userinfo.siteadmin||0==(64&userinfo.siteadmin))if(!0===userinfo.emailVerified||1!=serverinfo.emailcheck||4294967295==userinfo.siteadmin)if(!(262144&features)||1==userinfo.otpsecret||0<userinfo.otphkeys||0<userinfo.otpkeys){var e=addHtmlValue("Nom","<input id=dp3meshname style=width:170px maxlength=64 onchange=account_validateMeshCreate() onkeyup=account_validateMeshCreate() />");e+=addHtmlValue("Type","<div style=width:170px;margin:0;padding:0><select id=dp3meshtype style=width:100% onchange=account_validateMeshCreate() ><option value=2>Groupe d'agents logiciels</option><option value=1>Intel&reg; AMT only</option></select></div>"),setDialogMode(2,"Create Device Group",3,account_createMeshEx,e+=addHtmlValue("Description","<div style=width:170px;margin:0;padding:0><textarea id=dp3meshdesc maxlength=1024 style=width:100%;resize:none></textarea></div>")),account_validateMeshCreate(),Q("dp3meshname").focus()}else setDialogMode(2,"Account Security",1,null,'Unable to access a device until two-factor authentication is enabled. This is required for extra security. Go to the "My Account" and look at the "Account Security" section.');else setDialogMode(2,"Account Security",1,null,'Unable to access a device until a email address is verified. This is required for password recovery. Go to the "My Account" to change and verify an email address.');else setDialogMode(2,"Nouveau Group",1,null,"This account does not have the rights to create a new device group.")}function account_validateMeshCreate(){QE("idx_dlgOkButton",0<Q("dp3meshname").value.length)}function account_createMeshEx(e,t){meshserver.send({action:"createmesh",meshname:Q("dp3meshname").value,meshtype:Q("dp3meshtype").value,desc:Q("dp3meshdesc").value})}function account_validateDeleteAccount(){QE("account_dlgOkButton",0<Q("apassword1").value.length&&Q("apassword1").value==Q("apassword2").value)}function account_validateNewPassword(){var e="",t=0<Q("apassword0").value.length&&0<Q("apassword1").value.length&&Q("apassword1").value==Q("apassword2").value&&Q("apassword0").value!=Q("apassword1").value;if(65536&features&&Q("apasswordhint").value==Q("apassword1").value&&(t=!1),""!=Q("apassword1").value)if(null==passRequirements||""==passRequirements){var o=checkPasswordStrength(Q("apassword1").value);e=80<=o?"<span style=color:green>Strong<span>":60<=o?"<span style=color:blue>&#9679;<span>":"<span style=color:red>&#9679;<span>"}else{0==checkPasswordRequirements(Q("apassword1").value,passRequirements)&&(t=!1,e="<span style=color:red>Politique<span>")}QH("dxPassWarn",e),QE("idx_dlgOkButton",t)}function checkPasswordStrength(e){var t=0,o={},n=0,i={digits:/\d/.test(e),lower:/[a-z]/.test(e),upper:/[A-Z]/.test(e),nonWords:/\W/.test(e)};if(!e)return 0;for(var a=0;a<e.length;a++)o[e[a]]=(o[e[a]]||0)+1,t+=5/o[e[a]];for(var s in i)n+=1==i[s]?1:0;return parseInt(t+10*(n-1))}function checkPasswordRequirements(e,t){if(null==t||""==t||"object"!=typeof t)return!0;if(t.min&&e.length<t.min)return!1;if(t.max&&e.length>t.max)return!1;for(var o=0,n=0,i=0,a=0,s=0;s<e.length;s++)/\d/.test(e[s])&&o++,/[a-z]/.test(e[s])&&n++,/[A-Z]/.test(e[s])&&i++,/\W/.test(e[s])&&a++;return!(t.num&&o<t.num)&&(!(t.lower&&n<t.lower)&&(!(t.upper&&i<t.upper)&&!(t.nonalpha&&a<t.nonalpha)))}function updateMeshes(){var e="",t=0;for(i in meshes){t++;var o=meshes[i].links[userinfo._id].rights,n="Partial Rights";4294967295==o?n="Full Administrator":0==o&&(n="No Rights"),e+="<div style=cursor:pointer onclick=goForward('"+i+"')>",e+='<div style="float:left;margin-left:4px"><img src="/images/meshicon50.png" width=50 height=50 /></div>',e+='<div style="width:auto;height:40px;background-color:lightgray;margin-top:5px;margin-bottom:5px;margin-left:60px;padding-top:5px;padding-bottom:5px;border-radius:8px 0px 0px 8px">',e+="<div><div style=padding-left:12px;padding-top:2px><b>"+EscapeHtml(meshes[i].name)+"</b></div><div style=padding-left:12px;padding-top:3px;color:gray>"+n+"</div></div>",e+="</div></div>"}QH("p3meshes",e),QV("p3noMeshFound",0==t)}function gotoMesh(e){null==(currentMesh=meshes[e])&&goBack(),p20updateMesh(),go(20)}var sortorder,filetreelocation=[];function p5refreshFiles(){meshserver.send({action:"files"})}function updateFiles(){if(QV("MainMenuMyFiles",0==(8&features)),0==(8&features)){for(var e,t="",o="",n="<a style=cursor:pointer onclick=p5folderup(0)>Root</a>",i="Root",a=filetree,s=1,l=[],r=filetreelinkpath,d=[],p=document.getElementsByName("fc"),c=0;c<p.length;c++)p[c].checked&&d.push(p[c].value);for(var c in filetreelinkpath="",filetreelocation){if(null==a.f||null==a.f[filetreelocation[c]])break;if(l.push(filetreelocation[c]),i+=" / "+filetreelocation[c],1==s){var u=filetreelocation[c].split("/");e=window.location+u[0]+"files/"+u[2],filetreelinkpath+=filetreelocation[c]}else""!=filetreelinkpath&&(filetreelinkpath+="/"+filetreelocation[c],2<s&&(e+="/"+filetreelocation[c]));n+=" / <a style=cursor:pointer onclick=p5folderup("+s+")>"+(null!=(a=a.f[filetreelocation[c]]).n?a.n:filetreelocation[c])+"</a>",s++}filetreelocation=l;var m=i.toLowerCase().startsWith("root / "+userinfo._id+" / public"),h=p5sort_files(a.f);for(var c in h){var f,g=h[c],v=g.n;f=40<(f=v).length?EscapeHtml(v.substring(0,40))+"...":EscapeHtml(v),v=EscapeHtml(v);var k="";null!=g.s&&(k=getFileSizeStr(g.s));var y="";if(g.t<3||4==g.t){y="<div class=filelist file=999><input file=999 style=float:left name=fc class=fcb type=checkbox onchange=p5setActions() value='"+v+"'>&nbsp;<span style=float:right;padding-right:4px>"+(1==g.t||4==g.t?p5getQuotabar(g):"")+"</span><span><div class=fileIcon"+g.t+'></div><a style=cursor:pointer onclick=p5folderset("'+encodeURIComponent(g.nx)+'")>'+f+"</a></span></div>"}else{var x=f,b="";m&&(b=" (<a style=cursor:pointer onclick='p5showPublicLink(\""+e+"/"+g.nx+"\")'>Link</a>)"),0<g.s&&(x='<a rel="noreferrer noopener" target="_blank" href="downloadfile.ashx?link='+encodeURIComponent(filetreelinkpath+"/"+g.nx)+'">'+f+"</a>"+b),y="<div class=filelist file=3><input file=3 style=float:left name=fc class=fcb type=checkbox onchange=p5setActions() value='"+g.nx+"'>&nbsp;<span style=float:right;padding-right:4px>"+k+"</span><span><div class=fileIcon"+g.t+"></div>"+x+"</span></div>"}g.t<3?t+=y:o+=y}if(QH("p5rightOfButtons",p5getQuotabar(a)),QH("p5files",t+o),QH("p5currentpath",n),QE("p5FolderUp",0!=filetreelocation.length),QV("p5PublicShare",m),r==filetreelinkpath){p=document.getElementsByName("fc");for(c=0;c<p.length;c++)p[c].checked=0<=d.indexOf(p[c].value)}p5setActions()}}function getNiceSize(e){return e<=0?"Storage exceed":e<2048?format("{0}b left",e):e<2097152?format("{0}k left",Math.round(e/1024)):e<2147483648?format("{0}m left",Math.round(e/1024/1024)):format("{0}g left",Math.round(e/1024/1024/1024))}function p5getQuotabar(e){for(;1<e.t&&4!=e.t;)e=e.parent;return 1!=e.t&&4!=e.t||null==e.maxbytes?"":getNiceSize(e.maxbytes-e.s)+" <progress style=height:10px;width:100px value="+e.s+" max="+e.maxbytes+" />"}function p5showPublicLink(e){setDialogMode(2,"Public Link",1,null,'<input type=text style=width:100% value="'+e+'" readonly />')}function p5sort_filename(e,t){return e.ln>t.ln?1*sortorder:e.ln<t.ln?-1*sortorder:0}function p5sort_timestamp(e,t){return e.d>t.d?1*sortorder:e.d<t.d?-1*sortorder:0}function p5sort_bysize(e,t){return e.s==t.s?p5sort_filename(e,t):(e.s-t.s)*sortorder}function p5sort_files(e){var t=[],o=Q("p5sortdropdown").value;for(var n in e)e[n].nx=n,null==e[n].n&&(e[n].n=n),e[n].ln=e[n].n.toLowerCase(),t.push(e[n]);return sortorder=1,3<o&&(sortorder=-1,o-=3),1==o?t.sort(p5sort_filename):2==o?t.sort(p5sort_bysize):3==o&&t.sort(p5sort_timestamp),t}function p5setActions(){var e=getFileSelCount(),t=getFileCount(),o=getFileSelCount(!1);QE("p5DeleteFileButton",0<e&&0<filetreelocation.length),QE("p5NewFolderButton",0<filetreelocation.length),QE("p5UploadButton",0<filetreelocation.length),QE("p5RenameFileButton",1==e&&0<filetreelocation.length),QE("p5SelectAllButton",0<t),Q("p5SelectAllButton").value=0<e?"None":"Tout",QE("p5CutButton",0<o&&e==o),QE("p5CopyButton",0<o&&e==o),QE("p5PasteButton",null!=p5clipboard&&0<p5clipboard.length&&0<filetreelocation.length)}function getFileSelCount(e){for(var t=0,o=document.getElementsByName("fc"),n=0;n<o.length;n++)!o[n].checked||0==e&&"3"!=o[n].attributes.file.value||t++;return t}function getFileSelDirCount(){for(var e=0,t=document.getElementsByName("fc"),o=0;o<t.length;o++)t[o].checked&&"999"==t[o].attributes.file.value&&e++;return e}function getFileCount(){return document.getElementsByName("fc").length}function p5selectallfile(){for(var e=0==getFileSelCount(),t=document.getElementsByName("fc"),o=0;o<t.length;o++)t[o].checked=e;p5setActions()}function setupBackPointers(e){if(null!=e.f){var t=0,o=0;for(var n in e.f)setupBackPointers(e.f[n]),(e.f[n].parent=e).f[n].s&&(t+=e.f[n].s),e.f[n].c&&(o+=e.f[n].c),3==e.f[n].t&&o++;e.s=t,e.c=o}return e}function getFileSizeStr(e){return 1==e?"1 octet":format("{0} octets",e)}function p5folderup(e){if(null==e)filetreelocation.pop();else for(;filetreelocation.length>e;)filetreelocation.pop();return updateFiles(),!1}function p5folderset(e){return filetreelocation.push(decodeURIComponent(e)),updateFiles(),!1}function p5createfolder(){setDialogMode(2,"Nouveau Dossier",3,p5createfolderEx,"<input type=text id=p5renameinput maxlength=64 onkeyup=p5fileNameCheck(event) style=width:100% />"),focusTextBox("p5renameinput"),p5fileNameCheck()}function p5createfolderEx(){meshserver.send({action:"fileoperation",fileop:"createfolder",path:filetreelocation,newfolder:Q("p5renameinput").value})}function p5deletefile(){var e=getFileSelCount(),t=0<getFileSelDirCount()?"<br /><br /><label><input type=checkbox id=p5recdeleteinput>Recursive delete</label><br>":"<input type=checkbox id=p5recdeleteinput style='display:none'>";setDialogMode(2,"Delete",3,p5deletefileEx,1<e?format("Delete {0} selected items?",e)+t:"Delete selected item?"+t)}function p5deletefileEx(){for(var e=[],t=document.getElementsByName("fc"),o=0;o<t.length;o++)t[o].checked&&e.push(t[o].value);meshserver.send({action:"fileoperation",fileop:"delete",path:filetreelocation,delfiles:e,rec:Q("p5recdeleteinput").checked})}function p5renamefile(){for(var e,t=document.getElementsByName("fc"),o=0;o<t.length;o++)t[o].checked&&(e=t[o].value);setDialogMode(2,"Renommer",3,p5renamefileEx,'<input type=text id=p5renameinput maxlength=64 onkeyup=p5fileNameCheck(event) style=width:100% value="'+e+'" />',{action:"fileoperation",fileop:"rename",path:filetreelocation,oldname:e}),focusTextBox("p5renameinput"),p5fileNameCheck()}function p5renamefileEx(e,t){t.newname=Q("p5renameinput").value,meshserver.send(t)}function p5fileNameCheck(e){var t=isFilenameValid(Q("p5renameinput").value);QE("idx_dlgOkButton",t),1==t&&e&&13==e.keyCode&&dialogclose(1)}var isFilenameValid=function(){var t=/^[^\\/:\*\?"<>\|]+$/,o=/^\./,n=/^(nul|prn|con|lpt[0-9]|com[0-9])(\.|$)/i;return function(e){return t.test(e)&&!o.test(e)&&!n.test(e)&&"."!=e[0]}}();function p5uploadFile(){setDialogMode(2,"Upload File",3,p5uploadFileEx,'<form method=post enctype=multipart/form-data action=uploadfile.ashx target=fileUploadFrame><input type=text name=link style=display:none id=p5uploadpath value="'+encodeURIComponent(filetreelinkpath)+'" /><input type=file name=files id=p5uploadinput style=width:100% multiple=multiple onchange="updateUploadDialogOk(\'p5uploadinput\')" /><input type=hidden name=authCookie value='+authCookie+" /><input type=submit id=p5loginSubmit style=display:none /></form>"),updateUploadDialogOk("p5uploadinput")}function p5uploadFileEx(){Q("p5loginSubmit").click()}function updateUploadDialogOk(e){QE("idx_dlgOkButton",""!=Q(e).value)}var p5clipboard=null,p5clipboardFolder=null,p5clipboardCut=0;function p5copyFile(e){var t=document.getElementsByName("fc");p5clipboard=[],p5clipboardCut=e,p5clipboardFolder=Clone(filetreelocation);for(var o=0;o<t.length;o++)t[o].checked&&"3"==t[o].attributes.file.value&&p5clipboard.push(t[o].value);p5updateClipview()}function p5pasteFile(){var e="";null!=p5clipboard&&0<p5clipboard.length&&(e=format("Confim {0} of {1} entrie{2} to this location?",0==p5clipboardCut?"copy":"move",p5clipboard.length,1<p5clipboard.length?"s":"")),setDialogMode(2,"Paste",3,p5pasteFileEx,e)}function p5pasteFileEx(){meshserver.send({action:"fileoperation",fileop:0==p5clipboardCut?"copy":"move",scpath:p5clipboardFolder,path:filetreelocation,names:p5clipboard}),p5folderup(999),1==p5clipboardCut&&(p5clipboardFolder=p5clipboard=null,p5clipboardCut=0,p5updateClipview())}function p5updateClipview(){var e="";null!=p5clipboard&&0<p5clipboard.length&&(e=format("Holding {0} entrie{1} for {2}",p5clipboard.length,1<p5clipboard.length?"s":"",0==p5clipboardCut?"copy":"move")+', <a href=# onclick="return p5clearClip()" style=cursor:pointer>Clear</a>.'),QH("p5bottomstatus",e),p5setActions()}function p5clearClip(){return p5clipboardFolder=p5clipboard=null,p5clipboardCut=0,p5updateClipview(),!1}function p5fileDragDrop(e){if(haltEvent(e),QV("bigfail",!1),QV("bigok",!1),null!=e.dataTransfer&&0!=e.dataTransfer.files.length&&0!=filetreelocation.length)for(var t=[],o=[],n=[],i=[],a=e.dataTransfer.files.length,s=0;s<e.dataTransfer.files.length;s++){var l=new FileReader,r=e.dataTransfer.files[s];t.push(r.name),o.push(r.size),n.push(r.type),l.onload=function(e){i.push(e.target.result),0==--a&&(Q("p5fileDragName").value=t.join("*"),Q("p5fileDragSize").value=o.join("*"),Q("p5fileDragType").value=n.join("*"),Q("p5fileDragData").value=i.join("*"),Q("p5fileDragLink").value=encodeURIComponent(filetreelinkpath),Q("p5loginSubmit2").click())},l.readAsDataURL(r)}}var p5dragtimer=null;function p5fileDragOver(e){haltEvent(e),null!=p5dragtimer&&(clearTimeout(p5dragtimer),p5dragtimer=null);var t=!0;0==filetreelocation.length&&(t=!1),QV("bigok",t),QV("bigfail",!t)}function p5fileDragLeave(e){haltEvent(e),"p5filetable"!=e.target.id?(QV("bigfail",!1),QV("bigok",!1)):p5dragtimer=setTimeout("QV('bigfail',false);QV('bigok',false);p5dragtimer=null;",200)}function ondeskkeypress(e){if(toggleSoftKeys(0),Q("DeskSoftInput").value="",setSessionActivity(),desktop&&!xxdialogMode&&10==xxcurrentView){if(null!=currentNode){var t=meshes[currentNode.meshid].links[userinfo._id].rights;if(0==(4294967295==t||0!=(8&t)&&0==(256&t)))return!1;if(1==(4294967295!=t&&0!=(8&t)&&0==(256&t)&&0!=(4096&t))&&(1==e.altKey||1==e.ctrlKey||e.keyCode<32&&8!=e.keyCode&&13!=e.keyCode||90<e.keyCode))return!1}return desktop.m.handleKeys(e)}}function ondeskkeydown(e){if(toggleSoftKeys(0),Q("DeskSoftInput").value="",setSessionActivity(),desktop&&!xxdialogMode&&10==xxcurrentView){if(null!=currentNode){var t=meshes[currentNode.meshid].links[userinfo._id].rights;if(0==(4294967295==t||0!=(8&t)&&0==(256&t)))return!1;if(1==(4294967295!=t&&0!=(8&t)&&0==(256&t)&&0!=(4096&t))&&(1==e.altKey||1==e.ctrlKey||e.keyCode<32&&8!=e.keyCode&&13!=e.keyCode||90<e.keyCode))return!1}return desktop.m.handleKeyDown(e)}}function ondeskkeyup(e){if(toggleSoftKeys(0),Q("DeskSoftInput").value="",setSessionActivity(),desktop&&!xxdialogMode&&10==xxcurrentView){if(null!=currentNode){var t=meshes[currentNode.meshid].links[userinfo._id].rights;if(0==(4294967295==t||0!=(8&t)&&0==(256&t)))return!1;if(1==(4294967295!=t&&0!=(8&t)&&0==(256&t)&&0!=(4096&t))&&(1==e.altKey||1==e.ctrlKey||e.keyCode<32&&8!=e.keyCode&&13!=e.keyCode||90<e.keyCode))return!1}return desktop.m.handleKeyUp(e)}}var updateDevicesTimer=null;function updateDevices(){null==updateDevicesTimer&&(updateDevicesTimer=setTimeout(updateDevicesEx,200))}var deviceHeaderCount,sort=0,deviceHeaderId=0,deviceHeaders={},showRealNames=!1,deviceHeaderTotal=0,deviceHeadersTitles=(deviceHeaders={},{});function updateDevicesEx(){null!=updateDevicesTimer&&(clearTimeout(updateDevicesTimer),updateDevicesTimer=null);var e="",t=0,o=null,n=0,i={};for(var a in deviceHeaderCount={},deviceHeaders={},deviceHeadersTitles={},(deviceHeaderTotal=deviceHeaderId=0)==sort?nodes.sort(meshSort):1==sort?nodes.sort(powerSort):2==sort&&(1==showRealNames?nodes.sort(deviceHostSort):nodes.sort(deviceSort)),nodes)if(0!=nodes[a].v){var s=meshes[nodes[a].meshid].links[userinfo._id];if(null!=s){s.rights;if(0==sort){if(nodes.sort(meshSort),nodes[a].meshid!=o){deviceHeaderSet();var l="";1==meshes[nodes[a].meshid].mtype&&(l="<span style=color:lightgray>, Intel&reg; AMT only</span>"),null!=o&&(2==t&&(e+="<td><div style=width:301px></div></td>"),""!=e&&(e+="</tr></table>")),e+="<div class=DevSt style=padding-top:4px><span style=float:right>",e+='</span><span id=MxMESH style=cursor:pointer onclick=goForward("'+nodes[a].meshid+'")>'+EscapeHtml(meshes[nodes[a].meshid].name)+"</span>"+l+"<span id=DevxHeader"+deviceHeaderId+" style=color:lightgray></span></div>",i[o=nodes[a].meshid]=1,t=0}}else 1==sort?nodes[a].pwr!==o&&(deviceHeaderSet(),null!==o&&(2==t&&(e+="<td><div style=width:301px></div></td>"),""!=e&&(e+="</tr></table>")),e+="<div class=DevSt style=width:100%;padding-top:4px><span>"+PowerStateStr2(nodes[a].pwr)+"</span><span id=DevxHeader"+deviceHeaderId+" style=color:lightgray></span></div>",o=nodes[a].pwr,t=0):2==sort&&null==o&&(o="1");n++;var r=EscapeHtml(nodes[a].name);0==r.length&&(r="<i>None</i>"),null!=nodes[a].rname&&0<nodes[a].rname.length&&(r+=" / "+EscapeHtml(nodes[a].rname));var d=EscapeHtml(nodes[a].name);1==showRealNames&&null!=nodes[a].rname&&(d=EscapeHtml(nodes[a].rname)),0==d.length&&(d="<i>None</i>");var p=nodes[a].icon,c=NodeStateStr(nodes[a]);nodes[a].conn&&0!=nodes[a].conn||(p+=" gray"),e+="<div style=cursor:pointer onclick=goForward('"+nodes[a]._id+"')>",e+='<div class="i'+p+'" style="float:left;margin-left:4px"></div>',e+='<div style="width:auto;height:40px;background-color:lightgray;margin-top:5px;margin-bottom:5px;margin-left:60px;padding-top:5px;padding-bottom:5px;border-radius:8px 0px 0px 8px">',e+="<div><div style=padding-left:12px;padding-top:2px><b>"+d+"</b></div><div style=padding-left:12px;padding-top:3px;color:gray>"+c+"</div></div>",e+="</div></div>",deviceHeaderTotal++,void 0===deviceHeaderCount[nodes[a].state]?deviceHeaderCount[nodes[a].state]=1:deviceHeaderCount[nodes[a].state]++}}if(0==sort)for(var a in meshes){var u=meshes[a],m=u.links[userinfo._id];if(null!=m){m.rights;null==i[u._id]&&(""!=o&&""!=e&&(e+="</tr></table>"),e+="<div><div colspan=3 class=DevSt><span style=float:right>",e+='</span><span id=MxMESH style=cursor:pointer onclick=goForward("'+u._id+'")>'+EscapeHtml(u.name)+"</span></div>",1==u.mtype&&(e+="<div style=padding:10px><i>No Intel&reg; AMT devices in this group"),2==u.mtype&&(e+="<div style=padding:10px><i>Aucun appareil dans ce groupe"),e+=".</i></div></div>",o=u._id,n++)}}for(var a in 0==n?QH("xdevices",'<div style="margin-top:50px;text-align:center"><span style="font-size:30px">Aucun appareil</span><br /><br />Use the desktop version of this website to add devices.</div>'):QH("xdevices",e),deviceHeaderSet(),deviceHeaders)QH(a,deviceHeaders[a]);for(var a in deviceHeadersTitles)Q(a).title=deviceHeadersTitles[a]}var powerStatetable=["","Alimenté","Dormir","Dormir","Dormir","Hibernating","Éteindre","Présent"],powerStateStrings=["","Alimenté","Sleeping","Sleeping","Deep Sleep","Hibernating","Soft-Off","Présent"],powerStateStrings2=["","Device is powered","Device is in sleep state (S1)","Device is in sleep state (S2)","Device is in deep sleep state (S3)","Device is hibernating (S4)","Device is in soft-off state (S5)","Device is present, but power state cannot be determined"],powerColorTable=["#00000000","black","blue","blue","lightblue","blueviolet","darkgreen","lightseagreen","lightseagreen"];function NodeStateStr(e){var t=[];return 0<e.state&&e.state<powerStatetable.length&&state.push(powerStatetable[e.state]),e.conn&&(0!=(1&e.conn)&&t.push("<span>Agent</span>"),0!=(2&e.conn)?t.push("<span>CIRA</span>"):0!=(4&e.conn)&&t.push("<span>Intel&reg; AMT</span>"),0!=(8&e.conn)&&t.push("<span>Relay</span>"),0!=(16&e.conn)&&t.push("<span>MQTT</span>")),null!=e.pwr&&0!=e.pwr&&t.push(powerStateStrings[e.pwr]),t.join(", ")}function PowerStateStr(e){return e<powerStatetable.length?powerStatetable[e]:""}function PowerStateStr2(e){return 0!=e&&e<powerStatetable.length?powerStatetable[e]:"Inconnue"}function onSortSelectChange(e){sort=document.getElementById("sortselect").selectedIndex,e||putstore("sort",sort),updateDevicesEx()}function deviceHeaderSet(){if(0!=deviceHeaderId){deviceHeaders["DevxHeader"+deviceHeaderId]=", "+deviceHeaderTotal+(1==deviceHeaderTotal?"nœud":"noeuds");var e="";for(var t in deviceHeaderCount)0<e.length&&(e+=", "),e+=deviceHeaderCount[t]+" "+PowerStateStr2(t);deviceHeadersTitles["DevxHeader"+deviceHeaderId]=e,deviceHeaderId++,deviceHeaderCount={},deviceHeaderTotal=0}else deviceHeaderId=1}function meshSort(e,t){return e.meshnamel>t.meshnamel?1:e.meshnamel<t.meshnamel?-1:e.meshid==t.meshid?1==showRealNames?e.rnamel>t.rnamel?1:e.rnamel<t.rnamel?-1:0:e.namel>t.namel?1:e.namel<t.namel?-1:0:0}function powerSort(e,t){var o=e.pwr?e.pwr:0,n=t.pwr?t.pwr:0;return o==n?1==showRealNames?e.rnamel>t.rnamel?1:e.rnamel<t.rnamel?-1:0:e.namel>t.namel?1:e.namel<t.namel?-1:0:n<o?1:o<n?-1:0}function deviceSort(e,t){return e.namel>t.namel?1:e.namel<t.namel?-1:0}function deviceHostSort(e,t){return e.rnamel>t.rnamel?1:e.rnamel<t.rnamel?-1:0}function refreshDevice(e){currentNode&&currentNode._id==e&&gotoDevice(e,xxcurrentView,!0)}function getNodeRights(e){var t=getNodeFromId(e);return meshes[t.meshid].links[userinfo._id].rights}var currentNode,currentDevicePanel=0,powerTimelineNode=null,powerTimelineReq=null,powerTimelineUpdate=null,powerTimeline=null;function getCurrentNode(){return currentNode}function gotoDevice(e,t,o){if(!0===userinfo.emailVerified||1!=serverinfo.emailcheck||4294967295==userinfo.siteadmin)if(!(262144&features)||1==userinfo.otpsecret||0<userinfo.otphkeys||0<userinfo.otpkeys){var n=getNodeFromId(e);if(null!=n){var i=meshes[n.meshid];if(null!=i){var a=i.links[userinfo._id].rights;if(!currentNode||currentNode._id!=n._id||1==o){currentNode=n;var s=EscapeHtml(n.name);0==s.length&&(s="<i>None</i>"),0!=(4&a)&&(s="<span onclick=showEditNodeValueDialog(0) style=cursor:pointer>"+s+"</span>"),QH("p10deviceName",s);var l="<table style=width:100%>";l+=addDeviceAttribute("<span>Groupe</span>",'<a onclick=goForward("'+n.meshid+'") style=cursor:pointer>'+EscapeHtml(meshes[n.meshid].name)+"</a>"),null!=n.rname&&(l+=addDeviceAttribute("<span>Nom</span>","<span>"+EscapeHtml(n.rname)+"</span>")),1!=i.mtype&&n.name==n.host||(0!=(4&a)?n.host?l+=addDeviceAttribute("Hostname","<span onclick=showEditNodeValueDialog(1) style=cursor:pointer>"+EscapeHtml(n.host)+"</span>"):l+=addDeviceAttribute("Hostname","<span onclick=showEditNodeValueDialog(1) style=cursor:pointer><i>None</i></span>"):l+=addDeviceAttribute("Hostname",EscapeHtml(n.host)));var r=n.desc?EscapeHtml(n.desc):"<i>None</i>";l+=addDeviceAttribute("Description",0!=(4&a)?"<span onclick=showEditNodeValueDialog(2) style=cursor:pointer>"+r+"</span>":r);var d=["Inconnue","Windows 32bit console","Windows 64bit console","Windows 32bit service","Windows 64bit service","Linux 32bit","Linux 64bit","MIPS","XENx86","Android ARM","Linux ARM","MacOS 32bit","Android x86","PogoPlug ARM","Android APK","Linux Poky x86-32bit","MacOS 64bit","ChromeOS","Linux Poky x86-64bit","Linux NoKVM x86-32bit","Linux NoKVM x86-64bit","Windows MinCore console","Windows MinCore service","NodeJS","ARM-Linaro","ARMv6l / ARMv7l","ARMv8 64bit","ARMv6l / ARMv7l / NoKVM","Inconnue","Inconnue","FreeBSD x86-64"];if(null!=n.agent&&null!=n.agent.id&&null!=n.agent.ver){var p="";p=n.agent.id<=d.length?d[n.agent.id]:d[0],0!=n.agent.ver&&(p+=" v"+n.agent.ver),l+=addDeviceAttribute("Agent",p)}if(null!=n.intelamt){p="";var c={0:nobreak("Not Activated (Pre)"),1:nobreak("Not Activated (In)"),2:nobreak("Activé")};null!=n.intelamt.ver&&null==n.intelamt.state?p+="<i>"+nobreak("Etat inconnu")+"</i>, v"+n.intelamt.ver:null==n.intelamt.ver&&2==n.intelamt.state?p+="<i>Activé</i>":null==n.intelamt.ver||null==n.intelamt.state?p+="<i>Version et état inconnus</i>":(p+=c[n.intelamt.state],n.intelamt.flags&&(2&n.intelamt.flags?p=" <span>CCM</span>":4&n.intelamt.flags&&(p=" <span>ACM</span>")),p+=", v"+n.intelamt.ver),1==n.intelamt.tls&&(p+=", <span>TLS</span>"),2==n.intelamt.state&&(null!=n.intelamt.user&&""!=n.intelamt.user||(p+=0!=(4&a)?', <i style=color:#FF0000;cursor:pointer onclick=editDeviceAmtSettings("'+n._id+'")>'+nobreak("No Credentials")+"</i>":", <i style=color:#FF0000>No Credentials</i>"),p+=" ",0!=(4&a)&&(p+='<img src=images/link4.png height=10 width=10 style=cursor:pointer onclick=editDeviceAmtSettings("'+n._id+'")>'));var u="Intel&reg; ME";"number"==typeof n.intelamt.sku&&(0!=(8&n.intelamt.sku)?u="Intel&reg; AMT":0!=(16&n.intelamt.sku)&&(u="Intel&reg; SM")),l+=addDeviceAttribute(u,p)}if(null!=n.agent&&null!=n.agent.tag&&"mailto:"!=n.agent.tag){var m=EscapeHtml(n.agent.tag);m.startsWith("mailto:")&&(m='<a href="'+m+'">'+m.substring(7)+"</a>"),l+=addDeviceAttribute("Agent Tag",m)}var h=n.conn;if(h&&1<h){var f=[];0!=(1&n.conn)&&f.push("<span>Agent</span>"),0!=(2&n.conn)?f.push("<span>Intel&reg; AMT CIRA</span>"):0!=(4&n.conn)&&f.push("<span>Intel&reg; AMT</span>"),0!=(8&n.conn)&&f.push("<span>Agent Relay</span>"),0!=(16&n.conn)&&f.push("<span>MQTT</span>"),l+=addDeviceAttribute("Connectivity",f.join(", "))}var g="<i>None</i>";if(null!=n.tags)for(var v in g="",n.tags)g+='<span style="background-color:lightgray;padding:3px;margin-right:4px;border-radius:5px">'+n.tags[v]+"</span>";l+=addDeviceAttribute("Tags",0!=(4&a)?"<span onclick=showEditNodeValueDialog(3) style=cursor:pointer>"+g+"</span>":g),l+="</table><br />",0!=(76&a)&&(l+="<input type=button value=Actions onclick=deviceActionFunction() />"),QH("p10html",l),setupFiles(),l="<div style=float:right;font-size:x-small;margin-right:10px>",0!=(4&a)&&(l+='<a style=cursor:pointer onclick=p10showDeleteNodeDialog("'+n._id+'")>Delete Device</a>'),l+="</div><div style=font-size:x-small>",l+="</div><br>",QH("p10html3",l);var k=PowerStateStr(n.state);0!=(1&h)&&(0<k.length&&(k+=", "),k+="<span style=font-size:10px>Mesh Agent</span>"),0!=(2&h)?(0<k.length&&(k+=", "),k+="<span style=font-size:10px>Intel&reg; AMT connected</span>"):0!=(4&h)&&(0<k.length&&(k+=", "),k+="<span style=font-size:10px>Intel&reg; AMT detected</span>"),0!=(16&h)&&(0<k.length&&(k+="<br/>"),k+="<span style=font-size:12px>MQTT channel connected</span>"),QH("MainComputerState",k),QH("MainComputerImage",'<div class="i'+n.icon+'"></div>'),powerTimelineNode!=currentNode._id&&powerTimelineReq!=currentNode._id&&(QH("p10html2",""),powerTimelineReq=currentNode._id,meshserver.send({action:"powertimeline",nodeid:currentNode._id}))}setupDesktop(),go(t=t||10),setupDeviceMenu()}else goBack()}else goBack()}else setDialogMode(2,"Account Security",1,null,'Unable to access a device until two-factor authentication is enabled. This is required for extra security. Go to the "My Account" and look at the "Account Security" section.');else setDialogMode(2,"Account Security",1,null,'Unable to access a device until a email address is verified. This is required for password recovery. Go to the "My Account" to change and verify an email address.')}function deviceToastFunction(){xxdialogMode||setDialogMode(2,"Device Toast",3,deviceToastFunctionEx,"<textarea id=d2devToast style=width:100%;height:80px;resize:none;overflow-y:scroll></textarea>")}function deviceToastFunctionEx(){meshserver.send({action:"toast",nodeids:[currentNode._id],title:"MeshCentral",msg:Q("d2devToast").value})}function setupDeviceMenu(e,t){var o=0;currentNode&&(o=meshes[currentNode.meshid].links[userinfo._id].rights),null!=e&&(currentDevicePanel=e),QV("p10general",0==currentDevicePanel),QV("p10desktop",1==currentDevicePanel),QV("p10files",2==currentDevicePanel);var n=[];0!=currentDevicePanel&&n.push({n:"General",f:"setupDeviceMenu(0)"}),1!=currentDevicePanel&&null!=currentNode&&(8&o||256&o)&&(1==meshes[currentNode.meshid].mtype&&("number"!=typeof currentNode.intelamt.sku||0!=(8&currentNode.intelamt.sku))||currentNode.agent&&1&currentNode.agent.caps)&&n.push({n:"Desktop",f:"setupDeviceMenu(1)"}),2!=currentDevicePanel&&null!=currentNode&&8&o&&(4294967295==o||0==(1024&o))&&2==currentNode.mtype&&4&currentNode.agent.caps&&n.push({n:"Files",f:"setupDeviceMenu(2)"}),updateFooterMenu(n)}function deviceActionFunction(){if(!xxdialogMode){var e=meshes[currentNode.meshid].links[userinfo._id].rights,t="Select an operation to perform on this device.<br /><br />",o="<select id=d2deviceop style=float:right;width:170px>";0!=(64&e)&&(o+="<option value=100>Wake-up</option>"),0!=(8&e)&&(o+="<option value=4>Dormir</option><option value=3>Réinitialiser</option><option value=2>Éteindre</option>"),setDialogMode(2,"Device Action",3,deviceActionFunctionEx,t+=addHtmlValue("Opération",o+="</select>"))}}function deviceActionFunctionEx(){var e=Q("d2deviceop").value;100==e?meshserver.send({action:"wakedevices",nodeids:[currentNode._id]}):meshserver.send({action:"poweraction",nodeids:[currentNode._id],actiontype:e})}function updateDeviceTimeline(){2==meshserver.State&&null!=powerTimelineNode&&null!=powerTimelineUpdate&&null!=currentNode&&powerTimelineNode==powerTimelineReq&&currentNode._id==powerTimelineNode&&powerTimelineUpdate<Date.now()&&(powerTimelineUpdate=null,meshserver.send({action:"powertimeline",nodeid:currentNode._id}))}function drawDeviceTimeline(){var e=null,t=Date.now();currentNode._id==powerTimelineNode&&(e=powerTimeline);var o=new Date;o.setHours(0,0,0,0);(o=new Date(o.getTime()-5184e5)).getTime();var n=[];if(null!=e&&1<e.length){n.push([0,e[1],e[0]]);for(var i=e[1],a=2;a<e.length;a+=2){var s=e[a],l=t;e.length>a+1&&(l=e[a+1]),n.push([i,i+l,s]),i+=l}}var r="",d=1,p=new Date,c=Q("masthead").offsetWidth-122;p.setHours(0,0,0,0);for(a=0;a<7;a++){var u="",m=p.getTime(),h=m+864e5;for(var f in n){var g=n[f];if(1==isTimeBlockInside(m,h,g[0],g[1])){var v=Math.max(m,g[0]),k=Math.min(Math.min(h,g[1]),t),y=Math.round((k-v)*c/864e5);0<y&&(u+="<div style=display:table-cell;width:"+y+"px;background-color:"+powerColor(g[2])+";height:16px></div>")}}r+="<tr style="+(d%2==0?"background-color:#DDD":"")+"><td><div>&nbsp;"+printDate(p)+"<div></div></div></td><td><div>"+u+"</div></td></tr>",++d,p=new Date(p.getTime()-864e5)}QH("p10html2",'<table style="color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse;width:calc(100% - 18px);margin:9px" border=0 cellpadding=2 cellspacing=0><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:center;width:90px>Day</th><th scope=col style=text-align:center>Power State</th></tr>'+r+"</tbody></table>")}function powerColor(e){return e<powerColorTable.length?powerColorTable[e]:"yellow"}function isTimeBlockInside(e,t,o,n){return o<e&&t<n||(e<o&&o<t||e<n&&n<t)}function addDeviceAttribute(e,t){return"<tr><td style=width:100px;color:gray>"+e+"</td><td style=overflow:hidden>"+t+"</td></tr>"}function editDeviceAmtSettings(e,t){if(!xxdialogMode){var o="",n=getNodeFromId(e),i=3;0!=(4&getNodeRights(e))&&(o+=addHtmlValue("Nom d'utilisateur",'<input id=dp10username style=width:170px maxlength=32 autocomplete=nope placeholder="admin" onchange=validateDeviceAmtSettings() onkeyup=validateDeviceAmtSettings() />'),o+=addHtmlValue("Mot de passe","<input id=dp10password type=password style=width:170px autocomplete=nope maxlength=32 onchange=validateDeviceAmtSettings() onkeyup=validateDeviceAmtSettings() />"),o+=addHtmlValue("Sécurité","<select id=dp10tls style=width:176px><option value=0>No TLS security</option><option value=1>Sécurité TLS requise</option></select>"),null!=n.intelamt.user&&""!=n.intelamt.user&&(i=7),setDialogMode(2,"Edit Intel&reg; AMT credentials",i,editDeviceAmtSettingsEx,o,{node:n,func:t}),null!=n.intelamt.user&&""!=n.intelamt.user?Q("dp10username").value=n.intelamt.user:Q("dp10username").value="admin",Q("dp10tls").value=n.intelamt.tls,validateDeviceAmtSettings())}}function validateDeviceAmtSettings(){QE("idx_dlgOkButton",passwordcheck(Q("dp10password").value))}function editDeviceAmtSettingsEx(e,t){if(2==e)meshserver.send({action:"changedevice",nodeid:t.node._id,intelamt:{user:"",pass:""}});else{var o=Q("dp10username").value;""==o&&(o="admin");var n=Q("dp10password").value;""==n&&(o=""),meshserver.send({action:"changedevice",nodeid:t.node._id,intelamt:{user:o,pass:n,tls:Q("dp10tls").value}}),t.node.intelamt.user=o,t.node.intelamt.tls=Q("dp10tls").value,t.func&&setTimeout(t.func,300)}}function p10showDeleteNodeDialog(e){xxdialogMode||(setDialogMode(2,"Delete Node",3,p10showDeleteNodeDialogEx,format("Delete {0}?",EscapeHtml(currentNode.name))+"<br /><br /><input id=p10check type=checkbox onchange=p10validateDeleteNodeDialog() />Confirm",e),p10validateDeleteNodeDialog())}function p10validateDeleteNodeDialog(){QE("idx_dlgOkButton",Q("p10check").checked)}function p10showDeleteNodeDialogEx(e,t){meshserver.send({action:"removedevices",nodeids:[t]})}function p10showiconselector(){if(!xxdialogMode&&0!=(4&meshes[currentNode.meshid].links[userinfo._id].rights)){"<div style=display:inline-block class=i1 onclick=p10setIcon(1)></div>","<div style=display:inline-block class=i2 onclick=p10setIcon(2)></div>","<div style=display:inline-block class=i3 onclick=p10setIcon(3)></div><br>","<div style=display:inline-block class=i4 onclick=p10setIcon(4)></div>","<div style=display:inline-block class=i5 onclick=p10setIcon(5)></div>","<div style=display:inline-block class=i6 onclick=p10setIcon(6)></div></table>",setDialogMode(2,"Icon Selection",0,null,"<table align=center><td><div style=display:inline-block class=i1 onclick=p10setIcon(1)></div><div style=display:inline-block class=i2 onclick=p10setIcon(2)></div><div style=display:inline-block class=i3 onclick=p10setIcon(3)></div><br><div style=display:inline-block class=i4 onclick=p10setIcon(4)></div><div style=display:inline-block class=i5 onclick=p10setIcon(5)></div><div style=display:inline-block class=i6 onclick=p10setIcon(6)></div></table>"),QV("id_dialogclose",!0)}}function p10setIcon(e){setDialogMode(0),meshserver.send({action:"changedevice",nodeid:currentNode._id,icon:e})}var desktop,desktopNode,showEditNodeValueDialog_modes=["Device Name","Hostname","Description","Tags"],showEditNodeValueDialog_modes2=["name","host","desc","tags"],showEditNodeValueDialog_modes3=["","","","Group1, Group2, Group3"];function showEditNodeValueDialog(e){if(!xxdialogMode){setDialogMode(2,"Edit Device",3,showEditNodeValueDialogEx,addHtmlValue(showEditNodeValueDialog_modes[e],'<input id=dp10devicevalue style=width:170px maxlength=64 placeholder="'+showEditNodeValueDialog_modes3[e]+'" onchange=p10editdevicevalueValidate('+e+",event) onkeyup=p10editdevicevalueValidate("+e+",event) />"),e);var t=currentNode[showEditNodeValueDialog_modes2[e]];null==t&&(t=""),Array.isArray(t)&&(t=t.join(", ")),Q("dp10devicevalue").value=t,p10editdevicevalueValidate(),Q("dp10devicevalue").focus()}}function showEditNodeValueDialogEx(e,t){var o={action:"changedevice",nodeid:currentNode._id};o[showEditNodeValueDialog_modes2[t]]=Q("dp10devicevalue").value,meshserver.send(o)}function p10editdevicevalueValidate(e,t){var o=1<e||0<Q("dp10devicevalue").value.length;QE("idx_dlgOkButton",o),null!=t&&1==o&&13==t.keyCode&&dialogclose(1)}var desktopsettings={encoding:2,showfocus:!1,showmouse:!0,showcad:!0,quality:40,scaling:1024,framerate:50};function setupDesktop(){desktopNode!=currentNode&&null!=desktop&&(desktop.Stop(),desktop=desktopNode=null),desktopNode==currentNode&&null!=desktop||(QH("DeskParent",'<canvas id=Desk width=640 height=200 style="width:100%;-ms-touch-action:none;margin-left:0px" oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event)></canvas>'),desktopNode=currentNode,Q("Desk").addEventListener("DOMMouseScroll",function(e){return dmousewheel(e)}),Q("Desk").addEventListener("mousewheel",function(e){return dmousewheel(e)})),desktopNode=currentNode,updateDesktopButtons(),Q("Desk").toBlob||QV("deskSaveBtn",!1)}function updateDesktopButtons(){var e=meshes[currentNode.meshid],t=0;null!=desktop&&(t=desktop.State);var o=e.links[userinfo._id].rights;QV("disconnectbutton1",0!=t),QV("connectbutton1",0==t&&2==e.mtype&&(8&o||256&o)),QV("connectbutton1h",0==t&&8&o&&(1==e.mtype||null!=currentNode.intelamt&&2==currentNode.intelamt.state&&null!=currentNode.intelamt.ver&&"number"==typeof currentNode.intelamt.sku&&0!=(8&currentNode.intelamt.sku))),QV("d7amtkvm",!(null==currentNode.intelamt||null==currentNode.intelamt.ver&&1!=e.mtype||0!=t&&2!=desktop.contype)),QV("d7meshkvm",2==e.mtype&&(0==t||1==desktop.contype));var n=0!=(1&currentNode.conn);QE("connectbutton1",n);var i=0!=(6&currentNode.conn);QE("connectbutton1h",i),QV("DeskToastButton",0!=(16384&o)&&currentNode.agent&&currentNode.agent.id<5&&8&o),QV("deskActionsBtn",8&o),Q("DeskControl").checked=0!=(8&o),0==n&&QV("DeskTools",!1)}function connectDesktop(e,t){if(setSessionActivity(),null==desktop)if(desktopNode=currentNode,2==t){if(null==desktopNode.intelamt.user||""==desktopNode.intelamt.user)return void editDeviceAmtSettings(desktopNode._id,connectDesktop);(desktop=CreateAmtRedirect(CreateAmtRemoteDesktop("Desk"),authCookie)).debugmode=debugmode,desktop.onStateChanged=onDesktopStateChange,desktop.m.bpp=1==desktopsettings.encoding||3==desktopsettings.encoding?1:2,desktop.m.useZRLE=desktopsettings.encoding<3,desktop.m.showmouse=desktopsettings.showmouse,desktop.m.onScreenSizeChange=deskAdjust,desktop.Start(desktopNode._id,16994,"*","*",0),desktop.contype=2}else(desktop=CreateAgentRedirect(meshserver,CreateAgentRemoteDesktop("Desk"),serverPublicNamePort,authCookie,authRelayCookie,domainUrl)).debugmode=debugmode,desktop.m.debugmode=debugmode,desktop.attemptWebRTC=attemptWebRTC,desktop.onStateChanged=onDesktopStateChange,desktop.m.CompressionLevel=desktopsettings.quality,desktop.m.ScalingLevel=desktopsettings.scaling,desktop.m.FrameRateTimer=desktopsettings.framerate,desktop.m.onDisplayinfo=deskDisplayInfo,desktop.m.onScreenSizeChange=deskAdjust,desktop.Start(desktopNode._id),desktop.contype=1;else desktop.Stop(),desktopNode=desktop=null}function onDesktopStateChange(e,t){var o=t;3==o&&2==e.contype&&o++;var n=StatusStrs[o];switch(null!=desktop&&1==desktop.webRtcActive&&(n+=", WebRTC"),QH("deskstatus",n),t){case 0:desktop.Stop(),desktopNode=desktop=null,QV("termdisplays",!1),1==fullscreen&&deskToggleFull()}updateDesktopButtons(),deskAdjust(),setTimeout(deskAdjust,50)}function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),updateDesktopButtons(),setDialogMode(7,"Remote Desktop Settings",3,showDesktopSettingsChanged))}function showDesktopSettingsChanged(){desktopsettings.encoding=d7desktopmode.value,desktopsettings.showfocus=d7showfocus.checked,desktopsettings.showmouse=d7showcursor.checked,desktopsettings.quality=d7bitmapquality.value,desktopsettings.scaling=d7bitmapscaling.value,desktopsettings.framerate=d7framelimiter.value,localStorage.setItem("desktopsettings",JSON.stringify(desktopsettings)),applyDesktopSettings(),desktop&&(1==desktop.contype&&0!=desktop.State&&desktop.m.SendCompressionLevel(1,desktopsettings.quality,desktopsettings.scaling,desktopsettings.framerate),2==desktop.contype&&0!=desktop.State&&(desktop.Stop(),setTimeout(function(){connectDesktop(null,2)},50)))}function applyDesktopSettings(){var e="",t=512&features?[90,70,50,40,30,20,10,5,1]:[50,40,30,20,10,5,1];for(var o in t)e+="<option value="+t[o]+">"+t[o]+"%</option>";QH("d7bitmapquality",e),d7desktopmode.value=desktopsettings.encoding,d7showfocus.checked=desktopsettings.showfocus,d7showcursor.checked=desktopsettings.showmouse,d7bitmapquality.value=40,0<=t.indexOf(parseInt(desktopsettings.quality))&&(d7bitmapquality.value=desktopsettings.quality),d7bitmapscaling.value=desktopsettings.scaling,desktopsettings.framerate&&(d7framelimiter.value=desktopsettings.framerate)}var fullscreen=!1;function deskAdjust(){var e=(Q("DeskParent").clientHeight-Q("Desk").clientHeight)/2;if(e<0){var t=Q("DeskParent").clientHeight,o=9999;desktop&&(o=desktop.m.width/desktop.m.height*t),QS("Desk")["max-height"]=t+"px",QS("Desk")["max-width"]=o+"px",e=0}else QS("Desk")["max-height"]=null,QS("Desk")["max-width"]=null;QS("Desk")["margin-top"]=e+"px",QS("Desk")["margin-bottom"]=e+"px"}function deskSendKeys(){if(!xxdialogMode&&null!=desktop&&3==desktop.State){var e=Q("deskkeys").value;0==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[65364,1],[65364,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,40],[desktop.m.KeyAction.UP,40],[desktop.m.KeyAction.EXUP,91]]):1==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[65362,1],[65362,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,38],[desktop.m.KeyAction.UP,38],[desktop.m.KeyAction.EXUP,91]]):2==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[108,1],[108,0],[65511,0]]):desktop.sendCtrlMsg('{"action":"lock"}'):3==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[109,1],[109,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,77],[desktop.m.KeyAction.UP,77],[desktop.m.KeyAction.EXUP,91]]):4==e?2==desktop.contype?desktop.m.sendkey([[65505,1],[65511,1],[109,1],[109,0],[65511,0],[65505,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.DOWN,16],[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,77],[desktop.m.KeyAction.UP,77],[desktop.m.KeyAction.EXUP,91],[desktop.m.KeyAction.UP,16]]):5==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.EXUP,91]]):6==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[114,1],[114,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,82],[desktop.m.KeyAction.UP,82],[desktop.m.KeyAction.EXUP,91]]):7==e?2==desktop.contype?desktop.m.sendkey([[65513,1],[65473,1],[65473,0],[65513,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,18],[desktop.m.KeyAction.DOWN,115],[desktop.m.KeyAction.UP,115],[desktop.m.KeyAction.EXUP,18]]):8==e?2==desktop.contype?desktop.m.sendkey([[65507,1],[119,1],[119,0],[65507,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,17],[desktop.m.KeyAction.DOWN,87],[desktop.m.KeyAction.UP,87],[desktop.m.KeyAction.EXUP,17]]):9==e?2==desktop.contype?desktop.m.sendkey([[65513,1],[65289,1],[65289,0],[65513,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,18],[desktop.m.KeyAction.DOWN,9],[desktop.m.KeyAction.UP,9],[desktop.m.KeyAction.EXUP,18]]):10==e?desktop.m.sendcad():11==e&&(2==desktop.contype?desktop.m.sendkey([[65289,1],[65289,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.DOWN,9],[desktop.m.KeyAction.UP,9]]))}}function sendSpecialKeys(){xxdialogMode||null==desktop||3!=desktop.State||setDialogMode(3,"Special Keys",3,deskSendKeys)}function toggleSoftKeys(e){QV("DeskSoftInput",1==e),1==e&&Q("DeskSoftInput").focus()}function toggleDeskTools(){setSessionActivity(),xxdialogMode||("none"==QS("DeskTools").display?(QV("DeskTools",!0),Q("DeskTools").nodeid=currentNode._id,refreshDeskTools()):QV("DeskTools",!1))}function refreshDeskTools(){setSessionActivity(),QV("DeskToolsRefreshButton",!1),setTimeout(refreshDeskToolsEx,500),meshserver.send({action:"msg",type:"ps",nodeid:currentNode._id})}function refreshDeskToolsEx(){QV("DeskToolsRefreshButton",!0)}var filesNode,deskTools={sort:1,msg:null};function sortProcess(e){deskTools.sort=e,showDeskToolsProcesses(deskTools.msg)}function sortProcessPid(e,t){return e.p>t.p?1:e.p<t.p?-1:0}function sortProcessName(e,t){return e.d>t.d?1:e.d<t.d?-1:0}function showDeskToolsProcesses(e){if(null!=(deskTools.msg=e)){if(Q("DeskTools").nodeid==e.nodeid){var t=[],o=null;try{o=JSON.parse(e.value)}catch(e){}if(console.log(o),null!=o){for(var n in o)t.push({p:parseInt(n),c:o[n].cmd,d:o[n].cmd.toLowerCase(),u:o[n].user});0==deskTools.sort?t.sort(sortProcessPid):1==deskTools.sort&&t.sort(sortProcessName);var i="";for(var a in t)0!=t[a].p&&(i+="<div class=deskToolsBar><div style=width:50px;float:left;text-align:right;padding-right:5px>"+t[a].p+"</div><a style=float:right;padding-right:5px;cursor:pointer onclick=stopProcess("+t[a].p+',"'+t[a].c+'")><img width=10 height=10 src="images/trash.png"></a><div style=float:right;padding-right:5px>'+(t[a].u?t[a].u:"")+"</div><div>"+t[a].c+"</div></div>");QH("DeskToolsProcesses",i)}}}else QH("DeskToolsProcesses","")}function deskSaveImage(){if(setSessionActivity(),!xxdialogMode&&null!=desktop&&3==desktop.State){var e=new Date,t="Desktop-"+currentNode.name+"-"+e.getFullYear()+"-"+("0"+(e.getMonth()+1)).slice(-2)+"-"+("0"+e.getDate()).slice(-2)+"-"+("0"+e.getHours()).slice(-2)+"-"+("0"+e.getMinutes()).slice(-2);Q("Desk").toBlob(function(e){saveAs(e,t+".jpg")})}}function deskDisplayInfo(e,t,o,n){var i=Q("termdisplays").value;if(0<t.length){var a="";for(var s in t)a+="<option"+(i==t[s]?" selected":"")+">"+t[s]+"</option>";QH("termdisplays",a)}QV("termdisplays",0<t.length)}function deskGetDisplayNumbers(e){desktop.m.GetDisplayNumbers()}function deskSetDisplay(e){setSessionActivity();var t=0,o=Q("termdisplays").value;t="All Displays"==o?65535:parseInt(o.substring(8)),desktop.m.SetDisplay(t)}function dmousedown(e){setSessionActivity(),xxdialogMode||null==desktop||desktop.m.mousedown(e)}function dmouseup(e){setSessionActivity(),xxdialogMode||null==desktop||desktop.m.mouseup(e)}function dmousemove(e){setSessionActivity(),xxdialogMode||null==desktop||desktop.m.mousemove(e)}function dmousewheel(e){return setSessionActivity(),!(xxdialogMode||null==desktop||!desktop.m.mousewheel)&&(desktop.m.mousewheel(e),haltEvent(e),!0)}function drotate(e){xxdialogMode||null==desktop||(desktop.m.setRotation(desktop.m.rotation+e),deskAdjust(),deskAdjust())}function stopProcess(e,t){return setDialogMode(2,"Process Control",3,stopProcessEx,format('Stop process #{0} "{1}"?',e,t),e),!1}function stopProcessEx(e,t){meshserver.send({action:"msg",type:"pskill",nodeid:currentNode._id,value:t}),setTimeout(refreshDeskTools,300)}function setupFiles(){var e=filesNode==currentNode,t=0!=(1&(filesNode=currentNode).conn);QE("p13Connect",t),0!=e&&0!=t||!files||(files.Stop(),files=null)}function onFilesStateChange(e,t){setSessionActivity(),p13Connect.value=0==t?"Connect":"Disconnect";var o=StatusStrs[t];switch(1==files.webRtcActive&&(o+=", WebRTC"),Q("p13Status").textContent=o,t){case 0:QH("p13files",""),p13filetree=null,p13filetreelocation=[],QH("p13currentpath",""),QE("p13FolderUp",!1),p13setActions(),null!=files&&(files.Stop(),files=null);break;case 3:p13targetpath="",files.sendText({action:"ls",reqid:1,path:""})}}function CreateRemoteFiles(e){var t={protocol:5};return t.onFileUpdate=e,t.xxStateChange=function(e){},t.ProcessData=function(e){t.onFileUpdate(e)},t}var autoConnectFilesTimer=null;function autoConnectFiles(e){autoConnectFilesTimer=null==autoConnectFilesTimer?setInterval(connectFiles,100):(clearInterval(autoConnectFilesTimer),null)}function connectFiles(e){files?(files.Stop(),files=null):((files=CreateAgentRedirect(meshserver,CreateRemoteFiles(p13gotFiles),serverPublicNamePort,authCookie,authRelayCookie,domainUrl)).attemptWebRTC=attemptWebRTC,files.onStateChanged=onFilesStateChange,files.Start(filesNode._id)),p13clipboard=p13clipboardFolder=null,p13clipboardCut=0,p13updateClipview()}var p13sortorder,p13filetree=null,p13targetpath=null,p13filetreelocation=[];function p13gotFiles(e){if(setSessionActivity(),0<e.length&&123!=e.charCodeAt(0))p13gotDownloadBinaryData(e);else if("download"!=(e=JSON.parse(decode_utf8(e))).action)if(e.path=e.path.replace(/\//g,"\\"),null!=p13filetree&&e.path==p13filetree.path){var t=p13getCheckedNames();p13filetree=e,p13updateFiles(t)}else{for(var o=e.path.replace(/\//g,"\\"),n=p13targetpath.replace(/\//g,"\\");0<o.length&&"\\"==o[0];)o=o.substring(1);for(;0<n.length&&"\\"==n[0];)n=n.substring(1);(o==n||"\\"==e.path&&""==p13targetpath)&&(p13filetree=e,p13updateFiles())}else p13gotDownloadCommand(e)}function p13getCheckedNames(){for(var e=[],t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked&&e.push(p13filetree.dir[t[o].value].n);return e}function p13updateFiles(e){var t="",o="",n="<a style=cursor:pointer onclick=p13folderup(0)>Root</a>",i=p13filetree.path.split("\\");for(var a in p13filetreelocation=[],i)""!=i[a]&&p13filetreelocation.push(i[a]);for(var a in p13filetreelocation)n+=" / <a style=cursor:pointer onclick=p13folderup("+(parseInt(a)+1)+")>"+p13filetreelocation[a]+"</a>";var s=p13filetreelocation.join("/"),l=p13sort_files(p13filetree.dir);for(var a in l){var r,d=l[a],p=d.n;r=70<(r=p).length?EscapeHtml(p.substring(0,70))+"...":EscapeHtml(p),p=EscapeHtml(p);var c="";null!=d.s&&(c=getFileSizeStr(d.s));var u="";if(d.t<3){u="<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p13setActions() value='"+d.nx+"'>&nbsp;<span style=float:right></span><span><div class=fileIcon"+d.t+'></div><a style=cursor:pointer onclick=p13folderset("'+encodeURIComponent(d.nx)+'")>'+r+"</a></span></div>"}else{var m=r;0<d.s&&(m='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick="p13downloadfile(\''+encodeURIComponent(s+"/"+p)+"','"+encodeURIComponent(p)+"',"+d.s+')">'+r+"</a>"),u="<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p13setActions() value='"+d.nx+"'>&nbsp;<span style=float:right;padding-right:4px>"+c+"</span><span><div class=fileIcon"+d.t+"></div>"+m+"</span></div>"}d.t<3?t+=u:o+=u}if(QH("p13files",t+o),QH("p13currentpath",n),QE("p13FolderUp",0!=p13filetreelocation.length),null!=e){var h=document.getElementsByName("fd");for(a=0;a<h.length;a++)0<=e.indexOf(p13filetree.dir[h[a].value].n)&&(h[a].checked=!0)}p13setActions()}function p13folderset(e){p13targetpath=joinPaths(p13filetree.path,p13filetree.dir[e].n).split("\\").join("/"),files.sendText({action:"ls",reqid:1,path:p13targetpath})}function p13folderup(e){if(null==e)p13filetreelocation.pop();else for(;p13filetreelocation.length>e;)p13filetreelocation.pop();p13targetpath=p13filetreelocation.join("/"),files.sendText({action:"ls",reqid:1,path:p13targetpath})}function p13sort_filename(e,t){return e.ln>t.ln?1*p13sortorder:e.ln<t.ln?-1*p13sortorder:0}function p13sort_timestamp(e,t){return e.d>t.d?1*p13sortorder:e.d<t.d?-1*p13sortorder:0}function p13sort_bysize(e,t){return e.s==t.s?p13sort_filename(e,t):(e.s-t.s)*p13sortorder}function p13sort_files(e){var t=[],o=Q("p13sortdropdown").value;for(var n in e)e[n].nx=n,null==e[n].s&&(e[n].s=0),null==e[n].n&&(e[n].n=n),e[n].ln=e[n].n.toLowerCase(),t.push(e[n]);return p13sortorder=1,3<o&&(p13sortorder=-1,o-=3),1==o?t.sort(p13sort_filename):2==o?t.sort(p13sort_bysize):3==o&&t.sort(p13sort_timestamp),t}function p13setActions(){if(null==p13filetree)QE("p13DeleteFileButton",!1),QE("p13NewFolderButton",!1),QE("p13UploadButton",!1),QE("p13RenameFileButton",!1),QE("p13SelectAllButton",!1),Q("p13SelectAllButton").value="Tout",QE("p13RefreshButton",!1),QE("p13CutButton",!1),QE("p13CopyButton",!1),QE("p13PasteButton",!1);else{var e=p13getFileSelCount(),t=p13getFileCount(),o=p13getFileSelCount(!1),n=0<currentNode.agent.id&&currentNode.agent.id<5;QE("p13DeleteFileButton",0<e&&(0<p13filetreelocation.length||0==n)),QE("p13NewFolderButton",0<p13filetreelocation.length||0==n),QE("p13UploadButton",0<p13filetreelocation.length||0==n),QE("p13RenameFileButton",1==e&&(0<p13filetreelocation.length||0==n)),QE("p13SelectAllButton",0<t),Q("p13SelectAllButton").value=0<e?"None":"Tout",QE("p13RefreshButton",!0),QE("p13CutButton",0<e&&e==o&&(0<p13filetreelocation.length||0==n)),QE("p13CopyButton",0<e&&e==o&&(0<p13filetreelocation.length||0==n)),QE("p13PasteButton",(0<p13filetreelocation.length||0==n)&&null!=p13clipboard&&0<p13clipboard.length)}}function p13getFileSelCount(e){for(var t=0,o=document.getElementsByName("fd"),n=0;n<o.length;n++)!o[n].checked||0==e&&"3"!=o[n].attributes.file.value||t++;return t}function p13getFileSelDirCount(){for(var e=0,t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked&&"999"==t[o].attributes.file.value&&e++;return e}function p13getFileCount(){return document.getElementsByName("fd").length}function p13selectallfile(){for(var e=0==p13getFileSelCount(),t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked=e;p13setActions()}function p13createfolder(){setDialogMode(2,"Nouveau Dossier",3,p13createfolderEx,"<input type=text id=p13renameinput maxlength=64 onkeyup=p13fileNameCheck(event) style=width:100% />"),focusTextBox("p13renameinput"),p13fileNameCheck()}function p13createfolderEx(){files.sendText({action:"mkdir",reqid:1,path:p13filetreelocation.join("/")+"/"+Q("p13renameinput").value}),p13folderup(999)}function p13deletefile(){var e=p13getFileSelCount(),t=0<p13getFileSelDirCount()?"<br /><br /><label><input type=checkbox id=p13recdeleteinput>Recursive delete</label><br>":"<input type=checkbox id=p13recdeleteinput style='display:none'>";setDialogMode(2,"Delete",3,p13deletefileEx,1<e?format("Delete {0} selected items?",e)+t:"Delete selected item?"+t)}function p13deletefileEx(){for(var e=[],t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked&&e.push(p13filetree.dir[t[o].value].n);files.sendText({action:"rm",reqid:1,path:p13filetreelocation.join("/"),delfiles:e,rec:Q("p13recdeleteinput").checked}),p13folderup(999)}function p13renamefile(){for(var e,t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked&&(e=p13filetree.dir[t[o].value].n);setDialogMode(2,"Renommer",3,p13renamefileEx,'<input type=text id=p13renameinput maxlength=64 onkeyup=p13fileNameCheck(event) style=width:100% value="'+e+'" />',{action:"rename",path:p13filetreelocation.join("/"),oldname:e}),focusTextBox("p13renameinput"),p13fileNameCheck()}function p13renamefileEx(e,t){t.newname=Q("p13renameinput").value,files.sendText(t),p13folderup(999)}function p13fileNameCheck(e){var t=isFilenameValid(Q("p13renameinput").value);QE("idx_dlgOkButton",t),1==t&&null!=e&&13==e.keyCode&&dialogclose(1)}function p13uploadFile(){setDialogMode(2,"Upload File",3,p13uploadFileEx,"<input type=file name=files id=p13uploadinput style=width:100% multiple=multiple onchange=\"updateUploadDialogOk('p13uploadinput')\" />"),updateUploadDialogOk("p13uploadinput")}function p13uploadFileEx(){p13doUploadFiles(Q("p13uploadinput").files)}function p13viewfile(){for(var e=document.getElementsByName("fd"),t=0;t<e.length;t++)if(e[t].checked){p13filetree.dir[e[t].value].s<=204800?p13downloadfile(encodeURIComponent(p13filetreelocation.join("/")+"/"+p13filetree.dir[e[t].value].n),encodeURIComponent(p13filetree.dir[e[t].value].n),p13filetree.dir[e[t].value].s,"viewer"):messagebox("File Editor","Only files less than 200k can be edited.");break}}var downloadFile,uploadFile,currentMesh,p13clipboard=null,p13clipboardFolder=null,p13clipboardCut=0;function p13copyFile(e){var t=document.getElementsByName("fd");p13clipboard=[],p13clipboardCut=e,p13clipboardFolder=p13targetpath;for(var o=0;o<t.length;o++)t[o].checked&&"3"==t[o].attributes.file.value&&p13clipboard.push(p13filetree.dir[t[o].value].n);p13updateClipview()}function p13pasteFile(){var e="";null!=p13clipboard&&0<p13clipboard.length&&(e=0==p13clipboardCut?1<p13clipboard.length?format("Confirm copy of {0} entries's to this location?",p13clipboard.length):format("Confirm copy of 1 entrie to this location?"):1<p13clipboard.length?format("Confirm move of {0} entries's to this location?",p13clipboard.length):format("Confirm move of 1 entrie to this location?")),setDialogMode(2,"Paste",3,p13pasteFileEx,e)}function p13pasteFileEx(){files.sendText({action:0==p13clipboardCut?"copy":"move",reqid:1,scpath:p13clipboardFolder,dspath:p13targetpath,names:p13clipboard}),p13folderup(999),1==p13clipboardCut&&(p13clipboardFolder=p13clipboard=null,p13clipboardCut=0,p13updateClipview())}function p13updateClipview(){var e="";null!=p13clipboard&&0<p13clipboard.length&&(e=0==p13clipboardCut?1<p13clipboard.length?format('Holding {0} entries for copy, <a href=# onclick="return p13clearClip()" style=cursor:pointer>Clear</a>.',p13clipboard.length):format('Holding 1 entrie for copy, <a href=# onclick="return p13clearClip()" style=cursor:pointer>Clear</a>.'):1<p13clipboard.length?format('Holding {0} entries for move, <a href=# onclick="return p13clearClip()" style=cursor:pointer>Clear</a>.',p13clipboard.length):format('Holding 1 entrie for move, <a href=# onclick="return p13clearClip()" style=cursor:pointer>Clear</a>.')),QH("p13bottomstatus",e),p13setActions()}function p13clearClip(){return p13clipboardFolder=p13clipboard=null,p13clipboardCut=0,p13updateClipview(),!1}function updateUploadDialogOk(e){QE("idx_dlgOkButton",""!=Q(e).value)}function getFileSelCount(e){for(var t=0,o=document.getElementsByName("fc"),n=0;n<o.length;n++)!o[n].checked||0==e&&"3"!=o[n].attributes.file.value||t++;return t}function getFileCount(){return document.getElementsByName("fc").length}function p13downloadfile(e,t,o){xxdialogMode||downloadFile||!files||(downloadFile={path:decodeURIComponent(e),file:decodeURIComponent(t),size:o,tsize:0,data:"",state:0,id:Math.random()},files.sendText({action:"download",sub:"start",id:downloadFile.id,path:downloadFile.path}),setDialogMode(2,"Download File",10,p13downloadFileCancel,"<div>"+downloadFile.file+"</div><br /><progress id=d2progressBar style=width:100% value=0 max="+o+" />"))}function p13downloadFileCancel(){setDialogMode(0),files.sendText({action:"download",sub:"cancel",id:downloadFile.id}),downloadFile=null}function p13gotDownloadCommand(e){null!=downloadFile&&e.id==downloadFile.id&&("start"==e.sub?(downloadFile.state=1,files.sendText({action:"download",sub:"startack",id:downloadFile.id})):"cancel"==e.sub&&(downloadFile=null,setDialogMode(0)))}function p13gotDownloadBinaryData(e){downloadFile&&0!=downloadFile.state&&(4<e.length&&(downloadFile.tsize+=e.length-4,downloadFile.data+=e.substring(4),Q("d2progressBar").value=downloadFile.tsize),0!=(1&ReadInt(e,0))?(saveAs(data2blob(downloadFile.data),downloadFile.file),downloadFile=null,setDialogMode(0)):files.sendText({action:"download",sub:"ack",id:downloadFile.id}))}function p13doUploadFiles(e){xxdialogMode||((uploadFile={}).xpath=p13filetreelocation.join("/"),uploadFile.xfiles=e,uploadFile.xfilePtr=-1,setDialogMode(2,"Upload File",10,p13uploadFileCancel,"<div id=p13dfileName>Connecting...</div><br /><progress id=d2progressBar style=width:100% value=0 max=0 />"),p13uploadReconnect())}function onFileUploadStateChange(e,t){switch(t){case 0:p13folderup(9999);break;case 3:p13uploadNextFile();break;default:console.log("Unknown onFileUploadStateChange state",t)}}function p13uploadReconnect(){uploadFile.ws=CreateAgentRedirect(meshserver,CreateRemoteFiles(p13gotUploadData),serverPublicNamePort,authCookie,authRelayCookie,domainUrl),uploadFile.ws.attemptWebRTC=!1,uploadFile.ws.ctrlMsgAllowed=!1,uploadFile.ws.onStateChanged=onFileUploadStateChange,uploadFile.ws.Start(filesNode._id)}function p13uploadNextFile(){if(uploadFile.xfilePtr++,uploadFile.xfiles.length>uploadFile.xfilePtr){uploadFile.xptr=0;var e=uploadFile.xfiles[uploadFile.xfilePtr];QH("p13dfileName",e.name),Q("d2progressBar").max=e.size,Q("d2progressBar").value=0,uploadFile.xreader=new FileReader,uploadFile.xreader.onload=function(){uploadFile.xdata=uploadFile.xreader.result,uploadFile.ws.sendText({action:"upload",reqid:uploadFile.xfilePtr,path:uploadFile.xpath,name:e.name,size:uploadFile.xdata.byteLength})},uploadFile.xreader.readAsArrayBuffer(e)}else p13uploadFileCancel()}function p13uploadFileCancel(e,t){null!=uploadFile&&(null!=uploadFile.ws&&(uploadFile.ws.Stop(),uploadFile.ws=null),uploadFile=null),setDialogMode(0)}function p13gotUploadData(e){var t=JSON.parse(e);if(null!=uploadFile&&parseInt(uploadFile.xfilePtr)==parseInt(t.reqid))if("uploadstart"==t.action){p13uploadNextPart(!1);for(var o=0;o<8;o++)p13uploadNextPart(!0)}else"uploadack"==t.action?p13uploadNextPart(!1):"uploaderror"==t.action&&p13uploadFileCancel()}function p13uploadNextPart(e){var t=uploadFile.xdata,o=uploadFile.xptr,n=uploadFile.xptr+4096;if(n>t.byteLength){if(1==e)return;n=t.byteLength}if(o==t.byteLength)null!=uploadFile.ws&&(uploadFile.ws.Stop(),uploadFile.ws=null),uploadFile.xfiles.length>uploadFile.xfilePtr+1?p13uploadReconnect():p13uploadFileCancel();else{var i=t.slice(o,n);uploadFile.ws.send(i),uploadFile.xptr=n,Q("d2progressBar").value=n}}function p20updateMesh(){if(null!=currentMesh){QH("p20meshName",EscapeHtml(currentMesh.name));var e=format(" #{0} Inconnue",currentMesh.mtype),t=currentMesh.links[userinfo._id].rights;1==currentMesh.mtype&&(e="Intel&reg; AMT only, no agent"),2==currentMesh.mtype&&(e="Géré à l'aide d'un agent logiciel");var o="";o+=addHtmlValue("Nom",addLinkConditional(EscapeHtml(currentMesh.name),"p20editmesh(1)",0!=(1&t))),o+=addHtmlValue("Description",addLinkConditional(currentMesh.desc&&""!=currentMesh.desc?EscapeHtml(currentMesh.desc):"<i>None</i>","p20editmesh(2)",0!=(1&t))),o+=addHtmlValue("Type",e),o+="<br style=clear:both><br>";var n=currentMesh.links[userinfo._id];n&&0!=(2&n.rights)&&(o+="<div style=margin-bottom:6px><a onclick=p20showAddMeshUserDialog() style=cursor:pointer><img src=images/icon-addnew.png border=0 height=12 width=12>Ajouter un utilisateur</a></div>"),o+='<table style="color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse" border=0 cellpadding=2 cellspacing=0 width=100%><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:left;width:430px>User Authorizations</th></tr>';var i=1,a=[];for(var s in currentMesh.links)a.push({id:s,name:s.split("/")[2],rights:currentMesh.links[s].rights});for(var s in a.sort(function(e,t){return e.name>t.name?1:e.name<t.name?-1:0}),a){var l="",r="Partial Rights",d=a[s].rights;4294967295==d?r="Full Administrator":0==d&&(r="No Rights"),s==userinfo._id||4294967295!=t&&0==(2&t)||(l='<a onclick=p20deleteUser(event,"'+encodeURIComponent(a[s].id)+'") style=cursor:pointer><img src=images/trash.png border=0 height=10 width=10></a>'),o+='<tr onclick=p20viewuser("'+encodeURIComponent(a[s].id)+'") style=height:32px;cursor:pointer'+(i%2==0?";background-color:#DDD":"")+"><td>",o+="<div style=float:right>"+l+"</div><div style=float:right;padding-right:4px>"+r+"</div><div class=m2></div><div>&nbsp;"+EscapeHtml(decodeURIComponent(a[s].name))+"<div></div></div>",o+="</td></tr>",++i}o+="</tbody></table>",4294967295==t&&(o+="<div style=font-size:small;text-align:right;margin-top:6px><span><a onclick=p20showDeleteMeshDialog() style=cursor:pointer>Delete Group</a></span></div>"),QH("p20info",o)}}function p20showDeleteMeshDialog(){if(xxdialogMode)return!1;var e=format("Êtes-vous sûr de vouloir supprimer le groupe {0}? La suppression du groupe de périphériques supprimera également toutes les informations relatives aux périphériques de ce groupe.",EscapeHtml(currentMesh.name))+"<br /><br />";return setDialogMode(2,"Delete Group",3,p20showDeleteMeshDialogEx,e+="<label><input id=p20check type=checkbox onchange=p20validateDeleteMeshDialog() />Confirm</label>"),p20validateDeleteMeshDialog(),!1}function p20validateDeleteMeshDialog(){QE("idx_dlgOkButton",Q("p20check").checked)}function p20showDeleteMeshDialogEx(e,t){meshserver.send({action:"deletemesh",meshid:currentMesh._id,meshname:currentMesh.name})}function p20editmesh(e){if(!xxdialogMode){var t=addHtmlValue("Nom","<input id=dp20meshname style=width:170px maxlength=32 onchange=p20editmeshValidate() onkeyup=p20editmeshValidate() />");setDialogMode(2,"Edit Device Group",3,p20editmeshEx,t+=addHtmlValue("Description","<input id=dp20meshdesc style=width:170px maxlength=1024 onkeyup=p20editmeshValidate() />")),Q("dp20meshname").value=currentMesh.name,currentMesh.desc&&(Q("dp20meshdesc").value=currentMesh.desc),p20editmeshValidate(),2==e?Q("dp20meshdesc").focus():Q("dp20meshname").focus()}}function p20editmeshEx(){meshserver.send({action:"editmesh",meshid:currentMesh._id,meshname:Q("dp20meshname").value,desc:Q("dp20meshdesc").value})}function p20editmeshValidate(){QE("idx_dlgOkButton",0<Q("dp20meshname").value.length)}function p20showAddMeshUserDialog(){if(!xxdialogMode){var e=addHtmlValue("User","<input id=dp20username style=width:170px maxlength=32 onchange=p20validateAddMeshUserDialog() onkeyup=p20validateAddMeshUserDialog() />");e+='<div style="border:2px groove gray;background-color:white;max-height:120px;overflow-y:scroll">',e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20fulladmin>Full Administrator</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20editmesh>Edit Device Group</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20manageusers>Manage Device Group Users</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20managecomputers>Manage Device Group Computers</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20remotecontrol>Remote Control</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20remoteview style=margin-left:12px>Remote View Only</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20remotelimitedinput style=margin-left:12px>Limited Input Only</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20noterminal style=margin-left:12px>No Terminal Access</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20nofiles style=margin-left:12px>Pas d'accès au fichier</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20noamt style=margin-left:12px>No Intel&reg; AMT</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20meshagentconsole>Mesh Agent Console</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20meshserverfiles>Server Files</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20wakedevices>Wake Devices</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20editnotes>Edit Device Notes</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20limitevents>Show Only Own Events</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20chatnotify>Chat & Notify</label><br>",setDialogMode(2,"Ajouter un utilisateur au groupe",3,p20showAddMeshUserDialogEx,e+="</div>"),p20validateAddMeshUserDialog(),Q("dp20username").focus()}}function p20validateAddMeshUserDialog(){var e=currentMesh.links[userinfo._id].rights;QE("idx_dlgOkButton",0<Q("dp20username").value.length),QE("p20fulladmin",4294967295==e),QE("p20editmesh",!Q("p20fulladmin").checked&&4294967295==e),QE("p20manageusers",!Q("p20fulladmin").checked),QE("p20managecomputers",!Q("p20fulladmin").checked),QE("p20remotecontrol",!Q("p20fulladmin").checked),QE("p20meshagentconsole",!Q("p20fulladmin").checked),QE("p20meshserverfiles",!Q("p20fulladmin").checked),QE("p20wakedevices",!Q("p20fulladmin").checked),QE("p20editnotes",!Q("p20fulladmin").checked),QE("p20remoteview",!Q("p20fulladmin").checked&&Q("p20remotecontrol").checked),QE("p20noterminal",!Q("p20fulladmin").checked&&Q("p20remotecontrol").checked),QE("p20nofiles",!Q("p20fulladmin").checked&&Q("p20remotecontrol").checked),QE("p20noamt",!Q("p20fulladmin").checked&&Q("p20remotecontrol").checked)}function p20showAddMeshUserDialogEx(){var e=0;1==Q("p20fulladmin").checked?e=4294967295:(1==Q("p20editmesh").checked&&(e+=1),1==Q("p20manageusers").checked&&(e+=2),1==Q("p20managecomputers").checked&&(e+=4),1==Q("p20remotecontrol").checked&&(e+=8),1==Q("p20meshagentconsole").checked&&(e+=16),1==Q("p20meshserverfiles").checked&&(e+=32),1==Q("p20wakedevices").checked&&(e+=64),1==Q("p20editnotes").checked&&(e+=128),1==Q("p20remoteview").checked&&(e+=256),1==Q("p20noterminal").checked&&(e+=512),1==Q("p20nofiles").checked&&(e+=1024),1==Q("p20noamt").checked&&(e+=2048)),meshserver.send({action:"addmeshuser",meshid:currentMesh._id,meshname:currentMesh.name,username:Q("dp20username").value,meshadmin:e})}function p20viewuser(e){if(!xxdialogMode){e=decodeURIComponent(e);var t=[],o=currentMesh.links[userinfo._id].rights,n=currentMesh.links[e].rights;4294967295==n?t.push("Full Administrator"):(0!=(1&n)&&t.push("Edit Device Group"),0!=(2&n)&&t.push("Manage Device Group Users"),0!=(4&n)&&t.push("Manage Device Group Computers"),0!=(8&n)&&t.push("Remote Control"),0!=(16&n)&&t.push("Agent Console"),0!=(32&n)&&t.push("Server Files"),0!=(64&n)&&t.push("Wake Devices"),0!=(128&n)&&t.push("Edit Notes"),0!=(256&n)&&t.push("Remote View Only"),0!=(512&n)&&t.push("No Terminal"),0!=(1024&n)&&t.push("Aucun fichier"),0!=(2048&n)&&t.push("No Intel&reg; AMT"),0!=(8&n)&&0!=(4096&n)&&0==(256&n)&&t.push("Limited Input"),0!=(8192&n)&&t.push("Self Events Only"),0!=(16384&n)&&t.push("Chat & Notify")),0==t.length&&t.push("No Rights");var i=1,a=addHtmlValue("User",EscapeHtml(decodeURIComponent(e.split("/")[2])));a+=addHtmlValue("Permissions",t.join(", ")),userinfo._id!=e&&(4294967295==o||0!=(2&o)&&4294967295!=n)&&(i+=4),setDialogMode(2,"Device Group User",i,p20viewuserEx,a,e)}}function p20viewuserEx(e,t){2==e&&setDialogMode(2,"Remote Mesh User",3,p20viewuserEx2,format("Confirm removal of user {0}?",t.split("/")[2]),t)}function p20deleteUser(e,t){haltEvent(e),p20viewuserEx(2,decodeURIComponent(t))}function p20viewuserEx2(e,t){meshserver.send({action:"removemeshuser",meshid:currentMesh._id,meshname:currentMesh.name,userid:t})}var xxdialogMode,xxdialogFunc,xxdialogButtons,xxdialogTag,xxcurrentView=-1;function go(e){if(setSessionActivity(),!xxdialogMode&&xxcurrentView!=e){updateFooterMenu(),setDialogMode(0);for(var t=0;t<32;t++)QV("p"+t,t==e);xxcurrentView=e}}function setDialogMode(e,t,o,n,i,a){setSessionActivity(),xxdialogMode=e,xxdialogFunc=n,xxdialogButtons=o,xxdialogTag=a,QE("idx_dlgOkButton",!0),QV("idx_dlgOkButton",1&o),QV("idx_dlgCancelButton",2&o),QV("id_dialogclose",2&o||8&o),QV("idx_dlgButtonBar",7&o),t&&QH("id_dialogtitle",t);for(var s=1;s<24;s++)QV("dialog"+s,s==e);QV("dialog",e),i&&(2==e?QH("id_dialogOptions",i):QH("id_dialogMessage",i))}function dialogclose(e){setSessionActivity();var t=xxdialogFunc,o=xxdialogButtons,n=xxdialogTag;setDialogMode(),(8&o||e)&&t&&t(e,n)}function putstore(e,t){try{if("undefined"==typeof localStorage||localStorage.getItem(e)==t)return;null==t?localStorage.removeItem(e):localStorage.setItem(e,t)}catch(e){}if("_"!=e[0]){for(var o={},n=0,i=localStorage.length;n<i;++n){var a=localStorage.key(n);"_"!=a[0]&&(o[a]=localStorage.getItem(a))}meshserver.send({action:"userWebState",state:JSON.stringify(o)})}}function getstore(e,t){try{if("undefined"==typeof localStorage)return t;var o=localStorage.getItem(e);return null==o||null==o?t:o}catch(e){return t}}function center(){QS("dialog").left=(getDocWidth()-300)/2+"px",deskAdjust(),deskAdjust()}function messagebox(e,t){QH("id_dialogMessage",t),setDialogMode(1,e,1)}function statusbox(e,t){QH("id_dialogMessage",t),setDialogMode(1,e)}function getDocWidth(){return window.innerWidth?window.innerWidth:document.documentElement&&document.documentElement.clientWidth&&0!=document.documentElement.clientWidth?document.documentElement.clientWidth:document.getElementsByTagName("body")[0].clientWidth}function haltEvent(e){return e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1}function haltReturn(e){13==e.keyCode&&haltEvent(e)}function validateEmail(e){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function reload(){window.location.href=window.location.href}function getNodeFromId(e){for(var t in nodes)if(nodes[t]._id==e)return nodes[t];return null}function addHtmlValue(e,t){return"<table><td style=width:120px>"+e+"<td><b>"+t+"</b></table>"}function addHtmlValue2(e,t){return"<div><div style=display:inline-block;float:right>"+t+"</div><div style=display:inline-block>"+e+"</div></div>"}function addLink(e,t){return"<a style=cursor:pointer;color:darkblue;text-decoration:none onclick='"+t+"'>&diams; "+e+"</a>"}function addLinkConditional(e,t,o){return o?addLink(e,t):e}function passwordcheck(e){return/(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%^&*()]).{8,}/.test(e)}function getFileSizeStr(e){return 1==e?"1 octet":format("{0} bytes",e)}function joinPaths(){var e=[];for(var t in arguments){var o=arguments[t];if(null!=o&&""!=o){for(;o.endsWith("/")||o.endsWith("\\");)o=o.substring(0,o.length-1);for(;o.startsWith("/")||o.startsWith("\\");)o=o.substring(1);e.push(o)}}return e.join("/")}function focusTextBox(e){setTimeout(function(){Q(e).selectionStart=Q(e).selectionEnd=65535,Q(e).focus()},0)}isFilenameValid=function(){var t=/^[^\\/:\*\?"<>\|]+$/,o=/^\./,n=/^(nul|prn|con|lpt[0-9]|com[0-9])(\.|$)/i;return function(e){return t.test(e)&&!o.test(e)&&!n.test(e)&&"."!=e[0]}}();function parseUriArgs(){var e,t={},o=window.document.location.href.split(/[\?&|\=]/);for(n in o.splice(0,1),o)switch(n%2){case 0:e=decodeURIComponent(o[n]);break;case 1:t[e]=decodeURIComponent(o[n]);var n=parseInt(t[e]);n==t[e]&&(t[e]=n)}return t}function printDate(e){return e.toLocaleDateString(args.locale)}function printTime(e){return e.toLocaleTimeString(args.locale)}function printDateTime(e){return e.toLocaleString(args.locale)}function format(e){var o=Array.prototype.slice.call(arguments,1);return e.replace(/{(\d+)}/g,function(e,t){return void 0!==o[t]?o[t]:e})}function nobreak(e){return e.split(" ").join("&nbsp;")}</script>
\ No newline at end of file
1 +<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link rel="shortcut icon"type=image/x-icon href={{{domainurl}}}favicon.ico><script src=scripts/common-0.0.1.js></script><script src=scripts/meshcentral.js></script><script src=scripts/agent-redir-ws-0.1.1.js></script><script src=scripts/agent-desktop-0.0.2.js></script><script src=scripts/amt-0.2.0.js></script><script src=scripts/amt-redir-ws-0.1.0.js></script><script src=scripts/amt-desktop-0.0.2.js></script><script src=scripts/zlib.js></script><script src=scripts/zlib-inflate.js></script><script src=scripts/zlib-adler32.js></script><script src=scripts/zlib-crc32.js></script><script keeplink=1 src=scripts/filesaver.js></script><title>{{{title}}}</title><style>a{color:#036;text-decoration:underline}#footer a{color:#fff;text-decoration:underline}#footer a:hover{color:#fff;text-decoration:none}.i1{background:url(../images/icons50.png) 0 0;height:50px;width:50px;border:none}.i2{background:url(../images/icons50.png) -50px 0;height:50px;width:50px;border:none}.i3{background:url(../images/icons50.png) -100px 0;height:50px;width:50px;border:none}.i4{background:url(../images/icons50.png) -150px 0;height:50px;width:50px;border:none}.i5{background:url(../images/icons50.png) -200px 0;height:50px;width:50px;border:none}.i6{background:url(../images/icons50.png) -250px 0;height:50px;width:50px;border:none}.m0{background:url(../images/images16.png) -32px 0;height:16px;width:16px;border:none;float:left}.m1{background:url(../images/images16.png) -16px 0;height:16px;width:16px;border:none;float:left}.m2{background:url(../images/images16.png) -96px 0;height:16px;width:16px;border:none;float:left}.m3{background:url(../images/images16.png) -112px 0;height:16px;width:16px;border:none;float:left}.gray{filter:gray;-webkit-filter:grayscale(100%) opacity(60%)}.DevSt{padding-left:5px;border-bottom-style:solid;border-bottom-width:1px;border-bottom-color:#ddd}.noselect{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.fileIcon4{background:url(../images/meshicon16.png);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:#fff;clear:both}</style><body onload='"undefined"!=typeof startup&&startup()'style="overflow-y:hidden;margin:0;padding:0;border:0;color:#000;font-size:13px;font-family:\'Trebuchet MS\',Arial,Helvetica,sans-serif"><div id=container><div id=mastheadx></div><div id=masthead style="background:url(logo.png) 0 0;background-size:341px 50px;background-color:#036;background-repeat:no-repeat;height:50px;width:100%;overflow:hidden"><div style="width:calc(100% - 50px);overflow:hidden"><div style=float:left;height:66px;color:#c8c8c8;padding-left:10px;padding-top:6px><strong><font style=font-size:36px;font-family:Arial,Helvetica,sans-serif>{{{title}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:10px><strong><font style=font-size:12px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><img id=topMenuIcon class=noselect style=position:absolute;right:0;top:10px;bottom:50px;color:#c8c8c8;font-size:44px;margin-right:8px;cursor:pointer;display:none onclick=topMenu() src=/images/3bars-30.png width=30 height=30></div><div id=page_content style=overflow-y:scroll;position:absolute;bottom:32px;top:50px;width:100%><div id=column_l style=width:100%;padding:0;position:absolute;bottom:0;top:0><div id=p0 style=display:none;width:100%;height:100%><div style=display:flex;align-items:center;width:100%;height:100%><div id=p0message style=text-align:center;width:100%><span id=p0span>Server disconnected</span>,<href onclick=reload() style=cursor:pointer><u>click to reconnect</u></href>.</div></div></div><div id=p1 style=display:none;width:100%;height:100%><div style=display:flex;align-items:center;width:100%;height:100%><div id=p1message style=text-align:center;width:100%></div></div></div><div id=p2 style=display:none><div id=xdevices></div></div><div id=p3 style=display:none;position:absolute;bottom:0;top:0;width:100%><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">◀</div><td><img src=/images/user-50.png width=50 height=50><td><div style=margin-left:5px><strong style=font-size:large><span id=p3userName></span></strong><br></div></table><div id=p3info style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%><div style=margin-left:8px><div id=p3AccountActions><p><strong>Account Security</strong><div style=margin-left:9px;margin-bottom:8px><div id=manageAuthApp style=margin-top:5px;display:none><a onclick=account_manageAuthApp() style=cursor:pointer>Manage authenticator app</a></div><div id=manageOtp style=margin-top:5px;display:none><a onclick=account_manageOtp(0) style=cursor:pointer>Manage backup codes</a></div></div><p><strong>Account Actions</strong><div style=margin-left:9px;margin-bottom:8px><div style=margin-top:5px><span id=verifyEmailId style=display:none><a onclick=account_showVerifyEmail() style=cursor:pointer>Verify email</a></span></div><div style=margin-top:5px><span id=changeEmailId style=display:none><a onclick=account_showChangeEmail() style=cursor:pointer>Change email address</a></span></div><div style=margin-top:5px><a onclick=account_showChangePassword() style=cursor:pointer>Change password</a><span id=p2nextPasswordUpdateTime></span></div><div style=margin-top:5px><a onclick=account_showDeleteAccount() style=cursor:pointer>Delete account</a></div></div><br style=clear:both></div><strong>Device Groups</strong> <span id=p3createMeshLink1>( <a onclick=account_createMesh() style=cursor:pointer><img src=images/icon-addnew.png width=12 height=12 border=0> Nouveau</a> )</span><br><br><div id=p3meshes></div><div id=p3noMeshFound style=margin-left:9px;display:none>Aucun groupe d'appareils.<span id=p3createMeshLink2> <a onclick=account_createMesh() style=cursor:pointer><strong>Get started here!</strong></a></span></div><br style=clear:both></div></div></div><div id=p5 style=display:none><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">◀</div><td><img src=/images/user-50.png width=50 height=50><td><div style=margin-left:5px><strong style=font-size:large>Mes Dossiers</strong><br></div></table><div id=p5myfiles style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%><table id=p5toolbar style=width:100%;height:78px cellpadding=0 cellspacing=0><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign=bottom><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p5FolderUp disabled onclick=p5folderup() value=Up> <input type=button style="width:calc(100%/5 - 5px)"id=p5SelectAllButton disabled onclick=p5selectallfile() value=ToutSélectionner onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5RenameFileButton disabled value=Renommer onclick=p5renamefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5DeleteFileButton disabled value=Delete onclick=p5deletefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5NewFolderButton disabled value=Folder onclick=p5createfolder() onkeypress=return!1 onkeydown=return!1></div><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p5UploadButton disabled value=Télécharger onclick=p5uploadFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5CutButton disabled value=Cut onclick=p5copyFile(1) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5CopyButton disabled value=Copy onclick=p5copyFile(0) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5PasteButton disabled value=Paste onclick=p5pasteFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5RefreshButton value=Rafraîchir onclick=p5refreshFiles() onkeypress=return!1 onkeydown=return!1></div><tr><td style=background-color:#e4e9e7;height:28px><table style=width:100%><tr><td id=p5currentpath style=overflow:hidden;padding-left:4px;padding-top:2px><td style=text-align:right;padding-right:4px><select id=p5sortdropdown onchange=updateFiles()><option value=1 selected>Trier par nom<option value=2>Trier par taille<option value=3>Trier par date<option value=4>Descend by name<option value=5>Descend by size<option value=6>Descend by date</select></table></table><div id=p5filetable style="width:100%;height:calc(100% - 133px);overflow:auto;-webkit-user-select:none"><span id=p5files></span></div><table id=p5toolbarBottom style=width:100%;height:22px;position:absolute;bottom:0;background-color:#d3d9d6 cellpadding=0 cellspacing=0><tr><td style=text-align:left;padding:3px>&nbsp;<span id=p5bottomstatus></span><td id=p5rightOfButtons style=text-align:right;padding:3px></table></div></div><div id=p10 style=display:none;position:absolute;bottom:0;top:0;width:100%;overflow:hidden><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0;position:absolute;top:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">◀</div><td><a id=MainComputerImage style=cursor:pointer onclick=p10showiconselector()></a><td><div style=margin-left:5px><strong><span id=p10deviceName></span></strong><br><span id=MainComputerState></span></div></table><div id=p10general style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%><div id=p10html style=margin-left:8px;margin-right:8px></div><div id=p10html2></div><div id=p10html3></div></div><div id=p10desktop style=overflow:hidden;position:absolute;top:55px;bottom:0;width:100%;display:none><div id=deskarea1 style=position:absolute;top:0;width:100%;height:25px><div style=padding-top:2px;padding-bottom:2px;background:silver><div style=float:right;text-align:right><span id=p14power></span>&nbsp; <input id=DeskSoftInput style=width:25px;display:none;opacity:.2 onblur=toggleSoftKeys(0) onkeypress="return ondeskkeypress(event)"onkeydown="return ondeskkeydown(event)"onkeyup="return ondeskkeyup(event)"></div><div style=margin-left:3px><input type=button id=connectbutton1 value=Connect onclick=connectDesktop(event,1) onkeypress=return!1 onkeydown=return!1 disabled> <input type=button id=connectbutton1h value="HW Connect"onclick=connectDesktop(event,2) onkeypress=return!1 onkeydown=return!1 disabled> <input type=button id=disconnectbutton1 value=Disconnect onclick=connectDesktop(event,0) onkeypress=return!1 onkeydown=return!1> <span id=deskstatus>Disconnected</span></div></div></div><div id=deskarea3 style="position:absolute;top:25px;width:100%;height:calc(100% - 50px)"><div id=deskarea3x style=background:#000;text-align:center;height:100%;position:relative><div id=DeskParent style=height:100%><canvas id=Desk width=640 height=200 style=width:100%;-ms-touch-action:none;margin-left:0 oncontextmenu=return!1 onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel=dmousewheel(event)></canvas></div><div id=DeskTools style="position:absolute;width:400px;height:100%;background-color:gray;top:0;right:0;border-left:2px solid #d3d3d3;display:none"><a id=DeskToolsRefreshButton style=float:right;padding:3px;cursor:pointer onclick=refreshDeskTools()>Rafraîchir</a><div id=DeskToolsBar style="position:absolute;padding:3px;border-radius:3px 3px 0 0;top:5px;left:4px;bottom:26px;background-color:#d3d3d3;cursor:pointer">Processes</div><div style=position:absolute;top:26px;left:4px;right:4px;bottom:4px;background-color:#d3d3d3;text-align:left><div style="border-bottom:1px solid #a9a9a9;padding:3px"><a style=width:50px;padding-right:5px;float:left;cursor:pointer onclick=sortProcess(0)>PID</a><a style=cursor:pointer onclick=sortProcess(1)>Nom</a></div><div id=DeskToolsProcesses style=overflow-y:scroll;position:absolute;top:24px;bottom:0;width:100%></div></div></div></div></div><div id=deskarea4 style=position:absolute;bottom:0;width:100%;height:25px><div style=padding-top:2px;padding-bottom:2px;background:silver><div style=float:right;text-align:right><select id=termdisplays style=display:none onchange=deskSetDisplay(event) onclick=deskGetDisplayNumbers(event)></select>&nbsp; <span id=DeskToastButton><img src=images/icon-notify.png onclick=deviceToastFunction() height=16 width=16 style=padding-top:2px></span>&nbsp;</div><div><input id=deskActionsBtn type=button style=margin-left:3px onkeypress=return!1 onkeydown=return!1 value=Actions onclick=deviceActionFunction()> <input type=button value=Settings onkeypress=return!1 onkeydown=return!1 onclick=showDesktopSettings()> <input type=button onkeypress=return!1 onkeydown=return!1 value="Power Actions..."onclick=showPowerActionDlg() style=display:none> <input id=DeskSpecialKeys type=button value="Special Keys"onkeypress=return!1 onkeydown=return!1 onclick=sendSpecialKeys()> <input id=DeskSoftKeys type=button value=Clavier onkeypress=return!1 onkeydown=return!1 onclick=toggleSoftKeys(1)> <label><span id=DeskControlSpan style=display:none><input id=DeskControl type=checkbox onkeypress=return!1 onkeydown=return!1>Input</span></label></div></div></div></div><div id=p10files style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%;display:none><table id=p13toolbar style=width:100%;height:111px cellpadding=0 cellspacing=0><tr><td style="background-color:silver;border-bottom:2px solid #000;padding:2px"><div style=float:right;text-align:right><input id=filesActionsBtn type=button onkeypress=return!1 onkeydown=return!1 value=Actions onclick=deviceActionFunction() style=margin-right:2px></div><div style=margin-left:2px><input id=p13AutoConnect value=AutoConnect onclick=autoConnectFiles(event) onkeypress=return!1 onkeydown=return!1 type=button style=display:none> <input id=p13Connect value=Connect onclick=connectFiles(event) onkeypress=return!1 onkeydown=return!1 type=button> <span id=p13Status>Disconnected</span></div><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign=bottom><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p13FolderUp disabled onclick=p13folderup() value=Up> <input type=button style="width:calc(100%/5 - 5px)"id=p13SelectAllButton disabled onclick=p13selectallfile() value=ToutSélectionner onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13RenameFileButton disabled value=Renommer onclick=p13renamefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13DeleteFileButton disabled value=Delete onclick=p13deletefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13NewFolderButton disabled value=Folder onclick=p13createfolder() onkeypress=return!1 onkeydown=return!1></div><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p13UploadButton disabled value=Télécharger onclick=p13uploadFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13CutButton disabled value=Cut onclick=p13copyFile(1) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13CopyButton disabled value=Copy onclick=p13copyFile(0) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13PasteButton disabled value=Paste onclick=p13pasteFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13RefreshButton disabled value=Rafraîchir onclick=p13folderup(9999) onkeypress=return!1 onkeydown=return!1></div><tr><td style=background-color:#e4e9e7;height:28px><table style=width:100%><tr><td id=p13currentpath style=overflow:hidden;padding-left:4px;padding-top:2px><td style=text-align:right;padding-right:4px><select id=p13sortdropdown onchange=p13updateFiles()><option value=1 selected>Trier par nom<option value=2>Trier par taille<option value=3>Trier par date<option value=4>Descend by name<option value=5>Descend by size<option value=6>Descend by date</select></table></table><div id=p13filetable style="width:100%;height:calc(100% - 133px);overflow:auto;-webkit-user-select:none"><span id=p13files></span></div><table id=p13toolbarBottom style=width:100%;height:22px;position:absolute;bottom:0 cellpadding=0 cellspacing=0><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#d3d9d6>&nbsp;<span id=p13bottomstatus></span></table></div></div><div id=p20 style=display:none;position:absolute;bottom:0;top:0;width:100%><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">◀</div><td onclick=p20editmesh(1)><img src=/images/meshicon50.png width=50 height=50><td onclick=p20editmesh(1)><div style=margin-left:5px><strong style=font-size:large><span id=p20meshName></span></strong><br></div></table><div id=p20info style=margin-left:8px;margin-right:8px></div></div></div></div><div id=footer style=height:32px;width:100%;text-align:center;background-color:#113962;position:absolute;bottom:0><table id=footerMenu cellpadding=0 cellspacing=0 style=height:32px;width:100%;color:#fff;cursor:pointer;table-layout:fixed></table></div></div><div id=dialog style="z-index:1000;background-color:#eee;box-shadow:0 0 15px #666;font-family:Arial,Helvetica,sans-serif;border-radius:5px;position:fixed;top:90px;width:300px;display:none"><div style="width:100%;background-color:#036;color:#fff;border-radius:5px 5px 0 0"><div id=id_dialogclose style=float:right;padding:5px;cursor:pointer onclick=setDialogMode()><b>X</b></div><div id=id_dialogtitle style=padding:5px></div><div style=width:100%;margin:6px></div></div><div style=margin-right:16px;margin-left:8px><div id=dialog1 style=margin:auto;text-align:center;margin:3px><div id=id_dialogMessage style=padding:10px></div></div><div id=dialog2 style=margin:auto;margin:3px><div id=id_dialogOptions></div></div><div id=dialog3 style=margin:auto;margin:3px><select id=deskkeys style=width:100%><option value=10>Ctrl+Alt+Del<option value=11>Tab<option value=5>Win<option value=0>Win+Down<option value=1>Win+Up<option value=2>Win+L<option value=3>Win+M<option value=4>Shift+Win+M<option value=6>Win+R<option value=7>Alt-F4<option value=8>Ctrl-W<option value=9>Alt-Tab</select></div><div id=dialog7 style=margin:auto;margin:3px><div id=d7meshkvm><h4 style="width:100%;border-bottom:1px solid gray">Agent Remote Desktop</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir=rtl></select><div style=height:20px>Qualité</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir=rtl><option selected value=1024>100%<option value=896>87.5%<option value=768>75%<option value=640>62.5%<option value=512>50%<option value=384>37.5%<option value=256>25%<option value=128>12.5%</select><div style=height:20px>Mise à l'échelle</div></div><div style="margin:3px 0 3px 0"><select id=d7framelimiter style=float:right;width:200px;height:20px dir=rtl><option selected value=50>Fast<option value=100>Medium<option value=400>Lent<option value=1000>Very slow</select><div style=height:20px>Rate</div></div></div><div id=d7amtkvm><h4 style="width:100%;border-bottom:1px solid gray">Intel® AMT Hardware KVM</h4><div style=height:26px><select id=d7desktopmode style=float:right;width:200px><option value=1>RLE8, le plus rapide<option value=2>RLE16, recommandé<option value=3>RAW8, Slow<option value=4>RAW16, Very Slow</select><div>Encoding</div></div><div style=height:60px><div style="float:right;border:1px solid #666;width:200px;height:60px;overflow-y:scroll;background-color:#fff"><label><input type=checkbox id=d7showfocus>Show Focus Tool</label><br><label><input type=checkbox id=d7showcursor>Show Local Mouse Cursor</label><br></div><div>Autre</div></div></div></div></div><div id=idx_dlgButtonBar style=padding:10px;margin-bottom:20px><input id=idx_dlgCancelButton type=button value=Annuler style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)> <input id=idx_dlgOkButton type=button value=OK style=float:right;width:80px onclick=dialogclose(1)></div></div><div id=topMenu style="z-index:1000;background-color:#eee;box-shadow:0 0 15px #666;font-family:Arial,Helvetica,sans-serif;border-radius:0 0 5px 5px;position:fixed;top:50px;right:5px;width:170px;display:none"><div style="padding:12px;border-top:1px solid gray;color:#000;cursor:pointer"onclick=topMenu(2)>Mes Dossiers</div><div style="padding:12px;border-top:1px solid gray;color:#000;cursor:pointer"onclick=topMenu(1)>Mon Compte</div><div id=logoutMenuOption><a href=/logout><div style="padding:12px;border-top:1px solid gray;color:#000;cursor:pointer">Logout</div></a></div></div><iframe name=fileUploadFrame style=display:none></iframe><script>"use strict";var webState="{{{webstate}}}";for(var i in""!=webState&&(webState=JSON.parse(decodeURIComponent(webState))),webState)localStorage.setItem(i,webState[i]);webState.loctag||localStorage.removeItem("loctag");var files,args=parseUriArgs(),debugLevel=parseInt("{{{debuglevel}}}"),features=parseInt("{{{features}}}"),sessionTime=parseInt("{{{sessiontime}}}"),domain="{{{domain}}}",domainUrl="{{{domainurl}}}",authCookie="{{{authCookie}}}",authRelayCookie="{{{authRelayCookie}}}",authCookieRenewTimer=null,meshserver=null,xdr=null,serverinfo=null,nodes=[],meshes={},filetree={},userinfo=null,users=(serverinfo=null,null),nodeShortIdent=0,serverPublicNamePort="{{{serverDnsName}}}:{{{serverPublicPort}}}",debugmode=!1,attemptWebRTC=0!=(128&features),StatusStrs=["Disconnected","Connecting...","Setup...","Connected","Intel&reg; AMT Connected"],passRequirements="{{{passRequirements}}}";""!=passRequirements&&(passRequirements=JSON.parse(decodeURIComponent(passRequirements)));var sessionActivity=Date.now();function startup(){if(0==(32&features)){var e=null;try{e=top.location.toString().toLowerCase()}catch(e){}if(top!=self&&(null==e||0==top.active))return void(top.location=self.location)}if(!args.locale){var t=getstore("loctag",0);null!=t&&"*"!=t&&(args.locale=t)}(window.onresize=center)(),QV("changeEmailId",0==(2097152&features)),QH("p1message","Connecting..."),go(1),(meshserver=MeshServerCreateControl(domainUrl,authCookie)).onStateChanged=onStateChanged,meshserver.onMessage=onMessage,meshserver.Start();var o=localStorage.getItem("desktopsettings");null!=o&&(desktopsettings=JSON.parse(o)),applyDesktopSettings()}function onStateChanged(e,t,o,n){if(0==t){if(setDialogMode(0),go(0),"noauth"==n)return void QH("p0span","Unable to perform authentication");2==o?setTimeout(serverPoll,5e3):QH("p0span","Unable to connect web socket"),null!=authCookieRenewTimer&&(clearInterval(authCookieRenewTimer),authCookieRenewTimer=null)}else 2==t&&(meshserver.send({action:"meshes"}),meshserver.send({action:"nodes"}),meshserver.send({action:"files"}),xxcurrentView<2&&go(2),authCookieRenewTimer=setInterval(function(){meshserver.send({action:"authcookie"})},18e5));QV("topMenuIcon",2==t)}function serverPoll(){xdr=null;try{xdr=new XDomainRequest}catch(e){}(xdr=xdr||new XMLHttpRequest).open("HEAD",window.location.href),xdr.timeout=15e3,xdr.onload=function(){reload()},xdr.onerror=xdr.ontimeout=function(){setTimeout(serverPoll,1e4)},xdr.send()}function updateSelf(){if(QV("verifyEmailId",!0!==userinfo.emailVerified&&null!=userinfo.email&&1==serverinfo.emailcheck),QV("manageAuthApp",4096&features),QV("manageOtp",0!=(4096&features)&&(1==userinfo.otpsecret||0<userinfo.otphkeys)),QV("p3createMeshLink1",!1),QV("p3createMeshLink2",!1),"number"==typeof userinfo.passchange)if(-1==userinfo.passchange)QH("p2nextPasswordUpdateTime","- Réinitialiser à la prochaine connexion.");else if(null!=passRequirements&&"number"==typeof passRequirements.reset){var e=userinfo.passchange+86400*passRequirements.reset-Math.floor(Date.now()/1e3);e<0?QH("p2nextPasswordUpdateTime","- Réinitialiser à la prochaine connexion."):e<3600?QH("p2nextPasswordUpdateTime",format("- Réinitialisation en {0} minute {1}.",Math.floor(e/60),addLetterS(Math.floor(e/60)))):e<86400?QH("p2nextPasswordUpdateTime",format("- Réinitialisation dans {0} heure {1}.",Math.floor(e/3600),addLetterS(Math.floor(e/3600)))):QH("p2nextPasswordUpdateTime",format("- Réinitialiser dans le {0} jour {1}."),Math.floor(e/86400),addLetterS(Math.floor(e/86400)))}}function addLetterS(e){return 1<e?"s":""}function setSessionActivity(){sessionActivity=Date.now()}function checkIdleSessionTimeout(){Date.now()-sessionActivity>serverinfo.timeout&&(window.location.href="logout")}function onMessage(e,t){switch(t.action){case"serverinfo":(serverinfo=t.serverinfo).timeout&&(setInterval(checkIdleSessionTimeout,1e4),checkIdleSessionTimeout()),QV("p3AccountActions",0==(4&features)&&0==serverinfo.domainauth),QV("logoutMenuOption",0==(4&features)&&0==serverinfo.domainauth);break;case"authcookie":authCookie=t.cookie,authRelayCookie=t.rcookie;break;case"userinfo":userinfo=t.userinfo,QH("p3userName",userinfo.name),updateSelf();break;case"users":for(var o in users={},t.users)users[t.users[o]._id]=t.users[o];updateUsers();break;case"wssessioncount":wssessions=t.wssessions,updateUsers();break;case"meshes":for(var o in meshes={},t.meshes)meshes[t.meshes[o]._id]=t.meshes[o];updateMeshes(),updateDevices();break;case"files":filetree=setupBackPointers(t.filetree),updateFiles();break;case"nodes":for(var o in nodes=[],t.nodes)for(var n in t.nodes[o])meshes[o]?(t.nodes[o][n].namel=t.nodes[o][n].name.toLowerCase(),t.nodes[o][n].rname?t.nodes[o][n].rnamel=t.nodes[o][n].rname.toLowerCase():t.nodes[o][n].rnamel=t.nodes[o][n].namel,t.nodes[o][n].meshnamel=meshes[o].name.toLowerCase(),t.nodes[o][n].meshid=o,t.nodes[o][n].state=t.nodes[o][n].state?t.nodes[o][n].state:0,t.nodes[o][n].desc=t.nodes[o][n].desc,t.nodes[o][n].icon||(t.nodes[o][n].icon=1),t.nodes[o][n].ident=++nodeShortIdent,nodes.push(t.nodes[o][n])):console.log("Invalid mesh (1): "+o);updateDevices(),0==xxcurrentView&&go(parseInt("{{viewmode}}")),gotoDevice("{{currentNode}}",parseInt("{{viewmode}}"));break;case"powertimeline":if(t.nodeid!=powerTimelineReq)break;powerTimelineNode=t.nodeid,powerTimeline=t.timeline,powerTimelineUpdate=Date.now()+3e5,currentNode._id==t.nodeid&&drawDeviceTimeline();break;case"otpauth-request":if(2==xxdialogMode&&"otpauth-request"==xxdialogTag){var i=t.secret;52==i.length?i=i.split(/(.............)/).filter(Boolean).join(" "):32==i.length&&(i=(i=i.split(/(....)/).filter(Boolean).join(" ")).substring(0,20)+"<br/>"+i.substring(20)),QH("d2optinfo",'Install <a href="https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2" rel="noreferrer noopener" target=_blank>Google Authenticator</a> or a compatible application, use <a href="\' + message.url + \'" rel="noreferrer noopener" target=_blank> this link</a> or enter the secret below. Then, enter the current 6 digit token to activate 2-Step login.<br /><br /><div style=width:100%;text-align:center><tt id=d2optsecret secret="'+t.secret+'" style=font-size:15px>'+i+'</tt><br /><br />Token: <input type=text onkeypress="return (event.keyCode == 8) || (event.charCode >= 48 && event.charCode <= 57)" onkeyup=account_addOtpCheck(event) onkeydown=account_addOtpCheck() maxlength=6 id=d2otpauthinput type=text></div>'),QV("idx_dlgOkButton",!0),QE("idx_dlgOkButton",!1),Q("d2otpauthinput").focus()}break;case"otpauth-setup":if(xxdialogMode)return;setDialogMode(2,"Authenticator App",1,null,t.success?"<b style=color:green>2-step login activation successful</b>. You will now need a valid token to login again.":"<b style=color:red>2-step login activation failed</b>. Clear the secret from the application and try again. You only have a few minutes to enter the proper code.");break;case"otpauth-clear":if(xxdialogMode)return;setDialogMode(2,"Authenticator App",1,null,t.success?"<b style=color:green>2-step login activation removed</b>. You can reactivate this feature at any time.":"<b style=color:red>2-step login activation removal failed</b>. Try again.");break;case"otpauth-getpasswords":if(xxdialogMode)return;var a="One time tokens can be used as secondary authentication. Generate a set, print them and keep them in a safe place.";if(a+="<div style='border-radius:6px;border: 2px dashed #888;width:100%;margin-top:8px'><div style='padding:8px;font-family:Arial, Helvetica, sans-serif;font-size:20px;font-weight:bold'><table style=width:100%;text-align:center>",t.passwords){var s=0;for(var l in t.passwords){++s%2&&(a+="<tr>");for(var r=""+t.passwords[l].p;r.length<8;)r="0"+r;!0===t.passwords[l].u?a+="<td>"+r.substring(0,4)+"&nbsp;"+r.substring(4):a+="<td><strike style=color:#BBB>"+r.substring(0,4)+"&nbsp;"+r.substring(4)}}else a+="<tr><td>No Active Tokens";a+="</table></div></div><br />",a+="<div><input type=button value='Close' onclick=setDialogMode(0) style=float:right></input>",a+="<input type=button value='Nouveaux Jetons' onclick='account_manageOtp(1);'></input>",null!=t.passwords&&(a+="<input type=button value='Clear' onclick='account_manageOtp(2);'></input>"),setDialogMode(2,"Manage Backup Codes",8,null,a+="</div><br />","otpauth-manage");break;case"event":if(t.event.noact)break;switch(t.event.action){case"userWebState":if(null!=localStorage){var d=JSON.parse(t.event.state);for(var l in d)localStorage.setItem(l,d[l]);null!=d.loctag&&d.loctag!=oldLoctag&&(null!=d.loctag?args.locale=d.loctag:delete args.locale,updateDevices(),updateMeshes())}break;case"accountchange":if(userinfo.name==t.event.account.name){var p=t.event.account.siteadmin?t.event.account.siteadmin:0,c=userinfo.siteadmin?userinfo.siteadmin:0;(t.event.account.quota!=userinfo.quota||0==(8&userinfo.siteadmin)&&0!=(8&t.event.account.siteadmin))&&meshserver.send({action:"files"}),userinfo=t.event.account,c!=p&&updateSiteAdmin(),updateSelf()}break;case"createmesh":null!=t.event.links[userinfo._id]&&(meshes[t.event.meshid]={_id:t.event.meshid,name:t.event.name,mtype:t.event.mtype,desc:t.event.desc,links:t.event.links},updateMeshes(),updateDevices(),meshserver.send({action:"files"}));break;case"meshchange":if(null==meshes[t.event.meshid])meshes[t.event.meshid]={_id:t.event.meshid,name:t.event.name,mtype:t.event.mtype,desc:t.event.desc,links:t.event.links},meshserver.send({action:"nodes"});else{if(meshes[t.event.meshid].name!=t.event.name)for(var l in meshes[t.event.meshid].name=t.event.name,nodes)nodes[l].meshid==t.event.meshid&&(nodes[l].meshnamel=t.event.name.toLowerCase());if(meshes[t.event.meshid].desc=t.event.desc,meshes[t.event.meshid].links=t.event.links,null==meshes[t.event.meshid].links[userinfo._id]){20==xxcurrentView&&currentMesh==meshes[t.event.meshid]&&go(2),delete meshes[t.event.meshid];var u=[];for(var l in nodes)nodes[l].meshid!=t.event.meshid&&u.push(nodes[l]);nodes=u,10<=xxcurrentView&&xxcurrentView<20&&currentNode&&currentNode.meshid==t.event.meshid&&(setDialogMode(0),go(2))}}updateMeshes(),updateDevices(),meshserver.send({action:"files"}),20==xxcurrentView&&currentMesh._id==t.event.meshid&&p20updateMesh();break;case"deletemesh":meshes[t.event.meshid]&&(delete meshes[t.event.meshid],updateMeshes(),meshserver.send({action:"files"}));u=[];for(var l in nodes)nodes[l].meshid!=t.event.meshid&&u.push(nodes[l]);nodes=u,updateDevices(),20<=xxcurrentView&&xxcurrentView<30&&currentMesh._id==t.event.meshid&&(setDialogMode(0),go(2)),10<=xxcurrentView&&xxcurrentView<20&&currentNode&&currentNode.meshid==t.event.meshid&&(setDialogMode(0),go(2));break;case"addnode":var m=t.event.node;if(!meshes[m.meshid])break;if(null!=getNodeFromId(m._id))break;m.namel=m.name.toLowerCase(),m.rname?m.rnamel=m.rname.toLowerCase():m.rnamel=m.namel,m.meshnamel=meshes[m.meshid].name.toLowerCase(),m.state=0,m.icon||(m.icon=1),m.ident=++nodeShortIdent,nodes.push(m),updateDevices();break;case"removenode":var h=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){h=l;break}if(-1!=h){m=nodes[h];currentNode==m&&(10<=xxcurrentView&&xxcurrentView<20&&(setDialogMode(0),go(2)),currentNode=null),nodes.splice(h,1),updateDevices()}break;case"changenode":h=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){h=l;break}if(-1!=h)(m=nodes[h]).name=t.event.node.name,m.rname=t.event.node.rname,m.host=t.event.node.host,m.desc=t.event.node.desc,m.publicip=t.event.node.publicip,m.iploc=t.event.node.iploc,m.wifiloc=t.event.node.wifiloc,m.gpsloc=t.event.node.gpsloc,m.tags=t.event.node.tags,m.userloc=t.event.node.userloc,null!=t.event.node.agent&&(null==m.agent&&(m.agent={}),null!=t.event.node.agent.ver&&(m.agent.ver=t.event.node.agent.ver),null!=t.event.node.agent.id&&(m.agent.id=t.event.node.agent.id),null!=t.event.node.agent.caps&&(m.agent.caps=t.event.node.agent.caps),null!=t.event.node.agent.core?m.agent.core=t.event.node.agent.core:m.agent.core&&delete m.agent.core,m.agent.tag=t.event.node.agent.tag),null!=t.event.node.intelamt&&(null==m.intelamt&&(m.intelamt={}),null!=t.event.node.intelamt.state&&(m.intelamt.state=t.event.node.intelamt.state),null!=t.event.node.intelamt.host&&(m.intelamt.user=t.event.node.intelamt.host),null!=t.event.node.intelamt.user&&(m.intelamt.user=t.event.node.intelamt.user),null!=t.event.node.intelamt.tls&&(m.intelamt.tls=t.event.node.intelamt.tls),null!=t.event.node.intelamt.ver&&(m.intelamt.ver=t.event.node.intelamt.ver),null!=t.event.node.intelamt.tag&&(m.intelamt.tag=t.event.node.intelamt.tag),null!=t.event.node.intelamt.uuid&&(m.intelamt.uuid=t.event.node.intelamt.uuid),null!=t.event.node.intelamt.realm&&(m.intelamt.realm=t.event.node.intelamt.realm)),m.namel=m.name.toLowerCase(),m.rname?m.rnamel=m.rname.toLowerCase():m.rnamel=m.namel,t.event.node.icon&&(m.icon=t.event.node.icon),refreshDevice(m._id),updateDevices();break;case"nodemeshchange":h=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){h=l;break}if(-1!=h){m=nodes[h];null==meshes[t.event.newMeshId]?(currentNode==m&&(10<=xxcurrentView&&xxcurrentView<20&&(setDialogMode(0),go(2)),currentNode=null),nodes.splice(h,1)):(m.meshid=t.event.newMeshId,m.meshnamel=meshes[t.event.newMeshId].name.toLowerCase()),updateDevices(),refreshDevice(t.event.nodeid)}else{m=t.event.node;if(!meshes[m.meshid])break;m.namel=m.name.toLowerCase(),m.rname?m.rnamel=m.rname.toLowerCase():m.rnamel=m.namel,m.meshnamel=meshes[m.meshid].name.toLowerCase(),m.state=0,m.icon||(m.icon=1),m.ident=++nodeShortIdent,nodes.push(m),updateDevices()}break;case"nodeconnect":h=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){h=l;break}if(-1!=h)(m=nodes[h]).conn=t.event.conn,m.pwr=t.event.pwr,updateDevices();break;case"login":null!=users&&users["user/"+domain+"/"+t.event.username.toLowerCase()]&&(users["user/"+domain+"/"+t.event.username.toLowerCase()].login=t.event.time)}}}function topMenu(e){null!=xxdialogMode&&0!=xxdialogMode&&999!=xxdialogMode||(void 0===e?1==("none"==QS("topMenu").display)?0!=xxdialogMode&&null!=xxdialogMode||(QV("topMenu",!0),xxdialogMode=999):(QV("topMenu",!1),xxdialogMode=0):(QV("topMenu",!1),xxdialogMode=0,1==e&&3!=xxcurrentView&&goForward("account"),2==e&&5!=xxcurrentView&&goForward("files")))}var filetreelinkpath,backStack=[];function goBack(){xxdialogMode||(0<backStack.length&&backStack.pop(),goStack())}function goForward(e){xxdialogMode||(backStack.push(e),goStack())}function goStack(){if(0!=backStack.length){var e=backStack[backStack.length-1],t=e.split("/")[0];"node"==t&&(setupDeviceMenu(0),gotoDevice(e)),"mesh"==t&&gotoMesh(e),"account"==t&&go(3),"devices"==t&&go(2),"files"==t&&go(5)}else go(2)}function updateFooterMenu(e){for(;null!=e&&e.length<3;)e.push({n:""});var t="",o="";if(null!=e)for(var n in e)t+='<td style="cursor:pointer'+(""==o?"":";border-left:solid 1px white")+'" onclick="'+e[n].f+'">'+e[n].n,o=e[n].n;QH("footerMenu","<tr>"+t)}function account_manageAuthApp(){xxdialogMode||0==(4096&features)||(1==userinfo.otpsecret?account_removeOtp():account_addOtp())}function account_addOtp(){xxdialogMode||1==userinfo.otpsecret||0==(4096&features)||(setDialogMode(2,"Authenticator App",2,function(){meshserver.send({action:"otpauth-setup",secret:Q("d2optsecret").attributes.secret.value,token:Q("d2otpauthinput").value})},"<div id=d2optinfo>Loading...</div>","otpauth-request"),meshserver.send({action:"otpauth-request"}))}function account_addOtpCheck(e){var t=6==Q("d2otpauthinput").value.length;QE("idx_dlgOkButton",t),e&&13==e.keyCode&&t&&dialogclose(1)}function account_removeOtp(){xxdialogMode||1!=userinfo.otpsecret||0==(4096&features)||setDialogMode(2,"Authenticator App",3,function(){meshserver.send({action:"otpauth-clear"})},"Confirm removal of authenticator application 2-step login?")}function account_manageOtp(e){2==xxdialogMode&&"otpauth-manage"==xxdialogTag&&dialogclose(0),xxdialogMode||1!=userinfo.otpsecret||0==(4096&features)||meshserver.send({action:"otpauth-getpasswords",subaction:e})}function account_showVerifyEmail(){xxdialogMode||1==userinfo.emailVerified||1!=serverinfo.emailcheck||setDialogMode(2,"Email Verification",3,account_showVerifyEmailEx,"Click ok to send a verification mail to:<br /><div style=padding:8px><b>"+EscapeHtml(userinfo.email)+"</b></div>Please wait a few minute to receive the verification.")}function account_showVerifyEmailEx(){meshserver.send({action:"verifyemail",email:userinfo.email})}function account_showChangeEmail(){xxdialogMode||(setDialogMode(2,"Email Address Change",3,account_changeEmail,addHtmlValue("Email","<input id=dp3email style=width:170px maxlength=256 onchange=account_validateEmail() onkeyup=account_validateEmail(event) />")),null!=userinfo.email&&(Q("dp3email").value=userinfo.email),account_validateEmail(),Q("dp3email").focus())}function account_validateEmail(e,t){QE("idx_dlgOkButton",validateEmail(Q("dp3email").value)&&Q("dp3email").value!=userinfo.email),null!=e&&13==e.keyCode&&dialogclose(1)}function account_changeEmail(){meshserver.send({action:"changeemail",email:Q("dp3email").value})}function account_showDeleteAccount(){if(!xxdialogMode){var e="<form method=post><table style=margin-left:10px><input type=hidden name=action value=deleteaccount /><input type=hidden name=authcookie value="+authCookie+" /><tr>";e+="<td align=right>Mot de passe:</td><td><input id=apassword1 type=password name=apassword1 autocomplete=off onchange=account_validateDeleteAccount() onkeyup=account_validateDeleteAccount() /></td>",e+="</tr><tr><td align=right>Mot de passe:</td><td><input id=apassword2 type=password name=apassword2 autocomplete=off onchange=account_validateDeleteAccount() onkeyup=account_validateDeleteAccount() /></td>",e+="</tr></table><div style=padding:10px;margin-bottom:4px>",e+='<input id=account_dlgCancelButton type=button value="Annuler" style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)>',e+='<input id=account_dlgOkButton type=submit value="OK" style="float:right;width:80px" onclick=dialogclose(1)>',setDialogMode(2,"Delete Account",0,null,e+="</div><br /></form>"),account_validateDeleteAccount(),Q("apassword1").focus()}}function account_showChangePassword(){if(xxdialogMode)return!1;var e="<table style=margin-left:10px>";if(e+="<tr><td align=right>"+nobreak("Old password:")+"</td><td><input id=apassword0 type=password name=apassword0 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /> <b></b></td></tr>",e+="<tr><td align=right>"+nobreak("Nouveau mot de passe:")+"</td><td><input id=apassword1 type=password name=apassword1 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /> <b><span id=dxPassWarn></span></b></td></tr>",e+="<tr><td align=right>"+nobreak("Nouveau mot de passe:")+"</td><td><input id=apassword2 type=password name=apassword2 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /></td></tr>",65536&features&&(e+="<tr><td align=right>Password hint:</td><td><input id=apasswordhint name=apasswordhint maxlength=250 type=text autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /></td></tr>"),e+="</table>",passRequirements){var t=[],o=0;for(var n in passRequirements)"reset"!=n&&"hint"!=n&&(t.push(n+":"+passRequirements[n]),o++);0<o&&(e+="<br /><span style=font-size:x-small>"+format("Exigences: {0}.",t.join(", "))+"</span>")}return setDialogMode(2,"Change Password",3,account_showChangePasswordEx,e+="<br />"),Q("apassword0").focus(),account_validateNewPassword(),!1}function account_showChangePasswordEx(){if(Q("apassword1").value==Q("apassword2").value){var e={action:"changepassword",oldpass:Q("apassword0").value,newpass:Q("apassword1").value};65536&features&&(e.hint=Q("apasswordhint").value),meshserver.send(e)}}function account_createMesh(){if(!xxdialogMode)if(4294967295==userinfo.siteadmin||0==(64&userinfo.siteadmin))if(!0===userinfo.emailVerified||1!=serverinfo.emailcheck||4294967295==userinfo.siteadmin)if(!(262144&features)||1==userinfo.otpsecret||0<userinfo.otphkeys||0<userinfo.otpkeys){var e=addHtmlValue("Nom","<input id=dp3meshname style=width:170px maxlength=64 onchange=account_validateMeshCreate() onkeyup=account_validateMeshCreate() />");e+=addHtmlValue("Type","<div style=width:170px;margin:0;padding:0><select id=dp3meshtype style=width:100% onchange=account_validateMeshCreate() ><option value=2>Groupe d'agents logiciels</option><option value=1>Intel&reg; AMT only</option></select></div>"),setDialogMode(2,"Create Device Group",3,account_createMeshEx,e+=addHtmlValue("Description","<div style=width:170px;margin:0;padding:0><textarea id=dp3meshdesc maxlength=1024 style=width:100%;resize:none></textarea></div>")),account_validateMeshCreate(),Q("dp3meshname").focus()}else setDialogMode(2,"Account Security",1,null,'Unable to access a device until two-factor authentication is enabled. This is required for extra security. Go to the "My Account" and look at the "Account Security" section.');else setDialogMode(2,"Account Security",1,null,'Unable to access a device until a email address is verified. This is required for password recovery. Go to the "My Account" to change and verify an email address.');else setDialogMode(2,"Nouveau Group",1,null,"This account does not have the rights to create a new device group.")}function account_validateMeshCreate(){QE("idx_dlgOkButton",0<Q("dp3meshname").value.length)}function account_createMeshEx(e,t){meshserver.send({action:"createmesh",meshname:Q("dp3meshname").value,meshtype:Q("dp3meshtype").value,desc:Q("dp3meshdesc").value})}function account_validateDeleteAccount(){QE("account_dlgOkButton",0<Q("apassword1").value.length&&Q("apassword1").value==Q("apassword2").value)}function account_validateNewPassword(){var e="",t=0<Q("apassword0").value.length&&0<Q("apassword1").value.length&&Q("apassword1").value==Q("apassword2").value&&Q("apassword0").value!=Q("apassword1").value;if(65536&features&&Q("apasswordhint").value==Q("apassword1").value&&(t=!1),""!=Q("apassword1").value)if(null==passRequirements||""==passRequirements){var o=checkPasswordStrength(Q("apassword1").value);e=80<=o?"<span style=color:green>Strong<span>":60<=o?"<span style=color:blue>&#9679;<span>":"<span style=color:red>&#9679;<span>"}else{0==checkPasswordRequirements(Q("apassword1").value,passRequirements)&&(t=!1,e="<span style=color:red>Politique<span>")}QH("dxPassWarn",e),QE("idx_dlgOkButton",t)}function checkPasswordStrength(e){var t=0,o={},n=0,i={digits:/\d/.test(e),lower:/[a-z]/.test(e),upper:/[A-Z]/.test(e),nonWords:/\W/.test(e)};if(!e)return 0;for(var a=0;a<e.length;a++)o[e[a]]=(o[e[a]]||0)+1,t+=5/o[e[a]];for(var s in i)n+=1==i[s]?1:0;return parseInt(t+10*(n-1))}function checkPasswordRequirements(e,t){if(null==t||""==t||"object"!=typeof t)return!0;if(t.min&&e.length<t.min)return!1;if(t.max&&e.length>t.max)return!1;for(var o=0,n=0,i=0,a=0,s=0;s<e.length;s++)/\d/.test(e[s])&&o++,/[a-z]/.test(e[s])&&n++,/[A-Z]/.test(e[s])&&i++,/\W/.test(e[s])&&a++;return!(t.num&&o<t.num)&&(!(t.lower&&n<t.lower)&&(!(t.upper&&i<t.upper)&&!(t.nonalpha&&a<t.nonalpha)))}function updateMeshes(){var e="",t=0;for(i in meshes){t++;var o=meshes[i].links[userinfo._id].rights,n="Partial Rights";4294967295==o?n="Full Administrator":0==o&&(n="No Rights"),e+="<div style=cursor:pointer onclick=goForward('"+i+"')>",e+='<div style="float:left;margin-left:4px"><img src="/images/meshicon50.png" width=50 height=50 /></div>',e+='<div style="width:auto;height:40px;background-color:lightgray;margin-top:5px;margin-bottom:5px;margin-left:60px;padding-top:5px;padding-bottom:5px;border-radius:8px 0px 0px 8px">',e+="<div><div style=padding-left:12px;padding-top:2px><b>"+EscapeHtml(meshes[i].name)+"</b></div><div style=padding-left:12px;padding-top:3px;color:gray>"+n+"</div></div>",e+="</div></div>"}QH("p3meshes",e),QV("p3noMeshFound",0==t)}function gotoMesh(e){null==(currentMesh=meshes[e])&&goBack(),p20updateMesh(),go(20)}var sortorder,filetreelocation=[];function p5refreshFiles(){meshserver.send({action:"files"})}function updateFiles(){if(QV("MainMenuMyFiles",0==(8&features)),0==(8&features)){for(var e,t="",o="",n="<a style=cursor:pointer onclick=p5folderup(0)>Root</a>",i="Root",a=filetree,s=1,l=[],r=filetreelinkpath,d=[],p=document.getElementsByName("fc"),c=0;c<p.length;c++)p[c].checked&&d.push(p[c].value);for(var c in filetreelinkpath="",filetreelocation){if(null==a.f||null==a.f[filetreelocation[c]])break;if(l.push(filetreelocation[c]),i+=" / "+filetreelocation[c],1==s){var u=filetreelocation[c].split("/");e=window.location+u[0]+"files/"+u[2],filetreelinkpath+=filetreelocation[c]}else""!=filetreelinkpath&&(filetreelinkpath+="/"+filetreelocation[c],2<s&&(e+="/"+filetreelocation[c]));n+=" / <a style=cursor:pointer onclick=p5folderup("+s+")>"+(null!=(a=a.f[filetreelocation[c]]).n?a.n:filetreelocation[c])+"</a>",s++}filetreelocation=l;var m=i.toLowerCase().startsWith("root / "+userinfo._id+" / public"),h=p5sort_files(a.f);for(var c in h){var f,g=h[c],v=g.n;f=40<(f=v).length?EscapeHtml(v.substring(0,40))+"...":EscapeHtml(v),v=EscapeHtml(v);var k="";null!=g.s&&(k=getFileSizeStr(g.s));var y="";if(g.t<3||4==g.t){y="<div class=filelist file=999><input file=999 style=float:left name=fc class=fcb type=checkbox onchange=p5setActions() value='"+v+"'>&nbsp;<span style=float:right;padding-right:4px>"+(1==g.t||4==g.t?p5getQuotabar(g):"")+"</span><span><div class=fileIcon"+g.t+'></div><a style=cursor:pointer onclick=p5folderset("'+encodeURIComponent(g.nx)+'")>'+f+"</a></span></div>"}else{var x=f,b="";m&&(b=" (<a style=cursor:pointer onclick='p5showPublicLink(\""+e+"/"+g.nx+"\")'>Link</a>)"),0<g.s&&(x='<a rel="noreferrer noopener" target="_blank" href="downloadfile.ashx?link='+encodeURIComponent(filetreelinkpath+"/"+g.nx)+'">'+f+"</a>"+b),y="<div class=filelist file=3><input file=3 style=float:left name=fc class=fcb type=checkbox onchange=p5setActions() value='"+g.nx+"'>&nbsp;<span style=float:right;padding-right:4px>"+k+"</span><span><div class=fileIcon"+g.t+"></div>"+x+"</span></div>"}g.t<3?t+=y:o+=y}if(QH("p5rightOfButtons",p5getQuotabar(a)),QH("p5files",t+o),QH("p5currentpath",n),QE("p5FolderUp",0!=filetreelocation.length),QV("p5PublicShare",m),r==filetreelinkpath){p=document.getElementsByName("fc");for(c=0;c<p.length;c++)p[c].checked=0<=d.indexOf(p[c].value)}p5setActions()}}function getNiceSize(e){return e<=0?"Storage exceed":e<2048?format("{0}b left",e):e<2097152?format("{0}k left",Math.round(e/1024)):e<2147483648?format("{0}m left",Math.round(e/1024/1024)):format("{0}g left",Math.round(e/1024/1024/1024))}function p5getQuotabar(e){for(;1<e.t&&4!=e.t;)e=e.parent;return 1!=e.t&&4!=e.t||null==e.maxbytes?"":getNiceSize(e.maxbytes-e.s)+" <progress style=height:10px;width:100px value="+e.s+" max="+e.maxbytes+" />"}function p5showPublicLink(e){setDialogMode(2,"Public Link",1,null,'<input type=text style=width:100% value="'+e+'" readonly />')}function p5sort_filename(e,t){return e.ln>t.ln?1*sortorder:e.ln<t.ln?-1*sortorder:0}function p5sort_timestamp(e,t){return e.d>t.d?1*sortorder:e.d<t.d?-1*sortorder:0}function p5sort_bysize(e,t){return e.s==t.s?p5sort_filename(e,t):(e.s-t.s)*sortorder}function p5sort_files(e){var t=[],o=Q("p5sortdropdown").value;for(var n in e)e[n].nx=n,null==e[n].n&&(e[n].n=n),e[n].ln=e[n].n.toLowerCase(),t.push(e[n]);return sortorder=1,3<o&&(sortorder=-1,o-=3),1==o?t.sort(p5sort_filename):2==o?t.sort(p5sort_bysize):3==o&&t.sort(p5sort_timestamp),t}function p5setActions(){var e=getFileSelCount(),t=getFileCount(),o=getFileSelCount(!1);QE("p5DeleteFileButton",0<e&&0<filetreelocation.length),QE("p5NewFolderButton",0<filetreelocation.length),QE("p5UploadButton",0<filetreelocation.length),QE("p5RenameFileButton",1==e&&0<filetreelocation.length),QE("p5SelectAllButton",0<t),Q("p5SelectAllButton").value=0<e?"None":"Tout",QE("p5CutButton",0<o&&e==o),QE("p5CopyButton",0<o&&e==o),QE("p5PasteButton",null!=p5clipboard&&0<p5clipboard.length&&0<filetreelocation.length)}function getFileSelCount(e){for(var t=0,o=document.getElementsByName("fc"),n=0;n<o.length;n++)!o[n].checked||0==e&&"3"!=o[n].attributes.file.value||t++;return t}function getFileSelDirCount(){for(var e=0,t=document.getElementsByName("fc"),o=0;o<t.length;o++)t[o].checked&&"999"==t[o].attributes.file.value&&e++;return e}function getFileCount(){return document.getElementsByName("fc").length}function p5selectallfile(){for(var e=0==getFileSelCount(),t=document.getElementsByName("fc"),o=0;o<t.length;o++)t[o].checked=e;p5setActions()}function setupBackPointers(e){if(null!=e.f){var t=0,o=0;for(var n in e.f)setupBackPointers(e.f[n]),(e.f[n].parent=e).f[n].s&&(t+=e.f[n].s),e.f[n].c&&(o+=e.f[n].c),3==e.f[n].t&&o++;e.s=t,e.c=o}return e}function getFileSizeStr(e){return 1==e?"1 octet":format("{0} octets",e)}function p5folderup(e){if(null==e)filetreelocation.pop();else for(;filetreelocation.length>e;)filetreelocation.pop();return updateFiles(),!1}function p5folderset(e){return filetreelocation.push(decodeURIComponent(e)),updateFiles(),!1}function p5createfolder(){setDialogMode(2,"Nouveau Dossier",3,p5createfolderEx,"<input type=text id=p5renameinput maxlength=64 onkeyup=p5fileNameCheck(event) style=width:100% />"),focusTextBox("p5renameinput"),p5fileNameCheck()}function p5createfolderEx(){meshserver.send({action:"fileoperation",fileop:"createfolder",path:filetreelocation,newfolder:Q("p5renameinput").value})}function p5deletefile(){var e=getFileSelCount(),t=0<getFileSelDirCount()?"<br /><br /><label><input type=checkbox id=p5recdeleteinput>Recursive delete</label><br>":"<input type=checkbox id=p5recdeleteinput style='display:none'>";setDialogMode(2,"Delete",3,p5deletefileEx,1<e?format("Delete {0} selected items?",e)+t:"Delete selected item?"+t)}function p5deletefileEx(){for(var e=[],t=document.getElementsByName("fc"),o=0;o<t.length;o++)t[o].checked&&e.push(t[o].value);meshserver.send({action:"fileoperation",fileop:"delete",path:filetreelocation,delfiles:e,rec:Q("p5recdeleteinput").checked})}function p5renamefile(){for(var e,t=document.getElementsByName("fc"),o=0;o<t.length;o++)t[o].checked&&(e=t[o].value);setDialogMode(2,"Renommer",3,p5renamefileEx,'<input type=text id=p5renameinput maxlength=64 onkeyup=p5fileNameCheck(event) style=width:100% value="'+e+'" />',{action:"fileoperation",fileop:"rename",path:filetreelocation,oldname:e}),focusTextBox("p5renameinput"),p5fileNameCheck()}function p5renamefileEx(e,t){t.newname=Q("p5renameinput").value,meshserver.send(t)}function p5fileNameCheck(e){var t=isFilenameValid(Q("p5renameinput").value);QE("idx_dlgOkButton",t),1==t&&e&&13==e.keyCode&&dialogclose(1)}var isFilenameValid=function(){var t=/^[^\\/:\*\?"<>\|]+$/,o=/^\./,n=/^(nul|prn|con|lpt[0-9]|com[0-9])(\.|$)/i;return function(e){return t.test(e)&&!o.test(e)&&!n.test(e)&&"."!=e[0]}}();function p5uploadFile(){setDialogMode(2,"Upload File",3,p5uploadFileEx,'<form method=post enctype=multipart/form-data action=uploadfile.ashx target=fileUploadFrame><input type=text name=link style=display:none id=p5uploadpath value="'+encodeURIComponent(filetreelinkpath)+'" /><input type=file name=files id=p5uploadinput style=width:100% multiple=multiple onchange="updateUploadDialogOk(\'p5uploadinput\')" /><input type=hidden name=authCookie value='+authCookie+" /><input type=submit id=p5loginSubmit style=display:none /></form>"),updateUploadDialogOk("p5uploadinput")}function p5uploadFileEx(){Q("p5loginSubmit").click()}function updateUploadDialogOk(e){QE("idx_dlgOkButton",""!=Q(e).value)}var p5clipboard=null,p5clipboardFolder=null,p5clipboardCut=0;function p5copyFile(e){var t=document.getElementsByName("fc");p5clipboard=[],p5clipboardCut=e,p5clipboardFolder=Clone(filetreelocation);for(var o=0;o<t.length;o++)t[o].checked&&"3"==t[o].attributes.file.value&&p5clipboard.push(t[o].value);p5updateClipview()}function p5pasteFile(){var e="";null!=p5clipboard&&0<p5clipboard.length&&(e=format("Confim {0} of {1} entrie{2} to this location?",0==p5clipboardCut?"copy":"move",p5clipboard.length,1<p5clipboard.length?"s":"")),setDialogMode(2,"Paste",3,p5pasteFileEx,e)}function p5pasteFileEx(){meshserver.send({action:"fileoperation",fileop:0==p5clipboardCut?"copy":"move",scpath:p5clipboardFolder,path:filetreelocation,names:p5clipboard}),p5folderup(999),1==p5clipboardCut&&(p5clipboardFolder=p5clipboard=null,p5clipboardCut=0,p5updateClipview())}function p5updateClipview(){var e="";null!=p5clipboard&&0<p5clipboard.length&&(e=format("Holding {0} entrie{1} for {2}",p5clipboard.length,1<p5clipboard.length?"s":"",0==p5clipboardCut?"copy":"move")+', <a href=# onclick="return p5clearClip()" style=cursor:pointer>Clear</a>.'),QH("p5bottomstatus",e),p5setActions()}function p5clearClip(){return p5clipboardFolder=p5clipboard=null,p5clipboardCut=0,p5updateClipview(),!1}function p5fileDragDrop(e){if(haltEvent(e),QV("bigfail",!1),QV("bigok",!1),null!=e.dataTransfer&&0!=e.dataTransfer.files.length&&0!=filetreelocation.length)for(var t=[],o=[],n=[],i=[],a=e.dataTransfer.files.length,s=0;s<e.dataTransfer.files.length;s++){var l=new FileReader,r=e.dataTransfer.files[s];t.push(r.name),o.push(r.size),n.push(r.type),l.onload=function(e){i.push(e.target.result),0==--a&&(Q("p5fileDragName").value=t.join("*"),Q("p5fileDragSize").value=o.join("*"),Q("p5fileDragType").value=n.join("*"),Q("p5fileDragData").value=i.join("*"),Q("p5fileDragLink").value=encodeURIComponent(filetreelinkpath),Q("p5loginSubmit2").click())},l.readAsDataURL(r)}}var p5dragtimer=null;function p5fileDragOver(e){haltEvent(e),null!=p5dragtimer&&(clearTimeout(p5dragtimer),p5dragtimer=null);var t=!0;0==filetreelocation.length&&(t=!1),QV("bigok",t),QV("bigfail",!t)}function p5fileDragLeave(e){haltEvent(e),"p5filetable"!=e.target.id?(QV("bigfail",!1),QV("bigok",!1)):p5dragtimer=setTimeout("QV('bigfail',false);QV('bigok',false);p5dragtimer=null;",200)}function ondeskkeypress(e){if(toggleSoftKeys(0),Q("DeskSoftInput").value="",setSessionActivity(),desktop&&!xxdialogMode&&10==xxcurrentView){if(null!=currentNode){var t=meshes[currentNode.meshid].links[userinfo._id].rights;if(0==(4294967295==t||0!=(8&t)&&0==(256&t)))return!1;if(1==(4294967295!=t&&0!=(8&t)&&0==(256&t)&&0!=(4096&t))&&(1==e.altKey||1==e.ctrlKey||e.keyCode<32&&8!=e.keyCode&&13!=e.keyCode||90<e.keyCode))return!1}return desktop.m.handleKeys(e)}}function ondeskkeydown(e){if(toggleSoftKeys(0),Q("DeskSoftInput").value="",setSessionActivity(),desktop&&!xxdialogMode&&10==xxcurrentView){if(null!=currentNode){var t=meshes[currentNode.meshid].links[userinfo._id].rights;if(0==(4294967295==t||0!=(8&t)&&0==(256&t)))return!1;if(1==(4294967295!=t&&0!=(8&t)&&0==(256&t)&&0!=(4096&t))&&(1==e.altKey||1==e.ctrlKey||e.keyCode<32&&8!=e.keyCode&&13!=e.keyCode||90<e.keyCode))return!1}return desktop.m.handleKeyDown(e)}}function ondeskkeyup(e){if(toggleSoftKeys(0),Q("DeskSoftInput").value="",setSessionActivity(),desktop&&!xxdialogMode&&10==xxcurrentView){if(null!=currentNode){var t=meshes[currentNode.meshid].links[userinfo._id].rights;if(0==(4294967295==t||0!=(8&t)&&0==(256&t)))return!1;if(1==(4294967295!=t&&0!=(8&t)&&0==(256&t)&&0!=(4096&t))&&(1==e.altKey||1==e.ctrlKey||e.keyCode<32&&8!=e.keyCode&&13!=e.keyCode||90<e.keyCode))return!1}return desktop.m.handleKeyUp(e)}}var updateDevicesTimer=null;function updateDevices(){null==updateDevicesTimer&&(updateDevicesTimer=setTimeout(updateDevicesEx,200))}var deviceHeaderCount,sort=0,deviceHeaderId=0,deviceHeaders={},showRealNames=!1,deviceHeaderTotal=0,deviceHeadersTitles=(deviceHeaders={},{});function updateDevicesEx(){null!=updateDevicesTimer&&(clearTimeout(updateDevicesTimer),updateDevicesTimer=null);var e="",t=0,o=null,n=0,i={};for(var a in deviceHeaderCount={},deviceHeaders={},deviceHeadersTitles={},(deviceHeaderTotal=deviceHeaderId=0)==sort?nodes.sort(meshSort):1==sort?nodes.sort(powerSort):2==sort&&(1==showRealNames?nodes.sort(deviceHostSort):nodes.sort(deviceSort)),nodes)if(0!=nodes[a].v){var s=meshes[nodes[a].meshid].links[userinfo._id];if(null!=s){s.rights;if(0==sort){if(nodes.sort(meshSort),nodes[a].meshid!=o){deviceHeaderSet();var l="";1==meshes[nodes[a].meshid].mtype&&(l="<span style=color:lightgray>, Intel&reg; AMT only</span>"),null!=o&&(2==t&&(e+="<td><div style=width:301px></div></td>"),""!=e&&(e+="</tr></table>")),e+="<div class=DevSt style=padding-top:4px><span style=float:right>",e+='</span><span id=MxMESH style=cursor:pointer onclick=goForward("'+nodes[a].meshid+'")>'+EscapeHtml(meshes[nodes[a].meshid].name)+"</span>"+l+"<span id=DevxHeader"+deviceHeaderId+" style=color:lightgray></span></div>",i[o=nodes[a].meshid]=1,t=0}}else 1==sort?nodes[a].pwr!==o&&(deviceHeaderSet(),null!==o&&(2==t&&(e+="<td><div style=width:301px></div></td>"),""!=e&&(e+="</tr></table>")),e+="<div class=DevSt style=width:100%;padding-top:4px><span>"+PowerStateStr2(nodes[a].pwr)+"</span><span id=DevxHeader"+deviceHeaderId+" style=color:lightgray></span></div>",o=nodes[a].pwr,t=0):2==sort&&null==o&&(o="1");n++;var r=EscapeHtml(nodes[a].name);0==r.length&&(r="<i>None</i>"),null!=nodes[a].rname&&0<nodes[a].rname.length&&(r+=" / "+EscapeHtml(nodes[a].rname));var d=EscapeHtml(nodes[a].name);1==showRealNames&&null!=nodes[a].rname&&(d=EscapeHtml(nodes[a].rname)),0==d.length&&(d="<i>None</i>");var p=nodes[a].icon,c=NodeStateStr(nodes[a]);nodes[a].conn&&0!=nodes[a].conn||(p+=" gray"),e+="<div style=cursor:pointer onclick=goForward('"+nodes[a]._id+"')>",e+='<div class="i'+p+'" style="float:left;margin-left:4px"></div>',e+='<div style="width:auto;height:40px;background-color:lightgray;margin-top:5px;margin-bottom:5px;margin-left:60px;padding-top:5px;padding-bottom:5px;border-radius:8px 0px 0px 8px">',e+="<div><div style=padding-left:12px;padding-top:2px><b>"+d+"</b></div><div style=padding-left:12px;padding-top:3px;color:gray>"+c+"</div></div>",e+="</div></div>",deviceHeaderTotal++,void 0===deviceHeaderCount[nodes[a].state]?deviceHeaderCount[nodes[a].state]=1:deviceHeaderCount[nodes[a].state]++}}if(0==sort)for(var a in meshes){var u=meshes[a],m=u.links[userinfo._id];if(null!=m){m.rights;null==i[u._id]&&(""!=o&&""!=e&&(e+="</tr></table>"),e+="<div><div colspan=3 class=DevSt><span style=float:right>",e+='</span><span id=MxMESH style=cursor:pointer onclick=goForward("'+u._id+'")>'+EscapeHtml(u.name)+"</span></div>",1==u.mtype&&(e+="<div style=padding:10px><i>No Intel&reg; AMT devices in this group"),2==u.mtype&&(e+="<div style=padding:10px><i>Aucun appareil dans ce groupe"),e+=".</i></div></div>",o=u._id,n++)}}for(var a in 0==n?QH("xdevices",'<div style="margin-top:50px;text-align:center"><span style="font-size:30px">Aucun appareil</span><br /><br />Use the desktop version of this website to add devices.</div>'):QH("xdevices",e),deviceHeaderSet(),deviceHeaders)QH(a,deviceHeaders[a]);for(var a in deviceHeadersTitles)Q(a).title=deviceHeadersTitles[a]}var powerStatetable=["","Alimenté","Dormir","Dormir","Dormir","Hibernating","Éteindre","Présent"],powerStateStrings=["","Alimenté","Sleeping","Sleeping","Deep Sleep","Hibernating","Soft-Off","Présent"],powerStateStrings2=["","Device is powered","Device is in sleep state (S1)","Device is in sleep state (S2)","Device is in deep sleep state (S3)","Device is hibernating (S4)","Device is in soft-off state (S5)","Device is present, but power state cannot be determined"],powerColorTable=["#00000000","black","blue","blue","lightblue","blueviolet","darkgreen","lightseagreen","lightseagreen"];function NodeStateStr(e){var t=[];return 0<e.state&&e.state<powerStatetable.length&&state.push(powerStatetable[e.state]),e.conn&&(0!=(1&e.conn)&&t.push("<span>Agent</span>"),0!=(2&e.conn)?t.push("<span>CIRA</span>"):0!=(4&e.conn)&&t.push("<span>Intel&reg; AMT</span>"),0!=(8&e.conn)&&t.push("<span>Relay</span>"),0!=(16&e.conn)&&t.push("<span>MQTT</span>")),null!=e.pwr&&0!=e.pwr&&t.push(powerStateStrings[e.pwr]),t.join(", ")}function PowerStateStr(e){return e<powerStatetable.length?powerStatetable[e]:""}function PowerStateStr2(e){return 0!=e&&e<powerStatetable.length?powerStatetable[e]:"Inconnue"}function onSortSelectChange(e){sort=document.getElementById("sortselect").selectedIndex,e||putstore("sort",sort),updateDevicesEx()}function deviceHeaderSet(){if(0!=deviceHeaderId){deviceHeaders["DevxHeader"+deviceHeaderId]=", "+deviceHeaderTotal+(1==deviceHeaderTotal?"nœud":"noeuds");var e="";for(var t in deviceHeaderCount)0<e.length&&(e+=", "),e+=deviceHeaderCount[t]+" "+PowerStateStr2(t);deviceHeadersTitles["DevxHeader"+deviceHeaderId]=e,deviceHeaderId++,deviceHeaderCount={},deviceHeaderTotal=0}else deviceHeaderId=1}function meshSort(e,t){return e.meshnamel>t.meshnamel?1:e.meshnamel<t.meshnamel?-1:e.meshid==t.meshid?1==showRealNames?e.rnamel>t.rnamel?1:e.rnamel<t.rnamel?-1:0:e.namel>t.namel?1:e.namel<t.namel?-1:0:0}function powerSort(e,t){var o=e.pwr?e.pwr:0,n=t.pwr?t.pwr:0;return o==n?1==showRealNames?e.rnamel>t.rnamel?1:e.rnamel<t.rnamel?-1:0:e.namel>t.namel?1:e.namel<t.namel?-1:0:n<o?1:o<n?-1:0}function deviceSort(e,t){return e.namel>t.namel?1:e.namel<t.namel?-1:0}function deviceHostSort(e,t){return e.rnamel>t.rnamel?1:e.rnamel<t.rnamel?-1:0}function refreshDevice(e){currentNode&&currentNode._id==e&&gotoDevice(e,xxcurrentView,!0)}function getNodeRights(e){var t=getNodeFromId(e);return meshes[t.meshid].links[userinfo._id].rights}var currentNode,currentDevicePanel=0,powerTimelineNode=null,powerTimelineReq=null,powerTimelineUpdate=null,powerTimeline=null;function getCurrentNode(){return currentNode}function gotoDevice(e,t,o){if(!0===userinfo.emailVerified||1!=serverinfo.emailcheck||4294967295==userinfo.siteadmin)if(!(262144&features)||1==userinfo.otpsecret||0<userinfo.otphkeys||0<userinfo.otpkeys){var n=getNodeFromId(e);if(null!=n){var i=meshes[n.meshid];if(null!=i){var a=i.links[userinfo._id].rights;if(!currentNode||currentNode._id!=n._id||1==o){currentNode=n;var s=EscapeHtml(n.name);0==s.length&&(s="<i>None</i>"),0!=(4&a)&&(s="<span onclick=showEditNodeValueDialog(0) style=cursor:pointer>"+s+"</span>"),QH("p10deviceName",s);var l="<table style=width:100%>";l+=addDeviceAttribute("<span>Groupe</span>",'<a onclick=goForward("'+n.meshid+'") style=cursor:pointer>'+EscapeHtml(meshes[n.meshid].name)+"</a>"),null!=n.rname&&(l+=addDeviceAttribute("<span>Nom</span>","<span>"+EscapeHtml(n.rname)+"</span>")),1!=i.mtype&&n.name==n.host||(0!=(4&a)?n.host?l+=addDeviceAttribute("Hostname","<span onclick=showEditNodeValueDialog(1) style=cursor:pointer>"+EscapeHtml(n.host)+"</span>"):l+=addDeviceAttribute("Hostname","<span onclick=showEditNodeValueDialog(1) style=cursor:pointer><i>None</i></span>"):l+=addDeviceAttribute("Hostname",EscapeHtml(n.host)));var r=n.desc?EscapeHtml(n.desc):"<i>None</i>";l+=addDeviceAttribute("Description",0!=(4&a)?"<span onclick=showEditNodeValueDialog(2) style=cursor:pointer>"+r+"</span>":r);var d=["Inconnue","Windows 32bit console","Windows 64bit console","Windows 32bit service","Windows 64bit service","Linux 32bit","Linux 64bit","MIPS","XENx86","Android ARM","Linux ARM","MacOS 32bit","Android x86","PogoPlug ARM","Android APK","Linux Poky x86-32bit","MacOS 64bit","ChromeOS","Linux Poky x86-64bit","Linux NoKVM x86-32bit","Linux NoKVM x86-64bit","Windows MinCore console","Windows MinCore service","NodeJS","ARM-Linaro","ARMv6l / ARMv7l","ARMv8 64bit","ARMv6l / ARMv7l / NoKVM","Inconnue","Inconnue","FreeBSD x86-64"];if(null!=n.agent&&null!=n.agent.id&&null!=n.agent.ver){var p="";p=n.agent.id<=d.length?d[n.agent.id]:d[0],0!=n.agent.ver&&(p+=" v"+n.agent.ver),l+=addDeviceAttribute("Agent",p)}if(null!=n.intelamt){p="";var c={0:nobreak("Not Activated (Pre)"),1:nobreak("Not Activated (In)"),2:nobreak("Activé")};null!=n.intelamt.ver&&null==n.intelamt.state?p+="<i>"+nobreak("Etat inconnu")+"</i>, v"+n.intelamt.ver:null==n.intelamt.ver&&2==n.intelamt.state?p+="<i>Activé</i>":null==n.intelamt.ver||null==n.intelamt.state?p+="<i>Version et état inconnus</i>":(p+=c[n.intelamt.state],n.intelamt.flags&&(2&n.intelamt.flags?p=" <span>CCM</span>":4&n.intelamt.flags&&(p=" <span>ACM</span>")),p+=", v"+n.intelamt.ver),1==n.intelamt.tls&&(p+=", <span>TLS</span>"),2==n.intelamt.state&&(null!=n.intelamt.user&&""!=n.intelamt.user||(p+=0!=(4&a)?', <i style=color:#FF0000;cursor:pointer onclick=editDeviceAmtSettings("'+n._id+'")>'+nobreak("No Credentials")+"</i>":", <i style=color:#FF0000>No Credentials</i>"),p+=" ",0!=(4&a)&&(p+='<img src=images/link4.png height=10 width=10 style=cursor:pointer onclick=editDeviceAmtSettings("'+n._id+'")>'));var u="Intel&reg; ME";"number"==typeof n.intelamt.sku&&(0!=(8&n.intelamt.sku)?u="Intel&reg; AMT":0!=(16&n.intelamt.sku)&&(u="Intel&reg; SM")),l+=addDeviceAttribute(u,p)}if(null!=n.agent&&null!=n.agent.tag&&"mailto:"!=n.agent.tag){var m=EscapeHtml(n.agent.tag);m.startsWith("mailto:")&&(m='<a href="'+m+'">'+m.substring(7)+"</a>"),l+=addDeviceAttribute("Agent Tag",m)}var h=n.conn;if(h&&1<h){var f=[];0!=(1&n.conn)&&f.push("<span>Agent</span>"),0!=(2&n.conn)?f.push("<span>Intel&reg; AMT CIRA</span>"):0!=(4&n.conn)&&f.push("<span>Intel&reg; AMT</span>"),0!=(8&n.conn)&&f.push("<span>Agent Relay</span>"),0!=(16&n.conn)&&f.push("<span>MQTT</span>"),l+=addDeviceAttribute("Connectivity",f.join(", "))}var g="<i>None</i>";if(null!=n.tags)for(var v in g="",n.tags)g+='<span style="background-color:lightgray;padding:3px;margin-right:4px;border-radius:5px">'+n.tags[v]+"</span>";l+=addDeviceAttribute("Tags",0!=(4&a)?"<span onclick=showEditNodeValueDialog(3) style=cursor:pointer>"+g+"</span>":g),l+="</table><br />",0!=(76&a)&&(l+="<input type=button value=Actions onclick=deviceActionFunction() />"),QH("p10html",l),setupFiles(),l="<div style=float:right;font-size:x-small;margin-right:10px>",0!=(4&a)&&(l+='<a style=cursor:pointer onclick=p10showDeleteNodeDialog("'+n._id+'")>Delete Device</a>'),l+="</div><div style=font-size:x-small>",l+="</div><br>",QH("p10html3",l);var k=PowerStateStr(n.state);0!=(1&h)&&(0<k.length&&(k+=", "),k+="<span style=font-size:10px>Mesh Agent</span>"),0!=(2&h)?(0<k.length&&(k+=", "),k+="<span style=font-size:10px>Intel&reg; AMT connected</span>"):0!=(4&h)&&(0<k.length&&(k+=", "),k+="<span style=font-size:10px>Intel&reg; AMT detected</span>"),0!=(16&h)&&(0<k.length&&(k+="<br/>"),k+="<span style=font-size:12px>MQTT channel connected</span>"),QH("MainComputerState",k),QH("MainComputerImage",'<div class="i'+n.icon+'"></div>'),powerTimelineNode!=currentNode._id&&powerTimelineReq!=currentNode._id&&(QH("p10html2",""),powerTimelineReq=currentNode._id,meshserver.send({action:"powertimeline",nodeid:currentNode._id}))}setupDesktop(),go(t=t||10),setupDeviceMenu()}else goBack()}else goBack()}else setDialogMode(2,"Account Security",1,null,'Unable to access a device until two-factor authentication is enabled. This is required for extra security. Go to the "My Account" and look at the "Account Security" section.');else setDialogMode(2,"Account Security",1,null,'Unable to access a device until a email address is verified. This is required for password recovery. Go to the "My Account" to change and verify an email address.')}function deviceToastFunction(){xxdialogMode||setDialogMode(2,"Device Toast",3,deviceToastFunctionEx,"<textarea id=d2devToast style=width:100%;height:80px;resize:none;overflow-y:scroll></textarea>")}function deviceToastFunctionEx(){meshserver.send({action:"toast",nodeids:[currentNode._id],title:"MeshCentral",msg:Q("d2devToast").value})}function setupDeviceMenu(e,t){var o=0;currentNode&&(o=meshes[currentNode.meshid].links[userinfo._id].rights),null!=e&&(currentDevicePanel=e),QV("p10general",0==currentDevicePanel),QV("p10desktop",1==currentDevicePanel),QV("p10files",2==currentDevicePanel);var n=[];0!=currentDevicePanel&&n.push({n:"General",f:"setupDeviceMenu(0)"}),1!=currentDevicePanel&&null!=currentNode&&(8&o||256&o)&&(1==meshes[currentNode.meshid].mtype&&("number"!=typeof currentNode.intelamt.sku||0!=(8&currentNode.intelamt.sku))||currentNode.agent&&1&currentNode.agent.caps)&&n.push({n:"Desktop",f:"setupDeviceMenu(1)"}),2!=currentDevicePanel&&null!=currentNode&&8&o&&(4294967295==o||0==(1024&o))&&2==currentNode.mtype&&4&currentNode.agent.caps&&n.push({n:"Files",f:"setupDeviceMenu(2)"}),updateFooterMenu(n)}function deviceActionFunction(){if(!xxdialogMode){var e=meshes[currentNode.meshid].links[userinfo._id].rights,t="Select an operation to perform on this device.<br /><br />",o="<select id=d2deviceop style=float:right;width:170px>";0!=(64&e)&&(o+="<option value=100>Wake-up</option>"),0!=(8&e)&&(o+="<option value=4>Dormir</option><option value=3>Réinitialiser</option><option value=2>Éteindre</option>"),setDialogMode(2,"Device Action",3,deviceActionFunctionEx,t+=addHtmlValue("Opération",o+="</select>"))}}function deviceActionFunctionEx(){var e=Q("d2deviceop").value;100==e?meshserver.send({action:"wakedevices",nodeids:[currentNode._id]}):meshserver.send({action:"poweraction",nodeids:[currentNode._id],actiontype:e})}function updateDeviceTimeline(){2==meshserver.State&&null!=powerTimelineNode&&null!=powerTimelineUpdate&&null!=currentNode&&powerTimelineNode==powerTimelineReq&&currentNode._id==powerTimelineNode&&powerTimelineUpdate<Date.now()&&(powerTimelineUpdate=null,meshserver.send({action:"powertimeline",nodeid:currentNode._id}))}function drawDeviceTimeline(){var e=null,t=Date.now();currentNode._id==powerTimelineNode&&(e=powerTimeline);var o=new Date;o.setHours(0,0,0,0);(o=new Date(o.getTime()-5184e5)).getTime();var n=[];if(null!=e&&1<e.length){n.push([0,e[1],e[0]]);for(var i=e[1],a=2;a<e.length;a+=2){var s=e[a],l=t;e.length>a+1&&(l=e[a+1]),n.push([i,i+l,s]),i+=l}}var r="",d=1,p=new Date,c=Q("masthead").offsetWidth-122;p.setHours(0,0,0,0);for(a=0;a<7;a++){var u="",m=p.getTime(),h=m+864e5;for(var f in n){var g=n[f];if(1==isTimeBlockInside(m,h,g[0],g[1])){var v=Math.max(m,g[0]),k=Math.min(Math.min(h,g[1]),t),y=Math.round((k-v)*c/864e5);0<y&&(u+="<div style=display:table-cell;width:"+y+"px;background-color:"+powerColor(g[2])+";height:16px></div>")}}r+="<tr style="+(d%2==0?"background-color:#DDD":"")+"><td><div>&nbsp;"+printDate(p)+"<div></div></div></td><td><div>"+u+"</div></td></tr>",++d,p=new Date(p.getTime()-864e5)}QH("p10html2",'<table style="color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse;width:calc(100% - 18px);margin:9px" border=0 cellpadding=2 cellspacing=0><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:center;width:90px>Day</th><th scope=col style=text-align:center>Power State</th></tr>'+r+"</tbody></table>")}function powerColor(e){return e<powerColorTable.length?powerColorTable[e]:"yellow"}function isTimeBlockInside(e,t,o,n){return o<e&&t<n||(e<o&&o<t||e<n&&n<t)}function addDeviceAttribute(e,t){return"<tr><td style=width:100px;color:gray>"+e+"</td><td style=overflow:hidden>"+t+"</td></tr>"}function editDeviceAmtSettings(e,t){if(!xxdialogMode){var o="",n=getNodeFromId(e),i=3;0!=(4&getNodeRights(e))&&(o+=addHtmlValue("Nom d'utilisateur",'<input id=dp10username style=width:170px maxlength=32 autocomplete=nope placeholder="admin" onchange=validateDeviceAmtSettings() onkeyup=validateDeviceAmtSettings() />'),o+=addHtmlValue("Mot de passe","<input id=dp10password type=password style=width:170px autocomplete=nope maxlength=32 onchange=validateDeviceAmtSettings() onkeyup=validateDeviceAmtSettings() />"),o+=addHtmlValue("Sécurité","<select id=dp10tls style=width:176px><option value=0>No TLS security</option><option value=1>Sécurité TLS requise</option></select>"),null!=n.intelamt.user&&""!=n.intelamt.user&&(i=7),setDialogMode(2,"Edit Intel&reg; AMT credentials",i,editDeviceAmtSettingsEx,o,{node:n,func:t}),null!=n.intelamt.user&&""!=n.intelamt.user?Q("dp10username").value=n.intelamt.user:Q("dp10username").value="admin",Q("dp10tls").value=n.intelamt.tls,validateDeviceAmtSettings())}}function validateDeviceAmtSettings(){QE("idx_dlgOkButton",passwordcheck(Q("dp10password").value))}function editDeviceAmtSettingsEx(e,t){if(2==e)meshserver.send({action:"changedevice",nodeid:t.node._id,intelamt:{user:"",pass:""}});else{var o=Q("dp10username").value;""==o&&(o="admin");var n=Q("dp10password").value;""==n&&(o=""),meshserver.send({action:"changedevice",nodeid:t.node._id,intelamt:{user:o,pass:n,tls:Q("dp10tls").value}}),t.node.intelamt.user=o,t.node.intelamt.tls=Q("dp10tls").value,t.func&&setTimeout(t.func,300)}}function p10showDeleteNodeDialog(e){xxdialogMode||(setDialogMode(2,"Delete Node",3,p10showDeleteNodeDialogEx,format("Delete {0}?",EscapeHtml(currentNode.name))+"<br /><br /><input id=p10check type=checkbox onchange=p10validateDeleteNodeDialog() />Confirm",e),p10validateDeleteNodeDialog())}function p10validateDeleteNodeDialog(){QE("idx_dlgOkButton",Q("p10check").checked)}function p10showDeleteNodeDialogEx(e,t){meshserver.send({action:"removedevices",nodeids:[t]})}function p10showiconselector(){if(!xxdialogMode&&0!=(4&meshes[currentNode.meshid].links[userinfo._id].rights)){"<div style=display:inline-block class=i1 onclick=p10setIcon(1)></div>","<div style=display:inline-block class=i2 onclick=p10setIcon(2)></div>","<div style=display:inline-block class=i3 onclick=p10setIcon(3)></div><br>","<div style=display:inline-block class=i4 onclick=p10setIcon(4)></div>","<div style=display:inline-block class=i5 onclick=p10setIcon(5)></div>","<div style=display:inline-block class=i6 onclick=p10setIcon(6)></div></table>",setDialogMode(2,"Icon Selection",0,null,"<table align=center><td><div style=display:inline-block class=i1 onclick=p10setIcon(1)></div><div style=display:inline-block class=i2 onclick=p10setIcon(2)></div><div style=display:inline-block class=i3 onclick=p10setIcon(3)></div><br><div style=display:inline-block class=i4 onclick=p10setIcon(4)></div><div style=display:inline-block class=i5 onclick=p10setIcon(5)></div><div style=display:inline-block class=i6 onclick=p10setIcon(6)></div></table>"),QV("id_dialogclose",!0)}}function p10setIcon(e){setDialogMode(0),meshserver.send({action:"changedevice",nodeid:currentNode._id,icon:e})}var desktop,desktopNode,showEditNodeValueDialog_modes=["Device Name","Hostname","Description","Tags"],showEditNodeValueDialog_modes2=["name","host","desc","tags"],showEditNodeValueDialog_modes3=["","","","Group1, Group2, Group3"];function showEditNodeValueDialog(e){if(!xxdialogMode){setDialogMode(2,"Edit Device",3,showEditNodeValueDialogEx,addHtmlValue(showEditNodeValueDialog_modes[e],'<input id=dp10devicevalue style=width:170px maxlength=64 placeholder="'+showEditNodeValueDialog_modes3[e]+'" onchange=p10editdevicevalueValidate('+e+",event) onkeyup=p10editdevicevalueValidate("+e+",event) />"),e);var t=currentNode[showEditNodeValueDialog_modes2[e]];null==t&&(t=""),Array.isArray(t)&&(t=t.join(", ")),Q("dp10devicevalue").value=t,p10editdevicevalueValidate(),Q("dp10devicevalue").focus()}}function showEditNodeValueDialogEx(e,t){var o={action:"changedevice",nodeid:currentNode._id};o[showEditNodeValueDialog_modes2[t]]=Q("dp10devicevalue").value,meshserver.send(o)}function p10editdevicevalueValidate(e,t){var o=1<e||0<Q("dp10devicevalue").value.length;QE("idx_dlgOkButton",o),null!=t&&1==o&&13==t.keyCode&&dialogclose(1)}var desktopsettings={encoding:2,showfocus:!1,showmouse:!0,showcad:!0,quality:40,scaling:1024,framerate:50};function setupDesktop(){desktopNode!=currentNode&&null!=desktop&&(desktop.Stop(),desktop=desktopNode=null),desktopNode==currentNode&&null!=desktop||(QH("DeskParent",'<canvas id=Desk width=640 height=200 style="width:100%;-ms-touch-action:none;margin-left:0px" oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event)></canvas>'),desktopNode=currentNode,Q("Desk").addEventListener("DOMMouseScroll",function(e){return dmousewheel(e)}),Q("Desk").addEventListener("mousewheel",function(e){return dmousewheel(e)})),desktopNode=currentNode,updateDesktopButtons(),Q("Desk").toBlob||QV("deskSaveBtn",!1)}function updateDesktopButtons(){var e=meshes[currentNode.meshid],t=0;null!=desktop&&(t=desktop.State);var o=e.links[userinfo._id].rights;QV("disconnectbutton1",0!=t),QV("connectbutton1",0==t&&2==e.mtype&&(8&o||256&o)),QV("connectbutton1h",0==t&&8&o&&(1==e.mtype||null!=currentNode.intelamt&&2==currentNode.intelamt.state&&null!=currentNode.intelamt.ver&&"number"==typeof currentNode.intelamt.sku&&0!=(8&currentNode.intelamt.sku))),QV("d7amtkvm",!(null==currentNode.intelamt||null==currentNode.intelamt.ver&&1!=e.mtype||0!=t&&2!=desktop.contype)),QV("d7meshkvm",2==e.mtype&&(0==t||1==desktop.contype));var n=0!=(1&currentNode.conn);QE("connectbutton1",n);var i=0!=(6&currentNode.conn);QE("connectbutton1h",i),QV("DeskToastButton",0!=(16384&o)&&currentNode.agent&&currentNode.agent.id<5&&8&o),QV("deskActionsBtn",8&o),Q("DeskControl").checked=0!=(8&o),0==n&&QV("DeskTools",!1)}function connectDesktop(e,t){if(setSessionActivity(),null==desktop)if(desktopNode=currentNode,2==t){if(null==desktopNode.intelamt.user||""==desktopNode.intelamt.user)return void editDeviceAmtSettings(desktopNode._id,connectDesktop);(desktop=CreateAmtRedirect(CreateAmtRemoteDesktop("Desk"),authCookie)).debugmode=debugmode,desktop.onStateChanged=onDesktopStateChange,desktop.m.bpp=1==desktopsettings.encoding||3==desktopsettings.encoding?1:2,desktop.m.useZRLE=desktopsettings.encoding<3,desktop.m.showmouse=desktopsettings.showmouse,desktop.m.onScreenSizeChange=deskAdjust,desktop.Start(desktopNode._id,16994,"*","*",0),desktop.contype=2}else(desktop=CreateAgentRedirect(meshserver,CreateAgentRemoteDesktop("Desk"),serverPublicNamePort,authCookie,authRelayCookie,domainUrl)).debugmode=debugmode,desktop.m.debugmode=debugmode,desktop.attemptWebRTC=attemptWebRTC,desktop.onStateChanged=onDesktopStateChange,desktop.m.CompressionLevel=desktopsettings.quality,desktop.m.ScalingLevel=desktopsettings.scaling,desktop.m.FrameRateTimer=desktopsettings.framerate,desktop.m.onDisplayinfo=deskDisplayInfo,desktop.m.onScreenSizeChange=deskAdjust,desktop.Start(desktopNode._id),desktop.contype=1;else desktop.Stop(),desktopNode=desktop=null}function onDesktopStateChange(e,t){var o=t;3==o&&2==e.contype&&o++;var n=StatusStrs[o];switch(null!=desktop&&1==desktop.webRtcActive&&(n+=", WebRTC"),QH("deskstatus",n),t){case 0:desktop.Stop(),desktopNode=desktop=null,QV("termdisplays",!1),1==fullscreen&&deskToggleFull()}updateDesktopButtons(),deskAdjust(),setTimeout(deskAdjust,50)}function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),updateDesktopButtons(),setDialogMode(7,"Remote Desktop Settings",3,showDesktopSettingsChanged))}function showDesktopSettingsChanged(){desktopsettings.encoding=d7desktopmode.value,desktopsettings.showfocus=d7showfocus.checked,desktopsettings.showmouse=d7showcursor.checked,desktopsettings.quality=d7bitmapquality.value,desktopsettings.scaling=d7bitmapscaling.value,desktopsettings.framerate=d7framelimiter.value,localStorage.setItem("desktopsettings",JSON.stringify(desktopsettings)),applyDesktopSettings(),desktop&&(1==desktop.contype&&0!=desktop.State&&desktop.m.SendCompressionLevel(1,desktopsettings.quality,desktopsettings.scaling,desktopsettings.framerate),2==desktop.contype&&0!=desktop.State&&(desktop.Stop(),setTimeout(function(){connectDesktop(null,2)},50)))}function applyDesktopSettings(){var e="",t=512&features?[90,70,50,40,30,20,10,5,1]:[50,40,30,20,10,5,1];for(var o in t)e+="<option value="+t[o]+">"+t[o]+"%</option>";QH("d7bitmapquality",e),d7desktopmode.value=desktopsettings.encoding,d7showfocus.checked=desktopsettings.showfocus,d7showcursor.checked=desktopsettings.showmouse,d7bitmapquality.value=40,0<=t.indexOf(parseInt(desktopsettings.quality))&&(d7bitmapquality.value=desktopsettings.quality),d7bitmapscaling.value=desktopsettings.scaling,desktopsettings.framerate&&(d7framelimiter.value=desktopsettings.framerate)}var fullscreen=!1;function deskAdjust(){var e=(Q("DeskParent").clientHeight-Q("Desk").clientHeight)/2;if(e<0){var t=Q("DeskParent").clientHeight,o=9999;desktop&&(o=desktop.m.width/desktop.m.height*t),QS("Desk")["max-height"]=t+"px",QS("Desk")["max-width"]=o+"px",e=0}else QS("Desk")["max-height"]=null,QS("Desk")["max-width"]=null;QS("Desk")["margin-top"]=e+"px",QS("Desk")["margin-bottom"]=e+"px"}function deskSendKeys(){if(!xxdialogMode&&null!=desktop&&3==desktop.State){var e=Q("deskkeys").value;0==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[65364,1],[65364,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,40],[desktop.m.KeyAction.UP,40],[desktop.m.KeyAction.EXUP,91]]):1==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[65362,1],[65362,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,38],[desktop.m.KeyAction.UP,38],[desktop.m.KeyAction.EXUP,91]]):2==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[108,1],[108,0],[65511,0]]):desktop.sendCtrlMsg('{"action":"lock"}'):3==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[109,1],[109,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,77],[desktop.m.KeyAction.UP,77],[desktop.m.KeyAction.EXUP,91]]):4==e?2==desktop.contype?desktop.m.sendkey([[65505,1],[65511,1],[109,1],[109,0],[65511,0],[65505,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.DOWN,16],[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,77],[desktop.m.KeyAction.UP,77],[desktop.m.KeyAction.EXUP,91],[desktop.m.KeyAction.UP,16]]):5==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.EXUP,91]]):6==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[114,1],[114,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,82],[desktop.m.KeyAction.UP,82],[desktop.m.KeyAction.EXUP,91]]):7==e?2==desktop.contype?desktop.m.sendkey([[65513,1],[65473,1],[65473,0],[65513,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,18],[desktop.m.KeyAction.DOWN,115],[desktop.m.KeyAction.UP,115],[desktop.m.KeyAction.EXUP,18]]):8==e?2==desktop.contype?desktop.m.sendkey([[65507,1],[119,1],[119,0],[65507,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,17],[desktop.m.KeyAction.DOWN,87],[desktop.m.KeyAction.UP,87],[desktop.m.KeyAction.EXUP,17]]):9==e?2==desktop.contype?desktop.m.sendkey([[65513,1],[65289,1],[65289,0],[65513,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,18],[desktop.m.KeyAction.DOWN,9],[desktop.m.KeyAction.UP,9],[desktop.m.KeyAction.EXUP,18]]):10==e?desktop.m.sendcad():11==e&&(2==desktop.contype?desktop.m.sendkey([[65289,1],[65289,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.DOWN,9],[desktop.m.KeyAction.UP,9]]))}}function sendSpecialKeys(){xxdialogMode||null==desktop||3!=desktop.State||setDialogMode(3,"Special Keys",3,deskSendKeys)}function toggleSoftKeys(e){QV("DeskSoftInput",1==e),1==e&&Q("DeskSoftInput").focus()}function toggleDeskTools(){setSessionActivity(),xxdialogMode||("none"==QS("DeskTools").display?(QV("DeskTools",!0),Q("DeskTools").nodeid=currentNode._id,refreshDeskTools()):QV("DeskTools",!1))}function refreshDeskTools(){setSessionActivity(),QV("DeskToolsRefreshButton",!1),setTimeout(refreshDeskToolsEx,500),meshserver.send({action:"msg",type:"ps",nodeid:currentNode._id})}function refreshDeskToolsEx(){QV("DeskToolsRefreshButton",!0)}var filesNode,deskTools={sort:1,msg:null};function sortProcess(e){deskTools.sort=e,showDeskToolsProcesses(deskTools.msg)}function sortProcessPid(e,t){return e.p>t.p?1:e.p<t.p?-1:0}function sortProcessName(e,t){return e.d>t.d?1:e.d<t.d?-1:0}function showDeskToolsProcesses(e){if(null!=(deskTools.msg=e)){if(Q("DeskTools").nodeid==e.nodeid){var t=[],o=null;try{o=JSON.parse(e.value)}catch(e){}if(console.log(o),null!=o){for(var n in o)t.push({p:parseInt(n),c:o[n].cmd,d:o[n].cmd.toLowerCase(),u:o[n].user});0==deskTools.sort?t.sort(sortProcessPid):1==deskTools.sort&&t.sort(sortProcessName);var i="";for(var a in t)0!=t[a].p&&(i+="<div class=deskToolsBar><div style=width:50px;float:left;text-align:right;padding-right:5px>"+t[a].p+"</div><a style=float:right;padding-right:5px;cursor:pointer onclick=stopProcess("+t[a].p+',"'+t[a].c+'")><img width=10 height=10 src="images/trash.png"></a><div style=float:right;padding-right:5px>'+(t[a].u?t[a].u:"")+"</div><div>"+t[a].c+"</div></div>");QH("DeskToolsProcesses",i)}}}else QH("DeskToolsProcesses","")}function deskSaveImage(){if(setSessionActivity(),!xxdialogMode&&null!=desktop&&3==desktop.State){var e=new Date,t="Desktop-"+currentNode.name+"-"+e.getFullYear()+"-"+("0"+(e.getMonth()+1)).slice(-2)+"-"+("0"+e.getDate()).slice(-2)+"-"+("0"+e.getHours()).slice(-2)+"-"+("0"+e.getMinutes()).slice(-2);Q("Desk").toBlob(function(e){saveAs(e,t+".jpg")})}}function deskDisplayInfo(e,t,o,n){var i=Q("termdisplays").value;if(0<t.length){var a="";for(var s in t)a+="<option"+(i==t[s]?" selected":"")+">"+t[s]+"</option>";QH("termdisplays",a)}QV("termdisplays",0<t.length)}function deskGetDisplayNumbers(e){desktop.m.GetDisplayNumbers()}function deskSetDisplay(e){setSessionActivity();var t=0,o=Q("termdisplays").value;t="All Displays"==o?65535:parseInt(o.substring(8)),desktop.m.SetDisplay(t)}function dmousedown(e){setSessionActivity(),xxdialogMode||null==desktop||desktop.m.mousedown(e)}function dmouseup(e){setSessionActivity(),xxdialogMode||null==desktop||desktop.m.mouseup(e)}function dmousemove(e){setSessionActivity(),xxdialogMode||null==desktop||desktop.m.mousemove(e)}function dmousewheel(e){return setSessionActivity(),!(xxdialogMode||null==desktop||!desktop.m.mousewheel)&&(desktop.m.mousewheel(e),haltEvent(e),!0)}function drotate(e){xxdialogMode||null==desktop||(desktop.m.setRotation(desktop.m.rotation+e),deskAdjust(),deskAdjust())}function stopProcess(e,t){return setDialogMode(2,"Process Control",3,stopProcessEx,format('Stop process #{0} "{1}"?',e,t),e),!1}function stopProcessEx(e,t){meshserver.send({action:"msg",type:"pskill",nodeid:currentNode._id,value:t}),setTimeout(refreshDeskTools,300)}function setupFiles(){var e=filesNode==currentNode,t=0!=(1&(filesNode=currentNode).conn);QE("p13Connect",t),0!=e&&0!=t||!files||(files.Stop(),files=null)}function onFilesStateChange(e,t){setSessionActivity(),p13Connect.value=0==t?"Connect":"Disconnect";var o=StatusStrs[t];switch(1==files.webRtcActive&&(o+=", WebRTC"),Q("p13Status").textContent=o,t){case 0:QH("p13files",""),p13filetree=null,p13filetreelocation=[],QH("p13currentpath",""),QE("p13FolderUp",!1),p13setActions(),null!=files&&(files.Stop(),files=null);break;case 3:p13targetpath="",files.sendText({action:"ls",reqid:1,path:""})}}function CreateRemoteFiles(e){var t={protocol:5};return t.onFileUpdate=e,t.xxStateChange=function(e){},t.ProcessData=function(e){t.onFileUpdate(e)},t}var autoConnectFilesTimer=null;function autoConnectFiles(e){autoConnectFilesTimer=null==autoConnectFilesTimer?setInterval(connectFiles,100):(clearInterval(autoConnectFilesTimer),null)}function connectFiles(e){files?(files.Stop(),files=null):((files=CreateAgentRedirect(meshserver,CreateRemoteFiles(p13gotFiles),serverPublicNamePort,authCookie,authRelayCookie,domainUrl)).attemptWebRTC=attemptWebRTC,files.onStateChanged=onFilesStateChange,files.Start(filesNode._id)),p13clipboard=p13clipboardFolder=null,p13clipboardCut=0,p13updateClipview()}var p13sortorder,p13filetree=null,p13targetpath=null,p13filetreelocation=[];function p13gotFiles(e){if(setSessionActivity(),0<e.length&&123!=e.charCodeAt(0))p13gotDownloadBinaryData(e);else if("download"!=(e=JSON.parse(decode_utf8(e))).action)if(e.path=e.path.replace(/\//g,"\\"),null!=p13filetree&&e.path==p13filetree.path){var t=p13getCheckedNames();p13filetree=e,p13updateFiles(t)}else{for(var o=e.path.replace(/\//g,"\\"),n=p13targetpath.replace(/\//g,"\\");0<o.length&&"\\"==o[0];)o=o.substring(1);for(;0<n.length&&"\\"==n[0];)n=n.substring(1);(o==n||"\\"==e.path&&""==p13targetpath)&&(p13filetree=e,p13updateFiles())}else p13gotDownloadCommand(e)}function p13getCheckedNames(){for(var e=[],t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked&&e.push(p13filetree.dir[t[o].value].n);return e}function p13updateFiles(e){var t="",o="",n="<a style=cursor:pointer onclick=p13folderup(0)>Root</a>",i=p13filetree.path.split("\\");for(var a in p13filetreelocation=[],i)""!=i[a]&&p13filetreelocation.push(i[a]);for(var a in p13filetreelocation)n+=" / <a style=cursor:pointer onclick=p13folderup("+(parseInt(a)+1)+")>"+p13filetreelocation[a]+"</a>";var s=p13filetreelocation.join("/"),l=p13sort_files(p13filetree.dir);for(var a in l){var r,d=l[a],p=d.n;r=70<(r=p).length?EscapeHtml(p.substring(0,70))+"...":EscapeHtml(p),p=EscapeHtml(p);var c="";null!=d.s&&(c=getFileSizeStr(d.s));var u="";if(d.t<3){u="<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p13setActions() value='"+d.nx+"'>&nbsp;<span style=float:right></span><span><div class=fileIcon"+d.t+'></div><a style=cursor:pointer onclick=p13folderset("'+encodeURIComponent(d.nx)+'")>'+r+"</a></span></div>"}else{var m=r;0<d.s&&(m='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick="p13downloadfile(\''+encodeURIComponent(s+"/"+p)+"','"+encodeURIComponent(p)+"',"+d.s+')">'+r+"</a>"),u="<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p13setActions() value='"+d.nx+"'>&nbsp;<span style=float:right;padding-right:4px>"+c+"</span><span><div class=fileIcon"+d.t+"></div>"+m+"</span></div>"}d.t<3?t+=u:o+=u}if(QH("p13files",t+o),QH("p13currentpath",n),QE("p13FolderUp",0!=p13filetreelocation.length),null!=e){var h=document.getElementsByName("fd");for(a=0;a<h.length;a++)0<=e.indexOf(p13filetree.dir[h[a].value].n)&&(h[a].checked=!0)}p13setActions()}function p13folderset(e){p13targetpath=joinPaths(p13filetree.path,p13filetree.dir[e].n).split("\\").join("/"),files.sendText({action:"ls",reqid:1,path:p13targetpath})}function p13folderup(e){if(null==e)p13filetreelocation.pop();else for(;p13filetreelocation.length>e;)p13filetreelocation.pop();p13targetpath=p13filetreelocation.join("/"),files.sendText({action:"ls",reqid:1,path:p13targetpath})}function p13sort_filename(e,t){return e.ln>t.ln?1*p13sortorder:e.ln<t.ln?-1*p13sortorder:0}function p13sort_timestamp(e,t){return e.d>t.d?1*p13sortorder:e.d<t.d?-1*p13sortorder:0}function p13sort_bysize(e,t){return e.s==t.s?p13sort_filename(e,t):(e.s-t.s)*p13sortorder}function p13sort_files(e){var t=[],o=Q("p13sortdropdown").value;for(var n in e)e[n].nx=n,null==e[n].s&&(e[n].s=0),null==e[n].n&&(e[n].n=n),e[n].ln=e[n].n.toLowerCase(),t.push(e[n]);return p13sortorder=1,3<o&&(p13sortorder=-1,o-=3),1==o?t.sort(p13sort_filename):2==o?t.sort(p13sort_bysize):3==o&&t.sort(p13sort_timestamp),t}function p13setActions(){if(null==p13filetree)QE("p13DeleteFileButton",!1),QE("p13NewFolderButton",!1),QE("p13UploadButton",!1),QE("p13RenameFileButton",!1),QE("p13SelectAllButton",!1),Q("p13SelectAllButton").value="Tout",QE("p13RefreshButton",!1),QE("p13CutButton",!1),QE("p13CopyButton",!1),QE("p13PasteButton",!1);else{var e=p13getFileSelCount(),t=p13getFileCount(),o=p13getFileSelCount(!1),n=0<currentNode.agent.id&&currentNode.agent.id<5;QE("p13DeleteFileButton",0<e&&(0<p13filetreelocation.length||0==n)),QE("p13NewFolderButton",0<p13filetreelocation.length||0==n),QE("p13UploadButton",0<p13filetreelocation.length||0==n),QE("p13RenameFileButton",1==e&&(0<p13filetreelocation.length||0==n)),QE("p13SelectAllButton",0<t),Q("p13SelectAllButton").value=0<e?"None":"Tout",QE("p13RefreshButton",!0),QE("p13CutButton",0<e&&e==o&&(0<p13filetreelocation.length||0==n)),QE("p13CopyButton",0<e&&e==o&&(0<p13filetreelocation.length||0==n)),QE("p13PasteButton",(0<p13filetreelocation.length||0==n)&&null!=p13clipboard&&0<p13clipboard.length)}}function p13getFileSelCount(e){for(var t=0,o=document.getElementsByName("fd"),n=0;n<o.length;n++)!o[n].checked||0==e&&"3"!=o[n].attributes.file.value||t++;return t}function p13getFileSelDirCount(){for(var e=0,t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked&&"999"==t[o].attributes.file.value&&e++;return e}function p13getFileCount(){return document.getElementsByName("fd").length}function p13selectallfile(){for(var e=0==p13getFileSelCount(),t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked=e;p13setActions()}function p13createfolder(){setDialogMode(2,"Nouveau Dossier",3,p13createfolderEx,"<input type=text id=p13renameinput maxlength=64 onkeyup=p13fileNameCheck(event) style=width:100% />"),focusTextBox("p13renameinput"),p13fileNameCheck()}function p13createfolderEx(){files.sendText({action:"mkdir",reqid:1,path:p13filetreelocation.join("/")+"/"+Q("p13renameinput").value}),p13folderup(999)}function p13deletefile(){var e=p13getFileSelCount(),t=0<p13getFileSelDirCount()?"<br /><br /><label><input type=checkbox id=p13recdeleteinput>Recursive delete</label><br>":"<input type=checkbox id=p13recdeleteinput style='display:none'>";setDialogMode(2,"Delete",3,p13deletefileEx,1<e?format("Delete {0} selected items?",e)+t:"Delete selected item?"+t)}function p13deletefileEx(){for(var e=[],t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked&&e.push(p13filetree.dir[t[o].value].n);files.sendText({action:"rm",reqid:1,path:p13filetreelocation.join("/"),delfiles:e,rec:Q("p13recdeleteinput").checked}),p13folderup(999)}function p13renamefile(){for(var e,t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked&&(e=p13filetree.dir[t[o].value].n);setDialogMode(2,"Renommer",3,p13renamefileEx,'<input type=text id=p13renameinput maxlength=64 onkeyup=p13fileNameCheck(event) style=width:100% value="'+e+'" />',{action:"rename",path:p13filetreelocation.join("/"),oldname:e}),focusTextBox("p13renameinput"),p13fileNameCheck()}function p13renamefileEx(e,t){t.newname=Q("p13renameinput").value,files.sendText(t),p13folderup(999)}function p13fileNameCheck(e){var t=isFilenameValid(Q("p13renameinput").value);QE("idx_dlgOkButton",t),1==t&&null!=e&&13==e.keyCode&&dialogclose(1)}function p13uploadFile(){setDialogMode(2,"Upload File",3,p13uploadFileEx,"<input type=file name=files id=p13uploadinput style=width:100% multiple=multiple onchange=\"updateUploadDialogOk('p13uploadinput')\" />"),updateUploadDialogOk("p13uploadinput")}function p13uploadFileEx(){p13doUploadFiles(Q("p13uploadinput").files)}function p13viewfile(){for(var e=document.getElementsByName("fd"),t=0;t<e.length;t++)if(e[t].checked){p13filetree.dir[e[t].value].s<=204800?p13downloadfile(encodeURIComponent(p13filetreelocation.join("/")+"/"+p13filetree.dir[e[t].value].n),encodeURIComponent(p13filetree.dir[e[t].value].n),p13filetree.dir[e[t].value].s,"viewer"):messagebox("File Editor","Only files less than 200k can be edited.");break}}var downloadFile,uploadFile,currentMesh,p13clipboard=null,p13clipboardFolder=null,p13clipboardCut=0;function p13copyFile(e){var t=document.getElementsByName("fd");p13clipboard=[],p13clipboardCut=e,p13clipboardFolder=p13targetpath;for(var o=0;o<t.length;o++)t[o].checked&&"3"==t[o].attributes.file.value&&p13clipboard.push(p13filetree.dir[t[o].value].n);p13updateClipview()}function p13pasteFile(){var e="";null!=p13clipboard&&0<p13clipboard.length&&(e=0==p13clipboardCut?1<p13clipboard.length?format("Confirm copy of {0} entries's to this location?",p13clipboard.length):format("Confirm copy of 1 entrie to this location?"):1<p13clipboard.length?format("Confirm move of {0} entries's to this location?",p13clipboard.length):format("Confirm move of 1 entrie to this location?")),setDialogMode(2,"Paste",3,p13pasteFileEx,e)}function p13pasteFileEx(){files.sendText({action:0==p13clipboardCut?"copy":"move",reqid:1,scpath:p13clipboardFolder,dspath:p13targetpath,names:p13clipboard}),p13folderup(999),1==p13clipboardCut&&(p13clipboardFolder=p13clipboard=null,p13clipboardCut=0,p13updateClipview())}function p13updateClipview(){var e="";null!=p13clipboard&&0<p13clipboard.length&&(e=0==p13clipboardCut?1<p13clipboard.length?format('Holding {0} entries for copy, <a href=# onclick="return p13clearClip()" style=cursor:pointer>Clear</a>.',p13clipboard.length):format('Holding 1 entrie for copy, <a href=# onclick="return p13clearClip()" style=cursor:pointer>Clear</a>.'):1<p13clipboard.length?format('Holding {0} entries for move, <a href=# onclick="return p13clearClip()" style=cursor:pointer>Clear</a>.',p13clipboard.length):format('Holding 1 entrie for move, <a href=# onclick="return p13clearClip()" style=cursor:pointer>Clear</a>.')),QH("p13bottomstatus",e),p13setActions()}function p13clearClip(){return p13clipboardFolder=p13clipboard=null,p13clipboardCut=0,p13updateClipview(),!1}function updateUploadDialogOk(e){QE("idx_dlgOkButton",""!=Q(e).value)}function getFileSelCount(e){for(var t=0,o=document.getElementsByName("fc"),n=0;n<o.length;n++)!o[n].checked||0==e&&"3"!=o[n].attributes.file.value||t++;return t}function getFileCount(){return document.getElementsByName("fc").length}function p13downloadfile(e,t,o){xxdialogMode||downloadFile||!files||(downloadFile={path:decodeURIComponent(e),file:decodeURIComponent(t),size:o,tsize:0,data:"",state:0,id:Math.random()},files.sendText({action:"download",sub:"start",id:downloadFile.id,path:downloadFile.path}),setDialogMode(2,"Download File",10,p13downloadFileCancel,"<div>"+downloadFile.file+"</div><br /><progress id=d2progressBar style=width:100% value=0 max="+o+" />"))}function p13downloadFileCancel(){setDialogMode(0),files.sendText({action:"download",sub:"cancel",id:downloadFile.id}),downloadFile=null}function p13gotDownloadCommand(e){null!=downloadFile&&e.id==downloadFile.id&&("start"==e.sub?(downloadFile.state=1,files.sendText({action:"download",sub:"startack",id:downloadFile.id})):"cancel"==e.sub&&(downloadFile=null,setDialogMode(0)))}function p13gotDownloadBinaryData(e){downloadFile&&0!=downloadFile.state&&(4<e.length&&(downloadFile.tsize+=e.length-4,downloadFile.data+=e.substring(4),Q("d2progressBar").value=downloadFile.tsize),0!=(1&ReadInt(e,0))?(saveAs(data2blob(downloadFile.data),downloadFile.file),downloadFile=null,setDialogMode(0)):files.sendText({action:"download",sub:"ack",id:downloadFile.id}))}function p13doUploadFiles(e){xxdialogMode||((uploadFile={}).xpath=p13filetreelocation.join("/"),uploadFile.xfiles=e,uploadFile.xfilePtr=-1,setDialogMode(2,"Upload File",10,p13uploadFileCancel,"<div id=p13dfileName>Connecting...</div><br /><progress id=d2progressBar style=width:100% value=0 max=0 />"),p13uploadReconnect())}function onFileUploadStateChange(e,t){switch(t){case 0:p13folderup(9999);break;case 3:p13uploadNextFile();break;default:console.log("Unknown onFileUploadStateChange state",t)}}function p13uploadReconnect(){uploadFile.ws=CreateAgentRedirect(meshserver,CreateRemoteFiles(p13gotUploadData),serverPublicNamePort,authCookie,authRelayCookie,domainUrl),uploadFile.ws.attemptWebRTC=!1,uploadFile.ws.ctrlMsgAllowed=!1,uploadFile.ws.onStateChanged=onFileUploadStateChange,uploadFile.ws.Start(filesNode._id)}function p13uploadNextFile(){if(uploadFile.xfilePtr++,uploadFile.xfiles.length>uploadFile.xfilePtr){uploadFile.xptr=0;var e=uploadFile.xfiles[uploadFile.xfilePtr];QH("p13dfileName",e.name),Q("d2progressBar").max=e.size,Q("d2progressBar").value=0,uploadFile.xreader=new FileReader,uploadFile.xreader.onload=function(){uploadFile.xdata=uploadFile.xreader.result,uploadFile.ws.sendText({action:"upload",reqid:uploadFile.xfilePtr,path:uploadFile.xpath,name:e.name,size:uploadFile.xdata.byteLength})},uploadFile.xreader.readAsArrayBuffer(e)}else p13uploadFileCancel()}function p13uploadFileCancel(e,t){null!=uploadFile&&(null!=uploadFile.ws&&(uploadFile.ws.Stop(),uploadFile.ws=null),uploadFile=null),setDialogMode(0)}function p13gotUploadData(e){var t=JSON.parse(e);if(null!=uploadFile&&parseInt(uploadFile.xfilePtr)==parseInt(t.reqid))if("uploadstart"==t.action){p13uploadNextPart(!1);for(var o=0;o<8;o++)p13uploadNextPart(!0)}else"uploadack"==t.action?p13uploadNextPart(!1):"uploaderror"==t.action&&p13uploadFileCancel()}function p13uploadNextPart(e){var t=uploadFile.xdata,o=uploadFile.xptr,n=uploadFile.xptr+4096;if(n>t.byteLength){if(1==e)return;n=t.byteLength}if(o==t.byteLength)null!=uploadFile.ws&&(uploadFile.ws.Stop(),uploadFile.ws=null),uploadFile.xfiles.length>uploadFile.xfilePtr+1?p13uploadReconnect():p13uploadFileCancel();else{var i=t.slice(o,n);uploadFile.ws.send(i),uploadFile.xptr=n,Q("d2progressBar").value=n}}function p20updateMesh(){if(null!=currentMesh){QH("p20meshName",EscapeHtml(currentMesh.name));var e=format(" #{0} Inconnue",currentMesh.mtype),t=currentMesh.links[userinfo._id].rights;1==currentMesh.mtype&&(e="Intel&reg; AMT only, no agent"),2==currentMesh.mtype&&(e="Géré à l'aide d'un agent logiciel");var o="";o+=addHtmlValue("Nom",addLinkConditional(EscapeHtml(currentMesh.name),"p20editmesh(1)",0!=(1&t))),o+=addHtmlValue("Description",addLinkConditional(currentMesh.desc&&""!=currentMesh.desc?EscapeHtml(currentMesh.desc):"<i>None</i>","p20editmesh(2)",0!=(1&t))),o+=addHtmlValue("Type",e),o+="<br style=clear:both><br>";var n=currentMesh.links[userinfo._id];n&&0!=(2&n.rights)&&(o+="<div style=margin-bottom:6px><a onclick=p20showAddMeshUserDialog() style=cursor:pointer><img src=images/icon-addnew.png border=0 height=12 width=12>Ajouter un utilisateur</a></div>"),o+='<table style="color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse" border=0 cellpadding=2 cellspacing=0 width=100%><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:left;width:430px>User Authorizations</th></tr>';var i=1,a=[];for(var s in currentMesh.links)a.push({id:s,name:s.split("/")[2],rights:currentMesh.links[s].rights});for(var s in a.sort(function(e,t){return e.name>t.name?1:e.name<t.name?-1:0}),a){var l="",r="Partial Rights",d=a[s].rights;4294967295==d?r="Full Administrator":0==d&&(r="No Rights"),s==userinfo._id||4294967295!=t&&0==(2&t)||(l='<a onclick=p20deleteUser(event,"'+encodeURIComponent(a[s].id)+'") style=cursor:pointer><img src=images/trash.png border=0 height=10 width=10></a>'),o+='<tr onclick=p20viewuser("'+encodeURIComponent(a[s].id)+'") style=height:32px;cursor:pointer'+(i%2==0?";background-color:#DDD":"")+"><td>",o+="<div style=float:right>"+l+"</div><div style=float:right;padding-right:4px>"+r+"</div><div class=m2></div><div>&nbsp;"+EscapeHtml(decodeURIComponent(a[s].name))+"<div></div></div>",o+="</td></tr>",++i}o+="</tbody></table>",4294967295==t&&(o+="<div style=font-size:small;text-align:right;margin-top:6px><span><a onclick=p20showDeleteMeshDialog() style=cursor:pointer>Delete Group</a></span></div>"),QH("p20info",o)}}function p20showDeleteMeshDialog(){if(xxdialogMode)return!1;var e=format("Êtes-vous sûr de vouloir supprimer le groupe {0}? La suppression du groupe de périphériques supprimera également toutes les informations relatives aux périphériques de ce groupe.",EscapeHtml(currentMesh.name))+"<br /><br />";return setDialogMode(2,"Delete Group",3,p20showDeleteMeshDialogEx,e+="<label><input id=p20check type=checkbox onchange=p20validateDeleteMeshDialog() />Confirm</label>"),p20validateDeleteMeshDialog(),!1}function p20validateDeleteMeshDialog(){QE("idx_dlgOkButton",Q("p20check").checked)}function p20showDeleteMeshDialogEx(e,t){meshserver.send({action:"deletemesh",meshid:currentMesh._id,meshname:currentMesh.name})}function p20editmesh(e){if(!xxdialogMode){var t=addHtmlValue("Nom","<input id=dp20meshname style=width:170px maxlength=32 onchange=p20editmeshValidate() onkeyup=p20editmeshValidate() />");setDialogMode(2,"Edit Device Group",3,p20editmeshEx,t+=addHtmlValue("Description","<input id=dp20meshdesc style=width:170px maxlength=1024 onkeyup=p20editmeshValidate() />")),Q("dp20meshname").value=currentMesh.name,currentMesh.desc&&(Q("dp20meshdesc").value=currentMesh.desc),p20editmeshValidate(),2==e?Q("dp20meshdesc").focus():Q("dp20meshname").focus()}}function p20editmeshEx(){meshserver.send({action:"editmesh",meshid:currentMesh._id,meshname:Q("dp20meshname").value,desc:Q("dp20meshdesc").value})}function p20editmeshValidate(){QE("idx_dlgOkButton",0<Q("dp20meshname").value.length)}function p20showAddMeshUserDialog(){if(!xxdialogMode){var e=addHtmlValue("User","<input id=dp20username style=width:170px maxlength=32 onchange=p20validateAddMeshUserDialog() onkeyup=p20validateAddMeshUserDialog() />");e+='<div style="border:2px groove gray;background-color:white;max-height:120px;overflow-y:scroll">',e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20fulladmin>Full Administrator</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20editmesh>Edit Device Group</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20manageusers>Manage Device Group Users</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20managecomputers>Manage Device Group Computers</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20remotecontrol>Remote Control</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20remoteview style=margin-left:12px>Remote View Only</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20remotelimitedinput style=margin-left:12px>Limited Input Only</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20noterminal style=margin-left:12px>No Terminal Access</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20nofiles style=margin-left:12px>Pas d'accès au fichier</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20noamt style=margin-left:12px>No Intel&reg; AMT</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20meshagentconsole>Mesh Agent Console</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20meshserverfiles>Server Files</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20wakedevices>Wake Devices</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20editnotes>Edit Device Notes</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20limitevents>Show Only Own Events</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20chatnotify>Chat & Notify</label><br>",setDialogMode(2,"Ajouter un utilisateur au groupe",3,p20showAddMeshUserDialogEx,e+="</div>"),p20validateAddMeshUserDialog(),Q("dp20username").focus()}}function p20validateAddMeshUserDialog(){var e=currentMesh.links[userinfo._id].rights;QE("idx_dlgOkButton",0<Q("dp20username").value.length),QE("p20fulladmin",4294967295==e),QE("p20editmesh",!Q("p20fulladmin").checked&&4294967295==e),QE("p20manageusers",!Q("p20fulladmin").checked),QE("p20managecomputers",!Q("p20fulladmin").checked),QE("p20remotecontrol",!Q("p20fulladmin").checked),QE("p20meshagentconsole",!Q("p20fulladmin").checked),QE("p20meshserverfiles",!Q("p20fulladmin").checked),QE("p20wakedevices",!Q("p20fulladmin").checked),QE("p20editnotes",!Q("p20fulladmin").checked),QE("p20remoteview",!Q("p20fulladmin").checked&&Q("p20remotecontrol").checked),QE("p20noterminal",!Q("p20fulladmin").checked&&Q("p20remotecontrol").checked),QE("p20nofiles",!Q("p20fulladmin").checked&&Q("p20remotecontrol").checked),QE("p20noamt",!Q("p20fulladmin").checked&&Q("p20remotecontrol").checked)}function p20showAddMeshUserDialogEx(){var e=0;1==Q("p20fulladmin").checked?e=4294967295:(1==Q("p20editmesh").checked&&(e+=1),1==Q("p20manageusers").checked&&(e+=2),1==Q("p20managecomputers").checked&&(e+=4),1==Q("p20remotecontrol").checked&&(e+=8),1==Q("p20meshagentconsole").checked&&(e+=16),1==Q("p20meshserverfiles").checked&&(e+=32),1==Q("p20wakedevices").checked&&(e+=64),1==Q("p20editnotes").checked&&(e+=128),1==Q("p20remoteview").checked&&(e+=256),1==Q("p20noterminal").checked&&(e+=512),1==Q("p20nofiles").checked&&(e+=1024),1==Q("p20noamt").checked&&(e+=2048)),meshserver.send({action:"addmeshuser",meshid:currentMesh._id,meshname:currentMesh.name,username:Q("dp20username").value,meshadmin:e})}function p20viewuser(e){if(!xxdialogMode){e=decodeURIComponent(e);var t=[],o=currentMesh.links[userinfo._id].rights,n=currentMesh.links[e].rights;4294967295==n?t.push("Full Administrator"):(0!=(1&n)&&t.push("Edit Device Group"),0!=(2&n)&&t.push("Manage Device Group Users"),0!=(4&n)&&t.push("Manage Device Group Computers"),0!=(8&n)&&t.push("Remote Control"),0!=(16&n)&&t.push("Agent Console"),0!=(32&n)&&t.push("Server Files"),0!=(64&n)&&t.push("Wake Devices"),0!=(128&n)&&t.push("Edit Notes"),0!=(256&n)&&t.push("Remote View Only"),0!=(512&n)&&t.push("No Terminal"),0!=(1024&n)&&t.push("Aucun fichier"),0!=(2048&n)&&t.push("No Intel&reg; AMT"),0!=(8&n)&&0!=(4096&n)&&0==(256&n)&&t.push("Limited Input"),0!=(8192&n)&&t.push("Self Events Only"),0!=(16384&n)&&t.push("Chat & Notify")),0==t.length&&t.push("No Rights");var i=1,a=addHtmlValue("User",EscapeHtml(decodeURIComponent(e.split("/")[2])));a+=addHtmlValue("Permissions",t.join(", ")),userinfo._id!=e&&(4294967295==o||0!=(2&o)&&4294967295!=n)&&(i+=4),setDialogMode(2,"Device Group User",i,p20viewuserEx,a,e)}}function p20viewuserEx(e,t){2==e&&setDialogMode(2,"Remote Mesh User",3,p20viewuserEx2,format("Confirm removal of user {0}?",t.split("/")[2]),t)}function p20deleteUser(e,t){haltEvent(e),p20viewuserEx(2,decodeURIComponent(t))}function p20viewuserEx2(e,t){meshserver.send({action:"removemeshuser",meshid:currentMesh._id,meshname:currentMesh.name,userid:t})}var xxdialogMode,xxdialogFunc,xxdialogButtons,xxdialogTag,xxcurrentView=-1;function go(e){if(setSessionActivity(),!xxdialogMode&&xxcurrentView!=e){updateFooterMenu(),setDialogMode(0);for(var t=0;t<32;t++)QV("p"+t,t==e);xxcurrentView=e}}function setDialogMode(e,t,o,n,i,a){setSessionActivity(),xxdialogMode=e,xxdialogFunc=n,xxdialogButtons=o,xxdialogTag=a,QE("idx_dlgOkButton",!0),QV("idx_dlgOkButton",1&o),QV("idx_dlgCancelButton",2&o),QV("id_dialogclose",2&o||8&o),QV("idx_dlgButtonBar",7&o),t&&QH("id_dialogtitle",t);for(var s=1;s<24;s++)QV("dialog"+s,s==e);QV("dialog",e),i&&(2==e?QH("id_dialogOptions",i):QH("id_dialogMessage",i))}function dialogclose(e){setSessionActivity();var t=xxdialogFunc,o=xxdialogButtons,n=xxdialogTag;setDialogMode(),(8&o||e)&&t&&t(e,n)}function putstore(e,t){try{if("undefined"==typeof localStorage||localStorage.getItem(e)==t)return;null==t?localStorage.removeItem(e):localStorage.setItem(e,t)}catch(e){}if("_"!=e[0]){for(var o={},n=0,i=localStorage.length;n<i;++n){var a=localStorage.key(n);"_"!=a[0]&&(o[a]=localStorage.getItem(a))}meshserver.send({action:"userWebState",state:JSON.stringify(o)})}}function getstore(e,t){try{if("undefined"==typeof localStorage)return t;var o=localStorage.getItem(e);return null==o||null==o?t:o}catch(e){return t}}function center(){QS("dialog").left=(getDocWidth()-300)/2+"px",deskAdjust(),deskAdjust()}function messagebox(e,t){QH("id_dialogMessage",t),setDialogMode(1,e,1)}function statusbox(e,t){QH("id_dialogMessage",t),setDialogMode(1,e)}function getDocWidth(){return window.innerWidth?window.innerWidth:document.documentElement&&document.documentElement.clientWidth&&0!=document.documentElement.clientWidth?document.documentElement.clientWidth:document.getElementsByTagName("body")[0].clientWidth}function haltEvent(e){return e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1}function haltReturn(e){13==e.keyCode&&haltEvent(e)}function validateEmail(e){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function reload(){window.location.href=window.location.href}function getNodeFromId(e){for(var t in nodes)if(nodes[t]._id==e)return nodes[t];return null}function addHtmlValue(e,t){return"<table><td style=width:120px>"+e+"<td><b>"+t+"</b></table>"}function addHtmlValue2(e,t){return"<div><div style=display:inline-block;float:right>"+t+"</div><div style=display:inline-block>"+e+"</div></div>"}function addLink(e,t){return"<a style=cursor:pointer;color:darkblue;text-decoration:none onclick='"+t+"'>&diams; "+e+"</a>"}function addLinkConditional(e,t,o){return o?addLink(e,t):e}function passwordcheck(e){return/(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%^&*()]).{8,}/.test(e)}function getFileSizeStr(e){return 1==e?"1 octet":format("{0} bytes",e)}function joinPaths(){var e=[];for(var t in arguments){var o=arguments[t];if(null!=o&&""!=o){for(;o.endsWith("/")||o.endsWith("\\");)o=o.substring(0,o.length-1);for(;o.startsWith("/")||o.startsWith("\\");)o=o.substring(1);e.push(o)}}return e.join("/")}function focusTextBox(e){setTimeout(function(){Q(e).selectionStart=Q(e).selectionEnd=65535,Q(e).focus()},0)}isFilenameValid=function(){var t=/^[^\\/:\*\?"<>\|]+$/,o=/^\./,n=/^(nul|prn|con|lpt[0-9]|com[0-9])(\.|$)/i;return function(e){return t.test(e)&&!o.test(e)&&!n.test(e)&&"."!=e[0]}}();function parseUriArgs(){var e,t={},o=window.document.location.href.split(/[\?&|\=]/);for(n in o.splice(0,1),o)switch(n%2){case 0:e=decodeURIComponent(o[n]);break;case 1:t[e]=decodeURIComponent(o[n]);var n=parseInt(t[e]);n==t[e]&&(t[e]=n)}return t}function printDate(e){return e.toLocaleDateString(args.locale)}function printTime(e){return e.toLocaleTimeString(args.locale)}function printDateTime(e){return e.toLocaleString(args.locale)}function format(e){var o=Array.prototype.slice.call(arguments,1);return e.replace(/{(\d+)}/g,function(e,t){return void 0!==o[t]?o[t]:e})}function nobreak(e){return e.split(" ").join("&nbsp;")}</script>
\ No newline at end of file
views/translations/login-min_fr.handlebars
+1 -1
@@ -1 +1 @@
1 -<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link rel="shortcut icon"type=image/x-icon href={{{domainurl}}}favicon.ico><link keeplink=1 type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><script keeplink=1 src=scripts/u2f-api.js></script><title>{{{title}}} - Login</title><body id=body onload='"undefined"!=typeof startup&&startup()'class="arg_hide login"><div id=container><div id=masthead><div class=title>{{{title}}}</div><div class=title2>{{{title2}}}</div></div><div id=topbar class="noselect style3"style=height:24px><div id=uiMenuButton title="User interface selection"onclick=showUserInterfaceSelectMenu()>♦<div id=uiMenu style=display:none><div id=uiViewButton1 class=uiSelector onclick=userInterfaceSelectMenu(1) title="Left bar interface"><div class=uiSelector1></div></div><div id=uiViewButton2 class=uiSelector onclick=userInterfaceSelectMenu(2) title="Top bar interface"><div class=uiSelector2></div></div><div id=uiViewButton3 class=uiSelector onclick=userInterfaceSelectMenu(3) title="Fixed width interface"><div class=uiSelector3></div></div><div id=uiViewButton4 class=uiSelector onclick=toggleNightMode() title="Basculer mode nuit"><div class=uiSelector4></div></div></div></div></div><div id=column_l><h1>Bienvenue</h1><div id=welcomeText style=display:none>Connect to your home or office devices from anywhere in the world using<a href=http://www.meshcommander.com/meshcentral2>MeshCentral</a>, the real time, open source remote monitoring and management web site. You will need to download and install a management agent on your computers. Once installed, computers will show up in the "My Devices" section of this web site and you will be able to monitor them and take control of them.</div><table id=centralTable><tr><td id=welcomeimage><picture><img alt=""src=welcome.jpg style=border-radius:20px></picture><td id=logincell><div id=loginpanel style=display:none><form method=post><input type=hidden name=action value=login><div id=message1>{{{message}}}</div><div><b>Log In</b></div><table><tr><td id=loginusername align=right width=100>Nom d'utilisateur:<td><input id=username maxlength=64 name=username onchange=validateLogin(1) onkeyup=validateLogin(1,event)><tr><td align=right>Mot de passe:<td><input id=password type=password maxlength=256 name=password autocomplete=off onchange=validateLogin(2) onkeyup=validateLogin(2,event)><tr><td><div id=showPassHintLink style=display:none><a onclick="return showPassHint(event)"href=# style=cursor:pointer>Dévoiler indice</a></div><td align=right><input id=loginButton type=submit value="Log In"disabled></table><div id=hrAccountDiv style=display:none><hr></div><div id=resetAccountDiv style=display:none;padding:2px><span id=resetAccountSpan>Forgot username/password?</span><a onclick="return xgo(3,event)"href=# style=cursor:pointer>Réinitialiser le compte</a>.</div><div id=newAccountDiv style=display:none;padding:2px>Don't have an account?<a onclick="return xgo(2,event)"href=# style=cursor:pointer>Create one</a>.</div><input id=loginformargs name=urlargs type=hidden></form></div><div id=createpanel style=display:none;position:relative><form method=post><input type=hidden name=action value=createaccount><div id=message2>{{{message}}}</div><div><b>Account Creation</b></div><div id=passwordPolicyCallout style=display:none></div><table><tr id=nuUserRow><td id=nuUser align=right width=100>Nom d'utilisateur:<td><input id=ausername name=username onchange=validateCreate(1) maxlength=64 onkeydown=haltReturn(event) onkeyup=validateCreate(1,event)><tr><td id=nuEmail align=right width=100>Email:<td><input id=aemail name=email onchange=validateCreate(2) maxlength=256 onkeydown=haltReturn(event) onkeyup=validateCreate(2,event)><tr><td id=nuPass1 align=right>Mot de passe:<td><input id=apassword1 type=password name=password1 autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validateCreate(3,event) onkeyup=validateCreate(3,event)><tr><td id=nuPass2 align=right>Mot de passe:<td><input id=apassword2 type=password name=password2 autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validateCreate(4,event) onkeyup=validateCreate(4,event)><tr id=createPanelHint style=display:none><td id=nuHint align=right>Password Hint:<td><input id=apasswordhint name=apasswordhint autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validateCreate(5,event) onkeyup=validateCreate(5,event)><tr id=newAccountPass title="Enter the account creation token"><td id=nuToken align=right>Creation Token:<td><input id=anewaccountpass type=password name=anewaccountpass autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validateCreate(6,event) onkeyup=validateCreate(6,event)><tr><td colspan=2><div style=float:right><input id=createButton type=submit value="Create Account"disabled></div><div id=passWarning style=padding-top:6px></div></table><hr><a onclick="return xgo(1,event)"href=# style=cursor:pointer>Back to login</a><input id=createformargs name=urlargs type=hidden></form></div><div id=resetpanel style=display:none><form method=post><input type=hidden name=action value=resetaccount><div id=message3>{{{message}}}</div><div><b>Account Reset</b></div><table><tr><td align=right width=100>Email:<td><input id=remail name=email maxlength=256 onchange=validateReset() onkeyup=validateReset(event)><tr><td colspan=2><div style=float:right><input id=eresetButton type=submit value="Réinitialiser le Compte"disabled></div><div id=passWarning style=padding-top:6px></div></table><hr><a onclick="return xgo(1,event)"href=# style=cursor:pointer>Back to login</a><input id=resetformargs name=urlargs type=hidden></form></div><div id=tokenpanel style=display:none><form method=post autocomplete=off><input type=hidden name=action value=tokenlogin> <input type=hidden name=hwstate value={{{hwstate}}}><div id=message4>{{{message}}}</div><table><tr><td align=right width=100>Login token:<td><input id=tokenInput name=token maxlength=50 onchange=checkToken(event) onpaste=resetCheckToken(event) onkeyup=checkToken(event) onkeydown=checkToken(event)> <input id=hwtokenInput name=hwtoken style=display:none><tr><td colspan=2><div style=float:right><input id=tokenOkButton type=submit value=Login disabled></div></table><hr><a onclick="return xgo(1,event)"href=# style=cursor:pointer>Back to login</a><input id=tokenformargs name=urlargs type=hidden></form></div><div id=resettokenpanel style=display:none><form method=post><input type=hidden name=action value=resetaccount><div id=message5>{{{message}}}</div><table><tr><td align=right width=100>Login token:<td><input id=resetTokenInput name=token maxlength=50 onchange=resetCheckToken(event) onkeyup=resetCheckToken(event) onkeydown=resetCheckToken(event)> <input id=resetHwtokenInput name=hwtoken style=display:none><tr><td colspan=2><div style=float:right><input id=resetTokenOkButton type=submit value=Login disabled></div></table><hr><a onclick="return xgo(1,event)"href=# style=cursor:pointer>Back to login</a><input id=resettokenformargs name=urlargs type=hidden></form></div><div id=resetpasswordpanel style=display:none;position:relative><form method=post><input type=hidden name=action value=resetpassword><div id=message6>{{{message}}}</div><div id=rpasswordPolicyCallout style=display:none></div><table><tr><td id=rnuPass1 width=100 align=right>Mot de passe:<td><input id=rapassword1 type=password name=rpassword1 autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validatePassReset(3,event) onkeyup=validatePassReset(3,event)><tr><td id=rnuPass2 align=right>Mot de passe:<td><input id=rapassword2 type=password name=rpassword2 autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validatePassReset(4,event) onkeyup=validatePassReset(4,event)><tr id=resetpasswordpanelHint style=display:none><td id=rnuHint align=right>Password Hint:<td><input id=rapasswordhint name=rpasswordhint autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validatePassReset(5,event) onkeyup=validatePassReset(5,event)><tr><td colspan=2><div style=float:right><input id=resetPassButton type=submit value="Réinitialiser le mot de passe"disabled></div><div id=rpassWarning style=padding-top:6px></div></table><hr><a onclick="return xgo(1,event)"href=# style=cursor:pointer>Back to login</a><input id=resetpasswordformargs name=urlargs type=hidden></form></div></table><br></div><div id=footer><div class=footer1>{{{footer}}}</div><div class=footer2>{{{rootCertLink}}} &nbsp;<a href=terms>Terms &amp; Privacy</a></div></div></div><div id=dialog style=display:none><div id=dialogHeader><div id=id_dialogclose style=float:right;padding:5px;cursor:pointer onclick=setDialogMode()><b>X</b></div><div id=id_dialogtitle style=padding:5px></div><div style=width:100%;margin:6px></div></div><div id=dialogBody><div id=dialog1><div id=id_dialogMessage></div></div><div id=dialog2><div id=id_dialogOptions></div></div></div><div id=idx_dlgButtonBar><input id=idx_dlgCancelButton type=button value=Annuler onclick=dialogclose(0)> <input id=idx_dlgOkButton type=button value=OK onclick=dialogclose(1)></div></div><script>"use strict";var xxdialogMode,xxdialogFunc,xxdialogButtons,xxdialogTag,passhint="{{{passhint}}}",newAccountPass=parseInt("{{{newAccountPass}}}"),emailCheck=!1,passRequirements="{{{passRequirements}}}",hardwareKeyChallenge=decodeURIComponent("{{{hkey}}}"),passRequirementsEx=null!=(passRequirements=""!=passRequirements?JSON.parse(decodeURIComponent(passRequirements)):{}).min||null!=passRequirements.max||null!=passRequirements.upper||null!=passRequirements.lower||null!=passRequirements.numeric||null!=passRequirements.nonalpha,features=parseInt("{{{features}}}"),welcomeText=decodeURIComponent("{{{welcometext}}}"),currentpanel=0,uiMode=parseInt(getstore("uiMode","1")),webPageFullScreen=!0,nightMode="1"==getstore("_nightMode","0"),publicKeyCredentialRequestOptions=null;if(0<window.location.href.indexOf("?")){var urlargs=window.location.href.substring(window.location.href.indexOf("?"));Q("loginformargs").value=urlargs,Q("createformargs").value=urlargs,Q("resetformargs").value=urlargs,Q("tokenformargs").value=urlargs,Q("resettokenformargs").value=urlargs,Q("resetpasswordformargs").value=urlargs}function startup(){if(0==(32&features)){var e=null;try{e=top.location.toString().toLowerCase()}catch(e){}if(top!=self&&(null==e||0==top.active))return void(top.location=self.location)}2097152&features&&(QH("loginusername","Email:"),QH("resetAccountSpan","Forgot password?"),QV("nuUserRow",!1)),nightMode&&QC("body").add("night"),QV("createPanelHint",!0===passRequirements.hint),QV("resetpasswordpanelHint",!0===passRequirements.hint),welcomeText&&QH("welcomeText",welcomeText),QV("welcomeText",!0),(window.onresize=center)(),validateLogin(),validateCreate(),go(parseInt("{{loginmode}}")),QV("newAccountDiv",!1),null!=passhint&&0<passhint.length&&QV("showPassHintLink",!0),QV("newAccountPass",1==newAccountPass),QV("resetAccountDiv",1==emailCheck),QV("hrAccountDiv",1==emailCheck||1==newAccountPass),userInterfaceSelectMenu()}function showPassHint(e){return messagebox("Password Hint",passhint),haltEvent(e),!1}function xgo(e,n){return QV("message1",!1),QV("message2",!1),QV("message3",!1),QV("message4",!1),QV("message5",!1),QV("message6",!1),go(e),haltEvent(n),!1}function go(e){currentpanel=e,setDialogMode(0),QV("showPassHintLink",!1),QV("loginpanel",1==e),QV("createpanel",2==e),QV("resetpanel",3==e),QV("tokenpanel",4==e),QV("resettokenpanel",5==e),QV("resetpasswordpanel",6==e),1==e&&Q("username").focus(),2==e&&(2097152&features?Q("aemail").focus():Q("ausername").focus()),3==e&&Q("remail").focus(),4==e&&Q("tokenInput").focus(),5==e&&Q("resetTokenInput").focus(),6==e&&Q("rapassword1").focus()}function validateLogin(e,n){var s=0<Q("username").value.length&&-1==Q("username").value.indexOf(" ")&&0<Q("password").value.length;QE("loginButton",s),setDialogMode(0),null!=n&&13==n.keyCode&&(1==e&&""!=Q("username").value?Q("password").focus():2==e&&""!=Q("password").value&&Q("loginButton").click()),null!=n&&haltEvent(n)}function validateCreate(e,n){setDialogMode(0);var s=!1;s=!!(2097152&features)||0<Q("ausername").value.length&&-1==Q("ausername").value.indexOf(" ")&&-1==Q("ausername").value.indexOf('"')&&-1==Q("ausername").value.indexOf(",");var a=1==validateEmail(Q("aemail").value),t=0<Q("apassword1").value.length,o=0<Q("apassword2").value.length&&Q("apassword2").value==Q("apassword1").value,r=0==newAccountPass||0<Q("anewaccountpass").value.length,l=s&&a&&t&&o&&r;if(QS("nuUser").color=s?"black":"#7b241c",QS("nuEmail").color=a?"black":"#7b241c",QS("nuPass1").color=t?"black":"#7b241c",QS("nuPass2").color=o?"black":"#7b241c",QS("nuToken").color=r?"black":"#7b241c",""==Q("apassword1").value)QH("passWarning",""),QV("passwordPolicyCallout",!1);else if(passRequirementsEx){0==checkPasswordRequirements(Q("apassword1").value,passRequirements)?(l=!1,QS("nuPass1").color="#7b241c",QS("nuPass2").color="#7b241c",QH("passWarning","<div style=color:red;cursor:pointer onclick=showPasswordPolicy()><b>Password Policy</b><div>"),QV("passwordPolicyCallout",!0),QH("passwordPolicyCallout",passwordPolicyText(Q("apassword1").value))):(QH("passWarning",""),QV("passwordPolicyCallout",!1))}else{var u=checkPasswordStrength(Q("apassword1").value);80<=u?QH("passWarning","<span style=color:green><b>Mot de passe fort</b><span>"):60<=u?QH("passWarning","<span style=color:blue><b>Bon mot de passe</b><span>"):QH("passWarning","<span style=color:red><b>Mot de passe faible</b><span>")}null!=n&&13==n.keyCode&&(1==e&&s&&Q("aemail").focus(),2==e&&a&&Q("apassword1").focus(),3==e&&t&&Q("apassword2").focus(),4==e&&o&&(!0===passRequirements.hint?Q("apasswordhint").focus():e=5),5==e&&(1==newAccountPass?Q("anewaccountpass").focus():e=6),6==e&&Q("createButton").click()),null!=n&&haltEvent(n),QE("createButton",l)}function validatePassReset(e,n){setDialogMode(0);var s=0<Q("rapassword1").value.length,a=0<Q("rapassword2").value.length&&Q("rapassword2").value==Q("rapassword1").value,t=s&&a;if(QS("rnuPass1").color=s?"black":"#7b241c",QS("rnuPass2").color=a?"black":"#7b241c",""==Q("rapassword1").value)QH("rpassWarning",""),QV("rpasswordPolicyCallout",!1);else if(passRequirementsEx){0==checkPasswordRequirements(Q("rapassword1").value,passRequirements)?(t=!1,QS("rnuPass1").color="#7b241c",QS("rnuPass2").color="#7b241c",QH("rpassWarning","<div style=color:red;cursor:pointer onclick=showPasswordPolicy()><b>Password Policy</b><div>"),QV("rpasswordPolicyCallout",!0),QH("rpasswordPolicyCallout",passwordPolicyText(Q("rapassword1").value))):(QH("rpassWarning",""),QV("rpasswordPolicyCallout",!1))}else{var o=checkPasswordStrength(Q("rapassword1").value);80<=o?QH("rpassWarning","<span style=color:green><b>Mot de passe fort</b><span>"):60<=o?QH("rpassWarning","<span style=color:blue><b>Bon mot de passe</b><span>"):QH("rpassWarning","<span style=color:red><b>Mot de passe faible</b><span>")}null!=n&&13==n.keyCode&&(2==e&&Q("rapassword1").focus(),3==e&&Q("rapassword2").focus(),4==e&&Q("rapasswordhint").focus(),6==e&&Q("resetPassButton").click()),null!=n&&haltEvent(n),QE("resetPassButton",t)}function passwordPolicyText(e){var n="<div style=text-align:left>",s=strCount(e);return passRequirements.min&&(null==e||e.length<passRequirements.min)&&(n+=format("Minimum length of {0}",passRequirements.min)+"<br />"),passRequirements.max&&(null==e||e.length>passRequirements.max)&&(n+=format("Maximum length of {0}",passRequirements.max)+"<br />"),passRequirements.upper&&(null==e||s.upper<passRequirements.upper)&&(n+=format("{0} upper case",passRequirements.upper)+"<br />"),passRequirements.lower&&(null==e||s.lower<passRequirements.lower)&&(n+=format("{0} lower case",passRequirements.lower)+"<br />"),passRequirements.numeric&&(null==e||s.numeric<passRequirements.numeric)&&(n+=format("{0} numeric",passRequirements.numeric)+"<br />"),passRequirements.nonalpha&&(null==e||s.nonalpha<passRequirements.nonalpha)&&(n+=format("{0} non-alphanumeric",passRequirements.nonalpha)+"<br />"),n+="</div>"}function showPasswordPolicy(){messagebox("Password Policy",passwordPolicyText())}function validateReset(e){setDialogMode(0);var n=validateEmail(Q("remail").value);QE("eresetButton",n),null!=e&&13==e.keyCode&&1==n&&Q("eresetButton").click(),null!=e&&haltEvent(e)}function checkPasswordStrength(e){var n=0,s={},a=0,t={digits:/\d/.test(e),lower:/[a-z]/.test(e),upper:/[A-Z]/.test(e),nonWords:/\W/.test(e)};if(!e)return 0;for(var o=0;o<e.length;o++)s[e[o]]=(s[e[o]]||0)+1,n+=5/s[e[o]];for(var r in t)a+=1==t[r]?1:0;return parseInt(n+10*(a-1))}function checkPasswordRequirements(e,n){if(null==n||""==n||"object"!=typeof n)return!0;if(n.min&&e.length<n.min)return!1;if(n.max&&e.length>n.max)return!1;var s=strCount(e);return!(n.numeric&&s.numeric<n.numeric)&&(!(n.lower&&s.lower<n.lower)&&(!(n.upper&&s.upper<n.upper)&&!(n.nonalpha&&s.nonalpha<n.nonalpha)))}function strCount(e){var n={numeric:0,lower:0,upper:0,nonalpha:0};if("string"!=typeof e)return n;for(var s=0;s<e.length;s++)/\d/.test(e[s])&&n.numeric++,/[a-z]/.test(e[s])&&n.lower++,/[A-Z]/.test(e[s])&&n.upper++,/\W/.test(e[s])&&n.nonalpha++;return n}function checkToken(){var e=Q("tokenInput").value,n=e.split(" ").join("");e!=n&&(Q("tokenInput").value=n),QE("tokenOkButton",6==Q("tokenInput").value.length||8==Q("tokenInput").value.length||44==Q("tokenInput").value.length)}function resetCheckToken(){var e=Q("resetTokenInput").value,n=e.split(" ").join("");e!=n&&(Q("resetTokenInput").value=n),QE("resetTokenOkButton",6==Q("resetTokenInput").value.length||8==Q("resetTokenInput").value.length||44==Q("resetTokenInput").value.length)}var xxcurrentView=0;function setDialogMode(e,n,s,a,t,o){xxdialogMode=e,xxdialogFunc=a,xxdialogButtons=s,xxdialogTag=o,QE("idx_dlgOkButton",!0),QV("idx_dlgOkButton",1&s),QV("idx_dlgCancelButton",2&s),QV("id_dialogclose",2&s||8&s),QV("idx_dlgButtonBar",7&s),n&&QH("id_dialogtitle",n);for(var r=1;r<24;r++)QV("dialog"+r,r==e);QV("dialog",e),t&&(2==e?QH("id_dialogOptions",t):QH("id_dialogMessage",t))}function dialogclose(e){var n=xxdialogFunc,s=xxdialogButtons,a=xxdialogTag;setDialogMode(),(8&s||e)&&n&&n(e,a)}function toggleFullScreen(e){0==webPageFullScreen?QC("body").remove("fullscreen"):QC("body").add("fullscreen"),QV("body",!0),center()}function showUserInterfaceSelectMenu(){Q("uiViewButton1").classList.remove("uiSelectorSel"),Q("uiViewButton2").classList.remove("uiSelectorSel"),Q("uiViewButton3").classList.remove("uiSelectorSel");try{Q("uiViewButton"+uiMode).classList.add("uiSelectorSel")}catch(e){}QV("uiMenu","none"==QS("uiMenu").display),nightMode&&Q("uiViewButton4").classList.add("uiSelectorSel")}function userInterfaceSelectMenu(e){e&&putstore("uiMode",uiMode=e),webPageFullScreen=uiMode<3,toggleFullScreen(0)}function toggleNightMode(){(nightMode=!nightMode)?QC("body").add("night"):QC("body").remove("night"),putstore("_nightMode",nightMode?"1":"0")}function center(){if(0==webPageFullScreen)QS("centralTable")["margin-top"]="";else{var e=Q("column_l").clientHeight/2-220;e<0&&(e=0),QS("centralTable")["margin-top"]=e+"px"}}function messagebox(e,n){QH("id_dialogMessage",n),setDialogMode(1,e,1)}function statusbox(e,n){QH("id_dialogMessage",n),setDialogMode(1,e)}function getDocWidth(){return window.innerWidth?window.innerWidth:document.documentElement&&document.documentElement.clientWidth&&0!=document.documentElement.clientWidth?document.documentElement.clientWidth:document.getElementsByTagName("body")[0].clientWidth}function haltEvent(e){return e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1}function haltReturn(e){13==e.keyCode&&haltEvent(e)}function validateEmail(e){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function putstore(e,n){try{if("undefined"==typeof localStorage)return;localStorage.setItem(e,n)}catch(e){}}function getstore(e,n){try{if("undefined"==typeof localStorage)return n;var s=localStorage.getItem(e);return null==s||null==s?n:s}catch(e){return n}}function format(e){var s=Array.prototype.slice.call(arguments,1);return e.replace(/{(\d+)}/g,function(e,n){return void 0!==s[n]?s[n]:e})}</script>
\ No newline at end of file
1 +<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link rel="shortcut icon"type=image/x-icon href={{{domainurl}}}favicon.ico><link keeplink=1 type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><script keeplink=1 src=scripts/u2f-api.js></script><title>{{{title}}} - Login</title><body id=body onload='"undefined"!=typeof startup&&startup()'class="arg_hide login"><div id=container><div id=masthead><div class=title>{{{title}}}</div><div class=title2>{{{title2}}}</div></div><div id=topbar class="noselect style3"style=height:24px><div id=uiMenuButton title="User interface selection"onclick=showUserInterfaceSelectMenu()>♦<div id=uiMenu style=display:none><div id=uiViewButton1 class=uiSelector onclick=userInterfaceSelectMenu(1) title="Left bar interface"><div class=uiSelector1></div></div><div id=uiViewButton2 class=uiSelector onclick=userInterfaceSelectMenu(2) title="Top bar interface"><div class=uiSelector2></div></div><div id=uiViewButton3 class=uiSelector onclick=userInterfaceSelectMenu(3) title="Fixed width interface"><div class=uiSelector3></div></div><div id=uiViewButton4 class=uiSelector onclick=toggleNightMode() title="Basculer mode nuit"><div class=uiSelector4></div></div></div></div></div><div id=column_l><h1>Bienvenue</h1><div id=welcomeText style=display:none>Connect to your home or office devices from anywhere in the world using <a href=http://www.meshcommander.com/meshcentral2>MeshCentral</a>, the real time, open source remote monitoring and management web site. You will need to download and install a management agent on your computers. Once installed, computers will show up in the "My Devices" section of this web site and you will be able to monitor them and take control of them.</div><table id=centralTable><tr><td id=welcomeimage><picture><img alt=""src=welcome.jpg style=border-radius:20px></picture><td id=logincell><div id=loginpanel style=display:none><form method=post><input type=hidden name=action value=login><div id=message1>{{{message}}}</div><div><b>Log In</b></div><table><tr><td id=loginusername align=right width=100>Nom d'utilisateur:<td><input id=username maxlength=64 name=username onchange=validateLogin(1) onkeyup=validateLogin(1,event)><tr><td align=right>Mot de passe:<td><input id=password type=password maxlength=256 name=password autocomplete=off onchange=validateLogin(2) onkeyup=validateLogin(2,event)><tr><td><div id=showPassHintLink style=display:none><a onclick="return showPassHint(event)"href=# style=cursor:pointer>Dévoiler indice</a></div><td align=right><input id=loginButton type=submit value="Log In"disabled></table><div id=hrAccountDiv style=display:none><hr></div><div id=resetAccountDiv style=display:none;padding:2px><span id=resetAccountSpan>Forgot username/password?</span> <a onclick="return xgo(3,event)"href=# style=cursor:pointer>Réinitialiser le compte</a>.</div><div id=newAccountDiv style=display:none;padding:2px>Don't have an account? <a onclick="return xgo(2,event)"href=# style=cursor:pointer>Create one</a>.</div><input id=loginformargs name=urlargs type=hidden></form></div><div id=createpanel style=display:none;position:relative><form method=post><input type=hidden name=action value=createaccount><div id=message2>{{{message}}}</div><div><b>Account Creation</b></div><div id=passwordPolicyCallout style=display:none></div><table><tr id=nuUserRow><td id=nuUser align=right width=100>Nom d'utilisateur:<td><input id=ausername name=username onchange=validateCreate(1) maxlength=64 onkeydown=haltReturn(event) onkeyup=validateCreate(1,event)><tr><td id=nuEmail align=right width=100>Email:<td><input id=aemail name=email onchange=validateCreate(2) maxlength=256 onkeydown=haltReturn(event) onkeyup=validateCreate(2,event)><tr><td id=nuPass1 align=right>Mot de passe:<td><input id=apassword1 type=password name=password1 autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validateCreate(3,event) onkeyup=validateCreate(3,event)><tr><td id=nuPass2 align=right>Mot de passe:<td><input id=apassword2 type=password name=password2 autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validateCreate(4,event) onkeyup=validateCreate(4,event)><tr id=createPanelHint style=display:none><td id=nuHint align=right>Password Hint:<td><input id=apasswordhint name=apasswordhint autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validateCreate(5,event) onkeyup=validateCreate(5,event)><tr id=newAccountPass title="Enter the account creation token"><td id=nuToken align=right>Creation Token:<td><input id=anewaccountpass type=password name=anewaccountpass autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validateCreate(6,event) onkeyup=validateCreate(6,event)><tr><td colspan=2><div style=float:right><input id=createButton type=submit value="Create Account"disabled></div><div id=passWarning style=padding-top:6px></div></table><hr><a onclick="return xgo(1,event)"href=# style=cursor:pointer>Back to login</a> <input id=createformargs name=urlargs type=hidden></form></div><div id=resetpanel style=display:none><form method=post><input type=hidden name=action value=resetaccount><div id=message3>{{{message}}}</div><div><b>Account Reset</b></div><table><tr><td align=right width=100>Email:<td><input id=remail name=email maxlength=256 onchange=validateReset() onkeyup=validateReset(event)><tr><td colspan=2><div style=float:right><input id=eresetButton type=submit value="Réinitialiser le Compte"disabled></div><div id=passWarning style=padding-top:6px></div></table><hr><a onclick="return xgo(1,event)"href=# style=cursor:pointer>Back to login</a> <input id=resetformargs name=urlargs type=hidden></form></div><div id=tokenpanel style=display:none><form method=post autocomplete=off><input type=hidden name=action value=tokenlogin> <input type=hidden name=hwstate value={{{hwstate}}}><div id=message4>{{{message}}}</div><table><tr><td align=right width=100>Login token:<td><input id=tokenInput name=token maxlength=50 onchange=checkToken(event) onpaste=resetCheckToken(event) onkeyup=checkToken(event) onkeydown=checkToken(event)> <input id=hwtokenInput name=hwtoken style=display:none><tr><td colspan=2><div style=float:right><input id=tokenOkButton type=submit value=Login disabled></div></table><hr><a onclick="return xgo(1,event)"href=# style=cursor:pointer>Back to login</a> <input id=tokenformargs name=urlargs type=hidden></form></div><div id=resettokenpanel style=display:none><form method=post><input type=hidden name=action value=resetaccount><div id=message5>{{{message}}}</div><table><tr><td align=right width=100>Login token:<td><input id=resetTokenInput name=token maxlength=50 onchange=resetCheckToken(event) onkeyup=resetCheckToken(event) onkeydown=resetCheckToken(event)> <input id=resetHwtokenInput name=hwtoken style=display:none><tr><td colspan=2><div style=float:right><input id=resetTokenOkButton type=submit value=Login disabled></div></table><hr><a onclick="return xgo(1,event)"href=# style=cursor:pointer>Back to login</a> <input id=resettokenformargs name=urlargs type=hidden></form></div><div id=resetpasswordpanel style=display:none;position:relative><form method=post><input type=hidden name=action value=resetpassword><div id=message6>{{{message}}}</div><div id=rpasswordPolicyCallout style=display:none></div><table><tr><td id=rnuPass1 width=100 align=right>Mot de passe:<td><input id=rapassword1 type=password name=rpassword1 autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validatePassReset(3,event) onkeyup=validatePassReset(3,event)><tr><td id=rnuPass2 align=right>Mot de passe:<td><input id=rapassword2 type=password name=rpassword2 autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validatePassReset(4,event) onkeyup=validatePassReset(4,event)><tr id=resetpasswordpanelHint style=display:none><td id=rnuHint align=right>Password Hint:<td><input id=rapasswordhint name=rpasswordhint autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validatePassReset(5,event) onkeyup=validatePassReset(5,event)><tr><td colspan=2><div style=float:right><input id=resetPassButton type=submit value="Réinitialiser le mot de passe"disabled></div><div id=rpassWarning style=padding-top:6px></div></table><hr><a onclick="return xgo(1,event)"href=# style=cursor:pointer>Back to login</a> <input id=resetpasswordformargs name=urlargs type=hidden></form></div></table><br></div><div id=footer><div class=footer1>{{{footer}}}</div><div class=footer2>{{{rootCertLink}}} &nbsp;<a href=terms>Terms &amp; Privacy</a></div></div></div><div id=dialog style=display:none><div id=dialogHeader><div id=id_dialogclose style=float:right;padding:5px;cursor:pointer onclick=setDialogMode()><b>X</b></div><div id=id_dialogtitle style=padding:5px></div><div style=width:100%;margin:6px></div></div><div id=dialogBody><div id=dialog1><div id=id_dialogMessage></div></div><div id=dialog2><div id=id_dialogOptions></div></div></div><div id=idx_dlgButtonBar><input id=idx_dlgCancelButton type=button value=Annuler onclick=dialogclose(0)> <input id=idx_dlgOkButton type=button value=OK onclick=dialogclose(1)></div></div><script>"use strict";var xxdialogMode,xxdialogFunc,xxdialogButtons,xxdialogTag,passhint="{{{passhint}}}",loginMode="{{{loginmode}}}",newAccount="{{{newAccount}}}",newAccountPass=parseInt("{{{newAccountPass}}}"),emailCheck=!1,passRequirements="{{{passRequirements}}}",hardwareKeyChallenge=decodeURIComponent("{{{hkey}}}"),passRequirementsEx=null!=(passRequirements=""!=passRequirements?JSON.parse(decodeURIComponent(passRequirements)):{}).min||null!=passRequirements.max||null!=passRequirements.upper||null!=passRequirements.lower||null!=passRequirements.numeric||null!=passRequirements.nonalpha,features=parseInt("{{{features}}}"),welcomeText=decodeURIComponent("{{{welcometext}}}"),currentpanel=0,uiMode=parseInt(getstore("uiMode","1")),webPageFullScreen=!0,nightMode="1"==getstore("_nightMode","0"),publicKeyCredentialRequestOptions=null;if(0<window.location.href.indexOf("?")){var urlargs=window.location.href.substring(window.location.href.indexOf("?"));Q("loginformargs").value=urlargs,Q("createformargs").value=urlargs,Q("resetformargs").value=urlargs,Q("tokenformargs").value=urlargs,Q("resettokenformargs").value=urlargs,Q("resetpasswordformargs").value=urlargs}function startup(){if(0==(32&features)){var e=null;try{e=top.location.toString().toLowerCase()}catch(e){}if(top!=self&&(null==e||0==top.active))return void(top.location=self.location)}if(2097152&features&&(QH("loginusername","Email:"),QH("resetAccountSpan","Forgot password?"),QV("nuUserRow",!1)),nightMode&&QC("body").add("night"),QV("createPanelHint",!0===passRequirements.hint),QV("resetpasswordpanelHint",!0===passRequirements.hint),welcomeText&&QH("welcomeText",welcomeText),QV("welcomeText",!0),(window.onresize=center)(),validateLogin(),validateCreate(),0!=loginMode.length?go(parseInt(loginMode)):go(1),QV("newAccountDiv","1"===newAccount||"true"===newAccount),null!=passhint&&0<passhint.length&&QV("showPassHintLink",!0),QV("newAccountPass",1==newAccountPass),QV("resetAccountDiv",1==emailCheck),QV("hrAccountDiv",1==emailCheck||1==newAccountPass),"4"==loginMode){try{hardwareKeyChallenge=0<hardwareKeyChallenge.length?JSON.parse(hardwareKeyChallenge):null}catch(e){hardwareKeyChallenge=null}if(null!=hardwareKeyChallenge&&"webAuthn"==hardwareKeyChallenge.type){hardwareKeyChallenge.challenge=Uint8Array.from(atob(hardwareKeyChallenge.challenge),function(e){return e.charCodeAt(0)}).buffer,publicKeyCredentialRequestOptions={challenge:hardwareKeyChallenge.challenge,allowCredentials:[],timeout:hardwareKeyChallenge.timeout};for(var a=0;a<hardwareKeyChallenge.keyIds.length;a++)publicKeyCredentialRequestOptions.allowCredentials.push({id:Uint8Array.from(atob(hardwareKeyChallenge.keyIds[a]),function(e){return e.charCodeAt(0)}),type:"public-key",transports:["usb","ble","nfc"]});navigator.credentials.get({publicKey:publicKeyCredentialRequestOptions}).then(function(e){var a={id:btoa(String.fromCharCode.apply(null,new Uint8Array(e.rawId))),clientDataJSON:btoa(String.fromCharCode.apply(null,new Uint8Array(e.response.clientDataJSON))),userHandle:btoa(String.fromCharCode.apply(null,new Uint8Array(e.response.userHandle))),signature:btoa(String.fromCharCode.apply(null,new Uint8Array(e.response.signature))),authenticatorData:btoa(String.fromCharCode.apply(null,new Uint8Array(e.response.authenticatorData)))};Q("hwtokenInput").value=JSON.stringify(a),QE("tokenOkButton",!0),Q("tokenOkButton").click()},function(e){console.log("credentials-get error",e)})}}if("5"==loginMode){try{hardwareKeyChallenge=0<hardwareKeyChallenge.length?JSON.parse(hardwareKeyChallenge):null}catch(e){hardwareKeyChallenge=null}if(null!=hardwareKeyChallenge&&"webAuthn"==hardwareKeyChallenge.type){hardwareKeyChallenge.challenge=Uint8Array.from(atob(hardwareKeyChallenge.challenge),function(e){return e.charCodeAt(0)}).buffer,publicKeyCredentialRequestOptions={challenge:hardwareKeyChallenge.challenge,allowCredentials:[],timeout:hardwareKeyChallenge.timeout};for(a=0;a<hardwareKeyChallenge.keyIds.length;a++)publicKeyCredentialRequestOptions.allowCredentials.push({id:Uint8Array.from(atob(hardwareKeyChallenge.keyIds[a]),function(e){return e.charCodeAt(0)}),type:"public-key",transports:["usb","ble","nfc"]});navigator.credentials.get({publicKey:publicKeyCredentialRequestOptions}).then(function(e){var a={id:btoa(String.fromCharCode.apply(null,new Uint8Array(e.rawId))),clientDataJSON:btoa(String.fromCharCode.apply(null,new Uint8Array(e.response.clientDataJSON))),userHandle:btoa(String.fromCharCode.apply(null,new Uint8Array(e.response.userHandle))),signature:btoa(String.fromCharCode.apply(null,new Uint8Array(e.response.signature))),authenticatorData:btoa(String.fromCharCode.apply(null,new Uint8Array(e.response.authenticatorData)))};Q("resetHwtokenInput").value=JSON.stringify(a),QE("resetTokenOkButton",!0),Q("resetTokenOkButton").click()},function(e){console.log("credentials-get error",e)})}}userInterfaceSelectMenu()}function showPassHint(e){return messagebox("Password Hint",passhint),haltEvent(e),!1}function xgo(e,a){return QV("message1",!1),QV("message2",!1),QV("message3",!1),QV("message4",!1),QV("message5",!1),QV("message6",!1),go(e),haltEvent(a),!1}function go(e){currentpanel=e,setDialogMode(0),QV("showPassHintLink",!1),QV("loginpanel",1==e),QV("createpanel",2==e),QV("resetpanel",3==e),QV("tokenpanel",4==e),QV("resettokenpanel",5==e),QV("resetpasswordpanel",6==e),1==e&&Q("username").focus(),2==e&&(2097152&features?Q("aemail").focus():Q("ausername").focus()),3==e&&Q("remail").focus(),4==e&&Q("tokenInput").focus(),5==e&&Q("resetTokenInput").focus(),6==e&&Q("rapassword1").focus()}function validateLogin(e,a){var n=0<Q("username").value.length&&-1==Q("username").value.indexOf(" ")&&0<Q("password").value.length;QE("loginButton",n),setDialogMode(0),null!=a&&13==a.keyCode&&(1==e&&""!=Q("username").value?Q("password").focus():2==e&&""!=Q("password").value&&Q("loginButton").click()),null!=a&&haltEvent(a)}function validateCreate(e,a){setDialogMode(0);var n=!1;n=!!(2097152&features)||0<Q("ausername").value.length&&-1==Q("ausername").value.indexOf(" ")&&-1==Q("ausername").value.indexOf('"')&&-1==Q("ausername").value.indexOf(",");var t=1==validateEmail(Q("aemail").value),r=0<Q("apassword1").value.length,o=0<Q("apassword2").value.length&&Q("apassword2").value==Q("apassword1").value,s=0==newAccountPass||0<Q("anewaccountpass").value.length,l=n&&t&&r&&o&&s;if(QS("nuUser").color=n?"black":"#7b241c",QS("nuEmail").color=t?"black":"#7b241c",QS("nuPass1").color=r?"black":"#7b241c",QS("nuPass2").color=o?"black":"#7b241c",QS("nuToken").color=s?"black":"#7b241c",""==Q("apassword1").value)QH("passWarning",""),QV("passwordPolicyCallout",!1);else if(passRequirementsEx){0==checkPasswordRequirements(Q("apassword1").value,passRequirements)?(l=!1,QS("nuPass1").color="#7b241c",QS("nuPass2").color="#7b241c",QH("passWarning","<div style=color:red;cursor:pointer onclick=showPasswordPolicy()><b>Password Policy</b><div>"),QV("passwordPolicyCallout",!0),QH("passwordPolicyCallout",passwordPolicyText(Q("apassword1").value))):(QH("passWarning",""),QV("passwordPolicyCallout",!1))}else{var u=checkPasswordStrength(Q("apassword1").value);80<=u?QH("passWarning","<span style=color:green><b>Mot de passe fort</b><span>"):60<=u?QH("passWarning","<span style=color:blue><b>Bon mot de passe</b><span>"):QH("passWarning","<span style=color:red><b>Mot de passe faible</b><span>")}null!=a&&13==a.keyCode&&(1==e&&n&&Q("aemail").focus(),2==e&&t&&Q("apassword1").focus(),3==e&&r&&Q("apassword2").focus(),4==e&&o&&(!0===passRequirements.hint?Q("apasswordhint").focus():e=5),5==e&&(1==newAccountPass?Q("anewaccountpass").focus():e=6),6==e&&Q("createButton").click()),null!=a&&haltEvent(a),QE("createButton",l)}function validatePassReset(e,a){setDialogMode(0);var n=0<Q("rapassword1").value.length,t=0<Q("rapassword2").value.length&&Q("rapassword2").value==Q("rapassword1").value,r=n&&t;if(QS("rnuPass1").color=n?"black":"#7b241c",QS("rnuPass2").color=t?"black":"#7b241c",""==Q("rapassword1").value)QH("rpassWarning",""),QV("rpasswordPolicyCallout",!1);else if(passRequirementsEx){0==checkPasswordRequirements(Q("rapassword1").value,passRequirements)?(r=!1,QS("rnuPass1").color="#7b241c",QS("rnuPass2").color="#7b241c",QH("rpassWarning","<div style=color:red;cursor:pointer onclick=showPasswordPolicy()><b>Password Policy</b><div>"),QV("rpasswordPolicyCallout",!0),QH("rpasswordPolicyCallout",passwordPolicyText(Q("rapassword1").value))):(QH("rpassWarning",""),QV("rpasswordPolicyCallout",!1))}else{var o=checkPasswordStrength(Q("rapassword1").value);80<=o?QH("rpassWarning","<span style=color:green><b>Mot de passe fort</b><span>"):60<=o?QH("rpassWarning","<span style=color:blue><b>Bon mot de passe</b><span>"):QH("rpassWarning","<span style=color:red><b>Mot de passe faible</b><span>")}null!=a&&13==a.keyCode&&(2==e&&Q("rapassword1").focus(),3==e&&Q("rapassword2").focus(),4==e&&Q("rapasswordhint").focus(),6==e&&Q("resetPassButton").click()),null!=a&&haltEvent(a),QE("resetPassButton",r)}function passwordPolicyText(e){var a="<div style=text-align:left>",n=strCount(e);return passRequirements.min&&(null==e||e.length<passRequirements.min)&&(a+=format("Minimum length of {0}",passRequirements.min)+"<br />"),passRequirements.max&&(null==e||e.length>passRequirements.max)&&(a+=format("Maximum length of {0}",passRequirements.max)+"<br />"),passRequirements.upper&&(null==e||n.upper<passRequirements.upper)&&(a+=format("{0} upper case",passRequirements.upper)+"<br />"),passRequirements.lower&&(null==e||n.lower<passRequirements.lower)&&(a+=format("{0} lower case",passRequirements.lower)+"<br />"),passRequirements.numeric&&(null==e||n.numeric<passRequirements.numeric)&&(a+=format("{0} numeric",passRequirements.numeric)+"<br />"),passRequirements.nonalpha&&(null==e||n.nonalpha<passRequirements.nonalpha)&&(a+=format("{0} non-alphanumeric",passRequirements.nonalpha)+"<br />"),a+="</div>"}function showPasswordPolicy(){messagebox("Password Policy",passwordPolicyText())}function validateReset(e){setDialogMode(0);var a=validateEmail(Q("remail").value);QE("eresetButton",a),null!=e&&13==e.keyCode&&1==a&&Q("eresetButton").click(),null!=e&&haltEvent(e)}function checkPasswordStrength(e){var a=0,n={},t=0,r={digits:/\d/.test(e),lower:/[a-z]/.test(e),upper:/[A-Z]/.test(e),nonWords:/\W/.test(e)};if(!e)return 0;for(var o=0;o<e.length;o++)n[e[o]]=(n[e[o]]||0)+1,a+=5/n[e[o]];for(var s in r)t+=1==r[s]?1:0;return parseInt(a+10*(t-1))}function checkPasswordRequirements(e,a){if(null==a||""==a||"object"!=typeof a)return!0;if(a.min&&e.length<a.min)return!1;if(a.max&&e.length>a.max)return!1;var n=strCount(e);return!(a.numeric&&n.numeric<a.numeric)&&(!(a.lower&&n.lower<a.lower)&&(!(a.upper&&n.upper<a.upper)&&!(a.nonalpha&&n.nonalpha<a.nonalpha)))}function strCount(e){var a={numeric:0,lower:0,upper:0,nonalpha:0};if("string"!=typeof e)return a;for(var n=0;n<e.length;n++)/\d/.test(e[n])&&a.numeric++,/[a-z]/.test(e[n])&&a.lower++,/[A-Z]/.test(e[n])&&a.upper++,/\W/.test(e[n])&&a.nonalpha++;return a}function checkToken(){var e=Q("tokenInput").value,a=e.split(" ").join("");e!=a&&(Q("tokenInput").value=a),QE("tokenOkButton",6==Q("tokenInput").value.length||8==Q("tokenInput").value.length||44==Q("tokenInput").value.length)}function resetCheckToken(){var e=Q("resetTokenInput").value,a=e.split(" ").join("");e!=a&&(Q("resetTokenInput").value=a),QE("resetTokenOkButton",6==Q("resetTokenInput").value.length||8==Q("resetTokenInput").value.length||44==Q("resetTokenInput").value.length)}var xxcurrentView=0;function setDialogMode(e,a,n,t,r,o){xxdialogMode=e,xxdialogFunc=t,xxdialogButtons=n,xxdialogTag=o,QE("idx_dlgOkButton",!0),QV("idx_dlgOkButton",1&n),QV("idx_dlgCancelButton",2&n),QV("id_dialogclose",2&n||8&n),QV("idx_dlgButtonBar",7&n),a&&QH("id_dialogtitle",a);for(var s=1;s<24;s++)QV("dialog"+s,s==e);QV("dialog",e),r&&(2==e?QH("id_dialogOptions",r):QH("id_dialogMessage",r))}function dialogclose(e){var a=xxdialogFunc,n=xxdialogButtons,t=xxdialogTag;setDialogMode(),(8&n||e)&&a&&a(e,t)}function toggleFullScreen(e){0==webPageFullScreen?QC("body").remove("fullscreen"):QC("body").add("fullscreen"),QV("body",!0),center()}function showUserInterfaceSelectMenu(){Q("uiViewButton1").classList.remove("uiSelectorSel"),Q("uiViewButton2").classList.remove("uiSelectorSel"),Q("uiViewButton3").classList.remove("uiSelectorSel");try{Q("uiViewButton"+uiMode).classList.add("uiSelectorSel")}catch(e){}QV("uiMenu","none"==QS("uiMenu").display),nightMode&&Q("uiViewButton4").classList.add("uiSelectorSel")}function userInterfaceSelectMenu(e){e&&putstore("uiMode",uiMode=e),webPageFullScreen=uiMode<3,toggleFullScreen(0)}function toggleNightMode(){(nightMode=!nightMode)?QC("body").add("night"):QC("body").remove("night"),putstore("_nightMode",nightMode?"1":"0")}function center(){if(0==webPageFullScreen)QS("centralTable")["margin-top"]="";else{var e=Q("column_l").clientHeight/2-220;e<0&&(e=0),QS("centralTable")["margin-top"]=e+"px"}}function messagebox(e,a){QH("id_dialogMessage",a),setDialogMode(1,e,1)}function statusbox(e,a){QH("id_dialogMessage",a),setDialogMode(1,e)}function getDocWidth(){return window.innerWidth?window.innerWidth:document.documentElement&&document.documentElement.clientWidth&&0!=document.documentElement.clientWidth?document.documentElement.clientWidth:document.getElementsByTagName("body")[0].clientWidth}function haltEvent(e){return e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1}function haltReturn(e){13==e.keyCode&&haltEvent(e)}function validateEmail(e){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function putstore(e,a){try{if("undefined"==typeof localStorage)return;localStorage.setItem(e,a)}catch(e){}}function getstore(e,a){try{if("undefined"==typeof localStorage)return a;var n=localStorage.getItem(e);return null==n||null==n?a:n}catch(e){return a}}function format(e){var n=Array.prototype.slice.call(arguments,1);return e.replace(/{(\d+)}/g,function(e,a){return void 0!==n[a]?n[a]:e})}</script>
\ No newline at end of file
views/translations/login-mobile-min_fr.handlebars
+1 -1
@@ -1 +1 @@
1 -<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link rel="shortcut icon"type=image/x-icon href={{{domainurl}}}favicon.ico><script src=scripts/common-0.0.1.js></script><script src=scripts/u2f-api.js></script><title>MeshCentral - Login</title><style>a{color:#036;text-decoration:underline}#footer a{color:#fff;text-decoration:underline}#footer a:hover{color:#fff;text-decoration:none}</style><body onload='"undefined"!=typeof startup&&startup()'style="overflow-y:hidden;margin:0;padding:0;border:0;color:#000;font-size:13px;font-family:\'Trebuchet MS\',Arial,Helvetica,sans-serif"><div id=container><div id=mastheadx></div><div id=masthead style="background:url(logo.png) 0 0;background-size:341px 50px;background-color:#036;background-repeat:no-repeat;height:50px;width:100%;overflow:hidden"><div style=float:left;height:66px;color:#c8c8c8;padding-left:10px;padding-top:6px><strong><font style=font-size:36px;font-family:Arial,Helvetica,sans-serif>{{{title}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:10px><strong><font style=font-size:12px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><div id=page_content style=overflow-y:scroll;position:absolute;bottom:32px;top:50px;width:100%;display:flex;align-items:center><div id=column_l style=padding:10px;width:100%><table style=width:100%><tr><td align=center><div id=loginpanel style=background-color:#979797;border-radius:16px;width:260px;padding:16px;text-align:center;clear:both;display:none><form method=post><input type=hidden name=action value=login><div id=message1>{{{message}}}</div><div><b>Log In</b></div><table><tr><td id=loginusername align=right width=100>Nom d'utilisateur:<td><input id=username maxlength=64 name=username onchange=validateLogin(1) onkeyup=validateLogin(1,event)><tr><td align=right>Mot de passe:<td><input id=password type=password maxlength=256 name=password autocomplete=off onchange=validateLogin(2) onkeyup=validateLogin(2,event)><tr><td><div id=showPassHintLink style=display:none><a onclick=showPassHint() style=cursor:pointer>Dévoiler indice</a></div><td align=right><input id=loginButton type=submit value="Log In"disabled></table><div id=hrAccountDiv style=display:none><hr></div><div id=resetAccountDiv style=display:none;padding:2px><span id=resetAccountSpan>Forgot user/password?</span><a onclick=xgo(3) style=cursor:pointer>Réinitialiser le compte</a>.</div><div id=newAccountDiv style=display:none;padding:2px>Don't have an account?<a onclick=xgo(2) style=cursor:pointer>Create one</a>.</div><input id=loginformargs name=urlargs type=hidden></form></div><div id=createpanel style=display:none><div style=background-color:#979797;border-radius:16px;width:260px;padding:16px;text-align:center;clear:both;position:relative><form method=post><input type=hidden name=action value=createaccount><div id=message2>{{{message}}}</div><div><b>Account Creation</b></div><div id=passwordPolicyCallout style="left:-5px;top:10px;width:100px;position:absolute;background-color:#ffc;border-radius:5px;padding:5px;box-shadow:0 0 15px #666;font-size:10px"></div><table><tr id=nuUserRow><td align=right width=100>Nom d'utilisateur:<td><input id=ausername name=username onchange=validateCreate(1) maxlength=64 onkeydown=haltReturn(event) onkeyup=validateCreate(1,event)><tr><td align=right width=100>Email:<td><input id=aemail name=email onchange=validateCreate(2) maxlength=256 onkeydown=haltReturn(event) onkeyup=validateCreate(2,event)><tr><td align=right>Mot de passe:<td><input id=apassword1 type=password name=password1 autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validateCreate(3) onkeyup=validateCreate(3,event)><tr><td align=right>Mot de passe:<td><input id=apassword2 type=password name=password2 autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validateCreate(4) onkeyup=validateCreate(4,event)><tr id=createPanelHint style=display:none><td align=right>Pass Hint:<td><input id=apasswordhint name=apasswordhint autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validateCreate(5) onkeyup=validateCreate(5,event)><tr id=newAccountPass title="Enter the account creation token"><td align=right>Creation Token:<td><input id=anewaccountpass type=password name=anewaccountpass autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validateCreate(6) onkeyup=validateCreate(6,event)><tr><td colspan=2><div style=float:right><input id=createButton type=submit value="Create Account"disabled></div><div id=passWarning style=padding-top:6px></div></table><hr><a onclick=xgo(1) style=cursor:pointer>Back to login</a><input id=createformargs name=urlargs type=hidden></form></div></div><div id=resetpanel style=background-color:#979797;border-radius:16px;width:260px;padding:16px;text-align:center;display:none;clear:both><form method=post><input type=hidden name=action value=resetaccount><div id=message3>{{{message}}}</div><div><b>Account Reset</b></div><table><tr><td align=right width=100>Email:<td><input id=remail name=email maxlength=256 onchange=validateReset() onkeyup=validateReset(event)><tr><td colspan=2><div style=float:right><input id=eresetButton type=submit value="Réinitialiser le Compte"disabled></div><div id=passWarning style=padding-top:6px></div></table><hr><a onclick=xgo(1) style=cursor:pointer>Back to login</a><input id=resetformargs name=urlargs type=hidden></form></div><div id=tokenpanel style=background-color:#979797;border-radius:16px;width:260px;padding:16px;text-align:center;display:none;clear:both><form method=post autocomplete=off><input type=hidden name=action value=tokenlogin> <input type=hidden name=hwstate value={{{hwstate}}}><div id=message4>{{{message}}}</div><table><tr><td align=right width=100>Login token:<td><input id=tokenInput name=token maxlength=50 onchange=checkToken(event) onkeyup=checkToken(event) onkeydown=checkToken(event) onfocus=checkTokenTimer(1) onblur=checkTokenTimer(0)> <input id=hwtokenInput name=hwtoken style=display:none><tr><td colspan=2><div style=float:right><input id=tokenOkButton type=submit value=Login disabled></div></table><hr><a onclick=xgo(1) style=cursor:pointer>Back to login</a><input id=tokenformargs name=urlargs type=hidden></form></div><div id=resettokenpanel style=background-color:#979797;border-radius:16px;width:260px;padding:16px;text-align:center;display:none;clear:both><form method=post autocomplete=off><input type=hidden name=action value=resetaccount><div id=message5>{{{message}}}</div><table><tr><td align=right width=100>Login token:<td><input id=resetTokenInput name=token maxlength=50 onchange=resetCheckToken(event) onpaste=resetCheckToken(event) onkeyup=resetCheckToken(event) onkeydown=resetCheckToken(event)> <input id=resetHwtokenInput name=hwtoken style=display:none><tr><td colspan=2><div style=float:right><input id=resetTokenOkButton type=submit value=Login disabled></div></table><hr><a onclick=xgo(1) style=cursor:pointer>Back to login</a><input id=resettokenformargs name=urlargs type=hidden></form></div><div id=resetpasswordpanel style=position:relative;background-color:#979797;border-radius:16px;width:300px;padding:16px;text-align:center;display:none><form method=post><input type=hidden name=action value=resetpassword><div id=message6>{{{message}}}</div><div id=rpasswordPolicyCallout style="left:-10px;width:100px;display:none;position:absolute;background-color:#ffc;border-radius:5px;padding:5px;box-shadow:0 0 15px #666;font-size:10px"></div><table><tr><td id=rnuPass1 width=100 align=right>Mot de passe:<td><input id=rapassword1 type=password name=rpassword1 autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validatePassReset(3,event) onkeyup=validatePassReset(3,event)><tr><td id=rnuPass2 align=right>Mot de passe:<td><input id=rapassword2 type=password name=rpassword2 autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validatePassReset(4,event) onkeyup=validatePassReset(4,event)><tr id=resetpasswordpanelHint style=display:none><td id=rnuHint align=right>Password Hint:<td><input id=rapasswordhint name=rpasswordhint autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validatePassReset(5,event) onkeyup=validatePassReset(5,event)><tr><td colspan=2><div style=float:right><input id=resetPassButton type=submit value="Réinitialiser le mot de passe"disabled></div><div id=rpassWarning style=padding-top:6px></div></table><hr><a onclick=xgo(1) style=cursor:pointer>Back to login</a><input id=resetpasswordformargs name=urlargs type=hidden></form></div></table></div></div><div id=footer style=height:32px;width:100%;text-align:center;background-color:#113962;position:absolute;bottom:0><table cellpadding=0 cellspacing=6 style=width:100%><tr><td style=text-align:left;color:#fff>{{{footer}}}<td style=text-align:right>{{{rootCertLink}}}&nbsp;<a href=terms>Terms &amp; Privacy</a></table></div></div><div id=dialog style="z-index:1000;background-color:#eee;box-shadow:0 0 15px #666;font-family:Arial,Helvetica,sans-serif;border-radius:5px;position:fixed;top:180px;width:400px;display:none"><div style="width:100%;background-color:#036;color:#fff;border-radius:5px 5px 0 0"><div id=id_dialogclose style=float:right;padding:5px;cursor:pointer onclick=setDialogMode()><b>X</b></div><div id=id_dialogtitle style=padding:5px></div><div style=width:100%;margin:6px></div></div><div style=margin-right:16px;margin-left:8px><div id=dialog1 style=margin:auto;text-align:center;margin:3px><div id=id_dialogMessage style=padding:10px></div></div><div id=dialog2 style=margin:auto;margin:3px><div id=id_dialogOptions></div></div></div><div id=idx_dlgButtonBar style=padding:10px;margin-bottom:20px><input id=idx_dlgCancelButton type=button value=Annuler style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)> <input id=idx_dlgOkButton type=button value=OK style=float:right;width:80px onclick=dialogclose(1)></div></div><script>"use strict";var passhint="{{{passhint}}}",newAccountPass=parseInt("{{{newAccountPass}}}"),emailCheck=!1,features=parseInt("{{{features}}}"),passRequirements="{{{passRequirements}}}",passRequirementsEx=null!=(passRequirements=""!=passRequirements?JSON.parse(decodeURIComponent(passRequirements)):{}).min||null!=passRequirements.max||null!=passRequirements.upper||null!=passRequirements.lower||null!=passRequirements.numeric||null!=passRequirements.nonalpha,hardwareKeyChallenge=decodeURIComponent("{{{hkey}}}"),currentpanel=0;if(0<window.location.href.indexOf("?")){var urlargs=window.location.href.substring(window.location.href.indexOf("?"));Q("loginformargs").value=urlargs,Q("createformargs").value=urlargs,Q("resetformargs").value=urlargs,Q("tokenformargs").value=urlargs,Q("resettokenformargs").value=urlargs,Q("resetpasswordformargs").value=urlargs}function startup(){if(0==(32&features)){var e=null;try{e=top.location.toString().toLowerCase()}catch(e){}if(top!=self&&(null==e||0==top.active))return void(top.location=self.location)}2097152&features&&(QH("loginusername","Email:"),QH("resetAccountSpan","Forgot password?"),QV("nuUserRow",!1)),QV("createPanelHint",!0===passRequirements.hint),QV("resetpasswordpanelHint",!0===passRequirements.hint),(window.onresize=center)(),validateLogin(),validateCreate(),go(parseInt("{{loginmode}}")),QV("newAccountDiv",!1),!0===passRequirements.hint&&null!=passhint&&0<passhint.length&&QV("showPassHintLink",!0),QV("newAccountPass",1==newAccountPass),QV("resetAccountDiv",1==emailCheck),QV("hrAccountDiv",1==emailCheck||1==newAccountPass)}function showPassHint(){!0===passRequirements.hint&&messagebox("Password Hint",passhint)}function xgo(e){QV("message1",!1),QV("message2",!1),QV("message3",!1),QV("message4",!1),QV("message5",!1),QV("message6",!1),go(e)}function go(e){currentpanel=e,setDialogMode(0),QV("showPassHintLink",!1),QV("loginpanel",1==e),QV("createpanel",2==e),QV("resetpanel",3==e),QV("tokenpanel",4==e),QV("resettokenpanel",5==e),QV("resetpasswordpanel",6==e),1==e&&Q("username").focus(),2==e&&(2097152&features?Q("aemail").focus():Q("ausername").focus()),3==e&&Q("remail").focus(),4==e&&Q("tokenInput").focus(),5==e&&Q("resetTokenInput").focus(),6==e&&Q("rapassword1").focus()}function validateLogin(e,s){var a=0<Q("username").value.length&&-1==Q("username").value.indexOf(" ")&&0<Q("password").value.length;QE("loginButton",a),setDialogMode(0),null!=s&&13==s.keyCode&&(1==e?Q("password").focus():2==e&&Q("loginButton").click()),null!=s&&haltEvent(s)}function validateCreate(e,s){setDialogMode(0);var a=!1;if(a=!!(2097152&features)||0<Q("ausername").value.length&&-1==Q("ausername").value.indexOf(" ")&&-1==Q("ausername").value.indexOf('"')&&-1==Q("ausername").value.indexOf(","),a&=1==validateEmail(Q("aemail").value)&&0<Q("apassword1").value.length&&Q("apassword2").value==Q("apassword1").value,1==newAccountPass&&0==Q("anewaccountpass").value.length&&(a=!1),""==Q("apassword1").value)QH("passWarning",""),QV("passwordPolicyCallout",!1);else if(passRequirementsEx){0==checkPasswordRequirements(Q("apassword1").value,passRequirements)?(a=!1,QH("passWarning","<span style=color:red><b>Password Policy</b><span>"),QV("passwordPolicyCallout",!0),QH("passwordPolicyCallout",passwordPolicyText(Q("apassword1").value))):(QH("passWarning",""),QV("passwordPolicyCallout",!1))}else{var n=checkPasswordStrength(Q("apassword1").value);80<=n?QH("passWarning","<span style=color:green><b>Mot de passe fort</b><span>"):60<=n?QH("passWarning","<span style=color:blue><b>Bon mot de passe</b><span>"):QH("passWarning","<span style=color:red><b>Mot de passe faible</b><span>")}QE("createButton",a),null!=s&&13==s.keyCode&&(1==e&&Q("aemail").focus(),2==e&&Q("apassword1").focus(),3==e&&Q("apassword2").focus(),4==e&&Q("apasswordhint").focus(),5==e&&(1==newAccountPass?Q("anewaccountpass").focus():Q("createButton").click()),6==e&&Q("createButton").click()),null!=s&&haltEvent(s)}function validatePassReset(e,s){setDialogMode(0);var a=0<Q("rapassword1").value.length,n=0<Q("rapassword2").value.length&&Q("rapassword2").value==Q("rapassword1").value,t=a&&n;if(QS("rnuPass1").color=a?"black":"#7b241c",QS("rnuPass2").color=n?"black":"#7b241c",""==Q("rapassword1").value)QH("rpassWarning",""),QV("rpasswordPolicyCallout",!1);else if(passRequirementsEx){0==checkPasswordRequirements(Q("rapassword1").value,passRequirements)?(t=!1,QS("rnuPass1").color="#7b241c",QS("rnuPass2").color="#7b241c",QH("rpassWarning","<div style=color:red;cursor:pointer onclick=showPasswordPolicy()><b>Password Policy</b><div>"),QV("rpasswordPolicyCallout",!0),QH("rpasswordPolicyCallout",passwordPolicyText(Q("rapassword1").value))):(QH("rpassWarning",""),QV("rpasswordPolicyCallout",!1))}else{var o=checkPasswordStrength(Q("rapassword1").value);80<=o?QH("rpassWarning","<span style=color:green><b>Mot de passe fort</b><span>"):60<=o?QH("rpassWarning","<span style=color:blue><b>Bon mot de passe</b><span>"):QH("rpassWarning","<span style=color:red><b>Mot de passe faible</b><span>")}null!=s&&13==s.keyCode&&(2==e&&Q("rapassword1").focus(),3==e&&Q("rapassword2").focus(),4==e&&Q("rapasswordhint").focus(),6==e&&Q("resetPassButton").click()),null!=s&&haltEvent(s),QE("resetPassButton",t)}function validateReset(e){setDialogMode(0);var s=validateEmail(Q("remail").value);QE("eresetButton",s),null!=e&&13==e.keyCode&&1==s&&Q("eresetButton").click(),null!=e&&haltEvent(e)}function passwordPolicyText(e){var s="<div style=text-align:left>",a=strCount(e);return passRequirements.min&&(null==e||e.length<passRequirements.min)&&(s+=format("Minimum length of {0}",passRequirements.min)+"<br />"),passRequirements.max&&(null==e||e.length>passRequirements.max)&&(s+=format("Maximum length of {0}",passRequirements.max)+"<br />"),passRequirements.upper&&(null==e||a.upper<passRequirements.upper)&&(s+=format("{0} upper case",passRequirements.upper)+"<br />"),passRequirements.lower&&(null==e||a.lower<passRequirements.lower)&&(s+=format("{0} lower case",passRequirements.lower)+"<br />"),passRequirements.numeric&&(null==e||a.numeric<passRequirements.numeric)&&(s+=format("{0} numeric",passRequirements.numeric)+"<br />"),passRequirements.nonalpha&&(null==e||a.nonalpha<passRequirements.nonalpha)&&(s+=format("{0} non-alphanumeric",passRequirements.nonalpha)+"<br />"),s+="</div>"}function checkPasswordStrength(e){var s=0,a={},n=0,t={digits:/\d/.test(e),lower:/[a-z]/.test(e),upper:/[A-Z]/.test(e),nonWords:/\W/.test(e)};if(!e)return 0;for(var o=0;o<e.length;o++)a[e[o]]=(a[e[o]]||0)+1,s+=5/a[e[o]];for(var r in t)n+=1==t[r]?1:0;return parseInt(s+10*(n-1))}function checkPasswordRequirements(e,s){if(null==s||""==s||"object"!=typeof s)return!0;if(s.min&&e.length<s.min)return!1;if(s.max&&e.length>s.max)return!1;var a=strCount(e);return!(s.numeric&&a.numeric<s.numeric)&&(!(s.lower&&a.lower<s.lower)&&(!(s.upper&&a.upper<s.upper)&&!(s.nonalpha&&a.nonalpha<s.nonalpha)))}function strCount(e){var s={numeric:0,lower:0,upper:0,nonalpha:0};if("string"!=typeof e)return s;for(var a=0;a<e.length;a++)/\d/.test(e[a])&&s.numeric++,/[a-z]/.test(e[a])&&s.lower++,/[A-Z]/.test(e[a])&&s.upper++,/\W/.test(e[a])&&s.nonalpha++;return s}var xxdialogMode,xxdialogFunc,xxdialogButtons,xxdialogTag,xcheckTokenTimer=null;function checkTokenTimer(e){0==e&&null!=xcheckTokenTimer&&(clearInterval(xcheckTokenTimer),xcheckTokenTimer=null),1==e&&null==xcheckTokenTimer&&(xcheckTokenTimer=setInterval(checkToken,200))}function checkToken(){var e=Q("tokenInput").value,s=e.split(" ").join("");e!=s&&(Q("tokenInput").value=s),QE("tokenOkButton",6==Q("tokenInput").value.length||8==Q("tokenInput").value.length||44==Q("tokenInput").value.length)}function resetCheckToken(){var e=Q("resetTokenInput").value,s=e.split(" ").join("");e!=s&&(Q("resetTokenInput").value=s),QE("resetTokenOkButton",6==Q("resetTokenInput").value.length||8==Q("resetTokenInput").value.length||44==Q("resetTokenInput").value.length)}var xxcurrentView=0;function setDialogMode(e,s,a,n,t,o){xxdialogMode=e,xxdialogFunc=n,xxdialogButtons=a,xxdialogTag=o,QE("idx_dlgOkButton",!0),QV("idx_dlgOkButton",1&a),QV("idx_dlgCancelButton",2&a),QV("id_dialogclose",2&a||8&a),QV("idx_dlgButtonBar",7&a),s&&QH("id_dialogtitle",s);for(var r=1;r<24;r++)QV("dialog"+r,r==e);QV("dialog",e),t&&(2==e?QH("id_dialogOptions",t):QH("id_dialogMessage",t))}function dialogclose(e){var s=xxdialogFunc,a=xxdialogButtons,n=xxdialogTag;setDialogMode(),(8&a||e)&&s&&s(e,n)}function center(){QS("dialog").left=(getDocWidth()-400)/2+"px"}function messagebox(e,s){QH("id_dialogMessage",s),setDialogMode(1,e,1)}function statusbox(e,s){QH("id_dialogMessage",s),setDialogMode(1,e)}function getDocWidth(){return window.innerWidth?window.innerWidth:document.documentElement&&document.documentElement.clientWidth&&0!=document.documentElement.clientWidth?document.documentElement.clientWidth:document.getElementsByTagName("body")[0].clientWidth}function haltEvent(e){return e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1}function haltReturn(e){13==e.keyCode&&haltEvent(e)}function validateEmail(e){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function format(e){var a=Array.prototype.slice.call(arguments,1);return e.replace(/{(\d+)}/g,function(e,s){return void 0!==a[s]?a[s]:e})}</script>
\ No newline at end of file
1 +<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link rel="shortcut icon"type=image/x-icon href={{{domainurl}}}favicon.ico><script src=scripts/common-0.0.1.js></script><script src=scripts/u2f-api.js></script><title>MeshCentral - Login</title><style>a{color:#036;text-decoration:underline}#footer a{color:#fff;text-decoration:underline}#footer a:hover{color:#fff;text-decoration:none}</style><body onload='"undefined"!=typeof startup&&startup()'style="overflow-y:hidden;margin:0;padding:0;border:0;color:#000;font-size:13px;font-family:\'Trebuchet MS\',Arial,Helvetica,sans-serif"><div id=container><div id=mastheadx></div><div id=masthead style="background:url(logo.png) 0 0;background-size:341px 50px;background-color:#036;background-repeat:no-repeat;height:50px;width:100%;overflow:hidden"><div style=float:left;height:66px;color:#c8c8c8;padding-left:10px;padding-top:6px><strong><font style=font-size:36px;font-family:Arial,Helvetica,sans-serif>{{{title}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:10px><strong><font style=font-size:12px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><div id=page_content style=overflow-y:scroll;position:absolute;bottom:32px;top:50px;width:100%;display:flex;align-items:center><div id=column_l style=padding:10px;width:100%><table style=width:100%><tr><td align=center><div id=loginpanel style=background-color:#979797;border-radius:16px;width:260px;padding:16px;text-align:center;clear:both;display:none><form method=post><input type=hidden name=action value=login><div id=message1>{{{message}}}</div><div><b>Log In</b></div><table><tr><td id=loginusername align=right width=100>Nom d'utilisateur:<td><input id=username maxlength=64 name=username onchange=validateLogin(1) onkeyup=validateLogin(1,event)><tr><td align=right>Mot de passe:<td><input id=password type=password maxlength=256 name=password autocomplete=off onchange=validateLogin(2) onkeyup=validateLogin(2,event)><tr><td><div id=showPassHintLink style=display:none><a onclick=showPassHint() style=cursor:pointer>Dévoiler indice</a></div><td align=right><input id=loginButton type=submit value="Log In"disabled></table><div id=hrAccountDiv style=display:none><hr></div><div id=resetAccountDiv style=display:none;padding:2px><span id=resetAccountSpan>Forgot user/password?</span> <a onclick=xgo(3) style=cursor:pointer>Réinitialiser le compte</a>.</div><div id=newAccountDiv style=display:none;padding:2px>Don't have an account? <a onclick=xgo(2) style=cursor:pointer>Create one</a>.</div><input id=loginformargs name=urlargs type=hidden></form></div><div id=createpanel style=display:none><div style=background-color:#979797;border-radius:16px;width:260px;padding:16px;text-align:center;clear:both;position:relative><form method=post><input type=hidden name=action value=createaccount><div id=message2>{{{message}}}</div><div><b>Account Creation</b></div><div id=passwordPolicyCallout style="left:-5px;top:10px;width:100px;position:absolute;background-color:#ffc;border-radius:5px;padding:5px;box-shadow:0 0 15px #666;font-size:10px"></div><table><tr id=nuUserRow><td align=right width=100>Nom d'utilisateur:<td><input id=ausername name=username onchange=validateCreate(1) maxlength=64 onkeydown=haltReturn(event) onkeyup=validateCreate(1,event)><tr><td align=right width=100>Email:<td><input id=aemail name=email onchange=validateCreate(2) maxlength=256 onkeydown=haltReturn(event) onkeyup=validateCreate(2,event)><tr><td align=right>Mot de passe:<td><input id=apassword1 type=password name=password1 autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validateCreate(3) onkeyup=validateCreate(3,event)><tr><td align=right>Mot de passe:<td><input id=apassword2 type=password name=password2 autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validateCreate(4) onkeyup=validateCreate(4,event)><tr id=createPanelHint style=display:none><td align=right>Pass Hint:<td><input id=apasswordhint name=apasswordhint autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validateCreate(5) onkeyup=validateCreate(5,event)><tr id=newAccountPass title="Enter the account creation token"><td align=right>Creation Token:<td><input id=anewaccountpass type=password name=anewaccountpass autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validateCreate(6) onkeyup=validateCreate(6,event)><tr><td colspan=2><div style=float:right><input id=createButton type=submit value="Create Account"disabled></div><div id=passWarning style=padding-top:6px></div></table><hr><a onclick=xgo(1) style=cursor:pointer>Back to login</a> <input id=createformargs name=urlargs type=hidden></form></div></div><div id=resetpanel style=background-color:#979797;border-radius:16px;width:260px;padding:16px;text-align:center;display:none;clear:both><form method=post><input type=hidden name=action value=resetaccount><div id=message3>{{{message}}}</div><div><b>Account Reset</b></div><table><tr><td align=right width=100>Email:<td><input id=remail name=email maxlength=256 onchange=validateReset() onkeyup=validateReset(event)><tr><td colspan=2><div style=float:right><input id=eresetButton type=submit value="Réinitialiser le Compte"disabled></div><div id=passWarning style=padding-top:6px></div></table><hr><a onclick=xgo(1) style=cursor:pointer>Back to login</a> <input id=resetformargs name=urlargs type=hidden></form></div><div id=tokenpanel style=background-color:#979797;border-radius:16px;width:260px;padding:16px;text-align:center;display:none;clear:both><form method=post autocomplete=off><input type=hidden name=action value=tokenlogin> <input type=hidden name=hwstate value={{{hwstate}}}><div id=message4>{{{message}}}</div><table><tr><td align=right width=100>Login token:<td><input id=tokenInput name=token maxlength=50 onchange=checkToken(event) onkeyup=checkToken(event) onkeydown=checkToken(event) onfocus=checkTokenTimer(1) onblur=checkTokenTimer(0)> <input id=hwtokenInput name=hwtoken style=display:none><tr><td colspan=2><div style=float:right><input id=tokenOkButton type=submit value=Login disabled></div></table><hr><a onclick=xgo(1) style=cursor:pointer>Back to login</a> <input id=tokenformargs name=urlargs type=hidden></form></div><div id=resettokenpanel style=background-color:#979797;border-radius:16px;width:260px;padding:16px;text-align:center;display:none;clear:both><form method=post autocomplete=off><input type=hidden name=action value=resetaccount><div id=message5>{{{message}}}</div><table><tr><td align=right width=100>Login token:<td><input id=resetTokenInput name=token maxlength=50 onchange=resetCheckToken(event) onpaste=resetCheckToken(event) onkeyup=resetCheckToken(event) onkeydown=resetCheckToken(event)> <input id=resetHwtokenInput name=hwtoken style=display:none><tr><td colspan=2><div style=float:right><input id=resetTokenOkButton type=submit value=Login disabled></div></table><hr><a onclick=xgo(1) style=cursor:pointer>Back to login</a> <input id=resettokenformargs name=urlargs type=hidden></form></div><div id=resetpasswordpanel style=position:relative;background-color:#979797;border-radius:16px;width:300px;padding:16px;text-align:center;display:none><form method=post><input type=hidden name=action value=resetpassword><div id=message6>{{{message}}}</div><div id=rpasswordPolicyCallout style="left:-10px;width:100px;display:none;position:absolute;background-color:#ffc;border-radius:5px;padding:5px;box-shadow:0 0 15px #666;font-size:10px"></div><table><tr><td id=rnuPass1 width=100 align=right>Mot de passe:<td><input id=rapassword1 type=password name=rpassword1 autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validatePassReset(3,event) onkeyup=validatePassReset(3,event)><tr><td id=rnuPass2 align=right>Mot de passe:<td><input id=rapassword2 type=password name=rpassword2 autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validatePassReset(4,event) onkeyup=validatePassReset(4,event)><tr id=resetpasswordpanelHint style=display:none><td id=rnuHint align=right>Password Hint:<td><input id=rapasswordhint name=rpasswordhint autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validatePassReset(5,event) onkeyup=validatePassReset(5,event)><tr><td colspan=2><div style=float:right><input id=resetPassButton type=submit value="Réinitialiser le mot de passe"disabled></div><div id=rpassWarning style=padding-top:6px></div></table><hr><a onclick=xgo(1) style=cursor:pointer>Back to login</a> <input id=resetpasswordformargs name=urlargs type=hidden></form></div></table></div></div><div id=footer style=height:32px;width:100%;text-align:center;background-color:#113962;position:absolute;bottom:0><table cellpadding=0 cellspacing=6 style=width:100%><tr><td style=text-align:left;color:#fff>{{{footer}}}<td style=text-align:right>{{{rootCertLink}}}&nbsp;<a href=terms>Terms &amp; Privacy</a></table></div></div><div id=dialog style="z-index:1000;background-color:#eee;box-shadow:0 0 15px #666;font-family:Arial,Helvetica,sans-serif;border-radius:5px;position:fixed;top:180px;width:400px;display:none"><div style="width:100%;background-color:#036;color:#fff;border-radius:5px 5px 0 0"><div id=id_dialogclose style=float:right;padding:5px;cursor:pointer onclick=setDialogMode()><b>X</b></div><div id=id_dialogtitle style=padding:5px></div><div style=width:100%;margin:6px></div></div><div style=margin-right:16px;margin-left:8px><div id=dialog1 style=margin:auto;text-align:center;margin:3px><div id=id_dialogMessage style=padding:10px></div></div><div id=dialog2 style=margin:auto;margin:3px><div id=id_dialogOptions></div></div></div><div id=idx_dlgButtonBar style=padding:10px;margin-bottom:20px><input id=idx_dlgCancelButton type=button value=Annuler style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)> <input id=idx_dlgOkButton type=button value=OK style=float:right;width:80px onclick=dialogclose(1)></div></div><script>"use strict";var loginMode="{{{loginmode}}}",newAccount="{{{newAccount}}}",passhint="{{{passhint}}}",newAccountPass=parseInt("{{{newAccountPass}}}"),emailCheck=!1,features=parseInt("{{{features}}}"),passRequirements="{{{passRequirements}}}",passRequirementsEx=null!=(passRequirements=""!=passRequirements?JSON.parse(decodeURIComponent(passRequirements)):{}).min||null!=passRequirements.max||null!=passRequirements.upper||null!=passRequirements.lower||null!=passRequirements.numeric||null!=passRequirements.nonalpha,hardwareKeyChallenge=decodeURIComponent("{{{hkey}}}"),currentpanel=0;if(0<window.location.href.indexOf("?")){var urlargs=window.location.href.substring(window.location.href.indexOf("?"));Q("loginformargs").value=urlargs,Q("createformargs").value=urlargs,Q("resetformargs").value=urlargs,Q("tokenformargs").value=urlargs,Q("resettokenformargs").value=urlargs,Q("resetpasswordformargs").value=urlargs}function startup(){if(0==(32&features)){var e=null;try{e=top.location.toString().toLowerCase()}catch(e){}if(top!=self&&(null==e||0==top.active))return void(top.location=self.location)}if(2097152&features&&(QH("loginusername","Email:"),QH("resetAccountSpan","Forgot password?"),QV("nuUserRow",!1)),QV("createPanelHint",!0===passRequirements.hint),QV("resetpasswordpanelHint",!0===passRequirements.hint),(window.onresize=center)(),validateLogin(),validateCreate(),0!=loginMode.length?go(parseInt(loginMode)):go(1),QV("newAccountDiv","1"===newAccount||"true"===newAccount),!0===passRequirements.hint&&null!=passhint&&0<passhint.length&&QV("showPassHintLink",!0),QV("newAccountPass",1==newAccountPass),QV("resetAccountDiv",1==emailCheck),QV("hrAccountDiv",1==emailCheck||1==newAccountPass),"4"==loginMode){try{hardwareKeyChallenge=0<hardwareKeyChallenge.length?JSON.parse(hardwareKeyChallenge):null}catch(e){hardwareKeyChallenge=null}if(null!=hardwareKeyChallenge&&"webAuthn"==hardwareKeyChallenge.type){hardwareKeyChallenge.challenge=Uint8Array.from(atob(hardwareKeyChallenge.challenge),function(e){return e.charCodeAt(0)}).buffer;for(var a={challenge:hardwareKeyChallenge.challenge,allowCredentials:[],timeout:hardwareKeyChallenge.timeout},n=0;n<hardwareKeyChallenge.keyIds.length;n++)a.allowCredentials.push({id:Uint8Array.from(atob(hardwareKeyChallenge.keyIds[n]),function(e){return e.charCodeAt(0)}),type:"public-key",transports:["usb","ble","nfc"]});navigator.credentials.get({publicKey:a}).then(function(e){var a={id:btoa(String.fromCharCode.apply(null,new Uint8Array(e.rawId))),clientDataJSON:btoa(String.fromCharCode.apply(null,new Uint8Array(e.response.clientDataJSON))),userHandle:btoa(String.fromCharCode.apply(null,new Uint8Array(e.response.userHandle))),signature:btoa(String.fromCharCode.apply(null,new Uint8Array(e.response.signature))),authenticatorData:btoa(String.fromCharCode.apply(null,new Uint8Array(e.response.authenticatorData)))};Q("hwtokenInput").value=JSON.stringify(a),QE("tokenOkButton",!0),Q("tokenOkButton").click()},function(e){console.log("credentials-get error",e)})}}if("5"==loginMode){try{hardwareKeyChallenge=0<hardwareKeyChallenge.length?JSON.parse(hardwareKeyChallenge):null}catch(e){hardwareKeyChallenge=null}if(null!=hardwareKeyChallenge&&"webAuthn"==hardwareKeyChallenge.type){hardwareKeyChallenge.challenge=Uint8Array.from(atob(hardwareKeyChallenge.challenge),function(e){return e.charCodeAt(0)}).buffer;for(a={challenge:hardwareKeyChallenge.challenge,allowCredentials:[],timeout:hardwareKeyChallenge.timeout},n=0;n<hardwareKeyChallenge.keyIds.length;n++)a.allowCredentials.push({id:Uint8Array.from(atob(hardwareKeyChallenge.keyIds[n]),function(e){return e.charCodeAt(0)}),type:"public-key",transports:["usb","ble","nfc"]});navigator.credentials.get({publicKey:a}).then(function(e){var a={id:btoa(String.fromCharCode.apply(null,new Uint8Array(e.rawId))),clientDataJSON:btoa(String.fromCharCode.apply(null,new Uint8Array(e.response.clientDataJSON))),userHandle:btoa(String.fromCharCode.apply(null,new Uint8Array(e.response.userHandle))),signature:btoa(String.fromCharCode.apply(null,new Uint8Array(e.response.signature))),authenticatorData:btoa(String.fromCharCode.apply(null,new Uint8Array(e.response.authenticatorData)))};Q("resetHwtokenInput").value=JSON.stringify(a),QE("resetTokenOkButton",!0),Q("resetTokenOkButton").click()},function(e){console.log("credentials-get error",e)})}}}function showPassHint(){!0===passRequirements.hint&&messagebox("Password Hint",passhint)}function xgo(e){QV("message1",!1),QV("message2",!1),QV("message3",!1),QV("message4",!1),QV("message5",!1),QV("message6",!1),go(e)}function go(e){currentpanel=e,setDialogMode(0),QV("showPassHintLink",!1),QV("loginpanel",1==e),QV("createpanel",2==e),QV("resetpanel",3==e),QV("tokenpanel",4==e),QV("resettokenpanel",5==e),QV("resetpasswordpanel",6==e),1==e&&Q("username").focus(),2==e&&(2097152&features?Q("aemail").focus():Q("ausername").focus()),3==e&&Q("remail").focus(),4==e&&Q("tokenInput").focus(),5==e&&Q("resetTokenInput").focus(),6==e&&Q("rapassword1").focus()}function validateLogin(e,a){var n=0<Q("username").value.length&&-1==Q("username").value.indexOf(" ")&&0<Q("password").value.length;QE("loginButton",n),setDialogMode(0),null!=a&&13==a.keyCode&&(1==e?Q("password").focus():2==e&&Q("loginButton").click()),null!=a&&haltEvent(a)}function validateCreate(e,a){setDialogMode(0);var n=!1;if(n=!!(2097152&features)||0<Q("ausername").value.length&&-1==Q("ausername").value.indexOf(" ")&&-1==Q("ausername").value.indexOf('"')&&-1==Q("ausername").value.indexOf(","),n&=1==validateEmail(Q("aemail").value)&&0<Q("apassword1").value.length&&Q("apassword2").value==Q("apassword1").value,1==newAccountPass&&0==Q("anewaccountpass").value.length&&(n=!1),""==Q("apassword1").value)QH("passWarning",""),QV("passwordPolicyCallout",!1);else if(passRequirementsEx){0==checkPasswordRequirements(Q("apassword1").value,passRequirements)?(n=!1,QH("passWarning","<span style=color:red><b>Password Policy</b><span>"),QV("passwordPolicyCallout",!0),QH("passwordPolicyCallout",passwordPolicyText(Q("apassword1").value))):(QH("passWarning",""),QV("passwordPolicyCallout",!1))}else{var r=checkPasswordStrength(Q("apassword1").value);80<=r?QH("passWarning","<span style=color:green><b>Mot de passe fort</b><span>"):60<=r?QH("passWarning","<span style=color:blue><b>Bon mot de passe</b><span>"):QH("passWarning","<span style=color:red><b>Mot de passe faible</b><span>")}QE("createButton",n),null!=a&&13==a.keyCode&&(1==e&&Q("aemail").focus(),2==e&&Q("apassword1").focus(),3==e&&Q("apassword2").focus(),4==e&&Q("apasswordhint").focus(),5==e&&(1==newAccountPass?Q("anewaccountpass").focus():Q("createButton").click()),6==e&&Q("createButton").click()),null!=a&&haltEvent(a)}function validatePassReset(e,a){setDialogMode(0);var n=0<Q("rapassword1").value.length,r=0<Q("rapassword2").value.length&&Q("rapassword2").value==Q("rapassword1").value,t=n&&r;if(QS("rnuPass1").color=n?"black":"#7b241c",QS("rnuPass2").color=r?"black":"#7b241c",""==Q("rapassword1").value)QH("rpassWarning",""),QV("rpasswordPolicyCallout",!1);else if(passRequirementsEx){0==checkPasswordRequirements(Q("rapassword1").value,passRequirements)?(t=!1,QS("rnuPass1").color="#7b241c",QS("rnuPass2").color="#7b241c",QH("rpassWarning","<div style=color:red;cursor:pointer onclick=showPasswordPolicy()><b>Password Policy</b><div>"),QV("rpasswordPolicyCallout",!0),QH("rpasswordPolicyCallout",passwordPolicyText(Q("rapassword1").value))):(QH("rpassWarning",""),QV("rpasswordPolicyCallout",!1))}else{var s=checkPasswordStrength(Q("rapassword1").value);80<=s?QH("rpassWarning","<span style=color:green><b>Mot de passe fort</b><span>"):60<=s?QH("rpassWarning","<span style=color:blue><b>Bon mot de passe</b><span>"):QH("rpassWarning","<span style=color:red><b>Mot de passe faible</b><span>")}null!=a&&13==a.keyCode&&(2==e&&Q("rapassword1").focus(),3==e&&Q("rapassword2").focus(),4==e&&Q("rapasswordhint").focus(),6==e&&Q("resetPassButton").click()),null!=a&&haltEvent(a),QE("resetPassButton",t)}function validateReset(e){setDialogMode(0);var a=validateEmail(Q("remail").value);QE("eresetButton",a),null!=e&&13==e.keyCode&&1==a&&Q("eresetButton").click(),null!=e&&haltEvent(e)}function passwordPolicyText(e){var a="<div style=text-align:left>",n=strCount(e);return passRequirements.min&&(null==e||e.length<passRequirements.min)&&(a+=format("Minimum length of {0}",passRequirements.min)+"<br />"),passRequirements.max&&(null==e||e.length>passRequirements.max)&&(a+=format("Maximum length of {0}",passRequirements.max)+"<br />"),passRequirements.upper&&(null==e||n.upper<passRequirements.upper)&&(a+=format("{0} upper case",passRequirements.upper)+"<br />"),passRequirements.lower&&(null==e||n.lower<passRequirements.lower)&&(a+=format("{0} lower case",passRequirements.lower)+"<br />"),passRequirements.numeric&&(null==e||n.numeric<passRequirements.numeric)&&(a+=format("{0} numeric",passRequirements.numeric)+"<br />"),passRequirements.nonalpha&&(null==e||n.nonalpha<passRequirements.nonalpha)&&(a+=format("{0} non-alphanumeric",passRequirements.nonalpha)+"<br />"),a+="</div>"}function checkPasswordStrength(e){var a=0,n={},r=0,t={digits:/\d/.test(e),lower:/[a-z]/.test(e),upper:/[A-Z]/.test(e),nonWords:/\W/.test(e)};if(!e)return 0;for(var s=0;s<e.length;s++)n[e[s]]=(n[e[s]]||0)+1,a+=5/n[e[s]];for(var o in t)r+=1==t[o]?1:0;return parseInt(a+10*(r-1))}function checkPasswordRequirements(e,a){if(null==a||""==a||"object"!=typeof a)return!0;if(a.min&&e.length<a.min)return!1;if(a.max&&e.length>a.max)return!1;var n=strCount(e);return!(a.numeric&&n.numeric<a.numeric)&&(!(a.lower&&n.lower<a.lower)&&(!(a.upper&&n.upper<a.upper)&&!(a.nonalpha&&n.nonalpha<a.nonalpha)))}function strCount(e){var a={numeric:0,lower:0,upper:0,nonalpha:0};if("string"!=typeof e)return a;for(var n=0;n<e.length;n++)/\d/.test(e[n])&&a.numeric++,/[a-z]/.test(e[n])&&a.lower++,/[A-Z]/.test(e[n])&&a.upper++,/\W/.test(e[n])&&a.nonalpha++;return a}var xxdialogMode,xxdialogFunc,xxdialogButtons,xxdialogTag,xcheckTokenTimer=null;function checkTokenTimer(e){0==e&&null!=xcheckTokenTimer&&(clearInterval(xcheckTokenTimer),xcheckTokenTimer=null),1==e&&null==xcheckTokenTimer&&(xcheckTokenTimer=setInterval(checkToken,200))}function checkToken(){var e=Q("tokenInput").value,a=e.split(" ").join("");e!=a&&(Q("tokenInput").value=a),QE("tokenOkButton",6==Q("tokenInput").value.length||8==Q("tokenInput").value.length||44==Q("tokenInput").value.length)}function resetCheckToken(){var e=Q("resetTokenInput").value,a=e.split(" ").join("");e!=a&&(Q("resetTokenInput").value=a),QE("resetTokenOkButton",6==Q("resetTokenInput").value.length||8==Q("resetTokenInput").value.length||44==Q("resetTokenInput").value.length)}var xxcurrentView=0;function setDialogMode(e,a,n,r,t,s){xxdialogMode=e,xxdialogFunc=r,xxdialogButtons=n,xxdialogTag=s,QE("idx_dlgOkButton",!0),QV("idx_dlgOkButton",1&n),QV("idx_dlgCancelButton",2&n),QV("id_dialogclose",2&n||8&n),QV("idx_dlgButtonBar",7&n),a&&QH("id_dialogtitle",a);for(var o=1;o<24;o++)QV("dialog"+o,o==e);QV("dialog",e),t&&(2==e?QH("id_dialogOptions",t):QH("id_dialogMessage",t))}function dialogclose(e){var a=xxdialogFunc,n=xxdialogButtons,r=xxdialogTag;setDialogMode(),(8&n||e)&&a&&a(e,r)}function center(){QS("dialog").left=(getDocWidth()-400)/2+"px"}function messagebox(e,a){QH("id_dialogMessage",a),setDialogMode(1,e,1)}function statusbox(e,a){QH("id_dialogMessage",a),setDialogMode(1,e)}function getDocWidth(){return window.innerWidth?window.innerWidth:document.documentElement&&document.documentElement.clientWidth&&0!=document.documentElement.clientWidth?document.documentElement.clientWidth:document.getElementsByTagName("body")[0].clientWidth}function haltEvent(e){return e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1}function haltReturn(e){13==e.keyCode&&haltEvent(e)}function validateEmail(e){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function format(e){var n=Array.prototype.slice.call(arguments,1);return e.replace(/{(\d+)}/g,function(e,a){return void 0!==n[a]?n[a]:e})}</script>
\ No newline at end of file
views/translations/login-mobile_fr.handlebars
+6 -4
@@ -265,6 +265,8 @@
265 </div>
266 <script>
267 'use strict';
268 + var loginMode = '{{{loginmode}}}';
269 + var newAccount = '{{{newAccount}}}';
270 var passhint = '{{{passhint}}}';
271 var newAccountPass = parseInt('{{{newAccountPass}}}');
272 var emailCheck = ('{{{emailcheck}}}' == 'true');
@@ -307,14 +309,14 @@
309 center();
310 validateLogin();
311 validateCreate();
310 - if ('{{loginmode}}' != '') { go(parseInt('{{loginmode}}')); } else { go(1); }
311 - QV('newAccountDiv', ('{{{newAccount}}}' === '1') || ('{{{newAccount}}}' === 'true')); // If new accounts are not allowed, don't display the new account link.
312 + if (loginMode.length != 0) { go(parseInt(loginMode)); } else { go(1); }
313 + QV('newAccountDiv', (newAccount === '1') || (newAccount === 'true')); // If new accounts are not allowed, don't display the new account link.
314 if ((passRequirements.hint === true) && (passhint != null) && (passhint.length > 0)) { QV('showPassHintLink', true); }
315 QV('newAccountPass', (newAccountPass == 1));
316 QV('resetAccountDiv', (emailCheck == true));
317 QV('hrAccountDiv', (emailCheck == true) || (newAccountPass == 1));
318
317 - if ('{{loginmode}}' == '4') {
319 + if (loginMode == '4') {
320 try { if (hardwareKeyChallenge.length > 0) { hardwareKeyChallenge = JSON.parse(hardwareKeyChallenge); } else { hardwareKeyChallenge = null; } } catch (ex) { hardwareKeyChallenge = null }
321 if ((hardwareKeyChallenge != null) && (hardwareKeyChallenge.type == 'webAuthn')) {
322 hardwareKeyChallenge.challenge = Uint8Array.from(atob(hardwareKeyChallenge.challenge), function (c) { return c.charCodeAt(0) }).buffer;
@@ -345,7 +347,7 @@
347 }
348 }
349
348 - if ('{{loginmode}}' == '5') {
350 + if (loginMode == '5') {
351 try { if (hardwareKeyChallenge.length > 0) { hardwareKeyChallenge = JSON.parse(hardwareKeyChallenge); } else { hardwareKeyChallenge = null; } } catch (ex) { hardwareKeyChallenge = null }
352 if ((hardwareKeyChallenge != null) && (hardwareKeyChallenge.type == 'webAuthn')) {
353 hardwareKeyChallenge.challenge = Uint8Array.from(atob(hardwareKeyChallenge.challenge), function (c) { return c.charCodeAt(0) }).buffer;
views/translations/login_fr.handlebars
+6 -4
@@ -258,6 +258,8 @@
258 <script>
259 'use strict';
260 var passhint = '{{{passhint}}}';
261 + var loginMode = '{{{loginmode}}}';
262 + var newAccount = '{{{newAccount}}}';
263 var newAccountPass = parseInt('{{{newAccountPass}}}');
264 var emailCheck = ('{{{emailcheck}}}' == 'true');
265 var passRequirements = '{{{passRequirements}}}';
@@ -316,14 +318,14 @@
318
319 validateLogin();
320 validateCreate();
319 - if ('{{loginmode}}' != '') { go(parseInt('{{loginmode}}')); } else { go(1); }
320 - QV('newAccountDiv', ('{{{newAccount}}}' === '1') || ('{{{newAccount}}}' === 'true')); // If new accounts are not allowed, don't display the new account link.
321 + if (loginMode.length != 0) { go(parseInt(loginMode)); } else { go(1); }
322 + QV('newAccountDiv', (newAccount === '1') || (newAccount === 'true')); // If new accounts are not allowed, don't display the new account link.
323 if ((passhint != null) && (passhint.length > 0)) { QV('showPassHintLink', true); }
324 QV('newAccountPass', (newAccountPass == 1));
325 QV('resetAccountDiv', (emailCheck == true));
326 QV('hrAccountDiv', (emailCheck == true) || (newAccountPass == 1));
327
326 - if ('{{loginmode}}' == '4') {
328 + if (loginMode == '4') {
329 try { if (hardwareKeyChallenge.length > 0) { hardwareKeyChallenge = JSON.parse(hardwareKeyChallenge); } else { hardwareKeyChallenge = null; } } catch (ex) { hardwareKeyChallenge = null }
330 if ((hardwareKeyChallenge != null) && (hardwareKeyChallenge.type == 'webAuthn')) {
331 hardwareKeyChallenge.challenge = Uint8Array.from(atob(hardwareKeyChallenge.challenge), function (c) { return c.charCodeAt(0) }).buffer;
@@ -356,7 +358,7 @@
358 }
359 }
360
359 - if ('{{loginmode}}' == '5') {
361 + if (loginMode == '5') {
362 try { if (hardwareKeyChallenge.length > 0) { hardwareKeyChallenge = JSON.parse(hardwareKeyChallenge); } else { hardwareKeyChallenge = null; } } catch (ex) { hardwareKeyChallenge = null }
363 if ((hardwareKeyChallenge != null) && (hardwareKeyChallenge.type == 'webAuthn')) {
364 hardwareKeyChallenge.challenge = Uint8Array.from(atob(hardwareKeyChallenge.challenge), function (c) { return c.charCodeAt(0) }).buffer;