@nice2dev/ui-enterprise 1.2.1 → 1.3.0

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.
package/dist/index.mjs CHANGED
@@ -1,89 +1,83 @@
1
- import { jsxs as c, jsx as e, Fragment as ae } from "react/jsx-runtime";
2
- import { NtdClipboard as Ge, NtdFile as Ke, NtdBrackets as Re, NtdBarChart as We, NtdFileText as xe, NtdList as Xe, NtdGrid as Ze, NtdSearch as ge, NtdDownload as ve, NtdChevronDown as Se, NtdChevronRight as Fe, NtdCircle as De, NtdSettings as $e, NtdKey as fe, NtdLogOut as Me, NtdLogIn as Qe, NtdError as he, NtdCheck as se, NtdUpload as ec, NtdEye as cc, NtdClose as be, NtdEdit as je, NtdPlus as Te, NtdArrowRight as ac, NtdBook as tc, NtdClock as Le, NtdArrowUp as ic, NtdArrowDown as sc, NtdLock as Ue, NtdOctagon as nc, NtdDollar as lc, NtdWarning as Ye, NtdCookieConsent as rc, NtdArrowLeft as oc, NtdTrash as dc, NtdZap as qe, NtdHelp as Ve, NtdFolder as hc, NtdUser as Be, NtdRefresh as ye, NtdMinus as pc, NtdTable as uc, NtdCalendar as mc, NtdMap as Ee, NtdShield as He, NtdSlash as gc, NtdFlag as vc, NtdUnlock as bc, NtdSmartphone as we, NtdMonitor as Nc } from "@nice2dev/icons";
3
- import { useNiceTranslation as W, NiceAppShell as fc, NiceTutorialButton as yc, resolveTutorial as wc, NiceIcon as _e } from "@nice2dev/ui";
4
- import kc, { forwardRef as le, useState as k, useCallback as R, useImperativeHandle as re, useEffect as me, useRef as ke, useId as Cc, useMemo as ue } from "react";
5
- function xc(a, n, s) {
6
- const i = s.csvDelimiter || ",", t = [];
7
- return s.includeHeaders !== !1 && t.push(
1
+ import { jsxs as c, jsx as e, Fragment as ie } from "react/jsx-runtime";
2
+ import { NtdClipboard as tc, NtdFile as ac, NtdBrackets as Ye, NtdBarChart as ic, NtdFileText as Ee, NtdList as sc, NtdGrid as nc, NtdSearch as fe, NtdDownload as ye, NtdChevronDown as Le, NtdChevronRight as qe, NtdCircle as ze, NtdSettings as Ve, NtdKey as xe, NtdLogOut as Be, NtdLogIn as lc, NtdError as ge, NtdCheck as re, NtdUpload as rc, NtdEye as oc, NtdClose as we, NtdEdit as He, NtdPlus as Ae, NtdArrowRight as dc, NtdBook as hc, NtdClock as _e, NtdArrowUp as pc, NtdArrowDown as uc, NtdLock as Je, NtdOctagon as mc, NtdDollar as gc, NtdWarning as Ke, NtdCookieConsent as bc, NtdArrowLeft as vc, NtdTrash as Nc, NtdLightning as Ge, NtdHelp as We, NtdFolder as fc, NtdUser as Xe, NtdRefresh as Se, NtdMinus as yc, NtdTable as wc, NtdCalendar as kc, NtdMap as $e, NtdShield as Ze, NtdSlash as Cc, NtdFlag as xc, NtdUnlock as Sc, NtdSmartphone as De, NtdMonitor as Dc } from "@nice2dev/icons";
3
+ import { useNiceTranslation as Q, clickOnActivationKey as Ie, NiceAppShell as Tc, NiceTutorialButton as Ec, resolveTutorial as Lc, useOverlayFocus as Qe, useIntent as zc, NiceKeyCap as ke } from "@nice2dev/ui";
4
+ import Ac, { forwardRef as he, useState as C, useCallback as P, useImperativeHandle as pe, useEffect as Ne, useRef as oe, useId as ec, useMemo as ve } from "react";
5
+ function _c(t, n, s) {
6
+ const i = s.csvDelimiter || ",", a = [];
7
+ return s.includeHeaders !== !1 && a.push(
8
8
  n.filter((l) => l.include).map((l) => `"${l.label}"`).join(i)
9
- ), a.forEach((l) => {
9
+ ), t.forEach((l) => {
10
10
  const h = n.filter((r) => r.include).map((r) => {
11
11
  let o = l[r.field];
12
12
  return r.transform && (o = r.transform(o)), o == null ? "" : typeof o == "string" ? `"${o.replace(/"/g, '""')}"` : String(o);
13
13
  });
14
- t.push(h.join(i));
15
- }), t.join(`
14
+ a.push(h.join(i));
15
+ }), a.join(`
16
16
  `);
17
17
  }
18
- function Sc(a, n, s) {
19
- const i = n.filter((l) => l.include), t = a.map((l) => {
18
+ function Ic(t, n, s) {
19
+ const i = n.filter((l) => l.include), a = t.map((l) => {
20
20
  const h = {};
21
21
  return i.forEach((r) => {
22
22
  let o = l[r.field];
23
23
  r.transform && (o = r.transform(o)), h[r.field] = o;
24
24
  }), h;
25
25
  });
26
- return JSON.stringify(t, null, 2);
26
+ return JSON.stringify(a, null, 2);
27
27
  }
28
- const Ce = {
29
- csv: { label: "CSV", icon: /* @__PURE__ */ e(xe, { size: 20 }), description: "Comma-separated values" },
30
- xlsx: { label: "Excel", icon: /* @__PURE__ */ e(We, { size: 20 }), description: "Microsoft Excel" },
28
+ const Te = {
29
+ csv: { label: "CSV", icon: /* @__PURE__ */ e(Ee, { size: 20 }), description: "Comma-separated values" },
30
+ xlsx: { label: "Excel", icon: /* @__PURE__ */ e(ic, { size: 20 }), description: "Microsoft Excel" },
31
31
  json: {
32
32
  label: "JSON",
33
- icon: /* @__PURE__ */ e(Re, { size: 20 }),
33
+ icon: /* @__PURE__ */ e(Ye, { size: 20 }),
34
34
  description: "JavaScript Object Notation"
35
35
  },
36
- pdf: { label: "PDF", icon: /* @__PURE__ */ e(Ke, { size: 20 }), description: "Portable Document Format" },
36
+ pdf: { label: "PDF", icon: /* @__PURE__ */ e(ac, { size: 20 }), description: "Portable Document Format" },
37
37
  xml: {
38
38
  label: "XML",
39
- icon: /* @__PURE__ */ e(Ge, { size: 20 }),
39
+ icon: /* @__PURE__ */ e(tc, { size: 20 }),
40
40
  description: "Extensible Markup Language"
41
41
  }
42
- }, Dc = ({ formats: a, selected: n, onChange: s }) => /* @__PURE__ */ e("div", { className: "nice-export-formats", children: a.map((i) => {
43
- const t = Ce[i];
42
+ }, Pc = ({ formats: t, selected: n, onChange: s }) => /* @__PURE__ */ e("div", { className: "nice-export-formats", children: t.map((i) => {
43
+ const a = Te[i];
44
44
  return /* @__PURE__ */ c(
45
45
  "button",
46
46
  {
47
47
  type: "button",
48
48
  className: `nice-export-format ${n === i ? "nice-export-format--selected" : ""}`,
49
49
  onClick: () => s(i),
50
- title: t.description,
50
+ title: a.description,
51
51
  children: [
52
- /* @__PURE__ */ e("span", { className: "nice-export-format-icon", children: t.icon }),
53
- /* @__PURE__ */ e("span", { className: "nice-export-format-label", children: t.label })
52
+ /* @__PURE__ */ e("span", { className: "nice-export-format-icon", children: a.icon }),
53
+ /* @__PURE__ */ e("span", { className: "nice-export-format-label", children: a.label })
54
54
  ]
55
55
  },
56
56
  i
57
57
  );
58
- }) }), Tc = ({ fields: a, onChange: n }) => {
59
- const { t: s } = W(), i = (h) => {
60
- const r = [...a];
58
+ }) }), Oc = ({ fields: t, onChange: n }) => {
59
+ const { t: s } = Q(), i = (h) => {
60
+ const r = [...t];
61
61
  r[h] = { ...r[h], include: !r[h].include }, n(r);
62
- }, t = (h) => {
63
- n(a.map((r) => ({ ...r, include: h })));
64
- }, l = a.filter((h) => h.include).length;
62
+ }, a = (h) => {
63
+ n(t.map((r) => ({ ...r, include: h })));
64
+ }, l = t.filter((h) => h.include).length;
65
65
  return /* @__PURE__ */ c("div", { className: "nice-export-fields", children: [
66
66
  /* @__PURE__ */ c("div", { className: "nice-export-fields-header", children: [
67
- /* @__PURE__ */ c("span", { children: [
68
- "Fields to export (",
69
- l,
70
- "/",
71
- a.length,
72
- ")"
73
- ] }),
67
+ /* @__PURE__ */ e("span", { children: s("dataExportCenter.fieldsToExport", "Fields to export ({selectedCount}/{fields})").replace("{selectedCount}", String(l)).replace("{fields}", String(t.length)) }),
74
68
  /* @__PURE__ */ c("div", { className: "nice-export-fields-actions", children: [
75
- /* @__PURE__ */ e("button", { type: "button", onClick: () => t(!0), children: s("dataExportCenter.selectAll", "Select all") }),
76
- /* @__PURE__ */ e("button", { type: "button", onClick: () => t(!1), children: s("dataExportCenter.deselectAll", "Deselect all") })
69
+ /* @__PURE__ */ e("button", { type: "button", onClick: () => a(!0), children: s("dataExportCenter.selectAll", "Select all") }),
70
+ /* @__PURE__ */ e("button", { type: "button", onClick: () => a(!1), children: s("dataExportCenter.deselectAll", "Deselect all") })
77
71
  ] })
78
72
  ] }),
79
- /* @__PURE__ */ e("div", { className: "nice-export-fields-list", children: a.map((h, r) => /* @__PURE__ */ c("label", { className: "nice-export-field", children: [
73
+ /* @__PURE__ */ e("div", { className: "nice-export-fields-list", children: t.map((h, r) => /* @__PURE__ */ c("label", { className: "nice-export-field", children: [
80
74
  /* @__PURE__ */ e("input", { type: "checkbox", checked: h.include, onChange: () => i(r) }),
81
75
  /* @__PURE__ */ e("span", { className: "nice-export-field-label", children: h.label }),
82
76
  /* @__PURE__ */ e("span", { className: "nice-export-field-name", children: h.field })
83
77
  ] }, h.field)) })
84
78
  ] });
85
- }, Lc = ({ format: a, options: n, onChange: s }) => {
86
- const { t: i } = W(), t = (l, h) => {
79
+ }, Fc = ({ format: t, options: n, onChange: s }) => {
80
+ const { t: i } = Q(), a = (l, h) => {
87
81
  s({ ...n, [l]: h });
88
82
  };
89
83
  return /* @__PURE__ */ c("div", { className: "nice-export-options", children: [
@@ -94,50 +88,50 @@ const Ce = {
94
88
  {
95
89
  type: "checkbox",
96
90
  checked: n.includeHeaders !== !1,
97
- onChange: (l) => t("includeHeaders", l.target.checked)
91
+ onChange: (l) => a("includeHeaders", l.target.checked)
98
92
  }
99
93
  ),
100
94
  i("dataExportCenter.includeHeaders", "Include headers")
101
95
  ] }),
102
- a === "csv" && /* @__PURE__ */ c("label", { className: "nice-export-option", children: [
103
- /* @__PURE__ */ e("span", { children: "Delimiter:" }),
96
+ t === "csv" && /* @__PURE__ */ c("label", { className: "nice-export-option", children: [
97
+ /* @__PURE__ */ e("span", { children: i("dataExportCenter.delimiter", "Delimiter:") }),
104
98
  /* @__PURE__ */ c(
105
99
  "select",
106
100
  {
107
101
  value: n.csvDelimiter || ",",
108
- onChange: (l) => t("csvDelimiter", l.target.value),
102
+ onChange: (l) => a("csvDelimiter", l.target.value),
109
103
  children: [
110
- /* @__PURE__ */ e("option", { value: ",", children: "Comma (,)" }),
111
- /* @__PURE__ */ e("option", { value: ";", children: "Semicolon (;)" }),
112
- /* @__PURE__ */ e("option", { value: "\\t", children: "Tab" }),
113
- /* @__PURE__ */ e("option", { value: "|", children: "Pipe (|)" })
104
+ /* @__PURE__ */ e("option", { value: ",", children: i("dataExportCenter.comma", "Comma (,)") }),
105
+ /* @__PURE__ */ e("option", { value: ";", children: i("dataExportCenter.semicolon", "Semicolon (;)") }),
106
+ /* @__PURE__ */ e("option", { value: "\\t", children: i("dataExportCenter.tab", "Tab") }),
107
+ /* @__PURE__ */ e("option", { value: "|", children: i("dataExportCenter.pipe", "Pipe (|)") })
114
108
  ]
115
109
  }
116
110
  )
117
111
  ] }),
118
112
  /* @__PURE__ */ c("label", { className: "nice-export-option", children: [
119
- /* @__PURE__ */ e("span", { children: "Date format:" }),
113
+ /* @__PURE__ */ e("span", { children: i("dataExportCenter.dateFormat", "Date format:") }),
120
114
  /* @__PURE__ */ c(
121
115
  "select",
122
116
  {
123
117
  value: n.dateFormat || "YYYY-MM-DD",
124
- onChange: (l) => t("dateFormat", l.target.value),
118
+ onChange: (l) => a("dateFormat", l.target.value),
125
119
  children: [
126
120
  /* @__PURE__ */ e("option", { value: "YYYY-MM-DD", children: i("dataExportCenter.yyyyMmDd", "YYYY-MM-DD") }),
127
- /* @__PURE__ */ e("option", { value: "DD/MM/YYYY", children: "DD/MM/YYYY" }),
128
- /* @__PURE__ */ e("option", { value: "MM/DD/YYYY", children: "MM/DD/YYYY" }),
121
+ /* @__PURE__ */ e("option", { value: "DD/MM/YYYY", children: i("dataExportCenter.ddMmYyyy", "DD/MM/YYYY") }),
122
+ /* @__PURE__ */ e("option", { value: "MM/DD/YYYY", children: i("dataExportCenter.mmDdYyyy", "MM/DD/YYYY") }),
129
123
  /* @__PURE__ */ e("option", { value: "ISO", children: i("dataExportCenter.iso8601", "ISO 8601") })
130
124
  ]
131
125
  }
132
126
  )
133
127
  ] }),
134
128
  /* @__PURE__ */ c("label", { className: "nice-export-option", children: [
135
- /* @__PURE__ */ e("span", { children: "Encoding:" }),
129
+ /* @__PURE__ */ e("span", { children: i("dataExportCenter.encoding", "Encoding:") }),
136
130
  /* @__PURE__ */ c(
137
131
  "select",
138
132
  {
139
133
  value: n.encoding || "utf-8",
140
- onChange: (l) => t("encoding", l.target.value),
134
+ onChange: (l) => a("encoding", l.target.value),
141
135
  children: [
142
136
  /* @__PURE__ */ e("option", { value: "utf-8", children: i("dataExportCenter.utf8", "UTF-8") }),
143
137
  /* @__PURE__ */ e("option", { value: "utf-16", children: i("dataExportCenter.utf16", "UTF-16") }),
@@ -146,14 +140,14 @@ const Ce = {
146
140
  }
147
141
  )
148
142
  ] }),
149
- (a === "xlsx" || a === "pdf") && /* @__PURE__ */ c("label", { className: "nice-export-option", children: [
150
- /* @__PURE__ */ e("span", { children: "Password protect:" }),
143
+ (t === "xlsx" || t === "pdf") && /* @__PURE__ */ c("label", { className: "nice-export-option", children: [
144
+ /* @__PURE__ */ e("span", { children: i("dataExportCenter.passwordProtect", "Password protect:") }),
151
145
  /* @__PURE__ */ e(
152
146
  "input",
153
147
  {
154
148
  type: "password",
155
149
  value: n.password || "",
156
- onChange: (l) => t("password", l.target.value || void 0),
150
+ onChange: (l) => a("password", l.target.value || void 0),
157
151
  placeholder: i(
158
152
  "dataExportCenter.leaveEmptyForNoPassword",
159
153
  "Leave empty for no password"
@@ -162,149 +156,149 @@ const Ce = {
162
156
  )
163
157
  ] })
164
158
  ] });
165
- }, zc = ({ jobs: a, onDownload: n }) => {
166
- const { t: s } = W();
167
- if (a.length === 0)
159
+ }, $c = ({ jobs: t, onDownload: n }) => {
160
+ const { t: s } = Q();
161
+ if (t.length === 0)
168
162
  return /* @__PURE__ */ e("div", { className: "nice-export-history-empty", children: s("dataExportCenter.noExportHistory", "No export history") });
169
- const i = (t) => t ? t < 1024 ? `${t} B` : t < 1024 * 1024 ? `${(t / 1024).toFixed(1)} KB` : `${(t / 1024 / 1024).toFixed(1)} MB` : "-";
163
+ const i = (a) => a ? a < 1024 ? `${a} B` : a < 1024 * 1024 ? `${(a / 1024).toFixed(1)} KB` : `${(a / 1024 / 1024).toFixed(1)} MB` : "-";
170
164
  return /* @__PURE__ */ c("div", { className: "nice-export-history", children: [
171
165
  /* @__PURE__ */ e("h4", { children: s("dataExportCenter.exportHistory", "Export History") }),
172
- /* @__PURE__ */ e("div", { className: "nice-export-history-list", children: a.map((t) => /* @__PURE__ */ c("div", { className: `nice-export-job nice-export-job--${t.status}`, children: [
166
+ /* @__PURE__ */ e("div", { className: "nice-export-history-list", children: t.map((a) => /* @__PURE__ */ c("div", { className: `nice-export-job nice-export-job--${a.status}`, children: [
173
167
  /* @__PURE__ */ c("div", { className: "nice-export-job-info", children: [
174
- /* @__PURE__ */ e("span", { className: "nice-export-job-name", children: t.name }),
175
- /* @__PURE__ */ e("span", { className: "nice-export-job-format", children: t.format.toUpperCase() }),
176
- /* @__PURE__ */ e("span", { className: "nice-export-job-date", children: new Date(t.createdAt).toLocaleString() })
168
+ /* @__PURE__ */ e("span", { className: "nice-export-job-name", children: a.name }),
169
+ /* @__PURE__ */ e("span", { className: "nice-export-job-format", children: a.format.toUpperCase() }),
170
+ /* @__PURE__ */ e("span", { className: "nice-export-job-date", children: new Date(a.createdAt).toLocaleString() })
177
171
  ] }),
178
172
  /* @__PURE__ */ c("div", { className: "nice-export-job-meta", children: [
179
- t.rowCount && /* @__PURE__ */ c("span", { children: [
180
- t.rowCount,
181
- " rows"
182
- ] }),
183
- t.fileSize && /* @__PURE__ */ e("span", { children: i(t.fileSize) })
173
+ a.rowCount && /* @__PURE__ */ e("span", { children: s("dataExportCenter.rows", "{rowCount} rows").replace(
174
+ "{rowCount}",
175
+ String(a.rowCount)
176
+ ) }),
177
+ a.fileSize && /* @__PURE__ */ e("span", { children: i(a.fileSize) })
184
178
  ] }),
185
179
  /* @__PURE__ */ c("div", { className: "nice-export-job-status", children: [
186
- t.status === "processing" && /* @__PURE__ */ e("div", { className: "nice-export-job-progress", children: /* @__PURE__ */ e(
180
+ a.status === "processing" && /* @__PURE__ */ e("div", { className: "nice-export-job-progress", children: /* @__PURE__ */ e(
187
181
  "div",
188
182
  {
189
183
  className: "nice-export-job-progress-bar",
190
- style: { width: `${t.progress}%` }
184
+ style: { width: `${a.progress}%` }
191
185
  }
192
186
  ) }),
193
- t.status === "completed" && t.downloadUrl && /* @__PURE__ */ e(
187
+ a.status === "completed" && a.downloadUrl && /* @__PURE__ */ e(
194
188
  "button",
195
189
  {
196
190
  type: "button",
197
191
  className: "nice-export-job-download",
198
- onClick: () => n == null ? void 0 : n(t),
192
+ onClick: () => n == null ? void 0 : n(a),
199
193
  children: s("dataExportCenter.download", "Download")
200
194
  }
201
195
  ),
202
- t.status === "failed" && /* @__PURE__ */ e("span", { className: "nice-export-job-error", title: t.error, children: s("dataExportCenter.failed", "Failed") })
196
+ a.status === "failed" && /* @__PURE__ */ e("span", { className: "nice-export-job-error", title: a.error, children: s("dataExportCenter.failed", "Failed") })
203
197
  ] })
204
- ] }, t.id)) })
198
+ ] }, a.id)) })
205
199
  ] });
206
- }, ta = /* @__PURE__ */ Object.assign(
207
- /* @__PURE__ */ le(
200
+ }, ht = /* @__PURE__ */ Object.assign(
201
+ /* @__PURE__ */ he(
208
202
  ({
209
- dataSource: a,
203
+ dataSource: t,
210
204
  formats: n = ["csv", "xlsx", "json", "pdf"],
211
205
  templates: s = [],
212
206
  enableScheduling: i = !1,
213
- exportHistory: t = [],
207
+ exportHistory: a = [],
214
208
  onExportStart: l,
215
209
  onExportComplete: h,
216
210
  onExportError: r,
217
211
  onSaveTemplate: o,
218
- onDeleteTemplate: w,
219
- onSchedule: _,
220
- customExportHandler: I,
221
- title: C,
212
+ onDeleteTemplate: f,
213
+ onSchedule: D,
214
+ customExportHandler: O,
215
+ title: w,
222
216
  description: z,
223
- className: F = "",
224
- style: U
225
- }, L) => {
226
- const { t: Y } = W(), ce = C ?? Y("dataExportCenter.title", "Data Export"), [$, q] = k(n[0]), [E, m] = k(a.getFields()), [N, g] = k({
217
+ className: M = "",
218
+ style: K
219
+ }, E) => {
220
+ const { t: _ } = Q(), te = w ?? _("dataExportCenter.title", "Data Export"), [j, G] = C(n[0]), [I, m] = C(t.getFields()), [b, g] = C({
227
221
  includeHeaders: !0,
228
222
  dateFormat: "YYYY-MM-DD",
229
223
  encoding: "utf-8"
230
- }), [V, u] = k(!1), [B, O] = k(0), [P, x] = k("export"), H = R(async () => {
231
- const b = {
224
+ }), [W, u] = C(!1), [B, F] = C(0), [$, T] = C("export"), X = P(async () => {
225
+ const N = {
232
226
  id: Date.now().toString(),
233
227
  name: `Export ${(/* @__PURE__ */ new Date()).toISOString()}`,
234
- format: $,
228
+ format: j,
235
229
  status: "processing",
236
230
  progress: 0,
237
231
  createdAt: /* @__PURE__ */ new Date()
238
232
  };
239
- u(!0), O(0), l == null || l(b);
233
+ u(!0), F(0), l == null || l(N);
240
234
  try {
241
- const S = await a.fetchData({
242
- fields: E,
235
+ const k = await t.fetchData({
236
+ fields: I,
243
237
  filters: void 0,
244
238
  sorting: void 0
245
239
  });
246
- O(50);
240
+ F(50);
247
241
  let A;
248
- if (I)
249
- A = await I($, S, N);
242
+ if (O)
243
+ A = await O(j, k, b);
250
244
  else
251
- switch ($) {
245
+ switch (j) {
252
246
  case "csv":
253
- A = xc(S, E, N);
247
+ A = _c(k, I, b);
254
248
  break;
255
249
  case "json":
256
- A = Sc(S, E, N);
250
+ A = Ic(k, I, b);
257
251
  break;
258
252
  default:
259
- throw new Error(`Format ${$} requires a custom export handler`);
253
+ throw new Error(`Format ${j} requires a custom export handler`);
260
254
  }
261
- O(100);
262
- const J = typeof A == "string" ? new Blob([A], { type: "text/plain" }) : A, f = URL.createObjectURL(J), T = document.createElement("a");
263
- T.href = f, T.download = `export-${Date.now()}.${$}`, document.body.appendChild(T), T.click(), document.body.removeChild(T), URL.revokeObjectURL(f);
264
- const X = {
265
- ...b,
255
+ F(100);
256
+ const Z = typeof A == "string" ? new Blob([A], { type: "text/plain" }) : A, Y = URL.createObjectURL(Z), y = document.createElement("a");
257
+ y.href = Y, y.download = `export-${Date.now()}.${j}`, document.body.appendChild(y), y.click(), document.body.removeChild(y), URL.revokeObjectURL(Y);
258
+ const R = {
259
+ ...N,
266
260
  status: "completed",
267
261
  progress: 100,
268
262
  completedAt: /* @__PURE__ */ new Date(),
269
- rowCount: S.length,
270
- fileSize: J.size
263
+ rowCount: k.length,
264
+ fileSize: Z.size
271
265
  };
272
- h == null || h(X);
273
- } catch (S) {
266
+ h == null || h(R);
267
+ } catch (k) {
274
268
  const A = {
275
- ...b,
269
+ ...N,
276
270
  status: "failed",
277
- error: S instanceof Error ? S.message : "Unknown error"
271
+ error: k instanceof Error ? k.message : "Unknown error"
278
272
  };
279
- r == null || r(A, S instanceof Error ? S : new Error("Export failed"));
273
+ r == null || r(A, k instanceof Error ? k : new Error("Export failed"));
280
274
  } finally {
281
- u(!1), O(0);
275
+ u(!1), F(0);
282
276
  }
283
277
  }, [
284
- $,
285
- E,
286
- N,
287
- a,
278
+ j,
288
279
  I,
280
+ b,
281
+ t,
282
+ O,
289
283
  l,
290
284
  h,
291
285
  r
292
- ]), j = R(
293
- (b) => {
294
- const S = s.find((A) => A.id === b);
295
- S && (q(S.format), m(S.fields), S.options && g(S.options));
286
+ ]), H = P(
287
+ (N) => {
288
+ const k = s.find((A) => A.id === N);
289
+ k && (G(k.format), m(k.fields), k.options && g(k.options));
296
290
  },
297
291
  [s]
298
292
  );
299
- return re(L, () => ({
300
- exportNow: async (b) => {
301
- q(b), await H();
293
+ return pe(E, () => ({
294
+ exportNow: async (N) => {
295
+ G(N), await X();
302
296
  },
303
- getSelectedFields: () => E,
304
- loadTemplate: j
305
- })), /* @__PURE__ */ c("div", { className: `nice-export-center ${F}`, style: U, children: [
297
+ getSelectedFields: () => I,
298
+ loadTemplate: H
299
+ })), /* @__PURE__ */ c("div", { className: `nice-export-center ${M}`, style: K, children: [
306
300
  /* @__PURE__ */ e("div", { className: "nice-export-header", children: /* @__PURE__ */ c("div", { className: "nice-export-title-area", children: [
307
- /* @__PURE__ */ e("h3", { className: "nice-export-title", children: ce }),
301
+ /* @__PURE__ */ e("h3", { className: "nice-export-title", children: te }),
308
302
  z && /* @__PURE__ */ e("p", { className: "nice-export-description", children: z })
309
303
  ] }) }),
310
304
  /* @__PURE__ */ c("div", { className: "nice-export-tabs", children: [
@@ -312,55 +306,57 @@ const Ce = {
312
306
  "button",
313
307
  {
314
308
  type: "button",
315
- className: `nice-export-tab ${P === "export" ? "nice-export-tab--active" : ""}`,
316
- onClick: () => x("export"),
317
- children: Y("dataExportCenter.export", "Export")
309
+ className: `nice-export-tab ${$ === "export" ? "nice-export-tab--active" : ""}`,
310
+ onClick: () => T("export"),
311
+ children: _("dataExportCenter.export", "Export")
318
312
  }
319
313
  ),
320
- s.length > 0 && /* @__PURE__ */ c(
314
+ s.length > 0 && /* @__PURE__ */ e(
321
315
  "button",
322
316
  {
323
317
  type: "button",
324
- className: `nice-export-tab ${P === "templates" ? "nice-export-tab--active" : ""}`,
325
- onClick: () => x("templates"),
326
- children: [
327
- "Templates (",
328
- s.length,
329
- ")"
330
- ]
318
+ className: `nice-export-tab ${$ === "templates" ? "nice-export-tab--active" : ""}`,
319
+ onClick: () => T("templates"),
320
+ children: _("dataExportCenter.templates", "Templates ({templates})").replace(
321
+ "{templates}",
322
+ String(s.length)
323
+ )
331
324
  }
332
325
  ),
333
- t.length > 0 && /* @__PURE__ */ e(
326
+ a.length > 0 && /* @__PURE__ */ e(
334
327
  "button",
335
328
  {
336
329
  type: "button",
337
- className: `nice-export-tab ${P === "history" ? "nice-export-tab--active" : ""}`,
338
- onClick: () => x("history"),
339
- children: Y("dataExportCenter.history", "History")
330
+ className: `nice-export-tab ${$ === "history" ? "nice-export-tab--active" : ""}`,
331
+ onClick: () => T("history"),
332
+ children: _("dataExportCenter.history", "History")
340
333
  }
341
334
  )
342
335
  ] }),
343
336
  /* @__PURE__ */ c("div", { className: "nice-export-content", children: [
344
- P === "export" && /* @__PURE__ */ c(ae, { children: [
337
+ $ === "export" && /* @__PURE__ */ c(ie, { children: [
345
338
  /* @__PURE__ */ e(
346
- Dc,
339
+ Pc,
347
340
  {
348
341
  formats: n,
349
- selected: $,
350
- onChange: q
342
+ selected: j,
343
+ onChange: G
351
344
  }
352
345
  ),
353
- /* @__PURE__ */ e(Tc, { fields: E, onChange: m }),
354
- /* @__PURE__ */ e(Lc, { format: $, options: N, onChange: g }),
346
+ /* @__PURE__ */ e(Oc, { fields: I, onChange: m }),
347
+ /* @__PURE__ */ e(Fc, { format: j, options: b, onChange: g }),
355
348
  /* @__PURE__ */ c("div", { className: "nice-export-actions", children: [
356
349
  /* @__PURE__ */ e(
357
350
  "button",
358
351
  {
359
352
  type: "button",
360
353
  className: "nice-export-btn nice-export-btn--primary",
361
- onClick: H,
362
- disabled: V || E.filter((b) => b.include).length === 0,
363
- children: V ? `Exporting... ${B}%` : "Export Now"
354
+ onClick: X,
355
+ disabled: W || I.filter((N) => N.include).length === 0,
356
+ children: W ? _("dataExportCenter.exporting", "Exporting... {progress}%").replace(
357
+ "{progress}",
358
+ String(B)
359
+ ) : _("dataExportCenter.exportNow", "Export Now")
364
360
  }
365
361
  ),
366
362
  o && /* @__PURE__ */ e(
@@ -371,24 +367,24 @@ const Ce = {
371
367
  onClick: () => o({
372
368
  id: Date.now().toString(),
373
369
  name: `Template ${s.length + 1}`,
374
- format: $,
375
- fields: E,
376
- options: N
370
+ format: j,
371
+ fields: I,
372
+ options: b
377
373
  }),
378
- children: Y("dataExportCenter.saveAsTemplate", "Save as Template")
374
+ children: _("dataExportCenter.saveAsTemplate", "Save as Template")
379
375
  }
380
376
  )
381
377
  ] })
382
378
  ] }),
383
- P === "templates" && /* @__PURE__ */ e("div", { className: "nice-export-templates", children: s.map((b) => /* @__PURE__ */ c("div", { className: "nice-export-template", children: [
379
+ $ === "templates" && /* @__PURE__ */ e("div", { className: "nice-export-templates", children: s.map((N) => /* @__PURE__ */ c("div", { className: "nice-export-template", children: [
384
380
  /* @__PURE__ */ c("div", { className: "nice-export-template-info", children: [
385
- /* @__PURE__ */ e("span", { className: "nice-export-template-name", children: b.name }),
381
+ /* @__PURE__ */ e("span", { className: "nice-export-template-name", children: N.name }),
386
382
  /* @__PURE__ */ c("span", { className: "nice-export-template-format", children: [
387
- Ce[b.format].icon,
383
+ Te[N.format].icon,
388
384
  " ",
389
- Ce[b.format].label
385
+ Te[N.format].label
390
386
  ] }),
391
- b.description && /* @__PURE__ */ e("span", { className: "nice-export-template-desc", children: b.description })
387
+ N.description && /* @__PURE__ */ e("span", { className: "nice-export-template-desc", children: N.description })
392
388
  ] }),
393
389
  /* @__PURE__ */ c("div", { className: "nice-export-template-actions", children: [
394
390
  /* @__PURE__ */ e(
@@ -396,20 +392,20 @@ const Ce = {
396
392
  {
397
393
  type: "button",
398
394
  onClick: () => {
399
- j(b.id), x("export");
395
+ H(N.id), T("export");
400
396
  },
401
- children: "Use"
397
+ children: _("dataExportCenter.use", "Use")
402
398
  }
403
399
  ),
404
- w && /* @__PURE__ */ e("button", { type: "button", onClick: () => w(b.id), children: Y("dataExportCenter.delete", "Delete") })
400
+ f && /* @__PURE__ */ e("button", { type: "button", onClick: () => f(N.id), children: _("dataExportCenter.delete", "Delete") })
405
401
  ] })
406
- ] }, b.id)) }),
407
- P === "history" && /* @__PURE__ */ e(
408
- zc,
402
+ ] }, N.id)) }),
403
+ $ === "history" && /* @__PURE__ */ e(
404
+ $c,
409
405
  {
410
- jobs: t,
411
- onDownload: (b) => {
412
- b.downloadUrl && window.open(b.downloadUrl, "_blank");
406
+ jobs: a,
407
+ onDownload: (N) => {
408
+ N.downloadUrl && window.open(N.downloadUrl, "_blank");
413
409
  }
414
410
  }
415
411
  )
@@ -418,76 +414,76 @@ const Ce = {
418
414
  }
419
415
  ),
420
416
  { displayName: "NiceDataExportCenter" }
421
- ), ne = {
417
+ ), de = {
422
418
  create: {
423
- icon: /* @__PURE__ */ e(Te, { size: 16 }),
419
+ icon: /* @__PURE__ */ e(Ae, { size: 16 }),
424
420
  label: "Created",
425
421
  color: "var(--nice-color-success, #10b981)"
426
422
  },
427
423
  update: {
428
- icon: /* @__PURE__ */ e(je, { size: 16 }),
424
+ icon: /* @__PURE__ */ e(He, { size: 16 }),
429
425
  label: "Updated",
430
426
  color: "var(--nice-color-primary, #3b82f6)"
431
427
  },
432
428
  delete: {
433
- icon: /* @__PURE__ */ e(be, { size: 16 }),
429
+ icon: /* @__PURE__ */ e(we, { size: 16 }),
434
430
  label: "Deleted",
435
431
  color: "var(--nice-color-error, #ef4444)"
436
432
  },
437
- view: { icon: /* @__PURE__ */ e(cc, { size: 16 }), label: "Viewed", color: "var(--nice-text-muted, #6b7280)" },
433
+ view: { icon: /* @__PURE__ */ e(oc, { size: 16 }), label: "Viewed", color: "var(--nice-text-muted, #6b7280)" },
438
434
  export: {
439
- icon: /* @__PURE__ */ e(ve, { size: 16 }),
435
+ icon: /* @__PURE__ */ e(ye, { size: 16 }),
440
436
  label: "Exported",
441
437
  color: "var(--nice-color-accent, #8b5cf6)"
442
438
  },
443
439
  import: {
444
- icon: /* @__PURE__ */ e(ec, { size: 16 }),
440
+ icon: /* @__PURE__ */ e(rc, { size: 16 }),
445
441
  label: "Imported",
446
442
  color: "var(--nice-color-accent, #8b5cf6)"
447
443
  },
448
444
  approve: {
449
- icon: /* @__PURE__ */ e(se, { size: 16 }),
445
+ icon: /* @__PURE__ */ e(re, { size: 16 }),
450
446
  label: "Approved",
451
447
  color: "var(--nice-color-success, #10b981)"
452
448
  },
453
449
  reject: {
454
- icon: /* @__PURE__ */ e(he, { size: 16 }),
450
+ icon: /* @__PURE__ */ e(ge, { size: 16 }),
455
451
  label: "Rejected",
456
452
  color: "var(--nice-color-error, #ef4444)"
457
453
  },
458
454
  login: {
459
- icon: /* @__PURE__ */ e(Qe, { size: 16 }),
455
+ icon: /* @__PURE__ */ e(lc, { size: 16 }),
460
456
  label: "Login",
461
457
  color: "var(--nice-color-success, #10b981)"
462
458
  },
463
459
  logout: {
464
- icon: /* @__PURE__ */ e(Me, { size: 16 }),
460
+ icon: /* @__PURE__ */ e(Be, { size: 16 }),
465
461
  label: "Logout",
466
462
  color: "var(--nice-text-muted, #6b7280)"
467
463
  },
468
464
  permission_change: {
469
- icon: /* @__PURE__ */ e(fe, { size: 16 }),
465
+ icon: /* @__PURE__ */ e(xe, { size: 16 }),
470
466
  label: "Permissions",
471
467
  color: "var(--nice-color-warning, #f59e0b)"
472
468
  },
473
469
  config_change: {
474
- icon: /* @__PURE__ */ e($e, { size: 16 }),
470
+ icon: /* @__PURE__ */ e(Ve, { size: 16 }),
475
471
  label: "Config",
476
472
  color: "var(--nice-color-warning, #f59e0b)"
477
473
  },
478
474
  custom: {
479
- icon: /* @__PURE__ */ e(De, { size: 16 }),
475
+ icon: /* @__PURE__ */ e(ze, { size: 16 }),
480
476
  label: "Action",
481
477
  color: "var(--nice-text-muted, #6b7280)"
482
478
  }
483
- }, Ec = ({
484
- filter: a,
479
+ }, Rc = ({
480
+ filter: t,
485
481
  onChange: n,
486
482
  availableFilters: s
487
483
  }) => {
488
484
  var l, h;
489
- const { t: i } = W(), t = (r, o) => {
490
- n({ ...a, [r]: o });
485
+ const { t: i } = Q(), a = (r, o) => {
486
+ n({ ...t, [r]: o });
491
487
  };
492
488
  return /* @__PURE__ */ c("div", { className: "nice-audit-filters", children: [
493
489
  /* @__PURE__ */ c("div", { className: "nice-audit-filter-group", children: [
@@ -497,37 +493,37 @@ const Ce = {
497
493
  "input",
498
494
  {
499
495
  type: "date",
500
- value: ((l = a.startDate) == null ? void 0 : l.toISOString().split("T")[0]) || "",
501
- onChange: (r) => t("startDate", r.target.value ? new Date(r.target.value) : void 0)
496
+ value: ((l = t.startDate) == null ? void 0 : l.toISOString().split("T")[0]) || "",
497
+ onChange: (r) => a("startDate", r.target.value ? new Date(r.target.value) : void 0)
502
498
  }
503
499
  ),
504
- /* @__PURE__ */ e("span", { children: "to" }),
500
+ /* @__PURE__ */ e("span", { children: i("auditTrail.to", "to") }),
505
501
  /* @__PURE__ */ e(
506
502
  "input",
507
503
  {
508
504
  type: "date",
509
- value: ((h = a.endDate) == null ? void 0 : h.toISOString().split("T")[0]) || "",
510
- onChange: (r) => t("endDate", r.target.value ? new Date(r.target.value) : void 0)
505
+ value: ((h = t.endDate) == null ? void 0 : h.toISOString().split("T")[0]) || "",
506
+ onChange: (r) => a("endDate", r.target.value ? new Date(r.target.value) : void 0)
511
507
  }
512
508
  )
513
509
  ] })
514
510
  ] }),
515
511
  /* @__PURE__ */ c("div", { className: "nice-audit-filter-group", children: [
516
512
  /* @__PURE__ */ e("label", { children: i("auditTrail.actions", "Actions") }),
517
- /* @__PURE__ */ e("div", { className: "nice-audit-action-chips", children: Object.keys(ne).slice(0, 8).map((r) => {
518
- var _;
519
- const o = ne[r], w = (_ = a.actions) == null ? void 0 : _.includes(r);
513
+ /* @__PURE__ */ e("div", { className: "nice-audit-action-chips", children: Object.keys(de).slice(0, 8).map((r) => {
514
+ var D;
515
+ const o = de[r], f = (D = t.actions) == null ? void 0 : D.includes(r);
520
516
  return /* @__PURE__ */ c(
521
517
  "button",
522
518
  {
523
519
  type: "button",
524
- className: `nice-audit-chip ${w ? "nice-audit-chip--selected" : ""}`,
520
+ className: `nice-audit-chip ${f ? "nice-audit-chip--selected" : ""}`,
525
521
  style: { "--chip-color": o.color },
526
522
  onClick: () => {
527
- const I = a.actions || [];
528
- t(
523
+ const O = t.actions || [];
524
+ a(
529
525
  "actions",
530
- w ? I.filter((C) => C !== r) : [...I, r]
526
+ f ? O.filter((w) => w !== r) : [...O, r]
531
527
  );
532
528
  },
533
529
  children: [
@@ -547,105 +543,106 @@ const Ce = {
547
543
  type: "text",
548
544
  className: "nice-audit-search",
549
545
  placeholder: i("auditTrail.searchEntries", "Search entries..."),
550
- value: a.searchQuery || "",
551
- onChange: (r) => t("searchQuery", r.target.value || void 0)
546
+ value: t.searchQuery || "",
547
+ onChange: (r) => a("searchQuery", r.target.value || void 0)
552
548
  }
553
549
  )
554
550
  ] })
555
551
  ] });
556
- }, _c = ({ changes: a }) => {
557
- if (!a.length)
552
+ }, Mc = ({ changes: t }) => {
553
+ if (!t.length)
558
554
  return null;
559
555
  const n = (s, i) => i || (s == null ? "(empty)" : typeof s == "object" ? JSON.stringify(s, null, 2) : String(s));
560
- return /* @__PURE__ */ e("div", { className: "nice-audit-diff", children: a.map((s, i) => /* @__PURE__ */ c("div", { className: "nice-audit-diff-row", children: [
556
+ return /* @__PURE__ */ e("div", { className: "nice-audit-diff", children: t.map((s, i) => /* @__PURE__ */ c("div", { className: "nice-audit-diff-row", children: [
561
557
  /* @__PURE__ */ e("span", { className: "nice-audit-diff-field", children: s.field }),
562
558
  /* @__PURE__ */ c("div", { className: "nice-audit-diff-values", children: [
563
559
  /* @__PURE__ */ e("span", { className: "nice-audit-diff-old", children: n(s.oldValue, s.displayOldValue) }),
564
- /* @__PURE__ */ e("span", { className: "nice-audit-diff-arrow", children: /* @__PURE__ */ e(ac, { size: 14 }) }),
560
+ /* @__PURE__ */ e("span", { className: "nice-audit-diff-arrow", children: /* @__PURE__ */ e(dc, { size: 14 }) }),
565
561
  /* @__PURE__ */ e("span", { className: "nice-audit-diff-new", children: n(s.newValue, s.displayNewValue) })
566
562
  ] })
567
563
  ] }, i)) });
568
- }, Ac = ({
569
- entry: a,
564
+ }, jc = ({
565
+ entry: t,
570
566
  showDiff: n,
571
567
  renderActionIcon: s,
572
568
  renderUser: i,
573
- onClick: t
569
+ onClick: a
574
570
  }) => {
575
- const { t: l } = W(), [h, r] = k(!1), o = ne[a.action] || ne.custom;
571
+ const { t: l } = Q(), [h, r] = C(!1), o = de[t.action] || de.custom;
576
572
  return /* @__PURE__ */ c(
577
573
  "div",
578
574
  {
579
- className: `nice-audit-timeline-entry nice-audit-timeline-entry--${a.severity || "info"}`,
580
- onClick: t,
581
- role: t ? "button" : void 0,
582
- tabIndex: t ? 0 : void 0,
575
+ onKeyDown: Ie,
576
+ className: `nice-audit-timeline-entry nice-audit-timeline-entry--${t.severity || "info"}`,
577
+ onClick: a,
578
+ role: a ? "button" : void 0,
579
+ tabIndex: a ? 0 : void 0,
583
580
  children: [
584
581
  /* @__PURE__ */ e(
585
582
  "div",
586
583
  {
587
584
  className: "nice-audit-timeline-marker",
588
585
  style: { "--marker-color": o.color },
589
- children: s ? s(a.action) : o.icon
586
+ children: s ? s(t.action) : o.icon
590
587
  }
591
588
  ),
592
589
  /* @__PURE__ */ c("div", { className: "nice-audit-timeline-content", children: [
593
590
  /* @__PURE__ */ c("div", { className: "nice-audit-timeline-header", children: [
594
- /* @__PURE__ */ e("span", { className: "nice-audit-timeline-action", children: a.actionLabel || o.label }),
591
+ /* @__PURE__ */ e("span", { className: "nice-audit-timeline-action", children: t.actionLabel || o.label }),
595
592
  /* @__PURE__ */ c("span", { className: "nice-audit-timeline-entity", children: [
596
- a.entityType,
593
+ t.entityType,
597
594
  " ",
598
- a.entityName && `"${a.entityName}"`
595
+ t.entityName && `"${t.entityName}"`
599
596
  ] }),
600
- /* @__PURE__ */ e("span", { className: "nice-audit-timeline-time", children: new Date(a.timestamp).toLocaleString() })
597
+ /* @__PURE__ */ e("span", { className: "nice-audit-timeline-time", children: new Date(t.timestamp).toLocaleString() })
601
598
  ] }),
602
- /* @__PURE__ */ e("div", { className: "nice-audit-timeline-user", children: i ? i(a) : /* @__PURE__ */ c(ae, { children: [
603
- a.userAvatar && /* @__PURE__ */ e("img", { src: a.userAvatar, alt: "", className: "nice-audit-avatar" }),
604
- /* @__PURE__ */ e("span", { className: "nice-audit-username", children: a.userName }),
605
- a.userRole && /* @__PURE__ */ e("span", { className: "nice-audit-role", children: a.userRole })
599
+ /* @__PURE__ */ e("div", { className: "nice-audit-timeline-user", children: i ? i(t) : /* @__PURE__ */ c(ie, { children: [
600
+ t.userAvatar && /* @__PURE__ */ e("img", { src: t.userAvatar, alt: "", className: "nice-audit-avatar" }),
601
+ /* @__PURE__ */ e("span", { className: "nice-audit-username", children: t.userName }),
602
+ t.userRole && /* @__PURE__ */ e("span", { className: "nice-audit-role", children: t.userRole })
606
603
  ] }) }),
607
- a.notes && /* @__PURE__ */ e("div", { className: "nice-audit-timeline-notes", children: a.notes }),
608
- n && a.changes && a.changes.length > 0 && /* @__PURE__ */ c(ae, { children: [
604
+ t.notes && /* @__PURE__ */ e("div", { className: "nice-audit-timeline-notes", children: t.notes }),
605
+ n && t.changes && t.changes.length > 0 && /* @__PURE__ */ c(ie, { children: [
609
606
  /* @__PURE__ */ e(
610
607
  "button",
611
608
  {
612
609
  type: "button",
613
610
  className: "nice-audit-expand-btn",
614
- onClick: (w) => {
615
- w.stopPropagation(), r(!h);
611
+ onClick: (f) => {
612
+ f.stopPropagation(), r(!h);
616
613
  },
617
- children: h ? /* @__PURE__ */ c(ae, { children: [
618
- /* @__PURE__ */ e(Se, { size: 14 }),
614
+ children: h ? /* @__PURE__ */ c(ie, { children: [
615
+ /* @__PURE__ */ e(Le, { size: 14 }),
619
616
  " ",
620
617
  l("auditTrail.hideChanges", "Hide changes")
621
- ] }) : /* @__PURE__ */ c(ae, { children: [
622
- /* @__PURE__ */ e(Fe, { size: 14 }),
618
+ ] }) : /* @__PURE__ */ c(ie, { children: [
619
+ /* @__PURE__ */ e(qe, { size: 14 }),
623
620
  " ",
624
621
  l("auditTrail.showChanges", "Show {changes} changes").replace(
625
622
  "{changes}",
626
- String(a.changes.length)
623
+ String(t.changes.length)
627
624
  )
628
625
  ] })
629
626
  }
630
627
  ),
631
- h && /* @__PURE__ */ e(_c, { changes: a.changes })
628
+ h && /* @__PURE__ */ e(Mc, { changes: t.changes })
632
629
  ] }),
633
- a.ipAddress && /* @__PURE__ */ c("div", { className: "nice-audit-timeline-meta", children: [
634
- /* @__PURE__ */ c("span", { children: [
635
- "IP: ",
636
- a.ipAddress
637
- ] }),
638
- a.location && /* @__PURE__ */ c("span", { children: [
630
+ t.ipAddress && /* @__PURE__ */ c("div", { className: "nice-audit-timeline-meta", children: [
631
+ /* @__PURE__ */ e("span", { children: l("auditTrail.ip", "IP: {ipAddress}").replace(
632
+ "{ipAddress}",
633
+ String(t.ipAddress)
634
+ ) }),
635
+ t.location && /* @__PURE__ */ c("span", { children: [
639
636
  "• ",
640
- a.location
637
+ t.location
641
638
  ] })
642
639
  ] })
643
640
  ] })
644
641
  ]
645
642
  }
646
643
  );
647
- }, Ic = ({ entries: a, showDiff: n, onEntryClick: s }) => {
648
- const { t: i } = W();
644
+ }, Uc = ({ entries: t, showDiff: n, onEntryClick: s }) => {
645
+ const { t: i } = Q();
649
646
  return /* @__PURE__ */ c("table", { className: "nice-audit-table", children: [
650
647
  /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ c("tr", { children: [
651
648
  /* @__PURE__ */ e("th", { children: i("auditTrail.timestamp", "Timestamp") }),
@@ -655,16 +652,16 @@ const Ce = {
655
652
  /* @__PURE__ */ e("th", { children: i("auditTrail.changes", "Changes") }),
656
653
  /* @__PURE__ */ e("th", { children: i("auditTrail.ipAddress", "IP Address") })
657
654
  ] }) }),
658
- /* @__PURE__ */ e("tbody", { children: a.map((t) => {
659
- const l = ne[t.action] || ne.custom;
655
+ /* @__PURE__ */ e("tbody", { children: t.map((a) => {
656
+ const l = de[a.action] || de.custom;
660
657
  return /* @__PURE__ */ c(
661
658
  "tr",
662
659
  {
663
- className: `nice-audit-row nice-audit-row--${t.severity || "info"}`,
664
- onClick: () => s == null ? void 0 : s(t),
660
+ className: `nice-audit-row nice-audit-row--${a.severity || "info"}`,
661
+ onClick: () => s == null ? void 0 : s(a),
665
662
  role: s ? "button" : void 0,
666
663
  children: [
667
- /* @__PURE__ */ e("td", { className: "nice-audit-cell-time", children: new Date(t.timestamp).toLocaleString() }),
664
+ /* @__PURE__ */ e("td", { className: "nice-audit-cell-time", children: new Date(a.timestamp).toLocaleString() }),
668
665
  /* @__PURE__ */ e("td", { children: /* @__PURE__ */ c(
669
666
  "span",
670
667
  {
@@ -673,68 +670,68 @@ const Ce = {
673
670
  children: [
674
671
  l.icon,
675
672
  " ",
676
- t.actionLabel || l.label
673
+ a.actionLabel || l.label
677
674
  ]
678
675
  }
679
676
  ) }),
680
677
  /* @__PURE__ */ c("td", { className: "nice-audit-cell-user", children: [
681
- t.userAvatar && /* @__PURE__ */ e("img", { src: t.userAvatar, alt: "", className: "nice-audit-avatar-sm" }),
682
- t.userName
678
+ a.userAvatar && /* @__PURE__ */ e("img", { src: a.userAvatar, alt: "", className: "nice-audit-avatar-sm" }),
679
+ a.userName
683
680
  ] }),
684
681
  /* @__PURE__ */ c("td", { children: [
685
- t.entityType,
686
- t.entityName && `: ${t.entityName}`
682
+ a.entityType,
683
+ a.entityName && `: ${a.entityName}`
687
684
  ] }),
688
- /* @__PURE__ */ e("td", { children: t.changes && t.changes.length > 0 ? /* @__PURE__ */ c("span", { className: "nice-audit-changes-count", children: [
689
- t.changes.length,
690
- " field(s)"
691
- ] }) : "-" }),
692
- /* @__PURE__ */ e("td", { className: "nice-audit-cell-ip", children: t.ipAddress || "-" })
685
+ /* @__PURE__ */ e("td", { children: a.changes && a.changes.length > 0 ? /* @__PURE__ */ e("span", { className: "nice-audit-changes-count", children: i("auditTrail.fieldS", "{changes} field(s)").replace(
686
+ "{changes}",
687
+ String(a.changes.length)
688
+ ) }) : "-" }),
689
+ /* @__PURE__ */ e("td", { className: "nice-audit-cell-ip", children: a.ipAddress || "-" })
693
690
  ]
694
691
  },
695
- t.id
692
+ a.id
696
693
  );
697
694
  }) })
698
695
  ] });
699
- }, ia = /* @__PURE__ */ Object.assign(
700
- /* @__PURE__ */ le(
696
+ }, pt = /* @__PURE__ */ Object.assign(
697
+ /* @__PURE__ */ he(
701
698
  ({
702
- dataSource: a,
699
+ dataSource: t,
703
700
  initialFilter: n = {},
704
701
  pageSize: s = 50,
705
702
  viewMode: i = "timeline",
706
- enableExport: t = !0,
703
+ enableExport: a = !0,
707
704
  showDiffs: l = !0,
708
705
  renderActionIcon: h,
709
706
  renderUser: r,
710
707
  onEntryClick: o,
711
- onExport: w,
712
- title: _,
713
- className: I = "",
714
- style: C
708
+ onExport: f,
709
+ title: D,
710
+ className: O = "",
711
+ style: w
715
712
  }, z) => {
716
- const { t: F } = W(), U = _ ?? F("auditTrail.title", "Audit Trail"), [L, Y] = k([]), [ce, $] = k(0), [q, E] = k(n), [m, N] = k(1), [g, V] = k(!1), [u, B] = k(i), [O, P] = k(!1), x = R(async () => {
717
- V(!0);
713
+ const { t: M } = Q(), K = D ?? M("auditTrail.title", "Audit Trail"), [E, _] = C([]), [te, j] = C(0), [G, I] = C(n), [m, b] = C(1), [g, W] = C(!1), [u, B] = C(i), [F, $] = C(!1), T = P(async () => {
714
+ W(!0);
718
715
  try {
719
- const b = await a.fetchEntries(q, { page: m, pageSize: s });
720
- Y(b.entries), $(b.totalCount);
716
+ const N = await t.fetchEntries(G, { page: m, pageSize: s });
717
+ _(N.entries), j(N.totalCount);
721
718
  } finally {
722
- V(!1);
719
+ W(!1);
723
720
  }
724
- }, [a, q, m, s]);
725
- kc.useEffect(() => {
726
- x();
727
- }, [x]);
728
- const H = R(
729
- (b) => {
730
- if (w)
731
- w(L, b);
721
+ }, [t, G, m, s]);
722
+ Ac.useEffect(() => {
723
+ T();
724
+ }, [T]);
725
+ const X = P(
726
+ (N) => {
727
+ if (f)
728
+ f(E, N);
732
729
  else {
733
- let S, A;
734
- if (b === "json")
735
- S = JSON.stringify(L, null, 2), A = "application/json";
730
+ let k, A;
731
+ if (N === "json")
732
+ k = JSON.stringify(E, null, 2), A = "application/json";
736
733
  else {
737
- const X = [
734
+ const R = [
738
735
  "Timestamp",
739
736
  "Action",
740
737
  "User",
@@ -742,38 +739,38 @@ const Ce = {
742
739
  "Entity",
743
740
  "IP",
744
741
  "Changes"
745
- ], Z = L.map((G) => {
742
+ ], J = E.map((q) => {
746
743
  var v;
747
744
  return [
748
- new Date(G.timestamp).toISOString(),
749
- G.action,
750
- G.userName,
751
- G.entityType,
752
- G.entityName || G.entityId,
753
- G.ipAddress || "",
754
- ((v = G.changes) == null ? void 0 : v.length) || 0
745
+ new Date(q.timestamp).toISOString(),
746
+ q.action,
747
+ q.userName,
748
+ q.entityType,
749
+ q.entityName || q.entityId,
750
+ q.ipAddress || "",
751
+ ((v = q.changes) == null ? void 0 : v.length) || 0
755
752
  ];
756
753
  });
757
- S = [X.join(","), ...Z.map((G) => G.join(","))].join(`
754
+ k = [R.join(","), ...J.map((q) => q.join(","))].join(`
758
755
  `), A = "text/csv";
759
756
  }
760
- const J = new Blob([S], { type: A }), f = URL.createObjectURL(J), T = document.createElement("a");
761
- T.href = f, T.download = `audit-trail-${Date.now()}.${b}`, T.click(), URL.revokeObjectURL(f);
757
+ const Z = new Blob([k], { type: A }), Y = URL.createObjectURL(Z), y = document.createElement("a");
758
+ y.href = Y, y.download = `audit-trail-${Date.now()}.${N}`, y.click(), URL.revokeObjectURL(Y);
762
759
  }
763
760
  },
764
- [L, w]
761
+ [E, f]
765
762
  );
766
- re(z, () => ({
767
- refresh: x,
768
- setFilter: (b) => {
769
- E(b), N(1);
763
+ pe(z, () => ({
764
+ refresh: T,
765
+ setFilter: (N) => {
766
+ I(N), b(1);
770
767
  },
771
- getEntries: () => L
768
+ getEntries: () => E
772
769
  }));
773
- const j = Math.ceil(ce / s);
774
- return /* @__PURE__ */ c("div", { className: `nice-audit-trail ${I}`, style: C, children: [
770
+ const H = Math.ceil(te / s);
771
+ return /* @__PURE__ */ c("div", { className: `nice-audit-trail ${O}`, style: w, children: [
775
772
  /* @__PURE__ */ c("div", { className: "nice-audit-header", children: [
776
- /* @__PURE__ */ e("h3", { className: "nice-audit-title", children: U }),
773
+ /* @__PURE__ */ e("h3", { className: "nice-audit-title", children: K }),
777
774
  /* @__PURE__ */ c("div", { className: "nice-audit-header-actions", children: [
778
775
  /* @__PURE__ */ e(
779
776
  "button",
@@ -781,8 +778,8 @@ const Ce = {
781
778
  type: "button",
782
779
  className: `nice-audit-view-btn ${u === "timeline" ? "nice-audit-view-btn--active" : ""}`,
783
780
  onClick: () => B("timeline"),
784
- title: F("auditTrail.timelineView", "Timeline view"),
785
- children: /* @__PURE__ */ e(Xe, { size: 16 })
781
+ title: M("auditTrail.timelineView", "Timeline view"),
782
+ children: /* @__PURE__ */ e(sc, { size: 16 })
786
783
  }
787
784
  ),
788
785
  /* @__PURE__ */ e(
@@ -791,73 +788,73 @@ const Ce = {
791
788
  type: "button",
792
789
  className: `nice-audit-view-btn ${u === "table" ? "nice-audit-view-btn--active" : ""}`,
793
790
  onClick: () => B("table"),
794
- title: F("auditTrail.tableView", "Table view"),
795
- children: /* @__PURE__ */ e(Ze, { size: 16 })
791
+ title: M("auditTrail.tableView", "Table view"),
792
+ children: /* @__PURE__ */ e(nc, { size: 16 })
796
793
  }
797
794
  ),
798
795
  /* @__PURE__ */ c(
799
796
  "button",
800
797
  {
801
798
  type: "button",
802
- className: `nice-audit-filter-btn ${O ? "nice-audit-filter-btn--active" : ""}`,
803
- onClick: () => P(!O),
799
+ className: `nice-audit-filter-btn ${F ? "nice-audit-filter-btn--active" : ""}`,
800
+ onClick: () => $(!F),
804
801
  children: [
805
- /* @__PURE__ */ e(ge, { size: 16 }),
802
+ /* @__PURE__ */ e(fe, { size: 16 }),
806
803
  " ",
807
- F("auditTrail.filter", "Filter")
804
+ M("auditTrail.filter", "Filter")
808
805
  ]
809
806
  }
810
807
  ),
811
- t && /* @__PURE__ */ c("div", { className: "nice-audit-export-dropdown", children: [
808
+ a && /* @__PURE__ */ c("div", { className: "nice-audit-export-dropdown", children: [
812
809
  /* @__PURE__ */ c("button", { type: "button", className: "nice-audit-export-btn", children: [
813
- /* @__PURE__ */ e(ve, { size: 16 }),
810
+ /* @__PURE__ */ e(ye, { size: 16 }),
814
811
  " ",
815
- F("auditTrail.export", "Export")
812
+ M("auditTrail.export", "Export")
816
813
  ] }),
817
814
  /* @__PURE__ */ c("div", { className: "nice-audit-export-menu", children: [
818
- /* @__PURE__ */ e("button", { type: "button", onClick: () => H("csv"), children: F("auditTrail.exportAsCsv", "Export as CSV") }),
819
- /* @__PURE__ */ e("button", { type: "button", onClick: () => H("json"), children: F("auditTrail.exportAsJson", "Export as JSON") })
815
+ /* @__PURE__ */ e("button", { type: "button", onClick: () => X("csv"), children: M("auditTrail.exportAsCsv", "Export as CSV") }),
816
+ /* @__PURE__ */ e("button", { type: "button", onClick: () => X("json"), children: M("auditTrail.exportAsJson", "Export as JSON") })
820
817
  ] })
821
818
  ] })
822
819
  ] })
823
820
  ] }),
824
- O && /* @__PURE__ */ e(Ec, { filter: q, onChange: E }),
821
+ F && /* @__PURE__ */ e(Rc, { filter: G, onChange: I }),
825
822
  /* @__PURE__ */ c("div", { className: "nice-audit-stats", children: [
826
- /* @__PURE__ */ e("span", { children: F("auditTrail.showingOfEntries", "Showing {entries} of {totalCount} entries").replace("{entries}", String(L.length)).replace("{totalCount}", String(ce)) }),
827
- q.startDate && q.endDate && /* @__PURE__ */ c("span", { className: "nice-audit-date-indicator", children: [
828
- q.startDate.toLocaleDateString(),
823
+ /* @__PURE__ */ e("span", { children: M("auditTrail.showingOfEntries", "Showing {entries} of {totalCount} entries").replace("{entries}", String(E.length)).replace("{totalCount}", String(te)) }),
824
+ G.startDate && G.endDate && /* @__PURE__ */ c("span", { className: "nice-audit-date-indicator", children: [
825
+ G.startDate.toLocaleDateString(),
829
826
  " - ",
830
- q.endDate.toLocaleDateString()
827
+ G.endDate.toLocaleDateString()
831
828
  ] })
832
829
  ] }),
833
830
  /* @__PURE__ */ c("div", { className: `nice-audit-content ${g ? "nice-audit-content--loading" : ""}`, children: [
834
831
  g && /* @__PURE__ */ e("div", { className: "nice-audit-loader", children: /* @__PURE__ */ e("div", { className: "nice-audit-spinner" }) }),
835
- u === "timeline" ? /* @__PURE__ */ e("div", { className: "nice-audit-timeline", children: L.map((b) => /* @__PURE__ */ e(
836
- Ac,
832
+ u === "timeline" ? /* @__PURE__ */ e("div", { className: "nice-audit-timeline", children: E.map((N) => /* @__PURE__ */ e(
833
+ jc,
837
834
  {
838
- entry: b,
835
+ entry: N,
839
836
  showDiff: l,
840
837
  renderActionIcon: h,
841
838
  renderUser: r,
842
- onClick: o ? () => o(b) : void 0
839
+ onClick: o ? () => o(N) : void 0
843
840
  },
844
- b.id
845
- )) }) : /* @__PURE__ */ e(Ic, { entries: L, showDiff: l, onEntryClick: o }),
846
- L.length === 0 && !g && /* @__PURE__ */ e("div", { className: "nice-audit-empty", children: F(
841
+ N.id
842
+ )) }) : /* @__PURE__ */ e(Uc, { entries: E, showDiff: l, onEntryClick: o }),
843
+ E.length === 0 && !g && /* @__PURE__ */ e("div", { className: "nice-audit-empty", children: M(
847
844
  "auditTrail.noAuditEntriesFoundMatching",
848
845
  "No audit entries found matching the current filters."
849
846
  ) })
850
847
  ] }),
851
- j > 1 && /* @__PURE__ */ c("div", { className: "nice-audit-pagination", children: [
852
- /* @__PURE__ */ e("button", { type: "button", disabled: m === 1, onClick: () => N(m - 1), children: F("auditTrail.previous", "Previous") }),
853
- /* @__PURE__ */ e("span", { children: F("auditTrail.pageOf", "Page {page} of {totalPages}").replace("{page}", String(m)).replace("{totalPages}", String(j)) }),
848
+ H > 1 && /* @__PURE__ */ c("div", { className: "nice-audit-pagination", children: [
849
+ /* @__PURE__ */ e("button", { type: "button", disabled: m === 1, onClick: () => b(m - 1), children: M("auditTrail.previous", "Previous") }),
850
+ /* @__PURE__ */ e("span", { children: M("auditTrail.pageOf", "Page {page} of {totalPages}").replace("{page}", String(m)).replace("{totalPages}", String(H)) }),
854
851
  /* @__PURE__ */ e(
855
852
  "button",
856
853
  {
857
854
  type: "button",
858
- disabled: m === j,
859
- onClick: () => N(m + 1),
860
- children: F("auditTrail.next", "Next")
855
+ disabled: m === H,
856
+ onClick: () => b(m + 1),
857
+ children: M("auditTrail.next", "Next")
861
858
  }
862
859
  )
863
860
  ] })
@@ -865,7 +862,7 @@ const Ce = {
865
862
  }
866
863
  ),
867
864
  { displayName: "NiceAuditTrail" }
868
- ), Oc = [
865
+ ), Yc = [
869
866
  {
870
867
  target: ".nice-contract-editor",
871
868
  titleKey: "tutorial.contractEditor.intro.title",
@@ -874,52 +871,52 @@ const Ce = {
874
871
  content: "Assemble the contract from the clause library, fill template variables, track versions and approvals, then save or export to PDF/DOCX/HTML.",
875
872
  placement: "auto"
876
873
  }
877
- ], ie = {
874
+ ], le = {
878
875
  general: {
879
876
  label: "General",
880
877
  color: "var(--nice-text-muted, #6b7280)",
881
- icon: /* @__PURE__ */ e(xe, { size: 16 })
878
+ icon: /* @__PURE__ */ e(Ee, { size: 16 })
882
879
  },
883
880
  liability: {
884
881
  label: "Liability",
885
882
  color: "var(--nice-color-error, #ef4444)",
886
- icon: /* @__PURE__ */ e(Ye, { size: 16 })
883
+ icon: /* @__PURE__ */ e(Ke, { size: 16 })
887
884
  },
888
885
  payment: {
889
886
  label: "Payment",
890
887
  color: "var(--nice-color-success, #10b981)",
891
- icon: /* @__PURE__ */ e(lc, { size: 16 })
888
+ icon: /* @__PURE__ */ e(gc, { size: 16 })
892
889
  },
893
890
  termination: {
894
891
  label: "Termination",
895
892
  color: "var(--nice-color-warning, #f59e0b)",
896
- icon: /* @__PURE__ */ e(nc, { size: 16 })
893
+ icon: /* @__PURE__ */ e(mc, { size: 16 })
897
894
  },
898
895
  confidentiality: {
899
896
  label: "Confidentiality",
900
897
  color: "var(--nice-color-accent, #8b5cf6)",
901
- icon: /* @__PURE__ */ e(Ue, { size: 16 })
898
+ icon: /* @__PURE__ */ e(Je, { size: 16 })
902
899
  },
903
900
  compliance: {
904
901
  label: "Compliance",
905
902
  color: "var(--nice-color-primary, #3b82f6)",
906
- icon: /* @__PURE__ */ e(se, { size: 16 })
903
+ icon: /* @__PURE__ */ e(re, { size: 16 })
907
904
  },
908
905
  custom: {
909
906
  label: "Custom",
910
907
  color: "var(--nice-text-muted, #64748b)",
911
- icon: /* @__PURE__ */ e(je, { size: 16 })
908
+ icon: /* @__PURE__ */ e(He, { size: 16 })
912
909
  }
913
- }, Pc = {
910
+ }, qc = {
914
911
  draft: { label: "Draft", color: "var(--nice-text-muted, #6b7280)" },
915
912
  pending_review: { label: "Pending Review", color: "var(--nice-color-warning, #f59e0b)" },
916
913
  approved: { label: "Approved", color: "var(--nice-color-success, #10b981)" },
917
914
  rejected: { label: "Rejected", color: "var(--nice-color-error, #ef4444)" },
918
915
  signed: { label: "Signed", color: "var(--nice-color-accent, #8b5cf6)" }
919
- }, Rc = ({ clauses: a, onInsert: n }) => {
920
- const { t: s } = W(), [i, t] = k(""), [l, h] = k("all"), r = a.filter((o) => {
921
- const w = i === "" || o.name.toLowerCase().includes(i.toLowerCase()) || o.content.toLowerCase().includes(i.toLowerCase()), _ = l === "all" || o.category === l;
922
- return w && _;
916
+ }, Vc = ({ clauses: t, onInsert: n }) => {
917
+ const { t: s } = Q(), [i, a] = C(""), [l, h] = C("all"), r = t.filter((o) => {
918
+ const f = i === "" || o.name.toLowerCase().includes(i.toLowerCase()) || o.content.toLowerCase().includes(i.toLowerCase()), D = l === "all" || o.category === l;
919
+ return f && D;
923
920
  });
924
921
  return /* @__PURE__ */ c("div", { className: "nice-contract-library", children: [
925
922
  /* @__PURE__ */ c("div", { className: "nice-contract-library-header", children: [
@@ -930,7 +927,7 @@ const Ce = {
930
927
  type: "text",
931
928
  placeholder: s("contractEditor.searchClauses", "Search clauses..."),
932
929
  value: i,
933
- onChange: (o) => t(o.target.value),
930
+ onChange: (o) => a(o.target.value),
934
931
  className: "nice-contract-library-search"
935
932
  }
936
933
  )
@@ -942,20 +939,20 @@ const Ce = {
942
939
  type: "button",
943
940
  className: `nice-contract-category-btn ${l === "all" ? "nice-contract-category-btn--active" : ""}`,
944
941
  onClick: () => h("all"),
945
- children: "All"
942
+ children: s("contractEditor.all", "All")
946
943
  }
947
944
  ),
948
- Object.keys(ie).map((o) => /* @__PURE__ */ c(
945
+ Object.keys(le).map((o) => /* @__PURE__ */ c(
949
946
  "button",
950
947
  {
951
948
  type: "button",
952
949
  className: `nice-contract-category-btn ${l === o ? "nice-contract-category-btn--active" : ""}`,
953
950
  onClick: () => h(o),
954
- style: { "--cat-color": ie[o].color },
951
+ style: { "--cat-color": le[o].color },
955
952
  children: [
956
- ie[o].icon,
953
+ le[o].icon,
957
954
  " ",
958
- ie[o].label
955
+ le[o].label
959
956
  ]
960
957
  },
961
958
  o
@@ -969,8 +966,8 @@ const Ce = {
969
966
  "span",
970
967
  {
971
968
  className: "nice-contract-library-item-cat",
972
- style: { "--cat-color": ie[o.category].color },
973
- children: ie[o.category].icon
969
+ style: { "--cat-color": le[o.category].color },
970
+ children: le[o.category].icon
974
971
  }
975
972
  )
976
973
  ] }),
@@ -982,7 +979,7 @@ const Ce = {
982
979
  className: "nice-contract-library-insert",
983
980
  onClick: () => n(o),
984
981
  children: [
985
- /* @__PURE__ */ e(Te, { size: 14 }),
982
+ /* @__PURE__ */ e(Ae, { size: 14 }),
986
983
  " ",
987
984
  s("contractEditor.insert", "Insert")
988
985
  ]
@@ -992,74 +989,85 @@ const Ce = {
992
989
  r.length === 0 && /* @__PURE__ */ e("div", { className: "nice-contract-library-empty", children: s("contractEditor.noMatchingClauses", "No matching clauses") })
993
990
  ] })
994
991
  ] });
995
- }, Fc = ({ variables: a, definitions: n, onChange: s }) => {
996
- const { t: i } = W();
992
+ }, Bc = ({ variables: t, definitions: n, onChange: s }) => {
993
+ const { t: i } = Q();
997
994
  return /* @__PURE__ */ c("div", { className: "nice-contract-variables", children: [
998
995
  /* @__PURE__ */ e("h4", { children: i("contractEditor.variables", "Variables") }),
999
- /* @__PURE__ */ e("div", { className: "nice-contract-variables-list", children: n.map((t) => /* @__PURE__ */ c("div", { className: "nice-contract-variable", children: [
996
+ /* @__PURE__ */ e("div", { className: "nice-contract-variables-list", children: n.map((a) => /* @__PURE__ */ c("div", { className: "nice-contract-variable", children: [
1000
997
  /* @__PURE__ */ c("label", { children: [
1001
- t.name,
1002
- t.required && /* @__PURE__ */ e("span", { className: "nice-contract-required", children: "*" })
998
+ a.name,
999
+ a.required && /* @__PURE__ */ e("span", { className: "nice-contract-required", children: "*" })
1003
1000
  ] }),
1004
- t.type === "select" && t.options ? /* @__PURE__ */ c(
1001
+ a.type === "select" && a.options ? /* @__PURE__ */ c(
1005
1002
  "select",
1006
1003
  {
1007
- value: a[t.name] || t.defaultValue || "",
1008
- onChange: (l) => s(t.name, l.target.value),
1004
+ value: t[a.name] || a.defaultValue || "",
1005
+ onChange: (l) => s(a.name, l.target.value),
1009
1006
  children: [
1010
1007
  /* @__PURE__ */ e("option", { value: "", children: i("contractEditor.select", "Select...") }),
1011
- t.options.map((l) => /* @__PURE__ */ e("option", { value: l, children: l }, l))
1008
+ a.options.map((l) => /* @__PURE__ */ e("option", { value: l, children: l }, l))
1012
1009
  ]
1013
1010
  }
1014
- ) : t.type === "date" ? /* @__PURE__ */ e(
1011
+ ) : a.type === "date" ? /* @__PURE__ */ e(
1015
1012
  "input",
1016
1013
  {
1017
1014
  type: "date",
1018
- value: a[t.name] || t.defaultValue || "",
1019
- onChange: (l) => s(t.name, l.target.value)
1015
+ value: t[a.name] || a.defaultValue || "",
1016
+ onChange: (l) => s(a.name, l.target.value)
1020
1017
  }
1021
1018
  ) : /* @__PURE__ */ e(
1022
1019
  "input",
1023
1020
  {
1024
- type: t.type === "number" || t.type === "currency" ? "number" : "text",
1025
- value: a[t.name] || t.defaultValue || "",
1026
- placeholder: t.placeholder,
1027
- onChange: (l) => s(t.name, l.target.value)
1021
+ type: a.type === "number" || a.type === "currency" ? "number" : "text",
1022
+ value: t[a.name] || a.defaultValue || "",
1023
+ placeholder: a.placeholder,
1024
+ onChange: (l) => s(a.name, l.target.value)
1028
1025
  }
1029
1026
  )
1030
- ] }, t.name)) })
1027
+ ] }, a.name)) })
1031
1028
  ] });
1032
- }, $c = ({
1033
- section: a,
1029
+ }, Hc = ({
1030
+ section: t,
1034
1031
  variables: n,
1035
1032
  readOnly: s,
1036
1033
  onToggle: i,
1037
- onRemoveClause: t,
1034
+ onRemoveClause: a,
1038
1035
  onMoveClause: l
1039
1036
  }) => {
1040
- const { t: h } = W(), r = (o) => o.replace(/\{\{(\w+)\}\}/g, (w, _) => n[_] || `[${_}]`);
1037
+ const { t: h } = Q(), r = (o) => o.replace(/\{\{(\w+)\}\}/g, (f, D) => n[D] || `[${D}]`);
1041
1038
  return /* @__PURE__ */ c(
1042
1039
  "div",
1043
1040
  {
1044
- className: `nice-contract-section ${a.collapsed ? "nice-contract-section--collapsed" : ""}`,
1041
+ className: `nice-contract-section ${t.collapsed ? "nice-contract-section--collapsed" : ""}`,
1045
1042
  children: [
1046
- /* @__PURE__ */ c("div", { className: "nice-contract-section-header", onClick: i, children: [
1047
- /* @__PURE__ */ e("span", { className: "nice-contract-section-toggle", children: a.collapsed ? /* @__PURE__ */ e(Fe, { size: 14 }) : /* @__PURE__ */ e(Se, { size: 14 }) }),
1048
- /* @__PURE__ */ e("h3", { children: a.title }),
1049
- /* @__PURE__ */ c("span", { className: "nice-contract-section-count", children: [
1050
- a.clauses.length,
1051
- " clause(s)"
1052
- ] })
1053
- ] }),
1054
- !a.collapsed && /* @__PURE__ */ c("div", { className: "nice-contract-section-content", children: [
1055
- a.clauses.map((o, w) => /* @__PURE__ */ c("div", { className: "nice-contract-clause", children: [
1043
+ /* @__PURE__ */ c(
1044
+ "div",
1045
+ {
1046
+ role: "button",
1047
+ tabIndex: 0,
1048
+ "aria-expanded": !t.collapsed,
1049
+ onKeyDown: Ie,
1050
+ className: "nice-contract-section-header",
1051
+ onClick: i,
1052
+ children: [
1053
+ /* @__PURE__ */ e("span", { className: "nice-contract-section-toggle", children: t.collapsed ? /* @__PURE__ */ e(qe, { size: 14 }) : /* @__PURE__ */ e(Le, { size: 14 }) }),
1054
+ /* @__PURE__ */ e("h3", { children: t.title }),
1055
+ /* @__PURE__ */ e("span", { className: "nice-contract-section-count", children: h("contractEditor.clauseS", "{clauses} clause(s)").replace(
1056
+ "{clauses}",
1057
+ String(t.clauses.length)
1058
+ ) })
1059
+ ]
1060
+ }
1061
+ ),
1062
+ !t.collapsed && /* @__PURE__ */ c("div", { className: "nice-contract-section-content", children: [
1063
+ t.clauses.map((o, f) => /* @__PURE__ */ c("div", { className: "nice-contract-clause", children: [
1056
1064
  /* @__PURE__ */ c("div", { className: "nice-contract-clause-header", children: [
1057
1065
  /* @__PURE__ */ e(
1058
1066
  "span",
1059
1067
  {
1060
1068
  className: "nice-contract-clause-cat",
1061
- style: { "--cat-color": ie[o.category].color },
1062
- children: ie[o.category].icon
1069
+ style: { "--cat-color": le[o.category].color },
1070
+ children: le[o.category].icon
1063
1071
  }
1064
1072
  ),
1065
1073
  /* @__PURE__ */ e("span", { className: "nice-contract-clause-name", children: o.name }),
@@ -1070,8 +1078,8 @@ const Ce = {
1070
1078
  {
1071
1079
  type: "button",
1072
1080
  onClick: () => l(o.id, "up"),
1073
- disabled: w === 0,
1074
- children: /* @__PURE__ */ e(ic, { size: 14 })
1081
+ disabled: f === 0,
1082
+ children: /* @__PURE__ */ e(pc, { size: 14 })
1075
1083
  }
1076
1084
  ),
1077
1085
  /* @__PURE__ */ e(
@@ -1079,11 +1087,11 @@ const Ce = {
1079
1087
  {
1080
1088
  type: "button",
1081
1089
  onClick: () => l(o.id, "down"),
1082
- disabled: w === a.clauses.length - 1,
1083
- children: /* @__PURE__ */ e(sc, { size: 14 })
1090
+ disabled: f === t.clauses.length - 1,
1091
+ children: /* @__PURE__ */ e(uc, { size: 14 })
1084
1092
  }
1085
1093
  ),
1086
- /* @__PURE__ */ e("button", { type: "button", onClick: () => t(o.id), children: /* @__PURE__ */ e(be, { size: 14 }) })
1094
+ /* @__PURE__ */ e("button", { type: "button", onClick: () => a(o.id), children: /* @__PURE__ */ e(we, { size: 14 }) })
1087
1095
  ] })
1088
1096
  ] }),
1089
1097
  /* @__PURE__ */ e(
@@ -1094,7 +1102,7 @@ const Ce = {
1094
1102
  }
1095
1103
  )
1096
1104
  ] }, o.id)),
1097
- a.clauses.length === 0 && /* @__PURE__ */ e("div", { className: "nice-contract-section-empty", children: h(
1105
+ t.clauses.length === 0 && /* @__PURE__ */ e("div", { className: "nice-contract-section-empty", children: h(
1098
1106
  "contractEditor.noClausesInThisSection",
1099
1107
  "No clauses in this section. Drag clauses here or use the library."
1100
1108
  ) })
@@ -1102,11 +1110,11 @@ const Ce = {
1102
1110
  ]
1103
1111
  }
1104
1112
  );
1105
- }, Mc = ({ workflow: a, onAction: n }) => {
1106
- const { t: s } = W(), [i, t] = k(null), [l, h] = k("");
1113
+ }, Jc = ({ workflow: t, onAction: n }) => {
1114
+ const { t: s } = Q(), [i, a] = C(null), [l, h] = C("");
1107
1115
  return /* @__PURE__ */ c("div", { className: "nice-contract-workflow", children: [
1108
1116
  /* @__PURE__ */ e("h4", { children: s("contractEditor.approvalWorkflow", "Approval Workflow") }),
1109
- /* @__PURE__ */ e("div", { className: "nice-contract-workflow-steps", children: a.steps.map((r, o) => /* @__PURE__ */ c(
1117
+ /* @__PURE__ */ e("div", { className: "nice-contract-workflow-steps", children: t.steps.map((r, o) => /* @__PURE__ */ c(
1110
1118
  "div",
1111
1119
  {
1112
1120
  className: `nice-contract-workflow-step nice-contract-workflow-step--${r.status}`,
@@ -1122,18 +1130,18 @@ const Ce = {
1122
1130
  }
1123
1131
  )
1124
1132
  ] }),
1125
- /* @__PURE__ */ e("div", { className: "nice-contract-workflow-approvers", children: r.approvers.map((w) => /* @__PURE__ */ c("div", { className: "nice-contract-approver", children: [
1126
- w.avatar && /* @__PURE__ */ e("img", { src: w.avatar, alt: "", className: "nice-contract-approver-avatar" }),
1127
- /* @__PURE__ */ e("span", { children: w.name }),
1128
- /* @__PURE__ */ e("span", { className: "nice-contract-approver-role", children: w.role })
1129
- ] }, w.id)) }),
1130
- r.status === "pending" && a.currentStep === o && /* @__PURE__ */ e("div", { className: "nice-contract-workflow-actions", children: i === r.id ? /* @__PURE__ */ c(ae, { children: [
1133
+ /* @__PURE__ */ e("div", { className: "nice-contract-workflow-approvers", children: r.approvers.map((f) => /* @__PURE__ */ c("div", { className: "nice-contract-approver", children: [
1134
+ f.avatar && /* @__PURE__ */ e("img", { src: f.avatar, alt: "", className: "nice-contract-approver-avatar" }),
1135
+ /* @__PURE__ */ e("span", { children: f.name }),
1136
+ /* @__PURE__ */ e("span", { className: "nice-contract-approver-role", children: f.role })
1137
+ ] }, f.id)) }),
1138
+ r.status === "pending" && t.currentStep === o && /* @__PURE__ */ e("div", { className: "nice-contract-workflow-actions", children: i === r.id ? /* @__PURE__ */ c(ie, { children: [
1131
1139
  /* @__PURE__ */ e(
1132
1140
  "textarea",
1133
1141
  {
1134
1142
  placeholder: s("contractEditor.commentsOptional", "Comments (optional)"),
1135
1143
  value: l,
1136
- onChange: (w) => h(w.target.value)
1144
+ onChange: (f) => h(f.target.value)
1137
1145
  }
1138
1146
  ),
1139
1147
  /* @__PURE__ */ c("div", { className: "nice-contract-workflow-btns", children: [
@@ -1143,10 +1151,10 @@ const Ce = {
1143
1151
  type: "button",
1144
1152
  className: "nice-contract-btn nice-contract-btn--approve",
1145
1153
  onClick: () => {
1146
- n(r.id, "approve", l), t(null), h("");
1154
+ n(r.id, "approve", l), a(null), h("");
1147
1155
  },
1148
1156
  children: [
1149
- /* @__PURE__ */ e(se, { size: 14 }),
1157
+ /* @__PURE__ */ e(re, { size: 14 }),
1150
1158
  " ",
1151
1159
  s("contractEditor.approve", "Approve")
1152
1160
  ]
@@ -1158,23 +1166,23 @@ const Ce = {
1158
1166
  type: "button",
1159
1167
  className: "nice-contract-btn nice-contract-btn--reject",
1160
1168
  onClick: () => {
1161
- n(r.id, "reject", l), t(null), h("");
1169
+ n(r.id, "reject", l), a(null), h("");
1162
1170
  },
1163
1171
  children: [
1164
- /* @__PURE__ */ e(he, { size: 14 }),
1172
+ /* @__PURE__ */ e(ge, { size: 14 }),
1165
1173
  " ",
1166
1174
  s("contractEditor.reject", "Reject")
1167
1175
  ]
1168
1176
  }
1169
1177
  ),
1170
- /* @__PURE__ */ e("button", { type: "button", onClick: () => t(null), children: s("contractEditor.cancel", "Cancel") })
1178
+ /* @__PURE__ */ e("button", { type: "button", onClick: () => a(null), children: s("contractEditor.cancel", "Cancel") })
1171
1179
  ] })
1172
1180
  ] }) : /* @__PURE__ */ e(
1173
1181
  "button",
1174
1182
  {
1175
1183
  type: "button",
1176
1184
  className: "nice-contract-btn",
1177
- onClick: () => t(r.id),
1185
+ onClick: () => a(r.id),
1178
1186
  children: s("contractEditor.review", "Review")
1179
1187
  }
1180
1188
  ) })
@@ -1183,152 +1191,152 @@ const Ce = {
1183
1191
  r.id
1184
1192
  )) })
1185
1193
  ] });
1186
- }, sa = /* @__PURE__ */ Object.assign(
1187
- /* @__PURE__ */ le(
1194
+ }, ut = /* @__PURE__ */ Object.assign(
1195
+ /* @__PURE__ */ he(
1188
1196
  ({
1189
- document: a,
1197
+ document: t,
1190
1198
  clauseLibrary: n = [],
1191
1199
  readOnly: s = !1,
1192
1200
  showClauseLibrary: i = !0,
1193
- showVersionHistory: t = !1,
1201
+ showVersionHistory: a = !1,
1194
1202
  showComments: l = !1,
1195
1203
  showWorkflow: h = !0,
1196
1204
  currentUser: r,
1197
1205
  onChange: o,
1198
- onAddClause: w,
1199
- onRemoveClause: _,
1200
- onVariableChange: I,
1201
- onAddComment: C,
1206
+ onAddClause: f,
1207
+ onRemoveClause: D,
1208
+ onVariableChange: O,
1209
+ onAddComment: w,
1202
1210
  onApprovalAction: z,
1203
- onRestoreVersion: F,
1204
- onSave: U,
1205
- onExport: L,
1206
- className: Y = "",
1207
- style: ce,
1208
- tutorial: $
1209
- }, q) => {
1210
- var G;
1211
- const { t: E } = W(), [m, N] = k(a), [g, V] = k(i ? "library" : null), [u, B] = k(
1212
- ((G = m.sections[0]) == null ? void 0 : G.id) || null
1213
- ), P = m.sections.flatMap(
1214
- (v) => v.clauses.flatMap((D) => D.variables || [])
1211
+ onRestoreVersion: M,
1212
+ onSave: K,
1213
+ onExport: E,
1214
+ className: _ = "",
1215
+ style: te,
1216
+ tutorial: j
1217
+ }, G) => {
1218
+ var q;
1219
+ const { t: I } = Q(), [m, b] = C(t), [g, W] = C(i ? "library" : null), [u, B] = C(
1220
+ ((q = m.sections[0]) == null ? void 0 : q.id) || null
1221
+ ), $ = m.sections.flatMap(
1222
+ (v) => v.clauses.flatMap((x) => x.variables || [])
1215
1223
  ).filter(
1216
- (v, D, M) => M.findIndex((K) => K.name === v.name) === D
1217
- ), x = R(
1224
+ (v, x, S) => S.findIndex((ee) => ee.name === v.name) === x
1225
+ ), T = P(
1218
1226
  (v) => {
1219
- const D = { ...m, ...v, updatedAt: /* @__PURE__ */ new Date() };
1220
- N(D), o == null || o(D);
1227
+ const x = { ...m, ...v, updatedAt: /* @__PURE__ */ new Date() };
1228
+ b(x), o == null || o(x);
1221
1229
  },
1222
1230
  [m, o]
1223
- ), H = R(
1224
- (v, D) => {
1225
- const M = m.sections.map(
1226
- (K) => K.id === D ? { ...K, clauses: [...K.clauses, { ...v, id: `${v.id}-${Date.now()}` }] } : K
1231
+ ), X = P(
1232
+ (v, x) => {
1233
+ const S = m.sections.map(
1234
+ (ee) => ee.id === x ? { ...ee, clauses: [...ee.clauses, { ...v, id: `${v.id}-${Date.now()}` }] } : ee
1227
1235
  );
1228
- x({ sections: M }), w == null || w(v, D);
1236
+ T({ sections: S }), f == null || f(v, x);
1229
1237
  },
1230
- [m, x, w]
1231
- ), j = R(
1232
- (v, D) => {
1233
- const M = m.sections.map(
1234
- (K) => K.id === D ? { ...K, clauses: K.clauses.filter((Q) => Q.id !== v) } : K
1238
+ [m, T, f]
1239
+ ), H = P(
1240
+ (v, x) => {
1241
+ const S = m.sections.map(
1242
+ (ee) => ee.id === x ? { ...ee, clauses: ee.clauses.filter((ce) => ce.id !== v) } : ee
1235
1243
  );
1236
- x({ sections: M }), _ == null || _(v, D);
1244
+ T({ sections: S }), D == null || D(v, x);
1237
1245
  },
1238
- [m, x, _]
1239
- ), b = R(
1240
- (v, D, M) => {
1241
- const K = m.sections.map((Q) => {
1242
- if (Q.id !== v)
1243
- return Q;
1244
- const d = Q.clauses.findIndex((ee) => ee.id === D);
1246
+ [m, T, D]
1247
+ ), N = P(
1248
+ (v, x, S) => {
1249
+ const ee = m.sections.map((ce) => {
1250
+ if (ce.id !== v)
1251
+ return ce;
1252
+ const d = ce.clauses.findIndex((se) => se.id === x);
1245
1253
  if (d === -1)
1246
- return Q;
1247
- const p = M === "up" ? d - 1 : d + 1;
1248
- if (p < 0 || p >= Q.clauses.length)
1249
- return Q;
1250
- const y = [...Q.clauses];
1251
- return [y[d], y[p]] = [y[p], y[d]], { ...Q, clauses: y };
1254
+ return ce;
1255
+ const V = S === "up" ? d - 1 : d + 1;
1256
+ if (V < 0 || V >= ce.clauses.length)
1257
+ return ce;
1258
+ const L = [...ce.clauses];
1259
+ return [L[d], L[V]] = [L[V], L[d]], { ...ce, clauses: L };
1252
1260
  });
1253
- x({ sections: K });
1261
+ T({ sections: ee });
1254
1262
  },
1255
- [m, x]
1256
- ), S = R(
1263
+ [m, T]
1264
+ ), k = P(
1257
1265
  (v) => {
1258
- const D = m.sections.map(
1259
- (M) => M.id === v ? { ...M, collapsed: !M.collapsed } : M
1266
+ const x = m.sections.map(
1267
+ (S) => S.id === v ? { ...S, collapsed: !S.collapsed } : S
1260
1268
  );
1261
- x({ sections: D });
1269
+ T({ sections: x });
1262
1270
  },
1263
- [m, x]
1264
- ), A = R(
1265
- (v, D) => {
1266
- x({ variables: { ...m.variables, [v]: D } }), I == null || I(v, D);
1271
+ [m, T]
1272
+ ), A = P(
1273
+ (v, x) => {
1274
+ T({ variables: { ...m.variables, [v]: x } }), O == null || O(v, x);
1267
1275
  },
1268
- [m, x, I]
1269
- ), J = R(() => {
1276
+ [m, T, O]
1277
+ ), Z = P(() => {
1270
1278
  const v = [];
1271
- return P.forEach((D) => {
1272
- D.required && !m.variables[D.name] && v.push(`Missing required variable: ${D.name}`);
1273
- }), m.sections.forEach((D) => {
1274
- D.clauses.forEach((M) => {
1275
- M.isRequired && !M.content && v.push(`Required clause "${M.name}" is empty`);
1279
+ return $.forEach((x) => {
1280
+ x.required && !m.variables[x.name] && v.push(`Missing required variable: ${x.name}`);
1281
+ }), m.sections.forEach((x) => {
1282
+ x.clauses.forEach((S) => {
1283
+ S.isRequired && !S.content && v.push(`Required clause "${S.name}" is empty`);
1276
1284
  });
1277
1285
  }), { valid: v.length === 0, errors: v };
1278
- }, [m, P]);
1279
- re(q, () => ({
1286
+ }, [m, $]);
1287
+ pe(G, () => ({
1280
1288
  getDocument: () => m,
1281
- insertClause: H,
1289
+ insertClause: X,
1282
1290
  setVariable: A,
1283
- exportDocument: (v) => L == null ? void 0 : L(v),
1284
- validate: J
1291
+ exportDocument: (v) => E == null ? void 0 : E(v),
1292
+ validate: Z
1285
1293
  }));
1286
- const f = Pc[m.status], T = /* @__PURE__ */ c("div", { className: "nice-contract-header", children: [
1294
+ const Y = qc[m.status], y = /* @__PURE__ */ c("div", { className: "nice-contract-header", children: [
1287
1295
  /* @__PURE__ */ c("div", { className: "nice-contract-header-info", children: [
1288
1296
  /* @__PURE__ */ e("h2", { className: "nice-contract-title", children: m.title }),
1289
1297
  /* @__PURE__ */ e(
1290
1298
  "span",
1291
1299
  {
1292
1300
  className: "nice-contract-status",
1293
- style: { "--status-color": f.color },
1294
- children: f.label
1301
+ style: { "--status-color": Y.color },
1302
+ children: Y.label
1295
1303
  }
1296
1304
  )
1297
1305
  ] }),
1298
1306
  /* @__PURE__ */ c("div", { className: "nice-contract-header-actions", children: [
1299
- U && !s && /* @__PURE__ */ e(
1307
+ K && !s && /* @__PURE__ */ e(
1300
1308
  "button",
1301
1309
  {
1302
1310
  type: "button",
1303
1311
  className: "nice-contract-btn nice-contract-btn--primary",
1304
- onClick: () => U(m),
1305
- children: E("contractEditor.save", "Save")
1312
+ onClick: () => K(m),
1313
+ children: I("contractEditor.save", "Save")
1306
1314
  }
1307
1315
  ),
1308
- L && /* @__PURE__ */ c("div", { className: "nice-contract-export-dropdown", children: [
1316
+ E && /* @__PURE__ */ c("div", { className: "nice-contract-export-dropdown", children: [
1309
1317
  /* @__PURE__ */ c("button", { type: "button", className: "nice-contract-btn", children: [
1310
- E("contractEditor.export", "Export"),
1318
+ I("contractEditor.export", "Export"),
1311
1319
  " ",
1312
- /* @__PURE__ */ e(Se, { size: 14 })
1320
+ /* @__PURE__ */ e(Le, { size: 14 })
1313
1321
  ] }),
1314
1322
  /* @__PURE__ */ c("div", { className: "nice-contract-export-menu", children: [
1315
- /* @__PURE__ */ e("button", { type: "button", onClick: () => L("pdf"), children: "PDF" }),
1316
- /* @__PURE__ */ e("button", { type: "button", onClick: () => L("docx"), children: "Word (.docx)" }),
1317
- /* @__PURE__ */ e("button", { type: "button", onClick: () => L("html"), children: E("contractEditor.html", "HTML") })
1323
+ /* @__PURE__ */ e("button", { type: "button", onClick: () => E("pdf"), children: "PDF" }),
1324
+ /* @__PURE__ */ e("button", { type: "button", onClick: () => E("docx"), children: "Word (.docx)" }),
1325
+ /* @__PURE__ */ e("button", { type: "button", onClick: () => E("html"), children: I("contractEditor.html", "HTML") })
1318
1326
  ] })
1319
1327
  ] })
1320
1328
  ] })
1321
- ] }), X = /* @__PURE__ */ c("div", { className: "nice-contract-toolbar", children: [
1329
+ ] }), R = /* @__PURE__ */ c("div", { className: "nice-contract-toolbar", children: [
1322
1330
  i && /* @__PURE__ */ c(
1323
1331
  "button",
1324
1332
  {
1325
1333
  type: "button",
1326
1334
  className: `nice-contract-toolbar-btn ${g === "library" ? "nice-contract-toolbar-btn--active" : ""}`,
1327
- onClick: () => V(g === "library" ? null : "library"),
1335
+ onClick: () => W(g === "library" ? null : "library"),
1328
1336
  children: [
1329
- /* @__PURE__ */ e(tc, { size: 16 }),
1337
+ /* @__PURE__ */ e(hc, { size: 16 }),
1330
1338
  " ",
1331
- E("contractEditor.library", "Library")
1339
+ I("contractEditor.library", "Library")
1332
1340
  ]
1333
1341
  }
1334
1342
  ),
@@ -1337,11 +1345,11 @@ const Ce = {
1337
1345
  {
1338
1346
  type: "button",
1339
1347
  className: `nice-contract-toolbar-btn ${g === "variables" ? "nice-contract-toolbar-btn--active" : ""}`,
1340
- onClick: () => V(g === "variables" ? null : "variables"),
1348
+ onClick: () => W(g === "variables" ? null : "variables"),
1341
1349
  children: [
1342
- /* @__PURE__ */ e(Re, { size: 16 }),
1350
+ /* @__PURE__ */ e(Ye, { size: 16 }),
1343
1351
  " ",
1344
- E("contractEditor.variables", "Variables")
1352
+ I("contractEditor.variables", "Variables")
1345
1353
  ]
1346
1354
  }
1347
1355
  ),
@@ -1350,71 +1358,71 @@ const Ce = {
1350
1358
  {
1351
1359
  type: "button",
1352
1360
  className: `nice-contract-toolbar-btn ${g === "workflow" ? "nice-contract-toolbar-btn--active" : ""}`,
1353
- onClick: () => V(g === "workflow" ? null : "workflow"),
1361
+ onClick: () => W(g === "workflow" ? null : "workflow"),
1354
1362
  children: [
1355
- /* @__PURE__ */ e(se, { size: 16 }),
1363
+ /* @__PURE__ */ e(re, { size: 16 }),
1356
1364
  " ",
1357
- E("contractEditor.workflow", "Workflow")
1365
+ I("contractEditor.workflow", "Workflow")
1358
1366
  ]
1359
1367
  }
1360
1368
  ),
1361
- t && /* @__PURE__ */ c(
1369
+ a && /* @__PURE__ */ c(
1362
1370
  "button",
1363
1371
  {
1364
1372
  type: "button",
1365
1373
  className: `nice-contract-toolbar-btn ${g === "history" ? "nice-contract-toolbar-btn--active" : ""}`,
1366
- onClick: () => V(g === "history" ? null : "history"),
1374
+ onClick: () => W(g === "history" ? null : "history"),
1367
1375
  children: [
1368
- /* @__PURE__ */ e(Le, { size: 16 }),
1376
+ /* @__PURE__ */ e(_e, { size: 16 }),
1369
1377
  " ",
1370
- E("contractEditor.history", "History")
1378
+ I("contractEditor.history", "History")
1371
1379
  ]
1372
1380
  }
1373
1381
  )
1374
- ] }), Z = g ? /* @__PURE__ */ c("div", { className: "nice-contract-panel", children: [
1382
+ ] }), J = g ? /* @__PURE__ */ c("div", { className: "nice-contract-panel", children: [
1375
1383
  g === "library" && /* @__PURE__ */ e(
1376
- Rc,
1384
+ Vc,
1377
1385
  {
1378
1386
  clauses: n,
1379
- onInsert: (v) => u && H(v, u)
1387
+ onInsert: (v) => u && X(v, u)
1380
1388
  }
1381
1389
  ),
1382
1390
  g === "variables" && /* @__PURE__ */ e(
1383
- Fc,
1391
+ Bc,
1384
1392
  {
1385
1393
  variables: m.variables,
1386
- definitions: P,
1394
+ definitions: $,
1387
1395
  onChange: A
1388
1396
  }
1389
1397
  ),
1390
1398
  g === "workflow" && m.workflow && /* @__PURE__ */ e(
1391
- Mc,
1399
+ Jc,
1392
1400
  {
1393
1401
  workflow: m.workflow,
1394
- onAction: (v, D, M) => z == null ? void 0 : z(v, D, M)
1402
+ onAction: (v, x, S) => z == null ? void 0 : z(v, x, S)
1395
1403
  }
1396
1404
  )
1397
1405
  ] }) : void 0;
1398
1406
  return /* @__PURE__ */ e(
1399
- fc,
1407
+ Tc,
1400
1408
  {
1401
1409
  flush: !0,
1402
- className: `nice-contract-editor ${Y}`,
1403
- style: ce,
1404
- menubar: T,
1405
- toolbar: X,
1406
- sidebar: Z,
1410
+ className: `nice-contract-editor ${_}`,
1411
+ style: te,
1412
+ menubar: y,
1413
+ toolbar: R,
1414
+ sidebar: J,
1407
1415
  children: /* @__PURE__ */ c("div", { className: "nice-contract-document", children: [
1408
- /* @__PURE__ */ e("span", { style: { position: "absolute", top: 6, right: 6, zIndex: 30 }, children: /* @__PURE__ */ e(yc, { steps: wc($, Oc) }) }),
1416
+ /* @__PURE__ */ e("span", { style: { position: "absolute", top: 6, right: 6, zIndex: 30 }, children: /* @__PURE__ */ e(Ec, { steps: Lc(j, Yc) }) }),
1409
1417
  m.sections.map((v) => /* @__PURE__ */ e(
1410
- $c,
1418
+ Hc,
1411
1419
  {
1412
1420
  section: v,
1413
1421
  variables: m.variables,
1414
1422
  readOnly: s,
1415
- onToggle: () => S(v.id),
1416
- onRemoveClause: (D) => j(D, v.id),
1417
- onMoveClause: (D, M) => b(v.id, D, M)
1423
+ onToggle: () => k(v.id),
1424
+ onRemoveClause: (x) => H(x, v.id),
1425
+ onMoveClause: (x, S) => N(v.id, x, S)
1418
1426
  },
1419
1427
  v.id
1420
1428
  ))
@@ -1424,7 +1432,7 @@ const Ce = {
1424
1432
  }
1425
1433
  ),
1426
1434
  { displayName: "NiceContractEditor" }
1427
- ), jc = [
1435
+ ), Kc = [
1428
1436
  {
1429
1437
  id: "necessary",
1430
1438
  label: "Necessary",
@@ -1464,7 +1472,7 @@ const Ce = {
1464
1472
  cookies: ["social_session"],
1465
1473
  partners: ["Twitter", "YouTube", "Instagram"]
1466
1474
  }
1467
- ], Uc = {
1475
+ ], Gc = {
1468
1476
  title: "Cookie Preferences",
1469
1477
  description: "We use cookies to enhance your experience. Choose which types of cookies you allow.",
1470
1478
  acceptAll: "Accept All",
@@ -1483,8 +1491,8 @@ const Ce = {
1483
1491
  processing: "Processing",
1484
1492
  completed: "Completed",
1485
1493
  close: "Close"
1486
- }, Yc = ({ option: a, enabled: n, onChange: s }) => {
1487
- const { t: i } = W();
1494
+ }, Wc = ({ option: t, enabled: n, onChange: s }) => {
1495
+ const { t: i } = Q();
1488
1496
  return /* @__PURE__ */ c("div", { className: "nice-gdpr-option", children: [
1489
1497
  /* @__PURE__ */ c("div", { className: "nice-gdpr-option-header", children: [
1490
1498
  /* @__PURE__ */ c("label", { className: "nice-gdpr-option-toggle", children: [
@@ -1493,35 +1501,38 @@ const Ce = {
1493
1501
  {
1494
1502
  type: "checkbox",
1495
1503
  checked: n,
1496
- onChange: (t) => s(t.target.checked),
1497
- disabled: a.required
1504
+ onChange: (a) => s(a.target.checked),
1505
+ disabled: t.required
1498
1506
  }
1499
1507
  ),
1500
1508
  /* @__PURE__ */ e("span", { className: "nice-gdpr-toggle-slider" })
1501
1509
  ] }),
1502
1510
  /* @__PURE__ */ c("div", { className: "nice-gdpr-option-info", children: [
1503
1511
  /* @__PURE__ */ c("span", { className: "nice-gdpr-option-label", children: [
1504
- a.label,
1505
- a.required && /* @__PURE__ */ e("span", { className: "nice-gdpr-required", children: i("gdprConsent.required", "Required") })
1512
+ t.label,
1513
+ t.required && /* @__PURE__ */ e("span", { className: "nice-gdpr-required", children: i("gdprConsent.required", "Required") })
1506
1514
  ] }),
1507
- /* @__PURE__ */ e("span", { className: "nice-gdpr-option-desc", children: a.description })
1515
+ /* @__PURE__ */ e("span", { className: "nice-gdpr-option-desc", children: t.description })
1508
1516
  ] })
1509
1517
  ] }),
1510
- a.partners && a.partners.length > 0 && /* @__PURE__ */ c("div", { className: "nice-gdpr-option-partners", children: [
1511
- /* @__PURE__ */ e("span", { children: "Partners: " }),
1512
- a.partners.join(", ")
1518
+ t.partners && t.partners.length > 0 && /* @__PURE__ */ c("div", { className: "nice-gdpr-option-partners", children: [
1519
+ /* @__PURE__ */ c("span", { children: [
1520
+ i("gdprConsent.partners", "Partners:"),
1521
+ " "
1522
+ ] }),
1523
+ t.partners.join(", ")
1513
1524
  ] })
1514
1525
  ] });
1515
- }, qc = ({
1516
- requests: a,
1526
+ }, Xc = ({
1527
+ requests: t,
1517
1528
  policies: n,
1518
1529
  onRequest: s,
1519
1530
  onDownload: i,
1520
- labels: t
1531
+ labels: a
1521
1532
  }) => {
1522
- const { t: l } = W();
1533
+ const { t: l } = Q();
1523
1534
  return /* @__PURE__ */ c("div", { className: "nice-gdpr-rights", children: [
1524
- /* @__PURE__ */ e("h4", { children: t.dataRights }),
1535
+ /* @__PURE__ */ e("h4", { children: a.dataRights }),
1525
1536
  /* @__PURE__ */ c("div", { className: "nice-gdpr-rights-actions", children: [
1526
1537
  /* @__PURE__ */ c(
1527
1538
  "button",
@@ -1530,9 +1541,9 @@ const Ce = {
1530
1541
  className: "nice-gdpr-btn nice-gdpr-btn--secondary",
1531
1542
  onClick: () => s("export"),
1532
1543
  children: [
1533
- /* @__PURE__ */ e(ve, { size: 16 }),
1544
+ /* @__PURE__ */ e(ye, { size: 16 }),
1534
1545
  " ",
1535
- t.exportData
1546
+ a.exportData
1536
1547
  ]
1537
1548
  }
1538
1549
  ),
@@ -1543,16 +1554,16 @@ const Ce = {
1543
1554
  className: "nice-gdpr-btn nice-gdpr-btn--danger",
1544
1555
  onClick: () => s("delete"),
1545
1556
  children: [
1546
- /* @__PURE__ */ e(dc, { size: 16 }),
1557
+ /* @__PURE__ */ e(Nc, { size: 16 }),
1547
1558
  " ",
1548
- t.deleteData
1559
+ a.deleteData
1549
1560
  ]
1550
1561
  }
1551
1562
  )
1552
1563
  ] }),
1553
- a.length > 0 && /* @__PURE__ */ c("div", { className: "nice-gdpr-requests", children: [
1564
+ t.length > 0 && /* @__PURE__ */ c("div", { className: "nice-gdpr-requests", children: [
1554
1565
  /* @__PURE__ */ e("h5", { children: l("gdprConsent.previousRequests", "Previous Requests") }),
1555
- a.map((h) => /* @__PURE__ */ c("div", { className: `nice-gdpr-request nice-gdpr-request--${h.status}`, children: [
1566
+ t.map((h) => /* @__PURE__ */ c("div", { className: `nice-gdpr-request nice-gdpr-request--${h.status}`, children: [
1556
1567
  /* @__PURE__ */ e("span", { className: "nice-gdpr-request-type", children: h.type }),
1557
1568
  /* @__PURE__ */ e("span", { className: "nice-gdpr-request-date", children: new Date(h.requestedAt).toLocaleDateString() }),
1558
1569
  /* @__PURE__ */ e("span", { className: "nice-gdpr-request-status", children: h.status }),
@@ -1577,88 +1588,88 @@ const Ce = {
1577
1588
  ] }) }),
1578
1589
  /* @__PURE__ */ e("tbody", { children: n.map((h, r) => /* @__PURE__ */ c("tr", { children: [
1579
1590
  /* @__PURE__ */ e("td", { children: h.category }),
1580
- /* @__PURE__ */ c("td", { children: [
1581
- h.retentionDays,
1582
- " days"
1583
- ] }),
1591
+ /* @__PURE__ */ e("td", { children: l("gdprConsent.days", "{retentionDays} days").replace(
1592
+ "{retentionDays}",
1593
+ String(h.retentionDays)
1594
+ ) }),
1584
1595
  /* @__PURE__ */ e("td", { children: h.legalBasis })
1585
1596
  ] }, r)) })
1586
1597
  ] })
1587
1598
  ] })
1588
1599
  ] });
1589
- }, na = /* @__PURE__ */ Object.assign(
1590
- /* @__PURE__ */ le(
1600
+ }, mt = /* @__PURE__ */ Object.assign(
1601
+ /* @__PURE__ */ he(
1591
1602
  ({
1592
- appName: a,
1603
+ appName: t,
1593
1604
  companyName: n,
1594
- options: s = jc,
1605
+ options: s = Kc,
1595
1606
  currentConsent: i = null,
1596
- retentionPolicies: t = [],
1607
+ retentionPolicies: a = [],
1597
1608
  dataRequests: l = [],
1598
1609
  privacyPolicy: h = [],
1599
1610
  storageKey: r = "nice_gdpr_consent",
1600
1611
  consentVersion: o = "1.0",
1601
- variant: w = "banner",
1602
- position: _ = "bottom",
1603
- onConsentChange: I,
1604
- onDataRequest: C,
1612
+ variant: f = "banner",
1613
+ position: D = "bottom",
1614
+ onConsentChange: O,
1615
+ onDataRequest: w,
1605
1616
  onDownloadExport: z,
1606
- privacyPolicyUrl: F,
1607
- cookiePolicyUrl: U,
1608
- termsUrl: L,
1609
- labels: Y,
1610
- className: ce = "",
1611
- style: $
1612
- }, q) => {
1613
- const { t: E } = W(), m = { ...Uc, ...Y }, [N, g] = k(!1), [V, u] = k(!1), [B, O] = k(!1), [P, x] = k(() => {
1614
- const f = {};
1615
- return s.forEach((T) => {
1616
- f[T.id] = (i == null ? void 0 : i.categories[T.id]) ?? T.enabled;
1617
- }), f;
1617
+ privacyPolicyUrl: M,
1618
+ cookiePolicyUrl: K,
1619
+ termsUrl: E,
1620
+ labels: _,
1621
+ className: te = "",
1622
+ style: j
1623
+ }, G) => {
1624
+ const { t: I } = Q(), m = { ...Gc, ..._ }, [b, g] = C(!1), [W, u] = C(!1), [B, F] = C(!1), [$, T] = C(() => {
1625
+ const y = {};
1626
+ return s.forEach((R) => {
1627
+ y[R.id] = (i == null ? void 0 : i.categories[R.id]) ?? R.enabled;
1628
+ }), y;
1618
1629
  });
1619
- me(() => {
1630
+ Ne(() => {
1620
1631
  (!i || i.version !== o) && g(!0);
1621
1632
  }, [i, o]);
1622
- const H = R(
1623
- (f, T) => {
1624
- const X = T || P;
1625
- X.necessary = !0;
1626
- const Z = {
1633
+ const X = P(
1634
+ (y, R) => {
1635
+ const J = R || $;
1636
+ J.necessary = !0;
1637
+ const q = {
1627
1638
  version: o,
1628
1639
  timestamp: /* @__PURE__ */ new Date(),
1629
- categories: X,
1630
- action: f
1640
+ categories: J,
1641
+ action: y
1631
1642
  };
1632
1643
  try {
1633
- localStorage.setItem(r, JSON.stringify(Z));
1644
+ localStorage.setItem(r, JSON.stringify(q));
1634
1645
  } catch {
1635
1646
  }
1636
- x(X), g(!1), u(!1), I == null || I(Z);
1647
+ T(J), g(!1), u(!1), O == null || O(q);
1637
1648
  },
1638
- [P, o, r, I]
1639
- ), j = R(() => {
1640
- const f = {};
1641
- s.forEach((T) => {
1642
- f[T.id] = !0;
1643
- }), H("accept_all", f);
1644
- }, [s, H]), b = R(() => {
1645
- const f = {};
1646
- s.forEach((T) => {
1647
- f[T.id] = T.required || !1;
1648
- }), H("reject_all", f);
1649
- }, [s, H]), S = R(
1650
- async (f) => {
1651
- C && await C(f);
1649
+ [$, o, r, O]
1650
+ ), H = P(() => {
1651
+ const y = {};
1652
+ s.forEach((R) => {
1653
+ y[R.id] = !0;
1654
+ }), X("accept_all", y);
1655
+ }, [s, X]), N = P(() => {
1656
+ const y = {};
1657
+ s.forEach((R) => {
1658
+ y[R.id] = R.required || !1;
1659
+ }), X("reject_all", y);
1660
+ }, [s, X]), k = P(
1661
+ async (y) => {
1662
+ w && await w(y);
1652
1663
  },
1653
- [C]
1664
+ [w]
1654
1665
  );
1655
- if (re(q, () => ({
1666
+ pe(G, () => ({
1656
1667
  showBanner: () => g(!0),
1657
1668
  hideBanner: () => g(!1),
1658
1669
  getConsent: () => {
1659
1670
  try {
1660
- const f = localStorage.getItem(r);
1661
- return f ? JSON.parse(f) : null;
1671
+ const y = localStorage.getItem(r);
1672
+ return y ? JSON.parse(y) : null;
1662
1673
  } catch {
1663
1674
  return null;
1664
1675
  }
@@ -1673,23 +1684,25 @@ const Ce = {
1673
1684
  openPreferences: () => {
1674
1685
  g(!0), u(!0);
1675
1686
  }
1676
- })), !N && w !== "embedded")
1687
+ }));
1688
+ const A = oe(null);
1689
+ if (Qe(A, { open: b && f === "modal" }), !b && f !== "embedded")
1677
1690
  return null;
1678
- const A = /* @__PURE__ */ c("div", { className: "nice-gdpr-content", children: [
1691
+ const Z = /* @__PURE__ */ c("div", { className: "nice-gdpr-content", children: [
1679
1692
  /* @__PURE__ */ c("div", { className: "nice-gdpr-header", children: [
1680
- /* @__PURE__ */ e("div", { className: "nice-gdpr-icon", children: /* @__PURE__ */ e(rc, { size: 32 }) }),
1693
+ /* @__PURE__ */ e("div", { className: "nice-gdpr-icon", children: /* @__PURE__ */ e(bc, { size: 32 }) }),
1681
1694
  /* @__PURE__ */ c("div", { className: "nice-gdpr-header-text", children: [
1682
1695
  /* @__PURE__ */ e("h3", { children: m.title }),
1683
- /* @__PURE__ */ e("p", { children: m.description.replace("{app}", a).replace("{company}", n) })
1696
+ /* @__PURE__ */ e("p", { children: m.description.replace("{app}", t).replace("{company}", n) })
1684
1697
  ] })
1685
1698
  ] }),
1686
- !V && !B && /* @__PURE__ */ c("div", { className: "nice-gdpr-quick-actions", children: [
1699
+ !W && !B && /* @__PURE__ */ c("div", { className: "nice-gdpr-quick-actions", children: [
1687
1700
  /* @__PURE__ */ e(
1688
1701
  "button",
1689
1702
  {
1690
1703
  type: "button",
1691
1704
  className: "nice-gdpr-btn nice-gdpr-btn--primary",
1692
- onClick: j,
1705
+ onClick: H,
1693
1706
  children: m.acceptAll
1694
1707
  }
1695
1708
  ),
@@ -1698,7 +1711,7 @@ const Ce = {
1698
1711
  {
1699
1712
  type: "button",
1700
1713
  className: "nice-gdpr-btn nice-gdpr-btn--secondary",
1701
- onClick: b,
1714
+ onClick: N,
1702
1715
  children: m.rejectAll
1703
1716
  }
1704
1717
  ),
@@ -1712,15 +1725,15 @@ const Ce = {
1712
1725
  }
1713
1726
  )
1714
1727
  ] }),
1715
- V && !B && /* @__PURE__ */ c("div", { className: "nice-gdpr-preferences", children: [
1716
- /* @__PURE__ */ e("div", { className: "nice-gdpr-options", children: s.map((f) => /* @__PURE__ */ e(
1717
- Yc,
1728
+ W && !B && /* @__PURE__ */ c("div", { className: "nice-gdpr-preferences", children: [
1729
+ /* @__PURE__ */ e("div", { className: "nice-gdpr-options", children: s.map((y) => /* @__PURE__ */ e(
1730
+ Wc,
1718
1731
  {
1719
- option: f,
1720
- enabled: P[f.id],
1721
- onChange: (T) => x((X) => ({ ...X, [f.id]: T }))
1732
+ option: y,
1733
+ enabled: $[y.id],
1734
+ onChange: (R) => T((J) => ({ ...J, [y.id]: R }))
1722
1735
  },
1723
- f.id
1736
+ y.id
1724
1737
  )) }),
1725
1738
  /* @__PURE__ */ c("div", { className: "nice-gdpr-pref-actions", children: [
1726
1739
  /* @__PURE__ */ e(
@@ -1728,7 +1741,7 @@ const Ce = {
1728
1741
  {
1729
1742
  type: "button",
1730
1743
  className: "nice-gdpr-btn nice-gdpr-btn--primary",
1731
- onClick: () => H("custom"),
1744
+ onClick: () => X("custom"),
1732
1745
  children: m.savePreferences
1733
1746
  }
1734
1747
  ),
@@ -1737,20 +1750,20 @@ const Ce = {
1737
1750
  {
1738
1751
  type: "button",
1739
1752
  className: "nice-gdpr-btn nice-gdpr-btn--link",
1740
- onClick: () => O(!0),
1753
+ onClick: () => F(!0),
1741
1754
  children: m.dataRights
1742
1755
  }
1743
1756
  )
1744
1757
  ] })
1745
1758
  ] }),
1746
- B && /* @__PURE__ */ c(ae, { children: [
1759
+ B && /* @__PURE__ */ c(ie, { children: [
1747
1760
  /* @__PURE__ */ e(
1748
- qc,
1761
+ Xc,
1749
1762
  {
1750
1763
  requests: l,
1751
- policies: t,
1752
- onRequest: S,
1753
- onDownload: (f) => z == null ? void 0 : z(f),
1764
+ policies: a,
1765
+ onRequest: k,
1766
+ onDownload: (y) => z == null ? void 0 : z(y),
1754
1767
  labels: m
1755
1768
  }
1756
1769
  ),
@@ -1759,45 +1772,59 @@ const Ce = {
1759
1772
  {
1760
1773
  type: "button",
1761
1774
  className: "nice-gdpr-btn nice-gdpr-btn--link",
1762
- onClick: () => O(!1),
1775
+ onClick: () => F(!1),
1763
1776
  children: [
1764
- /* @__PURE__ */ e(oc, { size: 14 }),
1777
+ /* @__PURE__ */ e(vc, { size: 14 }),
1765
1778
  " ",
1766
- E("gdprConsent.backToPreferences", "Back to preferences")
1779
+ I("gdprConsent.backToPreferences", "Back to preferences")
1767
1780
  ]
1768
1781
  }
1769
1782
  )
1770
1783
  ] }),
1771
1784
  /* @__PURE__ */ c("div", { className: "nice-gdpr-footer", children: [
1772
- F && /* @__PURE__ */ e("a", { href: F, target: "_blank", rel: "noopener noreferrer", children: E("gdprConsent.privacyPolicy", "Privacy Policy") }),
1773
- U && /* @__PURE__ */ e("a", { href: U, target: "_blank", rel: "noopener noreferrer", children: E("gdprConsent.cookiePolicy", "Cookie Policy") }),
1774
- L && /* @__PURE__ */ e("a", { href: L, target: "_blank", rel: "noopener noreferrer", children: E("gdprConsent.termsOfService", "Terms of Service") })
1785
+ M && /* @__PURE__ */ e("a", { href: M, target: "_blank", rel: "noopener noreferrer", children: I("gdprConsent.privacyPolicy", "Privacy Policy") }),
1786
+ K && /* @__PURE__ */ e("a", { href: K, target: "_blank", rel: "noopener noreferrer", children: I("gdprConsent.cookiePolicy", "Cookie Policy") }),
1787
+ E && /* @__PURE__ */ e("a", { href: E, target: "_blank", rel: "noopener noreferrer", children: I("gdprConsent.termsOfService", "Terms of Service") })
1775
1788
  ] })
1776
- ] }), J = `nice-gdpr-consent nice-gdpr-consent--${w} nice-gdpr-consent--${_} ${ce}`;
1777
- return w === "modal" ? /* @__PURE__ */ e("div", { className: "nice-gdpr-overlay", children: /* @__PURE__ */ e("div", { className: J, style: $, role: "dialog", "aria-modal": "true", children: A }) }) : /* @__PURE__ */ e("div", { className: J, style: $, children: A });
1789
+ ] }), Y = `nice-gdpr-consent nice-gdpr-consent--${f} nice-gdpr-consent--${D} ${te}`;
1790
+ return f === "modal" ? /* @__PURE__ */ e("div", { className: "nice-gdpr-overlay", children: /* @__PURE__ */ e(
1791
+ "div",
1792
+ {
1793
+ ref: A,
1794
+ className: Y,
1795
+ style: j,
1796
+ role: "dialog",
1797
+ "aria-modal": "true",
1798
+ "aria-label": m.title,
1799
+ children: Z
1800
+ }
1801
+ ) }) : /* @__PURE__ */ e("div", { className: Y, style: j, children: Z });
1778
1802
  }
1779
1803
  ),
1780
1804
  { displayName: "NiceGDPRConsent" }
1781
- ), Vc = [], Je = {
1782
- document: /* @__PURE__ */ e(xe, { size: 16 }),
1783
- user: /* @__PURE__ */ e(Be, { size: 16 }),
1784
- task: /* @__PURE__ */ e(se, { size: 16 }),
1785
- project: /* @__PURE__ */ e(hc, { size: 16 }),
1786
- setting: /* @__PURE__ */ e($e, { size: 16 }),
1787
- help: /* @__PURE__ */ e(Ve, { size: 16 }),
1788
- action: /* @__PURE__ */ e(qe, { size: 16 }),
1789
- custom: /* @__PURE__ */ e(De, { size: 16 })
1790
- }, Bc = ({
1791
- value: a,
1805
+ ), Zc = [], cc = {
1806
+ document: /* @__PURE__ */ e(Ee, { size: 16 }),
1807
+ user: /* @__PURE__ */ e(Xe, { size: 16 }),
1808
+ task: /* @__PURE__ */ e(re, { size: 16 }),
1809
+ project: /* @__PURE__ */ e(fc, { size: 16 }),
1810
+ setting: /* @__PURE__ */ e(Ve, { size: 16 }),
1811
+ help: /* @__PURE__ */ e(We, { size: 16 }),
1812
+ action: /* @__PURE__ */ e(Ge, { size: 16 }),
1813
+ custom: /* @__PURE__ */ e(ze, { size: 16 })
1814
+ }, Qc = ({
1815
+ value: t,
1792
1816
  onChange: n,
1793
1817
  onKeyDown: s,
1794
1818
  placeholder: i,
1795
- isLoading: t,
1796
- inputRef: l
1819
+ isLoading: a,
1820
+ inputRef: l,
1821
+ listboxId: h,
1822
+ activeId: r,
1823
+ expanded: o
1797
1824
  }) => {
1798
- const { t: h } = W();
1825
+ const { t: f } = Q();
1799
1826
  return /* @__PURE__ */ c("div", { className: "nice-search-input-container", children: [
1800
- /* @__PURE__ */ e("span", { className: "nice-search-icon", children: /* @__PURE__ */ e(ge, { size: 16 }) }),
1827
+ /* @__PURE__ */ e("span", { className: "nice-search-icon", children: /* @__PURE__ */ e(fe, { size: 16 }) }),
1801
1828
  /* @__PURE__ */ e(
1802
1829
  "input",
1803
1830
  {
@@ -1805,106 +1832,127 @@ const Ce = {
1805
1832
  type: "text",
1806
1833
  className: "nice-search-input",
1807
1834
  placeholder: i,
1808
- value: a,
1809
- onChange: (r) => n(r.target.value),
1835
+ value: t,
1836
+ onChange: (D) => n(D.target.value),
1810
1837
  onKeyDown: s,
1811
- "aria-label": h("globalSearch.search", "Search")
1838
+ "aria-label": f("globalSearch.search", "Search"),
1839
+ role: "combobox",
1840
+ "aria-autocomplete": "list",
1841
+ "aria-expanded": o,
1842
+ "aria-controls": h,
1843
+ "aria-activedescendant": r
1812
1844
  }
1813
1845
  ),
1814
- t && /* @__PURE__ */ e("span", { className: "nice-search-loader" }),
1815
- a && !t && /* @__PURE__ */ e(
1846
+ a && /* @__PURE__ */ e("span", { className: "nice-search-loader" }),
1847
+ t && !a && /* @__PURE__ */ e(
1816
1848
  "button",
1817
1849
  {
1818
1850
  type: "button",
1819
1851
  className: "nice-search-clear",
1820
1852
  onClick: () => n(""),
1821
- "aria-label": h("globalSearch.clearSearch", "Clear search"),
1822
- children: /* @__PURE__ */ e(be, { size: 16 })
1853
+ "aria-label": f("globalSearch.clearSearch", "Clear search"),
1854
+ children: /* @__PURE__ */ e(we, { size: 16 })
1823
1855
  }
1824
1856
  )
1825
1857
  ] });
1826
- }, Hc = ({ result: a, isSelected: n, onSelect: s, renderResult: i }) => i ? /* @__PURE__ */ e("div", { onClick: s, children: i(a, n) }) : /* @__PURE__ */ c(
1827
- "div",
1828
- {
1829
- className: `nice-search-result ${n ? "nice-search-result--selected" : ""}`,
1830
- onClick: s,
1831
- role: "option",
1832
- "aria-selected": n,
1833
- children: [
1834
- /* @__PURE__ */ e("div", { className: "nice-search-result-icon", children: a.icon || (a.image ? /* @__PURE__ */ e("img", { src: a.image, alt: "" }) : Je[a.type]) }),
1835
- /* @__PURE__ */ c("div", { className: "nice-search-result-content", children: [
1836
- /* @__PURE__ */ e("span", { className: "nice-search-result-title", children: a.title }),
1837
- a.subtitle && /* @__PURE__ */ e("span", { className: "nice-search-result-subtitle", children: a.subtitle }),
1838
- a.description && /* @__PURE__ */ e("span", { className: "nice-search-result-desc", children: a.description })
1839
- ] }),
1840
- /* @__PURE__ */ c("div", { className: "nice-search-result-meta", children: [
1841
- /* @__PURE__ */ e("span", { className: "nice-search-result-source", children: a.source }),
1842
- /* @__PURE__ */ e("span", { className: "nice-search-result-type", children: a.type })
1843
- ] }),
1844
- a.actions && a.actions.length > 0 && /* @__PURE__ */ e("div", { className: "nice-search-result-actions", children: a.actions.map((t) => /* @__PURE__ */ e(
1845
- "button",
1846
- {
1847
- type: "button",
1848
- className: "nice-search-action-btn",
1849
- onClick: (l) => {
1850
- l.stopPropagation(), t.onClick();
1851
- },
1852
- title: t.label,
1853
- children: t.icon || t.label
1854
- },
1855
- t.id
1856
- )) })
1857
- ]
1858
- }
1859
- ), Jc = ({ categories: a, selected: n, onSelect: s }) => /* @__PURE__ */ c("div", { className: "nice-search-categories", children: [
1860
- /* @__PURE__ */ e(
1861
- "button",
1862
- {
1863
- type: "button",
1864
- className: `nice-search-category ${n === null ? "nice-search-category--active" : ""}`,
1865
- onClick: () => s(null),
1866
- children: "All"
1867
- }
1868
- ),
1869
- a.map((i) => /* @__PURE__ */ c(
1870
- "button",
1858
+ }, et = ({
1859
+ result: t,
1860
+ isSelected: n,
1861
+ onSelect: s,
1862
+ renderResult: i,
1863
+ id: a
1864
+ }) => i ? (
1865
+ // eslint-disable-next-line jsx-a11y/click-events-have-key-events -- keys: the search field (aria-activedescendant)
1866
+ /* @__PURE__ */ e("div", { id: a, role: "option", "aria-selected": n, onClick: s, children: i(t, n) })
1867
+ ) : (
1868
+ // eslint-disable-next-line jsx-a11y/click-events-have-key-events -- keys: the search field (aria-activedescendant)
1869
+ /* @__PURE__ */ c(
1870
+ "div",
1871
1871
  {
1872
- type: "button",
1873
- className: `nice-search-category ${n === i.id ? "nice-search-category--active" : ""}`,
1874
- onClick: () => s(i.id),
1872
+ id: a,
1873
+ className: `nice-search-result ${n ? "nice-search-result--selected" : ""}`,
1874
+ onClick: s,
1875
+ role: "option",
1876
+ "aria-selected": n,
1875
1877
  children: [
1876
- i.icon && /* @__PURE__ */ e("span", { className: "nice-search-category-icon", children: i.icon }),
1877
- i.label,
1878
- i.count !== void 0 && /* @__PURE__ */ e("span", { className: "nice-search-category-count", children: i.count })
1878
+ /* @__PURE__ */ e("div", { className: "nice-search-result-icon", children: t.icon || (t.image ? /* @__PURE__ */ e("img", { src: t.image, alt: "" }) : cc[t.type]) }),
1879
+ /* @__PURE__ */ c("div", { className: "nice-search-result-content", children: [
1880
+ /* @__PURE__ */ e("span", { className: "nice-search-result-title", children: t.title }),
1881
+ t.subtitle && /* @__PURE__ */ e("span", { className: "nice-search-result-subtitle", children: t.subtitle }),
1882
+ t.description && /* @__PURE__ */ e("span", { className: "nice-search-result-desc", children: t.description })
1883
+ ] }),
1884
+ /* @__PURE__ */ c("div", { className: "nice-search-result-meta", children: [
1885
+ /* @__PURE__ */ e("span", { className: "nice-search-result-source", children: t.source }),
1886
+ /* @__PURE__ */ e("span", { className: "nice-search-result-type", children: t.type })
1887
+ ] }),
1888
+ t.actions && t.actions.length > 0 && /* @__PURE__ */ e("div", { className: "nice-search-result-actions", children: t.actions.map((l) => /* @__PURE__ */ e(
1889
+ "button",
1890
+ {
1891
+ type: "button",
1892
+ className: "nice-search-action-btn",
1893
+ onClick: (h) => {
1894
+ h.stopPropagation(), l.onClick();
1895
+ },
1896
+ title: l.label,
1897
+ children: l.icon || l.label
1898
+ },
1899
+ l.id
1900
+ )) })
1879
1901
  ]
1880
- },
1881
- i.id
1882
- ))
1883
- ] }), Gc = ({
1884
- searches: a,
1902
+ }
1903
+ )
1904
+ ), ct = ({ categories: t, selected: n, onSelect: s }) => {
1905
+ const { t: i } = Q();
1906
+ return /* @__PURE__ */ c("div", { className: "nice-search-categories", children: [
1907
+ /* @__PURE__ */ e(
1908
+ "button",
1909
+ {
1910
+ type: "button",
1911
+ className: `nice-search-category ${n === null ? "nice-search-category--active" : ""}`,
1912
+ onClick: () => s(null),
1913
+ children: i("globalSearch.all", "All")
1914
+ }
1915
+ ),
1916
+ t.map((a) => /* @__PURE__ */ c(
1917
+ "button",
1918
+ {
1919
+ type: "button",
1920
+ className: `nice-search-category ${n === a.id ? "nice-search-category--active" : ""}`,
1921
+ onClick: () => s(a.id),
1922
+ children: [
1923
+ a.icon && /* @__PURE__ */ e("span", { className: "nice-search-category-icon", children: a.icon }),
1924
+ a.label,
1925
+ a.count !== void 0 && /* @__PURE__ */ e("span", { className: "nice-search-category-count", children: a.count })
1926
+ ]
1927
+ },
1928
+ a.id
1929
+ ))
1930
+ ] });
1931
+ }, tt = ({
1932
+ searches: t,
1885
1933
  onSelect: n,
1886
1934
  onClear: s,
1887
1935
  label: i,
1888
- clearLabel: t
1936
+ clearLabel: a
1889
1937
  }) => /* @__PURE__ */ c("div", { className: "nice-search-recent", children: [
1890
1938
  /* @__PURE__ */ c("div", { className: "nice-search-recent-header", children: [
1891
1939
  /* @__PURE__ */ e("span", { children: i }),
1892
- /* @__PURE__ */ e("button", { type: "button", onClick: s, children: t })
1940
+ /* @__PURE__ */ e("button", { type: "button", onClick: s, children: a })
1893
1941
  ] }),
1894
- /* @__PURE__ */ e("div", { className: "nice-search-recent-list", children: a.map((l, h) => /* @__PURE__ */ c(
1942
+ /* @__PURE__ */ e("div", { className: "nice-search-recent-list", children: t.map((l, h) => /* @__PURE__ */ c(
1895
1943
  "button",
1896
1944
  {
1897
1945
  type: "button",
1898
1946
  className: "nice-search-recent-item",
1899
1947
  onClick: () => n(l.query),
1900
1948
  children: [
1901
- /* @__PURE__ */ e("span", { className: "nice-search-recent-icon", children: /* @__PURE__ */ e(Le, { size: 14 }) }),
1949
+ /* @__PURE__ */ e("span", { className: "nice-search-recent-icon", children: /* @__PURE__ */ e(_e, { size: 14 }) }),
1902
1950
  /* @__PURE__ */ e("span", { className: "nice-search-recent-query", children: l.query })
1903
1951
  ]
1904
1952
  },
1905
1953
  h
1906
1954
  )) })
1907
- ] }), Kc = {
1955
+ ] }), at = {
1908
1956
  placeholder: "Search...",
1909
1957
  recent: "Recent Searches",
1910
1958
  noResults: "No results found for",
@@ -1912,254 +1960,293 @@ const Ce = {
1912
1960
  clearRecent: "Clear",
1913
1961
  categories: "Categories",
1914
1962
  filters: "Filters"
1915
- }, la = /* @__PURE__ */ Object.assign(
1916
- /* @__PURE__ */ le(
1963
+ }, gt = /* @__PURE__ */ Object.assign(
1964
+ /* @__PURE__ */ he(
1917
1965
  ({
1918
- sources: a = Vc,
1966
+ sources: t = Zc,
1919
1967
  placeholder: n,
1920
1968
  minQueryLength: s = 2,
1921
1969
  debounceMs: i = 300,
1922
- showCategories: t = !0,
1970
+ showCategories: a = !0,
1923
1971
  filters: l = [],
1924
1972
  showRecent: h = !0,
1925
1973
  maxRecent: r = 5,
1926
1974
  showShortcuts: o = !0,
1927
- hotkey: w = "k",
1928
- onResultSelect: _,
1929
- onSearch: I,
1930
- onClose: C,
1975
+ hotkey: f = "k",
1976
+ onResultSelect: D,
1977
+ onSearch: O,
1978
+ onClose: w,
1931
1979
  renderResult: z,
1932
- renderEmpty: F,
1933
- defaultOpen: U = !1,
1934
- open: L,
1935
- variant: Y = "modal",
1936
- labels: ce,
1937
- className: $ = "",
1938
- style: q
1939
- }, E) => {
1940
- const { t: m } = W(), N = { ...Kc, ...ce }, g = ke(null), V = ke(void 0), [u, B] = k(U), [O, P] = k(""), [x, H] = k([]), [j, b] = k(!1), [S, A] = k(0), [J, f] = k(null), [T, X] = k([]), Z = L !== void 0 ? L : u;
1941
- me(() => {
1980
+ renderEmpty: M,
1981
+ defaultOpen: K = !1,
1982
+ open: E,
1983
+ variant: _ = "modal",
1984
+ labels: te,
1985
+ className: j = "",
1986
+ style: G
1987
+ }, I) => {
1988
+ const { t: m } = Q(), b = { ...at, ...te }, g = oe(null), W = oe(void 0), [u, B] = C(K), [F, $] = C(""), [T, X] = C([]), [H, N] = C(!1), [k, A] = C(0), [Z, Y] = C(null), [y, R] = C([]), J = E !== void 0 ? E : u;
1989
+ Ne(() => {
1942
1990
  try {
1943
1991
  const p = localStorage.getItem("nice_recent_searches");
1944
- p && X(JSON.parse(p));
1992
+ p && R(JSON.parse(p));
1945
1993
  } catch {
1946
1994
  }
1947
1995
  }, []);
1948
- const G = R(
1949
- (p, y) => {
1950
- const te = [
1996
+ const q = P(
1997
+ (p, U) => {
1998
+ const ne = [
1951
1999
  {
1952
2000
  query: p,
1953
2001
  timestamp: /* @__PURE__ */ new Date(),
1954
- resultCount: y
2002
+ resultCount: U
1955
2003
  },
1956
- ...T.filter((pe) => pe.query !== p)
2004
+ ...y.filter((be) => be.query !== p)
1957
2005
  ].slice(0, r);
1958
- X(te);
2006
+ R(ne);
1959
2007
  try {
1960
- localStorage.setItem("nice_recent_searches", JSON.stringify(te));
2008
+ localStorage.setItem("nice_recent_searches", JSON.stringify(ne));
1961
2009
  } catch {
1962
2010
  }
1963
2011
  },
1964
- [T, r]
1965
- ), v = R(
2012
+ [y, r]
2013
+ ), v = P(
1966
2014
  async (p) => {
1967
2015
  if (p.length < s) {
1968
- H([]);
2016
+ X([]);
1969
2017
  return;
1970
2018
  }
1971
- b(!0);
2019
+ N(!0);
1972
2020
  try {
1973
- const y = a.map(async (te) => {
2021
+ const U = t.map(async (ne) => {
1974
2022
  try {
1975
- return (await te.search(p)).map((ze) => ({
1976
- ...ze,
1977
- source: te.name,
1978
- relevanceScore: ze.relevanceScore * (te.priority || 1)
2023
+ return (await ne.search(p)).map((Fe) => ({
2024
+ ...Fe,
2025
+ source: ne.name,
2026
+ relevanceScore: Fe.relevanceScore * (ne.priority || 1)
1979
2027
  }));
1980
2028
  } catch {
1981
2029
  return [];
1982
2030
  }
1983
- }), ee = (await Promise.all(y)).flat();
1984
- ee.sort((te, pe) => pe.relevanceScore - te.relevanceScore), H(ee), A(0), I == null || I(p, ee), ee.length > 0 && G(p, ee.length);
2031
+ }), ae = (await Promise.all(U)).flat();
2032
+ ae.sort((ne, be) => be.relevanceScore - ne.relevanceScore), X(ae), A(0), O == null || O(p, ae), ae.length > 0 && q(p, ae.length);
1985
2033
  } finally {
1986
- b(!1);
2034
+ N(!1);
1987
2035
  }
1988
2036
  },
1989
- [a, s, I, G]
1990
- ), D = R(
2037
+ [t, s, O, q]
2038
+ ), x = P(
1991
2039
  (p) => {
1992
- P(p), V.current && clearTimeout(V.current), V.current = setTimeout(() => {
2040
+ $(p), W.current && clearTimeout(W.current), W.current = setTimeout(() => {
1993
2041
  v(p);
1994
2042
  }, i);
1995
2043
  },
1996
2044
  [v, i]
1997
- ), M = R(
2045
+ ), S = Z ? T.filter((p) => p.type === Z) : T, ee = P(
1998
2046
  (p) => {
1999
2047
  switch (p.key) {
2000
2048
  case "ArrowDown":
2001
- p.preventDefault(), A((y) => Math.min(y + 1, x.length - 1));
2049
+ p.preventDefault(), A((U) => Math.min(U + 1, S.length - 1));
2002
2050
  break;
2003
2051
  case "ArrowUp":
2004
- p.preventDefault(), A((y) => Math.max(y - 1, 0));
2052
+ p.preventDefault(), A((U) => Math.max(U - 1, 0));
2053
+ break;
2054
+ case "PageDown":
2055
+ case "PageUp": {
2056
+ p.preventDefault();
2057
+ const U = p.key === "PageDown" ? 10 : -10;
2058
+ A(
2059
+ (ae) => Math.max(0, Math.min(S.length - 1, ae + U))
2060
+ );
2005
2061
  break;
2062
+ }
2006
2063
  case "Enter":
2007
- p.preventDefault(), x[S] && (_ == null || _(x[S]), B(!1), C == null || C());
2064
+ p.preventDefault(), S[k] && (D == null || D(S[k]), B(!1), w == null || w());
2008
2065
  break;
2009
2066
  case "Escape":
2010
- p.preventDefault(), B(!1), C == null || C();
2067
+ if (_ === "modal")
2068
+ break;
2069
+ p.preventDefault(), B(!1), w == null || w();
2011
2070
  break;
2012
2071
  }
2013
2072
  },
2014
- [x, S, _, C]
2015
- );
2016
- me(() => {
2017
- const p = (y) => {
2018
- (y.metaKey || y.ctrlKey) && y.key === w && (y.preventDefault(), B(!0), setTimeout(() => {
2019
- var ee;
2020
- return (ee = g.current) == null ? void 0 : ee.focus();
2073
+ [S, k, D, w, _]
2074
+ ), ce = oe(null), d = oe(null), L = `${ec()}-results`, se = P(() => {
2075
+ B(!1), w == null || w();
2076
+ }, [w]);
2077
+ Qe(ce, {
2078
+ open: J && _ === "modal",
2079
+ initialFocus: g,
2080
+ onClose: se
2081
+ }), zc(
2082
+ ["navigate", "activate"],
2083
+ (p) => {
2084
+ if (p.source === "keyboard" || S.length === 0)
2085
+ return !1;
2086
+ if (p.intent === "activate") {
2087
+ const U = S[k];
2088
+ U && (D == null || D(U), se());
2089
+ } else if (p.direction === "down" || p.direction === "up") {
2090
+ const U = p.direction === "down" ? 1 : -1;
2091
+ A(
2092
+ (ae) => Math.min(Math.max(ae + U, 0), S.length - 1)
2093
+ );
2094
+ } else
2095
+ return !1;
2096
+ },
2097
+ { ref: d, enabled: J || _ === "inline" }
2098
+ ), Ne(() => {
2099
+ const p = (U) => {
2100
+ (U.metaKey || U.ctrlKey) && U.key === f && (U.preventDefault(), B(!0), setTimeout(() => {
2101
+ var ae;
2102
+ return (ae = g.current) == null ? void 0 : ae.focus();
2021
2103
  }, 0));
2022
2104
  };
2023
2105
  return document.addEventListener("keydown", p), () => document.removeEventListener("keydown", p);
2024
- }, [w]), me(() => {
2025
- Z && setTimeout(() => {
2106
+ }, [f]), Ne(() => {
2107
+ J && setTimeout(() => {
2026
2108
  var p;
2027
2109
  return (p = g.current) == null ? void 0 : p.focus();
2028
2110
  }, 0);
2029
- }, [Z]);
2030
- const K = J ? x.filter((p) => p.type === J) : x, Q = Array.from(new Set(x.map((p) => p.type))).map(
2111
+ }, [J]);
2112
+ const Pe = Array.from(new Set(T.map((p) => p.type))).map(
2031
2113
  (p) => ({
2032
2114
  id: p,
2033
2115
  label: p.charAt(0).toUpperCase() + p.slice(1),
2034
- icon: Je[p],
2035
- count: x.filter((y) => y.type === p).length
2116
+ icon: cc[p],
2117
+ count: T.filter((U) => U.type === p).length
2036
2118
  })
2037
2119
  );
2038
- if (re(E, () => ({
2120
+ if (pe(I, () => ({
2039
2121
  open: () => B(!0),
2040
2122
  close: () => {
2041
- B(!1), C == null || C();
2123
+ B(!1), w == null || w();
2042
2124
  },
2043
2125
  focus: () => {
2044
2126
  var p;
2045
2127
  return (p = g.current) == null ? void 0 : p.focus();
2046
2128
  },
2047
2129
  clear: () => {
2048
- P(""), H([]);
2130
+ $(""), X([]);
2049
2131
  },
2050
2132
  search: async (p) => {
2051
- P(p), await v(p);
2133
+ $(p), await v(p);
2052
2134
  }
2053
- })), !Z && Y !== "inline")
2135
+ })), !J && _ !== "inline")
2054
2136
  return null;
2055
- const d = /* @__PURE__ */ c("div", { className: "nice-search-content", children: [
2137
+ const Oe = /* @__PURE__ */ c("div", { className: "nice-search-content", ref: d, children: [
2056
2138
  /* @__PURE__ */ e(
2057
- Bc,
2139
+ Qc,
2058
2140
  {
2059
- value: O,
2060
- onChange: D,
2061
- onKeyDown: M,
2062
- placeholder: n || N.placeholder,
2063
- isLoading: j,
2064
- inputRef: g
2141
+ value: F,
2142
+ onChange: x,
2143
+ onKeyDown: ee,
2144
+ placeholder: n || b.placeholder,
2145
+ isLoading: H,
2146
+ inputRef: g,
2147
+ listboxId: L,
2148
+ activeId: S[k] ? `${L}-${k}` : void 0,
2149
+ expanded: S.length > 0
2065
2150
  }
2066
2151
  ),
2067
- t && Q.length > 1 && O.length >= s && /* @__PURE__ */ e(
2068
- Jc,
2152
+ a && Pe.length > 1 && F.length >= s && /* @__PURE__ */ e(
2153
+ ct,
2069
2154
  {
2070
- categories: Q,
2071
- selected: J,
2072
- onSelect: f
2155
+ categories: Pe,
2156
+ selected: Z,
2157
+ onSelect: Y
2073
2158
  }
2074
2159
  ),
2075
- /* @__PURE__ */ c("div", { className: "nice-search-results", role: "listbox", children: [
2076
- j && O.length >= s && /* @__PURE__ */ e("div", { className: "nice-search-loading", children: N.searching }),
2077
- !j && O.length >= s && K.length === 0 && /* @__PURE__ */ e("div", { className: "nice-search-empty", children: F ? F(O) : /* @__PURE__ */ c(ae, { children: [
2078
- /* @__PURE__ */ e("span", { className: "nice-search-empty-icon", children: /* @__PURE__ */ e(ge, { size: 32 }) }),
2160
+ /* @__PURE__ */ c("div", { className: "nice-search-results", role: "listbox", id: L, children: [
2161
+ H && F.length >= s && /* @__PURE__ */ e("div", { className: "nice-search-loading", children: b.searching }),
2162
+ !H && F.length >= s && S.length === 0 && /* @__PURE__ */ e("div", { className: "nice-search-empty", children: M ? M(F) : /* @__PURE__ */ c(ie, { children: [
2163
+ /* @__PURE__ */ e("span", { className: "nice-search-empty-icon", children: /* @__PURE__ */ e(fe, { size: 32 }) }),
2079
2164
  /* @__PURE__ */ c("span", { children: [
2080
- N.noResults,
2165
+ b.noResults,
2081
2166
  ' "',
2082
- O,
2167
+ F,
2083
2168
  '"'
2084
2169
  ] })
2085
2170
  ] }) }),
2086
- K.map((p, y) => /* @__PURE__ */ e(
2087
- Hc,
2171
+ S.map((p, U) => /* @__PURE__ */ e(
2172
+ et,
2088
2173
  {
2174
+ id: `${L}-${U}`,
2089
2175
  result: p,
2090
- isSelected: y === S,
2176
+ isSelected: U === k,
2091
2177
  onSelect: () => {
2092
- _ == null || _(p), B(!1), C == null || C();
2178
+ D == null || D(p), B(!1), w == null || w();
2093
2179
  },
2094
2180
  renderResult: z
2095
2181
  },
2096
2182
  p.id
2097
2183
  ))
2098
2184
  ] }),
2099
- h && O.length < s && T.length > 0 && /* @__PURE__ */ e(
2100
- Gc,
2185
+ h && F.length < s && y.length > 0 && /* @__PURE__ */ e(
2186
+ tt,
2101
2187
  {
2102
- searches: T,
2188
+ searches: y,
2103
2189
  onSelect: (p) => {
2104
- P(p), v(p);
2190
+ $(p), v(p);
2105
2191
  },
2106
2192
  onClear: () => {
2107
- X([]), localStorage.removeItem("nice_recent_searches");
2193
+ R([]), localStorage.removeItem("nice_recent_searches");
2108
2194
  },
2109
- label: N.recent,
2110
- clearLabel: N.clearRecent
2195
+ label: b.recent,
2196
+ clearLabel: b.clearRecent
2111
2197
  }
2112
2198
  ),
2113
2199
  o && /* @__PURE__ */ c("div", { className: "nice-search-shortcuts", children: [
2114
2200
  /* @__PURE__ */ c("span", { children: [
2115
- /* @__PURE__ */ e("kbd", { children: /* @__PURE__ */ e(_e, { name: "arrow-up", size: 12 }) }),
2116
- /* @__PURE__ */ e("kbd", { children: /* @__PURE__ */ e(_e, { name: "arrow-down", size: 12 }) }),
2201
+ /* @__PURE__ */ e(ke, { keys: "ArrowUp ArrowDown", size: "sm" }),
2117
2202
  " ",
2118
2203
  m("globalSearch.navigate", "Navigate")
2119
2204
  ] }),
2120
2205
  /* @__PURE__ */ c("span", { children: [
2121
- /* @__PURE__ */ e("kbd", { children: "↵" }),
2206
+ /* @__PURE__ */ e(ke, { keys: "Enter", size: "sm" }),
2122
2207
  " ",
2123
2208
  m("globalSearch.select", "Select")
2124
2209
  ] }),
2125
2210
  /* @__PURE__ */ c("span", { children: [
2126
- /* @__PURE__ */ e("kbd", { children: "Esc" }),
2211
+ /* @__PURE__ */ e(ke, { keys: "Escape", size: "sm" }),
2127
2212
  " ",
2128
2213
  m("globalSearch.close", "Close")
2129
2214
  ] })
2130
2215
  ] })
2131
2216
  ] });
2132
- return Y === "modal" ? /* @__PURE__ */ e(
2217
+ return _ === "modal" ? /* @__PURE__ */ e(
2133
2218
  "div",
2134
2219
  {
2135
2220
  className: "nice-search-overlay",
2136
- onClick: () => {
2137
- B(!1), C == null || C();
2221
+ role: "presentation",
2222
+ onClick: (p) => {
2223
+ p.stopPropagation(), p.target === p.currentTarget && (B(!1), w == null || w());
2138
2224
  },
2139
2225
  children: /* @__PURE__ */ e(
2140
2226
  "div",
2141
2227
  {
2142
- className: `nice-global-search nice-global-search--modal ${$}`,
2143
- style: q,
2144
- onClick: (p) => p.stopPropagation(),
2228
+ ref: ce,
2229
+ className: `nice-global-search nice-global-search--modal ${j}`,
2230
+ style: G,
2145
2231
  role: "dialog",
2146
2232
  "aria-modal": "true",
2147
- children: d
2233
+ "aria-label": n || b.placeholder,
2234
+ children: Oe
2148
2235
  }
2149
2236
  )
2150
2237
  }
2151
2238
  ) : /* @__PURE__ */ e(
2152
2239
  "div",
2153
2240
  {
2154
- className: `nice-global-search nice-global-search--${Y} ${$}`,
2155
- style: q,
2156
- children: d
2241
+ className: `nice-global-search nice-global-search--${_} ${j}`,
2242
+ style: G,
2243
+ children: Oe
2157
2244
  }
2158
2245
  );
2159
2246
  }
2160
2247
  ),
2161
2248
  { displayName: "NiceGlobalSearch" }
2162
- ), Wc = [], oe = {
2249
+ ), it = [], ue = {
2163
2250
  title: "Access Log",
2164
2251
  filters: "Filters",
2165
2252
  search: "Search users, IPs...",
@@ -2211,213 +2298,213 @@ const Ce = {
2211
2298
  risk: "Risk",
2212
2299
  status: "Status"
2213
2300
  }
2214
- }, Ne = {
2215
- login_success: /* @__PURE__ */ e(se, { size: 16 }),
2216
- login_failed: /* @__PURE__ */ e(he, { size: 16 }),
2217
- logout: /* @__PURE__ */ e(Me, { size: 16 }),
2218
- password_change: /* @__PURE__ */ e(fe, { size: 16 }),
2219
- password_reset: /* @__PURE__ */ e(ye, { size: 16 }),
2220
- mfa_enabled: /* @__PURE__ */ e(He, { size: 16 }),
2221
- mfa_disabled: /* @__PURE__ */ e(Ye, { size: 16 }),
2222
- mfa_challenged: /* @__PURE__ */ e(we, { size: 16 }),
2223
- permission_change: /* @__PURE__ */ e(Be, { size: 16 }),
2224
- session_expired: /* @__PURE__ */ e(Le, { size: 16 }),
2225
- account_locked: /* @__PURE__ */ e(Ue, { size: 16 }),
2226
- account_unlocked: /* @__PURE__ */ e(bc, { size: 16 }),
2227
- api_key_created: /* @__PURE__ */ e(fe, { size: 16 }),
2228
- api_key_revoked: /* @__PURE__ */ e(he, { size: 16 }),
2229
- token_refresh: /* @__PURE__ */ e(ye, { size: 16 }),
2230
- suspicious_activity: /* @__PURE__ */ e(qe, { size: 16 })
2231
- }, de = {
2301
+ }, Ce = {
2302
+ login_success: /* @__PURE__ */ e(re, { size: 16 }),
2303
+ login_failed: /* @__PURE__ */ e(ge, { size: 16 }),
2304
+ logout: /* @__PURE__ */ e(Be, { size: 16 }),
2305
+ password_change: /* @__PURE__ */ e(xe, { size: 16 }),
2306
+ password_reset: /* @__PURE__ */ e(Se, { size: 16 }),
2307
+ mfa_enabled: /* @__PURE__ */ e(Ze, { size: 16 }),
2308
+ mfa_disabled: /* @__PURE__ */ e(Ke, { size: 16 }),
2309
+ mfa_challenged: /* @__PURE__ */ e(De, { size: 16 }),
2310
+ permission_change: /* @__PURE__ */ e(Xe, { size: 16 }),
2311
+ session_expired: /* @__PURE__ */ e(_e, { size: 16 }),
2312
+ account_locked: /* @__PURE__ */ e(Je, { size: 16 }),
2313
+ account_unlocked: /* @__PURE__ */ e(Sc, { size: 16 }),
2314
+ api_key_created: /* @__PURE__ */ e(xe, { size: 16 }),
2315
+ api_key_revoked: /* @__PURE__ */ e(ge, { size: 16 }),
2316
+ token_refresh: /* @__PURE__ */ e(Se, { size: 16 }),
2317
+ suspicious_activity: /* @__PURE__ */ e(Ge, { size: 16 })
2318
+ }, me = {
2232
2319
  low: "var(--nice-color-success, #22c55e)",
2233
2320
  medium: "var(--nice-color-warning, #f59e0b)",
2234
2321
  high: "var(--nice-color-error, #ef4444)",
2235
2322
  critical: "var(--nice-color-accent-hover, #7c3aed)"
2236
- }, Ae = {
2237
- desktop: /* @__PURE__ */ e(Nc, { size: 16 }),
2238
- mobile: /* @__PURE__ */ e(we, { size: 16 }),
2239
- tablet: /* @__PURE__ */ e(we, { size: 16 }),
2240
- unknown: /* @__PURE__ */ e(Ve, { size: 16 })
2241
- }, Ie = (a) => (typeof a == "string" ? new Date(a) : a).toLocaleString("en-US", {
2323
+ }, Re = {
2324
+ desktop: /* @__PURE__ */ e(Dc, { size: 16 }),
2325
+ mobile: /* @__PURE__ */ e(De, { size: 16 }),
2326
+ tablet: /* @__PURE__ */ e(De, { size: 16 }),
2327
+ unknown: /* @__PURE__ */ e(We, { size: 16 })
2328
+ }, Me = (t) => (typeof t == "string" ? new Date(t) : t).toLocaleString("en-US", {
2242
2329
  month: "short",
2243
2330
  day: "numeric",
2244
2331
  hour: "2-digit",
2245
2332
  minute: "2-digit",
2246
2333
  second: "2-digit"
2247
- }), Oe = (a) => {
2248
- if (!a)
2334
+ }), je = (t) => {
2335
+ if (!t)
2249
2336
  return "Unknown";
2250
2337
  const n = [];
2251
- return a.city && n.push(a.city), a.country && n.push(a.country), n.length > 0 ? n.join(", ") : "Unknown";
2252
- }, Xc = (a) => {
2253
- if (!a)
2338
+ return t.city && n.push(t.city), t.country && n.push(t.country), n.length > 0 ? n.join(", ") : "Unknown";
2339
+ }, st = (t) => {
2340
+ if (!t)
2254
2341
  return "Unknown";
2255
2342
  const n = [];
2256
- return a.browser && n.push(a.browser), a.os && n.push(a.os), n.length > 0 ? n.join(" / ") : a.type;
2257
- }, Pe = (a) => a >= 80 ? de.critical : a >= 60 ? de.high : a >= 40 ? de.medium : de.low, Zc = (a, n) => {
2258
- var s, i, t, l, h;
2343
+ return t.browser && n.push(t.browser), t.os && n.push(t.os), n.length > 0 ? n.join(" / ") : t.type;
2344
+ }, Ue = (t) => t >= 80 ? me.critical : t >= 60 ? me.high : t >= 40 ? me.medium : me.low, nt = (t, n) => {
2345
+ var s, i, a, l, h;
2259
2346
  if (n.startDate) {
2260
2347
  const r = typeof n.startDate == "string" ? new Date(n.startDate) : n.startDate;
2261
- if ((typeof a.timestamp == "string" ? new Date(a.timestamp) : a.timestamp) < r)
2348
+ if ((typeof t.timestamp == "string" ? new Date(t.timestamp) : t.timestamp) < r)
2262
2349
  return !1;
2263
2350
  }
2264
2351
  if (n.endDate) {
2265
2352
  const r = typeof n.endDate == "string" ? new Date(n.endDate) : n.endDate;
2266
- if ((typeof a.timestamp == "string" ? new Date(a.timestamp) : a.timestamp) > r)
2353
+ if ((typeof t.timestamp == "string" ? new Date(t.timestamp) : t.timestamp) > r)
2267
2354
  return !1;
2268
2355
  }
2269
- if ((s = n.eventTypes) != null && s.length && !n.eventTypes.includes(a.eventType) || (i = n.riskLevels) != null && i.length && !n.riskLevels.includes(a.riskLevel) || n.userId && a.userId !== n.userId || n.ipAddress && !a.ipAddress.includes(n.ipAddress) || n.country && ((t = a.location) == null ? void 0 : t.country) !== n.country || n.successOnly && !a.success || n.failedOnly && a.success)
2356
+ if ((s = n.eventTypes) != null && s.length && !n.eventTypes.includes(t.eventType) || (i = n.riskLevels) != null && i.length && !n.riskLevels.includes(t.riskLevel) || n.userId && t.userId !== n.userId || n.ipAddress && !t.ipAddress.includes(n.ipAddress) || n.country && ((a = t.location) == null ? void 0 : a.country) !== n.country || n.successOnly && !t.success || n.failedOnly && t.success)
2270
2357
  return !1;
2271
2358
  if (n.searchQuery) {
2272
2359
  const r = n.searchQuery.toLowerCase();
2273
2360
  if (![
2274
- a.userName,
2275
- a.userEmail,
2276
- a.userId,
2277
- a.ipAddress,
2278
- (l = a.location) == null ? void 0 : l.city,
2279
- (h = a.location) == null ? void 0 : h.country
2361
+ t.userName,
2362
+ t.userEmail,
2363
+ t.userId,
2364
+ t.ipAddress,
2365
+ (l = t.location) == null ? void 0 : l.city,
2366
+ (h = t.location) == null ? void 0 : h.country
2280
2367
  ].filter(Boolean).join(" ").toLowerCase().includes(r))
2281
2368
  return !1;
2282
2369
  }
2283
2370
  return !0;
2284
- }, ra = /* @__PURE__ */ Object.assign(
2285
- /* @__PURE__ */ le(
2371
+ }, bt = /* @__PURE__ */ Object.assign(
2372
+ /* @__PURE__ */ he(
2286
2373
  function(n, s) {
2287
- var K, Q;
2288
- const { t: i } = W(), {
2289
- entries: t = Wc,
2374
+ var ee, ce;
2375
+ const { t: i } = Q(), {
2376
+ entries: a = it,
2290
2377
  filter: l = {},
2291
2378
  stats: h,
2292
2379
  realtime: r = !1,
2293
2380
  pollingInterval: o = 3e4,
2294
- showMap: w = !1,
2295
- showStats: _ = !0,
2296
- showDetails: I = !0,
2297
- pageSize: C = 50,
2381
+ showMap: f = !1,
2382
+ showStats: D = !0,
2383
+ showDetails: O = !0,
2384
+ pageSize: w = 50,
2298
2385
  labels: z,
2299
- loading: F = !1,
2300
- onFilterChange: U,
2301
- onExport: L,
2302
- onEntrySelect: Y,
2303
- onBlockIP: ce,
2304
- onRefresh: $,
2305
- className: q = "",
2306
- ...E
2307
- } = n, m = ke(null);
2308
- Cc();
2309
- const N = ue(
2386
+ loading: M = !1,
2387
+ onFilterChange: K,
2388
+ onExport: E,
2389
+ onEntrySelect: _,
2390
+ onBlockIP: te,
2391
+ onRefresh: j,
2392
+ className: G = "",
2393
+ ...I
2394
+ } = n, m = oe(null);
2395
+ ec();
2396
+ const b = ve(
2310
2397
  () => ({
2311
- ...oe,
2398
+ ...ue,
2312
2399
  ...z,
2313
- eventTypes: { ...oe.eventTypes, ...z == null ? void 0 : z.eventTypes },
2314
- riskLevels: { ...oe.riskLevels, ...z == null ? void 0 : z.riskLevels },
2315
- deviceTypes: { ...oe.deviceTypes, ...z == null ? void 0 : z.deviceTypes },
2316
- columns: { ...oe.columns, ...z == null ? void 0 : z.columns }
2400
+ eventTypes: { ...ue.eventTypes, ...z == null ? void 0 : z.eventTypes },
2401
+ riskLevels: { ...ue.riskLevels, ...z == null ? void 0 : z.riskLevels },
2402
+ deviceTypes: { ...ue.deviceTypes, ...z == null ? void 0 : z.deviceTypes },
2403
+ columns: { ...ue.columns, ...z == null ? void 0 : z.columns }
2317
2404
  }),
2318
2405
  [z]
2319
- ), [g, V] = k(l), [u, B] = k(null), [O, P] = k(C), [x, H] = k(!1), [j, b] = k("table"), S = ue(() => t.filter((d) => Zc(d, g)), [t, g]), A = ue(() => S.slice(0, O), [S, O]), J = ue(() => {
2406
+ ), [g, W] = C(l), [u, B] = C(null), [F, $] = C(w), [T, X] = C(!1), [H, N] = C("table"), k = ve(() => a.filter((d) => nt(d, g)), [a, g]), A = ve(() => k.slice(0, F), [k, F]), Z = ve(() => {
2320
2407
  if (h)
2321
2408
  return h;
2322
- const d = new Set(t.map((y) => y.ipAddress)), p = new Set(t.map((y) => {
2323
- var ee;
2324
- return (ee = y.location) == null ? void 0 : ee.country;
2409
+ const d = new Set(a.map((L) => L.ipAddress)), V = new Set(a.map((L) => {
2410
+ var se;
2411
+ return (se = L.location) == null ? void 0 : se.country;
2325
2412
  }).filter(Boolean));
2326
2413
  return {
2327
- totalEvents: t.length,
2328
- successfulLogins: t.filter((y) => y.eventType === "login_success").length,
2329
- failedLogins: t.filter((y) => y.eventType === "login_failed").length,
2414
+ totalEvents: a.length,
2415
+ successfulLogins: a.filter((L) => L.eventType === "login_success").length,
2416
+ failedLogins: a.filter((L) => L.eventType === "login_failed").length,
2330
2417
  uniqueIPs: d.size,
2331
- uniqueCountries: p.size,
2332
- highRiskEvents: t.filter(
2333
- (y) => y.riskLevel === "high" || y.riskLevel === "critical"
2418
+ uniqueCountries: V.size,
2419
+ highRiskEvents: a.filter(
2420
+ (L) => L.riskLevel === "high" || L.riskLevel === "critical"
2334
2421
  ).length,
2335
- suspiciousActivities: t.filter((y) => y.eventType === "suspicious_activity").length
2422
+ suspiciousActivities: a.filter((L) => L.eventType === "suspicious_activity").length
2336
2423
  };
2337
- }, [t, h]), f = R(
2424
+ }, [a, h]), Y = P(
2338
2425
  (d) => {
2339
- const p = { ...g, ...d };
2340
- V(p), P(C), U == null || U(p);
2426
+ const V = { ...g, ...d };
2427
+ W(V), $(w), K == null || K(V);
2341
2428
  },
2342
- [g, U, C]
2343
- ), T = R(() => {
2344
- V({}), P(C), U == null || U({});
2345
- }, [U, C]), X = R(
2429
+ [g, K, w]
2430
+ ), y = P(() => {
2431
+ W({}), $(w), K == null || K({});
2432
+ }, [K, w]), R = P(
2346
2433
  (d) => {
2347
- B(d), Y == null || Y(d);
2434
+ B(d), _ == null || _(d);
2348
2435
  },
2349
- [Y]
2350
- ), Z = R(
2436
+ [_]
2437
+ ), J = P(
2351
2438
  (d) => {
2352
- L == null || L(d);
2439
+ E == null || E(d);
2353
2440
  },
2354
- [L]
2355
- ), G = R(() => {
2356
- $ == null || $();
2357
- }, [$]), v = R(() => {
2358
- P((d) => d + C);
2359
- }, [C]);
2360
- re(
2441
+ [E]
2442
+ ), q = P(() => {
2443
+ j == null || j();
2444
+ }, [j]), v = P(() => {
2445
+ $((d) => d + w);
2446
+ }, [w]);
2447
+ pe(
2361
2448
  s,
2362
2449
  () => ({
2363
2450
  getFilter: () => g,
2364
- applyFilter: f,
2365
- clearFilters: T,
2366
- export: Z,
2367
- refresh: G,
2451
+ applyFilter: Y,
2452
+ clearFilters: y,
2453
+ export: J,
2454
+ refresh: q,
2368
2455
  getSelectedEntry: () => u,
2369
2456
  getElement: () => m.current
2370
2457
  }),
2371
- [g, f, T, Z, G, u]
2458
+ [g, Y, y, J, q, u]
2372
2459
  );
2373
- const D = (d) => {
2374
- var p, y;
2460
+ const x = (d) => {
2461
+ var V, L;
2375
2462
  return /* @__PURE__ */ c(
2376
2463
  "tr",
2377
2464
  {
2378
2465
  className: `nice-accesslog-row ${(u == null ? void 0 : u.id) === d.id ? "nice-accesslog-row--selected" : ""} ${d.success ? "" : "nice-accesslog-row--failed"}`,
2379
- onClick: () => X(d),
2466
+ onClick: () => R(d),
2380
2467
  children: [
2381
- /* @__PURE__ */ e("td", { className: "nice-accesslog-cell nice-accesslog-cell--timestamp", children: Ie(d.timestamp) }),
2468
+ /* @__PURE__ */ e("td", { className: "nice-accesslog-cell nice-accesslog-cell--timestamp", children: Me(d.timestamp) }),
2382
2469
  /* @__PURE__ */ e("td", { className: "nice-accesslog-cell nice-accesslog-cell--user", children: /* @__PURE__ */ c("div", { className: "nice-accesslog-user", children: [
2383
2470
  /* @__PURE__ */ e("span", { className: "nice-accesslog-username", children: d.userName || d.userId }),
2384
2471
  d.userEmail && /* @__PURE__ */ e("span", { className: "nice-accesslog-email", children: d.userEmail })
2385
2472
  ] }) }),
2386
2473
  /* @__PURE__ */ e("td", { className: "nice-accesslog-cell nice-accesslog-cell--event", children: /* @__PURE__ */ c("span", { className: `nice-accesslog-event nice-accesslog-event--${d.eventType}`, children: [
2387
- /* @__PURE__ */ e("span", { className: "nice-accesslog-event-icon", children: Ne[d.eventType] }),
2388
- N.eventTypes[d.eventType]
2474
+ /* @__PURE__ */ e("span", { className: "nice-accesslog-event-icon", children: Ce[d.eventType] }),
2475
+ b.eventTypes[d.eventType]
2389
2476
  ] }) }),
2390
2477
  /* @__PURE__ */ c("td", { className: "nice-accesslog-cell nice-accesslog-cell--ip", children: [
2391
2478
  /* @__PURE__ */ e("span", { className: "nice-accesslog-ip", children: d.ipAddress }),
2392
- ce && /* @__PURE__ */ e(
2479
+ te && /* @__PURE__ */ e(
2393
2480
  "button",
2394
2481
  {
2395
2482
  type: "button",
2396
2483
  className: "nice-accesslog-block-btn",
2397
- onClick: (ee) => {
2398
- ee.stopPropagation(), ce(d.ipAddress);
2484
+ onClick: (se) => {
2485
+ se.stopPropagation(), te(d.ipAddress);
2399
2486
  },
2400
2487
  title: i("accessLog.blockIp", "Block IP"),
2401
- children: /* @__PURE__ */ e(gc, { size: 14 })
2488
+ children: /* @__PURE__ */ e(Cc, { size: 14 })
2402
2489
  }
2403
2490
  )
2404
2491
  ] }),
2405
2492
  /* @__PURE__ */ c("td", { className: "nice-accesslog-cell nice-accesslog-cell--location", children: [
2406
- ((p = d.location) == null ? void 0 : p.countryCode) && /* @__PURE__ */ e("span", { className: "nice-accesslog-flag", children: /* @__PURE__ */ e(vc, { size: 14 }) }),
2407
- Oe(d.location)
2493
+ ((V = d.location) == null ? void 0 : V.countryCode) && /* @__PURE__ */ e("span", { className: "nice-accesslog-flag", children: /* @__PURE__ */ e(xc, { size: 14 }) }),
2494
+ je(d.location)
2408
2495
  ] }),
2409
2496
  /* @__PURE__ */ e("td", { className: "nice-accesslog-cell nice-accesslog-cell--device", children: /* @__PURE__ */ c("span", { className: "nice-accesslog-device", children: [
2410
- Ae[((y = d.device) == null ? void 0 : y.type) || "unknown"],
2411
- Xc(d.device)
2497
+ Re[((L = d.device) == null ? void 0 : L.type) || "unknown"],
2498
+ st(d.device)
2412
2499
  ] }) }),
2413
2500
  /* @__PURE__ */ e("td", { className: "nice-accesslog-cell nice-accesslog-cell--risk", children: /* @__PURE__ */ c(
2414
2501
  "span",
2415
2502
  {
2416
2503
  className: `nice-accesslog-risk nice-accesslog-risk--${d.riskLevel}`,
2417
- style: { "--risk-color": Pe(d.riskScore) },
2504
+ style: { "--risk-color": Ue(d.riskScore) },
2418
2505
  children: [
2419
2506
  /* @__PURE__ */ e("span", { className: "nice-accesslog-risk-score", children: d.riskScore }),
2420
- /* @__PURE__ */ e("span", { className: "nice-accesslog-risk-label", children: N.riskLevels[d.riskLevel] })
2507
+ /* @__PURE__ */ e("span", { className: "nice-accesslog-risk-label", children: b.riskLevels[d.riskLevel] })
2421
2508
  ]
2422
2509
  }
2423
2510
  ) }),
@@ -2425,54 +2512,57 @@ const Ce = {
2425
2512
  "span",
2426
2513
  {
2427
2514
  className: `nice-accesslog-status ${d.success ? "nice-accesslog-status--success" : "nice-accesslog-status--failed"}`,
2428
- children: d.success ? /* @__PURE__ */ e(se, { size: 14 }) : /* @__PURE__ */ e(he, { size: 14 })
2515
+ children: d.success ? /* @__PURE__ */ e(re, { size: 14 }) : /* @__PURE__ */ e(ge, { size: 14 })
2429
2516
  }
2430
2517
  ) })
2431
2518
  ]
2432
2519
  },
2433
2520
  d.id
2434
2521
  );
2435
- }, M = (d) => /* @__PURE__ */ c(
2522
+ }, S = (d) => /* @__PURE__ */ c(
2436
2523
  "div",
2437
2524
  {
2525
+ role: "button",
2526
+ tabIndex: 0,
2527
+ onKeyDown: Ie,
2438
2528
  className: `nice-accesslog-timeline-item nice-accesslog-timeline-item--${d.riskLevel}`,
2439
- onClick: () => X(d),
2529
+ onClick: () => R(d),
2440
2530
  children: [
2441
2531
  /* @__PURE__ */ e(
2442
2532
  "div",
2443
2533
  {
2444
2534
  className: "nice-accesslog-timeline-marker",
2445
- style: { background: de[d.riskLevel] }
2535
+ style: { background: me[d.riskLevel] }
2446
2536
  }
2447
2537
  ),
2448
2538
  /* @__PURE__ */ c("div", { className: "nice-accesslog-timeline-content", children: [
2449
2539
  /* @__PURE__ */ c("div", { className: "nice-accesslog-timeline-header", children: [
2450
2540
  /* @__PURE__ */ c("span", { className: "nice-accesslog-timeline-event", children: [
2451
- Ne[d.eventType],
2541
+ Ce[d.eventType],
2452
2542
  " ",
2453
- N.eventTypes[d.eventType]
2543
+ b.eventTypes[d.eventType]
2454
2544
  ] }),
2455
- /* @__PURE__ */ e("span", { className: "nice-accesslog-timeline-time", children: Ie(d.timestamp) })
2545
+ /* @__PURE__ */ e("span", { className: "nice-accesslog-timeline-time", children: Me(d.timestamp) })
2456
2546
  ] }),
2457
2547
  /* @__PURE__ */ c("div", { className: "nice-accesslog-timeline-details", children: [
2458
2548
  /* @__PURE__ */ e("span", { children: d.userName || d.userId }),
2459
2549
  /* @__PURE__ */ e("span", { children: "•" }),
2460
2550
  /* @__PURE__ */ e("span", { children: d.ipAddress }),
2461
2551
  /* @__PURE__ */ e("span", { children: "•" }),
2462
- /* @__PURE__ */ e("span", { children: Oe(d.location) })
2552
+ /* @__PURE__ */ e("span", { children: je(d.location) })
2463
2553
  ] }),
2464
- d.flags && d.flags.length > 0 && /* @__PURE__ */ e("div", { className: "nice-accesslog-timeline-flags", children: d.flags.map((p, y) => /* @__PURE__ */ e("span", { className: "nice-accesslog-flag-badge", children: p }, y)) })
2554
+ d.flags && d.flags.length > 0 && /* @__PURE__ */ e("div", { className: "nice-accesslog-timeline-flags", children: d.flags.map((V, L) => /* @__PURE__ */ e("span", { className: "nice-accesslog-flag-badge", children: V }, L)) })
2465
2555
  ] })
2466
2556
  ]
2467
2557
  },
2468
2558
  d.id
2469
2559
  );
2470
- return /* @__PURE__ */ c("div", { ref: m, className: `nice-accesslog ${q}`, ...E, children: [
2560
+ return /* @__PURE__ */ c("div", { ref: m, className: `nice-accesslog ${G}`, ...I, children: [
2471
2561
  /* @__PURE__ */ c("div", { className: "nice-accesslog-header", children: [
2472
2562
  /* @__PURE__ */ c("div", { className: "nice-accesslog-header-left", children: [
2473
- /* @__PURE__ */ e("h2", { className: "nice-accesslog-title", children: N.title }),
2563
+ /* @__PURE__ */ e("h2", { className: "nice-accesslog-title", children: b.title }),
2474
2564
  r && /* @__PURE__ */ c("span", { className: "nice-accesslog-realtime-badge", children: [
2475
- /* @__PURE__ */ e(De, { size: 10 }),
2565
+ /* @__PURE__ */ e(ze, { size: 10 }),
2476
2566
  " ",
2477
2567
  i("accessLog.live", "Live")
2478
2568
  ] })
@@ -2483,66 +2573,66 @@ const Ce = {
2483
2573
  {
2484
2574
  type: "button",
2485
2575
  className: "nice-accesslog-btn",
2486
- onClick: G,
2487
- disabled: F,
2576
+ onClick: q,
2577
+ disabled: M,
2488
2578
  children: [
2489
- /* @__PURE__ */ e(ye, { size: 16 }),
2579
+ /* @__PURE__ */ e(Se, { size: 16 }),
2490
2580
  " ",
2491
- N.refresh
2581
+ b.refresh
2492
2582
  ]
2493
2583
  }
2494
2584
  ),
2495
2585
  /* @__PURE__ */ c("div", { className: "nice-accesslog-export-dropdown", children: [
2496
2586
  /* @__PURE__ */ c("button", { type: "button", className: "nice-accesslog-btn", children: [
2497
- /* @__PURE__ */ e(ve, { size: 16 }),
2587
+ /* @__PURE__ */ e(ye, { size: 16 }),
2498
2588
  " ",
2499
- N.export
2589
+ b.export
2500
2590
  ] }),
2501
2591
  /* @__PURE__ */ c("div", { className: "nice-accesslog-export-menu", children: [
2502
- /* @__PURE__ */ e("button", { onClick: () => Z("csv"), children: "CSV" }),
2503
- /* @__PURE__ */ e("button", { onClick: () => Z("json"), children: i("accessLog.json", "JSON") }),
2504
- /* @__PURE__ */ e("button", { onClick: () => Z("pdf"), children: "PDF" })
2592
+ /* @__PURE__ */ e("button", { onClick: () => J("csv"), children: "CSV" }),
2593
+ /* @__PURE__ */ e("button", { onClick: () => J("json"), children: i("accessLog.json", "JSON") }),
2594
+ /* @__PURE__ */ e("button", { onClick: () => J("pdf"), children: "PDF" })
2505
2595
  ] })
2506
2596
  ] })
2507
2597
  ] })
2508
2598
  ] }),
2509
- _ && /* @__PURE__ */ c("div", { className: "nice-accesslog-stats", children: [
2599
+ D && /* @__PURE__ */ c("div", { className: "nice-accesslog-stats", children: [
2510
2600
  /* @__PURE__ */ c("div", { className: "nice-accesslog-stat", children: [
2511
- /* @__PURE__ */ e("span", { className: "nice-accesslog-stat-value", children: J.totalEvents }),
2601
+ /* @__PURE__ */ e("span", { className: "nice-accesslog-stat-value", children: Z.totalEvents }),
2512
2602
  /* @__PURE__ */ e("span", { className: "nice-accesslog-stat-label", children: i("accessLog.totalEvents", "Total Events") })
2513
2603
  ] }),
2514
2604
  /* @__PURE__ */ c("div", { className: "nice-accesslog-stat nice-accesslog-stat--success", children: [
2515
- /* @__PURE__ */ e("span", { className: "nice-accesslog-stat-value", children: J.successfulLogins }),
2605
+ /* @__PURE__ */ e("span", { className: "nice-accesslog-stat-value", children: Z.successfulLogins }),
2516
2606
  /* @__PURE__ */ e("span", { className: "nice-accesslog-stat-label", children: i("accessLog.successful", "Successful") })
2517
2607
  ] }),
2518
2608
  /* @__PURE__ */ c("div", { className: "nice-accesslog-stat nice-accesslog-stat--failed", children: [
2519
- /* @__PURE__ */ e("span", { className: "nice-accesslog-stat-value", children: J.failedLogins }),
2609
+ /* @__PURE__ */ e("span", { className: "nice-accesslog-stat-value", children: Z.failedLogins }),
2520
2610
  /* @__PURE__ */ e("span", { className: "nice-accesslog-stat-label", children: i("accessLog.failed", "Failed") })
2521
2611
  ] }),
2522
2612
  /* @__PURE__ */ c("div", { className: "nice-accesslog-stat", children: [
2523
- /* @__PURE__ */ e("span", { className: "nice-accesslog-stat-value", children: J.uniqueIPs }),
2613
+ /* @__PURE__ */ e("span", { className: "nice-accesslog-stat-value", children: Z.uniqueIPs }),
2524
2614
  /* @__PURE__ */ e("span", { className: "nice-accesslog-stat-label", children: i("accessLog.uniqueIps", "Unique IPs") })
2525
2615
  ] }),
2526
2616
  /* @__PURE__ */ c("div", { className: "nice-accesslog-stat", children: [
2527
- /* @__PURE__ */ e("span", { className: "nice-accesslog-stat-value", children: J.uniqueCountries }),
2617
+ /* @__PURE__ */ e("span", { className: "nice-accesslog-stat-value", children: Z.uniqueCountries }),
2528
2618
  /* @__PURE__ */ e("span", { className: "nice-accesslog-stat-label", children: i("accessLog.countries", "Countries") })
2529
2619
  ] }),
2530
2620
  /* @__PURE__ */ c("div", { className: "nice-accesslog-stat nice-accesslog-stat--warning", children: [
2531
- /* @__PURE__ */ e("span", { className: "nice-accesslog-stat-value", children: J.highRiskEvents }),
2621
+ /* @__PURE__ */ e("span", { className: "nice-accesslog-stat-value", children: Z.highRiskEvents }),
2532
2622
  /* @__PURE__ */ e("span", { className: "nice-accesslog-stat-label", children: i("accessLog.highRisk", "High Risk") })
2533
2623
  ] })
2534
2624
  ] }),
2535
2625
  /* @__PURE__ */ c("div", { className: "nice-accesslog-filters", children: [
2536
2626
  /* @__PURE__ */ c("div", { className: "nice-accesslog-filters-row", children: [
2537
2627
  /* @__PURE__ */ c("div", { className: "nice-accesslog-search", children: [
2538
- /* @__PURE__ */ e("span", { className: "nice-accesslog-search-icon", children: /* @__PURE__ */ e(ge, { size: 16 }) }),
2628
+ /* @__PURE__ */ e("span", { className: "nice-accesslog-search-icon", children: /* @__PURE__ */ e(fe, { size: 16 }) }),
2539
2629
  /* @__PURE__ */ e(
2540
2630
  "input",
2541
2631
  {
2542
2632
  type: "text",
2543
- placeholder: N.search,
2633
+ placeholder: b.search,
2544
2634
  value: g.searchQuery || "",
2545
- onChange: (d) => f({ searchQuery: d.target.value })
2635
+ onChange: (d) => Y({ searchQuery: d.target.value })
2546
2636
  }
2547
2637
  )
2548
2638
  ] }),
@@ -2552,7 +2642,7 @@ const Ce = {
2552
2642
  {
2553
2643
  type: "button",
2554
2644
  className: `nice-accesslog-filter-chip ${g.failedOnly ? "nice-accesslog-filter-chip--active" : ""}`,
2555
- onClick: () => f({ failedOnly: !g.failedOnly, successOnly: !1 }),
2645
+ onClick: () => Y({ failedOnly: !g.failedOnly, successOnly: !1 }),
2556
2646
  children: i("accessLog.failedOnly", "Failed Only")
2557
2647
  }
2558
2648
  ),
@@ -2560,10 +2650,10 @@ const Ce = {
2560
2650
  "button",
2561
2651
  {
2562
2652
  type: "button",
2563
- className: `nice-accesslog-filter-chip ${(K = g.riskLevels) != null && K.includes("high") || (Q = g.riskLevels) != null && Q.includes("critical") ? "nice-accesslog-filter-chip--active" : ""}`,
2653
+ className: `nice-accesslog-filter-chip ${(ee = g.riskLevels) != null && ee.includes("high") || (ce = g.riskLevels) != null && ce.includes("critical") ? "nice-accesslog-filter-chip--active" : ""}`,
2564
2654
  onClick: () => {
2565
2655
  var d;
2566
- return f({
2656
+ return Y({
2567
2657
  riskLevels: (d = g.riskLevels) != null && d.includes("high") ? [] : ["high", "critical"]
2568
2658
  });
2569
2659
  },
@@ -2575,13 +2665,13 @@ const Ce = {
2575
2665
  {
2576
2666
  type: "button",
2577
2667
  className: "nice-accesslog-filter-toggle",
2578
- onClick: () => H(!x),
2579
- children: x ? /* @__PURE__ */ c(ae, { children: [
2580
- /* @__PURE__ */ e(pc, { size: 14 }),
2668
+ onClick: () => X(!T),
2669
+ children: T ? /* @__PURE__ */ c(ie, { children: [
2670
+ /* @__PURE__ */ e(yc, { size: 14 }),
2581
2671
  " ",
2582
2672
  i("accessLog.less", "Less")
2583
- ] }) : /* @__PURE__ */ c(ae, { children: [
2584
- /* @__PURE__ */ e(Te, { size: 14 }),
2673
+ ] }) : /* @__PURE__ */ c(ie, { children: [
2674
+ /* @__PURE__ */ e(Ae, { size: 14 }),
2585
2675
  " ",
2586
2676
  i("accessLog.more", "More")
2587
2677
  ] })
@@ -2589,7 +2679,7 @@ const Ce = {
2589
2679
  )
2590
2680
  ] })
2591
2681
  ] }),
2592
- x && /* @__PURE__ */ c("div", { className: "nice-accesslog-filters-expanded", children: [
2682
+ T && /* @__PURE__ */ c("div", { className: "nice-accesslog-filters-expanded", children: [
2593
2683
  /* @__PURE__ */ c("div", { className: "nice-accesslog-filter-group", children: [
2594
2684
  /* @__PURE__ */ e("label", { children: i("accessLog.eventType", "Event Type") }),
2595
2685
  /* @__PURE__ */ e(
@@ -2598,13 +2688,13 @@ const Ce = {
2598
2688
  multiple: !0,
2599
2689
  value: g.eventTypes || [],
2600
2690
  onChange: (d) => {
2601
- const p = Array.from(
2691
+ const V = Array.from(
2602
2692
  d.target.selectedOptions,
2603
- (y) => y.value
2693
+ (L) => L.value
2604
2694
  );
2605
- f({ eventTypes: p.length ? p : void 0 });
2695
+ Y({ eventTypes: V.length ? V : void 0 });
2606
2696
  },
2607
- children: Object.entries(N.eventTypes).map(([d, p]) => /* @__PURE__ */ e("option", { value: d, children: p }, d))
2697
+ children: Object.entries(b.eventTypes).map(([d, V]) => /* @__PURE__ */ e("option", { value: d, children: V }, d))
2608
2698
  }
2609
2699
  )
2610
2700
  ] }),
@@ -2616,16 +2706,16 @@ const Ce = {
2616
2706
  {
2617
2707
  type: "date",
2618
2708
  value: g.startDate ? new Date(g.startDate).toISOString().split("T")[0] : "",
2619
- onChange: (d) => f({ startDate: d.target.value || void 0 })
2709
+ onChange: (d) => Y({ startDate: d.target.value || void 0 })
2620
2710
  }
2621
2711
  ),
2622
- /* @__PURE__ */ e("span", { children: "to" }),
2712
+ /* @__PURE__ */ e("span", { children: i("accessLog.to", "to") }),
2623
2713
  /* @__PURE__ */ e(
2624
2714
  "input",
2625
2715
  {
2626
2716
  type: "date",
2627
2717
  value: g.endDate ? new Date(g.endDate).toISOString().split("T")[0] : "",
2628
- onChange: (d) => f({ endDate: d.target.value || void 0 })
2718
+ onChange: (d) => Y({ endDate: d.target.value || void 0 })
2629
2719
  }
2630
2720
  )
2631
2721
  ] })
@@ -2638,7 +2728,7 @@ const Ce = {
2638
2728
  type: "text",
2639
2729
  placeholder: "e.g., 192.168",
2640
2730
  value: g.ipAddress || "",
2641
- onChange: (d) => f({ ipAddress: d.target.value || void 0 })
2731
+ onChange: (d) => Y({ ipAddress: d.target.value || void 0 })
2642
2732
  }
2643
2733
  )
2644
2734
  ] }),
@@ -2647,7 +2737,7 @@ const Ce = {
2647
2737
  {
2648
2738
  type: "button",
2649
2739
  className: "nice-accesslog-clear-filters",
2650
- onClick: T,
2740
+ onClick: y,
2651
2741
  children: i("accessLog.clearAllFilters", "Clear All Filters")
2652
2742
  }
2653
2743
  )
@@ -2658,10 +2748,10 @@ const Ce = {
2658
2748
  "button",
2659
2749
  {
2660
2750
  type: "button",
2661
- className: `nice-accesslog-tab ${j === "table" ? "nice-accesslog-tab--active" : ""}`,
2662
- onClick: () => b("table"),
2751
+ className: `nice-accesslog-tab ${H === "table" ? "nice-accesslog-tab--active" : ""}`,
2752
+ onClick: () => N("table"),
2663
2753
  children: [
2664
- /* @__PURE__ */ e(uc, { size: 16 }),
2754
+ /* @__PURE__ */ e(wc, { size: 16 }),
2665
2755
  " ",
2666
2756
  i("accessLog.table", "Table")
2667
2757
  ]
@@ -2671,87 +2761,82 @@ const Ce = {
2671
2761
  "button",
2672
2762
  {
2673
2763
  type: "button",
2674
- className: `nice-accesslog-tab ${j === "timeline" ? "nice-accesslog-tab--active" : ""}`,
2675
- onClick: () => b("timeline"),
2764
+ className: `nice-accesslog-tab ${H === "timeline" ? "nice-accesslog-tab--active" : ""}`,
2765
+ onClick: () => N("timeline"),
2676
2766
  children: [
2677
- /* @__PURE__ */ e(mc, { size: 16 }),
2767
+ /* @__PURE__ */ e(kc, { size: 16 }),
2678
2768
  " ",
2679
- N.timeline
2769
+ b.timeline
2680
2770
  ]
2681
2771
  }
2682
2772
  ),
2683
- w && /* @__PURE__ */ c(
2773
+ f && /* @__PURE__ */ c(
2684
2774
  "button",
2685
2775
  {
2686
2776
  type: "button",
2687
- className: `nice-accesslog-tab ${j === "map" ? "nice-accesslog-tab--active" : ""}`,
2688
- onClick: () => b("map"),
2777
+ className: `nice-accesslog-tab ${H === "map" ? "nice-accesslog-tab--active" : ""}`,
2778
+ onClick: () => N("map"),
2689
2779
  children: [
2690
- /* @__PURE__ */ e(Ee, { size: 16 }),
2780
+ /* @__PURE__ */ e($e, { size: 16 }),
2691
2781
  " ",
2692
- N.map
2782
+ b.map
2693
2783
  ]
2694
2784
  }
2695
2785
  ),
2696
- /* @__PURE__ */ c("span", { className: "nice-accesslog-count", children: [
2697
- S.length,
2698
- " entries"
2699
- ] })
2786
+ /* @__PURE__ */ e("span", { className: "nice-accesslog-count", children: i("accessLog.entries", "{filteredEntries} entries").replace(
2787
+ "{filteredEntries}",
2788
+ String(k.length)
2789
+ ) })
2700
2790
  ] }),
2701
- /* @__PURE__ */ e("div", { className: "nice-accesslog-content", children: F ? /* @__PURE__ */ c("div", { className: "nice-accesslog-loading", children: [
2791
+ /* @__PURE__ */ e("div", { className: "nice-accesslog-content", children: M ? /* @__PURE__ */ c("div", { className: "nice-accesslog-loading", children: [
2702
2792
  /* @__PURE__ */ e("div", { className: "nice-accesslog-spinner" }),
2703
2793
  i("accessLog.loadingAccessLogs", "Loading access logs...")
2704
- ] }) : S.length === 0 ? /* @__PURE__ */ c("div", { className: "nice-accesslog-empty", children: [
2705
- /* @__PURE__ */ e("span", { className: "nice-accesslog-empty-icon", children: /* @__PURE__ */ e(He, { size: 32 }) }),
2706
- /* @__PURE__ */ e("span", { children: N.noResults })
2707
- ] }) : /* @__PURE__ */ c(ae, { children: [
2708
- j === "table" && /* @__PURE__ */ e("div", { className: "nice-accesslog-table-wrapper", children: /* @__PURE__ */ c("table", { className: "nice-accesslog-table", children: [
2794
+ ] }) : k.length === 0 ? /* @__PURE__ */ c("div", { className: "nice-accesslog-empty", children: [
2795
+ /* @__PURE__ */ e("span", { className: "nice-accesslog-empty-icon", children: /* @__PURE__ */ e(Ze, { size: 32 }) }),
2796
+ /* @__PURE__ */ e("span", { children: b.noResults })
2797
+ ] }) : /* @__PURE__ */ c(ie, { children: [
2798
+ H === "table" && /* @__PURE__ */ e("div", { className: "nice-accesslog-table-wrapper", children: /* @__PURE__ */ c("table", { className: "nice-accesslog-table", children: [
2709
2799
  /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ c("tr", { children: [
2710
- /* @__PURE__ */ e("th", { children: N.columns.timestamp }),
2711
- /* @__PURE__ */ e("th", { children: N.columns.user }),
2712
- /* @__PURE__ */ e("th", { children: N.columns.event }),
2713
- /* @__PURE__ */ e("th", { children: N.columns.ip }),
2714
- /* @__PURE__ */ e("th", { children: N.columns.location }),
2715
- /* @__PURE__ */ e("th", { children: N.columns.device }),
2716
- /* @__PURE__ */ e("th", { children: N.columns.risk }),
2717
- /* @__PURE__ */ e("th", { children: N.columns.status })
2800
+ /* @__PURE__ */ e("th", { children: b.columns.timestamp }),
2801
+ /* @__PURE__ */ e("th", { children: b.columns.user }),
2802
+ /* @__PURE__ */ e("th", { children: b.columns.event }),
2803
+ /* @__PURE__ */ e("th", { children: b.columns.ip }),
2804
+ /* @__PURE__ */ e("th", { children: b.columns.location }),
2805
+ /* @__PURE__ */ e("th", { children: b.columns.device }),
2806
+ /* @__PURE__ */ e("th", { children: b.columns.risk }),
2807
+ /* @__PURE__ */ e("th", { children: b.columns.status })
2718
2808
  ] }) }),
2719
- /* @__PURE__ */ e("tbody", { children: A.map(D) })
2809
+ /* @__PURE__ */ e("tbody", { children: A.map(x) })
2720
2810
  ] }) }),
2721
- j === "timeline" && /* @__PURE__ */ e("div", { className: "nice-accesslog-timeline", children: A.map(M) }),
2722
- j === "map" && /* @__PURE__ */ e("div", { className: "nice-accesslog-map", children: /* @__PURE__ */ c("div", { className: "nice-accesslog-map-placeholder", children: [
2723
- /* @__PURE__ */ e(Ee, { size: 16 }),
2811
+ H === "timeline" && /* @__PURE__ */ e("div", { className: "nice-accesslog-timeline", children: A.map(S) }),
2812
+ H === "map" && /* @__PURE__ */ e("div", { className: "nice-accesslog-map", children: /* @__PURE__ */ c("div", { className: "nice-accesslog-map-placeholder", children: [
2813
+ /* @__PURE__ */ e($e, { size: 16 }),
2724
2814
  " ",
2725
2815
  i(
2726
2816
  "accessLog.geographicVisualizationWouldRenderHere",
2727
2817
  "Geographic visualization would render here"
2728
2818
  )
2729
2819
  ] }) }),
2730
- O < S.length && /* @__PURE__ */ c(
2820
+ F < k.length && /* @__PURE__ */ e(
2731
2821
  "button",
2732
2822
  {
2733
2823
  type: "button",
2734
2824
  className: "nice-accesslog-show-more",
2735
2825
  onClick: v,
2736
- children: [
2737
- N.showMore,
2738
- " (",
2739
- S.length - O,
2740
- " remaining)"
2741
- ]
2826
+ children: i("accessLog.remaining", "{showMore} ({filteredEntries} remaining)").replace("{showMore}", String(b.showMore)).replace("{filteredEntries}", String(k.length - F))
2742
2827
  }
2743
2828
  )
2744
2829
  ] }) }),
2745
- I && u && /* @__PURE__ */ c("div", { className: "nice-accesslog-detail", children: [
2830
+ O && u && /* @__PURE__ */ c("div", { className: "nice-accesslog-detail", children: [
2746
2831
  /* @__PURE__ */ c("div", { className: "nice-accesslog-detail-header", children: [
2747
- /* @__PURE__ */ e("h3", { children: N.details }),
2832
+ /* @__PURE__ */ e("h3", { children: b.details }),
2748
2833
  /* @__PURE__ */ e(
2749
2834
  "button",
2750
2835
  {
2751
2836
  type: "button",
2752
2837
  className: "nice-accesslog-detail-close",
2753
2838
  onClick: () => B(null),
2754
- children: /* @__PURE__ */ e(be, { size: 16 })
2839
+ children: /* @__PURE__ */ e(we, { size: 16 })
2755
2840
  }
2756
2841
  )
2757
2842
  ] }),
@@ -2777,9 +2862,9 @@ const Ce = {
2777
2862
  /* @__PURE__ */ c("div", { className: "nice-accesslog-detail-row", children: [
2778
2863
  /* @__PURE__ */ e("span", { className: "nice-accesslog-detail-label", children: i("accessLog.eventType", "Event Type") }),
2779
2864
  /* @__PURE__ */ c("span", { className: "nice-accesslog-detail-value", children: [
2780
- Ne[u.eventType],
2865
+ Ce[u.eventType],
2781
2866
  " ",
2782
- N.eventTypes[u.eventType]
2867
+ b.eventTypes[u.eventType]
2783
2868
  ] })
2784
2869
  ] }),
2785
2870
  /* @__PURE__ */ c("div", { className: "nice-accesslog-detail-row", children: [
@@ -2807,7 +2892,7 @@ const Ce = {
2807
2892
  u.device && /* @__PURE__ */ c("div", { className: "nice-accesslog-detail-row", children: [
2808
2893
  /* @__PURE__ */ e("span", { className: "nice-accesslog-detail-label", children: i("accessLog.device", "Device") }),
2809
2894
  /* @__PURE__ */ c("span", { className: "nice-accesslog-detail-value", children: [
2810
- Ae[u.device.type],
2895
+ Re[u.device.type],
2811
2896
  " ",
2812
2897
  u.device.os,
2813
2898
  " ",
@@ -2817,24 +2902,24 @@ const Ce = {
2817
2902
  " ",
2818
2903
  u.device.browserVersion
2819
2904
  ] }),
2820
- u.device.fingerprint && /* @__PURE__ */ c("div", { className: "nice-accesslog-fingerprint", children: [
2821
- "Fingerprint: ",
2822
- u.device.fingerprint
2823
- ] })
2905
+ u.device.fingerprint && /* @__PURE__ */ e("div", { className: "nice-accesslog-fingerprint", children: i("accessLog.fingerprint", "Fingerprint: {fingerprint}").replace(
2906
+ "{fingerprint}",
2907
+ String(u.device.fingerprint)
2908
+ ) })
2824
2909
  ] })
2825
2910
  ] }),
2826
2911
  /* @__PURE__ */ c("div", { className: "nice-accesslog-detail-row", children: [
2827
2912
  /* @__PURE__ */ e("span", { className: "nice-accesslog-detail-label", children: i("accessLog.riskScore", "Risk Score") }),
2828
- /* @__PURE__ */ e("span", { className: "nice-accesslog-detail-value", children: /* @__PURE__ */ c("span", { style: { color: Pe(u.riskScore) }, children: [
2913
+ /* @__PURE__ */ e("span", { className: "nice-accesslog-detail-value", children: /* @__PURE__ */ c("span", { style: { color: Ue(u.riskScore) }, children: [
2829
2914
  u.riskScore,
2830
2915
  "/100 (",
2831
- N.riskLevels[u.riskLevel],
2916
+ b.riskLevels[u.riskLevel],
2832
2917
  ")"
2833
2918
  ] }) })
2834
2919
  ] }),
2835
2920
  u.flags && u.flags.length > 0 && /* @__PURE__ */ c("div", { className: "nice-accesslog-detail-row", children: [
2836
2921
  /* @__PURE__ */ e("span", { className: "nice-accesslog-detail-label", children: i("accessLog.flags", "Flags") }),
2837
- /* @__PURE__ */ e("span", { className: "nice-accesslog-detail-value", children: u.flags.map((d, p) => /* @__PURE__ */ e("span", { className: "nice-accesslog-flag-badge", children: d }, p)) })
2922
+ /* @__PURE__ */ e("span", { className: "nice-accesslog-detail-value", children: u.flags.map((d, V) => /* @__PURE__ */ e("span", { className: "nice-accesslog-flag-badge", children: d }, V)) })
2838
2923
  ] }),
2839
2924
  u.details && Object.keys(u.details).length > 0 && /* @__PURE__ */ c("div", { className: "nice-accesslog-detail-row", children: [
2840
2925
  /* @__PURE__ */ e("span", { className: "nice-accesslog-detail-label", children: i("accessLog.additionalDetails", "Additional Details") }),
@@ -2848,10 +2933,10 @@ const Ce = {
2848
2933
  { displayName: "NiceAccessLog" }
2849
2934
  );
2850
2935
  export {
2851
- ra as NiceAccessLog,
2852
- ia as NiceAuditTrail,
2853
- sa as NiceContractEditor,
2854
- ta as NiceDataExportCenter,
2855
- na as NiceGDPRConsent,
2856
- la as NiceGlobalSearch
2936
+ bt as NiceAccessLog,
2937
+ pt as NiceAuditTrail,
2938
+ ut as NiceContractEditor,
2939
+ ht as NiceDataExportCenter,
2940
+ mt as NiceGDPRConsent,
2941
+ gt as NiceGlobalSearch
2857
2942
  };