@gameap/frontend 4.1.0-dev1 → 4.1.0-dev10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/dist/AdminClientCertificatesView-Bg8X_Ouc.js +370 -0
  2. package/dist/AdminDaemonTaskListView-DbJp0aqQ.js +316 -0
  3. package/dist/AdminDaemonTaskOutputView-DNCHQfxx.js +87 -0
  4. package/dist/AdminGamesEdit-jco7cBfk.js +473 -0
  5. package/dist/AdminGamesList-CMjsgEpx.js +518 -0
  6. package/dist/AdminModEdit-BlRu_09M.js +529 -0
  7. package/dist/AdminNodeShowView-BHxJkjYJ.js +175 -0
  8. package/dist/AdminNodesCreateView-DihmM46W.js +87 -0
  9. package/dist/AdminNodesEditView-CVACSido.js +65 -0
  10. package/dist/AdminNodesView-CHtiU6dZ.js +167 -0
  11. package/dist/AdminPluginsView-CRjF3BPs.js +984 -0
  12. package/dist/AdminServersCreate-5f8x6eZO.js +342 -0
  13. package/dist/AdminServersEdit-CA7711nJ.js +400 -0
  14. package/dist/AdminServersList-De5ZMEGZ.js +168 -0
  15. package/dist/AdminUsersEditView-DeYo98vi.js +308 -0
  16. package/dist/AdminUsersView-C8fKEhpr.js +446 -0
  17. package/dist/CreateModForm-CqkvVLfN.js +123 -0
  18. package/dist/CreateNodeModal-DOXVtVLQ.js +100 -0
  19. package/dist/DsIpSelector-C676Y19X.js +90 -0
  20. package/dist/EmptyView-Bf6zmQQt.js +9 -0
  21. package/dist/FileManager-DSa9v4Ex.js +5932 -0
  22. package/dist/GameIcon-DaYNlnur.js +87 -0
  23. package/dist/GameModSelector-CQBT8ZLu.js +95 -0
  24. package/dist/InputManyList-DUOtepb8.js +110 -0
  25. package/dist/InputTextList-lPhVIV04.js +63 -0
  26. package/dist/PluginPendingView-DaDaN30Q.js +34 -0
  27. package/dist/ProfileView-Dw2T3X8m.js +295 -0
  28. package/dist/RconConsole-CvxNBv0B.js +74 -0
  29. package/dist/RconPlayers-odUKa0Ps.js +424 -0
  30. package/dist/ServerConsole-B9v2PcWb.js +99 -0
  31. package/dist/ServerControlButton-D_zJbxr6.js +186 -0
  32. package/dist/ServerIdView-_vGQRk7y.js +609 -0
  33. package/dist/ServerSelector-6fCqL3e9.js +52 -0
  34. package/dist/ServerSettings-C6-tkLTH.js +84 -0
  35. package/dist/ServerStatus-CcqB0h1r.js +63 -0
  36. package/dist/ServerTasks-BcaZzvz7.js +857 -0
  37. package/dist/ServersView-S_G_kuGj.js +313 -0
  38. package/dist/SettingsParameters-u3Awy4Vf.js +89 -0
  39. package/dist/SmartPortSelector-BRSQFVqT.js +174 -0
  40. package/dist/TokensView-C1RFJSB5.js +392 -0
  41. package/dist/UpdateNodeForm-BAhzQLt-.js +652 -0
  42. package/dist/UserServerPrivileges-Q2wQMyHi.js +319 -0
  43. package/dist/_createCompounder-CXjx5-CF.js +241 -0
  44. package/dist/camelCase-CSrB2MWj.js +8 -0
  45. package/dist/capitalize-BZSBvd6d.js +40 -0
  46. package/dist/clientCertificates-C0FlDwsb.js +53 -0
  47. package/dist/favicon-32x32.png +0 -0
  48. package/dist/favicon-96x96.png +0 -0
  49. package/dist/favicon.ico +0 -0
  50. package/dist/fonts/gicon.eot +0 -0
  51. package/dist/fonts/gicon.svg +33 -0
  52. package/dist/fonts/gicon.ttf +0 -0
  53. package/dist/fonts/gicon.woff +0 -0
  54. package/dist/fonts/gicon.woff2 +0 -0
  55. package/dist/frontend.css +6 -0
  56. package/dist/gameList-kucszmx0.js +115 -0
  57. package/dist/gameap.svg +3 -0
  58. package/dist/gameap_full.svg +9 -0
  59. package/dist/images/gap_logo_white.png +0 -0
  60. package/dist/images/gap_logo_white_mini.png +0 -0
  61. package/dist/images/gicon.svg +18 -0
  62. package/dist/images/icons/save-white.svg +1 -0
  63. package/dist/images/icons/save.svg +1 -0
  64. package/dist/index-9fvX7FD-.js +3840 -0
  65. package/dist/index.js +1 -0
  66. package/dist/isEmpty-D0Z8Rneq.js +263 -0
  67. package/dist/join-CmlzL0H9.js +7 -0
  68. package/dist/loader-qtG-Lf6M.js +131 -0
  69. package/dist/mockServiceWorker.js +349 -0
  70. package/dist/snakeCase-nnM4dAra.js +7 -0
  71. package/dist/validators-ChBGsKft.js +65 -0
  72. package/package.json +6 -4
