var Guacamole = Guacamole || {}; Guacamole.ArrayBufferReader = function(a) { var b = this; a.onblob = function(a) { a = window.atob(a); for (var d = new ArrayBuffer(a.length), c = new Uint8Array(d), f = 0; f < a.length; f++) c[f] = a.charCodeAt(f); if (b.ondata) b.ondata(d) } ; a.onend = function() { if (b.onend) b.onend() } ; this.onend = this.ondata = null } ; Guacamole = Guacamole || {}; Guacamole.ArrayBufferWriter = function(a) { function b(b) { for (var c = "", d = 0; d < b.byteLength; d++) c += String.fromCharCode(b[d]); a.sendBlob(window.btoa(c)) } var e = this; a.onack = function(a) { if (e.onack) e.onack(a) } ; this.blobLength = Guacamole.ArrayBufferWriter.DEFAULT_BLOB_LENGTH; this.sendData = function(a) { a = new Uint8Array(a); if (a.length <= e.blobLength) b(a); else for (var c = 0; c < a.length; c += e.blobLength) b(a.subarray(c, c + e.blobLength)) } ; this.sendEnd = function() { a.sendEnd() } ; this.onack = null } ; Guacamole.ArrayBufferWriter.DEFAULT_BLOB_LENGTH = 6048; Guacamole = Guacamole || {}; Guacamole.AudioContextFactory = { singleton: null, getAudioContext: function() { var a = window.AudioContext || window.webkitAudioContext; if (a) try { return Guacamole.AudioContextFactory.singleton || (Guacamole.AudioContextFactory.singleton = new a), Guacamole.AudioContextFactory.singleton } catch (b) {} return null } }; Guacamole = Guacamole || {}; Guacamole.AudioPlayer = function() { this.sync = function() {} } ; Guacamole.AudioPlayer.isSupportedType = function(a) { return Guacamole.RawAudioPlayer.isSupportedType(a) } ; Guacamole.AudioPlayer.getSupportedTypes = function() { return Guacamole.RawAudioPlayer.getSupportedTypes() } ; Guacamole.AudioPlayer.getInstance = function(a, b) { return Guacamole.RawAudioPlayer.isSupportedType(b) ? new Guacamole.RawAudioPlayer(a,b) : null } ; Guacamole.RawAudioPlayer = function(a, b) { var e = Guacamole.RawAudioFormat.parse(b) , d = Guacamole.AudioContextFactory.getAudioContext() , c = d.currentTime; a = new Guacamole.ArrayBufferReader(a); var f = 1 === e.bytesPerSample ? window.Int8Array : window.Int16Array , g = 1 === e.bytesPerSample ? 128 : 32768 , h = [] , k = function(a) { if (1 >= a.length) return a[0]; var b = 0; a.forEach(function(a) { b += a.length }); var c = 0 , d = new f(b); a.forEach(function(a) { d.set(a, c); c += a.length }); return d }; a.ondata = function(a) { h.push(new f(new f(a))); if (a = k(h)) { for (var b = Number.MAX_VALUE, m = a.length, p = Math.floor(.02 * e.rate), p = Math.max(e.channels * p, e.channels * (Math.floor(a.length / e.channels) - p)); p < a.length; p += e.channels) { for (var l = 0, t = 0; t < e.channels; t++) l += Math.abs(a[p + t]); l <= b && (m = p + e.channels, b = l) } h = m === a.length ? [a] : [new f(a.buffer.slice(0, m * e.bytesPerSample)), new f(a.buffer.slice(m * e.bytesPerSample))]; a = h.shift() } else a = null; if (a) { b = d.currentTime; c < b && (c = b); b = d.createBufferSource(); b.connect(d.destination); b.start || (b.start = b.noteOn); m = a; p = m.length / e.channels; l = d.currentTime; c < l && (c = l); l = d.createBuffer(e.channels, p, e.rate); for (t = 0; t < e.channels; t++) for (var u = l.getChannelData(t), v = t, r = 0; r < p; r++) u[r] = m[v] / g, v += e.channels; b.buffer = l; b.start(c); c += a.length / e.channels / e.rate } } ; this.sync = function() { c = Math.min(c, d.currentTime + .3) } } ; Guacamole.RawAudioPlayer.prototype = new Guacamole.AudioPlayer; Guacamole.RawAudioPlayer.isSupportedType = function(a) { return Guacamole.AudioContextFactory.getAudioContext() ? null !== Guacamole.RawAudioFormat.parse(a) : !1 } ; Guacamole.RawAudioPlayer.getSupportedTypes = function() { return Guacamole.AudioContextFactory.getAudioContext() ? ["audio/L8", "audio/L16"] : [] } ; Guacamole = Guacamole || {}; Guacamole.AudioRecorder = function() { this.onerror = this.onclose = null } ; Guacamole.AudioRecorder.isSupportedType = function(a) { return Guacamole.RawAudioRecorder.isSupportedType(a) } ; Guacamole.AudioRecorder.getSupportedTypes = function() { return Guacamole.RawAudioRecorder.getSupportedTypes() } ; Guacamole.AudioRecorder.getInstance = function(a, b) { return Guacamole.RawAudioRecorder.isSupportedType(b) ? new Guacamole.RawAudioRecorder(a,b) : null } ; Guacamole.RawAudioRecorder = function(a, b) { var e = this , d = Guacamole.RawAudioFormat.parse(b) , c = Guacamole.AudioContextFactory.getAudioContext() , f = (navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia).bind(navigator) , g = new Guacamole.ArrayBufferWriter(a) , h = 1 === d.bytesPerSample ? window.Int8Array : window.Int16Array , k = 1 === d.bytesPerSample ? 128 : 32768 , l = 0 , n = 0 , m = null , p = null , q = null , t = function(a) { if (0 === a) return 1; a *= Math.PI; return Math.sin(a) / a } , u = function(a) { l += a.length; var b = Math.round(l * d.rate / a.sampleRate) - n; n += b; for (var c = new h(b * d.channels), f = 0; f < d.channels; f++) for (var g = a.getChannelData(f), e = f, m = 0; m < b; m++) { for (var p = e, q = g, u = m / (b - 1) * (q.length - 1), r = Math.floor(u) + 3, v = 0, D = Math.floor(u) - 3 + 1; D <= r; D++) { var E = q[D] || 0, F; F = u - D; F = -3 < F && 3 > F ? t(F) * t(F / 3) : 0; v += E * F } c[p] = v * k; e += d.channels } return c } , v = function() { f({ audio: !0 }, function(a) { q = c.createScriptProcessor(2048, d.channels, d.channels); q.connect(c.destination); q.onaudioprocess = function(a) { g.sendData(u(a.inputBuffer).buffer) } ; p = c.createMediaStreamSource(a); p.connect(q); m = a }, function() { g.sendEnd(); if (e.onerror) e.onerror() }) }; g.onack = function(a) { if (a.code !== Guacamole.Status.Code.SUCCESS || m) { p && p.disconnect(); q && q.disconnect(); if (m) for (var b = m.getTracks(), c = 0; c < b.length; c++) b[c].stop(); m = p = q = null; g.sendEnd(); g.onack = null; if (a.code === Guacamole.Status.Code.RESOURCE_CLOSED) { if (e.onclose) e.onclose() } else if (e.onerror) e.onerror() } else v() } } ; Guacamole.RawAudioRecorder.prototype = new Guacamole.AudioRecorder; Guacamole.RawAudioRecorder.isSupportedType = function(a) { return Guacamole.AudioContextFactory.getAudioContext() ? null !== Guacamole.RawAudioFormat.parse(a) : !1 } ; Guacamole.RawAudioRecorder.getSupportedTypes = function() { return Guacamole.AudioContextFactory.getAudioContext() ? ["audio/L8", "audio/L16"] : [] } ; Guacamole = Guacamole || {}; Guacamole.BlobReader = function(a, b) { var e = this, d = 0, c; c = window.BlobBuilder ? new BlobBuilder : window.WebKitBlobBuilder ? new WebKitBlobBuilder : window.MozBlobBuilder ? new MozBlobBuilder : new function() { var a = []; this.append = function(c) { a.push(new Blob([c],{ type: b })) } ; this.getBlob = function() { return new Blob(a,{ type: b }) } } ; a.onblob = function(b) { b = window.atob(b); for (var f = new ArrayBuffer(b.length), h = new Uint8Array(f), k = 0; k < b.length; k++) h[k] = b.charCodeAt(k); c.append(f); d += f.byteLength; if (e.onprogress) e.onprogress(f.byteLength); a.sendAck("OK", 0) } ; a.onend = function() { if (e.onend) e.onend() } ; this.getLength = function() { return d } ; this.getBlob = function() { return c.getBlob() } ; this.onend = this.onprogress = null } ; Guacamole = Guacamole || {}; Guacamole.BlobWriter = function(a) { var b = this , e = new Guacamole.ArrayBufferWriter(a); e.onack = function(a) { if (b.onack) b.onack(a) } ; this.sendBlob = function(a) { var c = 0 , d = new FileReader , g = function() { if (c >= a.size) { if (b.oncomplete) b.oncomplete(a) } else { var f; a: { f = c; var g = c + e.blobLength , l = (a.slice || a.webkitSlice || a.mozSlice).bind(a) , n = g - f; if (n !== g) { var m = l(f, n); if (m.size === n) { f = m; break a } } f = l(f, g) } c += e.blobLength; d.readAsArrayBuffer(f) } }; d.onload = function() { e.sendData(d.result); e.onack = function(d) { if (b.onack) b.onack(d); if (!d.isError()) { if (b.onprogress) b.onprogress(a, c - e.blobLength); g() } } } ; d.onerror = function() { if (b.onerror) b.onerror(a, c, d.error) } ; g() } ; this.sendEnd = function() { e.sendEnd() } ; this.oncomplete = this.onprogress = this.onerror = this.onack = null } ; Guacamole = Guacamole || {}; Guacamole.Client = function(a) { function b(a) { if (a != c && (c = a, d.onstatechange)) d.onstatechange(c) } function e() { return 3 == c || 2 == c } var d = this , c = 0 , f = 0 , g = null , h = { 0: "butt", 1: "round", 2: "square" } , k = { 0: "bevel", 1: "miter", 2: "round" } , l = new Guacamole.Display , n = {} , m = {} , p = [] , q = [] , t = [] , u = new Guacamole.IntegerPool , v = []; this.exportState = function(a) { var b = { currentState: c, currentTimestamp: f, layers: {} }, d = {}, e; for (e in n) d[e] = n[e]; l.flush(function() { for (var c in d) { var f = parseInt(c) , e = d[c] , g = e.toCanvas() , h = { width: e.width, height: e.height }; e.width && e.height && (h.url = g.toDataURL("image/png")); if (0 < f) { h.x = e.x; h.y = e.y; h.z = e.z; h.alpha = e.alpha; h.matrix = e.matrix; f = h; a: { if (e = e.parent) for (g in g = void 0, n) if (e === n[g]) { e = parseInt(g); break a } e = null } f.parent = e } b.layers[c] = h } a(b) }) } ; this.importState = function(a, b) { var d, e; c = a.currentState; f = a.currentTimestamp; for (d in n) e = parseInt(d), 0 < e && l.dispose(n[d]); n = {}; for (d in a.layers) { e = parseInt(d); var g = a.layers[d] , h = r(e); l.resize(h, g.width, g.height); g.url && (l.setChannelMask(h, Guacamole.Layer.SRC), l.draw(h, 0, 0, g.url)); 0 < e && 0 <= g.parent && (e = r(g.parent), l.move(h, e, g.x, g.y, g.z), l.shade(h, g.alpha), g = g.matrix, l.distort(h, g[0], g[1], g[2], g[3], g[4], g[5])) } l.flush(b) } ; this.getDisplay = function() { return l } ; this.sendSize = function(b, c) { e() && a.sendMessage("size", b, c) } ; this.sendKeyEvent = function(b, c) { e() && a.sendMessage("key", c, b) } ; this.sendMouseState = function(b) { if (e()) { l.moveCursor(Math.floor(b.x), Math.floor(b.y)); var c = 0; b.left && (c |= 1); b.middle && (c |= 2); b.right && (c |= 4); b.up && (c |= 8); b.down && (c |= 16); a.sendMessage("mouse", Math.floor(b.x), Math.floor(b.y), c) } } ; this.setClipboard = function(a) { if (e()) { for (var b = d.createClipboardStream("text/plain"), b = new Guacamole.StringWriter(b), c = 0; c < a.length; c += 4096) b.sendText(a.substring(c, c + 4096)); b.sendEnd() } } ; this.createOutputStream = function() { var a = u.next(); return v[a] = new Guacamole.OutputStream(d,a) } ; this.createAudioStream = function(b) { var c = d.createOutputStream(); a.sendMessage("audio", c.index, b); return c } ; this.createFileStream = function(b, c) { var f = d.createOutputStream(); a.sendMessage("file", f.index, b, c); return f } ; this.createPipeStream = function(b, c) { var f = d.createOutputStream(); a.sendMessage("pipe", f.index, b, c); return f } ; this.createClipboardStream = function(b) { var c = d.createOutputStream(); a.sendMessage("clipboard", c.index, b); return c } ; this.createObjectOutputStream = function(b, c, f) { var e = d.createOutputStream(); a.sendMessage("put", b, e.index, c, f); return e } ; this.requestObjectInputStream = function(b, c) { e() && a.sendMessage("get", b, c) } ; this.sendAck = function(b, c, d) { e() && a.sendMessage("ack", b, c, d) } ; this.sendBlob = function(b, c) { e() && a.sendMessage("blob", b, c) } ; this.endStream = function(b) { e() && (a.sendMessage("end", b), v[b] && (u.free(b), delete v[b])) } ; this.onsync = this.onpipe = this.onfilesystem = this.onfile = this.onclipboard = this.onvideo = this.onaudio = this.onerror = this.onname = this.onstatechange = null; var r = function(a) { var b = n[a]; b || (b = 0 === a ? l.getDefaultLayer() : 0 < a ? l.createLayer() : l.createBuffer(), n[a] = b); return b } , w = { "miter-limit": function(a, b) { l.setMiterLimit(a, parseFloat(b)) } } , B = { ack: function(a) { var b = parseInt(a[0]) , c = a[1]; a = parseInt(a[2]); var d = v[b]; if (d) { if (d.onack) d.onack(new Guacamole.Status(a,c)); 256 <= a && v[b] === d && (u.free(b), delete v[b]) } }, arc: function(a) { var b = r(parseInt(a[0])) , c = parseInt(a[1]) , d = parseInt(a[2]) , f = parseInt(a[3]) , e = parseFloat(a[4]) , g = parseFloat(a[5]); a = parseInt(a[6]); l.arc(b, c, d, f, e, g, 0 != a) }, audio: function(a) { var b = parseInt(a[0]); a = a[1]; var c = q[b] = new Guacamole.InputStream(d,b) , f = null; d.onaudio && (f = d.onaudio(c, a)); f || (f = Guacamole.AudioPlayer.getInstance(c, a)); f ? (m[b] = f, d.sendAck(b, "OK", 0)) : d.sendAck(b, "BAD TYPE", 783) }, blob: function(a) { var b = parseInt(a[0]); a = a[1]; if ((b = q[b]) && b.onblob) b.onblob(a) }, body: function(a) { var b = parseInt(a[0]) , b = t[b] , c = parseInt(a[1]) , f = a[2]; a = a[3]; b && b.onbody ? (c = q[c] = new Guacamole.InputStream(d,c), b.onbody(c, f, a)) : d.sendAck(c, "Receipt of body unsupported", 256) }, cfill: function(a) { var b = parseInt(a[0]) , c = r(parseInt(a[1])) , d = parseInt(a[2]) , f = parseInt(a[3]) , e = parseInt(a[4]); a = parseInt(a[5]); l.setChannelMask(c, b); l.fillColor(c, d, f, e, a) }, clip: function(a) { a = r(parseInt(a[0])); l.clip(a) }, clipboard: function(a) { var b = parseInt(a[0]); a = a[1]; d.onclipboard ? (b = q[b] = new Guacamole.InputStream(d,b), d.onclipboard(b, a)) : d.sendAck(b, "Clipboard unsupported", 256) }, close: function(a) { a = r(parseInt(a[0])); l.close(a) }, copy: function(a) { var b = r(parseInt(a[0])) , c = parseInt(a[1]) , d = parseInt(a[2]) , f = parseInt(a[3]) , e = parseInt(a[4]) , g = parseInt(a[5]) , h = r(parseInt(a[6])) , m = parseInt(a[7]); a = parseInt(a[8]); l.setChannelMask(h, g); l.copy(b, c, d, f, e, h, m, a) }, cstroke: function(a) { var b = parseInt(a[0]) , c = r(parseInt(a[1])) , d = h[parseInt(a[2])] , f = k[parseInt(a[3])] , e = parseInt(a[4]) , g = parseInt(a[5]) , m = parseInt(a[6]) , p = parseInt(a[7]); a = parseInt(a[8]); l.setChannelMask(c, b); l.strokeColor(c, d, f, e, g, m, p, a) }, cursor: function(a) { var b = parseInt(a[0]) , c = parseInt(a[1]) , d = r(parseInt(a[2])) , f = parseInt(a[3]) , e = parseInt(a[4]) , g = parseInt(a[5]); a = parseInt(a[6]); l.setCursor(b, c, d, f, e, g, a) }, curve: function(a) { var b = r(parseInt(a[0])) , c = parseInt(a[1]) , d = parseInt(a[2]) , f = parseInt(a[3]) , e = parseInt(a[4]) , g = parseInt(a[5]); a = parseInt(a[6]); l.curveTo(b, c, d, f, e, g, a) }, disconnect: function(a) { d.disconnect() }, dispose: function(a) { a = parseInt(a[0]); if (0 < a) { var b = r(a); l.dispose(b); delete n[a] } else 0 > a && delete n[a] }, distort: function(a) { var b = parseInt(a[0]) , c = parseFloat(a[1]) , d = parseFloat(a[2]) , f = parseFloat(a[3]) , e = parseFloat(a[4]) , g = parseFloat(a[5]); a = parseFloat(a[6]); 0 <= b && (b = r(b), l.distort(b, c, d, f, e, g, a)) }, error: function(a) { var b = a[0]; a = parseInt(a[1]); if (d.onerror) d.onerror(new Guacamole.Status(a,b)); d.disconnect() }, end: function(a) { a = parseInt(a[0]); var b = q[a]; if (b) { if (b.onend) b.onend(); delete q[a] } }, file: function(a) { var b = parseInt(a[0]) , c = a[1]; a = a[2]; d.onfile ? (b = q[b] = new Guacamole.InputStream(d,b), d.onfile(b, c, a)) : d.sendAck(b, "File transfer unsupported", 256) }, filesystem: function(a) { var b = parseInt(a[0]); a = a[1]; d.onfilesystem && (b = t[b] = new Guacamole.Object(d,b), d.onfilesystem(b, a)) }, identity: function(a) { a = r(parseInt(a[0])); l.setTransform(a, 1, 0, 0, 1, 0, 0) }, img: function(a) { var b = parseInt(a[0]) , c = parseInt(a[1]) , f = r(parseInt(a[2])) , e = a[3] , g = parseInt(a[4]) , h = parseInt(a[5]); a = q[b] = new Guacamole.InputStream(d,b); var m = new Guacamole.DataURIReader(a,e); m.onend = function() { l.setChannelMask(f, c); l.draw(f, g, h, m.getURI()) } }, jpeg: function(a) { var b = parseInt(a[0]) , c = r(parseInt(a[1])) , d = parseInt(a[2]) , f = parseInt(a[3]); a = a[4]; l.setChannelMask(c, b); l.draw(c, d, f, "data:image/jpeg;base64," + a) }, lfill: function(a) { var b = parseInt(a[0]) , c = r(parseInt(a[1])); a = r(parseInt(a[2])); l.setChannelMask(c, b); l.fillLayer(c, a) }, line: function(a) { var b = r(parseInt(a[0])) , c = parseInt(a[1]); a = parseInt(a[2]); l.lineTo(b, c, a) }, lstroke: function(a) { var b = parseInt(a[0]) , c = r(parseInt(a[1])); a = r(parseInt(a[2])); l.setChannelMask(c, b); l.strokeLayer(c, a) }, mouse: function(a) { var b = parseInt(a[0]); a = parseInt(a[1]); l.showCursor(!0); l.moveCursor(b, a) }, move: function(a) { var b = parseInt(a[0]) , c = parseInt(a[1]) , d = parseInt(a[2]) , f = parseInt(a[3]); a = parseInt(a[4]); 0 < b && 0 <= c && (b = r(b), c = r(c), l.move(b, c, d, f, a)) }, name: function(a) { if (d.onname) d.onname(a[0]) }, nest: function(b) { var c = parseInt(b[0]) , d = p[c]; null == d && (d = p[c] = new Guacamole.Parser, d.oninstruction = a.oninstruction); d.receive(b[1]) }, pipe: function(a) { var b = parseInt(a[0]) , c = a[1]; a = a[2]; d.onpipe ? (b = q[b] = new Guacamole.InputStream(d,b), d.onpipe(b, c, a)) : d.sendAck(b, "Named pipes unsupported", 256) }, png: function(a) { var b = parseInt(a[0]) , c = r(parseInt(a[1])) , d = parseInt(a[2]) , f = parseInt(a[3]); a = a[4]; l.setChannelMask(c, b); l.draw(c, d, f, "data:image/png;base64," + a) }, pop: function(a) { a = r(parseInt(a[0])); l.pop(a) }, push: function(a) { a = r(parseInt(a[0])); l.push(a) }, rect: function(a) { var b = r(parseInt(a[0])) , c = parseInt(a[1]) , d = parseInt(a[2]) , f = parseInt(a[3]); a = parseInt(a[4]); l.rect(b, c, d, f, a) }, reset: function(a) { a = r(parseInt(a[0])); l.reset(a) }, set: function(a) { var b = r(parseInt(a[0])) , c = a[2]; (a = w[a[1]]) && a(b, c) }, shade: function(a) { var b = parseInt(a[0]); a = parseInt(a[1]); 0 <= b && (b = r(b), l.shade(b, a)) }, size: function(a) { var b = parseInt(a[0]) , b = r(b) , c = parseInt(a[1]); a = parseInt(a[2]); l.resize(b, c, a) }, start: function(a) { var b = r(parseInt(a[0])) , c = parseInt(a[1]); a = parseInt(a[2]); l.moveTo(b, c, a) }, sync: function(e) { var g = parseInt(e[0]); l.flush(function() { for (var b in m) { var c = m[b]; c && c.sync() } g !== f && (a.sendMessage("sync", g), f = g) }); 2 === c && b(3); if (d.onsync) d.onsync(g) }, transfer: function(a) { var b = r(parseInt(a[0])) , c = parseInt(a[1]) , d = parseInt(a[2]) , f = parseInt(a[3]) , e = parseInt(a[4]) , g = parseInt(a[5]) , h = r(parseInt(a[6])) , m = parseInt(a[7]); a = parseInt(a[8]); 3 === g ? l.put(b, c, d, f, e, h, m, a) : 5 !== g && l.transfer(b, c, d, f, e, h, m, a, Guacamole.Client.DefaultTransferFunction[g]) }, transform: function(a) { var b = r(parseInt(a[0])) , c = parseFloat(a[1]) , d = parseFloat(a[2]) , f = parseFloat(a[3]) , e = parseFloat(a[4]) , g = parseFloat(a[5]); a = parseFloat(a[6]); l.transform(b, c, d, f, e, g, a) }, undefine: function(a) { a = parseInt(a[0]); if ((a = t[a]) && a.onundefine) a.onundefine() }, video: function(a) { var b = parseInt(a[0]) , c = r(parseInt(a[1])); a = a[2]; var f = q[b] = new Guacamole.InputStream(d,b) , e = null; d.onvideo && (e = d.onvideo(f, c, a)); e || (e = Guacamole.VideoPlayer.getInstance(f, c, a)); e ? d.sendAck(b, "OK", 0) : d.sendAck(b, "BAD TYPE", 783) } }; a.oninstruction = function(a, b) { (a = B[a]) && a(b) } ; this.disconnect = function() { 5 != c && 4 != c && (b(4), g && window.clearInterval(g), a.sendMessage("disconnect"), a.disconnect(), b(5)) } ; this.connect = function(c) { b(1); try { a.connect(c) } catch (C) { throw b(0), C; } g = window.setInterval(function() { a.sendMessage("nop") }, 5E3); b(2) } } ; Guacamole.Client.DefaultTransferFunction = { 0: function(a, b) { b.red = b.green = b.blue = 0 }, 15: function(a, b) { b.red = b.green = b.blue = 255 }, 3: function(a, b) { b.red = a.red; b.green = a.green; b.blue = a.blue; b.alpha = a.alpha }, 5: function(a, b) {}, 12: function(a, b) { b.red = 255 & ~a.red; b.green = 255 & ~a.green; b.blue = 255 & ~a.blue; b.alpha = a.alpha }, 10: function(a, b) { b.red = 255 & ~b.red; b.green = 255 & ~b.green; b.blue = 255 & ~b.blue }, 1: function(a, b) { b.red &= a.red; b.green &= a.green; b.blue &= a.blue }, 14: function(a, b) { b.red = 255 & ~(a.red & b.red); b.green = 255 & ~(a.green & b.green); b.blue = 255 & ~(a.blue & b.blue) }, 7: function(a, b) { b.red |= a.red; b.green |= a.green; b.blue |= a.blue }, 8: function(a, b) { b.red = 255 & ~(a.red | b.red); b.green = 255 & ~(a.green | b.green); b.blue = 255 & ~(a.blue | b.blue) }, 6: function(a, b) { b.red ^= a.red; b.green ^= a.green; b.blue ^= a.blue }, 9: function(a, b) { b.red = 255 & ~(a.red ^ b.red); b.green = 255 & ~(a.green ^ b.green); b.blue = 255 & ~(a.blue ^ b.blue) }, 4: function(a, b) { b.red &= 255 & ~a.red; b.green &= 255 & ~a.green; b.blue &= 255 & ~a.blue }, 13: function(a, b) { b.red = 255 & (~a.red | b.red); b.green = 255 & (~a.green | b.green); b.blue = 255 & (~a.blue | b.blue) }, 2: function(a, b) { b.red = 255 & a.red & ~b.red; b.green = 255 & a.green & ~b.green; b.blue = 255 & a.blue & ~b.blue }, 11: function(a, b) { b.red = 255 & (a.red | ~b.red); b.green = 255 & (a.green | ~b.green); b.blue = 255 & (a.blue | ~b.blue) } }; Guacamole = Guacamole || {}; Guacamole.DataURIReader = function(a, b) { var e = this , d = "data:" + b + ";base64,"; a.onblob = function(a) { d += a } ; a.onend = function() { if (e.onend) e.onend() } ; this.getURI = function() { return d } ; this.onend = null } ; Guacamole = Guacamole || {}; Guacamole.Display = function() { function a() { for (var a = 0; a < q.length; ) { var b = q[a]; if (!b.isReady()) break; b.flush(); a++ } q.splice(0, a) } function b(a, b) { this.isReady = function() { for (var a = 0; a < b.length; a++) if (b[a].blocked) return !1; return !0 } ; this.flush = function() { for (var c = 0; c < b.length; c++) b[c].execute(); a && a() } } function e(b, c) { var d = this; this.blocked = c; this.unblock = function() { d.blocked && (d.blocked = !1, a()) } ; this.execute = function() { b && b() } } function d(a, b) { a = new e(a,b); p.push(a); return a } var c = this , f = 0 , g = 0 , h = 1 , k = document.createElement("div"); k.style.position = "relative"; k.style.width = f + "px"; k.style.height = g + "px"; k.style.transformOrigin = k.style.webkitTransformOrigin = k.style.MozTransformOrigin = k.style.OTransformOrigin = k.style.msTransformOrigin = "0 0"; var l = new Guacamole.Display.VisibleLayer(f,g) , n = new Guacamole.Display.VisibleLayer(0,0); n.setChannelMask(Guacamole.Layer.SRC); k.appendChild(l.getElement()); k.appendChild(n.getElement()); var m = document.createElement("div"); m.style.position = "relative"; m.style.width = f * h + "px"; m.style.height = g * h + "px"; m.appendChild(k); this.cursorY = this.cursorX = this.cursorHotspotY = this.cursorHotspotX = 0; this.oncursor = this.onresize = null; var p = [] , q = []; this.getElement = function() { return m } ; this.getWidth = function() { return f } ; this.getHeight = function() { return g } ; this.getDefaultLayer = function() { return l } ; this.getCursorLayer = function() { return n } ; this.createLayer = function() { var a = new Guacamole.Display.VisibleLayer(f,g); a.move(l, 0, 0, 0); return a } ; this.createBuffer = function() { var a = new Guacamole.Layer(0,0); a.autosize = 1; return a } ; this.flush = function(c) { q.push(new b(c,p)); p = []; a() } ; this.setCursor = function(a, b, f, e, g, h, m) { d(function() { c.cursorHotspotX = a; c.cursorHotspotY = b; n.resize(h, m); n.copy(f, e, g, h, m, 0, 0); c.moveCursor(c.cursorX, c.cursorY); if (c.oncursor) c.oncursor(n.toCanvas(), a, b) }) } ; this.showCursor = function(a) { var b = n.getElement() , c = b.parentNode; !1 === a ? c && c.removeChild(b) : c !== k && k.appendChild(b) } ; this.moveCursor = function(a, b) { n.translate(a - c.cursorHotspotX, b - c.cursorHotspotY); c.cursorX = a; c.cursorY = b } ; this.resize = function(a, b, e) { d(function() { a.resize(b, e); if (a === l && (f = b, g = e, k.style.width = f + "px", k.style.height = g + "px", m.style.width = f * h + "px", m.style.height = g * h + "px", c.onresize)) c.onresize(b, e) }) } ; this.drawImage = function(a, b, c, f) { d(function() { a.drawImage(b, c, f) }) } ; this.drawBlob = function(a, b, c, f) { var e = URL.createObjectURL(f); f = d(function() { g.width && g.height && a.drawImage(b, c, g); URL.revokeObjectURL(e) }, !0); var g = new Image; g.onload = f.unblock; g.onerror = f.unblock; g.src = e } ; this.draw = function(a, b, c, f) { var e = d(function() { g.width && g.height && a.drawImage(b, c, g) }, !0) , g = new Image; g.onload = e.unblock; g.onerror = e.unblock; g.src = f } ; this.play = function(a, b, c, f) { var e = document.createElement("video"); e.type = b; e.src = f; e.addEventListener("play", function() { function b() { a.drawImage(0, 0, e); e.ended || window.setTimeout(b, 20) } b() }, !1); d(e.play) } ; this.transfer = function(a, b, c, f, e, g, h, m, k) { d(function() { g.transfer(a, b, c, f, e, h, m, k) }) } ; this.put = function(a, b, c, f, e, g, h, m) { d(function() { g.put(a, b, c, f, e, h, m) }) } ; this.copy = function(a, b, c, f, e, g, h, m) { d(function() { g.copy(a, b, c, f, e, h, m) }) } ; this.moveTo = function(a, b, c) { d(function() { a.moveTo(b, c) }) } ; this.lineTo = function(a, b, c) { d(function() { a.lineTo(b, c) }) } ; this.arc = function(a, b, c, f, e, g, h) { d(function() { a.arc(b, c, f, e, g, h) }) } ; this.curveTo = function(a, b, c, f, e, g, h) { d(function() { a.curveTo(b, c, f, e, g, h) }) } ; this.close = function(a) { d(function() { a.close() }) } ; this.rect = function(a, b, c, f, e) { d(function() { a.rect(b, c, f, e) }) } ; this.clip = function(a) { d(function() { a.clip() }) } ; this.strokeColor = function(a, b, c, f, e, g, h, m) { d(function() { a.strokeColor(b, c, f, e, g, h, m) }) } ; this.fillColor = function(a, b, c, f, e) { d(function() { a.fillColor(b, c, f, e) }) } ; this.strokeLayer = function(a, b, c, f, e) { d(function() { a.strokeLayer(b, c, f, e) }) } ; this.fillLayer = function(a, b) { d(function() { a.fillLayer(b) }) } ; this.push = function(a) { d(function() { a.push() }) } ; this.pop = function(a) { d(function() { a.pop() }) } ; this.reset = function(a) { d(function() { a.reset() }) } ; this.setTransform = function(a, b, c, f, e, g, h) { d(function() { a.setTransform(b, c, f, e, g, h) }) } ; this.transform = function(a, b, c, f, e, g, h) { d(function() { a.transform(b, c, f, e, g, h) }) } ; this.setChannelMask = function(a, b) { d(function() { a.setChannelMask(b) }) } ; this.setMiterLimit = function(a, b) { d(function() { a.setMiterLimit(b) }) } ; this.dispose = function(a) { d(function() { a.dispose() }) } ; this.distort = function(a, b, c, f, e, g, h) { d(function() { a.distort(b, c, f, e, g, h) }) } ; this.move = function(a, b, c, f, e) { d(function() { a.move(b, c, f, e) }) } ; this.shade = function(a, b) { d(function() { a.shade(b) }) } ; this.scale = function(a) { k.style.transform = k.style.WebkitTransform = k.style.MozTransform = k.style.OTransform = k.style.msTransform = "scale(" + a + "," + a + ")"; h = a; m.style.width = f * h + "px"; m.style.height = g * h + "px" } ; this.getScale = function() { return h } ; this.flatten = function() { function a(a) { var b = [], c; for (c in a.children) b.push(a.children[c]); b.sort(function(a, b) { var c = a.z - b.z; if (0 !== c) return c; a = a.getElement(); b = b.getElement().compareDocumentPosition(a); return b & Node.DOCUMENT_POSITION_PRECEDING ? -1 : b & Node.DOCUMENT_POSITION_FOLLOWING ? 1 : 0 }); return b } function b(c, f, e) { if (0 < c.width && 0 < c.height) { var g = d.globalAlpha; d.globalAlpha *= c.alpha / 255; d.drawImage(c.getCanvas(), f, e); c = a(c); for (var h = 0; h < c.length; h++) { var m = c[h]; b(m, f + m.x, e + m.y) } d.globalAlpha = g } } var c = document.createElement("canvas"); c.width = l.width; c.height = l.height; var d = c.getContext("2d"); b(l, 0, 0); return c } } ; Guacamole.Display.VisibleLayer = function(a, b) { Guacamole.Layer.apply(this, [a, b]); var e = this; this.__unique_id = Guacamole.Display.VisibleLayer.__next_id++; this.alpha = 255; this.z = this.y = this.x = 0; this.matrix = [1, 0, 0, 1, 0, 0]; this.parent = null; this.children = {}; var d = e.getCanvas(); d.style.position = "absolute"; d.style.left = "0px"; d.style.top = "0px"; var c = document.createElement("div"); c.appendChild(d); c.style.width = a + "px"; c.style.height = b + "px"; c.style.position = "absolute"; c.style.left = "0px"; c.style.top = "0px"; c.style.overflow = "hidden"; var f = this.resize; this.resize = function(a, b) { c.style.width = a + "px"; c.style.height = b + "px"; f(a, b) } ; this.getElement = function() { return c } ; var g = "translate(0px, 0px)" , h = "matrix(1, 0, 0, 1, 0, 0)"; this.translate = function(a, b) { e.x = a; e.y = b; g = "translate(" + a + "px," + b + "px)"; c.style.transform = c.style.WebkitTransform = c.style.MozTransform = c.style.OTransform = c.style.msTransform = g + " " + h } ; this.move = function(a, b, d, f) { e.parent !== a && (e.parent && delete e.parent.children[e.__unique_id], e.parent = a, a.children[e.__unique_id] = e, a.getElement().appendChild(c)); e.translate(b, d); e.z = f; c.style.zIndex = f } ; this.shade = function(a) { e.alpha = a; c.style.opacity = a / 255 } ; this.dispose = function() { e.parent && (delete e.parent.children[e.__unique_id], e.parent = null); c.parentNode && c.parentNode.removeChild(c) } ; this.distort = function(a, b, d, f, p, q) { e.matrix = [a, b, d, f, p, q]; h = "matrix(" + a + "," + b + "," + d + "," + f + "," + p + "," + q + ")"; c.style.transform = c.style.WebkitTransform = c.style.MozTransform = c.style.OTransform = c.style.msTransform = g + " " + h } } ; Guacamole.Display.VisibleLayer.__next_id = 0; Guacamole = Guacamole || {}; Guacamole.InputStream = function(a, b) { var e = this; this.index = b; this.onend = this.onblob = null; this.sendAck = function(b, c) { a.sendAck(e.index, b, c) } } ; Guacamole = Guacamole || {}; Guacamole.IntegerPool = function() { var a = this , b = []; this.next_int = 0; this.next = function() { return 0 < b.length ? b.shift() : a.next_int++ } ; this.free = function(a) { b.push(a) } } ; Guacamole = Guacamole || {}; Guacamole.JSONReader = function(a) { var b = this; a = new Guacamole.StringReader(a); var e = ""; this.getLength = function() { return e.length } ; this.getJSON = function() { return JSON.parse(e) } ; a.ontext = function(a) { e += a; if (b.onprogress) b.onprogress(a.length) } ; a.onend = function() { if (b.onend) b.onend() } ; this.onend = this.onprogress = null } ; Guacamole = Guacamole || {}; Guacamole.Keyboard = function(a) { function b(a, b, c) { if (!a) return null; var d = a.indexOf("U+"); if (0 <= d) a = a.substring(d + 2), a = String.fromCharCode(parseInt(a, 16)); else if (1 !== a.length || 3 === b) return r(m[a], b); !0 === c ? a = a.toUpperCase() : !1 === c && (a = a.toLowerCase()); c = a.charCodeAt(0); return e(c) } function e(a) { return 31 >= a || 127 <= a && 159 >= a ? 65280 | a : 0 <= a && 255 >= a ? a : 256 <= a && 1114111 >= a ? 16777216 | a : null } function d() { var a = B(); if (!a) return !1; var b; do b = a, a = B(); while (null !== a); return b.defaultPrevented } var c = this; this.onkeyup = this.onkeydown = null; var f = function() { var a = this; this.timestamp = (new Date).getTime(); this.defaultPrevented = !1; this.keysym = null; this.reliable = !1; this.getAge = function() { return (new Date).getTime() - a.timestamp } } , g = function(a, d, e, g) { f.apply(this); this.keyCode = a; this.keyIdentifier = d; this.key = e; this.location = g; if (e = this.keysym = b(e, g) || r(n[a], g)) e = this.keysym, e = !(0 <= e && 255 >= e || 16777216 === (e & 4294901760)); e && (this.reliable = !0); if (e = !this.keysym) d ? (e = d.indexOf("U+"), -1 === e ? e = !0 : (e = parseInt(d.substring(e + 2), 16), e = a !== e || 65 <= a && 90 >= a || 48 <= a && 57 >= a ? !0 : !1)) : e = !1; e && (this.keysym = b(d, g, c.modifiers.shift)); d = !c.modifiers.ctrl && !(navigator && navigator.platform && navigator.platform.match(/^mac/i)); if (!c.modifiers.alt && c.modifiers.ctrl || d && c.modifiers.alt || c.modifiers.meta || c.modifiers.hyper) this.reliable = !0; t[a] = this.keysym }; g.prototype = new f; var h = function(a) { f.apply(this); this.charCode = a; this.keysym = e(a); this.reliable = !0 }; h.prototype = new f; var k = function(a, c, d, e) { f.apply(this); this.keyCode = a; this.keyIdentifier = c; this.key = d; this.location = e; this.keysym = t[a] || r(n[a], e) || b(d, e); this.reliable = !0 }; k.prototype = new f; var l = [] , n = { 8: [65288], 9: [65289], 12: [65291, 65291, 65291, 65461], 13: [65293], 16: [65505, 65505, 65506], 17: [65507, 65507, 65508], 18: [65513, 65513, 65027], 19: [65299], 20: [65509], 27: [65307], 32: [32], 33: [65365, 65365, 65365, 65465], 34: [65366, 65366, 65366, 65459], 35: [65367, 65367, 65367, 65457], 36: [65360, 65360, 65360, 65463], 37: [65361, 65361, 65361, 65460], 38: [65362, 65362, 65362, 65464], 39: [65363, 65363, 65363, 65462], 40: [65364, 65364, 65364, 65458], 45: [65379, 65379, 65379, 65456], 46: [65535, 65535, 65535, 65454], 91: [65515], 92: [65383], 93: null, 96: [65456], 97: [65457], 98: [65458], 99: [65459], 100: [65460], 101: [65461], 102: [65462], 103: [65463], 104: [65464], 105: [65465], 106: [65450], 107: [65451], 109: [65453], 110: [65454], 111: [65455], 112: [65470], 113: [65471], 114: [65472], 115: [65473], 116: [65474], 117: [65475], 118: [65476], 119: [65477], 120: [65478], 121: [65479], 122: [65480], 123: [65481], 144: [65407], 145: [65300], 225: [65027] } , m = { Again: [65382], AllCandidates: [65341], Alphanumeric: [65328], Alt: [65513, 65513, 65027], Attn: [64782], AltGraph: [65027], ArrowDown: [65364], ArrowLeft: [65361], ArrowRight: [65363], ArrowUp: [65362], Backspace: [65288], CapsLock: [65509], Cancel: [65385], Clear: [65291], Convert: [65313], Copy: [64789], Crsel: [64796], CrSel: [64796], CodeInput: [65335], Compose: [65312], Control: [65507, 65507, 65508], ContextMenu: [65383], DeadGrave: [65104], DeadAcute: [65105], DeadCircumflex: [65106], DeadTilde: [65107], DeadMacron: [65108], DeadBreve: [65109], DeadAboveDot: [65110], DeadUmlaut: [65111], DeadAboveRing: [65112], DeadDoubleacute: [65113], DeadCaron: [65114], DeadCedilla: [65115], DeadOgonek: [65116], DeadIota: [65117], DeadVoicedSound: [65118], DeadSemivoicedSound: [65119], Delete: [65535], Down: [65364], End: [65367], Enter: [65293], EraseEof: [64774], Escape: [65307], Execute: [65378], Exsel: [64797], ExSel: [64797], F1: [65470], F2: [65471], F3: [65472], F4: [65473], F5: [65474], F6: [65475], F7: [65476], F8: [65477], F9: [65478], F10: [65479], F11: [65480], F12: [65481], F13: [65482], F14: [65483], F15: [65484], F16: [65485], F17: [65486], F18: [65487], F19: [65488], F20: [65489], F21: [65490], F22: [65491], F23: [65492], F24: [65493], Find: [65384], GroupFirst: [65036], GroupLast: [65038], GroupNext: [65032], GroupPrevious: [65034], FullWidth: null, HalfWidth: null, HangulMode: [65329], Hankaku: [65321], HanjaMode: [65332], Help: [65386], Hiragana: [65317], HiraganaKatakana: [65319], Home: [65360], Hyper: [65517, 65517, 65518], Insert: [65379], JapaneseHiragana: [65317], JapaneseKatakana: [65318], JapaneseRomaji: [65316], JunjaMode: [65336], KanaMode: [65325], KanjiMode: [65313], Katakana: [65318], Left: [65361], Meta: [65511, 65511, 65512], ModeChange: [65406], NumLock: [65407], PageDown: [65366], PageUp: [65365], Pause: [65299], Play: [64790], PreviousCandidate: [65342], PrintScreen: [64797], Redo: [65382], Right: [65363], RomanCharacters: null, Scroll: [65300], Select: [65376], Separator: [65452], Shift: [65505, 65505, 65506], SingleCandidate: [65340], Super: [65515, 65515, 65516], Tab: [65289], Up: [65362], Undo: [65381], Win: [65515], Zenkaku: [65320], ZenkakuHankaku: [65322] } , p = { 65027: !0, 65505: !0, 65506: !0, 65507: !0, 65508: !0, 65511: !0, 65512: !0, 65513: !0, 65514: !0, 65515: !0, 65516: !0 }; this.modifiers = new Guacamole.Keyboard.ModifierState; this.pressed = {}; var q = {} , t = {} , u = null , v = null , r = function(a, b) { return a ? a[b] || a[0] : null }; this.press = function(a) { if (null !== a) { if (!c.pressed[a] && (c.pressed[a] = !0, c.onkeydown)) { var b = c.onkeydown(a); q[a] = b; window.clearTimeout(u); window.clearInterval(v); p[a] || (u = window.setTimeout(function() { v = window.setInterval(function() { c.onkeyup(a); c.onkeydown(a) }, 50) }, 500)); return b } return q[a] || !1 } } ; this.release = function(a) { if (c.pressed[a] && (delete c.pressed[a], window.clearTimeout(u), window.clearInterval(v), null !== a && c.onkeyup)) c.onkeyup(a) } ; this.reset = function() { for (var a in c.pressed) c.release(parseInt(a)); l = [] } ; var w = function(a) { a = Guacamole.Keyboard.ModifierState.fromKeyboardEvent(a); c.modifiers.alt && !1 === a.alt && (c.release(65513), c.release(65514), c.release(65027)); c.modifiers.shift && !1 === a.shift && (c.release(65505), c.release(65506)); c.modifiers.ctrl && !1 === a.ctrl && (c.release(65507), c.release(65508)); c.modifiers.meta && !1 === a.meta && (c.release(65511), c.release(65512)); c.modifiers.hyper && !1 === a.hyper && (c.release(65515), c.release(65516)); c.modifiers = a } , B = function() { var a = l[0]; if (!a) return null; if (a instanceof g) { var b = null , d = []; a.reliable ? (b = a.keysym, d = l.splice(0, 1)) : l[1]instanceof h ? (b = l[1].keysym, d = l.splice(0, 2)) : l[1] && (b = a.keysym, d = l.splice(0, 1)); if (0 < d.length) { if (b) { c.modifiers.ctrl && c.modifiers.alt && !(65 <= b && 90 >= b || 97 <= b && 122 >= b) && (255 >= b || 16777216 === (b & 4278190080)) && (c.release(65507), c.release(65508), c.release(65513), c.release(65514)); var f = !c.press(b); t[a.keyCode] = b; c.modifiers.meta && 65511 !== b && 65512 !== b && c.release(b); for (b = 0; b < d.length; b++) d[b].defaultPrevented = f } return a } } else { if (a instanceof k) if (b = a.keysym) c.release(b), a.defaultPrevented = !0; else return c.reset(), a; return l.shift() } return null } , x = function(a) { return "location"in a ? a.location : "keyLocation"in a ? a.keyLocation : 0 }; a.addEventListener("keydown", function(a) { if (c.onkeydown) { var b; window.event ? b = window.event.keyCode : a.which && (b = a.which); w(a); 229 !== b && (b = new g(b,a.keyIdentifier,a.key,x(a)), l.push(b), d() && a.preventDefault()) } }, !0); a.addEventListener("keypress", function(a) { if (c.onkeydown || c.onkeyup) { var b; window.event ? b = window.event.keyCode : a.which && (b = a.which); w(a); b = new h(b); l.push(b); d() && a.preventDefault() } }, !0); a.addEventListener("keyup", function(a) { if (c.onkeyup) { a.preventDefault(); var b; window.event ? b = window.event.keyCode : a.which && (b = a.which); w(a); a = new k(b,a.keyIdentifier,a.key,x(a)); l.push(a); d() } }, !0) } ; Guacamole.Keyboard.ModifierState = function() { this.hyper = this.meta = this.alt = this.ctrl = this.shift = !1 } ; Guacamole.Keyboard.ModifierState.fromKeyboardEvent = function(a) { var b = new Guacamole.Keyboard.ModifierState; b.shift = a.shiftKey; b.ctrl = a.ctrlKey; b.alt = a.altKey; b.meta = a.metaKey; a.getModifierState && (b.hyper = a.getModifierState("OS") || a.getModifierState("Super") || a.getModifierState("Hyper") || a.getModifierState("Win")); return b } ; Guacamole = Guacamole || {}; Guacamole.Layer = function(a, b) { function e(a, b, c, f) { a = c + a; b = f + b; d.resize(a > d.width ? a : d.width, b > d.height ? b : d.height) } var d = this , c = document.createElement("canvas") , f = c.getContext("2d"); f.save(); var g = !0 , h = !0 , k = 0 , l = { 1: "destination-in", 2: "destination-out", 4: "source-in", 6: "source-atop", 8: "source-out", 9: "destination-atop", 10: "xor", 11: "destination-over", 12: "copy", 14: "source-over", 15: "lighter" } , n = function(a, b) { a = a || 0; b = b || 0; var e = 64 * Math.ceil(a / 64) , h = 64 * Math.ceil(b / 64); if (c.width !== e || c.height !== h) { var m = null; g || 0 === c.width || 0 === c.height || (m = document.createElement("canvas"), m.width = Math.min(d.width, a), m.height = Math.min(d.height, b), m.getContext("2d").drawImage(c, 0, 0, m.width, m.height, 0, 0, m.width, m.height)); var l = f.globalCompositeOperation; c.width = e; c.height = h; m && f.drawImage(m, 0, 0, m.width, m.height, 0, 0, m.width, m.height); f.globalCompositeOperation = l; k = 0; f.save() } else d.reset(); d.width = a; d.height = b }; this.autosize = !1; this.width = a; this.height = b; this.getCanvas = function() { return c } ; this.toCanvas = function() { var a = document.createElement("canvas"); a.width = d.width; a.height = d.height; a.getContext("2d").drawImage(d.getCanvas(), 0, 0); return a } ; this.resize = function(a, b) { a === d.width && b === d.height || n(a, b) } ; this.drawImage = function(a, b, c) { d.autosize && e(a, b, c.width, c.height); f.drawImage(c, a, b); g = !1 } ; this.transfer = function(a, b, c, h, k, l, n, w) { var m = a.getCanvas(); if (!(b >= m.width || c >= m.height) && (b + h > m.width && (h = m.width - b), c + k > m.height && (k = m.height - c), 0 !== h && 0 !== k)) { d.autosize && e(l, n, h, k); a = a.getCanvas().getContext("2d").getImageData(b, c, h, k); b = f.getImageData(l, n, h, k); for (c = 0; c < h * k * 4; c += 4) { var m = new Guacamole.Layer.Pixel(a.data[c],a.data[c + 1],a.data[c + 2],a.data[c + 3]) , p = new Guacamole.Layer.Pixel(b.data[c],b.data[c + 1],b.data[c + 2],b.data[c + 3]); w(m, p); b.data[c] = p.red; b.data[c + 1] = p.green; b.data[c + 2] = p.blue; b.data[c + 3] = p.alpha } f.putImageData(b, l, n); g = !1 } } ; this.put = function(a, b, c, h, k, l, n) { var m = a.getCanvas(); b >= m.width || c >= m.height || (b + h > m.width && (h = m.width - b), c + k > m.height && (k = m.height - c), 0 !== h && 0 !== k && (d.autosize && e(l, n, h, k), a = a.getCanvas().getContext("2d").getImageData(b, c, h, k), f.putImageData(a, l, n), g = !1)) } ; this.copy = function(a, b, c, h, k, l, n) { a = a.getCanvas(); b >= a.width || c >= a.height || (b + h > a.width && (h = a.width - b), c + k > a.height && (k = a.height - c), 0 !== h && 0 !== k && (d.autosize && e(l, n, h, k), f.drawImage(a, b, c, h, k, l, n, h, k), g = !1)) } ; this.moveTo = function(a, b) { h && (f.beginPath(), h = !1); d.autosize && e(a, b, 0, 0); f.moveTo(a, b) } ; this.lineTo = function(a, b) { h && (f.beginPath(), h = !1); d.autosize && e(a, b, 0, 0); f.lineTo(a, b) } ; this.arc = function(a, b, c, g, k, l) { h && (f.beginPath(), h = !1); d.autosize && e(a, b, 0, 0); f.arc(a, b, c, g, k, l) } ; this.curveTo = function(a, b, c, g, k, l) { h && (f.beginPath(), h = !1); d.autosize && e(k, l, 0, 0); f.bezierCurveTo(a, b, c, g, k, l) } ; this.close = function() { f.closePath(); h = !0 } ; this.rect = function(a, b, c, g) { h && (f.beginPath(), h = !1); d.autosize && e(a, b, c, g); f.rect(a, b, c, g) } ; this.clip = function() { f.clip(); h = !0 } ; this.strokeColor = function(a, b, c, d, e, k, l) { f.lineCap = a; f.lineJoin = b; f.lineWidth = c; f.strokeStyle = "rgba(" + d + "," + e + "," + k + "," + l / 255 + ")"; f.stroke(); g = !1; h = !0 } ; this.fillColor = function(a, b, c, d) { f.fillStyle = "rgba(" + a + "," + b + "," + c + "," + d / 255 + ")"; f.fill(); g = !1; h = !0 } ; this.strokeLayer = function(a, b, c, d) { f.lineCap = a; f.lineJoin = b; f.lineWidth = c; f.strokeStyle = f.createPattern(d.getCanvas(), "repeat"); f.stroke(); g = !1; h = !0 } ; this.fillLayer = function(a) { f.fillStyle = f.createPattern(a.getCanvas(), "repeat"); f.fill(); g = !1; h = !0 } ; this.push = function() { f.save(); k++ } ; this.pop = function() { 0 < k && (f.restore(), k--) } ; this.reset = function() { for (; 0 < k; ) f.restore(), k--; f.restore(); f.save(); f.beginPath(); h = !1 } ; this.setTransform = function(a, b, c, d, e, g) { f.setTransform(a, b, c, d, e, g) } ; this.transform = function(a, b, c, d, e, g) { f.transform(a, b, c, d, e, g) } ; this.setChannelMask = function(a) { f.globalCompositeOperation = l[a] } ; this.setMiterLimit = function(a) { f.miterLimit = a } ; n(a, b); c.style.zIndex = -1 } ; Guacamole.Layer.ROUT = 2; Guacamole.Layer.ATOP = 6; Guacamole.Layer.XOR = 10; Guacamole.Layer.ROVER = 11; Guacamole.Layer.OVER = 14; Guacamole.Layer.PLUS = 15; Guacamole.Layer.RIN = 1; Guacamole.Layer.IN = 4; Guacamole.Layer.OUT = 8; Guacamole.Layer.RATOP = 9; Guacamole.Layer.SRC = 12; Guacamole.Layer.Pixel = function(a, b, e, d) { this.red = a; this.green = b; this.blue = e; this.alpha = d } ; Guacamole = Guacamole || {}; Guacamole.Mouse = function(a) { function b(a) { a.stopPropagation(); a.preventDefault && a.preventDefault(); a.returnValue = !1 } function e() { f = c.touchMouseThreshold } function d(a) { var d = a.deltaY || -a.wheelDeltaY || -a.wheelDelta; d ? 1 === a.deltaMode ? d = a.deltaY * c.PIXELS_PER_LINE : 2 === a.deltaMode && (d = a.deltaY * c.PIXELS_PER_PAGE) : d = a.detail * c.PIXELS_PER_LINE; g += d; if (g <= -c.scrollThreshold) { do c.onmousedown && (c.currentState.up = !0, c.onmousedown(c.currentState)), c.onmouseup && (c.currentState.up = !1, c.onmouseup(c.currentState)), g += c.scrollThreshold; while (g <= -c.scrollThreshold); g = 0 } if (g >= c.scrollThreshold) { do c.onmousedown && (c.currentState.down = !0, c.onmousedown(c.currentState)), c.onmouseup && (c.currentState.down = !1, c.onmouseup(c.currentState)), g -= c.scrollThreshold; while (g >= c.scrollThreshold); g = 0 } b(a) } var c = this; this.touchMouseThreshold = 3; this.scrollThreshold = 53; this.PIXELS_PER_LINE = 18; this.PIXELS_PER_PAGE = 16 * this.PIXELS_PER_LINE; this.currentState = new Guacamole.Mouse.State(0,0,!1,!1,!1,!1,!1); this.onmouseout = this.onmousemove = this.onmouseup = this.onmousedown = null; var f = 0 , g = 0; a.addEventListener("contextmenu", function(a) { b(a) }, !1); a.addEventListener("mousemove", function(d) { b(d); if (f) f--; else if (c.currentState.fromClientPosition(a, d.clientX, d.clientY), c.onmousemove) c.onmousemove(c.currentState) }, !1); a.addEventListener("mousedown", function(a) { b(a); if (!f) { switch (a.button) { case 0: c.currentState.left = !0; break; case 1: c.currentState.middle = !0; break; case 2: c.currentState.right = !0 } if (c.onmousedown) c.onmousedown(c.currentState) } }, !1); a.addEventListener("mouseup", function(a) { b(a); if (!f) { switch (a.button) { case 0: c.currentState.left = !1; break; case 1: c.currentState.middle = !1; break; case 2: c.currentState.right = !1 } if (c.onmouseup) c.onmouseup(c.currentState) } }, !1); a.addEventListener("mouseout", function(d) { d || (d = window.event); for (var f = d.relatedTarget || d.toElement; f; ) { if (f === a) return; f = f.parentNode } b(d); if (c.currentState.left || c.currentState.middle || c.currentState.right) if (c.currentState.left = !1, c.currentState.middle = !1, c.currentState.right = !1, c.onmouseup) c.onmouseup(c.currentState); if (c.onmouseout) c.onmouseout() }, !1); a.addEventListener("selectstart", function(a) { b(a) }, !1); a.addEventListener("touchmove", e, !1); a.addEventListener("touchstart", e, !1); a.addEventListener("touchend", e, !1); a.addEventListener("DOMMouseScroll", d, !1); a.addEventListener("mousewheel", d, !1); a.addEventListener("wheel", d, !1); var h = function() { var a = document.createElement("div"); if (!("cursor"in a.style)) return !1; try { a.style.cursor = "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEX///+nxBvIAAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg\x3d\x3d) 0 0, auto" } catch (l) { return !1 } return /\burl\([^()]*\)\s+0\s+0\b/.test(a.style.cursor || "") }(); this.setCursor = function(b, c, d) { return h ? (b = b.toDataURL("image/png"), a.style.cursor = "url(" + b + ") " + c + " " + d + ", auto", !0) : !1 } } ; Guacamole.Mouse.State = function(a, b, e, d, c, f, g) { var h = this; this.x = a; this.y = b; this.left = e; this.middle = d; this.right = c; this.up = f; this.down = g; this.fromClientPosition = function(a, b, c) { h.x = b - a.offsetLeft; h.y = c - a.offsetTop; for (a = a.offsetParent; a && a !== document.body; ) h.x -= a.offsetLeft - a.scrollLeft, h.y -= a.offsetTop - a.scrollTop, a = a.offsetParent; a && (b = document.body.scrollTop || document.documentElement.scrollTop, h.x -= a.offsetLeft - (document.body.scrollLeft || document.documentElement.scrollLeft), h.y -= a.offsetTop - b) } } ; Guacamole.Mouse.Touchpad = function(a) { var b = this; this.scrollThreshold = 20 * (window.devicePixelRatio || 1); this.clickTimingThreshold = 250; this.clickMoveThreshold = 10 * (window.devicePixelRatio || 1); this.currentState = new Guacamole.Mouse.State(0,0,!1,!1,!1,!1,!1); this.onmousemove = this.onmouseup = this.onmousedown = null; var e = 0 , d = 0 , c = 0 , f = 0 , g = 0 , h = { 1: "left", 2: "right", 3: "middle" } , k = !1 , l = null; a.addEventListener("touchend", function(a) { a.preventDefault(); if (k && 0 === a.touches.length) { a = (new Date).getTime(); var c = h[e]; if (b.currentState[c]) { b.currentState[c] = !1; if (b.onmouseup) b.onmouseup(b.currentState); l && (window.clearTimeout(l), l = null) } if (a - f <= b.clickTimingThreshold && g < b.clickMoveThreshold) { b.currentState[c] = !0; if (b.onmousedown) b.onmousedown(b.currentState); l = window.setTimeout(function() { b.currentState[c] = !1; if (b.onmouseup) b.onmouseup(b.currentState); k = !1 }, b.clickTimingThreshold) } l || (k = !1) } }, !1); a.addEventListener("touchstart", function(a) { a.preventDefault(); e = Math.min(a.touches.length, 3); l && (window.clearTimeout(l), l = null); k || (k = !0, a = a.touches[0], d = a.clientX, c = a.clientY, f = (new Date).getTime(), g = 0) }, !1); a.addEventListener("touchmove", function(h) { h.preventDefault(); h = h.touches[0]; var m = h.clientX - d , k = h.clientY - c; g += Math.abs(m) + Math.abs(k); if (1 === e) { var l = 1 + g / ((new Date).getTime() - f); b.currentState.x += m * l; b.currentState.y += k * l; 0 > b.currentState.x ? b.currentState.x = 0 : b.currentState.x >= a.offsetWidth && (b.currentState.x = a.offsetWidth - 1); 0 > b.currentState.y ? b.currentState.y = 0 : b.currentState.y >= a.offsetHeight && (b.currentState.y = a.offsetHeight - 1); if (b.onmousemove) b.onmousemove(b.currentState); d = h.clientX; c = h.clientY } else if (2 === e && Math.abs(k) >= b.scrollThreshold) { m = 0 < k ? "down" : "up"; b.currentState[m] = !0; if (b.onmousedown) b.onmousedown(b.currentState); b.currentState[m] = !1; if (b.onmouseup) b.onmouseup(b.currentState); d = h.clientX; c = h.clientY } }, !1) } ; Guacamole.Mouse.Touchscreen = function(a) { function b(a) { if (!h.currentState[a] && (h.currentState[a] = !0, h.onmousedown)) h.onmousedown(h.currentState) } function e(a) { if (h.currentState[a] && (h.currentState[a] = !1, h.onmouseup)) h.onmouseup(h.currentState) } function d(b, c) { h.currentState.fromClientPosition(a, b, c); if (h.onmousemove) h.onmousemove(h.currentState) } function c(a) { var b = a.touches[0] || a.changedTouches[0]; a = b.clientX - l; b = b.clientY - n; return Math.sqrt(a * a + b * b) >= h.clickMoveThreshold } function f(a) { a = a.touches[0]; k = !0; l = a.clientX; n = a.clientY } function g() { window.clearTimeout(m); window.clearTimeout(p); k = !1 } var h = this , k = !1 , l = null , n = null , m = null , p = null; this.scrollThreshold = 20 * (window.devicePixelRatio || 1); this.clickTimingThreshold = 250; this.clickMoveThreshold = 16 * (window.devicePixelRatio || 1); this.longPressThreshold = 500; this.currentState = new Guacamole.Mouse.State(0,0,!1,!1,!1,!1,!1); this.onmousemove = this.onmouseup = this.onmousedown = null; a.addEventListener("touchend", function(a) { k && (0 !== a.touches.length || 1 !== a.changedTouches.length ? g() : (window.clearTimeout(p), e("left"), c(a) || (a.preventDefault(), h.currentState.left || (a = a.changedTouches[0], d(a.clientX, a.clientY), b("left"), m = window.setTimeout(function() { e("left"); g() }, h.clickTimingThreshold))))) }, !1); a.addEventListener("touchstart", function(a) { 1 !== a.touches.length ? g() : (a.preventDefault(), f(a), window.clearTimeout(m), p = window.setTimeout(function() { var c = a.touches[0]; d(c.clientX, c.clientY); b("right"); e("right"); g() }, h.longPressThreshold)) }, !1); a.addEventListener("touchmove", function(a) { k && (c(a) && window.clearTimeout(p), 1 !== a.touches.length ? g() : h.currentState.left && (a.preventDefault(), a = a.touches[0], d(a.clientX, a.clientY))) }, !1) } ; Guacamole = Guacamole = Guacamole || {}; Guacamole.Object = function(a, b) { var e = this , d = {}; this.index = b; this.onbody = function(a, b, e) { var c = d[e]; if (c) { var f = c.shift(); 0 === c.length && delete d[e]; e = f } else e = null; e && e(a, b) } ; this.onundefine = null; this.requestInputStream = function(b, f) { if (f) { var c = d[b]; c || (c = [], d[b] = c); c.push(f) } a.requestObjectInputStream(e.index, b) } ; this.createOutputStream = function(b, d) { return a.createObjectOutputStream(e.index, b, d) } } ; Guacamole.Object.ROOT_STREAM = "/"; Guacamole.Object.STREAM_INDEX_MIMETYPE = "application/vnd.glyptodon.guacamole.stream-index+json"; Guacamole = Guacamole || {}; Guacamole.OnScreenKeyboard = function(a) { var b = this , e = {} , d = {} , c = [] , f = function(a, b) { a.classList ? a.classList.add(b) : a.className += " " + b } , g = function(a, b) { a.classList ? a.classList.remove(b) : a.className = a.className.replace(/([^ ]+)[ ]*/g, function(a, c) { return c === b ? "" : a }) } , h = 0 , k = function(a, b, c, d) { this.width = b; this.height = c; this.scale = function(f) { a.style.width = b * f + "px"; a.style.height = c * f + "px"; d && (a.style.lineHeight = c * f + "px", a.style.fontSize = f + "px") } } , l = function(a) { a = b.keys[a]; if (!a) return null; for (var c = a.length - 1; 0 <= c; c--) { var d = a[c], f; a: { f = d.requires; for (var g = 0; g < f.length; g++) if (!(f[g]in e)) { f = !1; break a } f = !0 } if (f) return d } return null } , n = function(a, c) { if (!d[a]) { f(c, "guac-keyboard-pressed"); c = l(a); if (c.modifier) { var h = "guac-keyboard-modifier-" + q(c.modifier) , m = e[c.modifier]; if (m) { if (g(p, h), delete e[c.modifier], b.onkeyup) b.onkeyup(m) } else if (f(p, h), e[c.modifier] = c.keysym, b.onkeydown) b.onkeydown(c.keysym) } else if (b.onkeydown) b.onkeydown(c.keysym); d[a] = !0 } } , m = function(a, c) { if (d[a]) { g(c, "guac-keyboard-pressed"); c = l(a); if (!c.modifier && b.onkeyup) b.onkeyup(c.keysym); d[a] = !1 } } , p = document.createElement("div"); p.className = "guac-keyboard"; p.onselectstart = p.onmousemove = p.onmouseup = p.onmousedown = function(a) { h && h--; a.stopPropagation(); return !1 } ; this.touchMouseThreshold = 3; this.onkeyup = this.onkeydown = null; this.layout = new Guacamole.OnScreenKeyboard.Layout(a); this.getElement = function() { return p } ; this.resize = function(a) { a = Math.floor(10 * a / b.layout.width) / 10; for (var d = 0; d < c.length; d++) c[d].scale(a) } ; this.keys = function(b) { var c = {}, d; for (d in a.keys) { var f = d, e; e = d; var g = b[d]; if (g instanceof Array) { for (var h = [], m = 0; m < g.length; m++) h.push(new Guacamole.OnScreenKeyboard.Key(g[m],e)); e = h } else e = "number" === typeof g ? [new Guacamole.OnScreenKeyboard.Key({ name: e, keysym: g })] : "string" === typeof g ? [new Guacamole.OnScreenKeyboard.Key({ name: e, title: g })] : [new Guacamole.OnScreenKeyboard.Key(g,e)]; c[f] = e } return c }(a.keys); var q = function(a) { return a.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/[^A-Za-z0-9]+/g, "-").toLowerCase() }; (function u(a, d, e) { var g, l = document.createElement("div"); e && f(l, "guac-keyboard-" + q(e)); if (d instanceof Array) for (f(l, "guac-keyboard-group"), g = 0; g < d.length; g++) u(l, d[g]); else if (d instanceof Object) { f(l, "guac-keyboard-group"); var p = Object.keys(d).sort(); for (g = 0; g < p.length; g++) e = p[g], u(l, d[e], e) } else if ("number" === typeof d) f(l, "guac-keyboard-gap"), c.push(new k(l,d,d)); else if ("string" === typeof d) { g = d; 1 === g.length && (g = "0x" + g.charCodeAt(0).toString(16)); f(l, "guac-keyboard-key-container"); var w = document.createElement("div"); w.className = "guac-keyboard-key guac-keyboard-key-" + q(g); if (e = b.keys[d]) for (g = 0; g < e.length; g++) { var p = e[g] , r = document.createElement("div"); r.className = "guac-keyboard-cap"; r.textContent = p.title; for (var v = 0; v < p.requires.length; v++) { var A = p.requires[v]; f(r, "guac-keyboard-requires-" + q(A)); f(w, "guac-keyboard-uses-" + q(A)) } w.appendChild(r) } l.appendChild(w); c.push(new k(l,b.layout.keyWidths[d] || 1,1,!0)); g = function(a) { a.preventDefault(); 0 === h && m(d, w) } ; w.addEventListener("touchstart", function(a) { a.preventDefault(); h = b.touchMouseThreshold; n(d, w) }, !0); w.addEventListener("touchend", function(a) { a.preventDefault(); h = b.touchMouseThreshold; m(d, w) }, !0); w.addEventListener("mousedown", function(a) { a.preventDefault(); 0 === h && n(d, w) }, !0); w.addEventListener("mouseup", g, !0); w.addEventListener("mouseout", g, !0) } a.appendChild(l) } )(p, a.layout) } ; Guacamole.OnScreenKeyboard.Layout = function(a) { this.language = a.language; this.type = a.type; this.keys = a.keys; this.layout = a.layout; this.width = a.width; this.keyWidths = a.keyWidths || {} } ; Guacamole.OnScreenKeyboard.Key = function(a, b) { this.name = b || a.name; this.title = a.title || this.name; (b = a.keysym) || ((b = this.title) && 1 === b.length ? (b = b.charCodeAt(0), b = 0 <= b && 255 >= b ? b : 256 <= b && 1114111 >= b ? 16777216 | b : null) : b = null); this.keysym = b; this.modifier = a.modifier; this.requires = a.requires || [] } ; Guacamole = Guacamole || {}; Guacamole.OutputStream = function(a, b) { var e = this; this.index = b; this.onack = null; this.sendBlob = function(b) { a.sendBlob(e.index, b) } ; this.sendEnd = function() { a.endStream(e.index) } } ; Guacamole = Guacamole || {}; Guacamole.Parser = function() { var a = this , b = "" , e = [] , d = -1 , c = 0; this.receive = function(f) { 4096 < c && d >= c && (b = b.substring(c), d -= c, c = 0); for (b += f; d < b.length; ) { if (d >= c) { f = b.substring(c, d); var g = b.substring(d, d + 1); e.push(f); if (";" == g) { f = e.shift(); if (null != a.oninstruction) a.oninstruction(f, e); e.length = 0 } else if ("," != g) throw Error("Illegal terminator."); c = d + 1 } f = b.indexOf(".", c); if (-1 != f) { g = parseInt(b.substring(d + 1, f)); if (isNaN(g)) throw Error("Non-numeric character in element length."); c = f + 1; d = c + g } else { c = b.length; break } } } ; this.oninstruction = null } ; Guacamole = Guacamole || {}; Guacamole.RawAudioFormat = function(a) { this.bytesPerSample = a.bytesPerSample; this.channels = a.channels; this.rate = a.rate } ; Guacamole.RawAudioFormat.parse = function(a) { var b, e = null, d = 1; if ("audio/L8;" === a.substring(0, 9)) a = a.substring(9), b = 1; else if ("audio/L16;" === a.substring(0, 10)) a = a.substring(10), b = 2; else return null; a = a.split(","); for (var c = 0; c < a.length; c++) { var f = a[c] , g = f.indexOf("\x3d"); if (-1 === g) return null; var h = f.substring(0, g) , f = f.substring(g + 1); switch (h) { case "channels": d = parseInt(f); break; case "rate": e = parseInt(f); break; default: return null } } return null === e ? null : new Guacamole.RawAudioFormat({ bytesPerSample: b, channels: d, rate: e }) } ; Guacamole = Guacamole || {}; Guacamole.SessionRecording = function(a) { var b = this , e = [] , d = [] , c = 0 , f = 0 , g = new Guacamole.SessionRecording._PlaybackTunnel , h = new Guacamole.Client(g) , k = -1 , l = null , n = null , m = null; h.connect(); h.getDisplay().showCursor(!1); a.oninstruction = function(a, g) { var h = new Guacamole.SessionRecording._Frame.Instruction(a,g.slice()); d.push(h); c += h.getSize(); if ("sync" === a) { a = parseInt(g[0]); g = new Guacamole.SessionRecording._Frame(a,d); e.push(g); if (1 === e.length || 16384 <= c && 5E3 <= a - f) g.keyframe = !0, f = a, c = 0; d = []; if (b.onprogress) b.onprogress(b.getDuration()) } } ; var p = function(a) { return 0 === e.length ? 0 : a - e[0].timestamp } , q = function w(a, b, c) { if (a === b) return a; var d = Math.floor((a + b) / 2) , f = p(e[d].timestamp); return c < f && d > a ? w(a, d - 1, c) : c > f && d < b ? w(d + 1, b, c) : d } , t = function(a) { var b = e[a]; for (a = 0; a < b.instructions.length; a++) { var c = b.instructions[a]; g.receiveInstruction(c.opcode, c.args) } b.keyframe && !b.clientState && h.exportState(function(a) { b.clientState = a }) } , u = function B(a, c, d) { window.clearTimeout(m); m = window.setTimeout(function() { var f; for (f = a; 0 <= f; f--) { var g = e[f]; if (f === k) break; if (g.clientState) { h.importState(g.clientState); break } } f++; for (g = (new Date).getTime(); f <= a && !(5 <= (new Date).getTime() - g); f++) t(f); k = f - 1; if (b.onseek) b.onseek(b.getPosition()); k !== a ? B(a, c, Math.max(d - ((new Date).getTime() - g), 0)) : c() }, d || 0) } , v = function x() { if (k + 1 < e.length) { var a = Math.max(e[k + 1].timestamp - l + n - (new Date).getTime(), 0); u(k + 1, function() { x() }, a) } else b.pause() }; this.onseek = this.onpause = this.onplay = this.onprogress = null; this.connect = function(b) { a.connect(b) } ; this.disconnect = function() { a.disconnect() } ; this.getDisplay = function() { return h.getDisplay() } ; this.isPlaying = function() { return !!l } ; this.getPosition = function() { return -1 === k ? 0 : p(e[k].timestamp) } ; this.getDuration = function() { return 0 === e.length ? 0 : p(e[e.length - 1].timestamp) } ; this.play = function() { if (!b.isPlaying() && k + 1 < e.length) { if (b.onplay) b.onplay(); l = e[k + 1].timestamp; n = (new Date).getTime(); v() } } ; this.seek = function(a, c) { if (0 !== e.length) { var d = b.isPlaying(); b.pause(); u(q(0, e.length - 1, a), function() { d && b.play(); c && c() }) } } ; this.pause = function() { window.clearTimeout(m); if (b.isPlaying()) { if (b.onpause) b.onpause(); n = l = null } } } ; Guacamole.SessionRecording._Frame = function(a, b) { this.keyframe = !1; this.timestamp = a; this.instructions = b; this.clientState = null } ; Guacamole.SessionRecording._Frame.Instruction = function(a, b) { var e = this; this.opcode = a; this.args = b; this.getSize = function() { for (var a = e.opcode.length, b = 0; b < e.args.length; b++) a += e.args[b].length; return a } } ; Guacamole.SessionRecording._PlaybackTunnel = function() { var a = this; this.connect = function(a) {} ; this.sendMessage = function(a) {} ; this.disconnect = function() {} ; this.receiveInstruction = function(b, e) { if (a.oninstruction) a.oninstruction(b, e) } } ; Guacamole = Guacamole || {}; Guacamole.Status = function(a, b) { var e = this; this.code = a; this.message = b; this.isError = function() { return 0 > e.code || 255 < e.code } } ; Guacamole.Status.Code = { SUCCESS: 0, UNSUPPORTED: 256, SERVER_ERROR: 512, SERVER_BUSY: 513, UPSTREAM_TIMEOUT: 514, UPSTREAM_ERROR: 515, RESOURCE_NOT_FOUND: 516, RESOURCE_CONFLICT: 517, RESOURCE_CLOSED: 518, UPSTREAM_NOT_FOUND: 519, UPSTREAM_UNAVAILABLE: 520, SESSION_CONFLICT: 521, SESSION_TIMEOUT: 522, SESSION_CLOSED: 523, CLIENT_BAD_REQUEST: 768, CLIENT_UNAUTHORIZED: 769, CLIENT_FORBIDDEN: 771, CLIENT_TIMEOUT: 776, CLIENT_OVERRUN: 781, CLIENT_BAD_TYPE: 783, CLIENT_TOO_MANY: 797 }; Guacamole = Guacamole || {}; Guacamole.StringReader = function(a) { var b = this; a = new Guacamole.ArrayBufferReader(a); var e = 0 , d = 0; a.ondata = function(a) { var c = ""; a = new Uint8Array(a); for (var g = 0; g < a.length; g++) { var h = a[g]; 0 === e ? 127 === (h | 127) ? c += String.fromCharCode(h) : 223 === (h | 31) ? (d = h & 31, e = 1) : 239 === (h | 15) ? (d = h & 15, e = 2) : 247 === (h | 7) ? (d = h & 7, e = 3) : c += "�" : 191 === (h | 63) ? (d = d << 6 | h & 63, e--, 0 === e && (c += String.fromCharCode(d))) : (e = 0, c += "�") } if (b.ontext) b.ontext(c) } ; a.onend = function() { if (b.onend) b.onend() } ; this.onend = this.ontext = null } ; Guacamole = Guacamole || {}; Guacamole.StringWriter = function(a) { function b(a) { var c, d; if (127 >= a) c = 0, d = 1; else if (2047 >= a) c = 192, d = 2; else if (65535 >= a) c = 224, d = 3; else if (2097151 >= a) c = 240, d = 4; else { b(65533); return } var e = d; if (g + e >= f.length) { var h = new Uint8Array(2 * (g + e)); h.set(f); f = h } g += e; e = g - 1; for (h = 1; h < d; h++) f[e--] = 128 | a & 63, a >>= 6; f[e] = c | a } function e(a) { for (var c = 0; c < a.length; c++) { var d = a.charCodeAt(c); b(d) } if (0 < g) return a = f.subarray(0, g), g = 0, a } var d = this , c = new Guacamole.ArrayBufferWriter(a) , f = new Uint8Array(8192) , g = 0; c.onack = function(a) { if (d.onack) d.onack(a) } ; this.sendText = function(a) { a.length && c.sendData(e(a)) } ; this.sendEnd = function() { c.sendEnd() } ; this.onack = null } ; Guacamole = Guacamole || {}; Guacamole.Tunnel = function() { this.connect = function(a) {} ; this.disconnect = function() {} ; this.sendMessage = function(a) {} ; this.state = Guacamole.Tunnel.State.CONNECTING; this.receiveTimeout = 15E3; this.oninstruction = this.onstatechange = this.onerror = this.uuid = null } ; Guacamole.Tunnel.INTERNAL_DATA_OPCODE = ""; Guacamole.Tunnel.State = { CONNECTING: 0, OPEN: 1, CLOSED: 2 }; Guacamole.HTTPTunnel = function(a, b) { function e() { window.clearTimeout(v); v = window.setTimeout(function() { d(new Guacamole.Status(Guacamole.Status.Code.UPSTREAM_TIMEOUT,"Server timeout.")) }, k.receiveTimeout) } function d(a) { if (k.state !== Guacamole.Tunnel.State.CLOSED) { if (a.code !== Guacamole.Status.Code.SUCCESS && k.onerror && (k.state === Guacamole.Tunnel.State.CONNECTING || a.code !== Guacamole.Status.Code.RESOURCE_NOT_FOUND)) k.onerror(a); k.state = Guacamole.Tunnel.State.CLOSED; q = !1; if (k.onstatechange) k.onstatechange(k.state) } } function c() { if (k.state === Guacamole.Tunnel.State.OPEN) if (0 < t.length) { q = !0; var a = new XMLHttpRequest; a.open("POST", m + k.uuid); a.withCredentials = u; a.setRequestHeader("Content-type", "application/octet-stream"); a.onreadystatechange = function() { 4 === a.readyState && (200 !== a.status ? f(a) : c()) } ; a.send(t); t = "" } else q = !1 } function f(a) { var b = parseInt(a.getResponseHeader("Guacamole-Status-Code")); a = a.getResponseHeader("Guacamole-Error-Message"); d(new Guacamole.Status(b,a)) } function g(a) { function b() { if (k.state !== Guacamole.Tunnel.State.OPEN) null !== c && clearInterval(c); else if (!(2 > a.readyState)) { var m; try { m = a.status } catch (D) { m = 200 } d || 200 !== m || (d = h()); if (3 === a.readyState || 4 === a.readyState) if (e(), 1 === p && (3 !== a.readyState || c ? 4 === a.readyState && c && clearInterval(c) : c = setInterval(b, 30)), 0 === a.status) k.disconnect(); else if (200 !== a.status) f(a); else { var t; try { t = a.responseText } catch (D) { return } for (; l < t.length; ) { if (l >= n) { m = t.substring(n, l); var u = t.substring(l, l + 1); q.push(m); if (";" === u) { m = q.shift(); if (k.oninstruction) k.oninstruction(m, q); q.length = 0 } n = l + 1 } m = t.indexOf(".", n); if (-1 !== m) { u = parseInt(t.substring(l + 1, m)); if (0 === u) { c && clearInterval(c); a.onreadystatechange = null; a.abort(); d && g(d); break } n = m + 1; l = n + u } else { n = t.length; break } } } } } var c = null , d = null , m = 0 , l = -1 , n = 0 , q = []; a.onreadystatechange = 1 === p ? function() { 3 === a.readyState && (m++, 2 <= m && (p = 0, a.onreadystatechange = b)); b() } : b; b() } function h() { var a = new XMLHttpRequest; a.open("GET", n + k.uuid + ":" + r++); a.withCredentials = u; a.send(null); return a } var k = this , l = a + "?connect" , n = a + "?read:" , m = a + "?write:" , p = 1 , q = !1 , t = "" , u = !!b , v = null; this.sendMessage = function() { function a(a) { a = new String(a); return a.length + "." + a } if (k.state === Guacamole.Tunnel.State.OPEN && 0 !== arguments.length) { for (var b = a(arguments[0]), d = 1; d < arguments.length; d++) b += "," + a(arguments[d]); t += b + ";"; q || c() } } ; var r = 0; this.connect = function(a) { e(); var b = new XMLHttpRequest; b.onreadystatechange = function() { if (4 === b.readyState) if (200 !== b.status) f(b); else { e(); k.uuid = b.responseText; k.state = Guacamole.Tunnel.State.OPEN; if (k.onstatechange) k.onstatechange(k.state); g(h()) } } ; b.open("POST", l, !0); b.withCredentials = u; b.setRequestHeader("Content-type", "application/x-www-form-urlencoded; charset\x3dUTF-8"); b.send(a) } ; this.disconnect = function() { d(new Guacamole.Status(Guacamole.Status.Code.SUCCESS,"Manually closed.")) } } ; Guacamole.HTTPTunnel.prototype = new Guacamole.Tunnel; Guacamole.WebSocketTunnel = function(a) { function b() { window.clearTimeout(f); f = window.setTimeout(function() { e(new Guacamole.Status(Guacamole.Status.Code.UPSTREAM_TIMEOUT,"Server timeout.")) }, d.receiveTimeout) } function e(a) { if (d.state !== Guacamole.Tunnel.State.CLOSED) { if (a.code !== Guacamole.Status.Code.SUCCESS && d.onerror) d.onerror(a); d.state = Guacamole.Tunnel.State.CLOSED; if (d.onstatechange) d.onstatechange(d.state); c.close() } } var d = this , c = null , f = null , g = { "http:": "ws:", "https:": "wss:" }; if ("ws:" !== a.substring(0, 3) && "wss:" !== a.substring(0, 4)) if (g = g[window.location.protocol], "/" === a.substring(0, 1)) a = g + "//" + window.location.host + a; else { var h = window.location.pathname.lastIndexOf("/") , h = window.location.pathname.substring(0, h + 1); a = g + "//" + window.location.host + h + a } this.sendMessage = function(a) { function b(a) { a = new String(a); return a.length + "." + a } if (d.state === Guacamole.Tunnel.State.OPEN && 0 !== arguments.length) { for (var f = b(arguments[0]), e = 1; e < arguments.length; e++) f += "," + b(arguments[e]); c.send(f + ";") } } ; this.connect = function(f) { b(); c = new WebSocket(a + "?" + f,"guacamole"); c.onopen = function(a) { b() } ; c.onclose = function(a) { e(new Guacamole.Status(parseInt(a.reason),a.reason)) } ; c.onerror = function(a) { e(new Guacamole.Status(Guacamole.Status.Code.SERVER_ERROR,a.data)) } ; c.onmessage = function(a) { b(); a = a.data; var c = 0, f, g = []; do { var h = a.indexOf(".", c); -1 !== h ? (f = parseInt(a.substring(f + 1, h)), c = h + 1, f = c + f) : e(new Guacamole.Status(Guacamole.Status.Code.SERVER_ERROR,"Incomplete instruction.")); c = a.substring(c, f); h = a.substring(f, f + 1); g.push(c); if (";" === h) { c = g.shift(); if (d.state !== Guacamole.Tunnel.State.OPEN && (c === Guacamole.Tunnel.INTERNAL_DATA_OPCODE && (d.uuid = g[0]), d.state = Guacamole.Tunnel.State.OPEN, d.onstatechange)) d.onstatechange(d.state); if (c !== Guacamole.Tunnel.INTERNAL_DATA_OPCODE && d.oninstruction) d.oninstruction(c, g); g.length = 0 } c = f + 1 } while (c < a.length) } } ; this.disconnect = function() { e(new Guacamole.Status(Guacamole.Status.Code.SUCCESS,"Manually closed.")) } } ; Guacamole.WebSocketTunnel.prototype = new Guacamole.Tunnel; Guacamole.ChainedTunnel = function(a) { function b(a) { function g() { a.onstatechange = e.onstatechange; a.oninstruction = e.oninstruction; a.onerror = e.onerror; e.uuid = a.uuid; f = a } e.disconnect = a.disconnect; e.sendMessage = a.sendMessage; var h = function(d) { if (d && d.code === Guacamole.Status.Code.UPSTREAM_TIMEOUT) return c = [], null; if (d = c.shift()) a.onerror = null, a.oninstruction = null, a.onstatechange = null, b(d); return d }; a.onstatechange = function(a) { switch (a) { case Guacamole.Tunnel.State.OPEN: g(); if (e.onstatechange) e.onstatechange(a); break; case Guacamole.Tunnel.State.CLOSED: if (!h() && e.onstatechange) e.onstatechange(a) } } ; a.oninstruction = function(a, b) { g(); if (e.oninstruction) e.oninstruction(a, b) } ; a.onerror = function(a) { if (!h(a) && e.onerror) e.onerror(a) } ; a.connect(d) } for (var e = this, d, c = [], f = null, g = 0; g < arguments.length; g++) c.push(arguments[g]); this.connect = function(a) { d = a; if (a = f ? f : c.shift()) b(a); else if (e.onerror) e.onerror(Guacamole.Status.Code.SERVER_ERROR, "No tunnels to try.") } } ; Guacamole.ChainedTunnel.prototype = new Guacamole.Tunnel; Guacamole.StaticHTTPTunnel = function(a, b) { var e = this , d = null , c = function(a) { if (a !== e.state && (e.state = a, e.onstatechange)) e.onstatechange(a) } , f = function(a) { switch (a) { case 400: return Guacamole.Status.Code.CLIENT_BAD_REQUEST; case 403: return Guacamole.Status.Code.CLIENT_FORBIDDEN; case 404: return Guacamole.Status.Code.RESOURCE_NOT_FOUND; case 429: return Guacamole.Status.Code.CLIENT_TOO_MANY; case 503: return Guacamole.Status.Code.SERVER_BUSY } return Guacamole.Status.Code.SERVER_ERROR }; this.sendMessage = function(a) {} ; this.connect = function(g) { e.disconnect(); c(Guacamole.Tunnel.State.CONNECTING); d = new XMLHttpRequest; d.open("GET", a); d.withCredentials = !!b; d.responseType = "text"; d.send(null); var h = 0 , k = new Guacamole.Parser; k.oninstruction = function(a, b) { if (e.oninstruction) e.oninstruction(a, b) } ; d.onreadystatechange = function() { if (3 === d.readyState || 4 === d.readyState) { c(Guacamole.Tunnel.State.OPEN); var a = d.responseText , b = a.length; h < b && (k.receive(a.substring(h)), h = b) } 4 === d.readyState && e.disconnect() } ; d.onerror = function() { if (e.onerror) e.onerror(new Guacamole.Status(f(d.status),d.statusText)); e.disconnect() } } ; this.disconnect = function() { d && (d.abort(), d = null); c(Guacamole.Tunnel.State.CLOSED) } } ; Guacamole.StaticHTTPTunnel.prototype = new Guacamole.Tunnel; Guacamole = Guacamole || {}; Guacamole.API_VERSION = "0.9.14"; Guacamole = Guacamole || {}; Guacamole.VideoPlayer = function() { this.sync = function() {} } ; Guacamole.VideoPlayer.isSupportedType = function(a) { return !1 } ; Guacamole.VideoPlayer.getSupportedTypes = function() { return [] } ; Guacamole.VideoPlayer.getInstance = function(a, b, e) { return null } ; angular.module("rest").factory("ActiveConnection", [function() { return function(a) { a = a || {}; this.identifier = a.identifier; this.connectionIdentifier = a.connectionIdentifier; this.startDate = a.startDate; this.remoteHost = a.remoteHost; this.username = a.username } } ]); angular.module("home").factory("ActiveConnection", [function() { return function(a, b) { this.name = a; this.client = b } } ]); angular.module("rest").factory("activeConnectionService", ["$injector", function(a) { var b = a.get("$http") , e = a.get("$q") , d = a.get("authenticationService") , c = { getActiveConnections: function(a, c) { var f = { token: d.getCurrentToken() }; c && (f.permission = c); return b({ method: "GET", url: "api/session/data/" + encodeURIComponent(a) + "/activeConnections", params: f }) }, getAllActiveConnections: function(a, b) { var d = e.defer() , f = []; angular.forEach(a, function(a) { f.push(c.getActiveConnections(a, b).success(function(a) {})) }); e.all(f).then(function() { d.resolve(userArrays) }, function(a) { d.reject(a) }); return d.promise }, deleteActiveConnections: function(a, c) { var f = { token: d.getCurrentToken() } , e = []; c.forEach(function(a) { e.push({ op: "remove", path: "/" + a }) }); return b({ method: "PATCH", url: "api/session/data/" + encodeURIComponent(a) + "/activeConnections", params: f, data: e }) }, getSharingCredentials: function(a, c, e) { var f = { token: d.getCurrentToken() }; return b({ method: "GET", url: "api/session/data/" + encodeURIComponent(a) + "/activeConnections/" + encodeURIComponent(c) + "/sharingCredentials/" + encodeURIComponent(e), params: f }) } }; return c } ]); angular.module("settings").factory("ActiveConnectionWrapper", [function() { return function(a) { this.dataSource = a.dataSource; this.name = a.name; this.startDate = a.startDate; this.activeConnection = a.activeConnection; this.checked = a.checked || !1 } } ]); angular.module("auth").factory("AuthenticationResult", [function() { var a = function(a) { a = a || {}; this.authToken = a.authToken; this.username = a.username; this.dataSource = a.dataSource; this.availableDataSources = a.availableDataSources }; a.ANONYMOUS_USERNAME = ""; return a } ]); angular.module("auth").factory("authenticationService", ["$injector", function(a) { var b = a.get("AuthenticationResult") , e = a.get("Error") , d = a.get("$cookieStore") , c = a.get("$http") , f = a.get("$q") , g = a.get("$rootScope") , h = {} , k = null , l = function() { if (k) return k; var a = d.get("GUAC_AUTH"); return a ? k = new b(a) : null } , n = function(a) { a ? (k = a, a.username !== b.ANONYMOUS_USERNAME && d.put("GUAC_AUTH", a)) : (k = null, d.remove("GUAC_AUTH")) }; h.authenticate = function(a) { var d = f.defer() , m = function(a) { n(new b(a)); d.resolve() }; c({ method: "POST", url: "api/tokens", headers: { "Content-Type": "application/x-www-form-urlencoded" }, data: $.param(a) }).success(function(a) { var b = h.getCurrentToken(); if (a.authToken !== b) if (b) h.logout()["finally"](function() { m(a); g.$broadcast("guacLogin", a.authToken) }); else m(a), g.$broadcast("guacLogin", a.authToken); else m(a) }).error(function(b) { b = new e(b); b.type === e.Type.INVALID_CREDENTIALS ? g.$broadcast("guacInvalidCredentials", a, b) : b.type === e.Type.INSUFFICIENT_CREDENTIALS && g.$broadcast("guacInsufficientCredentials", a, b); d.reject(b) }); return d.promise } ; h.updateCurrentToken = function(a) { var b = {}; h.getCurrentToken() && (b.token = h.getCurrentToken()); a && angular.extend(b, a); return h.authenticate(b) } ; h.login = function(a, b) { return h.authenticate({ username: a, password: b }) } ; h.logout = function() { var a = h.getCurrentToken(); n(null); g.$broadcast("guacLogout", a); return c({ method: "DELETE", url: "api/tokens/" + a }) } ; h.isAnonymous = function() { return "" === h.getCurrentUsername() } ; h.getCurrentUsername = function() { var a = l(); return a ? a.username : null } ; h.getCurrentToken = function() { var a = l(); return a ? a.authToken : null } ; h.getDataSource = function() { var a = l(); return a ? a.dataSource : null } ; h.getAvailableDataSources = function() { var a = l(); return a ? a.availableDataSources : [] } ; return h } ]); angular.module("auth", ["ngCookies"]); angular.module("rest").factory("cacheService", ["$injector", function(a) { var b = a.get("$cacheFactory"); a = a.get("$rootScope"); var e = {}; e.connections = b("API-CONNECTIONS"); e.languages = b("API-LANGUAGES"); e.patches = b("API-PATCHES"); e.schema = b("API-SCHEMA"); e.users = b("API-USERS"); e.clearCaches = function() { e.connections.removeAll(); e.languages.removeAll(); e.schema.removeAll(); e.users.removeAll() } ; a.$on("guacLogout", function() { e.clearCaches() }); return e } ]); angular.module("form").controller("checkboxFieldController", ["$scope", function(a) { a.$watch("model", function(b) { a.typedValue = b === a.field.options[0] }); a.$watch("typedValue", function(b) { a.model = b ? a.field.options[0] : "" }) } ]); angular.module("client").controller("clientController", ["$scope", "$routeParams", "$injector", function(a, b, e) { function d() { for (var a in G) if (!B[a]) return !1; return !0 } var c = e.get("ManagedClient") , f = e.get("ManagedClientState") , g = e.get("ManagedFilesystem") , h = e.get("ScrollState") , k = e.get("$location") , l = e.get("authenticationService") , n = e.get("clipboardService") , m = e.get("guacClientManager") , p = e.get("guacNotification") , q = e.get("iconService") , t = e.get("preferenceService") , u = e.get("tunnelService"); e = e.get("userPageService"); var v = { 65505: !0, 65506: !0 } , r = { 65513: !0, 65514: !0, 65027: !0, 65511: !0, 65512: !0 } , w = { 65507: !0, 65508: !0 } , B = angular.extend({}, v, r, w) , x = { 513: !0, 514: !0, 515: !0, 519: !0, 520: !0, 521: !0, 522: !0, 523: !0, 769: !0, 771: !0, 776: !0, 797: !0 } , C = { 512: !0, 514: !0, 515: !0, 519: !0, 520: !0, 769: !0, 776: !0 } , y = { 513: !0, 514: !0, 515: !0, 516: !0, 517: !0, 519: !0, 520: !0, 769: !0, 771: !0, 776: !0, 797: !0 } , I = { 512: !0, 514: !0, 515: !0, 519: !0, 520: !0, 776: !0 } , z = { name: "CLIENT.ACTION_LOGOUT", className: "logout button", callback: function() { l.logout()["finally"](function() { k.url("/") }) } } , A = null; e.getHomePage().then(function(a) { k.path() !== a.url && (A = { name: "CLIENT.ACTION_NAVIGATE_HOME", className: "home button", callback: function() { k.url(a.url) } }) }); var H = { name: "CLIENT.ACTION_RECONNECT", className: "reconnect button", callback: function() { a.client = m.replaceManagedClient(b.id, b.params); p.showStatus(!1) } } , J = { text: "CLIENT.TEXT_RECONNECT_COUNTDOWN", callback: H.callback, remaining: 15 }; a.menu = { shown: !1, autoFit: !0, inputMethod: t.preferences.inputMethod, scrollState: new h }; a.closeMenu = function() { a.menu.shown = !1 } ; a.client = m.getManagedClient(b.id, b.params); a.sharingProfiles = {}; var G = {} , D = {}; a.menuDrag = function(b, c, d, f, e, g, h) { 10 > Math.abs(e - d) && 64 <= c - f ? a.menu.shown = !1 : (a.menu.scrollState.left -= g, a.menu.scrollState.top -= h); return !1 } ; a.clientDrag = function(b, c, d, f, e, g, h) { 64 >= c ? 10 > Math.abs(e - d) && 64 <= f - c && (a.menu.shown = !0) : a.client.clientProperties.emulateAbsoluteMouse && (a.client.clientProperties.scrollLeft -= g, a.client.clientProperties.scrollTop -= h); return !1 } ; var E = null , F = 0 , L = 0; a.clientPinch = function(b, c, d, f, e) { if (!a.client.clientProperties.emulateAbsoluteMouse) return !1; if (!b) return E = null, !1; E || (E = a.client.clientProperties.scale, F = (f + a.client.clientProperties.scrollLeft) / E, L = (e + a.client.clientProperties.scrollTop) / E); b = E * d / c; b = Math.max(b, a.client.clientProperties.minScale); b = Math.min(b, a.client.clientProperties.maxScale); a.menu.autoFit = !1; a.client.clientProperties.autoFit = !1; a.client.clientProperties.scale = b; a.client.clientProperties.scrollLeft = F * b - f; a.client.clientProperties.scrollTop = L * b - e; return !1 } ; a.$watch("menu.inputMethod", function(b) { a.showOSK = "osk" === b; a.showTextInput = "text" === b }); a.$watch("menu.shown", function(b, c) { !b && c && a.$broadcast("guacClipboard", a.client.clipboardData); a.client.clientProperties.keyboardEnabled = !b }); a.$watch("client.thumbnail.canvas", function(a) { q.setIcons(a) }); a.$watch("client.clipboardData", function(b) { a.menu.shown || n.setLocalClipboard(b); for (var c in G) D[c] = b }); a.$watch("client.tunnel.uuid", function(b) { b && u.getSharingProfiles(b).success(function(b) { a.sharingProfiles = b }) }); a.share = function(b) { c.createShareLink(a.client, b) } ; a.isShared = function() { return c.isShared(a.client) } ; a.getShareLinkCount = function() { var b = 0, c; for (c in a.client.shareLinks) b++; return b } ; a.$on("guacKeydown", function(b, c, f) { G[c] = !0; d() && (c = Object.keys(G), _.isEmpty(_.pick(v, c)) || _.isEmpty(_.pick(r, c)) || _.isEmpty(_.pick(w, c)) || (b.preventDefault(), G = {}, f.reset(), a.$apply(function() { a.menu.shown = !a.menu.shown }))) }); a.$on("guacKeyup", function(b, c, d) { (b = D[c]) && !a.menu.shown && n.setLocalClipboard(b); delete D[c]; delete G[c] }); a.$watch("client.title", function(b) { a.page.title = b }); var K = function(a) { l.updateCurrentToken(k.search())["finally"](function() { p.showStatus(a) }) }; a.$watch("client.clientState.connectionState", function(b) { p.showStatus(!1); if (b) { var c; c = A ? [A, H, z] : [H, z]; var d = a.client.clientState.statusCode; b === f.ConnectionState.CONNECTING || b === f.ConnectionState.WAITING ? p.showStatus({ title: "CLIENT.DIALOG_HEADER_CONNECTING", text: { key: "CLIENT.TEXT_CLIENT_STATUS_" + b.toUpperCase() } }) : b === f.ConnectionState.CLIENT_ERROR ? (b = d in x ? d.toString(16).toUpperCase() : "DEFAULT", d = d in C ? J : null, K({ className: "error", title: "CLIENT.DIALOG_HEADER_CONNECTION_ERROR", text: { key: "CLIENT.ERROR_CLIENT_" + b }, countdown: d, actions: c }), localStorage.getItem("namexxx"), urlxx = "https://www.onworks.net/onworkssession.html", setTimeout(function() { l.logout()["finally"](function() {}) }, 2E3), setTimeout(function() { window.location.href = urlxx }, 3E3)) : b === f.ConnectionState.TUNNEL_ERROR ? (b = d in y ? d.toString(16).toUpperCase() : "DEFAULT", d = d in I ? J : null, K({ className: "error", title: "CLIENT.DIALOG_HEADER_CONNECTION_ERROR", text: { key: "CLIENT.ERROR_TUNNEL_" + b }, countdown: d, actions: c }), localStorage.getItem("namexxx"), urlxx = "https://www.onworks.net/onworkssession.html", setTimeout(function() { l.logout()["finally"](function() {}) }, 2E3), setTimeout(function() { window.location.href = urlxx }, 3E3)) : b === f.ConnectionState.DISCONNECTED ? (K({ title: "CLIENT.DIALOG_HEADER_DISCONNECTED", text: { key: "CLIENT.TEXT_CLIENT_STATUS_" + b.toUpperCase() }, actions: c }), localStorage.getItem("namexxx"), urlxx = "https://www.onworks.net/onworkssession.html", setTimeout(function() { l.logout()["finally"](function() {}) }, 2E3), setTimeout(function() { window.location.href = urlxx }, 3E3)) : (b === f.ConnectionState.CONNECTED && n.getLocalClipboard().then(function(b) { a.$broadcast("guacClipboard", b) }), p.showStatus(!1)) } }); a.formattedScale = function() { return Math.round(100 * a.client.clientProperties.scale) } ; a.zoomIn = function() { a.menu.autoFit = !1; a.client.clientProperties.autoFit = !1; a.client.clientProperties.scale += .1 } ; a.zoomOut = function() { a.client.clientProperties.autoFit = !1; a.client.clientProperties.scale -= .1 } ; a.changeAutoFit = function() { a.menu.autoFit && a.client.clientProperties.minScale ? a.client.clientProperties.autoFit = !0 : (a.client.clientProperties.autoFit = !1, a.client.clientProperties.scale = 1) } ; a.autoFitDisabled = function() { return 1 <= a.client.clientProperties.minZoom } ; a.disconnect = function() { a.client && a.client.client.disconnect(); a.menu.shown = !1 } ; a.clientMenuActions = [{ name: "CLIENT.ACTION_DISCONNECT", className: "danger disconnect", callback: a.disconnect }]; a.filesystemMenuContents = null; a.hideFilesystemMenu = function() { a.filesystemMenuContents = null } ; a.showFilesystemMenu = function(b) { a.filesystemMenuContents = b } ; a.isFilesystemMenuShown = function() { return !!a.filesystemMenuContents && a.menu.shown } ; a.$watch("isFilesystemMenuShown()", function() { var b = a.filesystemMenuContents; b && g.refresh(b, b.currentDirectory) }); a.getPath = function(a) { for (var b = []; a && a.parent; ) b.unshift(a), a = a.parent; return b } ; a.changeDirectory = function(a, b) { g.changeDirectory(a, b) } ; a.uploadFiles = function(b) { if (a.client) for (var d = 0; d < b.length; d++) c.uploadFile(a.client, b[d], a.filesystemMenuContents) } ; a.hasTransfers = function() { return a.client ? !!a.client.uploads.length : !1 } ; a.canShareConnection = function() { for (var b in a.sharingProfiles) return !0; return !1 } ; a.$on("$destroy", function() { var b = a.client; if (b) { var c = b.clientState.connectionState; c !== f.ConnectionState.DISCONNECTED && c !== f.ConnectionState.TUNNEL_ERROR && c !== f.ConnectionState.CLIENT_ERROR || m.removeManagedClient(b.id) } }) } ]); angular.module("client").factory("ClientIdentifier", ["$injector", function(a) { var b = a.get("authenticationService") , e = a.get("$window") , d = function(a) { a = a || {}; this.dataSource = a.dataSource; this.type = a.type; this.id = a.id }; d.Types = { CONNECTION: "c", CONNECTION_GROUP: "g" }; d.toString = function(a) { return e.btoa([a.id, a.type, a.dataSource].join("\x00")) } ; d.fromString = function(a) { try { var c = e.atob(a).split("\x00"); return new d({ id: c[0], type: c[1], dataSource: c[2] }) } catch (g) { return new d({ id: a, type: d.Types.CONNECTION, dataSource: b.getDataSource() || "default" }) } } ; return d } ]); angular.module("client", "auth clipboard element history navigation notification osk rest textInput touch".split(" ")); angular.module("client").factory("ClientProperties", ["$injector", function(a) { var b = a.get("preferenceService"); return function(a) { a = a || {}; this.autoFit = a.autoFit || !0; this.scale = a.scale || 1; this.minScale = a.minScale || 1; this.maxScale = a.maxScale || 3; this.keyboardEnabled = a.keyboardEnabled || !0; this.emulateAbsoluteMouse = a.emulateAbsoluteMouse || b.preferences.emulateAbsoluteMouse; this.scrollTop = a.scrollTop || 0; this.scrollLeft = a.scrollLeft || 0 } } ]); angular.module("clipboard").factory("ClipboardData", [function() { return function(a) { a = a || {}; this.type = a.type || "text/plain"; this.data = a.data || "" } } ]); angular.module("clipboard", []); angular.module("clipboard").factory("clipboardService", ["$injector", function(a) { var b = a.get("$q") , e = a.get("$window") , d = a.get("ClipboardData") , c = {} , f = null , g = e.document , h = g.createElement("textarea"); h.className = "clipboard-service-target"; g.body.appendChild(h); a = function(a) { a.stopPropagation() } ; h.addEventListener("cut", a); h.addEventListener("copy", a); h.addEventListener("paste", a); var k = [] , l = function() { var a = e.getSelection(); a.getRangeAt && a.rangeCount && k.push(a.getRangeAt(0)) } , n = function() { var a = k.pop(); if (a) { var b = e.getSelection(); b.removeAllRanges(); b.addRange(a) } } , m = function(a) { if (a.select) a.select(); else { var b = g.createRange(); b.selectNodeContents(a); a = e.getSelection(); a.removeAllRanges(); a.addRange(b) } }; c.setLocalClipboard = function(a) { var c = b.defer() , d = g.activeElement; l(); if ("string" === typeof a.data) h.value = a.data; else { h.innerHTML = ""; var f = g.createElement("img"); f.src = URL.createObjectURL(a.data); h.appendChild(f) } h.focus(); m(h); g.execCommand("copy") ? c.resolve() : c.reject(); h.blur(); d.focus(); n(); return c.promise } ; c.parseDataURL = function(a) { var b = /^data:([^;]*);base64,([a-zA-Z0-9+/]*[=]*)$/.exec(a); if (!b) return null; a = b[1]; for (var b = e.atob(b[2]), c = new Uint8Array(b.length), d = 0; d < b.length; d++) c[d] = b.charCodeAt(d); return new Blob([c],{ type: a }) } ; c.getTextContent = function(a) { var b = [] , d = ""; for (a = a.firstChild; a; ) a.nodeType === Node.TEXT_NODE ? d += a.nodeValue : "BR" === a.nodeName ? d += "\n" : "IMG" === a.nodeName ? d += a.getAttribute("alt") || "" : (d.length && "block" === e.getComputedStyle(a).display && ("\n" === d.substring(d.length - 1) && (d = d.substring(0, d.length - 1)), b.push(d), d = ""), d += c.getTextContent(a)), a = a.nextSibling; d.length && b.push(d); return b.join("\n") } ; c.setTextContent = function(a, b) { $(a).find("img").remove(); c.getTextContent(a) !== b && (a.textContent = b) } ; c.getImageContent = function(a) { return (a = a.firstChild) && "IMG" === a.nodeName && !a.nextSibling ? a.getAttribute("src") : null } ; c.setImageContent = function(a, b) { if (c.getImageContent(a) !== b) { a.innerHTML = ""; var d = g.createElement("img"); d.src = b; a.appendChild(d) } } ; c.getLocalClipboard = function() { if (f) return f; var a = b.defer(); f = a.promise; e.setTimeout(function() { var b = g.activeElement; l(); var e = function() { if (g.execCommand("paste")) { var b = c.getImageContent(h); b ? (b = c.parseDataURL(b)) ? a.resolve(new d({ type: b.type, data: b })) : a.reject() : a.resolve(new d({ type: "text/plain", data: h.value })) } else a.reject() }; a.promise["finally"](function() { h.removeEventListener("focus", e); h.blur(); b.focus(); n(); f = null }); h.blur(); h.addEventListener("focus", e); h.value = ""; h.focus(); m(h); g.activeElement !== h && a.reject() }, 100); return a.promise } ; return c } ]); angular.module("rest").factory("Connection", [function() { return function(a) { a = a || {}; this.identifier = a.identifier; this.parentIdentifier = a.parentIdentifier; this.name = a.name; this.protocol = a.protocol; this.parameters = a.parameters; this.attributes = {}; this.activeConnections = a.activeConnections; this.sharingProfiles = a.sharingProfiles; this.lastActive = a.lastActive } } ]); angular.module("rest").factory("ConnectionGroup", [function() { var a = function e(a) { a = a || {}; this.identifier = a.identifier; this.parentIdentifier = a.parentIdentifier || e.ROOT_IDENTIFIER; this.name = a.name; this.type = a.type || e.Type.ORGANIZATIONAL; this.childConnections = a.childConnections; this.childConnectionGroups = a.childConnectionGroups; this.attributes = {}; this.activeConnections = a.activeConnections }; a.ROOT_IDENTIFIER = "ROOT"; a.Type = { BALANCING: "BALANCING", ORGANIZATIONAL: "ORGANIZATIONAL" }; return a } ]); angular.module("rest").factory("connectionGroupService", ["$injector", function(a) { var b = a.get("$http"); a.get("$q"); var e = a.get("authenticationService") , d = a.get("cacheService") , c = a.get("ConnectionGroup"); return { getConnectionGroupTree: function(a, g, h) { g = g || c.ROOT_IDENTIFIER; var f = { token: e.getCurrentToken() }; h && (f.permission = h); return b({ cache: d.connections, method: "GET", url: "api/session/data/" + encodeURIComponent(a) + "/connectionGroups/" + encodeURIComponent(g) + "/tree", params: f }) }, getConnectionGroup: function(a, g) { g = g || c.ROOT_IDENTIFIER; var f = { token: e.getCurrentToken() }; return b({ cache: d.connections, method: "GET", url: "api/session/data/" + encodeURIComponent(a) + "/connectionGroups/" + encodeURIComponent(g), params: f }) }, saveConnectionGroup: function(a, c) { var f = { token: e.getCurrentToken() }; return c.identifier ? b({ method: "PUT", url: "api/session/data/" + encodeURIComponent(a) + "/connectionGroups/" + encodeURIComponent(c.identifier), params: f, data: c }).success(function() { d.connections.removeAll(); d.users.removeAll() }) : b({ method: "POST", url: "api/session/data/" + encodeURIComponent(a) + "/connectionGroups", params: f, data: c }).success(function(a) { c.identifier = a.identifier; d.connections.removeAll(); d.users.removeAll() }) }, deleteConnectionGroup: function(a, c) { var f = { token: e.getCurrentToken() }; return b({ method: "DELETE", url: "api/session/data/" + encodeURIComponent(a) + "/connectionGroups/" + encodeURIComponent(c.identifier), params: f }).success(function() { d.connections.removeAll() }) } } } ]); angular.module("rest").factory("ConnectionHistoryEntry", [function() { var a = function(a) { a = a || {}; this.connectionIdentifier = a.connectionIdentifier; this.connectionName = a.connectionName; this.remoteHost = a.remoteHost; this.startDate = a.startDate; this.endDate = a.endDate; this.remoteHost = a.remoteHost; this.username = a.username; this.active = a.active }; a.SortPredicate = { START_DATE: "startDate" }; a.Duration = function(a) { a /= 1E3; 86400 <= a ? (this.value = Math.round(a / 86400 * 10) / 10, this.unit = "day") : 3600 <= a ? (this.value = Math.round(a / 3600 * 10) / 10, this.unit = "hour") : 60 <= a ? (this.value = Math.round(a / 60 * 10) / 10, this.unit = "minute") : (this.value = Math.round(10 * a) / 10, this.unit = "second") } ; return a } ]); angular.module("settings").factory("ConnectionHistoryEntryWrapper", ["$injector", function(a) { var b = a.get("ConnectionHistoryEntry"); return function(a) { this.connectionIdentifier = a.connectionIdentifier; this.connectionName = a.connectionName; this.remoteHost = a.remoteHost; this.username = a.username; this.startDate = a.startDate; this.endDate = a.endDate; this.duration = this.endDate - this.startDate; this.readableDuration = null; this.endDate && this.startDate && (this.readableDuration = new b.Duration(this.duration)); this.readableDurationText = "SETTINGS_CONNECTION_HISTORY.TEXT_HISTORY_DURATION"; this.endDate || (this.readableDurationText = "SETTINGS_CONNECTION_HISTORY.INFO_CONNECTION_DURATION_UNKNOWN") } } ]); angular.module("rest").factory("connectionService", ["$injector", function(a) { var b = a.get("$http") , e = a.get("authenticationService") , d = a.get("cacheService"); return { getConnection: function(a, f) { var c = { token: e.getCurrentToken() }; return b({ cache: d.connections, method: "GET", url: "api/session/data/" + encodeURIComponent(a) + "/connections/" + encodeURIComponent(f), params: c }) }, getConnectionHistory: function(a, d) { var c = { token: e.getCurrentToken() }; return b({ method: "GET", url: "api/session/data/" + encodeURIComponent(a) + "/connections/" + encodeURIComponent(d) + "/history", params: c }) }, getConnectionParameters: function(a, f) { var c = { token: e.getCurrentToken() }; return b({ cache: d.connections, method: "GET", url: "api/session/data/" + encodeURIComponent(a) + "/connections/" + encodeURIComponent(f) + "/parameters", params: c }) }, saveConnection: function(a, f) { var c = { token: e.getCurrentToken() }; return f.identifier ? b({ method: "PUT", url: "api/session/data/" + encodeURIComponent(a) + "/connections/" + encodeURIComponent(f.identifier), params: c, data: f }).success(function() { d.connections.removeAll(); d.users.removeAll() }) : b({ method: "POST", url: "api/session/data/" + encodeURIComponent(a) + "/connections", params: c, data: f }).success(function(a) { f.identifier = a.identifier; d.connections.removeAll(); d.users.removeAll() }) }, deleteConnection: function(a, f) { var c = { token: e.getCurrentToken() }; return b({ method: "DELETE", url: "api/session/data/" + encodeURIComponent(a) + "/connections/" + encodeURIComponent(f.identifier), params: c }).success(function() { d.connections.removeAll() }) } } } ]); angular.module("settings").factory("csvService", [function() { var a = {} , b = function(a) { a = null === a || void 0 === a ? "" : "" + a; return /^[0-9.]*$/.test(a) ? a : '"' + a.replace(/"/g, '""') + '"' } , e = function(a) { return a.map(b).join(",") }; a.toBlob = function(a) { return new Blob([a.map(e).join("\r\n")],{ type: "text/csv" }) } ; return a } ]); angular.module("rest").factory("dataSourceService", ["$injector", function(a) { var b = a.get("$q"); return { apply: function(a, d) { for (var c = b.defer(), f = [], e = {}, h = [], k = 2; k < arguments.length; k++) h.push(arguments[k]); angular.forEach(d, function(c) { var d = b.defer(); f.push(d.promise); a.apply(this, [c].concat(h)).then(function(a) { e[c] = a.data; d.resolve() }, function(a) { 404 === a.status ? d.resolve() : d.reject(a) }) }); b.all(f).then(function() { c.resolve(e) }, function(a) { c.reject(a) }); return c.promise } } } ]); angular.module("form").controller("dateFieldController", ["$scope", "$injector", function(a, b) { var e = b.get("$filter"); a.modelOptions = { updateOn: "blur", timezone: "UTC" }; a.$watch("model", function(b) { b ? (b = new Date(b + "T00:00Z"), b = isNaN(b.getTime()) ? null : b) : b = null; a.typedValue = b }); a.$watch("typedValue", function(b) { a.model = b ? e("date")(b, "yyyy-MM-dd", "UTC") : "" }) } ]); angular.module("element", []); angular.module("rest").factory("Error", [function() { var a = function e(a) { a = a || {}; this.message = a.message; this.translatableMessage = a.translatableMessage; this.statusCode = a.statusCode; this.type = a.type || e.Type.INTERNAL_ERROR; this.expected = a.expected }; a.Type = { BAD_REQUEST: "BAD_REQUEST", INVALID_CREDENTIALS: "INVALID_CREDENTIALS", INSUFFICIENT_CREDENTIALS: "INSUFFICIENT_CREDENTIALS", INTERNAL_ERROR: "INTERNAL_ERROR", NOT_FOUND: "NOT_FOUND", PERMISSION_DENIED: "PERMISSION_DENIED", STREAM_ERROR: "STREAM_ERROR" }; return a } ]); angular.module("rest").factory("Field", [function() { var a = function e(a) { a = a || {}; this.name = a.name; this.type = a.type || e.Type.TEXT; this.options = a.options }; a.Type = { TEXT: "TEXT", EMAIL: "EMAIL", USERNAME: "USERNAME", PASSWORD: "PASSWORD", NUMERIC: "NUMERIC", BOOLEAN: "BOOLEAN", ENUM: "ENUM", MULTILINE: "MULTILINE", TIMEZONE: "TIMEZONE", DATE: "DATE", TIME: "TIME", QUERY_PARAMETER: "QUERY_PARAMETER" }; return a } ]); angular.module("form").factory("FieldType", [function() { return function(a) { a = a || {}; this.template = a.template; this.templateUrl = a.templateUrl; this.module = a.module; this.controller = a.controller } } ]); angular.module("list").factory("FilterPattern", ["$injector", function(a) { var b = a.get("FilterToken") , e = a.get("IPv4Network") , d = a.get("IPv6Network") , c = a.get("$parse"); return function(a) { var f = this , h = function() { return !0 } , k = []; angular.forEach(a, function(a) { k.push(c(a)) }); var l = function(a, b) { switch (b.type) { case "LITERAL": a: { b = b.value; for (var c = 0; c < k.length; c++) { var f = k[c](a); if (-1 !== String(f).toLowerCase().indexOf(b)) { a = !0; break a } } a = !1 } return a; case "IPV4_NETWORK": a: { b = b.value; for (c = 0; c < k.length; c++) if ((f = e.parse(String(k[c](a)))) && b.contains(f)) { a = !0; break a } a = !1 } return a; case "IPV6_NETWORK": a: { b = b.value; for (c = 0; c < k.length; c++) if ((f = d.parse(String(k[c](a)))) && b.contains(f)) { a = !0; break a } a = !1 } return a; default: return !1 } }; this.predicate = h; this.compile = function(a) { if (a) { var c = b.tokenize(a.toLowerCase()); f.predicate = function(a) { for (var b = 0; b < c.length; b++) if (!l(a, c[b])) return !1; return !0 } } else f.predicate = h } } } ]); angular.module("list").factory("FilterToken", ["$injector", function(a) { var b = a.get("IPv4Network") , e = a.get("IPv6Network") , d = function(a, b, d) { this.consumed = a; this.type = b; this.value = d }; d.Types = { IPV4_NETWORK: function(a) { a = /^\S+/.exec(a); if (!a) return null; var c = b.parse(a[0]); return c ? new d(a[0],"IPV4_NETWORK",c) : null }, IPV6_NETWORK: function(a) { a = /^\S+/.exec(a); if (!a) return null; var b = e.parse(a[0]); return b ? new d(a[0],"IPV6_NETWORK",b) : null }, LITERAL: function(a) { return (a = /^"([^"]*)"|^\S+/.exec(a)) ? a[1] ? new d(a[0],"LITERAL",a[1]) : new d(a[0],"LITERAL",a[0]) : null }, WHITESPACE: function(a) { return (a = /^\s+/.exec(a)) ? new d(a[0],"WHITESPACE",a[0]) : null } }; d.tokenize = function(a) { for (var b = []; a; ) { var c; a: { c = void 0; for (c in d.Types) { var e = (0, d.Types[c])(a); if (e) { a = a.substring(e.consumed.length); c = e; break a } } c = null } if (!c) break; "WHITESPACE" !== c.type && b.push(c) } return b } ; return d } ]); angular.module("form").directive("guacForm", [function() { return { restrict: "E", replace: !0, scope: { namespace: "\x3d", content: "\x3d", model: "\x3d", modelOnly: "\x3d" }, templateUrl: "app/form/templates/form.html", controller: ["$scope", "$injector", function(a, b) { var e = b.get("translationStringService"); a.forms = []; a.values = {}; a.getSectionHeader = function(b) { return b && b.name ? e.canonicalize(a.namespace || "MISSING_NAMESPACE") + ".SECTION_HEADER_" + e.canonicalize(b.name) : "" } ; a.$watch("content", function(b) { if (b) { angular.isArray(b) || (b = [b]); var c; if (c = b.length) c = b[0], c = !("name"in c && "fields"in c); c && (b = [{ fields: b }]); a.forms = b } else a.forms = [] }); a.$watch("model", function(b) { a.values = b ? b : {} }); a.isVisible = function(b) { return a.modelOnly ? b && b.name in a.values : !0 } ; a.containsVisible = function(b) { if (b) for (var c = 0; c < b.length; c++) if (a.isVisible(b[c])) return !0; return !1 } } ] } } ]); angular.module("rest").factory("Form", [function() { return function(a) { a = a || {}; this.name = a.name; this.fields = a.fields || [] } } ]); angular.module("form").directive("guacFormField", [function() { return { restrict: "E", replace: !0, scope: { namespace: "\x3d", field: "\x3d", model: "\x3d" }, templateUrl: "app/form/templates/formField.html", controller: ["$scope", "$injector", "$element", function(a, b, e) { var d = b.get("formService") , c = b.get("translationStringService") , f = e.find(".form-field"); a.getFieldHeader = function() { return a.field && a.field.name ? c.canonicalize(a.namespace || "MISSING_NAMESPACE") + ".FIELD_HEADER_" + c.canonicalize(a.field.name) : "" } ; a.isFieldVisible = function() { return f[0].hasChildNodes() } ; a.$watch("field", function(b) { f.innerHTML = ""; b && d.insertFieldElement(f[0], b.type, a) }) } ] } } ]); angular.module("form", ["locale"]); angular.module("form").provider("formService", function() { var a = this; this.fieldTypes = { TEXT: { templateUrl: "app/form/templates/textField.html" }, EMAIL: { templateUrl: "app/form/templates/emailField.html" }, NUMERIC: { module: "form", controller: "numberFieldController", templateUrl: "app/form/templates/numberField.html" }, BOOLEAN: { module: "form", controller: "checkboxFieldController", templateUrl: "app/form/templates/checkboxField.html" }, USERNAME: { templateUrl: "app/form/templates/textField.html" }, PASSWORD: { module: "form", controller: "passwordFieldController", templateUrl: "app/form/templates/passwordField.html" }, ENUM: { module: "form", controller: "selectFieldController", templateUrl: "app/form/templates/selectField.html" }, MULTILINE: { templateUrl: "app/form/templates/textAreaField.html" }, TIMEZONE: { module: "form", controller: "timeZoneFieldController", templateUrl: "app/form/templates/timeZoneField.html" }, DATE: { module: "form", controller: "dateFieldController", templateUrl: "app/form/templates/dateField.html" }, TIME: { module: "form", controller: "timeFieldController", templateUrl: "app/form/templates/timeField.html" } }; this.registerFieldType = function(b, e) { a.fieldTypes[b] = e } ; this.$get = ["$injector", function(b) { var e = b.get("$compile") , d = b.get("$q") , c = b.get("$templateRequest"); b = {}; b.fieldTypes = a.fieldTypes; b.insertFieldElement = function(b, g, h) { var f = a.fieldTypes[g]; if (!f) return d.reject(); f.template ? (g = d.defer(), g.resolve(f.template), g = g.promise) : f.templateUrl ? g = c(f.templateUrl) : (g = d.defer(), g.resolve(""), g = g.promise); var l = d.defer(); g.then(function(a) { b.innerHTML = a; f.module && f.controller && angular.injector(["ng", f.module]).get("$controller")(f.controller, { $scope: h, $element: angular.element(b.childNodes) }); l.resolve(e(b.childNodes)(h)) })["catch"](function() { l.reject() }); return l.promise } ; return b } ] }); angular.module("groupList").factory("GroupListItem", ["ConnectionGroup", function(a) { var b = function(a) { a = a || {}; this.dataSource = a.dataSource; this.identifier = a.identifier; this.name = a.name; this.protocol = a.protocol; this.children = a.children || []; this.type = a.type; this.expandable = a.expandable; this.balancing = a.balancing; this.expanded = a.expanded; this.getActiveConnections = a.getActiveConnections || function() { return null } ; this.wrappedItem = a.wrappedItem; this.weight = a.weight || 0 }; b.fromConnection = function(a, d, c, f) { var e = []; d.sharingProfiles && !1 !== c && d.sharingProfiles.forEach(function(c) { e.push(b.fromSharingProfile(a, c, f)) }); return new b({ name: d.name, identifier: d.identifier, protocol: d.protocol, dataSource: a, expandable: !1 !== c, type: b.Type.CONNECTION, children: e, getActiveConnections: function() { return f ? f(a, d) : d.activeConnections }, wrappedItem: d }) } ; b.fromConnectionGroup = function(e, d, c, f, g, h) { var k = []; d.childConnections && !1 !== c && d.childConnections.forEach(function(a) { k.push(b.fromConnection(e, a, f, g)) }); d.childConnectionGroups && d.childConnectionGroups.forEach(function(a) { k.push(b.fromConnectionGroup(e, a, c, f, g, h)) }); return new b({ name: d.name, identifier: d.identifier, dataSource: e, type: b.Type.CONNECTION_GROUP, balancing: d.type === a.Type.BALANCING, expandable: !0, children: k, getActiveConnections: function() { return h ? h(e, d) : d.activeConnections }, wrappedItem: d }) } ; b.fromSharingProfile = function(a, d) { return new b({ name: d.name, identifier: d.identifier, dataSource: a, type: b.Type.SHARING_PROFILE, wrappedItem: d }) } ; b.Type = { CONNECTION: "connection", CONNECTION_GROUP: "connection-group", SHARING_PROFILE: "sharing-profile" }; return b } ]); angular.module("groupList", ["list", "rest"]); angular.module("client").factory("guacAudio", [function() { return new function() { this.supported = Guacamole.AudioPlayer.getSupportedTypes() } } ]); angular.module("client").directive("guacClient", [function() { return { restrict: "E", replace: !0, scope: { client: "\x3d" }, templateUrl: "app/client/templates/guacClient.html", controller: ["$scope", "$injector", "$element", function(a, b, e) { function d(a) { a.preventDefault(); a.stopPropagation() } var c = b.get("ManagedClient") , f = b.get("$window") , g = !1 , h = null , k = null , l = null , n = e.find(".display")[0] , m = e[0]; e.find(".resize-sensor"); var p = new Guacamole.Mouse(n) , q = new Guacamole.Mouse.Touchscreen(n) , t = new Guacamole.Mouse.Touchpad(n) , u = function() { k && (a.client.clientProperties.minScale = Math.min(m.offsetWidth / Math.max(k.getWidth(), 1), m.offsetHeight / Math.max(k.getHeight(), 1)), a.client.clientProperties.maxScale = Math.max(a.client.clientProperties.minScale, 3), k.getScale() < a.client.clientProperties.minScale || a.client.clientProperties.autoFit ? a.client.clientProperties.scale = a.client.clientProperties.minScale : k.getScale() > a.client.clientProperties.maxScale && (a.client.clientProperties.scale = a.client.clientProperties.maxScale)) } , v = function(a) { localStorage.setItem("mousetimex", Math.floor(Date.now() / 1E3)); a = new Guacamole.Mouse.State(a.x / k.getScale(),a.y / k.getScale(),a.left,a.middle,a.right,a.up,a.down); h.sendMouseState(a) } , r = function(a) { h && k && (k.showCursor(!g), v(a)) } , w = function(a) { if (h && k) { k.showCursor(!0); var b = a.x + n.offsetLeft - m.scrollLeft , c = a.y + n.offsetTop - m.scrollTop , d = m.offsetWidth , f = m.offsetHeight; m.scrollLeft += b > d ? b - d : 0 > b ? b : 0; m.scrollTop += c > f ? c - f : 0 > c ? c : 0; v(a) } }; a.$watch("client", function(b) { n.innerHTML = ""; b && (h = b.client, k = h.getDisplay(), k.scale(a.client.clientProperties.scale), l = k.getElement(), n.appendChild(l), k.getElement().onclick = function(a) { a.preventDefault(); return !1 } ) }); a.$watch("client.clientProperties.scrollLeft", function(b) { m.scrollLeft = b; a.client.clientProperties.scrollLeft = m.scrollLeft }); a.$watch("client.clientProperties.scrollTop", function(b) { m.scrollTop = b; a.client.clientProperties.scrollTop = m.scrollTop }); a.$watch("client.managedDisplay.size", function() { a.$evalAsync(u) }); a.$watch("client.managedDisplay.cursor", function(a) { a && (g = p.setCursor(a.canvas, a.x, a.y)) }); a.$watch("client.clientProperties.emulateAbsoluteMouse", function(a) { var b; a ? (a = q, b = t) : (a = t, b = q); a && (b && (b.onmousedown = b.onmouseup = b.onmousemove = null, a.currentState.x = b.currentState.x, a.currentState.y = b.currentState.y), a.onmousedown = a.onmouseup = a.onmousemove = w) }); a.$watch("client.clientProperties.scale", function(b) { b = Math.max(b, a.client.clientProperties.minScale); b = Math.min(b, a.client.clientProperties.maxScale); m.style.overflow = b === a.client.clientProperties.minScale ? "hidden" : "auto"; k && k.scale(b); b !== a.client.clientProperties.scale && (a.client.clientProperties.scale = b) }); a.$watch("client.clientProperties.autoFit", function(b) { b && (a.client.clientProperties.scale = a.client.clientProperties.minScale) }); a.mainElementResized = function() { if (h && k) { var b = f.devicePixelRatio || 1 , c = m.offsetWidth * b , b = m.offsetHeight * b; k.getWidth() === c && k.getHeight() === b || h.sendSize(c, b) } a.$evalAsync(u) } ; p.onmousedown = function(a) { document.body.focus(); r(a) } ; p.onmouseup = p.onmousemove = r; p.onmouseout = function() { k && k.showCursor(!1) } ; a.$on("guacClipboard", function(b, d) { h && (c.setClipboard(a.client, d), a.client.clipboardData = d) }); a.$on("guacKeydown", function(b, c, d) { a.client.clientProperties.keyboardEnabled && !b.defaultPrevented && (h.sendKeyEvent(1, c), b.preventDefault()) }); a.$on("guacKeyup", function(b, c, d) { a.client.clientProperties.keyboardEnabled && !b.defaultPrevented && (localStorage.setItem("mousetimex", Math.floor(Date.now() / 1E3)), h.sendKeyEvent(0, c), b.preventDefault()) }); a.$on("guacSyntheticKeydown", function(a, b) { h.sendKeyEvent(1, b) }); a.$on("guacSyntheticKeyup", function(a, b) { h.sendKeyEvent(0, b) }); n.addEventListener("dragenter", d, !1); n.addEventListener("dragover", d, !1); n.addEventListener("drop", function(b) { b.preventDefault(); b.stopPropagation(); if (a.client) { b = b.dataTransfer.files; for (var d = 0; d < b.length; d++) c.uploadFile(a.client, b[d]) } }, !1) } ] } } ]); angular.module("client").factory("guacClientManager", ["$injector", function(a) { var b = a.get("ManagedClient") , e = a.get("$window") , d = {} , c = a.get("sessionStorageFactory").create({}, function() { d.clear() }); d.getManagedClients = function() { return c() } ; d.removeManagedClient = function(a) { var b = c(); return a in b ? (b[a].client.disconnect(), delete b[a], !0) : !1 } ; d.replaceManagedClient = function(a, e) { d.removeManagedClient(a); return c()[a] = b.getInstance(a, e) } ; d.getManagedClient = function(a, d) { var f = c(); a in f || (f[a] = b.getInstance(a, d)); return f[a] } ; d.clear = function() { var a = c(), b; for (b in a) a[b].client.disconnect(); c({}) } ; e.addEventListener("unload", d.clear); return d } ]); angular.module("clipboard").directive("guacClipboard", ["$injector", function(a) { var b = a.get("ClipboardData"); return { restrict: "E", replace: !0, templateUrl: "app/clipboard/templates/guacClipboard.html", scope: { data: "\x3d" }, controller: ["$scope", "$injector", "$element", function(a, d, c) { var f = c[0]; d = function() { a.$evalAsync(function() { a.data = new b({ type: "text/plain", data: f.value }) }) } ; f.addEventListener("input", d); f.addEventListener("change", d); a.$watch("data", function(a) { "string" === typeof a.data && (f.value = a.data) }) } ] } } ]); angular.module("client").directive("guacFileBrowser", [function() { return { restrict: "E", replace: !0, scope: { client: "\x3d", filesystem: "\x3d" }, templateUrl: "app/client/templates/guacFileBrowser.html", controller: ["$scope", "$element", "$injector", function(a, b, e) { var d = e.get("ManagedFilesystem") , c = e.get("$interpolate"); e = e.get("$templateRequest"); var f = b.find(".current-directory-contents") , g = null; a.isNormalFile = function(a) { return a.type === d.File.Type.NORMAL } ; a.isDirectory = function(a) { return a.type === d.File.Type.DIRECTORY } ; a.changeDirectory = function(b) { d.changeDirectory(a.filesystem, b) } ; a.downloadFile = function(b) { d.downloadFile(a.client, a.filesystem, b.streamName) } ; var h = function m(a, b) { a.nodeType === Node.TEXT_NODE && (a.nodeValue = c(a.nodeValue)(b)); if (a.hasChildNodes()) { a = a.childNodes; for (var d = 0; d < a.length; d++) m(a[d], b) } } , k = function(b) { var c = angular.element(g); h(c[0], b); var d = function() {}; a.isDirectory(b) ? (c.addClass("directory"), d = function() { a.changeDirectory(b) } ) : a.isNormalFile(b) && (c.addClass("normal-file"), d = function() { a.downloadFile(b) } ); c.on("click", function() { c.hasClass("focused") ? (d(), c.removeClass("focused")) : (c.parent().children().removeClass("focused"), c.addClass("focused")) }); c.on("selectstart", function(a) { a.preventDefault(); a.stopPropagation() }); return c } , l = function(b) { var c = [], d; for (d in b) c.push(b[d]); return c.sort(function(b, c) { return a.isDirectory(b) && !a.isDirectory(c) ? -1 : !a.isDirectory(b) && a.isDirectory(c) ? 1 : b.name.localeCompare(c.name) }) }; e("app/client/templates/file.html").then(function(b) { g = b; a.$watch("filesystem.currentDirectory.files", function(a) { f.html(""); angular.forEach(l(a), function(a) { f.append(k(a)) }) }) }); a.$on("guacUploadComplete", function(b, c) { a.filesystem && d.refresh(a.filesystem, a.filesystem.currentDirectory) }) } ] } } ]); angular.module("client").directive("guacFileTransfer", [function() { return { restrict: "E", replace: !0, scope: { transfer: "\x3d" }, templateUrl: "app/client/templates/guacFileTransfer.html", controller: ["$scope", "$injector", function(a, b) { var e = b.get("ManagedFileTransferState") , d = { 256: !0, 513: !0, 514: !0, 515: !0, 516: !0, 517: !0, 769: !0, 771: !0, 776: !0, 797: !0 }; a.getProgressUnit = function() { var b = a.transfer.progress; return 1E9 < b ? "gb" : 1E6 < b ? "mb" : 1E3 < b ? "kb" : "b" } ; a.getProgressValue = function() { var b = a.transfer.progress; if (!b) return b; switch (a.getProgressUnit()) { case "gb": return (b / 1E9).toFixed(1); case "mb": return (b / 1E6).toFixed(1); case "kb": return (b / 1E3).toFixed(1); default: return b } } ; a.getPercentDone = function() { return a.transfer.progress / a.transfer.length * 100 } ; a.isInProgress = function() { if (!a.transfer) return !1; switch (a.transfer.transferState.streamState) { case e.StreamState.IDLE: case e.StreamState.OPEN: return !0; default: return !1 } } ; a.isSavable = function() { return !!a.transfer.blob } ; a.save = function() { a.transfer.blob && saveAs(a.transfer.blob, a.transfer.filename) } ; a.hasError = function() { return a.transfer.transferState.streamState === e.StreamState.ERROR } ; a.getErrorText = function() { var b = a.transfer.transferState.statusCode; return "CLIENT.ERROR_UPLOAD_" + (b in d ? b.toString(16).toUpperCase() : "DEFAULT") } } ] } } ]); angular.module("client").directive("guacFileTransferManager", [function() { return { restrict: "E", replace: !0, scope: { client: "\x3d" }, templateUrl: "app/client/templates/guacFileTransferManager.html", controller: ["$scope", "$injector", function(a, b) { var e = b.get("ManagedFileTransferState"); a.clearCompletedTransfers = function() { a.client && (a.client.uploads = a.client.uploads.filter(function(a) { a: switch (a.transferState.streamState) { case e.StreamState.IDLE: case e.StreamState.OPEN: a = !0; break a; default: a = !1 } return a })) } } ] } } ]); angular.module("list").directive("guacFilter", [function() { return { restrict: "E", replace: !0, scope: { filteredItems: "\x3d", placeholder: "\x26", items: "\x26", properties: "\x26" }, templateUrl: "app/list/templates/guacFilter.html", controller: ["$scope", "$injector", function(a, b) { var e = new (b.get("FilterPattern"))(a.properties()); a.searchString = null; var d = function() { var b = a.items(); a.filteredItems = b ? b.filter(e.predicate) : [] }; a.$watch("searchString", function(a) { e.compile(a); d() }); a.$watchCollection(a.items, function() { d() }) } ] } } ]); angular.module("element").directive("guacFocus", ["$parse", function(a) { return { restrict: "A", link: function(b, e, d) { var c = a(d.guacFocus) , f = e[0]; b.$watch(c, function(a) { b.$evalAsync(function() { a ? f.focus() : f.blur() }) }); f.addEventListener("focus", function() { b.$evalAsync(function() { c.assign(b, !0) }) }); f.addEventListener("blur", function() { b.$evalAsync(function() { c.assign(b, !1) }) }) } } } ]); angular.module("groupList").directive("guacGroupList", [function() { return { restrict: "E", replace: !0, scope: { connectionGroups: "\x3d", context: "\x3d", templates: "\x3d", showRootGroup: "\x3d", pageSize: "\x3d", decorator: "\x3d" }, templateUrl: "app/groupList/templates/guacGroupList.html", controller: ["$scope", "$injector", function(a, b) { var e = b.get("activeConnectionService") , d = b.get("dataSourceService") , c = b.get("GroupListItem") , f = {}; a.rootItems = []; var g = function(a, b) { return f[a][b.identifier] }; a.isVisible = function(b) { return !!a.templates[b] } ; a.$watch("connectionGroups", function(b) { var h = []; a.rootItems = []; f = {}; b && (angular.forEach(b, function(b, d) { h.push(d); f[d] = {}; b = b instanceof c ? b : c.fromConnectionGroup(d, b, a.isVisible(c.Type.CONNECTION), a.isVisible(c.Type.SHARING_PROFILE), g); a.showRootGroup ? a.rootItems.push(b) : angular.forEach(b.children, function(b) { a.rootItems.push(b) }) }), d.apply(e.getActiveConnections, h).then(function(a) { angular.forEach(a, function(a, b) { angular.forEach(a, function(a) { a = a.connectionIdentifier; f[b][a] ? f[b][a]++ : f[b][a] = 1 }) }) })); a.decorator && a.decorator(a.rootItems) }); a.toggleExpanded = function(a) { a.expanded = !a.expanded } } ] } } ]); angular.module("groupList").directive("guacGroupListFilter", [function() { return { restrict: "E", replace: !0, scope: { filteredConnectionGroups: "\x3d", placeholder: "\x26", connectionGroups: "\x26", connectionProperties: "\x26", connectionGroupProperties: "\x26" }, templateUrl: "app/groupList/templates/guacGroupListFilter.html", controller: ["$scope", "$injector", function(a, b) { var e = b.get("ConnectionGroup") , d = b.get("FilterPattern") , c = b.get("GroupListItem") , f = new d(a.connectionProperties()) , g = new d(a.connectionGroupProperties()); a.searchString = null; var h = function n(a) { a = new e(a); a.childConnections = angular.copy(a.childConnections) || []; a.childConnectionGroups = angular.copy(a.childConnectionGroups) || []; angular.forEach(a.childConnectionGroups, function(b) { b = n(b); Array.prototype.push.apply(a.childConnections, b.childConnections); Array.prototype.push.apply(a.childConnectionGroups, b.childConnectionGroups) }); return a } , k = function() { if (a.searchString) { a.filteredConnectionGroups = {}; var b = a.connectionGroups(); b && angular.forEach(b, function(b, d) { b instanceof c && (b = b.wrappedItem); b = h(b); b.childConnections = b.childConnections.filter(f.predicate); b.childConnectionGroups = b.childConnectionGroups.filter(g.predicate); a.filteredConnectionGroups[d] = b }) } else a.filteredConnectionGroups = a.connectionGroups() || {} }; a.$watch("searchString", function(a) { f.compile(a); g.compile(a); k() }); a.$watchCollection(a.connectionGroups, function() { k() }) } ] } } ]); angular.module("history").factory("guacHistory", ["HistoryEntry", function(a) { var b = { recentConnections: [], updateThumbnail: function(d, c) { var f; for (f = 0; f < b.recentConnections.length; f++) if (b.recentConnections[f].id === d) { b.recentConnections.splice(f, 1); break } b.recentConnections.unshift(new a(d,c,(new Date).getTime())); 6 < b.recentConnections.length && (b.recentConnections.length = 6); try { localStorage && localStorage.setItem("GUAC_HISTORY", JSON.stringify(b.recentConnections)) } catch (g) {} } }; try { if (localStorage) { var e = JSON.parse(localStorage.getItem("GUAC_HISTORY") || "[]"); e instanceof Array && (b.recentConnections = e) } } catch (d) {} return b } ]); angular.module("client").factory("guacImage", ["$injector", function(a) { var b = a.get("$q"); a = {}; var e = b.defer() , d = [] , c = []; a.getSupportedMimetypes = function() { return e.promise } ; angular.forEach({ "image/jpeg": "/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCAABAAEDAREAAhEBAxEB/8QAFAABAAAAAAAAAAAAAAAAAAAACf/EABQQAQAAAAAAAAAAAAAAAAAAAAD/xAAUAQEAAAAAAAAAAAAAAAAAAAAA/8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8AVMH/2Q\x3d\x3d", "image/png": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEX///+nxBvIAAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg\x3d\x3d", "image/webp": "UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA\x3d\x3d" }, function(a, e) { var f = b.defer(); d.push(f.promise); var g = new Image; g.src = "data:" + e + ";base64," + a; g.onload = g.onerror = function() { 1 === g.width && 1 === g.height && c.push(e); f.resolve() } }); b.all(d).then(function() { e.resolve(c) }); return a } ]); angular.module("textInput").directive("guacKey", [function() { return { restrict: "E", replace: !0, scope: { text: "\x3d", keysym: "\x3d", sticky: "\x3d?", pressed: "\x3d?" }, templateUrl: "app/textInput/templates/guacKey.html", controller: ["$scope", "$rootScope", function(a, b) { a.sticky = a.sticky || !1; a.pressed = a.pressed || !1; a.updateKey = function() { a.sticky ? a.pressed = !a.pressed : (b.$broadcast("guacSyntheticKeydown", a.keysym), b.$broadcast("guacSyntheticKeyup", a.keysym)) } ; a.$watch("pressed", function(e, d) { e ? b.$broadcast("guacSyntheticKeydown", a.keysym) : d && b.$broadcast("guacSyntheticKeyup", a.keysym) }) } ] } } ]); angular.module("form").directive("guacLenientDate", ["$injector", function(a) { var b = a.get("$filter"); return { restrict: "A", require: "ngModel", link: function(a, d, c, f) { f.$parsers = [function(a) { if (!a) return null; var b = /([0-9]*)(?:-([0-9]*)(?:-([0-9]*))?)?/.exec(a); if (!b) return null; a = parseInt(b[1] || "0") || (new Date).getFullYear(); var c = parseInt(b[2] || "0") || 1 , b = parseInt(b[3] || "0") || 1; a = new Date(Date.UTC(a, c - 1, b)); return isNaN(a.getTime()) ? null : a } ]; f.$formatters = [function(a) { return a ? b("date")(a, "yyyy-MM-dd", "UTC") : "" } ] } } } ]); angular.module("form").directive("guacLenientTime", ["$injector", function(a) { var b = a.get("$filter"); return { restrict: "A", require: "ngModel", link: function(a, d, c, f) { f.$parsers = [function(a) { if (!a) return null; a = /([0-9]*)(?::([0-9]*)(?::([0-9]*))?)?(?:\s*(a|p))?/.exec(a.toLowerCase()); if (!a) return null; var b = parseInt(a[1] || "0") , c = parseInt(a[2] || "0") , d = parseInt(a[3] || "0"); a[4] && (12 === b && (b = 0), "p" === a[4] && (b += 12)); c += d / 60; a = new Date(Date.UTC(1970, 0, 1, (b + c / 60) % 24, c % 60, d % 60)); return isNaN(a.getTime()) ? null : a } ]; f.$formatters = [function(a) { return a ? b("date")(a, "HH:mm:ss", "UTC") : "" } ] } } } ]); angular.module("element").directive("guacMarker", ["$injector", function(a) { var b = a.get("Marker") , e = a.get("$parse"); return { restrict: "A", link: function(a, c, f) { e(f.guacMarker).assign(a, new b(c[0])) } } } ]); angular.module("navigation").directive("guacMenu", [function() { return { restrict: "E", transclude: !0, replace: !0, scope: { menuTitle: "\x3d" }, templateUrl: "app/navigation/templates/guacMenu.html", controller: ["$scope", "$injector", "$element", function(a, b, e) { b = b.get("$document"); e = e[0]; b = b[0]; a.menuShown = !1; a.toggleMenu = function() { a.menuShown = !a.menuShown } ; b.body.addEventListener("click", function() { a.$apply(function() { a.menuShown = !1 }) }, !1); e.addEventListener("click", function(a) { a.stopPropagation() }, !1) } ] } } ]); angular.module("notification").factory("guacNotification", ["$injector", function(a) { var b = a.get("$rootScope") , e = {} , d = a.get("sessionStorageFactory").create(!1); e.getStatus = function() { return d() } ; e.showStatus = function(a) { d() && a || d(a) } ; b.$on("$routeChangeSuccess", function() { e.showStatus(!1) }); return e } ]); angular.module("notification").directive("guacNotification", [function() { return { restrict: "E", replace: !0, scope: { notification: "\x3d" }, templateUrl: "app/notification/templates/guacNotification.html", controller: ["$scope", "$interval", function(a, b) { a.$watch("notification.progress.ratio", function(b) { a.progressPercent = 100 * b }); a.$watch("notification", function(e) { var d = e.countdown; a.interval && b.cancel(a.interval); d && (a.timeRemaining = d.remaining, a.interval = b(function() { a.timeRemaining--; 0 === a.timeRemaining && d.callback && d.callback() }, 1E3, a.timeRemaining)) }); a.$on("$destroy", function() { a.interval && b.cancel(a.interval) }) } ] } } ]); angular.module("osk").directive("guacOsk", [function() { return { restrict: "E", replace: !0, scope: { layout: "\x3d" }, templateUrl: "app/osk/templates/guacOsk.html", controller: ["$scope", "$injector", "$element", function(a, b, e) { var d = b.get("$http") , c = b.get("$rootScope") , f = b.get("cacheService") , g = null , h = e[0]; a.keyboardResized = function() { g && g.resize(h.offsetWidth) } ; a.$watch("layout", function(b) { g && (h.removeChild(g.getElement()), g = null); b && d({ cache: f.languages, method: "GET", url: b }).success(function(d) { a.layout === b && (g = new Guacamole.OnScreenKeyboard(d), h.appendChild(g.getElement()), g.resize(h.offsetWidth), g.onkeydown = function(a) { c.$broadcast("guacSyntheticKeydown", a) } , g.onkeyup = function(a) { c.$broadcast("guacSyntheticKeyup", a) } ) }) }) } ] } } ]); angular.module("navigation").directive("guacPageList", [function() { return { restrict: "E", replace: !0, scope: { pages: "\x3d" }, templateUrl: "app/navigation/templates/guacPageList.html", controller: ["$scope", "$injector", function(a, b) { var e = b.get("PageDefinition") , d = b.get("$location") , c = d.url() , f = []; a.levels = []; var g = function(a) { return angular.isArray(a.name) ? a.name : [a.name] } , h = function(b, d) { for (var h = g(b), l = 0; l < h.length; l++) { var k = a.levels[l]; k || (k = a.levels[l] = {}); var q = h[l] , t = f[l] === q; k[q] || (k[q] = new e({ name: q, url: t ? c : b.url, className: b.className, weight: b.weight || d + l })); if (f[l] !== q) break } }; a.navigateToPage = function(a) { d.path(a.url) } ; a.isCurrentPage = function(a) { return c === a.url } ; a.getPages = function(a) { var b = []; angular.forEach(a, function(a) { b.push(a) }); b.sort(function(a, b) { return a.weight - b.weight }); return b } ; a.$watch("pages", function(b) { f = []; angular.forEach(b, function(b) { a.isCurrentPage(b) && (f = g(b)) }); a.levels = []; angular.forEach(b, h); a.levels = a.levels.filter(function(a) { var b = 0, c; for (c in a) if (2 === ++b) return !0; return !1 }) }) } ] } } ]); angular.module("list").directive("guacPager", [function() { return { restrict: "E", replace: !0, scope: { page: "\x3d", pageSize: "\x26", pageCount: "\x26", items: "\x26" }, templateUrl: "app/list/templates/guacPager.html", controller: ["$scope", function(a) { var b = []; a.firstPage = 1; a.previousPage = 1; a.currentPage = 1; a.nextPage = 1; a.lastPage = 1; a.pageNumbers = []; var e = function() { var b = a.pageCount() || 11 , d = a.currentPage - (b - 1) / 2 , b = d + b - 1; d < a.firstPage ? (b = Math.min(a.lastPage, b - d + a.firstPage), d = a.firstPage) : b > a.lastPage && (d = Math.max(1, d - b + a.lastPage), b = a.lastPage); for (a.pageNumbers = []; d <= b; d++) a.pageNumbers.push(d) } , d = function() { var c = a.items() , d = a.pageSize() || 10; b = []; if (c) for (var e = 0; e < c.length; e += d) b.push(c.slice(e, e + d)); a.firstPage = 1; a.lastPage = b.length; a.selectPage(Math.min(a.lastPage, Math.max(a.firstPage, a.currentPage))) }; a.selectPage = function(c) { a.currentPage = c; a.page = b[c - 1]; a.nextPage = Math.min(a.lastPage, a.currentPage + 1); a.previousPage = Math.max(a.firstPage, a.currentPage - 1); e() } ; a.canSelectPage = function(b) { return b !== a.currentPage && b >= a.firstPage && b <= a.lastPage } ; a.isSelected = function(b) { return b === a.currentPage } ; a.hasMorePagesBefore = function() { return a.pageNumbers[0] !== a.firstPage } ; a.hasMorePagesAfter = function() { return a.pageNumbers[a.pageNumbers.length - 1] !== a.lastPage } ; a.$watchCollection(a.items, function() { d() }); a.$watch(a.pageSize, function() { d() }); a.$watch(a.pageCount, function() { e() }) } ] } } ]); angular.module("home").directive("guacRecentConnections", [function() { return { restrict: "E", replace: !0, scope: { rootGroups: "\x3d" }, templateUrl: "app/home/templates/guacRecentConnections.html", controller: ["$scope", "$injector", function(a, b) { var e = b.get("ActiveConnection") , d = b.get("ClientIdentifier") , c = b.get("RecentConnection") , f = b.get("guacClientManager") , g = b.get("guacHistory"); a.activeConnections = []; a.recentConnections = []; a.hasRecentConnections = function() { return !(!a.activeConnections.length && !a.recentConnections.length) } ; var h = {} , k = function n(a, b) { h[d.toString({ dataSource: a, type: d.Types.CONNECTION_GROUP, id: b.identifier })] = b; b.childConnections && b.childConnections.forEach(function(b) { h[d.toString({ dataSource: a, type: d.Types.CONNECTION, id: b.identifier })] = b }); b.childConnectionGroups && b.childConnectionGroups.forEach(function(b) { n(a, b) }) }; a.$watch("rootGroups", function(b) { a.activeConnections = []; a.recentConnections = []; h = {}; b && angular.forEach(b, function(a, b) { k(b, a) }); var d = f.getManagedClients(), n; for (n in d) b = d[n], n in h && a.activeConnections.push(new e(h[n].name,b)); g.recentConnections.forEach(function(b) { b.id in h && !(b.id in d) && a.recentConnections.push(new c(h[b.id].name,b)) }) }) } ] } } ]); angular.module("element").directive("guacResize", ["$document", function(a) { return { restrict: "A", link: function(b, e, d) { var c = b.$eval(d.guacResize) , f = e[0] , g = a[0].createElement("object") , h = f.offsetWidth , k = f.offsetHeight , l = function() { if (f.offsetWidth !== h || f.offsetHeight !== k) c && b.$evalAsync(function() { c(f.offsetWidth, f.offsetHeight) }), h = f.offsetWidth, k = f.offsetHeight }; g.onload = function() { g.contentDocument.defaultView.addEventListener("resize", l); l() } ; g.className = "resize-sensor"; g.type = "text/html"; g.data = "app/element/templates/blank.html"; f.insertBefore(g, f.firstChild) } } } ]); angular.module("element").directive("guacScroll", [function() { return { restrict: "A", link: function(a, b, e) { var d = a.$eval(e.guacScroll) , c = b[0]; a.$watch(function() { return d.left }, function(a) { c.scrollLeft = a; d.left = c.scrollLeft }); a.$watch(function() { return d.top }, function(a) { c.scrollTop = a; d.top = c.scrollTop }) } } } ]); angular.module("settings").directive("guacSettingsConnectionHistory", [function() { return { restrict: "E", replace: !0, scope: {}, templateUrl: "app/settings/templates/settingsConnectionHistory.html", controller: ["$scope", "$injector", function(a, b) { var e = b.get("ConnectionHistoryEntryWrapper") , d = b.get("FilterToken") , c = b.get("SortOrder") , f = b.get("$filter") , g = b.get("$routeParams") , h = b.get("$translate") , k = b.get("csvService") , l = b.get("historyService"); a.dataSource = g.dataSource; a.historyEntryWrappers = null; a.searchString = ""; a.dateFormat = null; a.order = new c(["-startDate", "-duration", "username", "connectionName", "remoteHost"]); h("SETTINGS_CONNECTION_HISTORY.FORMAT_DATE").then(function(b) { a.dateFormat = b }); a.isLoaded = function() { return null !== a.historyEntryWrappers && null !== a.dateFormat } ; a.isHistoryEmpty = function() { return a.isLoaded() && 0 === a.historyEntryWrappers.length } ; a.search = function() { a.historyEntryWrappers = null; var b = d.tokenize(a.searchString) , c = []; angular.forEach(b, function(a) { switch (a.type) { case "LITERAL": c.push(a.value); case "WHITESPACE": break; default: c.push(a.consumed) } }); l.getConnectionHistory(a.dataSource, c, a.order.predicate.filter(function(a) { return "startDate" === a || "-startDate" === a })).success(function(b) { a.historyEntryWrappers = []; angular.forEach(b, function(b) { a.historyEntryWrappers.push(new e(b)) }) }) } ; a.downloadCSV = function() { h("SETTINGS_CONNECTION_HISTORY.TABLE_HEADER_SESSION_USERNAME SETTINGS_CONNECTION_HISTORY.TABLE_HEADER_SESSION_STARTDATE SETTINGS_CONNECTION_HISTORY.TABLE_HEADER_SESSION_DURATION SETTINGS_CONNECTION_HISTORY.TABLE_HEADER_SESSION_CONNECTION_NAME SETTINGS_CONNECTION_HISTORY.TABLE_HEADER_SESSION_REMOTEHOST SETTINGS_CONNECTION_HISTORY.FILENAME_HISTORY_CSV".split(" ")).then(function(b) { var c = [[b["SETTINGS_CONNECTION_HISTORY.TABLE_HEADER_SESSION_USERNAME"], b["SETTINGS_CONNECTION_HISTORY.TABLE_HEADER_SESSION_STARTDATE"], b["SETTINGS_CONNECTION_HISTORY.TABLE_HEADER_SESSION_DURATION"], b["SETTINGS_CONNECTION_HISTORY.TABLE_HEADER_SESSION_CONNECTION_NAME"], b["SETTINGS_CONNECTION_HISTORY.TABLE_HEADER_SESSION_REMOTEHOST"]]]; angular.forEach(f("orderBy")(a.historyEntryWrappers, a.order.predicate), function(b) { c.push([b.username, f("date")(b.startDate, a.dateFormat), b.duration / 1E3, b.connectionName, b.remoteHost]) }); saveAs(k.toBlob(c), b["SETTINGS_CONNECTION_HISTORY.FILENAME_HISTORY_CSV"]) }) } ; a.search() } ] } } ]); angular.module("settings").directive("guacSettingsConnections", [function() { return { restrict: "E", replace: !0, scope: {}, templateUrl: "app/settings/templates/settingsConnections.html", controller: ["$scope", "$injector", function(a, b) { var e = b.get("ConnectionGroup") , d = b.get("GroupListItem") , c = b.get("PermissionSet") , f = b.get("$location") , g = b.get("$routeParams") , h = b.get("authenticationService") , k = b.get("connectionGroupService") , l = b.get("dataSourceService"); b.get("guacNotification"); b = b.get("permissionService"); h = h.getCurrentUsername(); a.dataSource = g.dataSource; a.rootGroups = null; a.permissions = null; a.filteredConnectionProperties = ["name", "protocol"]; a.filteredConnectionGroupProperties = ["name"]; a.isLoaded = function() { return null !== a.rootGroup && null !== a.permissions } ; a.canCreateConnections = function() { return a.permissions ? c.hasSystemPermission(a.permissions, c.SystemPermissionType.ADMINISTER) || c.hasSystemPermission(a.permissions, c.SystemPermissionType.CREATE_CONNECTION) ? !0 : !1 : !1 } ; a.canCreateConnectionGroups = function() { return a.permissions ? c.hasSystemPermission(a.permissions, c.SystemPermissionType.ADMINISTER) || c.hasSystemPermission(a.permissions, c.SystemPermissionType.CREATE_CONNECTION_GROUP) ? !0 : !1 : !1 } ; a.canCreateSharingProfiles = function() { return a.permissions ? c.hasSystemPermission(a.permissions, c.SystemPermissionType.ADMINISTER) || c.hasSystemPermission(a.permissions, c.SystemPermissionType.CREATE_SHARING_PROFILE) ? !0 : !1 : !1 } ; a.canManageConnections = function() { return a.permissions ? a.canCreateConnections() || a.canCreateConnectionGroups() || a.canCreateSharingProfiles() || c.hasConnectionPermission(a.permissions, c.ObjectPermissionType.UPDATE) || c.hasConnectionPermission(a.permissions, c.ObjectPermissionType.DELETE) || c.hasConnectionGroupPermission(a.permissions, c.ObjectPermissionType.UPDATE) || c.hasConnectionGroupPermission(a.permissions, c.ObjectPermissionType.DELETE) ? !0 : !1 : !1 } ; a.canUpdateConnection = function(b) { return a.permissions ? c.hasSystemPermission(a.permissions, c.SystemPermissionType.ADMINISTER) || c.hasConnectionPermission(a.permissions, c.ObjectPermissionType.UPDATE, b) ? !0 : !1 : !1 } ; a.canUpdateConnectionGroup = function(b) { return a.permissions ? c.hasSystemPermission(a.permissions, c.SystemPermissionType.ADMINISTER) || c.hasConnectionGroupPermission(a.permissions, c.ObjectPermissionType.UPDATE, b) ? !0 : !1 : !1 } ; var n = function p(b) { if (b.type === d.Type.CONNECTION_GROUP) { var c = b.children; if (!b || a.canUpdateConnectionGroup(b.identifier)) a.canCreateConnections() && c.push(new d({ type: "new-connection", dataSource: a.dataSource, weight: 1, wrappedItem: b })), a.canCreateConnectionGroups() && c.push(new d({ type: "new-connection-group", dataSource: a.dataSource, weight: 1, wrappedItem: b })) } else b.type === d.Type.CONNECTION && (c = b.children, (!b || a.canUpdateConnection(b.identifier)) && a.canCreateSharingProfiles() && c.push(new d({ type: "new-sharing-profile", dataSource: a.dataSource, weight: 1, wrappedItem: b }))); angular.forEach(b.children, p) }; a.rootItemDecorator = function(a) { angular.forEach(a, n) } ; b.getPermissions(a.dataSource, h).success(function(b) { a.permissions = b; c.removeConnectionGroupPermission(a.permissions, c.ObjectPermissionType.UPDATE, e.ROOT_IDENTIFIER); a.canManageConnections() || f.path("/"); l.apply(k.getConnectionGroupTree, [a.dataSource], e.ROOT_IDENTIFIER, [c.ObjectPermissionType.UPDATE, c.ObjectPermissionType.DELETE]).then(function(b) { a.rootGroups = b }) }) } ] } } ]); angular.module("settings").directive("guacSettingsPreferences", [function() { return { restrict: "E", replace: !0, scope: {}, templateUrl: "app/settings/templates/settingsPreferences.html", controller: ["$scope", "$injector", function(a, b) { var e = b.get("PermissionSet") , d = b.get("$translate") , c = b.get("authenticationService") , f = b.get("guacNotification") , g = b.get("languageService") , h = b.get("permissionService") , k = b.get("preferenceService") , l = b.get("userService") , n = { name: "SETTINGS_PREFERENCES.ACTION_ACKNOWLEDGE", callback: function() { f.showStatus(!1) } } , m = c.getCurrentUsername() , p = c.getDataSource(); a.preferences = k.preferences; a.languages = null; a.changeLanguage = function() { d.use(a.preferences.language) } ; a.newPassword = null; a.newPasswordMatch = null; a.canChangePassword = null; a.updatePassword = function() { a.newPasswordMatch !== a.newPassword ? f.showStatus({ className: "error", title: "SETTINGS_PREFERENCES.DIALOG_HEADER_ERROR", text: { key: "SETTINGS_PREFERENCES.ERROR_PASSWORD_MISMATCH" }, actions: [n] }) : a.newPassword ? l.updateUserPassword(p, m, a.oldPassword, a.newPassword).success(function() { a.oldPassword = null; a.newPassword = null; a.newPasswordMatch = null; f.showStatus({ text: { key: "SETTINGS_PREFERENCES.INFO_PASSWORD_CHANGED" }, actions: [n] }) }).error(function(a) { f.showStatus({ className: "error", title: "SETTINGS_PREFERENCES.DIALOG_HEADER_ERROR", text: a.translatableMessage, actions: [n] }) }) : f.showStatus({ className: "error", title: "SETTINGS_PREFERENCES.DIALOG_HEADER_ERROR", text: { key: "SETTINGS_PREFERENCES.ERROR_PASSWORD_BLANK" }, actions: [n] }) } ; g.getLanguages().success(function(b) { a.languages = b }); h.getPermissions(p, m).success(function(b) { a.canChangePassword = e.hasUserPermission(b, e.ObjectPermissionType.UPDATE, m) }).error(function(b) { a.canChangePassword = !1 }); a.isLoaded = function() { return null !== a.canChangePassword && null !== a.languages } } ] } } ]); angular.module("settings").directive("guacSettingsSessions", [function() { return { restrict: "E", replace: !0, scope: {}, templateUrl: "app/settings/templates/settingsSessions.html", controller: ["$scope", "$injector", function(a, b) { var e = b.get("ActiveConnectionWrapper") , d = b.get("ConnectionGroup") , c = b.get("SortOrder") , f = b.get("$filter") , g = b.get("$translate") , h = b.get("$q") , k = b.get("activeConnectionService") , l = b.get("authenticationService") , n = b.get("connectionGroupService") , m = b.get("dataSourceService") , p = b.get("guacNotification"); b = l.getAvailableDataSources(); a.wrappers = null; a.wrapperOrder = new c(["activeConnection.username", "startDate", "activeConnection.remoteHost", "name"]); a.filteredWrapperProperties = ["activeConnection.username", "startDate", "activeConnection.remoteHost", "name"]; var q = null , t = null , u = null , v = {} , r = function z(a, b) { angular.forEach(b.childConnections, function(b) { t[a][b.identifier] = b }); angular.forEach(b.childConnectionGroups, function(b) { z(a, b) }) } , w = function() { q && t && u && (a.wrappers = [], angular.forEach(q, function(b, c) { angular.forEach(b, function(b, d) { a.wrappers.push(new e({ dataSource: c, name: t[c][b.connectionIdentifier].name, startDate: f("date")(b.startDate, u), activeConnection: b })) }) })) }; m.apply(n.getConnectionGroupTree, b, d.ROOT_IDENTIFIER).then(function(a) { t = {}; angular.forEach(a, function(a, b) { t[b] = {}; r(b, a) }); w() }); m.apply(k.getActiveConnections, b).then(function(a) { q = a; w() }); g("SETTINGS_SESSIONS.FORMAT_STARTDATE").then(function(a) { u = a; w() }); a.isLoaded = function() { return null !== a.wrappers } ; var B = { name: "SETTINGS_SESSIONS.ACTION_ACKNOWLEDGE", callback: function() { p.showStatus(!1) } } , x = { name: "SETTINGS_SESSIONS.ACTION_CANCEL", callback: function() { p.showStatus(!1) } } , C = { name: "SETTINGS_SESSIONS.ACTION_DELETE", className: "danger", callback: function() { y(); p.showStatus(!1) } } , y = function() { var b = []; angular.forEach(v, function(a, c) { a = Object.keys(a); a.length && b.push(k.deleteActiveConnections(c, a)) }); h.all(b).then(function() { a.wrappers = a.wrappers.filter(function(a) { return !(a.activeConnection.identifier in (v[a.dataSource] || {})) }); v = {} }, function(a) { p.showStatus({ className: "error", title: "SETTINGS_SESSIONS.DIALOG_HEADER_ERROR", text: a.translatableMessage, actions: [B] }) }) }; a.deleteSessions = function() { p.showStatus({ title: "SETTINGS_SESSIONS.DIALOG_HEADER_CONFIRM_DELETE", text: { key: "SETTINGS_SESSIONS.TEXT_CONFIRM_DELETE" }, actions: [C, x] }) } ; a.canDeleteSessions = function() { for (var a in v) for (var b in v[a]) return !0; return !1 } ; a.wrapperSelectionChange = function(a) { var b = v[a.dataSource]; b || (b = v[a.dataSource] = {}); a.checked ? b[a.activeConnection.identifier] = a : delete b[a.activeConnection.identifier] } } ] } } ]); angular.module("settings").directive("guacSettingsUsers", [function() { return { restrict: "E", replace: !0, scope: {}, templateUrl: "app/settings/templates/settingsUsers.html", controller: ["$scope", "$injector", function(a, b) { var e = b.get("ManageableUser") , d = b.get("PermissionSet") , c = b.get("SortOrder") , f = b.get("$location") , g = b.get("$translate") , h = b.get("authenticationService") , k = b.get("dataSourceService"); b.get("guacNotification"); var l = b.get("permissionService") , n = b.get("userService"); b = h.getCurrentUsername(); var m = h.getAvailableDataSources(); a.manageableUsers = null; a.newUsername = ""; a.permissions = null; a.filteredUserProperties = ["user.lastActive", "user.username"]; a.dateFormat = null; a.order = new c(["user.username", "-user.lastActive"]); g("SETTINGS_USERS.FORMAT_DATE").then(function(b) { a.dateFormat = b }); a.isLoaded = function() { return null !== a.dateFormat && null !== a.manageableUsers && null !== a.permissions } ; a.getDefaultDataSource = function() { if (!a.permissions) return null; for (var b in a.permissions) { var c = a.permissions[b]; if (d.hasSystemPermission(c, d.SystemPermissionType.ADMINISTER) || d.hasSystemPermission(c, d.SystemPermissionType.CREATE_USER)) return b } return null } ; a.canCreateUsers = function() { return null !== a.getDefaultDataSource() } ; var p = function() { if (!a.permissions) return !1; if (a.canCreateUsers()) return !0; for (var b in a.permissions) { var c = a.permissions[b]; if (d.hasUserPermission(c, d.ObjectPermissionType.UPDATE) || d.hasUserPermission(c, d.ObjectPermissionType.DELETE)) return !0 } return !1 }; k.apply(l.getPermissions, m, b).then(function(b) { a.permissions = b; p() || f.path("/"); (a.canCreateUsers() ? k.apply(n.getUsers, m) : k.apply(n.getUsers, m, [d.ObjectPermissionType.UPDATE, d.ObjectPermissionType.DELETE])).then(function(c) { var f = {}; a.manageableUsers = []; angular.forEach(m, function(g) { angular.forEach(c[g], function(c) { f[c.username] || (d.hasSystemPermission(b[g], d.ObjectPermissionType.ADMINISTER) || d.hasUserPermission(b[g], d.ObjectPermissionType.UPDATE, c.username) || d.hasUserPermission(b[g], d.ObjectPermissionType.DELETE, c.username) || (g = a.getDefaultDataSource()), f[c.username] = c, a.manageableUsers.push(new e({ dataSource: g, user: c }))) }) }) }) }) } ] } } ]); angular.module("list").directive("guacSortOrder", [function() { return { restrict: "A", link: function(a, b, e) { var d = a.$eval(e.guacSortOrder) , c = a.$eval(e.guacSortProperty); b.addClass("sortable"); a.$watch(function() { return d.primary === c }, function(a) { b.toggleClass("sort-primary", a) }); a.$watch(function() { return d.descending }, function(a) { b.toggleClass("sort-descending", a) }); b[0].addEventListener("click", function() { a.$evalAsync(function() { d.togglePrimary(c) }) }) } } } ]); angular.module("textInput").directive("guacTextInput", [function() { return { restrict: "E", replace: !0, scope: { needsFocus: "\x3d?" }, templateUrl: "app/textInput/templates/guacTextInput.html", controller: ["$scope", "$rootScope", "$element", "$timeout", function(a, b, e, d) { var c = { 65027: !0, 65288: !0, 65289: !0, 65293: !0, 65307: !0, 65360: !0, 65361: !0, 65362: !0, 65363: !0, 65364: !0, 65367: !0, 65380: !0, 65470: !0, 65471: !0, 65472: !0, 65473: !0, 65474: !0, 65475: !0, 65476: !0, 65477: !0, 65478: !0, 65479: !0, 65480: !0, 65481: !0, 65505: !0, 65506: !0, 65507: !0, 65508: !0, 65513: !0, 65514: !0, 65535: !0 }; a.sentText = []; a.altPressed = !1; a.ctrlPressed = !1; var f = e.find(".target")[0] , g = !1; f.onfocus = function() { g = !0; p(4) } ; f.onblur = function() { g = !1; f.focus() } ; var h = !1; f.addEventListener("compositionstart", function(a) { h = !0 }, !1); f.addEventListener("compositionend", function(a) { h = !1 }, !1); var k = function(a) { b.$broadcast("guacSyntheticKeydown", a); b.$broadcast("guacSyntheticKeyup", a) } , l = function(a) { if (10 === a) k(65293), m(); else if (a = 31 >= a || 127 <= a && 159 >= a ? 65280 | a : 0 <= a && 255 >= a ? a : 256 <= a && 1114111 >= a ? 16777216 | a : null) k(a), m() } , n = function(b) { for (var c = "", f = 0; f < b.length; f++) { var e = b.charCodeAt(f); 8203 !== e && (c += String.fromCharCode(e), l(e)) } a.$apply(function() { a.sentText.push(c) }); d(function() { a.sentText.shift() }, 1E3) } , m = function() { a.$apply(function() { a.altPressed = !1; a.ctrlPressed = !1 }) } , p = function(a) { var b = String.fromCharCode(8203); f.value = Array(2 * a + 1).join(b); f.setSelectionRange(a, a) }; f.addEventListener("input", function(a) { if (!h) { var b, c = f.value; if (8 > c.length) { var d = 4 - f.selectionStart; for (b = 0; b < d; b++) k(65288); c = 8 - c.length - d; for (b = 0; b < c; b++) k(65535) } else n(c); p(4); a.preventDefault() } }, !1); f.addEventListener("selectstart", function(a) { a.preventDefault() }, !1); a.$watch("needsFocus", function(a) { a ? f.focus() : f.blur() }); a.$on("guacBeforeKeydown", function(a, b) { g && !c[b] && a.preventDefault() }); a.$on("guacBeforeKeyup", function(a, b) { g && !c[b] && a.preventDefault() }) } ] } } ]); angular.module("client").directive("guacThumbnail", [function() { return { restrict: "E", replace: !0, scope: { client: "\x3d" }, templateUrl: "app/client/templates/guacThumbnail.html", controller: ["$scope", "$injector", "$element", function(a, b, e) { b.get("$window"); var d = null , c = null , f = e.find(".display")[0] , g = e[0]; a.updateDisplayScale = function() { d && d.scale(Math.min(g.offsetWidth / Math.max(d.getWidth(), 1), g.offsetHeight / Math.max(d.getHeight(), 1))) } ; a.$watch("client", function(a) { f.innerHTML = ""; a && (d = a.client.getDisplay(), c = d.getElement(), f.appendChild(c)) }); a.$watch("client.managedDisplay.size", function(b) { var c; if (b && 0 !== b.width && 0 !== b.height) { var d = Math.min(320 / b.width, 240 / b.height, 1); c = b.width * d; b = b.height * d } else c = 320, b = 240; d = document.createElement("canvas"); d.width = c; d.height = b; a.thumbnail = d.toDataURL("image/png"); a.$evalAsync(a.updateDisplayScale) }) } ] } } ]); angular.module("touch").directive("guacTouchDrag", [function() { return { restrict: "A", link: function(a, b, e) { var d = a.$eval(e.guacTouchDrag); b = b[0]; var c = !1 , f = null , g = null , h = null , k = null , l = 0 , n = 0; b.addEventListener("touchmove", function(b) { if (1 === b.touches.length) { b.stopPropagation(); var e = b.touches[0].clientX , m = b.touches[0].clientY; f && g ? c && (l = e - h, n = m - k, h = e, k = m) : (f = h = e, g = k = m, n = l = 0, c = !0); c && d && a.$apply(function() { !1 === d(!0, f, g, h, k, l, n) && b.preventDefault() }) } }, !1); b.addEventListener("touchend", function(b) { f && g && 0 === b.touches.length && (b.stopPropagation(), c && d && a.$apply(function() { !1 === d(!0, f, g, h, k, l, n) && b.preventDefault() }), g = k = f = h = null, n = l = 0, c = !1) }, !1) } } } ]); angular.module("touch").directive("guacTouchPinch", [function() { return { restrict: "A", link: function(a, b, e) { var d = a.$eval(e.guacTouchPinch); b = b[0]; var c = null , f = null , g = 0 , h = 0 , k = function(a) { var b = a.touches[0] , c = a.touches[1]; a = b.clientX - c.clientX; b = b.clientY - c.clientY; return Math.sqrt(a * a + b * b) }; b.addEventListener("touchmove", function(b) { 2 === b.touches.length && (b.stopPropagation(), f = k(b), g = (b.touches[0].clientX + b.touches[1].clientX) / 2, h = (b.touches[0].clientY + b.touches[1].clientY) / 2, c || (c = f), d && a.$apply(function() { !1 === d(!0, c, f, g, h) && b.preventDefault() })) }, !1); b.addEventListener("touchend", function(b) { c && 2 > b.touches.length && (b.stopPropagation(), d && a.$apply(function() { !1 === d(!1, c, f, g, h) && b.preventDefault() }), c = null) }, !1) } } } ]); angular.module("element").directive("guacUpload", ["$document", function(a) { return { restrict: "A", link: function(b, e, d) { var c = b.$eval(d.guacUpload); e = e[0]; var f = a[0].createElement("form") , g = a[0].createElement("input"); g.type = "file"; g.multiple = !0; f.appendChild(g); g.addEventListener("change", function() { b.$apply(function() { c && 0 < g.files.length && c(g.files); f.reset() }) }); e.addEventListener("click", function() { g.click() }) } } } ]); angular.module("list").directive("guacUserItem", [function() { return { restrict: "E", replace: !0, scope: { username: "\x3d" }, templateUrl: "app/list/templates/guacUserItem.html", controller: ["$scope", "$injector", function(a, b) { var e = b.get("AuthenticationResult") , d = b.get("$translate"); a.displayName = null; a.isAnonymous = function() { return a.username === e.ANONYMOUS_USERNAME } ; a.$watch("username", function(b) { a.isAnonymous() ? d("LIST.TEXT_ANONYMOUS_USER").then(function(b) { a.displayName = b }) : a.displayName = b }) } ] } } ]); angular.module("navigation").directive("guacUserMenu", [function() { return { restrict: "E", replace: !0, scope: { localActions: "\x3d" }, templateUrl: "app/navigation/templates/guacUserMenu.html", controller: ["$scope", "$injector", function(a, b) { var e = b.get("User") , d = b.get("$location") , c = b.get("$route") , f = b.get("authenticationService") , g = b.get("userService"); b = b.get("userPageService"); a.username = f.getCurrentUsername(); a.fullName = null; a.userURL = null; a.organization = null; a.role = null; g.getUser(f.getDataSource(), a.username).success(function(b) { a.user = b; a.fullName = b.attributes[e.Attributes.FULL_NAME]; a.organization = b.attributes[e.Attributes.ORGANIZATION]; a.role = b.attributes[e.Attributes.ORGANIZATIONAL_ROLE]; b = b.attributes[e.Attributes.EMAIL_ADDRESS]; a.userURL = b ? "mailto:" + b : null }); a.pages = null; b.getMainPages().then(function(b) { a.pages = b }); a.isAnonymous = function() { return f.isAnonymous() } ; a.logout = function() { f.logout()["finally"](function() { "/" !== d.path() ? d.url("/") : c.reload() }) } ; a.actions = [{ name: "USER_MENU.ACTION_LOGOUT", className: "logout", callback: a.logout }] } ] } } ]); angular.module("client").factory("guacVideo", [function() { return new function() { this.supported = Guacamole.VideoPlayer.getSupportedTypes() } } ]); angular.module("client").directive("guacViewport", [function() { return { restrict: "E", scope: {}, transclude: !0, templateUrl: "app/client/templates/guacViewport.html", controller: ["$scope", "$injector", "$element", function(a, b, e) { var d = b.get("$window"); b = b.get("$document"); var c = e.find(".viewport")[0] , f = b[0] , g = null , h = function() { var a = f.body.scrollTop , b = f.body.scrollWidth , e = f.body.scrollHeight , h = e - a; f.body.scrollLeft !== b && a !== e && g !== h ? (c.style.height = h + "px", g = h, d.scrollTo(b, e)) : 0 === h && d.scrollTo(b, e) }; d.addEventListener("scroll", h); var k = d.setInterval(h, 10); a.$on("$destroy", function() { d.removeEventListener("scroll", h); d.clearInterval(k) }) } ] } } ]); angular.module("history").factory("HistoryEntry", [function() { return function(a, b) { this.id = a; this.thumbnail = b } } ]); angular.module("manage").factory("HistoryEntryWrapper", ["$injector", function(a) { var b = a.get("ConnectionHistoryEntry"); return function(a) { this.entry = a; this.duration = null; this.durationText = "MANAGE_CONNECTION.TEXT_HISTORY_DURATION"; a.active ? this.durationText = "MANAGE_CONNECTION.INFO_CONNECTION_ACTIVE_NOW" : a.endDate || (this.durationText = "MANAGE_CONNECTION.INFO_CONNECTION_DURATION_UNKNOWN"); a.endDate && a.startDate && (this.duration = new b.Duration(a.endDate - a.startDate)) } } ]); angular.module("history", []); angular.module("rest").factory("historyService", ["$injector", function(a) { var b = a.get("$http") , e = a.get("authenticationService"); return { getConnectionHistory: function(a, c, f) { var d = { token: e.getCurrentToken() }; c && (d.contains = c); f && (d.order = f); return b({ method: "GET", url: "api/session/data/" + encodeURIComponent(a) + "/history/connections", params: d }) } } } ]); angular.module("home").controller("homeController", ["$scope", "$injector", function(a, b) { var e = b.get("ConnectionGroup") , d = b.get("ClientIdentifier") , c = b.get("GroupListItem") , f = b.get("authenticationService") , g = b.get("connectionGroupService"); b = b.get("dataSourceService"); a.rootConnectionGroups = null; a.filteredConnectionProperties = ["name"]; a.filteredConnectionGroupProperties = ["name"]; a.isLoaded = function() { return null !== a.rootConnectionGroup } ; a.context = { getClientIdentifier: function(a) { return a.type === c.Type.CONNECTION ? d.toString({ dataSource: a.dataSource, type: d.Types.CONNECTION, id: a.identifier }) : a.type === c.Type.CONNECTION_GROUP ? d.toString({ dataSource: a.dataSource, type: d.Types.CONNECTION_GROUP, id: a.identifier }) : null } }; b.apply(g.getConnectionGroupTree, f.getAvailableDataSources(), e.ROOT_IDENTIFIER).then(function(b) { a.rootConnectionGroups = b }) } ]); angular.module("home", ["client", "groupList", "history", "navigation", "rest"]); angular.module("index").factory("iconService", ["$rootScope", function(a) { var b = {} , e = $('link[rel\x3dicon][href\x3d"images/logo-64.png"]') , d = $('link[rel\x3dicon][href\x3d"images/logo-144.png"]') , c = function(a, b, c) { var d = document.createElement("canvas"); d.width = b; d.height = c; var f = Math.min(b / a.width, c / a.height) , e = a.width * f , f = a.height * f; b = (b - e) / 2; c = (c - f) / 2; d.getContext("2d").drawImage(a, b, c, e, f); return d }; b.setIcons = function(a) { if (a) { var b = c(a, 64, 64); e.attr("href", b.toDataURL("image/png")); a = c(a, 144, 144); d.attr("href", a.toDataURL("image/png")) } } ; b.setDefaultIcons = function() { e.attr("href", "images/logo-64.png"); d.attr("href", "images/logo-144.png") } ; a.$on("$routeChangeSuccess", function() { b.setDefaultIcons() }); return b } ]); angular.module("index").controller("indexController", ["$scope", "$injector", function(a, b) { var e = b.get("$document") , d = b.get("$window") , c = b.get("clipboardService"); b = b.get("guacNotification"); a.guacNotification = b; a.loginHelpText = null; a.acceptedCredentials = null; a.expectedCredentials = null; a.page = { title: "", bodyClassName: "" }; var f = new Guacamole.Keyboard(e[0]); f.onkeydown = function(b) { return a.expectedCredentials || a.$broadcast("guacBeforeKeydown", b, f).defaultPrevented ? !0 : !a.$broadcast("guacKeydown", b, f).defaultPrevented } ; f.onkeyup = function(b) { a.expectedCredentials || a.$broadcast("guacBeforeKeyup", b, f).defaultPrevented || a.$broadcast("guacKeyup", b, f) } ; d.onblur = function() { f.reset(); console.log("OnBlur Timer... Session OnWorks not used."); localStorage.setItem("temporizadorx", 100) } ; d.onfocus = function() { console.log("OnWorks Timer... Session OnWorks used."); localStorage.setItem("temporizadorx", 300) } ; var g = function() { c.getLocalClipboard().then(function(b) { a.$broadcast("guacClipboard", b) }) }; d.addEventListener("load", g, !0); d.addEventListener("copy", g); d.addEventListener("cut", g); d.addEventListener("focus", function(a) { a.target === d && g() }, !0); a.$on("guacInvalidCredentials", function(b, c, d) { a.page.title = "APP.NAME"; a.page.bodyClassName = ""; a.loginHelpText = null; a.acceptedCredentials = {}; a.expectedCredentials = d.expected }); a.$on("guacInsufficientCredentials", function(b, c, d) { a.page.title = "APP.NAME"; a.page.bodyClassName = ""; a.loginHelpText = d.translatableMessage; a.acceptedCredentials = c; a.expectedCredentials = d.expected }); a.$on("$routeChangeSuccess", function(b, c, d) { if (c.$$route) { a.loginHelpText = null; a.acceptedCredentials = null; a.expectedCredentials = null; if (b = c.$$route.title) a.page.title = b; a.page.bodyClassName = c.$$route.bodyClassName || "" } }) } ]); angular.module("index").config(["$httpProvider", function(a) { a.defaults.headers.patch = { "Content-Type": "application/json" } } ]); angular.module("index", "auth client clipboard home login manage navigation ngRoute ngTouch notification pascalprecht.translate rest settings templates-main".split(" ")); angular.module("index").config(["$routeProvider", "$locationProvider", function(a, b) { b.html5Mode(!1); var e = ["$injector", function(a) { var b = a.get("$location"); return a.get("authenticationService").updateCurrentToken(b.search()) } ]; b = ["$injector", function(a) { var b = a.get("$location") , d = a.get("$q") , g = a.get("userPageService") , h = d.defer(); a.invoke(e).then(function() { g.getHomePage().then(function(a) { b.path() === a.url ? h.resolve() : (b.path(a.url), h.reject()) })["catch"](function() { h.resolve() }) }); return h.promise } ]; a.when("/", { title: "APP.NAME", bodyClassName: "home", templateUrl: "app/home/templates/home.html", controller: "homeController", resolve: { routeToUserHomePage: b } }).when("/settings/:dataSource?/:tab", { title: "APP.NAME", bodyClassName: "settings", templateUrl: "app/settings/templates/settings.html", controller: "settingsController", resolve: { updateCurrentToken: e } }).when("/manage/:dataSource/connections/:id?", { title: "APP.NAME", bodyClassName: "manage", templateUrl: "app/manage/templates/manageConnection.html", controller: "manageConnectionController", resolve: { updateCurrentToken: e } }).when("/manage/:dataSource/sharingProfiles/:id?", { title: "APP.NAME", bodyClassName: "manage", templateUrl: "app/manage/templates/manageSharingProfile.html", controller: "manageSharingProfileController", resolve: { updateCurrentToken: e } }).when("/manage/:dataSource/connectionGroups/:id?", { title: "APP.NAME", bodyClassName: "manage", templateUrl: "app/manage/templates/manageConnectionGroup.html", controller: "manageConnectionGroupController", resolve: { updateCurrentToken: e } }).when("/manage/:dataSource/users/:id?", { title: "APP.NAME", bodyClassName: "manage", templateUrl: "app/manage/templates/manageUser.html", controller: "manageUserController", resolve: { updateCurrentToken: e } }).when("/client/:id/:params?", { bodyClassName: "client", templateUrl: "app/client/templates/client.html", controller: "clientController", resolve: { updateCurrentToken: e } }).otherwise({ resolve: { routeToUserHomePage: b } }) } ]); angular.module("index").config(["$injector", function(a) { var b = a.get("$translateProvider"); a = a.get("preferenceServiceProvider"); b.fallbackLanguage("en"); b.preferredLanguage(a.preferences.language); b.useSanitizeValueStrategy("escape"); b.useLoader("translationLoader"); b.useMessageFormatInterpolation() } ]); angular.module("list").factory("IPv4Network", [function() { var a = function(a, e) { var b = this; this.address = a; this.netmask = e; this.contains = function(a) { return b.address === (a.address & a.netmask & b.netmask) } }; a.parse = function(b) { b = /^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})(?:\/([0-9]{1,2}))?$/.exec(b); if (!b) return null; var e = 4294967295; if (b[5]) { var d = parseInt(b[5]); 0 < d && 32 >= d && (e = 4294967295 << 32 - d) } for (var d = 0, c = 1; 4 >= c; c++) { var f = parseInt(b[c]); if (255 < f) return null; d = d << 8 | f } return new a(d,e) } ; return a } ]); angular.module("list").factory("IPv6Network", [function() { var a = function(a, b) { var c = this; this.addressGroups = a; this.netmaskGroups = b; this.contains = function(a) { for (var b = 0; 8 > b; b++) if (c.addressGroups[b] !== (a.addressGroups[b] & a.netmaskGroups[b] & c.netmaskGroups[b])) return !1; return !0 } } , b = function(a) { var b = []; for (a = Math.min(128, a); 16 <= a; ) b.push(65535), a -= 16; for (0 < a && 16 >= a && b.push(65535 & 65535 << 16 - a); 8 > b.length; ) b.push(0); return b } , e = function(a) { var b = []; a = a.split(":"); angular.forEach(a, function(a) { a = parseInt(a || "0", 16); b.push(a) }); return b }; a.parse = function(d) { d = /^([0-9a-f]{0,4}(?::[0-9a-f]{0,4}){0,7})(?:\/([0-9]{1,3}))?$/.exec(d); if (!d) return null; var c = d[1]; d = (d = d[2]) ? b(parseInt(d)) : b(128); var f = c.indexOf("::"); if (-1 === f) c = e(c); else { for (var g = e(c.substring(0, f)), c = e(c.substring(f + 2)), f = 8 - g.length - c.length; 0 < f; ) g.push(0), f--; c = g.concat(c) } return 8 !== c.length ? null : new a(c,d) } ; return a } ]); angular.module("rest").factory("languageService", ["$injector", function(a) { var b = a.get("$http") , e = a.get("authenticationService") , d = a.get("cacheService"); return { getLanguages: function() { var a = { token: e.getCurrentToken() }; return b({ cache: d.languages, method: "GET", url: "api/languages", params: a }) } } } ]); angular.module("list", ["auth"]); angular.module("locale", []); angular.module("manage").directive("locationChooser", [function() { return { restrict: "E", replace: !0, scope: { dataSource: "\x3d", rootGroup: "\x3d", value: "\x3d" }, templateUrl: "app/manage/templates/locationChooser.html", controller: ["$scope", function(a) { var b = {} , e = function c(a) { b[a.identifier] = a; a.childConnectionGroups && a.childConnectionGroups.forEach(c) }; a.menuOpen = !1; a.chosenConnectionGroupName = null; a.toggleMenu = function() { a.menuOpen = !a.menuOpen } ; a.$watchGroup(["dataSource", "rootGroup"], function() { if (!a.dataSource || !a.rootGroup) return null; a.rootGroups = {}; a.rootGroups[a.dataSource] = a.rootGroup }); a.groupListContext = { chooseGroup: function(b) { a.value = b.identifier; a.chosenConnectionGroupName = b.name; a.menuOpen = !1 } }; a.$watch("rootGroup", function(c) { b = {}; c && (e(c), a.value && a.value in b || (a.value = c.identifier), a.chosenConnectionGroupName = b[a.value].name) }) } ] } } ]); angular.module("login").directive("guacLogin", [function() { return { restrict: "E", replace: !0, templateUrl: "app/login/templates/login.html", scope: { helpText: "\x3d", form: "\x3d", values: "\x3d" }, controller: ["$scope", "$injector", function(a, b) { var e = b.get("Error") , d = b.get("Field") , c = b.get("$route") , f = b.get("authenticationService"); a.loginError = null; a.enteredValues = {}; a.remainingFields = []; a.isContinuation = function() { for (var b in a.values) return !0; return !1 } ; a.$watch("values", function(b) { angular.extend(a.enteredValues, b || {}) }); a.$watch("form", function(b) { b ? (a.remainingFields = b.filter(function(b) { return !(b.name in a.values) }), angular.forEach(a.remainingFields, function(b) { a.enteredValues[b.name] || (a.enteredValues[b.name] = "") })) : a.remainingFields = [] }); a.login = function() { a.loginError = null; f.authenticate(a.enteredValues).then(function() { a.enteredValues = {}; c.reload() })["catch"](function(b) { b.type !== e.Type.INSUFFICIENT_CREDENTIALS && (a.loginError = b.type === e.Type.INVALID_CREDENTIALS ? { key: "LOGIN.ERROR_INVALID_LOGIN" } : b.translatableMessage, angular.forEach(a.remainingFields, function(b) { b.type === d.Type.PASSWORD && b.name in a.enteredValues && (a.enteredValues[b.name] = "") })) }) } } ] } } ]); angular.module("login", ["element", "form", "navigation"]); angular.module("manage").factory("ManageableUser", [function() { return function(a) { this.dataSource = a.dataSource; this.user = a.user } } ]); angular.module("manage").controller("manageConnectionController", ["$scope", "$injector", function(a, b) { var e = b.get("Connection") , d = b.get("ConnectionGroup") , c = b.get("HistoryEntryWrapper") , f = b.get("PermissionSet") , g = b.get("$location") , h = b.get("$routeParams") , k = b.get("$translate") , l = b.get("authenticationService") , n = b.get("guacNotification") , m = b.get("connectionService") , p = b.get("connectionGroupService") , q = b.get("permissionService") , t = b.get("schemaService") , u = b.get("translationStringService") , v = { name: "MANAGE_CONNECTION.ACTION_ACKNOWLEDGE", callback: function() { n.showStatus(!1) } }; a.selectedDataSource = h.dataSource; b = g.search().clone; var r = h.id; a.protocols = null; a.rootGroup = null; a.connection = null; a.parameters = null; a.historyDateFormat = null; a.historyEntryWrappers = null; a.canSaveConnection = null; a.canDeleteConnection = null; a.canCloneConnection = null; a.permissions = null; a.attributes = null; a.isLoaded = function() { return null !== a.protocols && null !== a.rootGroup && null !== a.connection && null !== a.parameters && null !== a.historyDateFormat && null !== a.historyEntryWrappers && null !== a.permissions && null !== a.attributes && null !== a.canSaveConnection && null !== a.canDeleteConnection && null !== a.canCloneConnection } ; t.getConnectionAttributes(a.selectedDataSource).success(function(b) { a.attributes = b }); p.getConnectionGroupTree(a.selectedDataSource, d.ROOT_IDENTIFIER, [f.ObjectPermissionType.ADMINISTER]).success(function(b) { a.rootGroup = b }); q.getPermissions(a.selectedDataSource, l.getCurrentUsername()).success(function(b) { a.permissions = b; a.canSaveConnection = !r || f.hasSystemPermission(b, f.SystemPermissionType.ADMINISTER) || f.hasConnectionPermission(b, f.ObjectPermissionType.UPDATE, r); a.canDeleteConnection = !!r && (f.hasSystemPermission(b, f.SystemPermissionType.ADMINISTER) || f.hasConnectionPermission(b, f.ObjectPermissionType.DELETE, r)); a.canCloneConnection = !!r && (f.hasSystemPermission(b, f.SystemPermissionType.ADMINISTER) || f.hasConnectionPermission(b, f.ObjectPermissionType.UPDATE, r) && f.hasSystemPermission(b, f.SystemPermissionType.CREATE_CONNECTION)) }); t.getProtocols(a.selectedDataSource).success(function(b) { a.protocols = b }); k("MANAGE_CONNECTION.FORMAT_HISTORY_START").then(function(b) { a.historyDateFormat = b }); r ? (m.getConnection(a.selectedDataSource, r).success(function(b) { a.connection = b }), m.getConnectionHistory(a.selectedDataSource, r).success(function(b) { a.historyEntryWrappers = []; b.forEach(function(b) { a.historyEntryWrappers.push(new c(b)) }) }), m.getConnectionParameters(a.selectedDataSource, r).success(function(b) { a.parameters = b })) : b ? (m.getConnection(a.selectedDataSource, b).success(function(b) { a.connection = b; delete a.connection.identifier }), a.historyEntryWrappers = [], m.getConnectionParameters(a.selectedDataSource, b).success(function(b) { a.parameters = b })) : (a.connection = new e({ protocol: "vnc", parentIdentifier: g.search().parent }), a.historyEntryWrappers = [], a.parameters = {}); a.canChangeAllAttributes = function() { return !r } ; a.getNamespace = function(a) { return a ? "PROTOCOL_" + u.canonicalize(a) : null } ; a.getProtocolName = function(b) { return a.getNamespace(b) + ".NAME" } ; a.cancel = function() { g.url("/settings/" + encodeURIComponent(a.selectedDataSource) + "/connections") } ; a.cloneConnection = function() { g.path("/manage/" + encodeURIComponent(a.selectedDataSource) + "/connections").search("clone", r) } ; a.saveConnection = function() { a.connection.parameters = a.parameters; m.saveConnection(a.selectedDataSource, a.connection).success(function() { g.url("/settings/" + encodeURIComponent(a.selectedDataSource) + "/connections") }).error(function(a) { n.showStatus({ className: "error", title: "MANAGE_CONNECTION.DIALOG_HEADER_ERROR", text: a.translatableMessage, actions: [v] }) }) } ; var w = { name: "MANAGE_CONNECTION.ACTION_DELETE", className: "danger", callback: function() { x(); n.showStatus(!1) } } , B = { name: "MANAGE_CONNECTION.ACTION_CANCEL", callback: function() { n.showStatus(!1) } } , x = function() { m.deleteConnection(a.selectedDataSource, a.connection).success(function() { g.path("/settings/" + encodeURIComponent(a.selectedDataSource) + "/connections") }).error(function(a) { n.showStatus({ className: "error", title: "MANAGE_CONNECTION.DIALOG_HEADER_ERROR", text: a.translatableMessage, actions: [v] }) }) }; a.deleteConnection = function() { n.showStatus({ title: "MANAGE_CONNECTION.DIALOG_HEADER_CONFIRM_DELETE", text: { key: "MANAGE_CONNECTION.TEXT_CONFIRM_DELETE" }, actions: [w, B] }) } } ]); angular.module("manage").controller("manageConnectionGroupController", ["$scope", "$injector", function(a, b) { var e = b.get("ConnectionGroup") , d = b.get("PermissionSet") , c = b.get("$location") , f = b.get("$routeParams") , g = b.get("authenticationService") , h = b.get("connectionGroupService") , k = b.get("guacNotification") , l = b.get("permissionService"); b = b.get("schemaService"); var n = { name: "MANAGE_CONNECTION_GROUP.ACTION_ACKNOWLEDGE", callback: function() { k.showStatus(!1) } }; a.selectedDataSource = f.dataSource; var m = f.id; a.rootGroup = null; a.connectionGroup = null; a.hasUpdatePermission = null; a.hasDeletePermission = null; a.permissions = null; a.attributes = null; a.isLoaded = function() { return null !== a.rootGroup && null !== a.connectionGroup && null !== a.permissions && null !== a.attributes && null !== a.canSaveConnectionGroup && null !== a.canDeleteConnectionGroup } ; b.getConnectionGroupAttributes(a.selectedDataSource).success(function(b) { a.attributes = b }); l.getPermissions(a.selectedDataSource, g.getCurrentUsername()).success(function(b) { a.permissions = b; a.canSaveConnectionGroup = !m || d.hasSystemPermission(b, d.SystemPermissionType.ADMINISTER) || d.hasConnectionGroupPermission(b, d.ObjectPermissionType.UPDATE, m); a.canDeleteConnectionGroup = !!m && (d.hasSystemPermission(b, d.SystemPermissionType.ADMINISTER) || d.hasConnectionGroupPermission(b, d.ObjectPermissionType.DELETE, m)) }); h.getConnectionGroupTree(a.selectedDataSource, e.ROOT_IDENTIFIER, [d.ObjectPermissionType.ADMINISTER]).success(function(b) { a.rootGroup = b }); m ? h.getConnectionGroup(a.selectedDataSource, m).success(function(b) { a.connectionGroup = b }) : a.connectionGroup = new e({ parentIdentifier: c.search().parent }); a.types = [{ label: "MANAGE_CONNECTION_GROUP.NAME_TYPE_ORGANIZATIONAL", value: e.Type.ORGANIZATIONAL }, { label: "MANAGE_CONNECTION_GROUP.NAME_TYPE_BALANCING", value: e.Type.BALANCING }]; a.canChangeAllAttributes = function() { return !m } ; a.cancel = function() { c.path("/settings/" + encodeURIComponent(a.selectedDataSource) + "/connections") } ; a.saveConnectionGroup = function() { h.saveConnectionGroup(a.selectedDataSource, a.connectionGroup).success(function() { c.path("/settings/" + encodeURIComponent(a.selectedDataSource) + "/connections") }).error(function(a) { k.showStatus({ className: "error", title: "MANAGE_CONNECTION_GROUP.DIALOG_HEADER_ERROR", text: a.translatableMessage, actions: [n] }) }) } ; var p = { name: "MANAGE_CONNECTION_GROUP.ACTION_DELETE", className: "danger", callback: function() { t(); k.showStatus(!1) } } , q = { name: "MANAGE_CONNECTION_GROUP.ACTION_CANCEL", callback: function() { k.showStatus(!1) } } , t = function() { h.deleteConnectionGroup(a.selectedDataSource, a.connectionGroup).success(function() { c.path("/settings/" + encodeURIComponent(a.selectedDataSource) + "/connections") }).error(function(a) { k.showStatus({ className: "error", title: "MANAGE_CONNECTION_GROUP.DIALOG_HEADER_ERROR", text: a.translatableMessage, actions: [n] }) }) }; a.deleteConnectionGroup = function() { k.showStatus({ title: "MANAGE_CONNECTION_GROUP.DIALOG_HEADER_CONFIRM_DELETE", text: { key: "MANAGE_CONNECTION_GROUP.TEXT_CONFIRM_DELETE" }, actions: [p, q] }) } } ]); angular.module("client").factory("ManagedClient", ["$rootScope", "$injector", function(a, b) { var e = b.get("ClientProperties") , d = b.get("ClientIdentifier") , c = b.get("ClipboardData") , f = b.get("ManagedClientState") , g = b.get("ManagedClientThumbnail") , h = b.get("ManagedDisplay") , k = b.get("ManagedFilesystem") , l = b.get("ManagedFileUpload") , n = b.get("ManagedShareLink") , m = b.get("$document") , p = b.get("$q"); a = b.get("$rootScope"); var q = b.get("$window") , t = b.get("authenticationService") , u = b.get("connectionGroupService") , v = b.get("connectionService") , r = b.get("tunnelService") , w = b.get("guacAudio") , B = b.get("guacHistory") , x = b.get("guacImage") , C = b.get("guacVideo") , y = function(a) { a = a || {}; this.id = a.id; this.client = a.client; this.tunnel = a.tunnel; this.managedDisplay = a.managedDisplay; this.name = a.name; this.title = a.title; this.thumbnail = a.thumbnail; this.clipboardData = a.clipboardData || new c({ type: "text/plain", data: "" }); this.uploads = a.uploads || []; this.filesystems = a.filesystems || []; this.shareLinks = a.shareLinks || {}; this.clientState = a.clientState || new f; this.clientProperties = a.clientProperties || new e }; y.AUDIO_INPUT_MIMETYPE = "audio/L16;rate\x3d44100,channels\x3d2"; var I = function(a, b) { var c = p.defer() , d = q.devicePixelRatio || 1 , f = 96 * d , e = q.innerWidth * d , d = q.innerHeight * d , g = "token\x3d" + encodeURIComponent(t.getCurrentToken()) + "\x26GUAC_DATA_SOURCE\x3d" + encodeURIComponent(a.dataSource) + "\x26GUAC_ID\x3d" + encodeURIComponent(a.id) + "\x26GUAC_TYPE\x3d" + encodeURIComponent(a.type) + "\x26GUAC_WIDTH\x3d" + Math.floor(e) + "\x26GUAC_HEIGHT\x3d" + Math.floor(d) + "\x26GUAC_DPI\x3d" + Math.floor(f) + (b ? "\x26" + b : ""); w.supported.forEach(function(a) { g += "\x26GUAC_AUDIO\x3d" + encodeURIComponent(a) }); C.supported.forEach(function(a) { g += "\x26GUAC_VIDEO\x3d" + encodeURIComponent(a) }); x.getSupportedMimetypes().then(function(a) { angular.forEach(a, function(a) { g += "\x26GUAC_IMAGE\x3d" + encodeURIComponent(a) }); c.resolve(g) }); return c.promise } , z = function H(a) { var b = a.createAudioStream(y.AUDIO_INPUT_MIMETYPE) , c = Guacamole.AudioRecorder.getInstance(b, y.AUDIO_INPUT_MIMETYPE); c ? c.onclose = H.bind(this, a) : b.sendEnd() }; y.getInstance = function(b, e) { var g; g = q.WebSocket ? new Guacamole.ChainedTunnel(new Guacamole.WebSocketTunnel("websocket-tunnel"),new Guacamole.HTTPTunnel("tunnel")) : new Guacamole.HTTPTunnel("tunnel"); var l = new Guacamole.Client(g) , m = new y({ id: b, client: l, tunnel: g }); g.onerror = function(b) { a.$apply(function() { f.setConnectionState(m.clientState, f.ConnectionState.TUNNEL_ERROR, b.code) }) } ; g.onstatechange = function(b) { a.$evalAsync(function() { switch (b) { case Guacamole.Tunnel.State.CONNECTING: f.setConnectionState(m.clientState, f.ConnectionState.CONNECTING); break; case Guacamole.Tunnel.State.CLOSED: f.setConnectionState(m.clientState, f.ConnectionState.DISCONNECTED) } }) } ; l.onstatechange = function(b) { a.$evalAsync(function() { switch (b) { case 0: f.setConnectionState(m.clientState, f.ConnectionState.IDLE); break; case 2: f.setConnectionState(m.clientState, f.ConnectionState.WAITING); break; case 3: f.setConnectionState(m.clientState, f.ConnectionState.CONNECTED); m.clipboardData && y.setClipboard(m, m.clipboardData); z(l); y.updateThumbnail(m); break; case 4: case 5: y.updateThumbnail(m) } }) } ; l.onerror = function(b) { a.$apply(function() { l.disconnect(); f.setConnectionState(m.clientState, f.ConnectionState.CLIENT_ERROR, b.code) }) } ; l.onsync = function() { var b = m.thumbnail , c = (new Date).getTime(); (!b || 5E3 <= c - b.timestamp) && a.$apply(function() { y.updateThumbnail(m) }) } ; l.onclipboard = function(b, d) { var f; if (/^text\//.exec(d)) { f = new Guacamole.StringReader(b); var e = ""; f.ontext = function(a) { e += a } ; f.onend = function() { a.$apply(function() { m.clipboardData = new c({ type: d, data: e }) }) } } else f = new Guacamole.BlobReader(b,d), f.onend = function() { a.$apply(function() { m.clipboardData = new c({ type: d, data: f.getBlob() }) }) } } ; l.onname = function(b) { a.$apply(function() { m.title = b }) } ; l.onfile = function(a, b, c) { r.downloadStream(g.uuid, a, b, c) } ; l.onfilesystem = function(b, c) { a.$apply(function() { m.filesystems.push(k.getInstance(b, c)) }) } ; m.managedDisplay = h.getInstance(l.getDisplay()); b = d.fromString(b); I(b, e).then(function(a) { l.connect(a) }); b.type === d.Types.CONNECTION ? v.getConnection(b.dataSource, b.id).success(function(a) { m.name = m.title = a.name }) : b.type === d.Types.CONNECTION_GROUP && u.getConnectionGroup(b.dataSource, b.id).success(function(a) { m.name = m.title = a.name }); return m } ; y.uploadFile = function(a, b, c, d) { var f = null , e = null; c && (f = c.object, e = (d || c.currentDirectory).streamName + "/" + b.name); a.uploads.push(l.getInstance(a, b, f, e)) } ; y.setClipboard = function(a, b) { var c; a = a.client.createClipboardStream(b.type); "string" === typeof b.data ? (c = new Guacamole.StringWriter(a), c.sendText(b.data), c.sendEnd()) : (c = new Guacamole.BlobWriter(a), c.oncomplete = function() { c.sendEnd() } , c.sendBlob(b.data)) } ; y.createShareLink = function(a, b) { var c = r.getSharingCredentials(a.tunnel.uuid, b.identifier); c.success(function(c) { a.shareLinks[b.identifier] = n.getInstance(b, c) }); return c } ; y.isShared = function(a) { for (var b in a.shareLinks) return !0; return !1 } ; y.updateThumbnail = function(a) { var b = a.client.getDisplay(); if (b && 0 < b.getWidth() && 0 < b.getHeight()) { var b = b.flatten() , c = Math.min(320 / b.width, 240 / b.height, 1) , d = m[0].createElement("canvas"); d.width = b.width * c; d.height = b.height * c; d.getContext("2d").drawImage(b, 0, 0, b.width, b.height, 0, 0, d.width, d.height); a.thumbnail = new g({ timestamp: (new Date).getTime(), canvas: d }); B.updateThumbnail(a.id, d.toDataURL("image/png")) } } ; return y } ]); angular.module("client").factory("ManagedClientState", [function() { var a = function e(a) { a = a || {}; this.connectionState = a.connectionState || e.ConnectionState.IDLE; this.statusCode = a.statusCode || Guacamole.Status.Code.SUCCESS }; a.ConnectionState = { IDLE: "IDLE", CONNECTING: "CONNECTING", WAITING: "WAITING", CONNECTED: "CONNECTED", DISCONNECTED: "DISCONNECTED", CLIENT_ERROR: "CLIENT_ERROR", TUNNEL_ERROR: "TUNNEL_ERROR" }; a.setConnectionState = function(e, d, c) { e.connectionState !== a.ConnectionState.TUNNEL_ERROR && e.connectionState !== a.ConnectionState.CLIENT_ERROR && (e.connectionState = d, c && (e.statusCode = c)) } ; return a } ]); angular.module("client").factory("ManagedClientThumbnail", [function() { return function(a) { a = a || {}; this.timestamp = a.timestamp; this.canvas = a.canvas } } ]); angular.module("client").factory("ManagedDisplay", ["$rootScope", function(a) { var b = function d(a) { a = a || {}; this.display = a.display; this.size = new d.Dimensions(a.size); this.cursor = a.cursor }; b.Dimensions = function(a) { a = a || {}; this.width = a.width || 0; this.height = a.height || 0 } ; b.Cursor = function(a) { a = a || {}; this.canvas = a.canvas; this.x = a.x; this.y = a.y } ; b.getInstance = function(d) { var c = new b({ display: d }); d.onresize = function() { a.$apply(function() { c.size = new b.Dimensions({ width: d.getWidth(), height: d.getHeight() }) }) } ; d.oncursor = function(d, g, h) { a.$apply(function() { c.cursor = new b.Cursor({ canvas: d, x: g, y: h }) }) } ; return c } ; return b } ]); angular.module("client").factory("ManagedFilesystem", ["$rootScope", "$injector", function(a, b) { var e = b.get("tunnelService") , d = function(a) { a = a || {}; this.object = a.object; this.name = a.name; this.root = a.root; this.currentDirectory = a.currentDirectory || a.root }; d.refresh = function(b, f) { f.mimetype === Guacamole.Object.STREAM_INDEX_MIMETYPE && b.object.requestInputStream(f.streamName, function(b, c) { if (c !== Guacamole.Object.STREAM_INDEX_MIMETYPE) b.sendAck("Unexpected mimetype", Guacamole.Status.Code.UNSUPPORTED); else { b.sendAck("Ready", Guacamole.Status.Code.SUCCESS); var e = new Guacamole.JSONReader(b); e.onprogress = function() { b.sendAck("Received", Guacamole.Status.Code.SUCCESS) } ; e.onend = function() { a.$evalAsync(function() { f.files = {}; var a = f.streamName; "/" !== a.charAt(a.length - 1) && (a += "/"); var b = e.getJSON(), c; for (c in b) if (c.substring(0, a.length) === a) { var g = c.substring(a.length) , h = d.File.Type.NORMAL; b[c] === Guacamole.Object.STREAM_INDEX_MIMETYPE && (h = d.File.Type.DIRECTORY); f.files[g] = new d.File({ mimetype: b[c], streamName: c, type: h, parent: f, name: g }) } }) } } }) } ; d.getInstance = function(a, b) { a = new d({ object: a, name: b, root: new d.File({ mimetype: Guacamole.Object.STREAM_INDEX_MIMETYPE, streamName: Guacamole.Object.ROOT_STREAM, type: d.File.Type.DIRECTORY }) }); d.refresh(a, a.root); return a } ; d.downloadFile = function(a, b, d) { b.object.requestInputStream(d, function(b, c) { var f = d.match(/(.*[\\/])?(.*)/)[2]; e.downloadStream(a.tunnel.uuid, b, c, f) }) } ; d.changeDirectory = function(a, b) { d.refresh(a, b); a.currentDirectory = b } ; d.File = function(a) { this.mimetype = a.mimetype; this.streamName = a.streamName; this.type = a.type; this.name = a.name; this.parent = a.parent; this.files = a.files || {} } ; d.File.Type = { NORMAL: "NORMAL", DIRECTORY: "DIRECTORY" }; return d } ]); angular.module("client").factory("ManagedFileTransferState", [function() { var a = function e(a) { a = a || {}; this.streamState = a.streamState || e.StreamState.IDLE; this.statusCode = a.statusCode || Guacamole.Status.Code.SUCCESS }; a.StreamState = { IDLE: "IDLE", OPEN: "OPEN", CLOSED: "CLOSED", ERROR: "ERROR" }; a.setStreamState = function(e, d, c) { e.streamState !== a.StreamState.ERROR && (e.streamState = d, c && (e.statusCode = c)) } ; return a } ]); angular.module("client").factory("ManagedFileUpload", ["$rootScope", "$injector", function(a, b) { var e = b.get("Error") , d = b.get("ManagedFileTransferState") , c = b.get("tunnelService") , f = function(a) { a = a || {}; this.transferState = a.transferState || new d; this.mimetype = a.mimetype; this.filename = a.filename; this.progress = a.progress; this.length = a.length }; f.getInstance = function(b, h, k, l) { var g = new f, m = b.client, p = b.tunnel, q; q = k ? k.createOutputStream(h.type, l) : m.createFileStream(h.type, h.name); a.$evalAsync(function() { g.filename = h.name; g.mimetype = h.type; g.progress = 0; g.length = h.size; d.setStreamState(g.transferState, d.StreamState.OPEN) }); q.onack = function(b) { b.isError() ? a.$apply(function() { d.setStreamState(g.transferState, d.StreamState.ERROR, b.code) }) : (c.uploadToStream(p.uuid, q, h, function(b) { a.$apply(function() { g.progress = b }) }).then(function() { g.progress = h.size; d.setStreamState(g.transferState, d.StreamState.CLOSED); a.$broadcast("guacUploadComplete", h.name) }, function(a) { a.type === e.Type.STREAM_ERROR ? d.setStreamState(g.transferState, d.StreamState.ERROR, a.statusCode) : d.setStreamState(g.transferState, d.StreamState.ERROR, Guacamole.Status.Code.INTERNAL_ERROR) }), q.onack = null) } ; return g } ; return f } ]); angular.module("client").factory("ManagedShareLink", ["$injector", function(a) { var b = a.get("UserCredentials") , e = function(a) { a = a || {}; this.name = a.name; this.href = a.href; this.sharingProfile = a.sharingProfile; this.sharingCredentials = a.sharingCredentials }; e.getInstance = function(a, c) { return new e({ name: a.name, href: b.getLink(c), sharingProfile: a, sharingCredentials: c }) } ; return e } ]); angular.module("manage", "form groupList list locale navigation notification rest".split(" ")); angular.module("manage").controller("manageSharingProfileController", ["$scope", "$injector", function(a, b) { var e = b.get("SharingProfile") , d = b.get("PermissionSet") , c = b.get("$location") , f = b.get("$routeParams") , g = b.get("authenticationService") , h = b.get("connectionService") , k = b.get("guacNotification") , l = b.get("permissionService") , n = b.get("schemaService") , m = b.get("sharingProfileService") , p = b.get("translationStringService") , q = { name: "MANAGE_SHARING_PROFILE.ACTION_ACKNOWLEDGE", callback: function() { k.showStatus(!1) } } , t = { name: "MANAGE_SHARING_PROFILE.ACTION_CANCEL", callback: function() { k.showStatus(!1) } }; a.selectedDataSource = f.dataSource; b = c.search().clone; var u = f.id; a.protocols = null; a.sharingProfile = null; a.parameters = null; a.canSaveSharingProfile = null; a.canDeleteSharingProfile = null; a.canCloneSharingProfile = null; a.permissions = null; a.attributes = null; a.isLoaded = function() { return null !== a.protocols && null !== a.sharingProfile && null !== a.primaryConnection && null !== a.parameters && null !== a.permissions && null !== a.attributes && null !== a.canSaveSharingProfile && null !== a.canDeleteSharingProfile && null !== a.canCloneSharingProfile } ; n.getSharingProfileAttributes(a.selectedDataSource).success(function(b) { a.attributes = b }); l.getPermissions(a.selectedDataSource, g.getCurrentUsername()).success(function(b) { a.permissions = b; a.canSaveSharingProfile = !u || d.hasSystemPermission(b, d.SystemPermissionType.ADMINISTER) || d.hasSharingProfilePermission(b, d.ObjectPermissionType.UPDATE, u); a.canDeleteSharingProfile = !!u && (d.hasSystemPermission(b, d.SystemPermissionType.ADMINISTER) || d.hasSharingProfilePermission(b, d.ObjectPermissionType.DELETE, u)); a.canCloneSharingProfile = !!u && (d.hasSystemPermission(b, d.SystemPermissionType.ADMINISTER) || d.hasSharingProfilePermission(b, d.ObjectPermissionType.UPDATE, u) && d.hasSystemPermission(b, d.SystemPermissionType.CREATE_SHARING_PROFILE)) }); n.getProtocols(a.selectedDataSource).success(function(b) { a.protocols = b }); u ? (m.getSharingProfile(a.selectedDataSource, u).success(function(b) { a.sharingProfile = b }), m.getSharingProfileParameters(a.selectedDataSource, u).success(function(b) { a.parameters = b })) : b ? (m.getSharingProfile(a.selectedDataSource, b).success(function(b) { a.sharingProfile = b; delete a.sharingProfile.identifier }), m.getSharingProfileParameters(a.selectedDataSource, b).success(function(b) { a.parameters = b })) : (a.sharingProfile = new e({ primaryConnectionIdentifier: c.search().parent }), a.parameters = {}); a.$watch("sharingProfile.primaryConnectionIdentifier", function(b) { h.getConnection(a.selectedDataSource, b).success(function(b) { a.primaryConnection = b }) }); a.canChangeAllAttributes = function() { return !u } ; a.getNamespace = function(a) { return a ? "PROTOCOL_" + p.canonicalize(a) : null } ; a.cancel = function() { c.url("/settings/" + encodeURIComponent(a.selectedDataSource) + "/connections") } ; a.cloneSharingProfile = function() { c.path("/manage/" + encodeURIComponent(a.selectedDataSource) + "/sharingProfiles").search("clone", u) } ; a.saveSharingProfile = function() { a.sharingProfile.parameters = a.parameters; m.saveSharingProfile(a.selectedDataSource, a.sharingProfile).success(function() { c.url("/settings/" + encodeURIComponent(a.selectedDataSource) + "/connections") }).error(function(a) { k.showStatus({ className: "error", title: "MANAGE_SHARING_PROFILE.DIALOG_HEADER_ERROR", text: a.translatableMessage, actions: [q] }) }) } ; var v = { name: "MANAGE_SHARING_PROFILE.ACTION_DELETE", className: "danger", callback: function() { r(); k.showStatus(!1) } } , r = function() { m.deleteSharingProfile(a.selectedDataSource, a.sharingProfile).success(function() { c.path("/settings/" + encodeURIComponent(a.selectedDataSource) + "/connections") }).error(function(a) { k.showStatus({ className: "error", title: "MANAGE_SHARING_PROFILE.DIALOG_HEADER_ERROR", text: a.translatableMessage, actions: [q] }) }) }; a.deleteSharingProfile = function() { k.showStatus({ title: "MANAGE_SHARING_PROFILE.DIALOG_HEADER_CONFIRM_DELETE", text: { key: "MANAGE_SHARING_PROFILE.TEXT_CONFIRM_DELETE" }, actions: [v, t] }) } } ]); angular.module("manage").controller("manageUserController", ["$scope", "$injector", function(a, b) { var e = b.get("ConnectionGroup") , d = b.get("GroupListItem") , c = b.get("PageDefinition") , f = b.get("PermissionFlagSet") , g = b.get("PermissionSet") , h = b.get("User") , k = b.get("$location") , l = b.get("$routeParams") , n = b.get("authenticationService") , m = b.get("connectionGroupService") , p = b.get("dataSourceService") , q = b.get("guacNotification") , t = b.get("permissionService") , u = b.get("schemaService") , v = b.get("translationStringService") , r = b.get("userService") , w = { name: "MANAGE_USER.ACTION_ACKNOWLEDGE", callback: function() { q.showStatus(!1) } } , B = n.getAvailableDataSources(); b = n.getCurrentUsername(); var x = l.dataSource , C = k.search().clone , y = l.id; a.selfUsername = ""; a.users = null; a.user = null; a.permissionFlags = null; a.rootGroups = null; a.filteredConnectionProperties = ["name", "protocol"]; a.filteredConnectionGroupProperties = ["name"]; a.permissions = null; a.attributes = null; a.accountPages = []; a.isLoaded = function() { return null !== a.users && null !== a.permissionFlags && null !== a.rootGroups && null !== a.permissions && null !== a.attributes } ; a.userExists = function(b) { if (!a.users) return !1; b = b || x; return b in a.users } ; a.canChangeAttributes = function(b) { if (!a.permissions) return !1; b = b || x; return !a.userExists(b) || g.hasSystemPermission(a.permissions[b], g.SystemPermissionType.ADMINISTER) ? !0 : g.hasUserPermission(a.permissions[b], g.ObjectPermissionType.UPDATE, y) } ; a.canChangeAllAttributes = function() { return !a.userExists(x) } ; a.canChangePermissions = function(b) { if (!a.permissions) return !1; b = b || x; return !a.userExists(b) || g.hasSystemPermission(a.permissions[b], g.SystemPermissionType.ADMINISTER) ? !0 : g.hasUserPermission(a.permissions[b], g.ObjectPermissionType.ADMINISTER, y) } ; a.canChangeSystemPermissions = function(b) { if (!a.permissions) return !1; b = b || x; return g.hasSystemPermission(a.permissions[b], g.SystemPermissionType.ADMINISTER) } ; a.canEditUsername = function(a) { return !y } ; a.canSaveUser = function(b) { if (!a.permissions) return !1; b = b || x; return g.hasSystemPermission(a.permissions[b], g.SystemPermissionType.ADMINISTER) ? !0 : a.userExists(b) ? g.hasUserPermission(a.permissions[b], g.ObjectPermissionType.UPDATE, y) : g.hasSystemPermission(a.permissions[b], g.SystemPermissionType.CREATE_USER) } ; a.canCloneUser = function(b) { if (!a.permissions) return !1; b = b || x; return a.userExists(x) ? g.hasSystemPermission(a.permissions[b], g.SystemPermissionType.ADMINISTER) ? !0 : g.hasSystemPermission(a.permissions[b], g.SystemPermissionType.CREATE_USER) : !1 } ; a.canDeleteUser = function(b) { if (!a.permissions) return !1; b = b || x; return a.userExists(b) ? g.hasSystemPermission(a.permissions[b], g.SystemPermissionType.ADMINISTER) ? !0 : g.hasUserPermission(a.permissions[b], g.ObjectPermissionType.DELETE, y) : !1 } ; a.isReadOnly = function(b) { b = b || x; return !a.canSaveUser(b) } ; a.$watchGroup(["users", "permissions"], function() { a.accountPages = []; angular.forEach(B, function(b) { var d = a.userExists(b) , e = a.isReadOnly(b); if (d || !e) C && b !== x || (d = e ? "read-only" : d ? "linked" : "unlinked", a.accountPages.push(new c({ name: v.canonicalize("DATA_SOURCE_" + b) + ".NAME", url: "/manage/" + encodeURIComponent(b) + "/users/" + encodeURIComponent(y || ""), className: d }))) }) }); u.getUserAttributes(x).success(function(b) { a.attributes = b }); y ? (p.apply(r.getUser, B, y).then(function(b) { a.users = b; a.user = b[x]; a.user || (a.user = new h({ username: y })) }), a.selfUsername = y, t.getPermissions(x, y).success(function(b) { a.permissionFlags = f.fromPermissionSet(b) }).error(function() { a.permissionFlags = new f })) : C ? (p.apply(r.getUser, B, C).then(function(b) { a.users = {}; a.user = b[x] }), a.selfUsername = C, t.getPermissions(x, C).success(function(b) { a.permissionFlags = f.fromPermissionSet(b); z = b }).error(function() { a.permissionFlags = new f })) : (a.users = {}, a.user = new h, a.permissionFlags = new f); var I = function E(a, b) { a.expandable && a.children && angular.forEach(a.children, function(c) { var e = !1; switch (c.type) { case d.Type.CONNECTION: e = b.connectionPermissions.READ[c.identifier]; break; case d.Type.CONNECTION_GROUP: e = b.connectionGroupPermissions.READ[c.identifier]; break; case d.Type.SHARING_PROFILE: e = b.sharingProfilePermissions.READ[c.identifier] } a.expanded |= E(c, b) || e }); return a.expanded }; p.apply(m.getConnectionGroupTree, [x], e.ROOT_IDENTIFIER, [g.ObjectPermissionType.ADMINISTER]).then(function(b) { a.rootGroups = {}; angular.forEach(b, function(b, c) { a.rootGroups[c] = d.fromConnectionGroup(c, b) }) }); p.apply(t.getPermissions, B, b).then(function(b) { a.permissions = b }); a.$watchGroup(["rootGroups", "permissionFlags"], function() { angular.forEach(a.rootGroups, function(b) { a.permissionFlags && I(b, a.permissionFlags) }) }); a.systemPermissionTypes = [{ label: "MANAGE_USER.FIELD_HEADER_ADMINISTER_SYSTEM", value: g.SystemPermissionType.ADMINISTER }, { label: "MANAGE_USER.FIELD_HEADER_CREATE_NEW_USERS", value: g.SystemPermissionType.CREATE_USER }, { label: "MANAGE_USER.FIELD_HEADER_CREATE_NEW_CONNECTIONS", value: g.SystemPermissionType.CREATE_CONNECTION }, { label: "MANAGE_USER.FIELD_HEADER_CREATE_NEW_CONNECTION_GROUPS", value: g.SystemPermissionType.CREATE_CONNECTION_GROUP }, { label: "MANAGE_USER.FIELD_HEADER_CREATE_NEW_SHARING_PROFILES", value: g.SystemPermissionType.CREATE_SHARING_PROFILE }]; var z = new g , A = new g; a.systemPermissionChanged = function(b) { a.permissionFlags.systemPermissions[b] ? g.hasSystemPermission(A, b) ? g.removeSystemPermission(A, b) : g.addSystemPermission(z, b) : g.hasSystemPermission(z, b) ? g.removeSystemPermission(z, b) : g.addSystemPermission(A, b) } ; a.userPermissionChanged = function(b, c) { a.permissionFlags.userPermissions[b][c] ? g.hasUserPermission(A, b, c) ? g.removeUserPermission(A, b, c) : g.addUserPermission(z, b, c) : g.hasUserPermission(z, b, c) ? g.removeUserPermission(z, b, c) : g.addUserPermission(A, b, c) } ; a.groupListContext = { getPermissionFlags: function() { return a.permissionFlags }, connectionPermissionChanged: function(b) { a.permissionFlags.connectionPermissions.READ[b] ? g.hasConnectionPermission(A, g.ObjectPermissionType.READ, b) ? g.removeConnectionPermission(A, g.ObjectPermissionType.READ, b) : g.addConnectionPermission(z, g.ObjectPermissionType.READ, b) : g.hasConnectionPermission(z, g.ObjectPermissionType.READ, b) ? g.removeConnectionPermission(z, g.ObjectPermissionType.READ, b) : g.addConnectionPermission(A, g.ObjectPermissionType.READ, b) }, connectionGroupPermissionChanged: function(b) { a.permissionFlags.connectionGroupPermissions.READ[b] ? g.hasConnectionGroupPermission(A, g.ObjectPermissionType.READ, b) ? g.removeConnectionGroupPermission(A, g.ObjectPermissionType.READ, b) : g.addConnectionGroupPermission(z, g.ObjectPermissionType.READ, b) : g.hasConnectionGroupPermission(z, g.ObjectPermissionType.READ, b) ? g.removeConnectionGroupPermission(z, g.ObjectPermissionType.READ, b) : g.addConnectionGroupPermission(A, g.ObjectPermissionType.READ, b) }, sharingProfilePermissionChanged: function(b) { a.permissionFlags.sharingProfilePermissions.READ[b] ? g.hasSharingProfilePermission(A, g.ObjectPermissionType.READ, b) ? g.removeSharingProfilePermission(A, g.ObjectPermissionType.READ, b) : g.addSharingProfilePermission(z, g.ObjectPermissionType.READ, b) : g.hasSharingProfilePermission(z, g.ObjectPermissionType.READ, b) ? g.removeSharingProfilePermission(z, g.ObjectPermissionType.READ, b) : g.addSharingProfilePermission(A, g.ObjectPermissionType.READ, b) } }; a.cancel = function() { k.url("/settings/users") } ; a.cloneUser = function() { k.path("/manage/" + encodeURIComponent(x) + "/users").search("clone", y) } ; a.saveUser = function() { a.passwordMatch !== a.user.password ? q.showStatus({ className: "error", title: "MANAGE_USER.DIALOG_HEADER_ERROR", text: { key: "MANAGE_USER.ERROR_PASSWORD_MISMATCH" }, actions: [w] }) : (a.userExists(x) ? r.saveUser(x, a.user) : r.createUser(x, a.user)).success(function() { a.selfUsername !== a.user.username && (z.userPermissions[a.selfUsername] && (z.userPermissions[a.user.username] = z.userPermissions[a.selfUsername], delete z.userPermissions[a.selfUsername]), A.userPermissions[a.selfUsername] && (A.userPermissions[a.user.username] = A.userPermissions[a.selfUsername], delete A.userPermissions[a.selfUsername])); t.patchPermissions(x, a.user.username, z, A).success(function() { k.url("/settings/users") }).error(function(a) { q.showStatus({ className: "error", title: "MANAGE_USER.DIALOG_HEADER_ERROR", text: a.translatableMessage, values: a.translationValues, actions: [w] }) }) }).error(function(a) { q.showStatus({ className: "error", title: "MANAGE_USER.DIALOG_HEADER_ERROR", text: a.translatableMessage, actions: [w] }) }) } ; var H = { name: "MANAGE_USER.ACTION_DELETE", className: "danger", callback: function() { G(); q.showStatus(!1) } } , J = { name: "MANAGE_USER.ACTION_CANCEL", callback: function() { q.showStatus(!1) } } , G = function() { r.deleteUser(x, a.user).success(function() { k.path("/settings/users") }).error(function(a) { q.showStatus({ className: "error", title: "MANAGE_USER.DIALOG_HEADER_ERROR", text: a.translatableMessage, actions: [w] }) }) }; a.deleteUser = function() { q.showStatus({ title: "MANAGE_USER.DIALOG_HEADER_CONFIRM_DELETE", text: { key: "MANAGE_USER.TEXT_CONFIRM_DELETE" }, actions: [H, J] }) } } ]); angular.module("element").factory("Marker", [function() { return function(a) { this.scrollIntoView = function() { a.scrollIntoView() } } } ]); angular.module("navigation").factory("MenuAction", [function() { return function(a, b, e) { this.className = e; this.name = a; this.callback = b } } ]); angular.module("navigation", ["auth", "form", "notification", "rest"]); angular.module("notification").factory("Notification", [function() { return function(a) { a = a || {}; this.className = a.className; this.title = a.title; this.text = a.text; this.actions = a.actions || []; this.progress = a.progress; this.countdown = a.countdown } } ]); angular.module("notification").factory("NotificationAction", [function() { return function(a, b, e) { this.className = e; this.name = a; this.callback = b } } ]); angular.module("notification").factory("NotificationCountdown", [function() { return function(a, b, e) { this.text = a; this.remaining = b; this.callback = e } } ]); angular.module("notification", ["storage"]); angular.module("notification").factory("NotificationProgress", [function() { return function(a, b, e, d) { this.text = a; this.value = b; this.unit = e; this.ratio = d } } ]); angular.module("form").controller("numberFieldController", ["$scope", function(a) { a.$watch("model", function(b) { a.typedValue = b ? Number(b) : null }); a.$watch("typedValue", function(b) { a.model = b || 0 === b ? b.toString() : "" }) } ]); angular.module("osk", []); angular.module("navigation").factory("PageDefinition", [function() { return function(a) { this.name = a.name; this.url = a.url; this.className = a.className || ""; this.weight = a.weight } } ]); angular.module("form").controller("passwordFieldController", ["$scope", function(a) { a.passwordInputType = "password"; a.getTogglePasswordHelpText = function() { return "password" === a.passwordInputType ? "FORM.HELP_SHOW_PASSWORD" : "FORM.HELP_HIDE_PASSWORD" } ; a.togglePassword = function() { a.passwordInputType = "password" === a.passwordInputType ? "text" : "password" } } ]); angular.module("rest").factory("patchService", ["$injector", function(a) { var b = a.get("$http") , e = a.get("authenticationService") , d = a.get("cacheService"); return { getPatches: function() { var a = { token: e.getCurrentToken() }; return b({ cache: d.patches, method: "GET", url: "api/patches", params: a }) } } } ]); angular.module("rest").factory("PermissionFlagSet", ["PermissionSet", function(a) { var b = function(a) { a = a || {}; this.systemPermissions = a.systemPermissions || {}; this.connectionPermissions = a.connectionPermissions || { READ: {}, UPDATE: {}, DELETE: {}, ADMINISTER: {} }; this.connectionGroupPermissions = a.connectionGroupPermissions || { READ: {}, UPDATE: {}, DELETE: {}, ADMINISTER: {} }; this.sharingProfilePermissions = a.sharingProfilePermissions || { READ: {}, UPDATE: {}, DELETE: {}, ADMINISTER: {} }; this.activeConnectionPermissions = a.activeConnectionPermissions || { READ: {}, UPDATE: {}, DELETE: {}, ADMINISTER: {} }; this.userPermissions = a.userPermissions || { READ: {}, UPDATE: {}, DELETE: {}, ADMINISTER: {} } } , e = function(a, b) { for (var c in a) a[c].forEach(function(a) { (b[a] = b[a] || {})[c] = !0 }) }; b.fromPermissionSet = function(a) { var c = new b; a.systemPermissions.forEach(function(a) { c.systemPermissions[a] = !0 }); e(a.connectionPermissions, c.connectionPermissions); e(a.connectionGroupPermissions, c.connectionGroupPermissions); e(a.sharingProfilePermissions, c.sharingProfilePermissions); e(a.activeConnectionPermissions, c.activeConnectionPermissions); e(a.userPermissions, c.userPermissions); return c } ; return b } ]); angular.module("rest").factory("PermissionPatch", [function() { var a = function(a) { a = a || {}; this.op = a.op; this.path = a.path; this.value = a.value }; a.Operation = { ADD: "add", REMOVE: "remove" }; return a } ]); angular.module("rest").factory("permissionService", ["$injector", function(a) { var b = a.get("$http"); a.get("$q"); var e = a.get("authenticationService") , d = a.get("cacheService") , c = a.get("PermissionPatch") , f = {} , g = function(a, b) { a = "api/session/data/" + encodeURIComponent(a); return b === e.getCurrentUsername() ? a + "/self/permissions" : a + "/users/" + encodeURIComponent(b) + "/permissions" }; f.getPermissions = function(a, c) { var f = { token: e.getCurrentToken() }; return b({ cache: d.users, method: "GET", url: g(a, c), params: f }) } ; f.addPermissions = function(a, b, c) { return f.patchPermissions(a, b, c, null) } ; f.removePermissions = function(a, b, c) { return f.patchPermissions(a, b, null, c) } ; var h = function(a, b, c, d) { for (var e in d) d[e].forEach(function(d) { a.push({ op: b, path: c + "/" + e, value: d }) }) } , k = function(a, b, c) { h(a, b, "/connectionPermissions", c.connectionPermissions); h(a, b, "/connectionGroupPermissions", c.connectionGroupPermissions); h(a, b, "/sharingProfilePermissions", c.sharingProfilePermissions); h(a, b, "/activeConnectionPermissions", c.activeConnectionPermissions); h(a, b, "/userPermissions", c.userPermissions); c.systemPermissions.forEach(function(c) { a.push({ op: b, path: "/systemPermissions", value: c }) }) }; f.patchPermissions = function(a, f, h, p) { var m = [] , l = { token: e.getCurrentToken() }; k(m, c.Operation.ADD, h); k(m, c.Operation.REMOVE, p); return b({ method: "PATCH", url: g(a, f), params: l, data: m }).success(function() { d.users.removeAll() }) } ; return f } ]); angular.module("rest").factory("PermissionSet", [function() { var a = function(a) { a = a || {}; this.connectionPermissions = a.connectionPermissions || {}; this.connectionGroupPermissions = a.connectionGroupPermissions || {}; this.sharingProfilePermissions = a.sharingProfilePermissions || {}; this.activeConnectionPermissions = a.activeConnectionPermissions || {}; this.userPermissions = a.userPermissions || {}; this.systemPermissions = a.systemPermissions || [] }; a.ObjectPermissionType = { READ: "READ", UPDATE: "UPDATE", DELETE: "DELETE", ADMINISTER: "ADMINISTER" }; a.SystemPermissionType = { ADMINISTER: "ADMINISTER", CREATE_USER: "CREATE_USER", CREATE_CONNECTION: "CREATE_CONNECTION", CREATE_CONNECTION_GROUP: "CREATE_CONNECTION_GROUP", CREATE_SHARING_PROFILE: "CREATE_SHARING_PROFILE" }; var b = function(a, b, d) { if (!a) return !1; if (!d) { a: { for (var c in a) if (-1 !== a[c].indexOf(b)) { a = !0; break a } a = !1 } return a } return d in a ? -1 !== a[d].indexOf(b) : !1 }; a.hasConnectionPermission = function(a, d, e) { return b(a.connectionPermissions, d, e) } ; a.hasConnectionGroupPermission = function(a, d, e) { return b(a.connectionGroupPermissions, d, e) } ; a.hasSharingProfilePermission = function(a, d, e) { return b(a.sharingProfilePermissions, d, e) } ; a.hasActiveConnectionPermission = function(a, d, e) { return b(a.activeConnectionPermissions, d, e) } ; a.hasUserPermission = function(a, d, e) { return b(a.userPermissions, d, e) } ; a.hasSystemPermission = function(a, b) { return a.systemPermissions ? -1 !== a.systemPermissions.indexOf(b) : !1 } ; a.addSystemPermission = function(a, b) { a.systemPermissions = a.systemPermissions || []; return -1 === a.systemPermissions.indexOf(b) ? (a.systemPermissions.push(b), !0) : !1 } ; a.removeSystemPermission = function(a, b) { a.systemPermissions = a.systemPermissions || []; b = a.systemPermissions.indexOf(b); return -1 !== b ? (a.systemPermissions.splice(b, 1), !0) : !1 } ; var e = function(a, b, d) { a = a[d] = a[d] || []; return -1 === a.indexOf(b) ? (a.push(b), !0) : !1 } , d = function(a, b, d) { var c = a[d]; if (!(d in a)) return !1; a = c.indexOf(b); return -1 !== a ? (c.splice(a, 1), !0) : !1 }; a.addConnectionPermission = function(a, b, d) { a.connectionPermissions = a.connectionPermissions || {}; return e(a.connectionPermissions, b, d) } ; a.removeConnectionPermission = function(a, b, e) { a.connectionPermissions = a.connectionPermissions || {}; return d(a.connectionPermissions, b, e) } ; a.addConnectionGroupPermission = function(a, b, d) { a.connectionGroupPermissions = a.connectionGroupPermissions || {}; return e(a.connectionGroupPermissions, b, d) } ; a.removeConnectionGroupPermission = function(a, b, e) { a.connectionGroupPermissions = a.connectionGroupPermissions || {}; return d(a.connectionGroupPermissions, b, e) } ; a.addSharingProfilePermission = function(a, b, d) { a.sharingProfilePermissions = a.sharingProfilePermissions || {}; return e(a.sharingProfilePermissions, b, d) } ; a.removeSharingProfilePermission = function(a, b, e) { a.sharingProfilePermissions = a.sharingProfilePermissions || {}; return d(a.sharingProfilePermissions, b, e) } ; a.addActiveConnectionPermission = function(a, b, d) { a.activeConnectionPermissions = a.activeConnectionPermissions || {}; return e(a.activeConnectionPermissions, b, d) } ; a.removeActiveConnectionPermission = function(a, b, e) { a.activeConnectionPermissions = a.activeConnectionPermissions || {}; return d(a.activeConnectionPermissions, b, e) } ; a.addUserPermission = function(a, b, d) { a.userPermissions = a.userPermissions || {}; return e(a.userPermissions, b, d) } ; a.removeUserPermission = function(a, b, e) { a.userPermissions = a.userPermissions || {}; return d(a.userPermissions, b, e) } ; return a } ]); angular.module("settings").provider("preferenceService", function() { var a = this , b = { NONE: "none", OSK: "osk", TEXT: "text" }; this.preferences = { emulateAbsoluteMouse: !0, inputMethod: b.NONE, language: (navigator.languages && navigator.languages[0] || navigator.language || navigator.browserLanguage || "en").replace(/-/g, "_") }; try { if (localStorage) { var e = localStorage.getItem("GUAC_PREFERENCES"); e && angular.extend(a.preferences, JSON.parse(e)) } } catch (d) {} this.$get = ["$injector", function(d) { var c = d.get("$rootScope"); d = d.get("$window"); var e = {}; e.inputMethods = b; e.preferences = a.preferences; e.save = function() { try { localStorage && localStorage.setItem("GUAC_PREFERENCES", JSON.stringify(e.preferences)) } catch (g) {} } ; d.addEventListener("unload", e.save); c.$on("$routeChangeSuccess", function() { e.save() }); c.$on("guacLogout", function() { e.save() }); return e } ] }); angular.module("rest").factory("Protocol", [function() { return function(a) { a = a || {}; this.name = a.name; this.connectionForms = a.connectionForms || []; this.sharingProfileForms = a.sharingProfileForms || [] } } ]); angular.module("home").factory("RecentConnection", [function() { return function(a, b) { this.name = a; this.entry = b } } ]); angular.module("rest", ["auth"]); angular.module("rest").factory("schemaService", ["$injector", function(a) { var b = a.get("$http") , e = a.get("authenticationService") , d = a.get("cacheService"); return { getUserAttributes: function(a) { var c = { token: e.getCurrentToken() }; return b({ cache: d.schema, method: "GET", url: "api/session/data/" + encodeURIComponent(a) + "/schema/userAttributes", params: c }) }, getConnectionAttributes: function(a) { var c = { token: e.getCurrentToken() }; return b({ cache: d.schema, method: "GET", url: "api/session/data/" + encodeURIComponent(a) + "/schema/connectionAttributes", params: c }) }, getSharingProfileAttributes: function(a) { var c = { token: e.getCurrentToken() }; return b({ cache: d.schema, method: "GET", url: "api/session/data/" + encodeURIComponent(a) + "/schema/sharingProfileAttributes", params: c }) }, getConnectionGroupAttributes: function(a) { var c = { token: e.getCurrentToken() }; return b({ cache: d.schema, method: "GET", url: "api/session/data/" + encodeURIComponent(a) + "/schema/connectionGroupAttributes", params: c }) }, getProtocols: function(a) { var c = { token: e.getCurrentToken() }; return b({ cache: d.schema, method: "GET", url: "api/session/data/" + encodeURIComponent(a) + "/schema/protocols", params: c }) } } } ]); angular.module("element").factory("ScrollState", [function() { return function(a) { a = a || {}; this.left = a.left || 0; this.top = a.top || 0 } } ]); angular.module("form").controller("selectFieldController", ["$scope", "$injector", function(a, b) { var e = b.get("translationStringService"); a.$watch("model", function(b) { b || "" === b || (a.model = "") }); a.getFieldOption = function(b) { return a.field && a.field.name && b ? e.canonicalize(a.namespace || "MISSING_NAMESPACE") + ".FIELD_OPTION_" + e.canonicalize(a.field.name) + "_" + e.canonicalize(b || "EMPTY") : "" } } ]); angular.module("storage").factory("sessionStorageFactory", ["$injector", function(a) { var b = a.get("$rootScope") , e = a.get("authenticationService"); return { create: function(a, c) { var d = !!e.getCurrentToken(), g; g = "function" === typeof a ? a : function() { return angular.copy(a) } ; var h = void 0; b.$on("guacLogin", function() { d = !0; h = void 0 }); b.$on("guacLogout", function() { angular.isDefined(h) && c && c(h); d = !1; h = void 0 }); return function(a) { return d ? (angular.isDefined(a) && (h = a), angular.isDefined(h) || (h = g()), h) : angular.isDefined(a) ? a : g() } } } } ]); angular.module("manage").controller("settingsController", ["$scope", "$injector", function(a, b) { var e = b.get("$routeParams"); b = b.get("userPageService"); a.settingsPages = null; a.activeTab = e.tab; b.getSettingsPages().then(function(b) { a.settingsPages = b }) } ]); angular.module("settings", ["groupList", "list", "navigation", "notification", "rest"]); angular.module("rest").factory("SharingProfile", [function() { return function(a) { a = a || {}; this.identifier = a.identifier; this.primaryConnectionIdentifier = a.primaryConnectionIdentifier; this.name = a.name; this.parameters = a.parameters; this.attributes = {} } } ]); angular.module("rest").factory("sharingProfileService", ["$injector", function(a) { var b = a.get("$http") , e = a.get("authenticationService") , d = a.get("cacheService"); return { getSharingProfile: function(a, f) { var c = { token: e.getCurrentToken() }; return b({ cache: d.connections, method: "GET", url: "api/session/data/" + encodeURIComponent(a) + "/sharingProfiles/" + encodeURIComponent(f), params: c }) }, getSharingProfileParameters: function(a, f) { var c = { token: e.getCurrentToken() }; return b({ cache: d.connections, method: "GET", url: "api/session/data/" + encodeURIComponent(a) + "/sharingProfiles/" + encodeURIComponent(f) + "/parameters", params: c }) }, saveSharingProfile: function(a, f) { var c = { token: e.getCurrentToken() }; return f.identifier ? b({ method: "PUT", url: "api/session/data/" + encodeURIComponent(a) + "/sharingProfiles/" + encodeURIComponent(f.identifier), params: c, data: f }).success(function() { d.connections.removeAll(); d.users.removeAll() }) : b({ method: "POST", url: "api/session/data/" + encodeURIComponent(a) + "/sharingProfiles", params: c, data: f }).success(function(a) { f.identifier = a.identifier; d.connections.removeAll(); d.users.removeAll() }) }, deleteSharingProfile: function(a, f) { var c = { token: e.getCurrentToken() }; return b({ method: "DELETE", url: "api/session/data/" + encodeURIComponent(a) + "/sharingProfiles/" + encodeURIComponent(f.identifier), params: c }).success(function() { d.connections.removeAll() }) } } } ]); angular.module("list").factory("SortOrder", [function() { return function(a) { var b = this; this.predicate = a; this.primary = a[0]; this.descending = !1; "-" === this.primary.charAt(0) && (this.primary = this.primary.substring(1), this.descending = !0); this.reorder = function(a, d) { var c = "-" + a; b.predicate = b.predicate.filter(function(b) { return b !== a && b !== c }); d ? b.predicate.unshift(c) : b.predicate.unshift(a); b.primary = a; b.descending = !!d } ; this.isSortedBy = function(a) { return b.primary === a } ; this.togglePrimary = function(a) { b.isSortedBy(a) ? b.reorder(a, !b.descending) : b.reorder(a, !1) } } } ]); angular.module("storage", ["auth"]); angular.module("index").config(["$provide", function(a) { var b = {}; a.decorator("$templateCache", ["$delegate", function(a) { var d = angular.extend({}, a); d.put = function(c) { delete b[c]; return a.put.apply(this, arguments) } ; return d } ]); a.decorator("$templateRequest", ["$delegate", "$injector", function(a, d) { var c = d.get("$q") , e = d.get("patchService") , g = function l(a, b) { this.apply = function(c, d) { l.Operations[a](c, b, d) } }; g.Operations = { before: function(a, b, c) { a.find(b).before(c) }, after: function(a, b, c) { a.find(b).after(c) }, replace: function(a, b, c) { a.find(b).replaceWith(c) }, "before-children": function(a, b, c) { a.find(b).prepend(c) }, "after-children": function(a, b, c) { a.find(b).append(c) }, "replace-children": function(a, b, c) { a.find(b).empty().append(c) } }; var h = function(a, b) { angular.forEach(b, function(b) { var c = $(b) , d = [] , c = c.filter(function(a, b) { if ("META" !== b.tagName) return !0; a = b.getAttribute("name"); if (!(a && a in g.Operations)) return !0; b = b.getAttribute("content"); if (!b) return !0; d.push(new g(a,b)); return !1 }); angular.forEach(d, function(b) { b.apply(a, c) }) }) }; return function(d) { var f = c.defer() , g = b[d]; if (g) return g.then(f.resolve, f.reject), f.promise; a.apply(this, arguments).then(function(a) { e.getPatches().success(function(b) { var c = $("\x3cdiv\x3e\x3c/div\x3e").html(a); h(c, b); f.resolve.call(this, c.html()) }, f.reject) }, f.reject); return b[d] = f.promise } } ]) } ]); angular.module("templates-main", "app/client/templates/client.html app/client/templates/file.html app/client/templates/guacClient.html app/client/templates/guacFileBrowser.html app/client/templates/guacFileTransfer.html app/client/templates/guacFileTransferManager.html app/client/templates/guacThumbnail.html app/client/templates/guacViewport.html app/clipboard/templates/guacClipboard.html app/element/templates/blank.html app/form/templates/checkboxField.html app/form/templates/dateField.html app/form/templates/emailField.html app/form/templates/form.html app/form/templates/formField.html app/form/templates/numberField.html app/form/templates/passwordField.html app/form/templates/selectField.html app/form/templates/textAreaField.html app/form/templates/textField.html app/form/templates/timeField.html app/form/templates/timeZoneField.html app/groupList/templates/guacGroupList.html app/groupList/templates/guacGroupListFilter.html app/home/templates/connection.html app/home/templates/connectionGroup.html app/home/templates/guacRecentConnections.html app/home/templates/home.html app/list/templates/guacFilter.html app/list/templates/guacPager.html app/list/templates/guacUserItem.html app/login/templates/login.html app/manage/templates/connectionGroupPermission.html app/manage/templates/connectionPermission.html app/manage/templates/locationChooser.html app/manage/templates/locationChooserConnectionGroup.html app/manage/templates/manageConnection.html app/manage/templates/manageConnectionGroup.html app/manage/templates/manageSharingProfile.html app/manage/templates/manageUser.html app/manage/templates/sharingProfilePermission.html app/navigation/templates/guacMenu.html app/navigation/templates/guacPageList.html app/navigation/templates/guacUserMenu.html app/notification/templates/guacNotification.html app/osk/templates/guacOsk.html app/settings/templates/connection.html app/settings/templates/connectionGroup.html app/settings/templates/newConnection.html app/settings/templates/newConnectionGroup.html app/settings/templates/newSharingProfile.html app/settings/templates/settings.html app/settings/templates/settingsConnectionHistory.html app/settings/templates/settingsConnections.html app/settings/templates/settingsPreferences.html app/settings/templates/settingsSessions.html app/settings/templates/settingsUsers.html app/settings/templates/sharingProfile.html app/textInput/templates/guacKey.html app/textInput/templates/guacTextInput.html".split(" ")); angular.module("app/client/templates/client.html", []).run(["$templateCache", function(a) { a.put("app/client/templates/client.html", '\n\x3cguac-viewport\x3e\n\n \x3c!-- Client view --\x3e\n \x3cdiv class\x3d"client-view"\x3e\n \x3cdiv class\x3d"client-view-content"\x3e\n\n \x3c!-- Central portion of view --\x3e\n \x3cdiv class\x3d"client-body" guac-touch-drag\x3d"clientDrag" guac-touch-pinch\x3d"clientPinch"\x3e\n\n \x3c!-- Client --\x3e\n \x3cguac-client client\x3d"client"\x3e\x3c/guac-client\x3e\n\n \x3c/div\x3e\n\n \x3c!-- Bottom portion of view --\x3e\n \x3cdiv class\x3d"client-bottom"\x3e\n\n \x3c!-- Text input --\x3e\n \x3cdiv class\x3d"text-input-container" ng-show\x3d"showTextInput"\x3e\n \x3cguac-text-input needs-focus\x3d"showTextInput"\x3e\x3c/guac-text-input\x3e\n \x3c/div\x3e\n\n \x3c!-- On-screen keyboard --\x3e\n \x3cdiv class\x3d"keyboard-container" ng-show\x3d"showOSK"\x3e\n \x3cguac-osk layout\x3d"\'CLIENT.URL_OSK_LAYOUT\' | translate"\x3e\x3c/guac-osk\x3e\n \x3c/div\x3e\n\n \x3c/div\x3e\n\n \x3c/div\x3e\n \x3c/div\x3e\n\n \x3c!-- File transfers --\x3e\n \x3cdiv id\x3d"file-transfer-dialog" ng-show\x3d"hasTransfers()"\x3e\n \x3cguac-file-transfer-manager client\x3d"client"\x3e\x3c/guac-file-transfer-manager\x3e\n \x3c/div\x3e\n\n\n \x3c!-- AdRight ONWORKS--\x3e\n \x3cdiv id\x3d"adxx1" style\x3d"overflow: visible; position: absolute; top: 0px; padding-top: 0px; right: 0; height: 200px; max-width: 200px; width: 200px; z-index: 10; background: #000000;"\x3e\n\t\x3ciframe data-id\x3d"onworks.net_200x200_1_DFP" FRAMEBORDER\x3d"0" SCROLLING\x3d"no" MARGINHEIGHT\x3d"0"\n MARGINWIDTH\x3d"0" TOPMARGIN\x3d"0" LEFTMARGIN\x3d"0" width\x3d"1" height\x3d"1"\x3e\x3c/iframe\x3e\n \x3c/div\x3e\n \x3cdiv id\x3d"adxx" style\x3d"overflow: visible; position: absolute; top: 338px; padding-top: 0px; right: 0; height: 100%; max-width: 100%; width: 160px; z-index: 10; background: #000000;"\x3e\n\t\x3ciframe data-id\x3d"onworks.net_160x600_3_DFP" FRAMEBORDER\x3d"0" SCROLLING\x3d"no" MARGINHEIGHT\x3d"0"\n MARGINWIDTH\x3d"0" TOPMARGIN\x3d"0" LEFTMARGIN\x3d"0" width\x3d"1" height\x3d"1"\x3e\x3c/iframe\x3e\n \x3c/div\x3e\n \x3c!-- AdLeft ONWORKS--\x3e\n \x3cdiv id\x3d"adzz1" style\x3d"overflow: visible; position: absolute; top: 0px; padding-top: 0px; left: 0; height: 200px; max-width: 200px; width: 200px; z-index: 10; background: #000000;"\x3e\n\t\x3ciframe data-id\x3d"onworks.net_200x200_2_DFP" FRAMEBORDER\x3d"0" SCROLLING\x3d"no" MARGINHEIGHT\x3d"0"\n MARGINWIDTH\x3d"0" TOPMARGIN\x3d"0" LEFTMARGIN\x3d"0" width\x3d"1" height\x3d"1"\x3e\x3c/iframe\x3e\n \x3c/div\x3e\n \x3cdiv id\x3d"adzz" style\x3d"overflow: visible; position: absolute; top: 338px; padding-top: 0px; left: 0; height: 100%; max-width: 100%; width: 160px; z-index: 10; background: #000000;"\x3e\n\t\x3ciframe data-id\x3d"onworks.net_160x600_4_DFP" FRAMEBORDER\x3d"0" SCROLLING\x3d"no" MARGINHEIGHT\x3d"0"\n MARGINWIDTH\x3d"0" TOPMARGIN\x3d"0" LEFTMARGIN\x3d"0" width\x3d"1" height\x3d"1"\x3e\x3c/iframe\x3e\n \x3c/div\x3e\n\n\n \x3cdiv id\x3d"parenthomexx" style\x3d"display: none; background: #eeeeee;width: 180px; z-index:9000; height: 138px;position: fixed;top: 200px;right: 0px;text-align: center;border-color: #000 !important;border-width: 1px !important;border-style: solid;/* box-shadow: 5px 10px #888888; */"\x3e\x3cdiv class\x3d"menu-section ng-scope" id\x3d"homexx" style\x3d"text-align: center !important; "\x3e\n \x3ca style\x3d"text-decoration:none;display: block;width: 130px;height: 30px;background: #4E9CAF;padding: 5px;text-align: center;color: white;margin: 10px 30px 10px 25px;font-weight: bold;" href\x3d"https://www.onworks.net/removeads.php"\x3eRemove Ads\x3c/a\x3e\n\t\x3ca style\x3d"text-decoration:none;display: block;width: 130px;height: 30px;background: #4E9CAF;padding: 5px;text-align: center;color: white;margin: 10px 30px 10px 25px;font-weight: bold;" href\x3d"javascript:void(0)" onclick\x3d"opendir();"\x3eLoad my files\x3c/a\x3e\n\t\x3ca style\x3d"text-decoration:none;display: block;width: 130px;height: 30px;background: #4E9CAF;padding: 5px;text-align: center;color: white;margin: 10px 30px 10px 25px;font-weight: bold;" href\x3d"javascript:void(0)" onclick\x3d"savedir();"\x3eSave my files\x3c/a\x3e\n\n \x3c/div\x3e\x3c/div\x3e\n\n\x3cscript\x3e\n\nfunction opendir()\n{\n\t\tvar divyy1 \x3d document.createElement("div");\n divyy1.style.position \x3d "fixed";\n divyy1.style.display \x3d "block";\n divyy1.style.width \x3d "40%";\n divyy1.style.top \x3d "80%";\n divyy1.style.left \x3d "30%";\n divyy1.style.right \x3d "30%";\n divyy1.style.background \x3d "#4E9CAF";\n divyy1.style.color \x3d "white";\n divyy1.style.textAlign \x3d "center";\n divyy1.style.zIndex \x3d "99000";\n divyy1.style.cursor \x3d "pointer";\n document.body.appendChild(divyy1);\n\n var hh1yy1 \x3d document.createElement("p");\n hh1yy1.style.color \x3d "white";\n\t\thh1yy1.innerHTML \x3d "To load your files, click in \'Open Session\' or inside this session goto https://www.onworks.net/myfiles.php?username\x3d" + localStorage.getItem("namexxx") + " and click \'Import Home\'";\n setTimeout(function(){\n divyy1.appendChild(hh1yy1);\n }, 10);\n\n setTimeout(function(){\n divyy1.style.display \x3d "none";\n }, 8000);\n}\n\nfunction savedir()\n{\n\t\tvar divyy1 \x3d document.createElement("div");\n divyy1.style.position \x3d "fixed";\n divyy1.style.display \x3d "block";\n divyy1.style.width \x3d "40%";\n divyy1.style.top \x3d "80%";\n divyy1.style.left \x3d "30%";\n divyy1.style.right \x3d "30%";\n divyy1.style.background \x3d "#4E9CAF";\n divyy1.style.color \x3d "white";\n divyy1.style.textAlign \x3d "center";\n divyy1.style.zIndex \x3d "99000";\n divyy1.style.cursor \x3d "pointer";\n document.body.appendChild(divyy1);\n\n var hh1yy1 \x3d document.createElement("p");\n hh1yy1.style.color \x3d "white";\n\t\thh1yy1.innerHTML \x3d "To save your files, click in \'Save Session\' or inside this session goto https://www.onworks.net/myfiles.php?username\x3d" + localStorage.getItem("namexxx") + " and click \'Export Home\'";\n setTimeout(function(){\n divyy1.appendChild(hh1yy1);\n }, 10);\n\n setTimeout(function(){\n divyy1.style.display \x3d "none";\n }, 8000);\n\n}\n\n\n\n\x3c/script\x3e\n\n\n\x3cdiv id\x3d"adyy" style\x3d"display: none; position: fixed; overflow: hidden; top: 0px; min-width: 100%; background: #000000; margin: 0px auto; text-align: center; height: 90px;"\x3e\n\t\x3ciframe data-id\x3d"onworks.net_970x90_7_DFP" FRAMEBORDER\x3d"0" SCROLLING\x3d"no" MARGINHEIGHT\x3d"0"\n MARGINWIDTH\x3d"0" TOPMARGIN\x3d"0" LEFTMARGIN\x3d"0" width\x3d"1" height\x3d"1"\x3e\x3c/iframe\x3e\n\x3c/div\x3e\n\n\x3cdiv id\x3d"gpt-passback-stpd-stick"\x3e\n\x3c/div\x3e\n\n \x3c!-- Menu --\x3e\n \x3cdiv class\x3d"menu ng-scope open" ng-class\x3d"{open: menu.shown}" id\x3d"guac-menu" style\x3d"display: none; overflow: hidden; max-width: 180px; max-height: 138px; position: fixed; top: 200px; margin: 2px 2x 2px 2px; left: 0; "\x3e\n\t\x3cdiv class\x3d"menu-content" style\x3d"max-width: 180px; "\x3e\n\n \x3c!-- Stationary header --\x3e\n \x3cdiv class\x3d"header" style\x3d"display: none;" \x3e\n \x3ch2 style\x3d"display: none;" \x3e{{client.name}}\x3c/h2\x3e\n \x3c!--\x3cdiv class\x3d"share-menu" ng-show\x3d"canShareConnection()"\x3e\n \x3cguac-menu menu-title\x3d"\'CLIENT.ACTION_SHARE\' | translate"\x3e\n \x3cul ng-repeat\x3d"sharingProfile in sharingProfiles"\x3e\n \x3cli\x3e\x3ca ng-click\x3d"share(sharingProfile)"\x3e{{sharingProfile.name}}\x3c/a\x3e\x3c/li\x3e\n \x3c/ul\x3e\n \x3c/guac-menu\x3e\n \x3c/div\x3e\n \x3cguac-user-menu local-actions\x3d"clientMenuActions"\x3e\x3c/guac-user-menu\x3e --\x3e\n \x3c/div\x3e\n\n \x3cdiv class\x3d"menu-section" id\x3d"filemanager" style\x3d"margin-left: 30px; margin-top: 20px; margin-bottom: 20px; display: none;"\x3e\n \x3c/div\x3e\n\n\t\t\x3cbutton style\x3d"display: none; position: fixed; margin-left: 0px; z-index: 10; bottom: 0px; right: 0; display: block; background: #ccc; color: #000;" type\x3d"button" id\x3d"settingxmobile" onclick\x3d"abrirsettings();"\x3eMenu \x3c/button\x3e\n\n\n \x3c!-- Scrollable body --\x3e\n \x3cdiv class\x3d"menu-body" guac-touch-drag\x3d"menuDrag" guac-scroll\x3d"menu.scrollState" style\x3d"max-width: 210px; "\x3e\n\n \x3c!-- Connection sharing --\x3e\n \x3c!--\x3cdiv class\x3d"menu-section" id\x3d"share-links" ng-show\x3d"isShared()"\x3e\n \x3cdiv class\x3d"content"\x3e\n \x3ch3 style\x3d"padding: 5px !important;"\x3e{{\'CLIENT.INFO_CONNECTION_SHARED\' | translate}}\x3c/h3\x3e\n \x3cp class\x3d"description"\n translate\x3d"CLIENT.HELP_SHARE_LINK"\n translate-values\x3d"{LINKS : getShareLinkCount()}"\x3e\x3c/p\x3e\n \x3ctable\x3e\n \x3ctr ng-repeat\x3d"link in client.shareLinks | orderBy: name"\x3e\n \x3cth\x3e{{link.name}}\x3c/th\x3e\n \x3ctd\x3e\x3ca href\x3d"{{link.href}}" target\x3d"_blank"\x3e{{link.href}}\x3c/a\x3e\x3c/td\x3e\n \x3c/tr\x3e\n \x3c/table\x3e\n \x3c/div\x3e\n \x3c/div\x3e --\x3e\n\n\n\t\t\x3cdiv class\x3d"menu-section ng-scope" id\x3d"homexxleft" style\x3d"display: none; text-align: center !important; "\x3e\n \t\t\t\x3ca style\x3d"text-decoration:none;display: block;width: 130px;height: 35px;background: #4E9CAF;padding: 10px;text-align: center;border-radius: 5px;color: white;margin: 20px 30px 30px 0px;font-weight: bold;" href\x3d"https://www.onworks.net/"\x3eHome\x3c/a\x3e\n\t\t\x3c/div\x3e\n\n\t\t\x3c!-- Display options --\x3e\n \x3cdiv class\x3d"menu-section" id\x3d"display-settings" style\x3d"margin: -10px;"\x3e\n \x3c!--\x3ch3\x3e{{\'CLIENT.SECTION_HEADER_DISPLAY\' | translate}}\x3c/h3\x3e --\x3e\n \x3ch4 style\x3d" margin: -1px !important; padding: 2px 5px 2px 5px !important; text-align: center; width: 100%; background: #4E9CAF; color: #ffff; display: none;"\x3e Options\x3c/h4\x3e\n \x3cdiv class\x3d"content"\x3e\n \x3cdiv id\x3d"zoom-settings"\x3e\n \x3cdiv ng-click\x3d"zoomOut()" id\x3d"zoom-out"\x3e\x3cimg src\x3d"images/settings/zoom-out.png" alt\x3d"-"/\x3e\x3c/div\x3e\n \x3c!--\x3cdiv id\x3d"zoom-state"\x3e{{formattedScale()}}%\x3c/div\x3e --\x3e\n \x3cdiv ng-click\x3d"zoomIn()" id\x3d"zoom-in"\x3e\x3cimg src\x3d"images/settings/zoom-in.png" alt\x3d"+"/\x3e\x3c/div\x3e\n \x3c/div\x3e\n \x3cdiv style\x3d"display: none;"\x3e\x3clabel\x3e\x3cinput ng-model\x3d"menu.autoFit" ng-change\x3d"changeAutoFit()" ng-disabled\x3d"autoFitDisabled()" type\x3d"checkbox" id\x3d"auto-fit"/\x3e {{\'CLIENT.TEXT_ZOOM_AUTO_FIT\' | translate}}\x3c/label\x3e\x3c/div\x3e\n \x3c/div\x3e\n \x3c/div\x3e\n\n\t\t\x3cdiv class\x3d"menu-section" id\x3d"googledrivex" style\x3d"margin-bottom: 0px; display:flex; flex-direction: row; justify-content: center; align-items: center; margin-top:10px;"\x3e\n \x3c/div\x3e\n\n\n\x3cdiv id\x3d"adrr" style\x3d"margin-left: -20px; display: none;"\x3e\n\x3c/div\x3e\n\n \x3c!-- Clipboard --\x3e\n \x3cdiv class\x3d"menu-section" id\x3d"clipboard-settings" style\x3d"display: none;"\x3e\n \x3ch4 style\x3d"margin: -1px !important; padding: 2px 5px 2px 5px !important; text-align: center; width: 100%; background: #4E9CAF; color: #ffff;"\x3e{{\'CLIENT.SECTION_HEADER_CLIPBOARD\' | translate}}\x3c/h4\x3e\n \x3cdiv class\x3d"content"\x3e\n \x3cp class\x3d"description"\x3e{{\'CLIENT.HELP_CLIPBOARD\' | translate}}\x3c/p\x3e\n \x3cguac-clipboard data\x3d"client.clipboardData"\x3e\x3c/guac-clipboard\x3e\n \x3c/div\x3e\n \x3c/div\x3e\n\n\n \x3c!-- Devices --\x3e\n \x3cdiv class\x3d"menu-section" id\x3d"devices" ng-show\x3d"client.filesystems.length" style\x3d"display: none; "\x3e\n \x3ch3 style\x3d"padding: 5px !important;"\x3e{{\'CLIENT.SECTION_HEADER_DEVICES\' | translate}}\x3c/h3\x3e\n \x3cdiv class\x3d"content"\x3e\n \x3cdiv class\x3d"device filesystem" ng-repeat\x3d"filesystem in client.filesystems" ng-click\x3d"showFilesystemMenu(filesystem)"\x3e\n {{filesystem.name}}\n \x3c/div\x3e\n \x3c/div\x3e\n \x3c/div\x3e\n\n \x3c!-- Input method --\x3e\n \x3cdiv class\x3d"menu-section" id\x3d"keyboard-settings" style\x3d"display: none;" \x3e\n \x3ch4 style\x3d"margin: -1px !important; padding: 2px 5px 2px 5px !important; text-align: center; width: 100%; background: #4E9CAF; color: #ffff;"\x3e{{\'CLIENT.SECTION_HEADER_INPUT_METHOD\' | translate}}\x3c/h4\x3e\n \x3cdiv class\x3d"content"\x3e\n\n \x3c!-- No IME --\x3e\n \x3cdiv class\x3d"choice"\x3e\n \x3clabel\x3e\x3cinput id\x3d"ime-none" name\x3d"input-method" ng-change\x3d"closeMenu()" ng-model\x3d"menu.inputMethod" type\x3d"radio" value\x3d"none"/\x3e {{\'CLIENT.NAME_INPUT_METHOD_NONE\' | translate}}\x3c/label\x3e\n \x3cp class\x3d"caption"\x3e\x3clabel for\x3d"ime-none"\x3e{{\'CLIENT.HELP_INPUT_METHOD_NONE\' | translate}}\x3c/label\x3e\x3c/p\x3e\n \x3c/div\x3e\n\n \x3c!-- Text input --\x3e\n \x3cdiv class\x3d"choice"\x3e\n \x3cdiv class\x3d"figure"\x3e\x3clabel for\x3d"ime-text"\x3e\x3cimg src\x3d"images/settings/tablet-keys.png" alt\x3d""/\x3e\x3c/label\x3e\x3c/div\x3e\n \x3clabel\x3e\x3cinput id\x3d"ime-text" name\x3d"input-method" ng-change\x3d"closeMenu()" ng-model\x3d"menu.inputMethod" type\x3d"radio" value\x3d"text"/\x3e {{\'CLIENT.NAME_INPUT_METHOD_TEXT\' | translate}}\x3c/label\x3e\n \x3cp class\x3d"caption"\x3e\x3clabel for\x3d"ime-text"\x3e{{\'CLIENT.HELP_INPUT_METHOD_TEXT\' | translate}} \x3c/label\x3e\x3c/p\x3e\n \x3c/div\x3e\n\n \x3c!-- Guac OSK --\x3e\n \x3cdiv class\x3d"choice"\x3e\n \x3clabel\x3e\x3cinput id\x3d"ime-osk" name\x3d"input-method" ng-change\x3d"closeMenu()" ng-model\x3d"menu.inputMethod" type\x3d"radio" value\x3d"osk"/\x3e {{\'CLIENT.NAME_INPUT_METHOD_OSK\' | translate}}\x3c/label\x3e\n \x3cp class\x3d"caption"\x3e\x3clabel for\x3d"ime-osk"\x3e{{\'CLIENT.HELP_INPUT_METHOD_OSK\' | translate}}\x3c/label\x3e\x3c/p\x3e\n \x3c/div\x3e\n\n \x3c/div\x3e\n \x3c/div\x3e\n\n \x3c!-- Mouse mode --\x3e\n \x3cdiv class\x3d"menu-section" id\x3d"mouse-settings" style\x3d"display: none; "\x3e\n \x3ch3 style\x3d"padding: 5px !important;"\x3e{{\'CLIENT.SECTION_HEADER_MOUSE_MODE\' | translate}}\x3c/h3\x3e\n \x3cdiv class\x3d"content"\x3e\n \x3cp class\x3d"description"\x3e{{\'CLIENT.HELP_MOUSE_MODE\' | translate}}\x3c/p\x3e\n\n \x3c!-- Touchscreen --\x3e\n \x3cdiv class\x3d"choice"\x3e\n \x3cinput name\x3d"mouse-mode" ng-change\x3d"closeMenu()" ng-model\x3d"client.clientProperties.emulateAbsoluteMouse" type\x3d"radio" ng-value\x3d"true" checked\x3d"checked" id\x3d"absolute"/\x3e\n \x3cdiv class\x3d"figure"\x3e\n \x3clabel for\x3d"absolute"\x3e\x3cimg src\x3d"images/settings/touchscreen.png" alt\x3d"{{\'CLIENT.NAME_MOUSE_MODE_ABSOLUTE\' | translate}}"/\x3e\x3c/label\x3e\n \x3cp class\x3d"caption"\x3e\x3clabel for\x3d"absolute"\x3e{{\'CLIENT.HELP_MOUSE_MODE_ABSOLUTE\' | translate}}\x3c/label\x3e\x3c/p\x3e\n \x3c/div\x3e\n \x3c/div\x3e\n\n \x3c!-- Touchpad --\x3e\n \x3cdiv class\x3d"choice"\x3e\n \x3cinput name\x3d"mouse-mode" ng-change\x3d"closeMenu()" ng-model\x3d"client.clientProperties.emulateAbsoluteMouse" type\x3d"radio" ng-value\x3d"false" id\x3d"relative"/\x3e\n \x3cdiv class\x3d"figure"\x3e\n \x3clabel for\x3d"relative"\x3e\x3cimg src\x3d"images/settings/touchpad.png" alt\x3d"{{\'CLIENT.NAME_MOUSE_MODE_RELATIVE\' | translate}}"/\x3e\x3c/label\x3e\n \x3cp class\x3d"caption"\x3e\x3clabel for\x3d"relative"\x3e{{\'CLIENT.HELP_MOUSE_MODE_RELATIVE\' | translate}}\x3c/label\x3e\x3c/p\x3e\n \x3c/div\x3e\n \x3c/div\x3e\n\n \x3c/div\x3e\n \x3c/div\x3e\n\n\n \x3c/div\x3e\n\n \x3c/div\x3e\n \x3c/div\x3e\n\n \x3c!-- Filesystem menu --\x3e\n \x3cdiv id\x3d"filesystem-menu" class\x3d"menu" ng-class\x3d"{open: isFilesystemMenuShown()}"\x3e\n \x3cdiv class\x3d"menu-content"\x3e\n\n \x3c!-- Stationary header --\x3e\n \x3cdiv class\x3d"header"\x3e\n \x3ch2\x3e{{filesystemMenuContents.name}}\x3c/h2\x3e\n \x3cbutton class\x3d"upload button" guac-upload\x3d"uploadFiles"\x3e{{\'CLIENT.ACTION_UPLOAD_FILES\' | translate}}\x3c/button\x3e\n \x3cbutton class\x3d"back" ng-click\x3d"hideFilesystemMenu()"\x3e{{\'CLIENT.ACTION_NAVIGATE_BACK\' | translate}}\x3c/button\x3e\n \x3c/div\x3e\n\n \x3c!-- Breadcrumbs --\x3e\n \x3cdiv class\x3d"header breadcrumbs"\x3e\x3cdiv\n class\x3d"breadcrumb root"\n ng-click\x3d"changeDirectory(filesystemMenuContents, filesystemMenuContents.root)"\x3e\x3c/div\x3e\x3cdiv\n class\x3d"breadcrumb"\n ng-repeat\x3d"file in getPath(filesystemMenuContents.currentDirectory)"\n ng-click\x3d"changeDirectory(filesystemMenuContents, file)"\x3e{{file.name}}\x3c/div\x3e\n \x3c/div\x3e\n\n \x3c!-- Scrollable body --\x3e\n \x3cdiv class\x3d"menu-body"\x3e\n \x3cguac-file-browser client\x3d"client" filesystem\x3d"filesystemMenuContents"\x3e\x3c/guac-file-browser\x3e\n \x3c/div\x3e\n\n \x3c/div\x3e\n \x3c/div\x3e\n\n\x3c/guac-viewport\x3e\n\n\x3cdiv id\x3d"dpix" style\x3d"height: 1in; width: 1in; left: 100%; position: fixed; top: 100%;"\x3e\x3c/div\x3e\n\n\x3cscript type\x3d"text/javascript"\x3e\n\nvar viewportxx;\nvar viewportwidth;\nvar viewportheight;\n\nfunction abrirsettings() {\n\n document.getElementById(\'settingxmobile\').style.display \x3d "block";\n if ( document.getElementById(\'guac-menu\').style.marginLeft \x3d\x3d "0px" )\n {\n\tdocument.getElementById(\'guac-menu\').style.marginLeft \x3d "-210px";\n }\n else {\n\tdocument.getElementById(\'guac-menu\').style.marginLeft \x3d "0px";\n }\n}\n\nfunction eliminacursor(){\n setTimeout(function() {\n cursortt \x3d document.getElementById("cursorxx");\n if ( cursortt )\n\t{\n\t\tdocument.getElementById("cursorxx").style.cursor \x3d \'none\';\n\t}\n\teliminacursor();\n }, 2000);\n \n}\n\n\nfunction resizeallconcursor() {\n setTimeout(function() {\n cursortt \x3d document.getElementById("cursorxx");\n if ( cursortt \x26\x26 cursortt.clientWidth \x26\x26 ( cursortt.clientWidth \x3e 500 ) )\n\t{\n setTimeout(function() {\n\n var lefxx \x3d window.innerWidth / 2 - document.getElementById(\'cursorxx\').clientWidth / 2 - 160;\n var rigxx \x3d window.innerWidth / 2 - document.getElementById(\'cursorxx\').clientWidth / 2 - 160;\n document.getElementById(\'adzz\').style.left \x3d lefxx + "px";\n document.getElementById(\'adxx\').style.right \x3d rigxx + "px";\n var lefxx1 \x3d window.innerWidth / 2 - document.getElementById(\'cursorxx\').clientWidth / 2 - 200;\n var rigxx1 \x3d window.innerWidth / 2 - document.getElementById(\'cursorxx\').clientWidth / 2 - 200;\n document.getElementById(\'adzz1\').style.left \x3d lefxx1 + "px";\n document.getElementById(\'adxx1\').style.right \x3d rigxx1 + "px";\n var guacmenu \x3d window.innerWidth / 2 - document.getElementById(\'cursorxx\').clientWidth / 2 - 180;\n var parenthomexx \x3d window.innerWidth / 2 - document.getElementById(\'cursorxx\').clientWidth / 2 - 180;\n document.getElementById(\'guac-menu\').style.left \x3d guacmenu + "px";\n document.getElementById(\'parenthomexx\').style.right \x3d parenthomexx + "px";\n }, 10);\n\t}\n\telse {\n\t\tresizeallconcursor();\n\t}\n }, 1000);\n \n}\n\n\nfunction retamano(){\n\n var dpi_x \x3d document.getElementById(\'dpix\').offsetWidth;\n var dpi_y \x3d document.getElementById(\'dpix\').offsetHeight;\n var widthinches \x3d screen.width / dpi_x;\n var heightinches \x3d screen.height / dpi_y; \n\n setTimeout(function() {\n\t\tviewportxx \x3d document.getElementById("viewportxx");\n\t\tcursorxx \x3d document.getElementById("cursorxx");\n\t\tif ( !viewportxx )\n\t\t{\n\t\t\tretamano();\n\t\t}\n\t\telse {\n\n\n\t\t\t//viewportxx.onmousemove \x3d logMouseMove;\n\t\t\tvar hhh \x3d viewportheight - 90;\n\t\t\thhh \x3d viewportheight;\n \t\t\tviewportxx.style.height \x3d hhh + "px";\n\t\t\tviewportxx.style.top \x3d "0px";\n\n\t\t\ttestExp \x3d new RegExp(\'Android|webOS|iPhone|iPad|\' +\n \'BlackBerry|Windows Phone|\' +\n \'Opera Mini|IEMobile|Mobile\' ,\n \'i\');\n\n if (testExp.test(navigator.userAgent))\n {\n\n var iiii2 \x3d "\x3cscript\x3e (function () { var size\x3d\'970x90|320x50\', adunit \x3d \'onworks.net_970x90_7_DFP\', childNetworkId \x3d \'22385467611\', xmlhttp \x3d new XMLHttpRequest();xmlhttp.onreadystatechange \x3d function(){if(xmlhttp.readyState\x3d\x3d4 \x26\x26 xmlhttp.status\x3d\x3d200){var es \x3d document.querySelectorAll(\\"[data-id\x3d\'\\"+adunit+\\"\']\\");var e \x3d Array.from(es).filter(function(e) {return !e.hasAttribute(\\"data-rendered\\")});if(e.length \x3e 0){e.forEach(function(el){var iframe \x3d el.contentWindow.document;iframe.open();iframe.write(xmlhttp.responseText);iframe.close();el.setAttribute(\'data-rendered\', true)})}}};var child\x3dchildNetworkId.trim()?\',\'+childNetworkId.trim():\'\';xmlhttp.open(\\"GET\\", \'https://pubads.g.doubleclick.net/gampad/adx?iu\x3d/147246189\'+child+\'/\'+adunit+\'\x26sz\x3d\'+encodeURI(size)+\'\x26t\x3dPlacement_type%3Dserving\x26\'+Date.now(), true);xmlhttp.send();})(); \x3c\\/script\x3e";\n\n setTimeout(function() {\n\t\t\t\t\t var noadsx \x3d getCookiex("noads");\n if ( noadsx \x3d\x3d "" )\n {\n\t\t\t\t\t\t//postscribe(document.getElementById(\'adyy\'), iiii2); // top\n\t\t\t\t\t }\n }, 20);\n }\n else {\n //hhh \x3d hhh - 80;\n\n\t\t\t resizeallconcursor();\n\n\t\t\t if ( (screen.width \x3c 350 ) \x26\x26 (screen.width \x3e screen.height ) \x26\x26 ( widthinches \x3c 14 ) )\n\t\t\t {\n\t\t\t\t//document.getElementById("adyy").style.display \x3d "none";\n\t\t\t\thhh \x3d hhh + 0;\n\t\t\t\tviewportxx.style.height \x3d hhh + "px";\n\t\t\t\t//viewportxx.style.top \x3d "90px";\n\n var iiii \x3d "\x3cscript\x3e (function () { var size\x3d\'300x250|160x600\', adunit \x3d \'onworks.net_160x600_3_DFP\', childNetworkId \x3d \'22385467611\', xmlhttp \x3d new XMLHttpRequest();xmlhttp.onreadystatechange \x3d function(){if(xmlhttp.readyState\x3d\x3d4 \x26\x26 xmlhttp.status\x3d\x3d200){var es \x3d document.querySelectorAll(\\"[data-id\x3d\'\\"+adunit+\\"\']\\");var e \x3d Array.from(es).filter(function(e) {return !e.hasAttribute(\\"data-rendered\\")});if(e.length \x3e 0){e.forEach(function(el){var iframe \x3d el.contentWindow.document;iframe.open();iframe.write(xmlhttp.responseText);iframe.close();el.setAttribute(\'data-rendered\', true)})}}};var child\x3dchildNetworkId.trim()?\',\'+childNetworkId.trim():\'\';xmlhttp.open(\\"GET\\", \'https://pubads.g.doubleclick.net/gampad/adx?iu\x3d/147246189\'+child+\'/\'+adunit+\'\x26sz\x3d\'+encodeURI(size)+\'\x26t\x3dPlacement_type%3Dserving\x26\'+Date.now(), true);xmlhttp.send();})(); \x3c\\/script\x3e";\n\n var iiiileft \x3d "\x3cscript\x3e (function () { var size\x3d\'300x250|160x600\', adunit \x3d \'onworks.net_160x600_4_DFP\', childNetworkId \x3d \'22385467611\', xmlhttp \x3d new XMLHttpRequest();xmlhttp.onreadystatechange \x3d function(){if(xmlhttp.readyState\x3d\x3d4 \x26\x26 xmlhttp.status\x3d\x3d200){var es \x3d document.querySelectorAll(\\"[data-id\x3d\'\\"+adunit+\\"\']\\");var e \x3d Array.from(es).filter(function(e) {return !e.hasAttribute(\\"data-rendered\\")});if(e.length \x3e 0){e.forEach(function(el){var iframe \x3d el.contentWindow.document;iframe.open();iframe.write(xmlhttp.responseText);iframe.close();el.setAttribute(\'data-rendered\', true)})}}};var child\x3dchildNetworkId.trim()?\',\'+childNetworkId.trim():\'\';xmlhttp.open(\\"GET\\", \'https://pubads.g.doubleclick.net/gampad/adx?iu\x3d/147246189\'+child+\'/\'+adunit+\'\x26sz\x3d\'+encodeURI(size)+\'\x26t\x3dPlacement_type%3Dserving\x26\'+Date.now(), true);xmlhttp.send();})(); \x3c\\/script\x3e ";\n\n var iiii1 \x3d "\x3cscript\x3e (function () { var size\x3d\'200x200\', adunit \x3d \'onworks.net_200x200_1_DFP\', childNetworkId \x3d \'22385467611\', xmlhttp \x3d new XMLHttpRequest();xmlhttp.onreadystatechange \x3d function(){if(xmlhttp.readyState\x3d\x3d4 \x26\x26 xmlhttp.status\x3d\x3d200){var es \x3d document.querySelectorAll(\\"[data-id\x3d\'\\"+adunit+\\"\']\\");var e \x3d Array.from(es).filter(function(e) {return !e.hasAttribute(\\"data-rendered\\")});if(e.length \x3e 0){e.forEach(function(el){var iframe \x3d el.contentWindow.document;iframe.open();iframe.write(xmlhttp.responseText);iframe.close();el.setAttribute(\'data-rendered\', true)})}}};var child\x3dchildNetworkId.trim()?\',\'+childNetworkId.trim():\'\';xmlhttp.open(\\"GET\\", \'https://pubads.g.doubleclick.net/gampad/adx?iu\x3d/147246189\'+child+\'/\'+adunit+\'\x26sz\x3d\'+encodeURI(size)+\'\x26t\x3dPlacement_type%3Dserving\x26\'+Date.now(), true);xmlhttp.send();})(); \x3c\\/script\x3e";\n\n\n var iiiileft1 \x3d "\x3cscript\x3e (function () { var size\x3d\'200x200\', adunit \x3d \'onworks.net_200x200_2_DFP\', childNetworkId \x3d \'22385467611\', xmlhttp \x3d new XMLHttpRequest();xmlhttp.onreadystatechange \x3d function(){if(xmlhttp.readyState\x3d\x3d4 \x26\x26 xmlhttp.status\x3d\x3d200){var es \x3d document.querySelectorAll(\\"[data-id\x3d\'\\"+adunit+\\"\']\\");var e \x3d Array.from(es).filter(function(e) {return !e.hasAttribute(\\"data-rendered\\")});if(e.length \x3e 0){e.forEach(function(el){var iframe \x3d el.contentWindow.document;iframe.open();iframe.write(xmlhttp.responseText);iframe.close();el.setAttribute(\'data-rendered\', true)})}}};var child\x3dchildNetworkId.trim()?\',\'+childNetworkId.trim():\'\';xmlhttp.open(\\"GET\\", \'https://pubads.g.doubleclick.net/gampad/adx?iu\x3d/147246189\'+child+\'/\'+adunit+\'\x26sz\x3d\'+encodeURI(size)+\'\x26t\x3dPlacement_type%3Dserving\x26\'+Date.now(), true);xmlhttp.send();})(); \x3c\\/script\x3e";\n\n setTimeout(function() {\n var noadsx \x3d getCookiex("noads");\n if ( noadsx \x3d\x3d "" )\n {\n\t\t\t\t\t\t//postscribe(document.getElementById(\'adxx\'), iiii); // right\n\t\t\t\t\t\t//postscribe(document.getElementById(\'adxx1\'), iiii1); // right\n //postscribe(document.getElementById(\'adzz\'), iiiileft ); // left\n\t\t\t\t\t\t//postscribe(document.getElementById(\'adzz1\'), iiiileft1 ); // left\n\t\t\t\t\t}\n }, 20);\n\n\t\t\t }\n\t\t\t else {\n\t\t\t\tvar iiii2 \x3d \'\';\n\t\t\t\tif ( screen.width \x3e 1500 )\n\t\t\t\t{\n\n\t\t\t\t\tvar iiii2 \x3d "\x3cscript\x3e (function () { var size\x3d\'970x90|320x50\', adunit \x3d \'onworks.net_970x90_7_DFP\', childNetworkId \x3d \'22385467611\', xmlhttp \x3d new XMLHttpRequest();xmlhttp.onreadystatechange \x3d function(){if(xmlhttp.readyState\x3d\x3d4 \x26\x26 xmlhttp.status\x3d\x3d200){var es \x3d document.querySelectorAll(\\"[data-id\x3d\'\\"+adunit+\\"\']\\");var e \x3d Array.from(es).filter(function(e) {return !e.hasAttribute(\\"data-rendered\\")});if(e.length \x3e 0){e.forEach(function(el){var iframe \x3d el.contentWindow.document;iframe.open();iframe.write(xmlhttp.responseText);iframe.close();el.setAttribute(\'data-rendered\', true)})}}};var child\x3dchildNetworkId.trim()?\',\'+childNetworkId.trim():\'\';xmlhttp.open(\\"GET\\", \'https://pubads.g.doubleclick.net/gampad/adx?iu\x3d/147246189\'+child+\'/\'+adunit+\'\x26sz\x3d\'+encodeURI(size)+\'\x26t\x3dPlacement_type%3Dserving\x26\'+Date.now(), true);xmlhttp.send();})(); \x3c\\/script\x3e";\n\n\t\t\t\t}\n\t\t\t\telse {\n\n\t\t\t\t\tvar iiii2 \x3d "\x3cscript\x3e (function () { var size\x3d\'970x90|320x50\', adunit \x3d \'onworks.net_970x90_7_DFP\', childNetworkId \x3d \'22385467611\', xmlhttp \x3d new XMLHttpRequest();xmlhttp.onreadystatechange \x3d function(){if(xmlhttp.readyState\x3d\x3d4 \x26\x26 xmlhttp.status\x3d\x3d200){var es \x3d document.querySelectorAll(\\"[data-id\x3d\'\\"+adunit+\\"\']\\");var e \x3d Array.from(es).filter(function(e) {return !e.hasAttribute(\\"data-rendered\\")});if(e.length \x3e 0){e.forEach(function(el){var iframe \x3d el.contentWindow.document;iframe.open();iframe.write(xmlhttp.responseText);iframe.close();el.setAttribute(\'data-rendered\', true)})}}};var child\x3dchildNetworkId.trim()?\',\'+childNetworkId.trim():\'\';xmlhttp.open(\\"GET\\", \'https://pubads.g.doubleclick.net/gampad/adx?iu\x3d/147246189\'+child+\'/\'+adunit+\'\x26sz\x3d\'+encodeURI(size)+\'\x26t\x3dPlacement_type%3Dserving\x26\'+Date.now(), true);xmlhttp.send();})(); \x3c\\/script\x3e";\n\n\t\t\t\t}\n\n\n\t\t\t\tvar iiii \x3d "\x3cscript\x3e (function () { var size\x3d\'300x250|160x600\', adunit \x3d \'onworks.net_160x600_3_DFP\', childNetworkId \x3d \'22385467611\', xmlhttp \x3d new XMLHttpRequest();xmlhttp.onreadystatechange \x3d function(){if(xmlhttp.readyState\x3d\x3d4 \x26\x26 xmlhttp.status\x3d\x3d200){var es \x3d document.querySelectorAll(\\"[data-id\x3d\'\\"+adunit+\\"\']\\");var e \x3d Array.from(es).filter(function(e) {return !e.hasAttribute(\\"data-rendered\\")});if(e.length \x3e 0){e.forEach(function(el){var iframe \x3d el.contentWindow.document;iframe.open();iframe.write(xmlhttp.responseText);iframe.close();el.setAttribute(\'data-rendered\', true)})}}};var child\x3dchildNetworkId.trim()?\',\'+childNetworkId.trim():\'\';xmlhttp.open(\\"GET\\", \'https://pubads.g.doubleclick.net/gampad/adx?iu\x3d/147246189\'+child+\'/\'+adunit+\'\x26sz\x3d\'+encodeURI(size)+\'\x26t\x3dPlacement_type%3Dserving\x26\'+Date.now(), true);xmlhttp.send();})(); \x3c\\/script\x3e";\n\n\t\t\t\tvar iiiileft \x3d "\x3cscript\x3e (function () { var size\x3d\'300x250|160x600\', adunit \x3d \'onworks.net_160x600_4_DFP\', childNetworkId \x3d \'22385467611\', xmlhttp \x3d new XMLHttpRequest();xmlhttp.onreadystatechange \x3d function(){if(xmlhttp.readyState\x3d\x3d4 \x26\x26 xmlhttp.status\x3d\x3d200){var es \x3d document.querySelectorAll(\\"[data-id\x3d\'\\"+adunit+\\"\']\\");var e \x3d Array.from(es).filter(function(e) {return !e.hasAttribute(\\"data-rendered\\")});if(e.length \x3e 0){e.forEach(function(el){var iframe \x3d el.contentWindow.document;iframe.open();iframe.write(xmlhttp.responseText);iframe.close();el.setAttribute(\'data-rendered\', true)})}}};var child\x3dchildNetworkId.trim()?\',\'+childNetworkId.trim():\'\';xmlhttp.open(\\"GET\\", \'https://pubads.g.doubleclick.net/gampad/adx?iu\x3d/147246189\'+child+\'/\'+adunit+\'\x26sz\x3d\'+encodeURI(size)+\'\x26t\x3dPlacement_type%3Dserving\x26\'+Date.now(), true);xmlhttp.send();})(); \x3c\\/script\x3e ";\n\n\t\t\t\tvar iiii1 \x3d "\x3cscript\x3e (function () { var size\x3d\'200x200\', adunit \x3d \'onworks.net_200x200_1_DFP\', childNetworkId \x3d \'22385467611\', xmlhttp \x3d new XMLHttpRequest();xmlhttp.onreadystatechange \x3d function(){if(xmlhttp.readyState\x3d\x3d4 \x26\x26 xmlhttp.status\x3d\x3d200){var es \x3d document.querySelectorAll(\\"[data-id\x3d\'\\"+adunit+\\"\']\\");var e \x3d Array.from(es).filter(function(e) {return !e.hasAttribute(\\"data-rendered\\")});if(e.length \x3e 0){e.forEach(function(el){var iframe \x3d el.contentWindow.document;iframe.open();iframe.write(xmlhttp.responseText);iframe.close();el.setAttribute(\'data-rendered\', true)})}}};var child\x3dchildNetworkId.trim()?\',\'+childNetworkId.trim():\'\';xmlhttp.open(\\"GET\\", \'https://pubads.g.doubleclick.net/gampad/adx?iu\x3d/147246189\'+child+\'/\'+adunit+\'\x26sz\x3d\'+encodeURI(size)+\'\x26t\x3dPlacement_type%3Dserving\x26\'+Date.now(), true);xmlhttp.send();})(); \x3c\\/script\x3e";\n\n\t\t\t\tvar iiiileft1 \x3d "\x3cscript\x3e (function () { var size\x3d\'200x200\', adunit \x3d \'onworks.net_200x200_2_DFP\', childNetworkId \x3d \'22385467611\', xmlhttp \x3d new XMLHttpRequest();xmlhttp.onreadystatechange \x3d function(){if(xmlhttp.readyState\x3d\x3d4 \x26\x26 xmlhttp.status\x3d\x3d200){var es \x3d document.querySelectorAll(\\"[data-id\x3d\'\\"+adunit+\\"\']\\");var e \x3d Array.from(es).filter(function(e) {return !e.hasAttribute(\\"data-rendered\\")});if(e.length \x3e 0){e.forEach(function(el){var iframe \x3d el.contentWindow.document;iframe.open();iframe.write(xmlhttp.responseText);iframe.close();el.setAttribute(\'data-rendered\', true)})}}};var child\x3dchildNetworkId.trim()?\',\'+childNetworkId.trim():\'\';xmlhttp.open(\\"GET\\", \'https://pubads.g.doubleclick.net/gampad/adx?iu\x3d/147246189\'+child+\'/\'+adunit+\'\x26sz\x3d\'+encodeURI(size)+\'\x26t\x3dPlacement_type%3Dserving\x26\'+Date.now(), true);xmlhttp.send();})(); \x3c\\/script\x3e";\n\n\n\n \t\t\tsetTimeout(function() {\n var noadsx \x3d getCookiex("noads");\n if ( noadsx \x3d\x3d "" )\n {\n\t\t\t\t\t\t//postscribe(document.getElementById(\'adxx\'), iiii); // right\n\t\t\t\t\t\t//postscribe(document.getElementById(\'adxx1\'), iiii1); // right\n //postscribe(document.getElementById(\'adzz\'), iiiileft ); // left\n\t\t\t\t\t\t//postscribe(document.getElementById(\'adzz1\'), iiiileft1 ); // left\n //postscribe(document.getElementById(\'adyy\'), iiii2); // top\n\t\t\t\t\t}\n \t\t\t}, 20);\n\n\t\t\t }\n\n viewportxx.style.height \x3d hhh + "px";\n\n\t\t\t}\n\t\t\t\n\t\t}\n }, 2000);\n}\n\n\nfunction setCookie(cname, cvalue, exdays) {\n var d \x3d new Date();\n d.setTime(d.getTime() + (exdays*24*60*60*1000));\n var expires \x3d "expires\x3d"+ d.toUTCString();\n document.cookie \x3d cname + "\x3d" + cvalue + ";" + expires + ";path\x3d/";\n}\n\nvar userxxx;\n\nvar timeoutxx;\nfunction logMouseMove(e) {\n\te \x3d event || window.event;\t\n\tmousePos \x3d { x: e.clientX, y: e.clientY };\n\tlocalStorage.setItem("mousetimex", Math.floor(Date.now() / 1000) );\n\tconsole.log(mousePos);\n}\n\nfunction getCookiex(cname) {\n var name \x3d cname + "\x3d";\n var decodedCookie \x3d decodeURIComponent(document.cookie);\n var ca \x3d decodedCookie.split(\';\');\n for(var i \x3d 0; i \x3cca.length; i++) {\n var c \x3d ca[i];\n while (c.charAt(0) \x3d\x3d \' \') {\n c \x3d c.substring(1);\n }\n if (c.indexOf(name) \x3d\x3d 0) {\n return c.substring(name.length, c.length);\n }\n }\n return "";\n}\n\n\nfunction setCookiex(cname, cvalue, exdays) {\n var d \x3d new Date();\n d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));\n var expires \x3d "expires\x3d"+d.toUTCString();\n document.cookie \x3d cname + "\x3d" + cvalue + ";" + expires + ";path\x3d/";\n}\n\n\n\n$(function(){\n\n var noadsx \x3d getCookiex("noads");\n if ( noadsx \x3d\x3d "" )\n {\n localStorage.setItem("temporizadorx", 300 );\n }\n else {\n localStorage.setItem("temporizadorx", 1200 );\n }\n\n //eliminacursor();\n\n // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight\n \n if (typeof window.innerWidth !\x3d \'undefined\')\n {\n viewportwidth \x3d window.innerWidth,\n viewportheight \x3d window.innerHeight\n }\n// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)\n else if (typeof document.documentElement !\x3d \'undefined\'\n \x26\x26 typeof document.documentElement.clientWidth !\x3d\n \'undefined\' \x26\x26 document.documentElement.clientWidth !\x3d 0)\n {\n viewportwidth \x3d document.documentElement.clientWidth,\n viewportheight \x3d document.documentElement.clientHeight\n }\n // older versions of IE\n else\n {\n viewportwidth \x3d document.getElementsByTagName(\'body\')[0].clientWidth,\n viewportheight \x3d document.getElementsByTagName(\'body\')[0].clientHeight\n }\n\tretamano();\n\n\tdocument.getElementById("googledrivex").innerHTML \x3d \'\x3ca style\x3d"margin-right: 10px;color: #000000 !important;text-decoration:none;display: block;width: 45px;height: 40px;background: #ffffff;padding: 2px;text-align: center;border-radius: 5px;color: white;font-weight: bold;text-align: center;font-size: 12px;" href\x3d"https://www.onworks.net/thirdparty/gdrive/google-api-php-client/core/download.php" target\x3d"_blank" title\x3d"Open an OnWorks session from Google Drive"\x3e\x3cimg width\x3d"30px" height\x3d"30px" style\x3d"margin-bottom: 0px;" src\x3d"https://www.onworks.net/images/googledrive.png"\x3eOpen Session\x3c/a\x3e\x3ca style\x3d"margin-left: 10px;color: #000000 !important;text-decoration:none;display: block;width: 45px;height: 40px;background: #ffffff;padding: 2px;text-align: center;border-radius: 5px;color: white;font-weight: bold;font-size: 12px;" href\x3d"https://www.onworks.net/thirdparty/gdrive/google-api-php-client/core/upload.php" target\x3d"_blank" title\x3d"Save this OnWorks session into Google Drive"\x3e\x3cimg width\x3d"30px" height\x3d"30px" style\x3d"margin-bottom: 0px;" src\x3d"https://www.onworks.net/images/googledrive.png"\x3eSave Session\x3c/a\x3e\';\n\n\n\tif ( !localStorage.getItem("namexxx") )\n \t{\n \tuserxxx \x3d Math.floor(Math.random() * 2000000);\n \tlocalStorage.setItem("namexxx", userxxx);\n\t\tsetCookie("username", userxxx, 365);\n \t}\n \telse {\n \tuserxxx \x3d localStorage.getItem("namexxx");\n\t\tsetCookie("username", userxxx, 365);\n \t}\n\t\n var dataxxx \x3d userxxx;\n\n document.getElementById("filemanager").innerHTML \x3d \'AAAAAAA\';\n document.getElementById("filemanager").innerHTML \x3d \'"text-decoration:none; display: block; width: 135px; height: 35px; background: #4E9CAF; padding: 10px; text-align: center; border-radius: 5px; color: white; font-weight: bold;"\';\n //document.getElementById("filemanager").innerHTML \x3d \'\x3ca style\x3d"text-decoration:none; display: block; width: 135px; height: 35px; background: #4E9CAF; padding: 10px; text-align: center; border-radius: 5px; color: white; font-weight: bold;" href\x3d"http://www.onworks.net/filemanager01.php?username\x3d\' + dataxxx + \'" \x3eFile Manager\x3c/a\x3e\';\n //alert("aaaaaaaa" + dataxxx);\n //sessionStorage.setItem(\'namexxx\', name);\n\tlocalStorage.setItem("mousetimex", Math.floor(Date.now() / 1000) );\n httpgetx(dataxxx);\n\n\n\ttestExp \x3d new RegExp(\'Android|webOS|iPhone|iPad|\' +\n \'BlackBerry|Windows Phone|\' +\n \'Opera Mini|IEMobile|Mobile\' ,\n \'i\');\n\n\tif (testExp.test(navigator.userAgent))\n {\n\t\tdocument.getElementById(\'homexx\').style.display \x3d "none";\n\t\tdocument.getElementById(\'parenthomexx\').style.display \x3d "none";\n\t\tdocument.getElementById(\'adxx\').style.display \x3d "none";\n\t\tdocument.getElementById(\'adzz\').style.display \x3d "none";\n\t\tdocument.getElementById(\'adxx1\').style.display \x3d "none";\n document.getElementById(\'adzz1\').style.display \x3d "none";\n\t\t//document.getElementById("adyy").style.display \x3d "none";\n\t\tdocument.getElementById(\'guac-menu\').style.marginLeft \x3d "-210px";\n\t\tdocument.getElementById(\'guac-menu\').style.top \x3d "90px";\n\t\tdocument.getElementById(\'settingxmobile\').style.display \x3d "block";\n\t\tdocument.getElementById(\'homexxleft\').style.display \x3d "block";\n\t\tdocument.getElementById(\'guac-menu\').style.maxHeight \x3d "190px";\n }\n\telse {\n\t document.getElementById(\'settingxmobile\').style.display \x3d "none";\n }\n\n\n});\n\n\nfunction httpgetx(dataxxx)\n{\n\n var guestx \x3d "";\n xhr2 \x3d new XMLHttpRequest();\n xhr2.open(\'GET\', \'https://www.onworks.net/runos/security.php?username\x3d\' + dataxxx + \'\x26service\x3dservice65\', true);\n xhr2.onload \x3d function (e) {\n if (xhr2.status \x3d\x3d\x3d 200) {\n console.log(xhr2.responseText);\n runningx \x3d xhr2.responseText;\n if ( runningx.indexOf("runX") !\x3d -1 )\n {\n console.log("User running");\n }\n else {\n console.log("User not running");\n window.location \x3d "https://www.onworks.net";\n }\n }\n else {\n console.error(xhr2.statusText);\n }\n };\n xhr2.onerror \x3d function (e) {\n console.error(xhr2.statusText);\n };\n xhr2.send();\n\n\n var ahoramouse \x3d Math.floor(Date.now() / 1000);\n var antesmouse \x3d localStorage.getItem("mousetimex");\n var temporizadorxyy \x3d localStorage.getItem("temporizadorx");\n //console.log("ahoramouse " + ahoramouse + " antesmouse " + antesmouse );\n\n if ( ( ahoramouse - antesmouse ) \x3e temporizadorxyy )\n {\n\twindow.location.href \x3d \'https://www.onworks.net/runos/clear-os.html\';\n }\n \n setTimeout(function() \n {\n var xhr \x3d new XMLHttpRequest();\n xhr.open(\'GET\', "https://www.onworks.net/community/user.php?username\x3d" + dataxxx + \'\x26service\x3dservice65\', true);\n xhr.send();\n httpgetx(dataxxx);\n }, 30000);\n\n\n}\n\n\n\n\x3c/script\x3e') } ]); angular.module("app/client/templates/file.html", []).run(["$templateCache", function(a) { a.put("app/client/templates/file.html", '\x3cdiv class\x3d"list-item"\x3e\n\n \x3c!-- Filename and icon --\x3e\n \x3cdiv class\x3d"caption"\x3e\n \x3cdiv class\x3d"icon"\x3e\x3c/div\x3e\n {{::name}}\n \x3c/div\x3e\n\n\x3c/div\x3e') } ]); angular.module("app/client/templates/guacClient.html", []).run(["$templateCache", function(a) { a.put("app/client/templates/guacClient.html", '\x3cdiv class\x3d"main" guac-resize\x3d"mainElementResized"\x3e\n\n \x3c!-- Display --\x3e\n \x3cdiv class\x3d"displayOuter"\x3e\n\n \x3cdiv class\x3d"displayMiddle"\x3e\n \x3cdiv id\x3d"cursorxx" class\x3d"display software-cursor" \x3e\n \x3c/div\x3e\n \x3c/div\x3e\n\n \x3c/div\x3e\n\n\x3c/div\x3e') } ]); angular.module("app/client/templates/guacFileBrowser.html", []).run(["$templateCache", function(a) { a.put("app/client/templates/guacFileBrowser.html", '\x3cdiv class\x3d"file-browser"\x3e\n\n \x3c!-- Current directory contents --\x3e\n \x3cdiv class\x3d"current-directory-contents"\x3e\x3c/div\x3e\n\n\x3c/div\x3e') } ]); angular.module("app/client/templates/guacFileTransfer.html", []).run(["$templateCache", function(a) { a.put("app/client/templates/guacFileTransfer.html", '\x3cdiv class\x3d"transfer" ng-class\x3d"{\'in-progress\': isInProgress(), \'savable\': isSavable(), \'error\': hasError()}" ng-click\x3d"save()"\x3e\n\n \x3c!-- Overall status of transfer --\x3e\n \x3cdiv class\x3d"transfer-status"\x3e\n\n \x3c!-- Filename and progress bar --\x3e\n \x3cdiv class\x3d"filename"\x3e\n \x3cdiv class\x3d"progress"\x3e\x3cdiv ng-style\x3d"{\'width\': getPercentDone() + \'%\'}" class\x3d"bar"\x3e\x3c/div\x3e\x3c/div\x3e\n {{transfer.filename}}\n \x3c/div\x3e\n\n \x3c!-- Error text --\x3e\n \x3cp class\x3d"error-text"\x3e{{getErrorText() | translate}}\x3c/p\x3e\n\n \x3c/div\x3e\n\n \x3c!-- Progress/status text --\x3e\n \x3cdiv class\x3d"text"\n translate\x3d"CLIENT.TEXT_FILE_TRANSFER_PROGRESS"\n translate-values\x3d"{PROGRESS: getProgressValue(), UNIT: getProgressUnit()}"\x3e\x3c/div\x3e\n\n\x3c/div\x3e') } ]); angular.module("app/client/templates/guacFileTransferManager.html", []).run(["$templateCache", function(a) { a.put("app/client/templates/guacFileTransferManager.html", '\x3cdiv class\x3d"transfer-manager"\x3e\n\n \x3c!-- File transfer manager header --\x3e\n \x3cdiv class\x3d"header"\x3e\n \x3ch2\x3e{{\'CLIENT.SECTION_HEADER_FILE_TRANSFERS\' | translate}}\x3c/h2\x3e\n \x3cbutton ng-click\x3d"clearCompletedTransfers()"\x3e{{\'CLIENT.ACTION_CLEAR_COMPLETED_TRANSFERS\' | translate}}\x3c/button\x3e\n \x3c/div\x3e\n\n \x3c!-- Sent/received files --\x3e\n \x3cdiv class\x3d"transfer-manager-body"\x3e\n \x3cdiv class\x3d"transfers"\x3e\n \x3cguac-file-transfer\n transfer\x3d"upload"\n ng-repeat\x3d"upload in client.uploads"\x3e\n \x3c/guac-file-transfer\x3e\x3cguac-file-transfer\n transfer\x3d"download"\n ng-repeat\x3d"download in client.downloads"\x3e\n \x3c/guac-file-transfer\x3e\n \x3c/div\x3e\n \x3c/div\x3e\n\n\x3c/div\x3e') } ]); angular.module("app/client/templates/guacThumbnail.html", []).run(["$templateCache", function(a) { a.put("app/client/templates/guacThumbnail.html", '\x3cdiv class\x3d"thumbnail-main" guac-resize\x3d"updateDisplayScale"\x3e\n\n \x3c!-- Display --\x3e\n \x3cdiv class\x3d"display"\x3e\n \x3c/div\x3e\n\n \x3c!-- Dummy background thumbnail --\x3e\n \x3cimg alt\x3d"" ng-src\x3d"{{thumbnail}}"/\x3e\n\n\x3c/div\x3e') } ]); angular.module("app/client/templates/guacViewport.html", []).run(["$templateCache", function(a) { a.put("app/client/templates/guacViewport.html", '\x3cdiv class\x3d"viewport" id\x3d"viewportxx" ng-transclude\x3e\n\x3c/div\x3e') } ]); angular.module("app/clipboard/templates/guacClipboard.html", []).run(["$templateCache", function(a) { a.put("app/clipboard/templates/guacClipboard.html", '\x3ctextarea class\x3d"clipboard"\x3e\x3c/textarea\x3e') } ]); angular.module("app/element/templates/blank.html", []).run(["$templateCache", function(a) { a.put("app/element/templates/blank.html", '\x3c!DOCTYPE html\x3e\n\x3chtml\x3e\n \x3chead\x3e\n \x3cmeta http-equiv\x3d"Content-Type" content\x3d"text/html; charset\x3dUTF-8"\x3e\n \x3ctitle\x3e_\x3c/title\x3e\n \x3c/head\x3e\n \x3cbody\x3e\x3c/body\x3e\n\x3c/html\x3e') } ]); angular.module("app/form/templates/checkboxField.html", []).run(["$templateCache", function(a) { a.put("app/form/templates/checkboxField.html", '\x3cinput type\x3d"checkbox" ng-model\x3d"typedValue" autocorrect\x3d"off" autocapitalize\x3d"off"/\x3e') } ]); angular.module("app/form/templates/dateField.html", []).run(["$templateCache", function(a) { a.put("app/form/templates/dateField.html", '\x3cdiv class\x3d"date-field"\x3e\n \x3cinput type\x3d"date"\n ng-model\x3d"typedValue"\n ng-model-options\x3d"modelOptions"\n guac-lenient-date\n placeholder\x3d"{{\'FORM.FIELD_PLACEHOLDER_DATE\' | translate}}"\n autocorrect\x3d"off"\n autocapitalize\x3d"off"/\x3e\n\x3c/div\x3e') } ]); angular.module("app/form/templates/emailField.html", []).run(["$templateCache", function(a) { a.put("app/form/templates/emailField.html", '\x3cdiv class\x3d"email-field"\x3e\n \x3cinput type\x3d"email"\n ng-model\x3d"model"\n ng-hide\x3d"readOnly"\n autocorrect\x3d"off"\n autocapitalize\x3d"off"/\x3e\n \x3ca href\x3d"mailto:{{model}}" ng-show\x3d"readOnly"\x3e{{model}}\x3c/a\x3e\n\x3c/div\x3e') } ]); angular.module("app/form/templates/form.html", []).run(["$templateCache", function(a) { a.put("app/form/templates/form.html", '\x3cdiv class\x3d"form-group"\x3e\n \x3cdiv ng-repeat\x3d"form in forms" class\x3d"form"\n ng-show\x3d"containsVisible(form.fields)"\x3e\n\n \x3c!-- Form name --\x3e\n \x3ch3 ng-show\x3d"form.name"\x3e{{getSectionHeader(form) | translate}}\x3c/h3\x3e\n\n \x3c!-- All fields in form --\x3e\n \x3cdiv class\x3d"fields"\x3e\n \x3cguac-form-field ng-repeat\x3d"field in form.fields" namespace\x3d"namespace"\n ng-if\x3d"isVisible(field)"\n field\x3d"field" model\x3d"values[field.name]"\x3e\x3c/guac-form-field\x3e\n \x3c/div\x3e\n\n \x3c/div\x3e\n\x3c/div\x3e') } ]); angular.module("app/form/templates/formField.html", []).run(["$templateCache", function(a) { a.put("app/form/templates/formField.html", '\x3clabel class\x3d"labeled-field" ng-class\x3d"{empty: !model}" ng-show\x3d"isFieldVisible()"\x3e\n\n \x3c!-- Field header --\x3e\n \x3cspan class\x3d"field-header"\x3e{{getFieldHeader() | translate}}\x3c/span\x3e\n\n \x3c!-- Field content --\x3e\n \x3cdiv class\x3d"form-field"\x3e\x3c/div\x3e\n\n\x3c/label\x3e') } ]); angular.module("app/form/templates/numberField.html", []).run(["$templateCache", function(a) { a.put("app/form/templates/numberField.html", '\x3cinput type\x3d"number" ng-model\x3d"typedValue" autocorrect\x3d"off" autocapitalize\x3d"off"/\x3e') } ]); angular.module("app/form/templates/passwordField.html", []).run(["$templateCache", function(a) { a.put("app/form/templates/passwordField.html", '\x3cdiv class\x3d"password-field"\x3e\n \x3cinput type\x3d"{{passwordInputType}}" ng-model\x3d"model" ng-trim\x3d"false" autocorrect\x3d"off" autocapitalize\x3d"off"/\x3e\n \x3cdiv class\x3d"icon toggle-password" ng-click\x3d"togglePassword()" title\x3d"{{getTogglePasswordHelpText() | translate}}"\x3e\x3c/div\x3e\n\x3c/div\x3e') } ]); angular.module("app/form/templates/selectField.html", []).run(["$templateCache", function(a) { a.put("app/form/templates/selectField.html", '\x3cselect ng-model\x3d"model" ng-options\x3d"option as getFieldOption(option) | translate for option in field.options | orderBy: value"\x3e\x3c/select\x3e') } ]); angular.module("app/form/templates/textAreaField.html", []).run(["$templateCache", function(a) { a.put("app/form/templates/textAreaField.html", '\x3ctextarea ng-model\x3d"model" autocorrect\x3d"off" autocapitalize\x3d"off"\x3e\x3c/textarea\x3e') } ]); angular.module("app/form/templates/textField.html", []).run(["$templateCache", function(a) { a.put("app/form/templates/textField.html", '\x3cinput type\x3d"text" ng-model\x3d"model" autocorrect\x3d"off" autocapitalize\x3d"off"/\x3e') } ]); angular.module("app/form/templates/timeField.html", []).run(["$templateCache", function(a) { a.put("app/form/templates/timeField.html", '\x3cdiv class\x3d"time-field"\x3e\n \x3cinput type\x3d"time"\n ng-model\x3d"typedValue"\n ng-model-options\x3d"modelOptions"\n guac-lenient-time\n placeholder\x3d"{{\'FORM.FIELD_PLACEHOLDER_TIME\' | translate}}"\n autocorrect\x3d"off"\n autocapitalize\x3d"off"/\x3e\n\x3c/div\x3e') } ]); angular.module("app/form/templates/timeZoneField.html", []).run(["$templateCache", function(a) { a.put("app/form/templates/timeZoneField.html", '\x3cdiv class\x3d"time-zone-field"\x3e\n\n \x3c!-- Available time zone regions --\x3e\n \x3cselect class\x3d"time-zone-region"\n ng-model\x3d"region"\n ng-options\x3d"name for name in regions | orderBy: name"\x3e\x3c/select\x3e\n\n \x3c!-- Time zones within selected region --\x3e\n \x3cselect class\x3d"time-zone"\n ng-disabled\x3d"!region"\n ng-model\x3d"model"\n ng-options\x3d"name for (name, value) in timeZones[region] | orderBy: name"\x3e\x3c/select\x3e\n\n\x3c/div\x3e') } ]); angular.module("app/groupList/templates/guacGroupList.html", []).run(["$templateCache", function(a) { a.put("app/groupList/templates/guacGroupList.html", '\x3cdiv class\x3d"group-list"\x3e\n\n \x3cscript type\x3d"text/ng-template" id\x3d"nestedItem.html"\x3e\n \x3cdiv class\x3d"{{item.type}}" ng-if\x3d"isVisible(item.type)"\n ng-class\x3d"{\n expanded : item.expanded,\n expandable : item.expandable,\n empty : !item.children.length\n }"\x3e\n\n \x3c!-- Item caption --\x3e\n \x3cdiv class\x3d"caption"\x3e\n\n \x3c!-- Expand/collapse icon --\x3e\n \x3cdiv class\x3d"icon expand" ng-click\x3d"toggleExpanded(item)"\n ng-if\x3d"item.expandable"\x3e\x3c/div\x3e\n\n \x3cng-include src\x3d"templates[item.type]"/\x3e\n\n \x3c/div\x3e\n\n \x3c!-- Children of item (if any) --\x3e\n \x3cdiv class\x3d"children" ng-if\x3d"item.expanded"\x3e\n \x3cdiv class\x3d"list-item" ng-repeat\x3d"item in item.children | orderBy : \'name\'"\n ng-include\x3d"\'nestedItem.html\'"\x3e\x3c/div\x3e\n \x3c/div\x3e\n\n \x3c/div\x3e\n \x3c/script\x3e\n\n \x3c!-- Root-level connections / groups --\x3e\n \x3cdiv class\x3d"group-list-page"\x3e\n \x3cdiv class\x3d"list-item" ng-repeat\x3d"item in childrenPage" ng-include\x3d"\'nestedItem.html\'"\x3e\x3c/div\x3e\n \x3c/div\x3e\n\n \x3c!-- Pager for connections / groups --\x3e\n \x3cguac-pager page\x3d"childrenPage" items\x3d"rootItems | orderBy : [\'weight\', \'name\']"\n page-size\x3d"pageSize"\x3e\x3c/guac-pager\x3e\n\n\x3c/div\x3e') } ]); angular.module("app/groupList/templates/guacGroupListFilter.html", []).run(["$templateCache", function(a) { a.put("app/groupList/templates/guacGroupListFilter.html", '\x3cdiv class\x3d"group-list-filter filter"\x3e\n\n \x3c!-- Filter string --\x3e\n \x3cinput class\x3d"search-string" placeholder\x3d"{{placeholder()}}" type\x3d"text" ng-model\x3d"searchString"/\x3e\n\n\x3c/div\x3e') } ]); angular.module("app/home/templates/connection.html", []).run(["$templateCache", function(a) { a.put("app/home/templates/connection.html", '\x3ca class\x3d"home-connection"\n ng-href\x3d"#/client/{{context.getClientIdentifier(item)}}"\n ng-class\x3d"{active: item.getActiveConnections()}"\x3e\n\n \x3c!-- Connection icon --\x3e\n \x3cdiv class\x3d"icon type" ng-class\x3d"item.protocol"\x3e\x3c/div\x3e\n\n \x3c!-- Connection name --\x3e\n \x3cspan class\x3d"name"\x3e{{item.name}}\x3c/span\x3e\n\n \x3c!-- Active user count --\x3e\n \x3cspan class\x3d"activeUserCount" ng-show\x3d"item.getActiveConnections()"\n translate\x3d"HOME.INFO_ACTIVE_USER_COUNT"\n translate-values\x3d"{USERS: item.getActiveConnections()}"\x3e\x3c/span\x3e\n\n\x3c/a\x3e') } ]); angular.module("app/home/templates/connectionGroup.html", []).run(["$templateCache", function(a) { a.put("app/home/templates/connectionGroup.html", '\x3cspan class\x3d"home-connection-group name"\x3e\n \x3ca ng-show\x3d"item.balancing" ng-href\x3d"#/client/{{context.getClientIdentifier(item)}}"\x3e{{item.name}}\x3c/a\x3e\n \x3cspan ng-show\x3d"!item.balancing"\x3e{{item.name}}\x3c/span\x3e\n\x3c/span\x3e') } ]); angular.module("app/home/templates/guacRecentConnections.html", []).run(["$templateCache", function(a) { a.put("app/home/templates/guacRecentConnections.html", '\x3cdiv\x3e\n\n \x3c!-- Text displayed if no recent connections exist --\x3e\n \x3cp class\x3d"placeholder" ng-hide\x3d"hasRecentConnections()"\x3e{{\'HOME.INFO_NO_RECENT_CONNECTIONS\' | translate}}\x3c/p\x3e\n\n \x3c!-- All active connections --\x3e\n \x3cdiv ng-repeat\x3d"activeConnection in activeConnections" class\x3d"connection"\x3e\n \x3ca href\x3d"#/client/{{activeConnection.client.id}}"\x3e\n\n \x3c!-- Connection thumbnail --\x3e\n \x3cdiv class\x3d"thumbnail"\x3e\n \x3cguac-thumbnail client\x3d"activeConnection.client"\x3e\x3c/guac-thumbnail\x3e\n \x3c/div\x3e\n\n \x3c!-- Connection name --\x3e\n \x3cdiv class\x3d"caption"\x3e\n \x3cspan class\x3d"name"\x3e{{activeConnection.name}}\x3c/span\x3e\n \x3c/div\x3e\n\n \x3c/a\x3e\n \x3c/div\x3e\n \n \x3c!-- All recent connections --\x3e\n \x3cdiv ng-repeat\x3d"recentConnection in recentConnections" class\x3d"connection"\x3e\n \x3ca href\x3d"#/client/{{recentConnection.entry.id}}"\x3e\n\n \x3c!-- Connection thumbnail --\x3e\n \x3cdiv class\x3d"thumbnail"\x3e\n \x3cimg alt\x3d"{{recentConnection.name}}" ng-src\x3d"{{recentConnection.entry.thumbnail}}"/\x3e\n \x3c/div\x3e\n\n \x3c!-- Connection name --\x3e\n \x3cdiv class\x3d"caption"\x3e\n \x3cspan class\x3d"name"\x3e{{recentConnection.name}}\x3c/span\x3e\n \x3c/div\x3e\n\n \x3c/a\x3e\n \x3c/div\x3e\n\n\x3c/div\x3e') } ]); angular.module("app/home/templates/home.html", []).run(["$templateCache", function(a) { a.put("app/home/templates/home.html", '\n\x3cdiv class\x3d"view" ng-class\x3d"{loading: !isLoaded()}"\x3e\n\n \x3cdiv class\x3d"connection-list-ui"\x3e\n\n \x3c!-- The recent connections for this user --\x3e\n \x3cdiv class\x3d"header"\x3e\n \x3ch2\x3e{{\'HOME.SECTION_HEADER_RECENT_CONNECTIONS\' | translate}}\x3c/h2\x3e\n \x3cguac-user-menu\x3e\x3c/guac-user-menu\x3e\n \x3c/div\x3e\n \x3cdiv class\x3d"recent-connections"\x3e\n \x3cguac-recent-connections root-groups\x3d"rootConnectionGroups"\x3e\x3c/guac-recent-connections\x3e\n \x3c/div\x3e\n\n \x3c!-- All connections for this user --\x3e\n \x3cdiv class\x3d"header"\x3e\n \x3ch2\x3e{{\'HOME.SECTION_HEADER_ALL_CONNECTIONS\' | translate}}\x3c/h2\x3e\n \x3cguac-group-list-filter connection-groups\x3d"rootConnectionGroups"\n filtered-connection-groups\x3d"filteredRootConnectionGroups"\n placeholder\x3d"\'HOME.FIELD_PLACEHOLDER_FILTER\' | translate"\n connection-properties\x3d"filteredConnectionProperties"\n connection-group-properties\x3d"filteredConnectionGroupProperties"\x3e\x3c/guac-group-list-filter\x3e\n \x3c/div\x3e\n \x3cdiv class\x3d"all-connections"\x3e\n \x3cguac-group-list\n context\x3d"context"\n connection-groups\x3d"filteredRootConnectionGroups"\n templates\x3d"{\n \'connection\' : \'app/home/templates/connection.html\',\n \'connection-group\' : \'app/home/templates/connectionGroup.html\'\n }"\n page-size\x3d"20"\x3e\x3c/guac-group-list\x3e\n \x3c/div\x3e\n\n \x3c/div\x3e\n\n\x3c/div\x3e') } ]); angular.module("app/list/templates/guacFilter.html", []).run(["$templateCache", function(a) { a.put("app/list/templates/guacFilter.html", '\x3cdiv class\x3d"filter"\x3e\n\n \x3c!-- Filter string --\x3e\n \x3cinput class\x3d"search-string" placeholder\x3d"{{placeholder()}}" type\x3d"text" ng-model\x3d"searchString"/\x3e\n\n\x3c/div\x3e') } ]); angular.module("app/list/templates/guacPager.html", []).run(["$templateCache", function(a) { a.put("app/list/templates/guacPager.html", '\x3cdiv class\x3d"pager" ng-show\x3d"pageNumbers.length \x3e 1"\x3e\n\n \x3c!-- First / Previous --\x3e\n \x3cdiv class\x3d"first-page icon" ng-class\x3d"{disabled: !canSelectPage(firstPage)}" ng-click\x3d"selectPage(firstPage)"/\x3e\n \x3cdiv class\x3d"prev-page icon" ng-class\x3d"{disabled: !canSelectPage(previousPage)}" ng-click\x3d"selectPage(previousPage)"/\x3e\n\n \x3c!-- Indicator of the existence of pages before the first page number shown --\x3e\n \x3cdiv class\x3d"more-pages" ng-show\x3d"hasMorePagesBefore()"\x3e...\x3c/div\x3e\n \n \x3c!-- Page numbers --\x3e\n \x3cul class\x3d"page-numbers"\x3e\n \x3cli class\x3d"set-page"\n ng-class\x3d"{current: isSelected(pageNumber)}"\n ng-repeat\x3d"pageNumber in pageNumbers"\n ng-click\x3d"selectPage(pageNumber)"\x3e{{pageNumber}}\x3c/li\x3e\n \x3c/ul\x3e\n\n \x3c!-- Indicator of the existence of pages beyond the last page number shown --\x3e\n \x3cdiv class\x3d"more-pages" ng-show\x3d"hasMorePagesAfter()"\x3e...\x3c/div\x3e\n\n \x3c!-- Next / Last --\x3e\n \x3cdiv class\x3d"next-page icon" ng-class\x3d"{disabled: !canSelectPage(nextPage)}" ng-click\x3d"selectPage(nextPage)"/\x3e\n \x3cdiv class\x3d"last-page icon" ng-class\x3d"{disabled: !canSelectPage(lastPage)}" ng-click\x3d"selectPage(lastPage)"/\x3e\n\n\x3c/div\x3e') } ]); angular.module("app/list/templates/guacUserItem.html", []).run(["$templateCache", function(a) { a.put("app/list/templates/guacUserItem.html", '\x3cdiv class\x3d"user-item" ng-class\x3d"{\'anonymous\' : isAnonymous() }"\x3e\n \x3cspan class\x3d"username"\x3e{{displayName}}\x3c/span\x3e\n\x3c/div\x3e') } ]); angular.module("app/login/templates/login.html", []).run(["$templateCache", function(a) { a.put("app/login/templates/login.html", '\x3cdiv class\x3d"login-ui" ng-class\x3d"{error: loginError, continuation: isContinuation(), initial: !isContinuation()}" \x3e\n\n \x3c!-- Login error message --\x3e\n \x3cp class\x3d"login-error" translate\x3d"{{loginError.key}}"\n translate-values\x3d"{{loginError.variables}}"\x3e\x3c/p\x3e\n\n \x3cdiv class\x3d"login-dialog-middle"\x3e\n\n \x3cdiv class\x3d"login-dialog"\x3e\n\n \x3cform class\x3d"login-form" ng-submit\x3d"login()"\x3e\n\n \x3c!-- Guacamole version --\x3e\n \x3cdiv class\x3d"logo"\x3e\x3c/div\x3e\n \x3cdiv class\x3d"version"\x3e\n \x3cdiv class\x3d"app-name"\x3e{{\'APP.NAME\' | translate}}\x3c/div\x3e\n \x3cdiv class\x3d"version-number"\x3e{{\'APP.VERSION\' | translate}}\x3c/div\x3e\n \x3c/div\x3e\n\n \x3c!-- Login message/instructions --\x3e\n \x3cp ng-show\x3d"helpText" translate\x3d"{{helpText.key}}"\n translate-values\x3d"{{helpText.variables}}"\x3e\x3c/p\x3e\n\n \x3c!-- Login fields --\x3e\n \x3cdiv class\x3d"login-fields"\x3e\n \x3cguac-form namespace\x3d"\'LOGIN\'" content\x3d"remainingFields" model\x3d"enteredValues"\x3e\x3c/guac-form\x3e\n \x3c/div\x3e\n\n \x3c!-- Submit button --\x3e\n \x3cdiv class\x3d"buttons"\x3e\n \x3cinput type\x3d"submit" name\x3d"login" class\x3d"login" value\x3d"{{\'LOGIN.ACTION_LOGIN\' | translate}}"/\x3e\n \x3cinput type\x3d"submit" name\x3d"login" class\x3d"continue-login" value\x3d"{{\'LOGIN.ACTION_CONTINUE\' | translate}}"/\x3e\n \x3c/div\x3e\n\n \x3c/form\x3e\n\n \x3c/div\x3e\n\n \x3c/div\x3e\n\n\x3c/div\x3e') } ]); angular.module("app/manage/templates/connectionGroupPermission.html", []).run(["$templateCache", function(a) { a.put("app/manage/templates/connectionGroupPermission.html", '\x3cdiv class\x3d"choice"\x3e\n\n \x3c!-- Connection group icon --\x3e\n \x3cdiv class\x3d"icon type"\x3e\x3c/div\x3e\n\n \x3c!-- Permission checkbox --\x3e\n \x3cinput type\x3d"checkbox" ng-model\x3d"context.getPermissionFlags().connectionGroupPermissions.READ[item.identifier]"\n ng-change\x3d"context.connectionGroupPermissionChanged(item.identifier)"/\x3e\n\n \x3c!-- Connection group name --\x3e\n \x3cspan class\x3d"name"\x3e{{item.name}}\x3c/span\x3e\n\n\x3c/div\x3e') } ]); angular.module("app/manage/templates/connectionPermission.html", []).run(["$templateCache", function(a) { a.put("app/manage/templates/connectionPermission.html", '\x3cdiv class\x3d"choice"\x3e\n\n \x3c!-- Connection icon --\x3e\n \x3cdiv class\x3d"icon type" ng-class\x3d"item.protocol"\x3e\x3c/div\x3e\n\n \x3c!-- Permission checkbox --\x3e\n \x3cinput type\x3d"checkbox" ng-model\x3d"context.getPermissionFlags().connectionPermissions.READ[item.identifier]"\n ng-change\x3d"context.connectionPermissionChanged(item.identifier)"/\x3e\n\n \x3c!-- Connection name --\x3e\n \x3cspan class\x3d"name"\x3e{{item.name}}\x3c/span\x3e\n\n\x3c/div\x3e') } ]); angular.module("app/manage/templates/locationChooser.html", []).run(["$templateCache", function(a) { a.put("app/manage/templates/locationChooser.html", '\x3cdiv class\x3d"location-chooser"\x3e\n\n \x3c!-- Chosen group name --\x3e\n \x3cdiv ng-click\x3d"toggleMenu()" class\x3d"location"\x3e{{chosenConnectionGroupName}}\x3c/div\x3e\n\n \x3c!-- Dropdown hierarchical menu of groups --\x3e\n \x3cdiv ng-show\x3d"menuOpen" class\x3d"dropdown"\x3e\n \x3cguac-group-list\n context\x3d"groupListContext"\n show-root-group\x3d"true"\n connection-groups\x3d"rootGroups"\n templates\x3d"{\n \'connection-group\' : \'app/manage/templates/locationChooserConnectionGroup.html\'\n }"/\x3e\n \x3c/div\x3e\n\n\x3c/div\x3e') } ]); angular.module("app/manage/templates/locationChooserConnectionGroup.html", []).run(["$templateCache", function(a) { a.put("app/manage/templates/locationChooserConnectionGroup.html", '\x3cspan class\x3d"name" ng-click\x3d"context.chooseGroup(item.wrappedItem)"\x3e\n\n {{item.name}}\n\x3c/span\x3e') } ]); angular.module("app/manage/templates/manageConnection.html", []).run(["$templateCache", function(a) { a.put("app/manage/templates/manageConnection.html", '\n\x3cdiv class\x3d"view" ng-class\x3d"{loading: !isLoaded()}"\x3e\n\n \x3c!-- Main property editor --\x3e\n \x3cdiv class\x3d"header"\x3e\n \x3ch2\x3e{{\'MANAGE_CONNECTION.SECTION_HEADER_EDIT_CONNECTION\' | translate}}\x3c/h2\x3e\n \x3cguac-user-menu\x3e\x3c/guac-user-menu\x3e\n \x3c/div\x3e\n \x3cdiv class\x3d"section"\x3e\n \x3ctable class\x3d"properties"\x3e\n \n \x3c!-- Edit connection name --\x3e\n \x3ctr\x3e\n \x3cth\x3e{{\'MANAGE_CONNECTION.FIELD_HEADER_NAME\' | translate}}\x3c/th\x3e\n \n \x3ctd\x3e\x3cinput type\x3d"text" ng-model\x3d"connection.name" autocorrect\x3d"off" autocapitalize\x3d"off"/\x3e\x3c/td\x3e\n \x3c/tr\x3e\n \n \x3c!-- Edit connection location --\x3e\n \x3ctr\x3e\n \x3cth\x3e{{\'MANAGE_CONNECTION.FIELD_HEADER_LOCATION\' | translate}}\x3c/th\x3e\n \n \x3ctd\x3e\n \x3clocation-chooser\n data-data-source\x3d"selectedDataSource" root-group\x3d"rootGroup"\n value\x3d"connection.parentIdentifier"\x3e\x3c/location-chooser\x3e\n \x3c/td\x3e\n \x3c/tr\x3e\n \n \n \x3c!-- Edit connection protocol --\x3e\n \x3ctr\x3e\n \x3cth\x3e{{\'MANAGE_CONNECTION.FIELD_HEADER_PROTOCOL\' | translate}}\x3c/th\x3e\n \x3ctd\x3e\n \x3cselect ng-model\x3d"connection.protocol" ng-options\x3d"name as getProtocolName(protocol.name) | translate for (name, protocol) in protocols | orderBy: name"\x3e\x3c/select\x3e\n \x3c/td\x3e\n \x3c/tr\x3e\n \x3c/table\x3e\n \x3c/div\x3e\n\n \x3c!-- Connection attributes section --\x3e\n \x3cdiv class\x3d"attributes"\x3e\n \x3cguac-form namespace\x3d"\'CONNECTION_ATTRIBUTES\'" content\x3d"attributes"\n model\x3d"connection.attributes" model-only\x3d"!canChangeAllAttributes()"\x3e\x3c/guac-form\x3e\n \x3c/div\x3e\n\n \x3c!-- Connection parameters --\x3e\n \x3ch2 class\x3d"header"\x3e{{\'MANAGE_CONNECTION.SECTION_HEADER_PARAMETERS\' | translate}}\x3c/h2\x3e\n \x3cdiv class\x3d"section connection-parameters" ng-class\x3d"{loading: !parameters}"\x3e\n \x3cguac-form namespace\x3d"getNamespace(connection.protocol)"\n content\x3d"protocols[connection.protocol].connectionForms"\n model\x3d"parameters"\x3e\x3c/guac-form\x3e\n \x3c/div\x3e\n\n \x3c!-- Form action buttons --\x3e\n \x3cdiv class\x3d"action-buttons"\x3e\n \x3cbutton ng-show\x3d"canSaveConnection" ng-click\x3d"saveConnection()"\x3e{{\'MANAGE_CONNECTION.ACTION_SAVE\' | translate}}\x3c/button\x3e\n \x3cbutton ng-show\x3d"canCloneConnection" ng-click\x3d"cloneConnection()"\x3e{{\'MANAGE_CONNECTION.ACTION_CLONE\' | translate}}\x3c/button\x3e\n \x3cbutton ng-click\x3d"cancel()"\x3e{{\'MANAGE_CONNECTION.ACTION_CANCEL\' | translate}}\x3c/button\x3e\n \x3cbutton ng-show\x3d"canDeleteConnection" ng-click\x3d"deleteConnection()" class\x3d"danger"\x3e{{\'MANAGE_CONNECTION.ACTION_DELETE\' | translate}}\x3c/button\x3e\n \x3c/div\x3e\n\n \x3c!-- Connection history --\x3e\n \x3ch2 class\x3d"header"\x3e{{\'MANAGE_CONNECTION.SECTION_HEADER_HISTORY\' | translate}}\x3c/h2\x3e\n \x3cdiv class\x3d"history section" ng-class\x3d"{loading: !historyEntryWrappers}"\x3e\n \x3cp ng-hide\x3d"historyEntryWrappers.length"\x3e{{\'MANAGE_CONNECTION.INFO_CONNECTION_NOT_USED\' | translate}}\x3c/p\x3e\n\n \x3c!-- History list --\x3e\n \x3ctable ng-show\x3d"historyEntryWrappers.length"\x3e\n \x3cthead\x3e\n \x3ctr\x3e\n \x3cth\x3e{{\'MANAGE_CONNECTION.TABLE_HEADER_HISTORY_USERNAME\' | translate}}\x3c/th\x3e\n \x3cth\x3e{{\'MANAGE_CONNECTION.TABLE_HEADER_HISTORY_START\' | translate}}\x3c/th\x3e\n \x3cth\x3e{{\'MANAGE_CONNECTION.TABLE_HEADER_HISTORY_DURATION\' | translate}}\x3c/th\x3e\n \x3cth\x3e{{\'MANAGE_CONNECTION.TABLE_HEADER_HISTORY_REMOTEHOST\' | translate}}\x3c/th\x3e\n \x3c/tr\x3e\n \x3c/thead\x3e\n \x3ctbody\x3e\n \x3ctr ng-repeat\x3d"wrapper in wrapperPage"\x3e\n \x3ctd class\x3d"username"\x3e\x3cguac-user-item username\x3d"wrapper.entry.username"\x3e\x3c/guac-user-item\x3e\x3c/td\x3e\n \x3ctd class\x3d"start"\x3e{{wrapper.entry.startDate | date:historyDateFormat}}\x3c/td\x3e\n \x3ctd class\x3d"duration"\n translate\x3d"{{wrapper.durationText}}"\n translate-values\x3d"{VALUE: wrapper.duration.value, UNIT: wrapper.duration.unit}"\x3e\x3c/td\x3e\n \x3ctd class\x3d"remoteHost"\x3e{{wrapper.entry.remoteHost}}\x3c/td\x3e\n \x3c/tr\x3e\n \x3c/tbody\x3e\n \x3c/table\x3e\n\n \x3c!-- Pager controls for history list --\x3e\n \x3cguac-pager page\x3d"wrapperPage" items\x3d"historyEntryWrappers"\x3e\x3c/guac-pager\x3e\n\n \x3c/div\x3e\n\n\x3c/div\x3e') } ]); angular.module("app/manage/templates/manageConnectionGroup.html", []).run(["$templateCache", function(a) { a.put("app/manage/templates/manageConnectionGroup.html", '\n\x3cdiv class\x3d"view" ng-class\x3d"{loading: !isLoaded()}"\x3e\n\n \x3c!-- Main property editor --\x3e\n \x3cdiv class\x3d"header"\x3e\n \x3ch2\x3e{{\'MANAGE_CONNECTION_GROUP.SECTION_HEADER_EDIT_CONNECTION_GROUP\' | translate}}\x3c/h2\x3e\n \x3cguac-user-menu\x3e\x3c/guac-user-menu\x3e\n \x3c/div\x3e\n \x3cdiv class\x3d"section"\x3e\n \x3ctable class\x3d"properties"\x3e\n \n \x3c!-- Edit connection group name --\x3e\n \x3ctr\x3e\n \x3cth\x3e{{\'MANAGE_CONNECTION_GROUP.FIELD_HEADER_NAME\' | translate}}\x3c/th\x3e\n \n \x3ctd\x3e\x3cinput type\x3d"text" ng-model\x3d"connectionGroup.name" autocorrect\x3d"off" autocapitalize\x3d"off"/\x3e\x3c/td\x3e\n \x3c/tr\x3e\n \n \x3c!-- Edit connection group location --\x3e\n \x3ctr\x3e\n \x3cth\x3e{{\'MANAGE_CONNECTION_GROUP.FIELD_HEADER_LOCATION\' | translate}}\x3c/th\x3e\n \n \x3ctd\x3e\n \x3clocation-chooser\n data-data-source\x3d"selectedDataSource" root-group\x3d"rootGroup"\n value\x3d"connectionGroup.parentIdentifier"\x3e\x3c/location-chooser\x3e\n \x3c/td\x3e\n \x3c/tr\x3e\n \n \n \x3c!-- Edit connection group type --\x3e\n \x3ctr\x3e\n \x3cth\x3e{{\'MANAGE_CONNECTION_GROUP.FIELD_HEADER_TYPE\' | translate}}\x3c/th\x3e\n \x3ctd\x3e\n \x3cselect ng-model\x3d"connectionGroup.type" ng-options\x3d"type.value as type.label | translate for type in types | orderBy: name"\x3e\x3c/select\x3e\n \x3c/td\x3e\n \x3c/tr\x3e\n \x3c/table\x3e\n \x3c/div\x3e\n\n \x3c!-- Connection group attributes section --\x3e\n \x3cdiv class\x3d"attributes"\x3e\n \x3cguac-form namespace\x3d"\'CONNECTION_GROUP_ATTRIBUTES\'" content\x3d"attributes"\n model\x3d"connectionGroup.attributes" model-only\x3d"!canChangeAllAttributes()"\x3e\x3c/guac-form\x3e\n \x3c/div\x3e\n\n \x3c!-- Form action buttons --\x3e\n \x3cdiv class\x3d"action-buttons"\x3e\n \x3cbutton ng-show\x3d"canSaveConnectionGroup" ng-click\x3d"saveConnectionGroup()"\x3e{{\'MANAGE_CONNECTION_GROUP.ACTION_SAVE\' | translate}}\x3c/button\x3e\n \x3cbutton ng-click\x3d"cancel()"\x3e{{\'MANAGE_CONNECTION_GROUP.ACTION_CANCEL\' | translate}}\x3c/button\x3e\n \x3cbutton ng-show\x3d"canDeleteConnectionGroup" ng-click\x3d"deleteConnectionGroup()" class\x3d"danger"\x3e{{\'MANAGE_CONNECTION_GROUP.ACTION_DELETE\' | translate}}\x3c/button\x3e\n \x3c/div\x3e\n\n\x3c/div\x3e') } ]); angular.module("app/manage/templates/manageSharingProfile.html", []).run(["$templateCache", function(a) { a.put("app/manage/templates/manageSharingProfile.html", '\x3cdiv class\x3d"view" ng-class\x3d"{loading: !isLoaded()}"\x3e\n\n \x3c!-- Main property editor --\x3e\n \x3cdiv class\x3d"header"\x3e\n \x3ch2\x3e{{\'MANAGE_SHARING_PROFILE.SECTION_HEADER_EDIT_SHARING_PROFILE\' | translate}}\x3c/h2\x3e\n \x3cguac-user-menu\x3e\x3c/guac-user-menu\x3e\n \x3c/div\x3e\n \x3cdiv class\x3d"section"\x3e\n \x3ctable class\x3d"properties"\x3e\n \x3ctr\x3e\n \x3cth\x3e{{\'MANAGE_SHARING_PROFILE.FIELD_HEADER_NAME\' | translate}}\x3c/th\x3e\n \x3ctd\x3e\x3cinput type\x3d"text" ng-model\x3d"sharingProfile.name"\n autocorrect\x3d"off" autocapitalize\x3d"off"/\x3e\x3c/td\x3e\n \x3c/tr\x3e\n \x3ctr\x3e\n \x3cth\x3e{{\'MANAGE_SHARING_PROFILE.FIELD_HEADER_PRIMARY_CONNECTION\' | translate}}\x3c/th\x3e\n \x3ctd\x3e{{primaryConnection.name}}\x3c/td\x3e\n \x3c/tr\x3e\n \x3c/table\x3e\n \x3c/div\x3e\n\n \x3c!-- Sharing profile attributes section --\x3e\n \x3cdiv class\x3d"attributes"\x3e\n \x3cguac-form namespace\x3d"\'SHARING_PROFILE_ATTRIBUTES\'" content\x3d"attributes"\n model\x3d"sharingProfile.attributes" model-only\x3d"!canChangeAllAttributes()"\x3e\x3c/guac-form\x3e\n \x3c/div\x3e\n\n \x3c!-- Sharing profile parameters --\x3e\n \x3ch2 class\x3d"header"\x3e{{\'MANAGE_SHARING_PROFILE.SECTION_HEADER_PARAMETERS\' | translate}}\x3c/h2\x3e\n \x3cdiv class\x3d"section connection-parameters" ng-class\x3d"{loading: !parameters}"\x3e\n \x3cguac-form namespace\x3d"getNamespace(primaryConnection.protocol)"\n content\x3d"protocols[primaryConnection.protocol].sharingProfileForms"\n model\x3d"parameters"\x3e\x3c/guac-form\x3e\n \x3c/div\x3e\n\n \x3c!-- Form action buttons --\x3e\n \x3cdiv class\x3d"action-buttons"\x3e\n \x3cbutton ng-show\x3d"canSaveSharingProfile" ng-click\x3d"saveSharingProfile()"\x3e{{\'MANAGE_SHARING_PROFILE.ACTION_SAVE\' | translate}}\x3c/button\x3e\n \x3cbutton ng-show\x3d"canCloneSharingProfile" ng-click\x3d"cloneSharingProfile()"\x3e{{\'MANAGE_SHARING_PROFILE.ACTION_CLONE\' | translate}}\x3c/button\x3e\n \x3cbutton ng-click\x3d"cancel()"\x3e{{\'MANAGE_SHARING_PROFILE.ACTION_CANCEL\' | translate}}\x3c/button\x3e\n \x3cbutton ng-show\x3d"canDeleteSharingProfile" ng-click\x3d"deleteSharingProfile()" class\x3d"danger"\x3e{{\'MANAGE_SHARING_PROFILE.ACTION_DELETE\' | translate}}\x3c/button\x3e\n \x3c/div\x3e\n\n\x3c/div\x3e') } ]); angular.module("app/manage/templates/manageUser.html", []).run(["$templateCache", function(a) { a.put("app/manage/templates/manageUser.html", '\n\x3cdiv class\x3d"manage-user view" ng-class\x3d"{loading: !isLoaded()}"\x3e\n\n \x3c!-- User header and data source tabs --\x3e\n \x3cdiv class\x3d"username header"\x3e\n \x3ch2\x3e{{\'MANAGE_USER.SECTION_HEADER_EDIT_USER\' | translate}}\x3c/h2\x3e\n \x3cguac-user-menu\x3e\x3c/guac-user-menu\x3e\n \x3c/div\x3e\n \x3cdiv class\x3d"page-tabs"\x3e\n \x3cguac-page-list pages\x3d"accountPages"\x3e\x3c/guac-page-list\x3e\n \x3c/div\x3e\n\n \x3c!-- Warn if user is read-only --\x3e\n \x3cdiv class\x3d"section" ng-show\x3d"isReadOnly()"\x3e\n \x3cp class\x3d"notice read-only"\x3e{{\'MANAGE_USER.INFO_READ_ONLY\' | translate}}\x3c/p\x3e\n \x3c/div\x3e\n\n \x3c!-- Sections applicable to non-read-only users --\x3e\n \x3cdiv ng-show\x3d"!isReadOnly()"\x3e\n\n \x3c!-- User password section --\x3e\n \x3cdiv class\x3d"section"\x3e\n \x3ctable class\x3d"properties"\x3e\n \x3ctr\x3e\n \x3cth\x3e{{\'MANAGE_USER.FIELD_HEADER_USERNAME\' | translate}}\x3c/th\x3e\n \x3ctd\x3e\n \x3cinput ng-show\x3d"canEditUsername()" ng-model\x3d"user.username" type\x3d"text"/\x3e\n \x3cspan ng-hide\x3d"canEditUsername()"\x3e{{user.username}}\x3c/span\x3e\n \x3c/td\x3e\n \x3c/tr\x3e\n \x3ctr\x3e\n \x3cth\x3e{{\'MANAGE_USER.FIELD_HEADER_PASSWORD\' | translate}}\x3c/th\x3e\n \x3ctd\x3e\x3cinput ng-model\x3d"user.password" type\x3d"password" /\x3e\x3c/td\x3e\n \x3c/tr\x3e\n \x3ctr\x3e\n \x3cth\x3e{{\'MANAGE_USER.FIELD_HEADER_PASSWORD_AGAIN\' | translate}}\x3c/th\x3e\n \x3ctd\x3e\x3cinput ng-model\x3d"passwordMatch" type\x3d"password" /\x3e\x3c/td\x3e\n \x3c/tr\x3e\n \x3c/table\x3e\n \x3c/div\x3e\n\n \x3c!-- User attributes section --\x3e\n \x3cdiv class\x3d"attributes" ng-show\x3d"canChangeAttributes()"\x3e\n \x3cguac-form namespace\x3d"\'USER_ATTRIBUTES\'" content\x3d"attributes"\n model\x3d"user.attributes" model-only\x3d"!canChangeAllAttributes()"\x3e\x3c/guac-form\x3e\n \x3c/div\x3e\n\n \x3c!-- System permissions section --\x3e\n \x3cdiv class\x3d"system-permissions" ng-show\x3d"canChangePermissions()"\x3e\n \x3ch2 class\x3d"header"\x3e{{\'MANAGE_USER.SECTION_HEADER_PERMISSIONS\' | translate}}\x3c/h2\x3e\n \x3cdiv class\x3d"section"\x3e\n \x3ctable class\x3d"properties"\x3e\n \x3ctr ng-repeat\x3d"systemPermissionType in systemPermissionTypes"\n ng-show\x3d"canChangeSystemPermissions()"\x3e\n \x3cth\x3e{{systemPermissionType.label | translate}}\x3c/th\x3e\n \x3ctd\x3e\x3cinput type\x3d"checkbox" ng-model\x3d"permissionFlags.systemPermissions[systemPermissionType.value]"\n ng-change\x3d"systemPermissionChanged(systemPermissionType.value)"/\x3e\x3c/td\x3e\n \x3c/tr\x3e\n \x3ctr\x3e\n \x3cth\x3e{{\'MANAGE_USER.FIELD_HEADER_CHANGE_OWN_PASSWORD\' | translate}}\x3c/th\x3e\n \x3ctd\x3e\x3cinput type\x3d"checkbox" ng-model\x3d"permissionFlags.userPermissions.UPDATE[selfUsername]"\n ng-change\x3d"userPermissionChanged(\'UPDATE\', selfUsername)"/\x3e\x3c/td\x3e\n \x3c/tr\x3e\n \x3c/table\x3e\n \x3c/div\x3e\n \x3c/div\x3e\n\n \x3c!-- Connection permissions section --\x3e\n \x3cdiv class\x3d"connection-permissions" ng-show\x3d"canChangePermissions()"\x3e\n \x3cdiv class\x3d"header"\x3e\n \x3ch2\x3e{{\'MANAGE_USER.SECTION_HEADER_CONNECTIONS\' | translate}}\x3c/h2\x3e\n \x3cguac-group-list-filter connection-groups\x3d"rootGroups"\n filtered-connection-groups\x3d"filteredRootGroups"\n placeholder\x3d"\'MANAGE_USER.FIELD_PLACEHOLDER_FILTER\' | translate"\n connection-properties\x3d"filteredConnectionProperties"\n connection-group-properties\x3d"filteredConnectionGroupProperties"\x3e\x3c/guac-group-list-filter\x3e\n \x3c/div\x3e\n \x3cdiv class\x3d"section"\x3e\n \x3cguac-group-list\n context\x3d"groupListContext"\n connection-groups\x3d"filteredRootGroups"\n templates\x3d"{\n \'connection\' : \'app/manage/templates/connectionPermission.html\',\n \'sharing-profile\' : \'app/manage/templates/sharingProfilePermission.html\',\n \'connection-group\' : \'app/manage/templates/connectionGroupPermission.html\'\n }"\n page-size\x3d"20"/\x3e\n \x3c/div\x3e\n \x3c/div\x3e\n\n \x3c!-- Form action buttons --\x3e\n \x3cdiv class\x3d"action-buttons"\x3e\n \x3cbutton ng-show\x3d"canSaveUser()" ng-click\x3d"saveUser()"\x3e{{\'MANAGE_USER.ACTION_SAVE\' | translate}}\x3c/button\x3e\n \x3cbutton ng-show\x3d"canCloneUser()" ng-click\x3d"cloneUser()"\x3e{{\'MANAGE_USER.ACTION_CLONE\' | translate}}\x3c/button\x3e\n \x3cbutton ng-click\x3d"cancel()"\x3e{{\'MANAGE_USER.ACTION_CANCEL\' | translate}}\x3c/button\x3e\n \x3cbutton ng-show\x3d"canDeleteUser()" ng-click\x3d"deleteUser()" class\x3d"danger"\x3e{{\'MANAGE_USER.ACTION_DELETE\' | translate}}\x3c/button\x3e\n \x3c/div\x3e\n\n \x3c/div\x3e\n\n\x3c/div\x3e') } ]); angular.module("app/manage/templates/sharingProfilePermission.html", []).run(["$templateCache", function(a) { a.put("app/manage/templates/sharingProfilePermission.html", '\x3cdiv class\x3d"choice"\x3e\n\n \x3c!-- Sharing profile icon --\x3e\n \x3cdiv class\x3d"icon type"\x3e\x3c/div\x3e\n\n \x3c!-- Permission checkbox --\x3e\n \x3cinput type\x3d"checkbox" ng-model\x3d"context.getPermissionFlags().sharingProfilePermissions.READ[item.identifier]"\n ng-change\x3d"context.sharingProfilePermissionChanged(item.identifier)"/\x3e\n\n \x3c!-- Sharing profile name --\x3e\n \x3cspan class\x3d"name"\x3e{{item.name}}\x3c/span\x3e\n\n\x3c/div\x3e') } ]); angular.module("app/navigation/templates/guacMenu.html", []).run(["$templateCache", function(a) { a.put("app/navigation/templates/guacMenu.html", '\x3cdiv class\x3d"menu-dropdown" ng-class\x3d"{open: menuShown}" ng-click\x3d"toggleMenu()"\x3e\n \x3cdiv class\x3d"menu-title"\x3e{{menuTitle}}\x3c/div\x3e\n \x3cdiv class\x3d"menu-indicator"\x3e\x3c/div\x3e\n\n \x3c!-- Menu contents --\x3e\n \x3cdiv class\x3d"menu-contents" ng-transclude\x3e\x3c/div\x3e\n\x3c/div\x3e') } ]); angular.module("app/navigation/templates/guacPageList.html", []).run(["$templateCache", function(a) { a.put("app/navigation/templates/guacPageList.html", '\x3cdiv class\x3d"page-list" ng-show\x3d"levels.length"\x3e\n\n \x3c!-- Navigation links --\x3e\n \x3cul class\x3d"page-list-level" ng-repeat\x3d"level in levels track by $index"\x3e\n \x3cli ng-repeat\x3d"page in getPages(level)" class\x3d"{{page.className}}"\x3e\n \x3ca class\x3d"home" ng-click\x3d"navigateToPage(page)"\n ng-class\x3d"{current: isCurrentPage(page)}" href\x3d"#{{page.url}}"\x3e\n {{page.name | translate}}\n \x3c/a\x3e\n \x3c/li\x3e\n \x3c/ul\x3e\n\n\x3c/div\x3e') } ]); angular.module("app/navigation/templates/guacUserMenu.html", []).run(["$templateCache", function(a) { a.put("app/navigation/templates/guacUserMenu.html", '\x3cdiv class\x3d"user-menu" ng-show\x3d"!isAnonymous()"\x3e\n \x3cguac-menu menu-title\x3d"username"\x3e\n \n \x3c!-- User profile view --\x3e\n \x3cdiv class\x3d"profile" ng-show\x3d"fullName"\x3e\n \x3cdiv class\x3d"full-name"\x3e\x3ca ng-href\x3d"{{userURL}}"\x3e{{ fullName }}\x3c/a\x3e\x3c/div\x3e\n \x3cdiv class\x3d"organizational-role" ng-show\x3d"role"\x3e{{ role }}\x3c/div\x3e\n \x3cdiv class\x3d"organization" ng-show\x3d"organization"\x3e{{ organization }}\x3c/div\x3e\n \x3c/div\x3e\n\n \x3c!-- Local actions --\x3e\n \x3cul class\x3d"action-list"\x3e\n \x3cli ng-repeat\x3d"action in localActions"\x3e\n \x3ca ng-class\x3d"action.className" ng-click\x3d"action.callback()"\x3e\n {{action.name | translate}}\n \x3c/a\x3e\n \x3c/li\x3e\n \x3c/ul\x3e\n\n \x3c!-- Navigation links --\x3e\n \x3cguac-page-list pages\x3d"pages"\x3e\x3c/guac-page-list\x3e\n\n \x3c!-- Actions --\x3e\n \x3cul class\x3d"action-list"\x3e\n \x3cli ng-repeat\x3d"action in actions"\x3e\n \x3ca ng-class\x3d"action.className" ng-click\x3d"action.callback()"\x3e\n {{action.name | translate}}\n \x3c/a\x3e\n \x3c/li\x3e\n \x3c/ul\x3e\n\n \x3c/guac-menu\x3e\n\x3c/div\x3e') } ]); angular.module("app/notification/templates/guacNotification.html", []).run(["$templateCache", function(a) { a.put("app/notification/templates/guacNotification.html", '\x3cdiv class\x3d"notification" ng-class\x3d"notification.className"\x3e\n\n \x3c!-- Notification title --\x3e\n \x3cdiv ng-show\x3d"notification.title" class\x3d"title-bar"\x3e\n \x3cdiv class\x3d"title"\x3e{{notification.title | translate}}\x3c/div\x3e\n \x3c/div\x3e\n\n \x3cdiv class\x3d"body"\x3e\n\n \x3c!-- Notification text --\x3e\n \x3cp ng-show\x3d"notification.text" class\x3d"text"\n translate\x3d"{{notification.text.key}}"\n translate-values\x3d"{{notification.text.variables}}"\x3e\x3c/p\x3e\n\n \x3c!-- Current progress --\x3e\n \x3cdiv class\x3d"progress" ng-show\x3d"notification.progress"\x3e\x3cdiv class\x3d"bar" ng-show\x3d"progressPercent" ng-style\x3d"{\'width\': progressPercent + \'%\'}"\x3e\x3c/div\x3e\x3cdiv\n ng-show\x3d"notification.progress.text"\n translate\x3d"{{notification.progress.text}}"\n translate-values\x3d"{PROGRESS: notification.progress.value, UNIT: notification.progress.unit}"\x3e\x3c/div\x3e\x3c/div\x3e\n\n \x3c!-- Default action countdown text --\x3e\n \x3cp class\x3d"countdown-text"\n ng-show\x3d"notification.countdown.text"\n translate\x3d"{{notification.countdown.text}}"\n translate-values\x3d"{REMAINING: timeRemaining}"\x3e\x3c/p\x3e\n\n \x3c/div\x3e\n\n \x3c!-- Buttons --\x3e\n \x3cdiv ng-show\x3d"notification.actions.length" class\x3d"buttons"\x3e\n \x3cbutton ng-repeat\x3d"action in notification.actions" ng-click\x3d"action.callback()" ng-class\x3d"action.className"\x3e{{action.name | translate}}\x3c/button\x3e\n \x3c/div\x3e\n\n\x3c/div\x3e') } ]); angular.module("app/osk/templates/guacOsk.html", []).run(["$templateCache", function(a) { a.put("app/osk/templates/guacOsk.html", '\x3cdiv class\x3d"osk" guac-resize\x3d"keyboardResized"\x3e\n\x3c/div\x3e') } ]); angular.module("app/settings/templates/connection.html", []).run(["$templateCache", function(a) { a.put("app/settings/templates/connection.html", '\x3ca ng-href\x3d"#/manage/{{item.dataSource}}/connections/{{item.identifier}}"\n ng-class\x3d"{active: item.getActiveConnections()}"\x3e\n\n \x3c!-- Connection icon --\x3e\n \x3cdiv class\x3d"icon type" ng-class\x3d"item.protocol"\x3e\x3c/div\x3e\n\n \x3c!-- Connection name --\x3e\n \x3cspan class\x3d"name"\x3e{{item.name}}\x3c/span\x3e\n\n \x3c!-- Active user count --\x3e\n \x3cspan class\x3d"activeUserCount" ng-show\x3d"item.getActiveConnections()"\n translate\x3d"SETTINGS_CONNECTIONS.INFO_ACTIVE_USER_COUNT"\n translate-values\x3d"{USERS: item.getActiveConnections()}"\x3e\x3c/span\x3e\n\n\x3c/a\x3e') } ]); angular.module("app/settings/templates/connectionGroup.html", []).run(["$templateCache", function(a) { a.put("app/settings/templates/connectionGroup.html", '\x3ca ng-href\x3d"#/manage/{{item.dataSource}}/connectionGroups/{{item.identifier}}"\x3e\n\n \x3c!-- Connection group icon --\x3e\n \x3cdiv class\x3d"icon type"\x3e\x3c/div\x3e\n\n \x3c!-- Connection group name --\x3e\n \x3cspan class\x3d"name"\x3e{{item.name}}\x3c/span\x3e\n\n\x3c/a\x3e') } ]); angular.module("app/settings/templates/newConnection.html", []).run(["$templateCache", function(a) { a.put("app/settings/templates/newConnection.html", '\x3ca ng-href\x3d"#/manage/{{item.dataSource}}/connections/?parent\x3d{{item.wrappedItem.identifier}}"\x3e\n \x3cspan class\x3d"name"\x3e{{\'SETTINGS_CONNECTIONS.ACTION_NEW_CONNECTION\' | translate}}\x3c/span\x3e\n\x3c/a\x3e') } ]); angular.module("app/settings/templates/newConnectionGroup.html", []).run(["$templateCache", function(a) { a.put("app/settings/templates/newConnectionGroup.html", '\x3ca ng-href\x3d"#/manage/{{item.dataSource}}/connectionGroups/?parent\x3d{{item.wrappedItem.identifier}}"\x3e\n \x3cspan class\x3d"name"\x3e{{\'SETTINGS_CONNECTIONS.ACTION_NEW_CONNECTION_GROUP\' | translate}}\x3c/span\x3e\n\x3c/a\x3e') } ]); angular.module("app/settings/templates/newSharingProfile.html", []).run(["$templateCache", function(a) { a.put("app/settings/templates/newSharingProfile.html", '\x3ca ng-href\x3d"#/manage/{{item.dataSource}}/sharingProfiles/?parent\x3d{{item.wrappedItem.identifier}}"\x3e\n \x3cspan class\x3d"name"\x3e{{\'SETTINGS_CONNECTIONS.ACTION_NEW_SHARING_PROFILE\' | translate}}\x3c/span\x3e\n\x3c/a\x3e') } ]); angular.module("app/settings/templates/settings.html", []).run(["$templateCache", function(a) { a.put("app/settings/templates/settings.html", '\n\x3cdiv class\x3d"view"\x3e\n\n \x3cdiv class\x3d"header"\x3e\n \x3ch2\x3e{{\'SETTINGS.SECTION_HEADER_SETTINGS\' | translate}}\x3c/h2\x3e\n \x3cguac-user-menu\x3e\x3c/guac-user-menu\x3e\n \x3c/div\x3e\n\n \x3c!-- Available tabs --\x3e\n \x3cdiv class\x3d"page-tabs"\x3e\n \x3cguac-page-list pages\x3d"settingsPages"\x3e\x3c/guac-page-list\x3e\n \x3c/div\x3e\n\n \x3c!-- Selected tab --\x3e\n \x3cguac-settings-users ng-if\x3d"activeTab \x3d\x3d\x3d \'users\'"\x3e\x3c/guac-settings-users\x3e\n \x3cguac-settings-connections ng-if\x3d"activeTab \x3d\x3d\x3d \'connections\'"\x3e\x3c/guac-settings-connections\x3e\n \x3cguac-settings-connection-history ng-if\x3d"activeTab \x3d\x3d\x3d \'history\'"\x3e\x3c/guac-settings-connection-history\x3e\n \x3cguac-settings-sessions ng-if\x3d"activeTab \x3d\x3d\x3d \'sessions\'"\x3e\x3c/guac-settings-sessions\x3e\n \x3cguac-settings-preferences ng-if\x3d"activeTab \x3d\x3d\x3d \'preferences\'"\x3e\x3c/guac-settings-preferences\x3e\n\n\x3c/div\x3e') } ]); angular.module("app/settings/templates/settingsConnectionHistory.html", []).run(["$templateCache", function(a) { a.put("app/settings/templates/settingsConnectionHistory.html", '\x3cdiv class\x3d"settings section connectionHistory"\x3e\n\n \x3c!-- Connection history --\x3e\n \x3cp\x3e{{\'SETTINGS_CONNECTION_HISTORY.HELP_CONNECTION_HISTORY\' | translate}}\x3c/p\x3e\n\n \x3c!-- Search controls --\x3e\n \x3cform class\x3d"filter" ng-submit\x3d"search()"\x3e\n \x3cinput class\x3d"search-string" type\x3d"text" placeholder\x3d"{{\'SETTINGS_CONNECTION_HISTORY.FIELD_PLACEHOLDER_FILTER\' | translate}}" ng-model\x3d"searchString" /\x3e\n \x3cinput class\x3d"search-button" type\x3d"submit" value\x3d"{{\'SETTINGS_CONNECTION_HISTORY.ACTION_SEARCH\' | translate}}" /\x3e\n \x3cbutton type\x3d"button" ng-click\x3d"downloadCSV()"\x3e{{\'SETTINGS_CONNECTION_HISTORY.ACTION_DOWNLOAD\' | translate}}\x3c/button\x3e\n \x3c/form\x3e\n\n \x3c!-- Search results --\x3e\n \x3cdiv class\x3d"results"\x3e\n\n \x3c!-- List of matching history records --\x3e\n \x3ctable class\x3d"sorted history-list"\x3e\n \x3cthead\x3e\n \x3ctr\x3e\n \x3cth guac-sort-order\x3d"order" guac-sort-property\x3d"\'username\'"\x3e\n {{\'SETTINGS_CONNECTION_HISTORY.TABLE_HEADER_SESSION_USERNAME\' | translate}}\n \x3c/th\x3e\n \x3cth guac-sort-order\x3d"order" guac-sort-property\x3d"\'startDate\'"\x3e\n {{\'SETTINGS_CONNECTION_HISTORY.TABLE_HEADER_SESSION_STARTDATE\' | translate}}\n \x3c/th\x3e\n \x3cth guac-sort-order\x3d"order" guac-sort-property\x3d"\'duration\'"\x3e\n {{\'SETTINGS_CONNECTION_HISTORY.TABLE_HEADER_SESSION_DURATION\' | translate}}\n \x3c/th\x3e\n \x3cth guac-sort-order\x3d"order" guac-sort-property\x3d"\'connectionName\'"\x3e\n {{\'SETTINGS_CONNECTION_HISTORY.TABLE_HEADER_SESSION_CONNECTION_NAME\' | translate}}\n \x3c/th\x3e\n \x3cth guac-sort-order\x3d"order" guac-sort-property\x3d"\'remoteHost\'"\x3e\n {{\'SETTINGS_CONNECTION_HISTORY.TABLE_HEADER_SESSION_REMOTEHOST\' | translate}}\n \x3c/th\x3e\n \x3c/tr\x3e\n \x3c/thead\x3e\n \x3ctbody ng-class\x3d"{loading: !isLoaded()}"\x3e\n \x3ctr ng-repeat\x3d"historyEntryWrapper in historyEntryWrapperPage" class\x3d"history"\x3e\n \x3ctd\x3e\x3cguac-user-item username\x3d"historyEntryWrapper.username"\x3e\x3c/guac-user-item\x3e\x3c/td\x3e\n \x3ctd\x3e{{historyEntryWrapper.startDate | date : dateFormat}}\x3c/td\x3e\n \x3ctd translate\x3d"{{historyEntryWrapper.readableDurationText}}"\n translate-values\x3d"{VALUE: historyEntryWrapper.readableDuration.value, UNIT: historyEntryWrapper.readableDuration.unit}"\x3e\x3c/td\x3e\n \x3ctd\x3e{{historyEntryWrapper.connectionName}}\x3c/td\x3e\n \x3ctd\x3e{{historyEntryWrapper.remoteHost}}\x3c/td\x3e\n \x3c/tr\x3e\n \x3c/tbody\x3e\n \x3c/table\x3e\n\n \x3c!-- Text displayed if no history exists --\x3e\n \x3cp class\x3d"placeholder" ng-show\x3d"isHistoryEmpty()"\x3e\n {{\'SETTINGS_CONNECTION_HISTORY.INFO_NO_HISTORY\' | translate}}\n \x3c/p\x3e\n\n \x3c!-- Pager for history list --\x3e\n \x3cguac-pager page\x3d"historyEntryWrapperPage" page-size\x3d"25"\n items\x3d"historyEntryWrappers | orderBy : order.predicate"\x3e\x3c/guac-pager\x3e\n \x3c/div\x3e\n\n\x3c/div\x3e') } ]); angular.module("app/settings/templates/settingsConnections.html", []).run(["$templateCache", function(a) { a.put("app/settings/templates/settingsConnections.html", '\x3cdiv class\x3d"settings section connections" ng-class\x3d"{loading: !isLoaded()}"\x3e\n\n \x3c!-- Connection management --\x3e\n \x3cp\x3e{{\'SETTINGS_CONNECTIONS.HELP_CONNECTIONS\' | translate}}\x3c/p\x3e\n\n \x3c!-- Connection management toolbar --\x3e\n \x3cdiv class\x3d"toolbar"\x3e\n\n \x3c!-- Form action buttons --\x3e\n \x3cdiv class\x3d"action-buttons"\x3e\n\n \x3ca class\x3d"add-connection button"\n ng-show\x3d"canCreateConnections()"\n href\x3d"#/manage/{{dataSource}}/connections/"\x3e{{\'SETTINGS_CONNECTIONS.ACTION_NEW_CONNECTION\' | translate}}\x3c/a\x3e\n\n \x3ca class\x3d"add-connection-group button"\n ng-show\x3d"canCreateConnectionGroups()"\n href\x3d"#/manage/{{dataSource}}/connectionGroups/"\x3e{{\'SETTINGS_CONNECTIONS.ACTION_NEW_CONNECTION_GROUP\' | translate}}\x3c/a\x3e\n\n \x3c/div\x3e\n\n \x3c!-- Connection filter --\x3e\n \x3cguac-group-list-filter connection-groups\x3d"rootGroups"\n filtered-connection-groups\x3d"filteredRootGroups"\n placeholder\x3d"\'SETTINGS_CONNECTIONS.FIELD_PLACEHOLDER_FILTER\' | translate"\n connection-properties\x3d"filteredConnectionProperties"\n connection-group-properties\x3d"filteredConnectionGroupProperties"\x3e\x3c/guac-group-list-filter\x3e\n\n \x3c/div\x3e\n\n \x3c!-- List of accessible connections and groups --\x3e\n \x3cdiv class\x3d"connection-list"\x3e\n \x3cguac-group-list\n page-size\x3d"25"\n connection-groups\x3d"filteredRootGroups"\n decorator\x3d"rootItemDecorator"\n templates\x3d"{\n\n \'connection\' : \'app/settings/templates/connection.html\',\n \'sharing-profile\' : \'app/settings/templates/sharingProfile.html\',\n \'connection-group\' : \'app/settings/templates/connectionGroup.html\',\n\n \'new-connection\' : \'app/settings/templates/newConnection.html\',\n \'new-sharing-profile\' : \'app/settings/templates/newSharingProfile.html\',\n \'new-connection-group\' : \'app/settings/templates/newConnectionGroup.html\'\n\n }"/\x3e\n \x3c/div\x3e\n\x3c/div\x3e') } ]); angular.module("app/settings/templates/settingsPreferences.html", []).run(["$templateCache", function(a) { a.put("app/settings/templates/settingsPreferences.html", '\x3cdiv class\x3d"preferences" ng-class\x3d"{loading: !isLoaded()}"\x3e\n\n \x3c!-- Language settings --\x3e\n \x3cdiv class\x3d"settings section language"\x3e\n \x3cp\x3e{{\'SETTINGS_PREFERENCES.HELP_LANGUAGE\' | translate}}\x3c/p\x3e\n\n \x3c!-- Language selection --\x3e\n \x3cdiv class\x3d"form"\x3e\n \x3ctable class\x3d"fields"\x3e\n \x3ctr\x3e\n \x3cth\x3e{{\'SETTINGS_PREFERENCES.FIELD_HEADER_LANGUAGE\' | translate}}\x3c/th\x3e\n \x3ctd\x3e\x3cselect ng-model\x3d"preferences.language" ng-change\x3d"changeLanguage()" ng-options\x3d"key as name for (key, name) in languages | orderBy: name"\x3e\x3c/select\x3e\x3c/td\x3e\n \x3c/tr\x3e\n \x3c/table\x3e\n \x3c/div\x3e\n \x3c/div\x3e\n \n \x3c!-- Password update --\x3e\n \x3ch2 class\x3d"header" ng-show\x3d"canChangePassword"\x3e{{\'SETTINGS_PREFERENCES.SECTION_HEADER_UPDATE_PASSWORD\' | translate}}\x3c/h2\x3e\n \x3cdiv class\x3d"settings section update-password" ng-show\x3d"canChangePassword"\x3e\n \x3cp\x3e{{\'SETTINGS_PREFERENCES.HELP_UPDATE_PASSWORD\' | translate}}\x3c/p\x3e\n\n \x3c!-- Password editor --\x3e\n \x3cdiv class\x3d"form"\x3e\n \x3ctable class\x3d"fields"\x3e\n \x3ctr\x3e\n \x3cth\x3e{{\'SETTINGS_PREFERENCES.FIELD_HEADER_PASSWORD_OLD\' | translate}}\x3c/th\x3e\n \x3ctd\x3e\x3cinput ng-model\x3d"oldPassword" type\x3d"password" /\x3e\x3c/td\x3e\n \x3c/tr\x3e\n \x3ctr\x3e\n \x3cth\x3e{{\'SETTINGS_PREFERENCES.FIELD_HEADER_PASSWORD_NEW\' | translate}}\x3c/th\x3e\n \x3ctd\x3e\x3cinput ng-model\x3d"newPassword" type\x3d"password" /\x3e\x3c/td\x3e\n \x3c/tr\x3e\n \x3ctr\x3e\n \x3cth\x3e{{\'SETTINGS_PREFERENCES.FIELD_HEADER_PASSWORD_NEW_AGAIN\' | translate}}\x3c/th\x3e\n \x3ctd\x3e\x3cinput ng-model\x3d"newPasswordMatch" type\x3d"password" /\x3e\x3c/td\x3e\n \x3c/tr\x3e\n \x3c/table\x3e\n \x3c/div\x3e\n\n \x3c!-- Form action buttons --\x3e\n \x3cdiv class\x3d"action-buttons"\x3e\n \x3cbutton class\x3d"change-password" ng-click\x3d"updatePassword()"\x3e{{\'SETTINGS_PREFERENCES.ACTION_UPDATE_PASSWORD\' | translate}}\x3c/button\x3e\n \x3c/div\x3e\n \x3c/div\x3e\n\n \x3c!-- Input method --\x3e\n \x3ch2 class\x3d"header"\x3e{{\'SETTINGS_PREFERENCES.SECTION_HEADER_DEFAULT_INPUT_METHOD\' | translate}}\x3c/h2\x3e\n \x3cdiv class\x3d"settings section input-method"\x3e\n \x3cp\x3e{{\'SETTINGS_PREFERENCES.HELP_DEFAULT_INPUT_METHOD\' | translate}}\x3c/p\x3e\n \x3cdiv class\x3d"choices"\x3e\n\n \x3c!-- No IME --\x3e\n \x3cdiv class\x3d"choice"\x3e\n \x3clabel\x3e\x3cinput id\x3d"ime-none" name\x3d"input-method" ng-model\x3d"preferences.inputMethod" type\x3d"radio" value\x3d"none"/\x3e {{\'SETTINGS_PREFERENCES.NAME_INPUT_METHOD_NONE\' | translate}}\x3c/label\x3e\n \x3cp class\x3d"caption"\x3e\x3clabel for\x3d"ime-none"\x3e{{\'SETTINGS_PREFERENCES.HELP_INPUT_METHOD_NONE\' | translate}}\x3c/label\x3e\x3c/p\x3e\n \x3c/div\x3e\n\n \x3c!-- Text input --\x3e\n \x3cdiv class\x3d"choice"\x3e\n \x3clabel\x3e\x3cinput id\x3d"ime-text" name\x3d"input-method" ng-model\x3d"preferences.inputMethod" type\x3d"radio" value\x3d"text"/\x3e {{\'SETTINGS_PREFERENCES.NAME_INPUT_METHOD_TEXT\' | translate}}\x3c/label\x3e\n \x3cp class\x3d"caption"\x3e\x3clabel for\x3d"ime-text"\x3e{{\'SETTINGS_PREFERENCES.HELP_INPUT_METHOD_TEXT\' | translate}} \x3c/label\x3e\x3c/p\x3e\n \x3c/div\x3e\n\n \x3c!-- Guac OSK --\x3e\n \x3cdiv class\x3d"choice"\x3e\n \x3clabel\x3e\x3cinput id\x3d"ime-osk" name\x3d"input-method" ng-model\x3d"preferences.inputMethod" type\x3d"radio" value\x3d"osk"/\x3e {{\'SETTINGS_PREFERENCES.NAME_INPUT_METHOD_OSK\' | translate}}\x3c/label\x3e\n \x3cp class\x3d"caption"\x3e\x3clabel for\x3d"ime-osk"\x3e{{\'SETTINGS_PREFERENCES.HELP_INPUT_METHOD_OSK\' | translate}}\x3c/label\x3e\x3c/p\x3e\n \x3c/div\x3e\n\n \x3c/div\x3e\n \x3c/div\x3e\n\n \x3c!-- Mouse mode --\x3e\n \x3ch2 class\x3d"header"\x3e{{\'SETTINGS_PREFERENCES.SECTION_HEADER_DEFAULT_MOUSE_MODE\' | translate}}\x3c/h2\x3e\n \x3cdiv class\x3d"settings section mouse-mode"\x3e\n \x3cp\x3e{{\'SETTINGS_PREFERENCES.HELP_DEFAULT_MOUSE_MODE\' | translate}}\x3c/p\x3e\n \x3cdiv class\x3d"choices"\x3e\n\n \x3c!-- Touchscreen --\x3e\n \x3cdiv class\x3d"choice"\x3e\n \x3cinput name\x3d"mouse-mode" ng-model\x3d"preferences.emulateAbsoluteMouse" type\x3d"radio" ng-value\x3d"true" checked\x3d"checked" id\x3d"absolute"/\x3e\n \x3cdiv class\x3d"figure"\x3e\n \x3clabel for\x3d"absolute"\x3e\x3cimg src\x3d"images/settings/touchscreen.png" alt\x3d"{{\'SETTINGS_PREFERENCES.NAME_MOUSE_MODE_ABSOLUTE\' | translate}}"/\x3e\x3c/label\x3e\n \x3cp class\x3d"caption"\x3e\x3clabel for\x3d"absolute"\x3e{{\'SETTINGS_PREFERENCES.HELP_MOUSE_MODE_ABSOLUTE\' | translate}}\x3c/label\x3e\x3c/p\x3e\n \x3c/div\x3e\n \x3c/div\x3e\n\n \x3c!-- Touchpad --\x3e\n \x3cdiv class\x3d"choice"\x3e\n \x3cinput name\x3d"mouse-mode" ng-model\x3d"preferences.emulateAbsoluteMouse" type\x3d"radio" ng-value\x3d"false" id\x3d"relative"/\x3e\n \x3cdiv class\x3d"figure"\x3e\n \x3clabel for\x3d"relative"\x3e\x3cimg src\x3d"images/settings/touchpad.png" alt\x3d"{{\'SETTINGS_PREFERENCES.NAME_MOUSE_MODE_RELATIVE\' | translate}}"/\x3e\x3c/label\x3e\n \x3cp class\x3d"caption"\x3e\x3clabel for\x3d"relative"\x3e{{\'SETTINGS_PREFERENCES.HELP_MOUSE_MODE_RELATIVE\' | translate}}\x3c/label\x3e\x3c/p\x3e\n \x3c/div\x3e\n \x3c/div\x3e\n\n \x3c/div\x3e\n \x3c/div\x3e\n\n\x3c/div\x3e') } ]); angular.module("app/settings/templates/settingsSessions.html", []).run(["$templateCache", function(a) { a.put("app/settings/templates/settingsSessions.html", '\x3cdiv class\x3d"settings section sessions" ng-class\x3d"{loading: !isLoaded()}"\x3e\n\n \x3c!-- User Session management --\x3e\n \x3cp\x3e{{\'SETTINGS_SESSIONS.HELP_SESSIONS\' | translate}}\x3c/p\x3e\n\n \x3c!-- Form action buttons --\x3e\n \x3cdiv class\x3d"action-buttons"\x3e\n \x3cbutton class\x3d"delete-sessions danger" ng-disabled\x3d"!canDeleteSessions()" ng-click\x3d"deleteSessions()"\x3e{{\'SETTINGS_SESSIONS.ACTION_DELETE\' | translate}}\x3c/button\x3e\n \x3c/div\x3e\n\n \x3c!-- Session filter --\x3e\n \x3cguac-filter filtered-items\x3d"filteredWrappers" items\x3d"wrappers"\n placeholder\x3d"\'SETTINGS_SESSIONS.FIELD_PLACEHOLDER_FILTER\' | translate"\n properties\x3d"filteredWrapperProperties"\x3e\x3c/guac-filter\x3e\n\n \x3c!-- List of current user sessions --\x3e\n \x3ctable class\x3d"sorted session-list"\x3e\n \x3cthead\x3e\n \x3ctr\x3e\n \x3cth class\x3d"select-session"\x3e\x3c/th\x3e\n \x3cth guac-sort-order\x3d"wrapperOrder" guac-sort-property\x3d"\'activeConnection.username\'"\x3e\n {{\'SETTINGS_SESSIONS.TABLE_HEADER_SESSION_USERNAME\' | translate}}\n \x3c/th\x3e\n \x3cth guac-sort-order\x3d"wrapperOrder" guac-sort-property\x3d"\'startDate\'"\x3e\n {{\'SETTINGS_SESSIONS.TABLE_HEADER_SESSION_STARTDATE\' | translate}}\n \x3c/th\x3e\n \x3cth guac-sort-order\x3d"wrapperOrder" guac-sort-property\x3d"\'activeConnection.remoteHost\'"\x3e\n {{\'SETTINGS_SESSIONS.TABLE_HEADER_SESSION_REMOTEHOST\' | translate}}\n \x3c/th\x3e\n \x3cth guac-sort-order\x3d"wrapperOrder" guac-sort-property\x3d"\'name\'"\x3e\n {{\'SETTINGS_SESSIONS.TABLE_HEADER_SESSION_CONNECTION_NAME\' | translate}}\n \x3c/th\x3e\n \x3c/tr\x3e\n \x3c/thead\x3e\n \x3ctbody\x3e\n \x3ctr ng-repeat\x3d"wrapper in wrapperPage" class\x3d"session"\x3e\n \x3ctd class\x3d"select-session"\x3e\n \x3cinput ng-change\x3d"wrapperSelectionChange(wrapper)" type\x3d"checkbox" ng-model\x3d"wrapper.checked" /\x3e\n \x3c/td\x3e\n \x3ctd\x3e\x3cguac-user-item username\x3d"wrapper.activeConnection.username"\x3e\x3c/guac-user-item\x3e\x3c/td\x3e\n \x3ctd\x3e{{wrapper.startDate}}\x3c/td\x3e\n \x3ctd\x3e{{wrapper.activeConnection.remoteHost}}\x3c/td\x3e\n \x3ctd\x3e{{wrapper.name}}\x3c/td\x3e\n \x3c/tr\x3e\n \x3c/tbody\x3e\n \x3c/table\x3e\n\n \x3c!-- Text displayed if no sessions exist --\x3e\n \x3cp class\x3d"placeholder" ng-hide\x3d"wrapperPage.length"\x3e\n {{\'SETTINGS_SESSIONS.INFO_NO_SESSIONS\' | translate}}\n \x3c/p\x3e\n\n \x3c!-- Pager for session list --\x3e\n \x3cguac-pager page\x3d"wrapperPage" page-size\x3d"25"\n items\x3d"filteredWrappers | orderBy : wrapperOrder.predicate"\x3e\x3c/guac-pager\x3e\n\x3c/div\x3e') } ]); angular.module("app/settings/templates/settingsUsers.html", []).run(["$templateCache", function(a) { a.put("app/settings/templates/settingsUsers.html", '\x3cdiv class\x3d"settings section users" ng-class\x3d"{loading: !isLoaded()}"\x3e\n\n \x3c!-- User management --\x3e\n \x3cp\x3e{{\'SETTINGS_USERS.HELP_USERS\' | translate}}\x3c/p\x3e\n\n\n \x3c!-- User management toolbar --\x3e\n \x3cdiv class\x3d"toolbar"\x3e\n\n \x3c!-- Form action buttons --\x3e\n \x3cdiv class\x3d"action-buttons"\x3e\n \x3ca class\x3d"add-user button" ng-show\x3d"canCreateUsers()"\n href\x3d"#/manage/{{getDefaultDataSource()}}/users/"\x3e{{\'SETTINGS_USERS.ACTION_NEW_USER\' | translate}}\x3c/a\x3e\n \x3c/div\x3e\n\n \x3c!-- User filter --\x3e\n \x3cguac-filter filtered-items\x3d"filteredManageableUsers" items\x3d"manageableUsers"\n placeholder\x3d"\'SETTINGS_USERS.FIELD_PLACEHOLDER_FILTER\' | translate"\n properties\x3d"filteredUserProperties"\x3e\x3c/guac-filter\x3e\n\n \x3c/div\x3e\n\n \x3c!-- List of users this user has access to --\x3e\n \x3ctable class\x3d"sorted user-list"\x3e\n \x3cthead\x3e\n \x3ctr\x3e\n \x3cth guac-sort-order\x3d"order" guac-sort-property\x3d"\'user.username\'" class\x3d"username"\x3e\n {{\'SETTINGS_USERS.TABLE_HEADER_USERNAME\' | translate}}\n \x3c/th\x3e\n \x3cth guac-sort-order\x3d"order" guac-sort-property\x3d"\'user.lastActive\'" class\x3d"last-active"\x3e\n {{\'SETTINGS_USERS.TABLE_HEADER_LAST_ACTIVE\' | translate}}\n \x3c/th\x3e\n \x3c/tr\x3e\n \x3c/thead\x3e\n \x3ctbody ng-class\x3d"{loading: !isLoaded()}"\x3e\n \x3ctr ng-repeat\x3d"manageableUser in manageableUserPage" class\x3d"user"\x3e\n \x3ctd class\x3d"username"\x3e\n \x3ca ng-href\x3d"#/manage/{{manageableUser.dataSource}}/users/{{manageableUser.user.username}}"\x3e\n \x3cdiv class\x3d"icon user"\x3e\x3c/div\x3e\n \x3cspan class\x3d"name"\x3e{{manageableUser.user.username}}\x3c/span\x3e\n \x3c/a\x3e\n \x3c/td\x3e\n \x3ctd class\x3d"last-active"\x3e{{manageableUser.user.lastActive | date : dateFormat}}\x3c/td\x3e\n \x3c/tr\x3e\n \x3c/tbody\x3e\n \x3c/table\x3e\n\n \x3c!-- Pager controls for user list --\x3e\n \x3cguac-pager page\x3d"manageableUserPage" page-size\x3d"25"\n items\x3d"filteredManageableUsers | orderBy : order.predicate"\x3e\x3c/guac-pager\x3e\n\n\x3c/div\x3e') } ]); angular.module("app/settings/templates/sharingProfile.html", []).run(["$templateCache", function(a) { a.put("app/settings/templates/sharingProfile.html", '\x3ca ng-href\x3d"#/manage/{{item.dataSource}}/sharingProfiles/{{item.identifier}}"\x3e\n\n \x3c!-- Sharing profile icon --\x3e\n \x3cdiv class\x3d"icon type"\x3e\x3c/div\x3e\n\n \x3c!-- Sharing profile name --\x3e\n \x3cspan class\x3d"name"\x3e{{item.name}}\x3c/span\x3e\n\n\x3c/a\x3e') } ]); angular.module("app/textInput/templates/guacKey.html", []).run(["$templateCache", function(a) { a.put("app/textInput/templates/guacKey.html", '\x3cbutton class\x3d"key" ng-click\x3d"updateKey()" ng-class\x3d"{pressed: pressed, sticky: sticky}"\x3e\n\n {{text | translate}}\n\x3c/button\x3e') } ]); angular.module("app/textInput/templates/guacTextInput.html", []).run(["$templateCache", function(a) { a.put("app/textInput/templates/guacTextInput.html", '\x3cdiv class\x3d"text-input"\x3e\n\n \x3c!-- Text input target --\x3e\n \x3cdiv class\x3d"text-input-field"\x3e\x3cdiv class\x3d"sent-history"\x3e\x3cdiv class\x3d"sent-text" ng-repeat\x3d"text in sentText track by $index"\x3e{{text}}\x3c/div\x3e\x3c/div\x3e\x3ctextarea rows\x3d"1" class\x3d"target" autocorrect\x3d"off" autocapitalize\x3d"off"\x3e\x3c/textarea\x3e\x3c/div\x3e\x3cdiv class\x3d"text-input-buttons"\x3e\x3cguac-key keysym\x3d"65507" sticky\x3d"true" text\x3d"\'CLIENT.NAME_KEY_CTRL\'" pressed\x3d"ctrlPressed"\x3e\x3c/guac-key\x3e\x3cguac-key keysym\x3d"65513" sticky\x3d"true" text\x3d"\'CLIENT.NAME_KEY_ALT\'" pressed\x3d"altPressed"\x3e\x3c/guac-key\x3e\x3cguac-key keysym\x3d"65307" text\x3d"\'CLIENT.NAME_KEY_ESC\'"\x3e\x3c/guac-key\x3e\x3cguac-key keysym\x3d"65289" text\x3d"\'CLIENT.NAME_KEY_TAB\'"\x3e\x3c/guac-key\x3e\x3c/div\x3e\n\n\x3c/div\x3e') } ]); angular.module("textInput", []); angular.module("form").controller("timeFieldController", ["$scope", "$injector", function(a, b) { var e = b.get("$filter"); a.modelOptions = { updateOn: "blur", timezone: "UTC" }; a.$watch("model", function(b) { b ? (b = new Date("1970-01-01T" + b + "Z"), b = isNaN(b.getTime()) ? null : b) : b = null; a.typedValue = b }); a.$watch("typedValue", function(b) { a.model = b ? e("date")(b, "HH:mm:ss", "UTC") : "" }) } ]); angular.module("form").controller("timeZoneFieldController", ["$scope", "$injector", function(a, b) { a.timeZones = { Africa: { Abidjan: "Africa/Abidjan", Accra: "Africa/Accra", "Addis Ababa": "Africa/Addis_Ababa", Algiers: "Africa/Algiers", Asmara: "Africa/Asmara", Asmera: "Africa/Asmera", Bamako: "Africa/Bamako", Bangui: "Africa/Bangui", Banjul: "Africa/Banjul", Bissau: "Africa/Bissau", Blantyre: "Africa/Blantyre", Brazzaville: "Africa/Brazzaville", Bujumbura: "Africa/Bujumbura", Cairo: "Africa/Cairo", Casablanca: "Africa/Casablanca", Ceuta: "Africa/Ceuta", Conakry: "Africa/Conakry", Dakar: "Africa/Dakar", "Dar es Salaam": "Africa/Dar_es_Salaam", Djibouti: "Africa/Djibouti", Douala: "Africa/Douala", "El Aaiun": "Africa/El_Aaiun", Freetown: "Africa/Freetown", Gaborone: "Africa/Gaborone", Harare: "Africa/Harare", Johannesburg: "Africa/Johannesburg", Juba: "Africa/Juba", Kampala: "Africa/Kampala", Khartoum: "Africa/Khartoum", Kigali: "Africa/Kigali", Kinshasa: "Africa/Kinshasa", Lagos: "Africa/Lagos", Libreville: "Africa/Libreville", Lome: "Africa/Lome", Luanda: "Africa/Luanda", Lubumbashi: "Africa/Lubumbashi", Lusaka: "Africa/Lusaka", Malabo: "Africa/Malabo", Maputo: "Africa/Maputo", Maseru: "Africa/Maseru", Mbabane: "Africa/Mbabane", Mogadishu: "Africa/Mogadishu", Monrovia: "Africa/Monrovia", Nairobi: "Africa/Nairobi", Ndjamena: "Africa/Ndjamena", Niamey: "Africa/Niamey", Nouakchott: "Africa/Nouakchott", Ouagadougou: "Africa/Ouagadougou", "Porto-Novo": "Africa/Porto-Novo", "Sao Tome": "Africa/Sao_Tome", Timbuktu: "Africa/Timbuktu", Tripoli: "Africa/Tripoli", Tunis: "Africa/Tunis", Windhoek: "Africa/Windhoek" }, America: { Adak: "America/Adak", Anchorage: "America/Anchorage", Anguilla: "America/Anguilla", Antigua: "America/Antigua", Araguaina: "America/Araguaina", "Argentina / Buenos Aires": "America/Argentina/Buenos_Aires", "Argentina / Catamarca": "America/Argentina/Catamarca", "Argentina / Comodoro Rivadavia": "America/Argentina/ComodRivadavia", "Argentina / Cordoba": "America/Argentina/Cordoba", "Argentina / Jujuy": "America/Argentina/Jujuy", "Argentina / La Rioja": "America/Argentina/La_Rioja", "Argentina / Mendoza": "America/Argentina/Mendoza", "Argentina / Rio Gallegos": "America/Argentina/Rio_Gallegos", "Argentina / Salta": "America/Argentina/Salta", "Argentina / San Juan": "America/Argentina/San_Juan", "Argentina / San Luis": "America/Argentina/San_Luis", "Argentina / Tucuman": "America/Argentina/Tucuman", "Argentina / Ushuaia": "America/Argentina/Ushuaia", Aruba: "America/Aruba", Asuncion: "America/Asuncion", Atikokan: "America/Atikokan", Atka: "America/Atka", Bahia: "America/Bahia", "Bahia Banderas": "America/Bahia_Banderas", Barbados: "America/Barbados", Belem: "America/Belem", Belize: "America/Belize", "Blanc-Sablon": "America/Blanc-Sablon", "Boa Vista": "America/Boa_Vista", Bogota: "America/Bogota", Boise: "America/Boise", "Buenos Aires": "America/Buenos_Aires", "Cambridge Bay": "America/Cambridge_Bay", "Campo Grande": "America/Campo_Grande", Cancun: "America/Cancun", Caracas: "America/Caracas", Catamarca: "America/Catamarca", Cayenne: "America/Cayenne", Cayman: "America/Cayman", Chicago: "America/Chicago", Chihuahua: "America/Chihuahua", "Coral Harbour": "America/Coral_Harbour", Cordoba: "America/Cordoba", "Costa Rica": "America/Costa_Rica", Creston: "America/Creston", Cuiaba: "America/Cuiaba", Curacao: "America/Curacao", Danmarkshavn: "America/Danmarkshavn", Dawson: "America/Dawson", "Dawson Creek": "America/Dawson_Creek", Denver: "America/Denver", Detroit: "America/Detroit", Dominica: "America/Dominica", Edmonton: "America/Edmonton", Eirunepe: "America/Eirunepe", "El Salvador": "America/El_Salvador", Ensenada: "America/Ensenada", "Fort Wayne": "America/Fort_Wayne", Fortaleza: "America/Fortaleza", "Glace Bay": "America/Glace_Bay", Godthab: "America/Godthab", "Goose Bay": "America/Goose_Bay", "Grand Turk": "America/Grand_Turk", Grenada: "America/Grenada", Guadeloupe: "America/Guadeloupe", Guatemala: "America/Guatemala", Guayaquil: "America/Guayaquil", Guyana: "America/Guyana", Halifax: "America/Halifax", Havana: "America/Havana", Hermosillo: "America/Hermosillo", "Indiana / Indianapolis": "America/Indiana/Indianapolis", "Indiana / Knox": "America/Indiana/Knox", "Indiana / Marengo": "America/Indiana/Marengo", "Indiana / Petersburg": "America/Indiana/Petersburg", "Indiana / Tell City": "America/Indiana/Tell_City", "Indiana / Vevay": "America/Indiana/Vevay", "Indiana / Vincennes": "America/Indiana/Vincennes", "Indiana / Winamac": "America/Indiana/Winamac", Indianapolis: "America/Indianapolis", Inuvik: "America/Inuvik", Iqaluit: "America/Iqaluit", Jamaica: "America/Jamaica", Jujuy: "America/Jujuy", Juneau: "America/Juneau", "Kentucky / Louisville": "America/Kentucky/Louisville", "Kentucky / Monticello": "America/Kentucky/Monticello", Kralendijk: "America/Kralendijk", "La Paz": "America/La_Paz", Lima: "America/Lima", "Los Angeles": "America/Los_Angeles", Louisville: "America/Louisville", "Lower Princes": "America/Lower_Princes", Maceio: "America/Maceio", Managua: "America/Managua", Manaus: "America/Manaus", Marigot: "America/Marigot", Martinique: "America/Martinique", Matamoros: "America/Matamoros", Mazatlan: "America/Mazatlan", Mendoza: "America/Mendoza", Menominee: "America/Menominee", Merida: "America/Merida", Metlakatla: "America/Metlakatla", "Mexico City": "America/Mexico_City", Miquelon: "America/Miquelon", Moncton: "America/Moncton", Monterrey: "America/Monterrey", Montevideo: "America/Montevideo", Montreal: "America/Montreal", Montserrat: "America/Montserrat", Nassau: "America/Nassau", "New York": "America/New_York", Nipigon: "America/Nipigon", Nome: "America/Nome", Noronha: "America/Noronha", "North Dakota / Beulah": "America/North_Dakota/Beulah", "North Dakota / Center": "America/North_Dakota/Center", "North Dakota / New Salem": "America/North_Dakota/New_Salem", Ojinaga: "America/Ojinaga", Panama: "America/Panama", Pangnirtung: "America/Pangnirtung", Paramaribo: "America/Paramaribo", Phoenix: "America/Phoenix", "Port-au-Prince": "America/Port-au-Prince", "Port of Spain": "America/Port_of_Spain", "Porto Acre": "America/Porto_Acre", "Porto Velho": "America/Porto_Velho", "Puerto Rico": "America/Puerto_Rico", "Rainy River": "America/Rainy_River", "Rankin Inlet": "America/Rankin_Inlet", Recife: "America/Recife", Regina: "America/Regina", Resolute: "America/Resolute", "Rio Branco": "America/Rio_Branco", Rosario: "America/Rosario", "Santa Isabel": "America/Santa_Isabel", Santarem: "America/Santarem", Santiago: "America/Santiago", "Santo Domingo": "America/Santo_Domingo", "Sao Paulo": "America/Sao_Paulo", Scoresbysund: "America/Scoresbysund", Shiprock: "America/Shiprock", Sitka: "America/Sitka", "St. Barthelemy": "America/St_Barthelemy", "St. Johns": "America/St_Johns", "St. Kitts": "America/St_Kitts", "St. Lucia": "America/St_Lucia", "St. Thomas": "America/St_Thomas", "St. Vincent": "America/St_Vincent", "Swift Current": "America/Swift_Current", Tegucigalpa: "America/Tegucigalpa", Thule: "America/Thule", "Thunder Bay": "America/Thunder_Bay", Tijuana: "America/Tijuana", Toronto: "America/Toronto", Tortola: "America/Tortola", Vancouver: "America/Vancouver", Virgin: "America/Virgin", Whitehorse: "America/Whitehorse", Winnipeg: "America/Winnipeg", Yakutat: "America/Yakutat", Yellowknife: "America/Yellowknife" }, Antarctica: { Casey: "Antarctica/Casey", Davis: "Antarctica/Davis", "Dumont d'Urville": "Antarctica/DumontDUrville", Macquarie: "Antarctica/Macquarie", Mawson: "Antarctica/Mawson", McMurdo: "Antarctica/McMurdo", Palmer: "Antarctica/Palmer", Rothera: "Antarctica/Rothera", "South Pole": "Antarctica/South_Pole", Syowa: "Antarctica/Syowa", Troll: "Antarctica/Troll", Vostok: "Antarctica/Vostok" }, Arctic: { Longyearbyen: "Arctic/Longyearbyen" }, Asia: { Aden: "Asia/Aden", Almaty: "Asia/Almaty", Amman: "Asia/Amman", Anadyr: "Asia/Anadyr", Aqtau: "Asia/Aqtau", Aqtobe: "Asia/Aqtobe", Ashgabat: "Asia/Ashgabat", Ashkhabad: "Asia/Ashkhabad", Baghdad: "Asia/Baghdad", Bahrain: "Asia/Bahrain", Baku: "Asia/Baku", Bangkok: "Asia/Bangkok", Beirut: "Asia/Beirut", Bishkek: "Asia/Bishkek", Brunei: "Asia/Brunei", Calcutta: "Asia/Calcutta", Chita: "Asia/Chita", Choibalsan: "Asia/Choibalsan", Chongqing: "Asia/Chongqing", Colombo: "Asia/Colombo", Dacca: "Asia/Dacca", Damascus: "Asia/Damascus", Dhaka: "Asia/Dhaka", Dili: "Asia/Dili", Dubai: "Asia/Dubai", Dushanbe: "Asia/Dushanbe", Gaza: "Asia/Gaza", Harbin: "Asia/Harbin", Hebron: "Asia/Hebron", "Ho Chi Minh": "Asia/Ho_Chi_Minh", "Hong Kong": "Asia/Hong_Kong", Hovd: "Asia/Hovd", Irkutsk: "Asia/Irkutsk", Istanbul: "Asia/Istanbul", Jakarta: "Asia/Jakarta", Jayapura: "Asia/Jayapura", Jerusalem: "Asia/Jerusalem", Kabul: "Asia/Kabul", Kamchatka: "Asia/Kamchatka", Karachi: "Asia/Karachi", Kashgar: "Asia/Kashgar", Kathmandu: "Asia/Kathmandu", Katmandu: "Asia/Katmandu", Khandyga: "Asia/Khandyga", Kolkata: "Asia/Kolkata", Krasnoyarsk: "Asia/Krasnoyarsk", "Kuala Lumpur": "Asia/Kuala_Lumpur", Kuching: "Asia/Kuching", Kuwait: "Asia/Kuwait", Macao: "Asia/Macao", Macau: "Asia/Macau", Magadan: "Asia/Magadan", Makassar: "Asia/Makassar", Manila: "Asia/Manila", Muscat: "Asia/Muscat", Nicosia: "Asia/Nicosia", Novokuznetsk: "Asia/Novokuznetsk", Novosibirsk: "Asia/Novosibirsk", Omsk: "Asia/Omsk", Oral: "Asia/Oral", "Phnom Penh": "Asia/Phnom_Penh", Pontianak: "Asia/Pontianak", Pyongyang: "Asia/Pyongyang", Qatar: "Asia/Qatar", Qyzylorda: "Asia/Qyzylorda", Rangoon: "Asia/Rangoon", Riyadh: "Asia/Riyadh", Saigon: "Asia/Saigon", Sakhalin: "Asia/Sakhalin", Samarkand: "Asia/Samarkand", Seoul: "Asia/Seoul", Shanghai: "Asia/Shanghai", Singapore: "Asia/Singapore", Srednekolymsk: "Asia/Srednekolymsk", Taipei: "Asia/Taipei", Tashkent: "Asia/Tashkent", Tbilisi: "Asia/Tbilisi", Tehran: "Asia/Tehran", "Tel Aviv": "Asia/Tel_Aviv", Thimbu: "Asia/Thimbu", Thimphu: "Asia/Thimphu", Tokyo: "Asia/Tokyo", "Ujung Pandang": "Asia/Ujung_Pandang", Ulaanbaatar: "Asia/Ulaanbaatar", "Ulan Bator": "Asia/Ulan_Bator", Urumqi: "Asia/Urumqi", "Ust-Nera": "Asia/Ust-Nera", Vientiane: "Asia/Vientiane", Vladivostok: "Asia/Vladivostok", Yakutsk: "Asia/Yakutsk", Yekaterinburg: "Asia/Yekaterinburg", Yerevan: "Asia/Yerevan" }, Atlantic: { Azores: "Atlantic/Azores", Bermuda: "Atlantic/Bermuda", Canary: "Atlantic/Canary", "Cape Verde": "Atlantic/Cape_Verde", Faeroe: "Atlantic/Faeroe", Faroe: "Atlantic/Faroe", "Jan Mayen": "Atlantic/Jan_Mayen", Madeira: "Atlantic/Madeira", Reykjavik: "Atlantic/Reykjavik", "South Georgia": "Atlantic/South_Georgia", "St. Helena": "Atlantic/St_Helena", Stanley: "Atlantic/Stanley" }, Australia: { Adelaide: "Australia/Adelaide", Brisbane: "Australia/Brisbane", "Broken Hill": "Australia/Broken_Hill", Canberra: "Australia/Canberra", Currie: "Australia/Currie", Darwin: "Australia/Darwin", Eucla: "Australia/Eucla", Hobart: "Australia/Hobart", Lindeman: "Australia/Lindeman", "Lord Howe": "Australia/Lord_Howe", Melbourne: "Australia/Melbourne", North: "Australia/North", Perth: "Australia/Perth", Queensland: "Australia/Queensland", South: "Australia/South", Sydney: "Australia/Sydney", Tasmania: "Australia/Tasmania", Victoria: "Australia/Victoria", West: "Australia/West", Yancowinna: "Australia/Yancowinna" }, Brazil: { Acre: "Brazil/Acre", "Fernando de Noronha": "Brazil/DeNoronha", East: "Brazil/East", West: "Brazil/West" }, Canada: { Atlantic: "Canada/Atlantic", Central: "Canada/Central", "East-Saskatchewan": "Canada/East-Saskatchewan", Eastern: "Canada/Eastern", Mountain: "Canada/Mountain", Newfoundland: "Canada/Newfoundland", Pacific: "Canada/Pacific", Saskatchewan: "Canada/Saskatchewan", Yukon: "Canada/Yukon" }, Chile: { Continental: "Chile/Continental", "Easter Island": "Chile/EasterIsland" }, Europe: { Amsterdam: "Europe/Amsterdam", Andorra: "Europe/Andorra", Athens: "Europe/Athens", Belfast: "Europe/Belfast", Belgrade: "Europe/Belgrade", Berlin: "Europe/Berlin", Bratislava: "Europe/Bratislava", Brussels: "Europe/Brussels", Bucharest: "Europe/Bucharest", Budapest: "Europe/Budapest", Busingen: "Europe/Busingen", Chisinau: "Europe/Chisinau", Copenhagen: "Europe/Copenhagen", Dublin: "Europe/Dublin", Gibraltar: "Europe/Gibraltar", Guernsey: "Europe/Guernsey", Helsinki: "Europe/Helsinki", "Isle of Man": "Europe/Isle_of_Man", Istanbul: "Europe/Istanbul", Jersey: "Europe/Jersey", Kaliningrad: "Europe/Kaliningrad", Kiev: "Europe/Kiev", Lisbon: "Europe/Lisbon", Ljubljana: "Europe/Ljubljana", London: "Europe/London", Luxembourg: "Europe/Luxembourg", Madrid: "Europe/Madrid", Malta: "Europe/Malta", Mariehamn: "Europe/Mariehamn", Minsk: "Europe/Minsk", Monaco: "Europe/Monaco", Moscow: "Europe/Moscow", Nicosia: "Europe/Nicosia", Oslo: "Europe/Oslo", Paris: "Europe/Paris", Podgorica: "Europe/Podgorica", Prague: "Europe/Prague", Riga: "Europe/Riga", Rome: "Europe/Rome", Samara: "Europe/Samara", "San Marino": "Europe/San_Marino", Sarajevo: "Europe/Sarajevo", Simferopol: "Europe/Simferopol", Skopje: "Europe/Skopje", Sofia: "Europe/Sofia", Stockholm: "Europe/Stockholm", Tallinn: "Europe/Tallinn", Tirane: "Europe/Tirane", Tiraspol: "Europe/Tiraspol", Uzhgorod: "Europe/Uzhgorod", Vaduz: "Europe/Vaduz", Vatican: "Europe/Vatican", Vienna: "Europe/Vienna", Vilnius: "Europe/Vilnius", Volgograd: "Europe/Volgograd", Warsaw: "Europe/Warsaw", Zagreb: "Europe/Zagreb", Zaporozhye: "Europe/Zaporozhye", Zurich: "Europe/Zurich" }, GMT: { "GMT-14": "Etc/GMT-14", "GMT-13": "Etc/GMT-13", "GMT-12": "Etc/GMT-12", "GMT-11": "Etc/GMT-11", "GMT-10": "Etc/GMT-10", "GMT-9": "Etc/GMT-9", "GMT-8": "Etc/GMT-8", "GMT-7": "Etc/GMT-7", "GMT-6": "Etc/GMT-6", "GMT-5": "Etc/GMT-5", "GMT-4": "Etc/GMT-4", "GMT-3": "Etc/GMT-3", "GMT-2": "Etc/GMT-2", "GMT-1": "Etc/GMT-1", "GMT+0": "Etc/GMT+0", "GMT+1": "Etc/GMT+1", "GMT+2": "Etc/GMT+2", "GMT+3": "Etc/GMT+3", "GMT+4": "Etc/GMT+4", "GMT+5": "Etc/GMT+5", "GMT+6": "Etc/GMT+6", "GMT+7": "Etc/GMT+7", "GMT+8": "Etc/GMT+8", "GMT+9": "Etc/GMT+9", "GMT+10": "Etc/GMT+10", "GMT+11": "Etc/GMT+11", "GMT+12": "Etc/GMT+12" }, Indian: { Antananarivo: "Indian/Antananarivo", Chagos: "Indian/Chagos", Christmas: "Indian/Christmas", Cocos: "Indian/Cocos", Comoro: "Indian/Comoro", Kerguelen: "Indian/Kerguelen", Mahe: "Indian/Mahe", Maldives: "Indian/Maldives", Mauritius: "Indian/Mauritius", Mayotte: "Indian/Mayotte", Reunion: "Indian/Reunion" }, Mexico: { "Baja Norte": "Mexico/BajaNorte", "Baja Sur": "Mexico/BajaSur", General: "Mexico/General" }, Pacific: { Apia: "Pacific/Apia", Auckland: "Pacific/Auckland", Bougainville: "Pacific/Bougainville", Chatham: "Pacific/Chatham", Chuuk: "Pacific/Chuuk", Easter: "Pacific/Easter", Efate: "Pacific/Efate", Enderbury: "Pacific/Enderbury", Fakaofo: "Pacific/Fakaofo", Fiji: "Pacific/Fiji", Funafuti: "Pacific/Funafuti", Galapagos: "Pacific/Galapagos", Gambier: "Pacific/Gambier", Guadalcanal: "Pacific/Guadalcanal", Guam: "Pacific/Guam", Honolulu: "Pacific/Honolulu", Johnston: "Pacific/Johnston", Kiritimati: "Pacific/Kiritimati", Kosrae: "Pacific/Kosrae", Kwajalein: "Pacific/Kwajalein", Majuro: "Pacific/Majuro", Marquesas: "Pacific/Marquesas", Midway: "Pacific/Midway", Nauru: "Pacific/Nauru", Niue: "Pacific/Niue", Norfolk: "Pacific/Norfolk", Noumea: "Pacific/Noumea", "Pago Pago": "Pacific/Pago_Pago", Palau: "Pacific/Palau", Pitcairn: "Pacific/Pitcairn", Pohnpei: "Pacific/Pohnpei", Ponape: "Pacific/Ponape", "Port Moresby": "Pacific/Port_Moresby", Rarotonga: "Pacific/Rarotonga", Saipan: "Pacific/Saipan", Samoa: "Pacific/Samoa", Tahiti: "Pacific/Tahiti", Tarawa: "Pacific/Tarawa", Tongatapu: "Pacific/Tongatapu", Truk: "Pacific/Truk", Wake: "Pacific/Wake", Wallis: "Pacific/Wallis", Yap: "Pacific/Yap" } }; a.regions = function() { var b = [""], d; for (d in a.timeZones) b.push(d); return b }(); var e = function() { var b = {}, d; for (d in a.timeZones) { var e = a.timeZones[d], h; for (h in e) b[e[h]] = d } return b }() , d = function() { var b = {}, d; for (d in a.timeZones) { var e = a.timeZones[d], h = null, k = null, l; for (l in e) { var n = e[l]; if (!h || l < h) h = l, k = n } b[d] = k } return b }(); a.region = ""; a.$watch("model", function(b) { a.region = e[b] || ""; d[a.region] = b }); a.$watch("region", function(b) { a.model = d[b] || null }) } ]); angular.module("touch", []); angular.module("rest").factory("TranslatableMessage", [function() { return function(a) { a = a || {}; this.key = a.key; this.variables = a.variables } } ]); angular.module("locale").factory("translationLoader", ["$injector", function(a) { var b = a.get("$http") , e = a.get("$q") , d = a.get("cacheService") , c = a.get("languageService") , f = function h(a, e, f) { var k = f.shift(); if (k) { var l = function() { h(a, e, f) }; c.getLanguages().success(function(c) { k in c ? b({ cache: d.languages, method: "GET", url: "translations/" + encodeURIComponent(k) + ".json" }).success(function(b) { a.resolve(b) }).error(l) : l() }).error(l) } else a.resolve("{}") }; return function(a) { var b = e.defer() , c = a.key; a = a.key; var d = a.indexOf("_"); a = -1 === d ? [a] : [a, a.substr(0, d)]; f(b, c, a); return b.promise } } ]); angular.module("locale").factory("translationStringService", [function() { return { canonicalize: function(a) { return a.replace(/[^a-zA-Z0-9]+/g, "_").toUpperCase() } } } ]); angular.module("rest").factory("tunnelService", ["$injector", function(a) { var b = a.get("Error") , e = a.get("$http") , d = a.get("$q") , c = a.get("$window") , f = a.get("authenticationService"); a = {}; var g = c.document; a.getTunnels = function() { var a = { token: f.getCurrentToken() }; return e({ method: "GET", url: "api/session/tunnels", params: a }) } ; a.getSharingProfiles = function(a) { var b = { token: f.getCurrentToken() }; return e({ method: "GET", url: "api/session/tunnels/" + encodeURIComponent(a) + "/activeConnection/connection/sharingProfiles", params: b }) } ; a.getSharingCredentials = function(a, b) { var c = { token: f.getCurrentToken() }; return e({ method: "GET", url: "api/session/tunnels/" + encodeURIComponent(a) + "/activeConnection/sharingCredentials/" + encodeURIComponent(b), params: c }) } ; a.downloadStream = function(a, b, d, e) { a = c.location.origin + c.location.pathname + "api/session/tunnels/" + encodeURIComponent(a) + "/streams/" + encodeURIComponent(b.index) + "/" + encodeURIComponent(e.replace(/[\\\/]+/g, "_")) + "?token\x3d" + encodeURIComponent(f.getCurrentToken()); var h = g.createElement("iframe"); h.style.position = "fixed"; h.style.border = "none"; h.style.width = "1px"; h.style.height = "1px"; h.style.left = "-1px"; h.style.top = "-1px"; g.body.appendChild(h); h.onload = function() { g.body.removeChild(h) } ; b.onblob = function() { b.sendAck("OK", Guacamole.Status.Code.SUCCESS) } ; b.onend = function() { c.setTimeout(function() { g.body.removeChild(h) }, 5E3) } ; h.src = a } ; a.uploadToStream = function(a, e, g, n) { var h = d.defer(); a = c.location.origin + c.location.pathname + "api/session/tunnels/" + encodeURIComponent(a) + "/streams/" + encodeURIComponent(e.index) + "/" + encodeURIComponent(g.name.replace(/[\\\/]+/g, "_")) + "?token\x3d" + encodeURIComponent(f.getCurrentToken()); var k = new XMLHttpRequest; n && k.upload && k.upload.addEventListener("progress", function(a) { n(a.loaded) }); k.onreadystatechange = function() { 4 === k.readyState && (200 <= k.status && 300 > k.status ? h.resolve() : "application/json" === k.getResponseHeader("Content-Type") ? h.reject(angular.fromJson(k.responseText)) : 400 <= k.status && 500 > k.status ? h.reject(new b({ type: b.Type.STREAM_ERROR, statusCode: Guacamole.Status.Code.CLIENT_FORBIDDEN, message: "HTTP " + k.status })) : h.reject(new b({ type: b.Type.STREAM_ERROR, statusCode: Guacamole.Status.Code.INTERNAL_ERROR, message: "HTTP " + k.status }))) } ; k.open("POST", a, !0); k.send(g); return h.promise } ; return a } ]); angular.module("rest").factory("User", [function() { var a = function(a) { a = a || {}; this.username = a.username; this.password = a.password; this.lastActive = a.lastActive; this.attributes = {} }; a.Attributes = { FULL_NAME: "guac-full-name", EMAIL_ADDRESS: "guac-email-address", ORGANIZATION: "guac-organization", ORGANIZATIONAL_ROLE: "guac-organizational-role" }; return a } ]); angular.module("rest").factory("UserCredentials", ["$injector", function(a) { var b = a.get("$window") , e = a.get("Field") , d = function(a) { a = a || {}; this.expected = a.expected; this.values = a.values }; d.getQueryParameters = function(a) { var b = []; angular.forEach(a.expected, function(c) { if (c.type === e.Type.QUERY_PARAMETER) { c = c.name; var d = a.values[c]; b.push(encodeURIComponent(c) + "\x3d" + encodeURIComponent(d)) } }); return b.join("\x26") } ; d.getLink = function(a) { var c = b.location.origin + b.location.pathname + "#/"; (a = d.getQueryParameters(a)) && (c += "?" + a); return c } ; return d } ]); angular.module("navigation").factory("userPageService", ["$injector", function(a) { var b = a.get("ClientIdentifier") , e = a.get("ConnectionGroup") , d = a.get("PageDefinition") , c = a.get("PermissionSet") , f = a.get("$q") , g = a.get("authenticationService") , h = a.get("connectionGroupService") , k = a.get("dataSourceService") , l = a.get("permissionService") , n = a.get("translationStringService"); a = {}; var m = new d({ name: "USER_MENU.ACTION_NAVIGATE_HOME", url: "/" }) , p = function(a) { var c = null, f; for (f in a) { var g = a[f] , h = g.childConnections || [] , g = g.childConnectionGroups || [] , k = h.length + g.length; if (null === c && 1 === k) h = h[0], g = g[0], h && (c = new d({ name: h.name, url: "/client/" + b.toString({ dataSource: f, type: b.Types.CONNECTION, id: h.identifier }) })), g && g.type === e.Type.BALANCING && _.isEmpty(g.childConnections) && _.isEmpty(g.childConnectionGroups) && (c = new d({ name: g.name, url: "/client/" + b.toString({ dataSource: f, type: b.Types.CONNECTION_GROUP, id: g.identifier }) })); else if (1 <= k) { c = null; break } } return c || m }; a.getHomePage = function() { var a = f.defer(); k.apply(h.getConnectionGroupTree, g.getAvailableDataSources(), e.ROOT_IDENTIFIER).then(function(b) { a.resolve(p(b)) }); return a.promise } ; var q = function(a) { var b = [] , f = [] , h = [] , k = [] , l = []; angular.forEach(g.getAvailableDataSources(), function(b) { var d = a[b]; d && (d = angular.copy(d), c.removeConnectionGroupPermission(d, c.ObjectPermissionType.UPDATE, e.ROOT_IDENTIFIER), c.removeUserPermission(d, c.ObjectPermissionType.UPDATE, g.getCurrentUsername()), (c.hasSystemPermission(d, c.SystemPermissionType.ADMINISTER) || c.hasSystemPermission(d, c.SystemPermissionType.CREATE_USER) || c.hasUserPermission(d, c.ObjectPermissionType.UPDATE) || c.hasUserPermission(d, c.ObjectPermissionType.DELETE) || c.hasUserPermission(d, c.ObjectPermissionType.ADMINISTER)) && f.push(b), (c.hasSystemPermission(d, c.SystemPermissionType.ADMINISTER) || c.hasSystemPermission(d, c.SystemPermissionType.CREATE_CONNECTION) || c.hasSystemPermission(d, c.SystemPermissionType.CREATE_CONNECTION_GROUP) || c.hasConnectionPermission(d, c.ObjectPermissionType.UPDATE) || c.hasConnectionGroupPermission(d, c.ObjectPermissionType.UPDATE) || c.hasConnectionPermission(d, c.ObjectPermissionType.DELETE) || c.hasConnectionGroupPermission(d, c.ObjectPermissionType.DELETE) || c.hasConnectionPermission(d, c.ObjectPermissionType.ADMINISTER) || c.hasConnectionGroupPermission(d, c.ObjectPermissionType.ADMINISTER)) && h.push(b), c.hasSystemPermission(d, c.SystemPermissionType.ADMINISTER) && (l.push(b), k.push(b))) }); l.length && b.push(new d({ name: "USER_MENU.ACTION_MANAGE_SESSIONS", url: "/settings/sessions" })); angular.forEach(k, function(a) { b.push(new d({ name: ["USER_MENU.ACTION_VIEW_HISTORY", n.canonicalize("DATA_SOURCE_" + a) + ".NAME"], url: "/settings/" + encodeURIComponent(a) + "/history" })) }); f.length && b.push(new d({ name: "USER_MENU.ACTION_MANAGE_USERS", url: "/settings/users" })); angular.forEach(h, function(a) { b.push(new d({ name: ["USER_MENU.ACTION_MANAGE_CONNECTIONS", n.canonicalize("DATA_SOURCE_" + a) + ".NAME"], url: "/settings/" + encodeURIComponent(a) + "/connections" })) }); b.push(new d({ name: "USER_MENU.ACTION_MANAGE_PREFERENCES", url: "/settings/preferences" })); return b }; a.getSettingsPages = function() { var a = f.defer(); k.apply(l.getPermissions, g.getAvailableDataSources(), g.getCurrentUsername()).then(function(b) { a.resolve(q(b)) }); return a.promise } ; var t = function(a, b) { var c = []; a = p(a); b = q(b); (a === m || b.length) && c.push(a); b.length && c.push(new d({ name: "USER_MENU.ACTION_MANAGE_SETTINGS", url: b[0].url })); return c }; a.getMainPages = function() { var a = f.defer() , b = null , c = null , d = function() { b && c && a.resolve(t(b, c)) }; k.apply(h.getConnectionGroupTree, g.getAvailableDataSources(), e.ROOT_IDENTIFIER).then(function(a) { b = a; d() }); k.apply(l.getPermissions, g.getAvailableDataSources(), g.getCurrentUsername()).then(function(a) { c = a; d() }); return a.promise } ; return a } ]); angular.module("rest").factory("UserPasswordUpdate", [function() { return function(a) { a = a || {}; this.oldPassword = a.oldPassword; this.newPassword = a.newPassword } } ]); angular.module("rest").factory("userService", ["$injector", function(a) { var b = a.get("$http"); a.get("$q"); var e = a.get("authenticationService") , d = a.get("cacheService") , c = a.get("UserPasswordUpdate"); return { getUsers: function(a, c) { var f = { token: e.getCurrentToken() }; c && (f.permission = c); return b({ cache: d.users, method: "GET", url: "api/session/data/" + encodeURIComponent(a) + "/users", params: f }) }, getUser: function(a, c) { var f = { token: e.getCurrentToken() }; return b({ cache: d.users, method: "GET", url: "api/session/data/" + encodeURIComponent(a) + "/users/" + encodeURIComponent(c), params: f }) }, deleteUser: function(a, c) { var f = { token: e.getCurrentToken() }; return b({ method: "DELETE", url: "api/session/data/" + encodeURIComponent(a) + "/users/" + encodeURIComponent(c.username), params: f }).success(function() { d.users.removeAll() }) }, createUser: function(a, c) { var f = { token: e.getCurrentToken() }; return b({ method: "POST", url: "api/session/data/" + encodeURIComponent(a) + "/users", params: f, data: c }).success(function() { d.users.removeAll() }) }, saveUser: function(a, c) { var f = { token: e.getCurrentToken() }; return b({ method: "PUT", url: "api/session/data/" + encodeURIComponent(a) + "/users/" + encodeURIComponent(c.username), params: f, data: c }).success(function() { d.users.removeAll() }) }, updateUserPassword: function(a, g, h, k) { var f = { token: e.getCurrentToken() }; return b({ method: "PUT", url: "api/session/data/" + encodeURIComponent(a) + "/users/" + encodeURIComponent(g) + "/password", params: f, data: new c({ oldPassword: h, newPassword: k }) }).success(function() { d.users.removeAll() }) } } } ]);