
kerio.waw.ui.interfaceVpnServerEditor = {

x_m: function(x_n) {
this.x_ga = x_n; var x_2w = this.x_ga + '_';
var x_1b = kerio.lib;
var x_x = x_1b.x_x;
var x_o = (kerio.waw.status.x_p.x_q === x_r.x_s.x_t);
var x_br = x_1b.x_a1(
{	x_a2: 120,
hu: 135,
es: 135
});
var x_17e = {
x_1e: [
{	x_1f: 'x_1q',
x_1j: 'x_12i',
x_1l: true,
x_7d: true,
x_1s: x_x('Enable VPN Server', 'interfaceEditor'),

x_9t: function(x_1c, x_1q, x_7d) {
x_1c.x_84(['x_t1', 'x_150'], !x_7d);
var x_p5 = x_1c.x_16.x_p5;
x_p5.x_16z(['x_17f', 'x_17g'], !x_7d);
} },
{	x_1f: 'x_79',
x_23: x_x('IP Address Assignment', 'interfaceEditor'),
x_br: x_br,
x_1j: 'x_t1',
x_1e: [
{	x_1f: 'x_1i',
x_1o: x_x('Assign IP addresses to VPN clients using the following network:', 'interfaceEditor')
},
{	x_23: x_x('VPN Network:', 'interfaceEditor'),
x_1j: 'x_17h',
x_1u: 120,
x_93: 15,
x_b6: {
x_b7: false,
x_nv: 'x_t2'
}
},
{	x_23: x_x('Mask:', 'common'),
x_1j: 'x_24',
x_1u: 120,
x_93: 15,
x_b6: {
x_b7: false,
x_nv: 'x_12n'
}
}
]
},x_fi.x_17i('x_79')
]
};var x_17j = {
x_1e: [
{	x_1f: 'x_79',
x_23: x_x('DNS', 'common'),
x_1e: [
{ x_1f: 'x_1g',
x_1l: true,
x_1e: [
{
x_1f: 'x_7a',
x_7b: 'x_17k',
x_1s: x_x('Use WinRoute as DNS server', 'interfaceEditor'),
x_1o: true,
x_7d: true,

x_9t: function(x_1c, x_1q, x_7d) {
x_1c.x_84(['x_17l'], x_7d);
} },
{
x_1f: 'x_7a',
x_7b: 'x_17k',
x_1s: x_x('Use specific DNS servers', 'interfaceEditor'),
x_1o: false
}
]
}, { x_1f: 'x_1g',
x_1j: 'x_17l',
x_31: true,
x_br: 135,
x_b2: 1,
x_1e: [
{
x_1j: 'x_17m',
x_23: x_x('Primary DNS:', 'interfaceEditor'),
x_93: 15,
x_b6: {
x_b7: false,
x_nv: 'x_t2'
}
},
{
x_1j: 'x_17n',
x_23: x_x('Secondary DNS:', 'interfaceEditor'),
x_93: 15,
x_b6: {
x_b7: true, x_nv: 'x_t2'
}
}
]
} ] }, {
x_1f: 'x_79',
x_23: x_x('Domain suffix', 'interfaceEditor'),
x_br: 135,
x_1e: [
{ x_1f: 'x_1g',
x_1l: true,
x_1e: [
{
x_1f: 'x_7a',
x_7b: 'x_17o',
x_1s: x_x('Automatically select the domain suffix', 'interfaceEditor'),
x_1o: true,
x_7d: true,

x_9t: function(x_1c, x_1q, x_7d){
x_1c.x_84(['x_17p'], x_7d);
} },
{
x_1f: 'x_7a',
x_7b: 'x_17o',
x_1s: x_x('Use specific domain suffix', 'interfaceEditor'),
x_1o: false
}
]
}, {
x_1j: 'x_17p',
x_23: x_x('Domain suffix:', 'interfaceEditor'),
x_93: 127,
x_ge: true,
x_b2: 1,
x_b6: {
x_b7: false,
x_nv: 'x_nw'
}
}
] }
]
}; var x_17q = {
x_1e: [
{	x_1f: 'x_79',
x_23: x_x('WINS servers', 'interfaceEditor'),
x_1e: [
{ x_1f: 'x_1g',
x_1l: true,
x_1e: [
{
x_1f: 'x_7a',
x_7b: 'x_17r',
x_1s: x_x('Detect WINS server automatically', 'interfaceEditor'),
x_1o: true,
x_7d: true,

x_9t: function(x_1c, x_1q, x_7d) {
x_1c.x_84(['x_17s'], x_7d);
} },
{
x_1f: 'x_7a',
x_7b: 'x_17r',
x_1s: x_x('Use specific WINS servers', 'interfaceEditor'),
x_1o: false
}
]
}, { x_1f: 'x_1g',
x_1j: 'x_17s',
x_31: true,
x_br: 145,
x_b2: 1,
x_1e: [
{
x_1j: 'x_17t',
x_23: x_x('Primary WINS:', 'interfaceEditor'),
x_93: 15,
x_b6: {
x_b7: false,
x_nv: 'x_t2'
}
},
{
x_1j: 'x_17u',
x_23: x_x('Secondary WINS:', 'interfaceEditor'),
x_93: 15,
x_b6: {
x_b7: true, x_nv: 'x_t2'
}
}
]
} ] } ]
}; var x_17v = {
x_2w: x_2w,
x_o: x_o,
x_7q: x_x('All VPN clients are automatically configured with routes to local networks. Here you may define additional custom routes.', 'interfaceEditor')
};var x_17w = new kerio.waw.shared.x_17.x_e2(x_17v);
var x_17x = {
x_1e: [
{	x_1f: 'x_79',
x_23: x_x('VPN Server', 'interfaceEditor'),
x_br: x_1b.x_a1(
{	x_a2: 95,
pl: 121,
ru: 106
}),
x_1e: [
{	x_1f: 'x_b4',
x_23: x_x('Listen on port:', 'interfaceEditor'),
x_1j: 'x_17y',
x_1u: 80,
x_93: 5,
x_b6: {
x_b7: false,
x_nv: 'x_17z'
}
}
]
}, {	x_1f: 'x_79',
x_23: x_x('Custom Routes', 'interfaceEditor'),
x_1e: [
{	x_1f: 'x_1g',
x_1v: 220,
x_1x: x_17w
}
]
}
]
}; var x_12p  = new x_1b.x_1t(x_2w + 'x_12p',  x_17e);
var x_180      = new x_1b.x_1t(x_2w + 'x_180',      x_17j);
var x_181     = new x_1b.x_1t(x_2w + 'x_181',      x_17q);
var x_182 = new x_1b.x_1t(x_2w + 'x_182', x_17x);
if (kerio.lib.x_j9) {
x_12p.x_29('x_183').x_2o.onDisable = x_fi.x_184;
}
var x_p4 = {
x_1e: [
{
x_23: x_x('General', 'common'),
x_1x: x_12p,
x_1j: 'x_185'
},
{
x_23: x_x('DNS', 'common'),
x_1x: x_180,
x_1j: 'x_17f'
},
{
x_23: x_x('WINS', 'common'),
x_1x: x_181,
x_1j: 'x_186'
},
{
x_23: x_x('Advanced', 'common'),
x_1x: x_182,
x_1j: 'x_17g'
}
] }; var x_p5 = new x_1b.x_py(x_2w + 'x_p5', x_p4);
var x_q3 = new kerio.lib.x_q2(x_2w + 'x_q3',
[x_12p, x_180, x_181, x_182]);
var x_187 = 470;
var x_jb = x_1b.x_a1(
{	x_a2: 460,
es: x_187,
en: x_187,
hr: x_187,
hu: x_187,
ja: x_187,
nl: x_187,
pl: x_187,
zh: x_187
});
var x_10 = {
x_1v: x_jb,
x_1x: x_p5,
x_1y: x_x('VPN Server', 'interfaceEditor'),

x_mc: function() {
this.x_16.x_iy();
},
x_188: function() {
if (this.x_16.x_17w.x_ef) {
x_fi.x_ej(x_r.x_e8.x_189);
}
this.x_16.x_2r();
}};
var x_16 = new x_1b.x_26(this.x_ga, new x_fa.x_11k.x_11l(x_10));
if (x_o) {
x_q3.x_7f();
}
x_16.x_27(
{	x_n: x_n,
x_o: x_o,
x_p5: x_p5,
x_q3: x_q3,
x_12p: x_12p,
x_p5: x_p5,
x_17w: x_17w,
x_o5: {},
x_5d: {},
x_12i: x_12p.x_29('x_12i')
}
);x_12p.x_27(
{x_16: x_16}
);
this.x_2a(x_16);
return x_16;
}, 
x_2a: function(x_2b) {

x_2b.x_2c = function(x_28) {
var
x_47 = x_28.x_47,
x_t1 = x_47.server,
x_17w = this.x_17w,
x_18a = x_t1.localDns,
x_7h;
this.x_5d = x_28.x_5d;
this.x_o5 = x_47;x_17w.x_ef = false;
x_17w.x_eh('VpnServer');
x_7h = {
x_12i: x_47.enabled,
x_17h: x_t1.network,
x_24: x_t1.mask,
x_17k: x_18a,
x_17m: (x_18a ? '' : x_t1.primaryDns), x_17n: x_t1.secondaryDns,
x_17o: x_t1.autodetectDomainSuffix,
x_17p: x_t1.domainSuffix,
x_17r: x_t1.localWins,
x_17t: x_t1.primaryWins,
x_17u: x_t1.secondaryWins,
x_17y: x_t1.port
};
this.x_q3.x_7k(x_7h);
x_fi.x_18b(this.x_12p, x_28.x_5d.x_150);
};
x_2b.x_iy = function() {
var x_7h = this.x_q3.x_7i(true);
var x_o5 = this.x_o5;
var x_da = [];
var x_11s = {
enabled: x_7h.x_12i,
server: {
port:                   x_7h.x_17y,
network:                x_7h.x_17h,
mask:                   x_7h.x_24,
localDns:               x_7h.x_17k,
primaryDns:             x_7h.x_17m,
secondaryDns:           x_7h.x_17n,
autodetectDomainSuffix: x_7h.x_17o,
domainSuffix:           x_7h.x_17p,
localWins:              x_7h.x_17r,
primaryWins:            x_7h.x_17t,
secondaryWins:          x_7h.x_17u
}
};
x_fi.x_iq(x_11s, x_o5);
if (this.x_17w.x_ef) {
this.x_5d.x_14z = true;
x_da.push({
object: 'VpnRouteManager',
method: 'applySnapshot'
});
}
x_da.push({
object: 'InterfaceManager',
method: 'set',
params: kerio.lib.x_6r({
ids: [x_o5.id],
details: x_o5
})
});
x_fi.x_db.call(this, x_da, this.x_jk);
};
x_2b.x_jk = function(x_6v) {
var
x_fk = (this.x_17w.x_ef) ? 1 : 0, x_3l = this.x_5d,
x_60 = x_3l.x_60;
this.x_24(false);
if (!x_6v.x_6x) {
return;
}
if (false === this.x_12i.x_2t()) {
x_60.x_ix('x_13c');
x_3l.x_13r = true;
}
else {
x_3l.x_12s(x_6v.x_ac.batchResult[x_fk].result[0]);x_3l.x_13r = true;
}
x_3l.x_6y();
kerio.waw.status.x_14.x_15(true);
this.x_2r();
};
x_2b.x_jo = function() {
this.x_q3.x_2h();
this.x_p5.x_lf('x_185');
};} }; 