@@ -0,0 +1,313 @@
1
+ import { ref as y, computed as d, onMounted as K, createElementBlock as I, openBlock as k, Fragment as L, createElementVNode as _, createVNode as n, withCtx as g, unref as c, toDisplayString as Q, h as r } from "vue";
2
+ import { k as W, j as X, e as Y, t as s, a as A, l as Z, _ as w, m as ee } from "./index-9fvX7FD-.js";
3
+ import { NCollapse as te, NCollapseItem as se, NSelect as re, NButton as le, NDataTable as ne, NEmpty as ae } from "naive-ui";
4
+ import { defineStore as oe, storeToRefs as ie } from "pinia";
5
+ import { _ as F } from "./GameIcon-DaYNlnur.js";
6
+ import { _ as b } from "./ServerControlButton-D_zJbxr6.js";
7
+ const ce = oe("serverFilters", {
8
+ state: () => ({
9
+ selectedGame: null,
10
+ selectedIP: null
11
+ }),
12
+ getters: {
13
+ hasFilters: (i) => i.selectedGame !== null || i.selectedIP !== null
14
+ },
15
+ actions: {
16
+ setGameFilter(i) {
17
+ this.selectedGame = i;
18
+ },
19
+ setIPFilter(i) {
20
+ this.selectedIP = i;
21
+ },
22
+ clearFilters() {
23
+ this.selectedGame = null, this.selectedIP = null;
24
+ }
25
+ }
26
+ }), ue = { class: "flex flex-wrap mb-4" }, de = { class: "flex flex-wrap" }, me = { class: "md:w-1/4 pr-4 pl-4" }, pe = { class: "md:w-1/4 pr-4 pl-4" }, ve = { class: "md:w-1/4 pr-4 pl-4" }, _e = { class: "hidden lg:inline" }, fe = 0, ge = 1, be = 2, he = {
27
+ __name: "ServerMainList",
28
+ setup(i) {
29
+ const o = W(), u = ce(), h = X(), { servers: m } = ie(h), P = y([
30
+ {
31
+ title: s("servers.name"),
32
+ key: "name",
33
+ render(e) {
34
+ return r("div", { class: "flex items-center" }, [
35
+ r(F, { game: e.game.code, class: "mr-2" }),
36
+ r("span", { class: "" }, e.name)
37
+ ]);
38
+ }
39
+ },
40
+ {
41
+ title: s("servers.ip_port"),
42
+ render(e) {
43
+ return e.server_ip + ":" + e.server_port;
44
+ }
45
+ },
46
+ {
47
+ title: s("servers.status"),
48
+ key: "status",
49
+ render(e) {
50
+ return e.blocked ? r("span", { class: "badge-stone" }, s("servers.blocked")) : e.enabled ? e.installed ? e.installed === be ? r("span", { class: "badge-orange" }, s("servers.installation")) : e.online ? r(
51
+ "span",
52
+ {
53
+ class: "badge-green"
54
+ },
55
+ s("servers.online")
56
+ ) : r(
57
+ "span",
58
+ {
59
+ class: "badge-red"
60
+ },
61
+ s("servers.offline")
62
+ ) : r("span", { class: "badge-stone" }, s("servers.not_installed")) : r("span", { class: "badge-stone" }, s("servers.disabled"));
63
+ }
64
+ },
65
+ {
66
+ title: s("servers.commands"),
67
+ render(e) {
68
+ if (!e.enabled || e.blocked)
69
+ return [];
70
+ if (e.installed === fe && j(e.id))
71
+ return r(
72
+ b,
73
+ {
74
+ command: "install",
75
+ "button-color": "orange",
76
+ "button-size": "small",
77
+ icon: "download",
78
+ text: s("servers.install"),
79
+ "server-id": e.id
80
+ }
81
+ );
82
+ let t = [];
83
+ return e.installed === ge && (e.online && U(e.id) && t.push(
84
+ r(
85
+ b,
86
+ {
87
+ command: "stop",
88
+ "button-color": "red",
89
+ "button-size": "small",
90
+ icon: "stop",
91
+ text: s("servers.stop"),
92
+ "server-id": e.id
93
+ }
94
+ ),
95
+ " "
96
+ ), !e.online && M(e.id) && t.push(
97
+ r(
98
+ b,
99
+ {
100
+ command: "start",
101
+ "button-color": "green",
102
+ "button-size": "small",
103
+ icon: "play",
104
+ text: s("servers.start"),
105
+ "server-id": e.id
106
+ }
107
+ ),
108
+ " "
109
+ ), V(e.id) && t.push(
110
+ r(
111
+ b,
112
+ {
113
+ command: "restart",
114
+ "button-color": "orange",
115
+ "button-size": "small",
116
+ icon: "restart",
117
+ text: s("servers.restart"),
118
+ "server-id": e.id
119
+ }
120
+ ),
121
+ " "
122
+ )), D(e.id) && t.push(
123
+ r(
124
+ w,
125
+ {
126
+ color: "black",
127
+ size: "small",
128
+ route: "/servers/" + e.id
129
+ },
130
+ { default: () => [
131
+ r("span", { class: "hidden lg:inline" }, s("servers.control")),
132
+ " ",
133
+ r(A, { name: "chevron-double-right" })
134
+ ] }
135
+ )
136
+ ), t;
137
+ }
138
+ }
139
+ ]), G = {
140
+ pageSize: 20
141
+ }, x = y(!0), C = y(null), p = d({
142
+ get: () => u.selectedGame,
143
+ set: (e) => u.setGameFilter(e)
144
+ }), v = d({
145
+ get: () => u.selectedIP,
146
+ set: (e) => u.setIPFilter(e)
147
+ });
148
+ K(() => {
149
+ h.fetchServersByNode().finally(() => {
150
+ x.value = !1;
151
+ }), o.isAdmin || o.fetchServersAbilities().catch((e) => {
152
+ Y(e);
153
+ });
154
+ });
155
+ const E = d(() => m.value.filter((e) => {
156
+ let t = !1;
157
+ return p.value !== null && p.value !== "" && p.value.length > 0 && (t = !p.value.includes(e.game.code)), !t && v.value !== null && v.value !== "" && v.value.length > 0 && (t = !v.value.includes(e.server_ip)), !t;
158
+ })), T = (e) => [
159
+ r(F, { game: e.value, class: "mr-2" }),
160
+ e.label
161
+ ], $ = d(() => {
162
+ const e = /* @__PURE__ */ new Map();
163
+ for (const l in m.value)
164
+ e.set(
165
+ m.value[l].game.code,
166
+ m.value[l].game.name
167
+ );
168
+ let t = [];
169
+ e.forEach((l, f) => {
170
+ t.push([f, l]);
171
+ }), t.sort((l, f) => l[1].localeCompare(f[1]));
172
+ let a = [];
173
+ return t.forEach((l) => {
174
+ a.push({
175
+ value: l[0],
176
+ label: l[1]
177
+ });
178
+ }), a;
179
+ }), z = d(() => {
180
+ var e = [];
181
+ for (const t of $.value)
182
+ e.push({ label: t.label, value: t.value });
183
+ return e;
184
+ }), O = d(() => {
185
+ const e = /* @__PURE__ */ new Set();
186
+ for (const a in m.value)
187
+ e.add(m.value[a].server_ip);
188
+ var t = [];
189
+ for (const a of Array.from(e).sort())
190
+ t.push({ label: a, value: a });
191
+ return t;
192
+ });
193
+ function N() {
194
+ }
195
+ function R() {
196
+ u.clearFilters();
197
+ }
198
+ function B() {
199
+ return u.hasFilters;
200
+ }
201
+ function D(e) {
202
+ return o.canServerAbility(e, "game-server-common");
203
+ }
204
+ function M(e) {
205
+ return o.canServerAbility(e, "game-server-start");
206
+ }
207
+ function U(e) {
208
+ return o.canServerAbility(e, "game-server-stop");
209
+ }
210
+ function V(e) {
211
+ return o.canServerAbility(e, "game-server-restart");
212
+ }
213
+ function j(e) {
214
+ return o.canServerAbility(e, "game-server-update");
215
+ }
216
+ return (e, t) => {
217
+ const a = re, l = le, f = se, q = te, H = ae, J = ne;
218
+ return k(), I(L, null, [
219
+ _("div", ue, [
220
+ n(q, null, {
221
+ default: g(() => [
222
+ n(f, {
223
+ title: c(s)("servers.filters"),
224
+ name: "filters"
225
+ }, {
226
+ default: g(() => [
227
+ _("div", de, [
228
+ _("div", me, [
229
+ n(a, {
230
+ value: p.value,
231
+ "onUpdate:value": [
232
+ t[0] || (t[0] = (S) => p.value = S),
233
+ N
234
+ ],
235
+ options: z.value,
236
+ "render-label": T,
237
+ multiple: "",
238
+ placeholder: c(s)("servers.select_game_filter_placeholder")
239
+ }, null, 8, ["value", "options", "placeholder"])
240
+ ]),
241
+ _("div", pe, [
242
+ n(a, {
243
+ value: v.value,
244
+ "onUpdate:value": [
245
+ t[1] || (t[1] = (S) => v.value = S),
246
+ N
247
+ ],
248
+ options: O.value,
249
+ multiple: "",
250
+ placeholder: c(s)("servers.select_ip_filter_placeholder")
251
+ }, null, 8, ["value", "options", "placeholder"])
252
+ ]),
253
+ _("div", ve, [
254
+ n(l, {
255
+ onClick: R,
256
+ type: "error",
257
+ disabled: !B(),
258
+ ghost: ""
259
+ }, {
260
+ default: g(() => [
261
+ n(c(A), { name: "eraser" }),
262
+ _("span", _e, " " + Q(c(s)("main.clear")), 1)
263
+ ]),
264
+ _: 1
265
+ }, 8, ["disabled"])
266
+ ])
267
+ ])
268
+ ]),
269
+ _: 1
270
+ }, 8, ["title"])
271
+ ]),
272
+ _: 1
273
+ })
274
+ ]),
275
+ n(J, {
276
+ ref_key: "tableRef",
277
+ ref: C,
278
+ bordered: !1,
279
+ "single-line": !0,
280
+ columns: P.value,
281
+ data: E.value,
282
+ loading: x.value,
283
+ pagination: G
284
+ }, {
285
+ loading: g(() => [
286
+ n(c(Z))
287
+ ]),
288
+ empty: g(() => [
289
+ n(H, {
290
+ description: c(s)("servers.empty_list")
291
+ }, null, 8, ["description"])
292
+ ]),
293
+ _: 1
294
+ }, 8, ["columns", "data", "loading"])
295
+ ], 64);
296
+ };
297
+ }
298
+ }, ke = {
299
+ __name: "ServersView",
300
+ setup(i) {
301
+ const o = d(() => [
302
+ { route: "/", text: "GameAP", icon: "gicon gicon-gameap" },
303
+ { route: { name: "servers" }, text: s("servers.game_servers") }
304
+ ]);
305
+ return (u, h) => (k(), I(L, null, [
306
+ n(c(ee), { items: o.value }, null, 8, ["items"]),
307
+ n(he)
308
+ ], 64));
309
+ }
310
+ };
311
+ export {
312
+ ke as default
313
+ };
@@ -0,0 +1,89 @@
1
+ import { resolveComponent as _, createElementBlock as d, openBlock as m, createElementVNode as e, Fragment as f, renderList as g, withDirectives as u, toDisplayString as s, vModelText as p, withModifiers as b, createVNode as h, createTextVNode as v } from "vue";
2
+ import { c as w, a as x } from "./index-9fvX7FD-.js";
3
+ const k = {
4
+ name: "SettingsParameters",
5
+ components: { GIcon: x },
6
+ props: {
7
+ initialItems: Array,
8
+ inputName: String
9
+ },
10
+ data: function() {
11
+ return {
12
+ items: this.initialItems || []
13
+ };
14
+ },
15
+ methods: {
16
+ addItem: function() {
17
+ this.items.push({
18
+ name: "",
19
+ value: ""
20
+ });
21
+ },
22
+ removeItem: function(t) {
23
+ this.items.splice(t, 1);
24
+ }
25
+ }
26
+ }, N = { class: "flex flex-col min-w-0 rounded break-words border bg-white border-1 border-stone-300 mb-2" }, y = { class: "flex-auto p-6" }, V = { class: "mb-3" }, C = ["for"], I = ["name", "id", "onUpdate:modelValue"], S = { class: "mb-3" }, U = ["for"], E = ["name", "id", "onUpdate:modelValue", "rows"], G = ["onClick"], B = { class: "mt-2 text-center" };
27
+ function D(t, l, a, M, P, i) {
28
+ const c = _("GIcon");
29
+ return m(), d("div", null, [
30
+ e("div", N, [
31
+ e("div", y, [
32
+ (m(!0), d(f, null, g(t.items, (n, o) => (m(), d("div", null, [
33
+ e("div", V, [
34
+ e("label", {
35
+ for: a.inputName + "[" + o + "][name]",
36
+ class: "control-label"
37
+ }, s(t.trans("labels.name")), 9, C),
38
+ u(e("input", {
39
+ name: a.inputName + "[" + o + "][name]",
40
+ id: a.inputName + "[" + o + "][name]",
41
+ "onUpdate:modelValue": (r) => n.name = r,
42
+ type: "text",
43
+ class: "block appearance-none w-full py-1 px-2 mb-1 leading-normal bg-white text-stone-800 border border-stone-200 rounded"
44
+ }, null, 8, I), [
45
+ [p, n.name]
46
+ ])
47
+ ]),
48
+ e("div", S, [
49
+ e("label", {
50
+ for: a.inputName + "[" + o + "][value]",
51
+ class: "control-label"
52
+ }, s(t.trans("labels.the_value")), 9, U),
53
+ u(e("textarea", {
54
+ name: a.inputName + "[" + o + "][value]",
55
+ id: a.inputName + "[" + o + "][value]",
56
+ "onUpdate:modelValue": (r) => n.value = r,
57
+ class: "block appearance-none w-full py-1 px-2 mb-1 leading-normal bg-white text-stone-800 border border-stone-200 rounded",
58
+ rows: (n.value.match(new RegExp(`
59
+ `, "g")) || []).length + 2
60
+ }, " ", 8, E), [
61
+ [p, n.value]
62
+ ])
63
+ ]),
64
+ e("button", {
65
+ class: "inline-block align-middle text-center select-none border font-normal whitespace-no-wrap rounded no-underline py-1.5 px-2 leading-tight text-xs bg-red-600 text-white hover:bg-red-700",
66
+ onClick: b((r) => i.removeItem(o), ["prevent"])
67
+ }, [
68
+ h(c, { name: "close" }),
69
+ v(" " + s(t.trans("main.delete")), 1)
70
+ ], 8, G),
71
+ l[1] || (l[1] = e("hr", null, null, -1))
72
+ ]))), 256)),
73
+ e("div", B, [
74
+ e("button", {
75
+ class: "inline-block align-middle text-center select-none border font-normal whitespace-no-wrap rounded no-underline py-1.5 px-2 leading-tight text-xs bg-lime-500 text-white hover:bg-lime-600",
76
+ onClick: l[0] || (l[0] = b((...n) => i.addItem && i.addItem(...n), ["prevent"]))
77
+ }, [
78
+ h(c, { name: "add" }),
79
+ v(" " + s(t.trans("main.add")), 1)
80
+ ])
81
+ ])
82
+ ])
83
+ ])
84
+ ]);
85
+ }
86
+ const F = /* @__PURE__ */ w(k, [["render", D]]);
87
+ export {
88
+ F as default
89
+ };
@@ -0,0 +1,174 @@
1
+ import { mergeModels as C, useModel as q, ref as T, onMounted as U, watch as s, createElementBlock as D, openBlock as M, createVNode as v, unref as o, withCtx as f, createCommentVNode as j, createElementVNode as G, toDisplayString as Q } from "vue";
2
+ import { storeToRefs as h } from "pinia";
3
+ import { i as A, h as L, u as W, t as P } from "./index-9fvX7FD-.js";
4
+ import { NFormItem as k, NInputNumber as g } from "naive-ui";
5
+ const z = {
6
+ key: 0,
7
+ class: "help-block"
8
+ }, Y = {
9
+ __name: "SmartPortSelector",
10
+ props: /* @__PURE__ */ C({
11
+ initialServerIp: String,
12
+ initialServerPort: Number,
13
+ initialQueryPort: Number,
14
+ initialRconPort: Number,
15
+ game: String,
16
+ serverPortPath: { type: String, default: "serverPort" },
17
+ rconPortPath: { type: String, default: "rconPort" },
18
+ queryPortPath: { type: String, default: "queryPort" }
19
+ }, {
20
+ serverPort: {},
21
+ serverPortModifiers: {},
22
+ queryPort: {},
23
+ queryPortModifiers: {},
24
+ rconPort: {},
25
+ rconPortModifiers: {}
26
+ }),
27
+ emits: /* @__PURE__ */ C(["update:serverPort", "update:rconPort", "update:queryPort"], ["update:serverPort", "update:queryPort", "update:rconPort"]),
28
+ setup(l, { emit: B }) {
29
+ const y = {
30
+ ark: 7777,
31
+ arma2: 2302,
32
+ arma2ao: 2302,
33
+ arma3: 2302,
34
+ cod4: 28960,
35
+ fivem: 30120,
36
+ hurtworld: 12871,
37
+ justcause: 7777,
38
+ minecraft: 25565,
39
+ mta: 22003,
40
+ rok: 7350,
41
+ rust: 28015,
42
+ samp: 7777,
43
+ teamspeak3: 9987,
44
+ quake: 26e3,
45
+ q1: 26e3,
46
+ quake2: 27910,
47
+ q2: 27910,
48
+ quake3: 27960,
49
+ q3: 27960,
50
+ quake4: 28004,
51
+ q4: 28004,
52
+ default: 27015
53
+ }, I = {
54
+ arma2: [0, 0],
55
+ arma2ao: [0, 0],
56
+ arma3: [0, 0],
57
+ cod4: [0, 0],
58
+ mta: [0, 2],
59
+ samp: [0, 0],
60
+ hurtworld: [10, 0],
61
+ justcause: [0, 0],
62
+ fivem: [0, 0],
63
+ ark: [0, 0],
64
+ rust: [0, 1],
65
+ minecraft: [0, 1],
66
+ rok: [0, 0],
67
+ teamspeak3: [24, 35],
68
+ default: [0, 0]
69
+ }, a = l, S = B, b = A(), O = L(), R = W(), { nodeId: _, busyPorts: N } = h(b), { gameCode: c } = h(O), { formIp: d } = h(R), t = q(l, "serverPort"), n = q(l, "queryPort"), i = q(l, "rconPort"), m = T("");
70
+ function w() {
71
+ const e = F();
72
+ if (a.initialServerIp === d.value) {
73
+ t.value = parseInt(a.initialServerPort) || 27015;
74
+ const u = x();
75
+ n.value = parseInt(a.initialQueryPort) || t.value + u[0], i.value = parseInt(a.initialRconPort) || t.value + u[1];
76
+ return;
77
+ }
78
+ let r = -1;
79
+ do
80
+ r++, t.value = y[e] + r;
81
+ while (V(d.value, y[e] + r));
82
+ }
83
+ function E() {
84
+ const e = x();
85
+ n.value = t.value + e[0], i.value = t.value + e[1];
86
+ }
87
+ function F() {
88
+ return y.hasOwnProperty(c.value) ? c.value : "default";
89
+ }
90
+ function x() {
91
+ return I[c.value] || I.default;
92
+ }
93
+ function V(e, r) {
94
+ return typeof a.initialServerIp < "u" && typeof a.initialServerPort < "u" && e === a.initialServerIp && r === a.initialServerPort ? !1 : N.value.hasOwnProperty(e) && N.value[e].indexOf(r) !== -1;
95
+ }
96
+ function p() {
97
+ d.value === a.initialServerIp && t.value === a.initialServerPort && (m.value = ""), V(d.value, t.value) ? m.value = P("validation.unique", { attribute: P("labels.server_port") }) : m.value = "";
98
+ }
99
+ return U(() => {
100
+ b.fetchBusyPorts(p);
101
+ }), s(_, () => {
102
+ b.fetchBusyPorts(p);
103
+ }), s(t, (e, r) => {
104
+ t.value = Number(t.value), E(), p(), S("update:serverPort", t.value);
105
+ }), s(i, (e) => {
106
+ S("update:rconPort", i.value);
107
+ }), s(n, (e) => {
108
+ S("update:queryPort", n.value);
109
+ }), s(d, (e, r) => {
110
+ e && w(), p();
111
+ }), s(c, () => {
112
+ w();
113
+ }), (e, r) => (M(), D("div", null, [
114
+ v(o(k), {
115
+ label: o(P)("labels.server_port"),
116
+ path: l.serverPortPath
117
+ }, {
118
+ feedback: f(() => [
119
+ m.value ? (M(), D("span", z, [
120
+ G("strong", null, Q(m.value), 1)
121
+ ])) : j("", !0)
122
+ ]),
123
+ default: f(() => [
124
+ v(o(g), {
125
+ name: "server_port",
126
+ id: "server_port",
127
+ min: 1024,
128
+ max: 65535,
129
+ value: t.value,
130
+ "onUpdate:value": r[0] || (r[0] = (u) => t.value = u)
131
+ }, null, 8, ["value"])
132
+ ]),
133
+ _: 1
134
+ }, 8, ["label", "path"]),
135
+ v(o(k), {
136
+ label: o(P)("labels.query_port"),
137
+ path: l.queryPortPath
138
+ }, {
139
+ default: f(() => [
140
+ v(o(g), {
141
+ name: "query_port",
142
+ type: "number",
143
+ id: "server_port",
144
+ min: 1024,
145
+ max: 65535,
146
+ value: n.value,
147
+ "onUpdate:value": r[1] || (r[1] = (u) => n.value = u)
148
+ }, null, 8, ["value"])
149
+ ]),
150
+ _: 1
151
+ }, 8, ["label", "path"]),
152
+ v(o(k), {
153
+ label: o(P)("labels.rcon_port"),
154
+ path: l.rconPortPath
155
+ }, {
156
+ default: f(() => [
157
+ v(o(g), {
158
+ name: "rcon_port",
159
+ type: "number",
160
+ id: "server_port",
161
+ min: 1024,
162
+ max: 65535,
163
+ value: i.value,
164
+ "onUpdate:value": r[2] || (r[2] = (u) => i.value = u)
165
+ }, null, 8, ["value"])
166
+ ]),
167
+ _: 1
168
+ }, 8, ["label", "path"])
169
+ ]));
170
+ }
171
+ };
172
+ export {
173
+ Y as default
174
+ };