@dskripchenko/laravel-admin 1.1.6 → 1.1.7

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,28 +1,28 @@
1
- import { ref as E, computed as p, defineComponent as L, openBlock as s, createElementBlock as c, createElementVNode as d, createBlock as w, unref as r, withCtx as m, Fragment as T, renderList as I, createTextVNode as C, toDisplayString as h, createCommentVNode as F, createVNode as x, renderSlot as H, resolveDynamicComponent as oe, normalizeClass as J, createSlots as Ne, h as _t, watch as Z, onBeforeUnmount as yt, resolveComponent as et, withModifiers as Be, nextTick as Pe, onMounted as xe, withKeys as bt, normalizeProps as Ce, mergeProps as Se, normalizeStyle as Ae, inject as tt, provide as kt, createApp as wt, reactive as $t } from "vue";
2
- import { defineStore as ee, createPinia as xt } from "pinia";
3
- import { RouterLink as Ct, useRouter as ne, useRoute as pe, createWebHistory as nt, createRouter as St } from "vue-router";
4
- import { UidMenu as at, UidMenuItem as Ie, UidMenuSeparator as At, UidAvatar as lt, UidSidebar as Rt, UidSidebarGroup as Ut, UidSidebarItem as Et, UidSidebarLayout as Ft, UidCard as q, UidButton as B, UidAlert as Y, UidInput as ie, UidCheckbox as we, UidSkeleton as Ve, UidErrorState as Lt, UidEmptyState as Pt, UidTable as ze, UidPagination as Tt, UidBadge as qe, UidSelect as $e, UidStat as be, UidHeatmap as Mt, UidGauge as Nt, UidFormField as ge, UidTextarea as It, UidNumberInput as Bt, UidDatePicker as Vt, UidStack as zt, UidGrid as qt, UidTabs as st, UidTabPanel as it, UidTab as ke, UidDescriptionList as Dt, UidDescriptionItem as Ot, UidDrawer as Wt, UidStepper as jt, UidFileUpload as Kt, UidProgress as Gt } from "@dskripchenko/ui";
5
- import Ht from "axios";
6
- import { p as ot, u as re } from "./formState-DGNcH1XQ.js";
1
+ import { ref as E, computed as p, defineComponent as L, openBlock as s, createElementBlock as c, createElementVNode as d, createBlock as w, unref as r, withCtx as m, Fragment as T, renderList as I, createTextVNode as C, toDisplayString as h, createCommentVNode as F, createVNode as x, renderSlot as H, resolveDynamicComponent as ue, normalizeClass as Y, createSlots as qe, h as wt, watch as te, onBeforeUnmount as $t, resolveComponent as lt, withModifiers as Oe, nextTick as Ie, onMounted as Re, withKeys as xt, normalizeProps as Ue, mergeProps as Ee, normalizeStyle as Fe, inject as st, provide as Ct, createApp as St, reactive as At } from "vue";
2
+ import { defineStore as ne, createPinia as Rt } from "pinia";
3
+ import { RouterLink as Ut, useRouter as le, useRoute as _e, createWebHistory as it, createRouter as Et } from "vue-router";
4
+ import { UidMenu as ot, UidMenuItem as De, UidMenuSeparator as Ft, UidAvatar as rt, UidSidebar as Lt, UidSidebarGroup as Pt, UidSidebarItem as Tt, UidSidebarLayout as Mt, UidCard as q, UidButton as B, UidAlert as Q, UidInput as re, UidCheckbox as Se, UidSkeleton as We, UidErrorState as Nt, UidEmptyState as It, UidTable as je, UidPagination as Bt, UidBadge as Ke, UidSelect as Ae, UidStat as xe, UidHeatmap as Vt, UidGauge as zt, UidFormField as ye, UidTextarea as qt, UidNumberInput as Dt, UidDatePicker as Ot, UidStack as Wt, UidGrid as jt, UidTabs as ut, UidTabPanel as dt, UidTab as Ce, UidDescriptionList as Kt, UidDescriptionItem as Gt, UidDrawer as Ht, UidStepper as Xt, UidFileUpload as Jt, UidProgress as Yt } from "@dskripchenko/ui";
5
+ import Qt from "axios";
6
+ import { p as ct, u as de } from "./formState-DGNcH1XQ.js";
7
7
  import { t as co } from "./formState-DGNcH1XQ.js";
8
- let ve = null;
9
- function Xt(e) {
10
- ve = e;
8
+ let he = null;
9
+ function Zt(e) {
10
+ he = e;
11
11
  }
12
12
  function W() {
13
- if (ve === null)
13
+ if (he === null)
14
14
  throw new Error(
15
15
  "[admin] AdminClient is not registered. Call setAdminClient(...) before using stores."
16
16
  );
17
- return ve;
17
+ return he;
18
18
  }
19
19
  function Ii() {
20
- ve = null;
20
+ he = null;
21
21
  }
22
22
  function Bi() {
23
- return ve !== null;
23
+ return he !== null;
24
24
  }
25
- const De = ee("admin-theme", () => {
25
+ const Ge = ne("admin-theme", () => {
26
26
  const e = E("light"), t = E(["light", "dark"]), n = p(() => e.value === "dark");
27
27
  function o(u) {
28
28
  e.value = u.theme, t.value = u.availableThemes, i(u.theme);
@@ -54,10 +54,10 @@ const De = ee("admin-theme", () => {
54
54
  applyLocal: a,
55
55
  setTheme: l
56
56
  };
57
- }), Jt = ["aria-label", "aria-pressed"], Yt = ["data-icon"], rt = /* @__PURE__ */ L({
57
+ }), en = ["aria-label", "aria-pressed"], tn = ["data-icon"], mt = /* @__PURE__ */ L({
58
58
  __name: "ThemeToggle",
59
59
  setup(e) {
60
- const t = De(), n = p(() => t.current === "dark"), o = p(() => n.value ? "sun" : "moon"), a = p(
60
+ const t = Ge(), n = p(() => t.current === "dark"), o = p(() => n.value ? "sun" : "moon"), a = p(
61
61
  () => n.value ? "Переключить на светлую тему" : "Переключить на тёмную тему"
62
62
  );
63
63
  async function l() {
@@ -74,10 +74,10 @@ const De = ee("admin-theme", () => {
74
74
  d("span", {
75
75
  class: "admin-topbar__icon",
76
76
  "data-icon": o.value
77
- }, null, 8, Yt)
78
- ], 8, Jt));
77
+ }, null, 8, tn)
78
+ ], 8, en));
79
79
  }
80
- }), Oe = ee("admin-locale", () => {
80
+ }), He = ne("admin-locale", () => {
81
81
  const e = E("ru"), t = E(["ru", "en"]);
82
82
  function n(i) {
83
83
  e.value = i.locale, t.value = i.availableLocales, l(i.locale);
@@ -112,21 +112,21 @@ const De = ee("admin-theme", () => {
112
112
  applyLocal: o,
113
113
  setLocale: a
114
114
  };
115
- }), Qt = {
115
+ }), nn = {
116
116
  type: "button",
117
117
  class: "admin-topbar__icon-btn",
118
118
  style: { width: "auto", padding: "0 8px", gap: "4px", "font-size": "12px" },
119
119
  "aria-label": "Сменить локаль"
120
- }, ut = /* @__PURE__ */ L({
120
+ }, ft = /* @__PURE__ */ L({
121
121
  __name: "LocaleSwitcher",
122
122
  setup(e) {
123
- const t = Oe();
123
+ const t = He();
124
124
  async function n(o) {
125
125
  o !== t.current && await t.setLocale(o);
126
126
  }
127
- return (o, a) => (s(), w(r(at), null, {
127
+ return (o, a) => (s(), w(r(ot), null, {
128
128
  trigger: m(() => [
129
- d("button", Qt, [
129
+ d("button", nn, [
130
130
  a[0] || (a[0] = d("span", {
131
131
  class: "admin-topbar__icon",
132
132
  "data-icon": "globe"
@@ -135,7 +135,7 @@ const De = ee("admin-theme", () => {
135
135
  ])
136
136
  ]),
137
137
  default: m(() => [
138
- (s(!0), c(T, null, I(r(t).available, (l) => (s(), w(r(Ie), {
138
+ (s(!0), c(T, null, I(r(t).available, (l) => (s(), w(r(De), {
139
139
  key: l,
140
140
  onClick: (i) => n(l)
141
141
  }, {
@@ -148,46 +148,46 @@ const De = ee("admin-theme", () => {
148
148
  _: 1
149
149
  }));
150
150
  }
151
- }), We = ee("admin-notifications", () => {
151
+ }), Xe = ne("admin-notifications", () => {
152
152
  const e = E([]), t = E(0), n = E(!1), o = E("all"), a = E(null), l = p(() => t.value > 0);
153
- function i(R) {
154
- t.value = R.unread_notifications_count;
153
+ function i(A) {
154
+ t.value = A.unread_notifications_count;
155
155
  }
156
- async function u(R = "all", A = 1) {
156
+ async function u(A = "all", R = 1) {
157
157
  n.value = !0;
158
158
  try {
159
- const g = await W().get(`/notifications/list?type=${R}&page=${A}`);
159
+ const g = await W().get(`/notifications/list?type=${A}&page=${R}`);
160
160
  e.value = g.data, t.value = g.meta.unread_count, a.value = {
161
161
  page: g.meta.page,
162
162
  per_page: g.meta.per_page,
163
163
  total: g.meta.total,
164
164
  last_page: g.meta.last_page
165
- }, o.value = R;
165
+ }, o.value = A;
166
166
  } finally {
167
167
  n.value = !1;
168
168
  }
169
169
  }
170
170
  async function f() {
171
- const A = await W().get(
171
+ const R = await W().get(
172
172
  "/notifications/unread"
173
173
  );
174
- t.value = A.count, o.value === "unread" && (e.value = A.data);
174
+ t.value = R.count, o.value === "unread" && (e.value = R.data);
175
175
  }
176
- async function v(R) {
177
- await W().post("/notifications/markAsRead", { id: R });
178
- const _ = e.value.find((g) => g.id === R);
176
+ async function v(A) {
177
+ await W().post("/notifications/markAsRead", { id: A });
178
+ const _ = e.value.find((g) => g.id === A);
179
179
  _ && _.read_at === null && (_.read_at = (/* @__PURE__ */ new Date()).toISOString(), t.value = Math.max(0, t.value - 1));
180
180
  }
181
181
  async function b() {
182
182
  await W().post("/notifications/markAllAsRead");
183
- const A = (/* @__PURE__ */ new Date()).toISOString();
183
+ const R = (/* @__PURE__ */ new Date()).toISOString();
184
184
  for (const _ of e.value)
185
- _.read_at === null && (_.read_at = A);
185
+ _.read_at === null && (_.read_at = R);
186
186
  t.value = 0;
187
187
  }
188
- async function S(R) {
189
- await W().post("/notifications/destroy", { id: R });
190
- const _ = e.value.findIndex((g) => g.id === R);
188
+ async function S(A) {
189
+ await W().post("/notifications/destroy", { id: A });
190
+ const _ = e.value.findIndex((g) => g.id === A);
191
191
  if (_ !== -1) {
192
192
  const g = e.value[_].read_at === null;
193
193
  e.value.splice(_, 1), g && (t.value = Math.max(0, t.value - 1));
@@ -207,14 +207,14 @@ const De = ee("admin-theme", () => {
207
207
  markAllAsRead: b,
208
208
  destroy: S
209
209
  };
210
- }), Zt = ["title"], en = /* @__PURE__ */ L({
210
+ }), an = ["title"], ln = /* @__PURE__ */ L({
211
211
  __name: "NotificationBell",
212
212
  setup(e) {
213
- const t = We(), n = p(() => {
213
+ const t = Xe(), n = p(() => {
214
214
  const o = t.unreadCount;
215
215
  return o <= 0 ? null : o > 99 ? "99+" : String(o);
216
216
  });
217
- return (o, a) => (s(), w(r(Ct), {
217
+ return (o, a) => (s(), w(r(Ut), {
218
218
  to: "/notifications",
219
219
  class: "admin-topbar__icon-btn",
220
220
  "aria-label": "Уведомления"
@@ -228,13 +228,13 @@ const De = ee("admin-theme", () => {
228
228
  key: 0,
229
229
  class: "admin-topbar__bell-badge",
230
230
  title: `Непрочитанных: ${r(t).unreadCount}`
231
- }, h(n.value), 9, Zt)) : F("", !0)
231
+ }, h(n.value), 9, an)) : F("", !0)
232
232
  ]),
233
233
  _: 1
234
234
  }));
235
235
  }
236
236
  });
237
- class Q extends Error {
237
+ class Z extends Error {
238
238
  status;
239
239
  errorKey;
240
240
  payload;
@@ -242,22 +242,22 @@ class Q extends Error {
242
242
  super(n.message ?? `API error ${t}`), this.name = "ApiError", this.status = t, this.errorKey = n.errorKey ?? "unknown", this.payload = n;
243
243
  }
244
244
  }
245
- class dt extends Q {
245
+ class vt extends Z {
246
246
  constructor(t) {
247
247
  super(401, t), this.name = "UnauthenticatedError";
248
248
  }
249
249
  }
250
- class tn extends Q {
250
+ class sn extends Z {
251
251
  constructor(t) {
252
252
  super(403, t), this.name = "ForbiddenError";
253
253
  }
254
254
  }
255
- class nn extends Q {
255
+ class on extends Z {
256
256
  constructor(t) {
257
257
  super(404, t), this.name = "NotFoundError";
258
258
  }
259
259
  }
260
- class Re extends Q {
260
+ class Le extends Z {
261
261
  /** Field-keyed map of error messages. */
262
262
  fields;
263
263
  constructor(t) {
@@ -271,26 +271,26 @@ class Re extends Q {
271
271
  return null;
272
272
  }
273
273
  }
274
- class Ue extends Error {
274
+ class Pe extends Error {
275
275
  constructor(t = "Network error") {
276
276
  super(t), this.name = "NetworkError";
277
277
  }
278
278
  }
279
- function Ke(e, t) {
279
+ function Ye(e, t) {
280
280
  switch (e) {
281
281
  case 401:
282
- return new dt(t);
282
+ return new vt(t);
283
283
  case 403:
284
- return new tn(t);
284
+ return new sn(t);
285
285
  case 404:
286
- return new nn(t);
286
+ return new on(t);
287
287
  case 422:
288
- return new Re(t);
288
+ return new Le(t);
289
289
  default:
290
- return new Q(e, t);
290
+ return new Z(e, t);
291
291
  }
292
292
  }
293
- const X = ee("admin-auth", () => {
293
+ const J = ne("admin-auth", () => {
294
294
  const e = E(null), t = E([]), n = E(null), o = p(() => e.value !== null), a = p(() => n.value !== null);
295
295
  function l(_) {
296
296
  e.value = _.user, t.value = _.permissions;
@@ -317,7 +317,7 @@ const X = ee("admin-auth", () => {
317
317
  );
318
318
  return U?.user && (e.value = U.user), Array.isArray(U?.permissions) && (t.value = U.permissions), n.value = null, "authenticated";
319
319
  } catch (U) {
320
- if (U instanceof Q && U.errorKey === "two_factor_required") {
320
+ if (U instanceof Z && U.errorKey === "two_factor_required") {
321
321
  const P = U.payload.challenge_token;
322
322
  return n.value = {
323
323
  challengeToken: typeof P == "string" ? P : "",
@@ -345,10 +345,10 @@ const X = ee("admin-auth", () => {
345
345
  });
346
346
  return e.value = U.user, n.value = null, { remaining: U.recovery_codes_remaining };
347
347
  }
348
- function R() {
348
+ function A() {
349
349
  n.value = null;
350
350
  }
351
- async function A() {
351
+ async function R() {
352
352
  const _ = W();
353
353
  try {
354
354
  await _.post("/auth/logout");
@@ -372,19 +372,19 @@ const X = ee("admin-auth", () => {
372
372
  login: v,
373
373
  twoFactorChallenge: b,
374
374
  twoFactorRecovery: S,
375
- cancelChallenge: R,
376
- logout: A
375
+ cancelChallenge: A,
376
+ logout: R
377
377
  };
378
- }), an = {
378
+ }), rn = {
379
379
  type: "button",
380
380
  class: "admin-topbar__icon-btn admin-user-menu__trigger",
381
381
  "aria-label": "Меню пользователя",
382
382
  "aria-haspopup": "menu",
383
383
  style: { width: "auto", padding: "0 4px", gap: "8px" }
384
- }, ln = /* @__PURE__ */ L({
384
+ }, un = /* @__PURE__ */ L({
385
385
  __name: "UserMenu",
386
386
  setup(e) {
387
- const t = X(), n = ne();
387
+ const t = J(), n = le();
388
388
  async function o() {
389
389
  try {
390
390
  await t.logout();
@@ -395,10 +395,10 @@ const X = ee("admin-auth", () => {
395
395
  function a() {
396
396
  n.push({ name: "admin.profile" });
397
397
  }
398
- return (l, i) => (s(), w(r(at), null, {
398
+ return (l, i) => (s(), w(r(ot), null, {
399
399
  trigger: m(() => [
400
- d("button", an, [
401
- x(r(lt), {
400
+ d("button", rn, [
401
+ x(r(rt), {
402
402
  src: r(t).user?.avatar ?? void 0,
403
403
  name: r(t).user?.name ?? "?",
404
404
  alt: r(t).user?.name ?? "User",
@@ -407,14 +407,14 @@ const X = ee("admin-auth", () => {
407
407
  ])
408
408
  ]),
409
409
  default: m(() => [
410
- x(r(Ie), { onClick: a }, {
410
+ x(r(De), { onClick: a }, {
411
411
  default: m(() => [...i[0] || (i[0] = [
412
412
  C("Профиль", -1)
413
413
  ])]),
414
414
  _: 1
415
415
  }),
416
- x(r(At)),
417
- x(r(Ie), {
416
+ x(r(Ft)),
417
+ x(r(De), {
418
418
  variant: "danger",
419
419
  onClick: o
420
420
  }, {
@@ -427,10 +427,10 @@ const X = ee("admin-auth", () => {
427
427
  _: 1
428
428
  }));
429
429
  }
430
- }), sn = { class: "admin-topbar" }, on = { class: "admin-topbar__breadcrumbs" }, rn = {
430
+ }), dn = { class: "admin-topbar" }, cn = { class: "admin-topbar__breadcrumbs" }, mn = {
431
431
  key: 0,
432
432
  class: "sep"
433
- }, un = /* @__PURE__ */ L({
433
+ }, fn = /* @__PURE__ */ L({
434
434
  __name: "AdminTopBar",
435
435
  props: {
436
436
  breadcrumbs: { default: () => [] },
@@ -439,7 +439,7 @@ const X = ee("admin-auth", () => {
439
439
  emits: ["toggle-sidebar"],
440
440
  setup(e, { emit: t }) {
441
441
  const n = e, o = t, a = p(() => n.breadcrumbs.length - 1);
442
- return (l, i) => (s(), c("header", sn, [
442
+ return (l, i) => (s(), c("header", dn, [
443
443
  e.showCollapseToggle ? (s(), c("button", {
444
444
  key: 0,
445
445
  type: "button",
@@ -452,13 +452,13 @@ const X = ee("admin-auth", () => {
452
452
  "data-icon": "panel-left"
453
453
  }, null, -1)
454
454
  ])])) : F("", !0),
455
- d("div", on, [
455
+ d("div", cn, [
456
456
  H(l.$slots, "breadcrumbs", {}, () => [
457
457
  (s(!0), c(T, null, I(e.breadcrumbs, (u, f) => (s(), c(T, { key: f }, [
458
- f > 0 ? (s(), c("span", rn, "›")) : F("", !0),
459
- (s(), w(oe(u.to ? "a" : "span"), {
458
+ f > 0 ? (s(), c("span", mn, "›")) : F("", !0),
459
+ (s(), w(ue(u.to ? "a" : "span"), {
460
460
  href: typeof u.to == "string" ? u.to : void 0,
461
- class: J(f === a.value ? "cur" : "")
461
+ class: Y(f === a.value ? "cur" : "")
462
462
  }, {
463
463
  default: m(() => [
464
464
  C(h(u.label), 1)
@@ -484,33 +484,33 @@ const X = ee("admin-auth", () => {
484
484
  ], -1))
485
485
  ]),
486
486
  H(l.$slots, "actions"),
487
- x(en),
488
- x(rt),
489
- x(ut),
490
- x(ln)
487
+ x(ln),
488
+ x(mt),
489
+ x(ft),
490
+ x(un)
491
491
  ]));
492
492
  }
493
- }), dn = ee("admin-menu", () => {
493
+ }), vn = ne("admin-menu", () => {
494
494
  const e = E([]), t = E(!1), n = E(null), o = E(!1), a = p(() => {
495
- const v = X(), b = (S) => {
495
+ const v = J(), b = (S) => {
496
496
  if (Array.isArray(S.permissions) && S.permissions.length > 0 && !v.hasAnyPermission(S.permissions))
497
497
  return null;
498
- const R = (S.children ?? []).map(b).filter((A) => A !== null);
499
- return { ...S, children: R };
498
+ const A = (S.children ?? []).map(b).filter((R) => R !== null);
499
+ return { ...S, children: A };
500
500
  };
501
501
  return e.value.map(b).filter((S) => S !== null);
502
502
  }), l = p(() => {
503
503
  const v = /* @__PURE__ */ new Map();
504
504
  for (const S of a.value) {
505
- const R = S.group ?? null;
506
- v.has(R) || v.set(R, []), v.get(R).push(S);
505
+ const A = S.group ?? null;
506
+ v.has(A) || v.set(A, []), v.get(A).push(S);
507
507
  }
508
508
  const b = [];
509
- for (const [S, R] of v)
510
- R.sort((A, _) => {
511
- const g = (A.order ?? 0) - (_.order ?? 0);
512
- return g !== 0 ? g : A.label.localeCompare(_.label);
513
- }), b.push({ group: S, items: R });
509
+ for (const [S, A] of v)
510
+ A.sort((R, _) => {
511
+ const g = (R.order ?? 0) - (_.order ?? 0);
512
+ return g !== 0 ? g : R.label.localeCompare(_.label);
513
+ }), b.push({ group: S, items: A });
514
514
  return b;
515
515
  });
516
516
  async function i(v = !1) {
@@ -542,16 +542,16 @@ const X = ee("admin-auth", () => {
542
542
  setItems: u,
543
543
  reset: f
544
544
  };
545
- }), cn = { class: "admin-sidebar-brand" }, mn = { class: "admin-sidebar-brand__mark" }, fn = {
545
+ }), pn = { class: "admin-sidebar-brand" }, gn = { class: "admin-sidebar-brand__mark" }, hn = {
546
546
  key: 0,
547
547
  class: "admin-sidebar-brand__name"
548
- }, vn = {
548
+ }, _n = {
549
549
  key: 0,
550
550
  class: "admin-sidebar-tenant"
551
- }, pn = { class: "admin-sidebar-foot" }, gn = {
551
+ }, yn = { class: "admin-sidebar-foot" }, bn = {
552
552
  key: 0,
553
553
  class: "admin-sidebar-foot__text"
554
- }, hn = ["href"], _n = /* @__PURE__ */ L({
554
+ }, kn = ["href"], wn = /* @__PURE__ */ L({
555
555
  __name: "AdminSidebar",
556
556
  props: {
557
557
  collapsed: { type: Boolean, default: !1 },
@@ -562,41 +562,41 @@ const X = ee("admin-auth", () => {
562
562
  docsUrl: { default: null }
563
563
  },
564
564
  setup(e) {
565
- const t = dn(), n = pe(), o = p(() => t.groupedItems);
565
+ const t = vn(), n = _e(), o = p(() => t.groupedItems);
566
566
  function a(u) {
567
567
  return !!(u.routeName && n.name === u.routeName || u.url && n.path === u.url);
568
568
  }
569
569
  function l(u) {
570
570
  if (u)
571
- return () => _t("span", { class: "admin-sidebar__icon", "data-icon": u });
571
+ return () => wt("span", { class: "admin-sidebar__icon", "data-icon": u });
572
572
  }
573
573
  function i(u) {
574
574
  if (u.routeName) return { name: u.routeName };
575
575
  if (u.url) return u.url;
576
576
  }
577
- return (u, f) => (s(), w(r(Rt), { collapsed: e.collapsed }, Ne({
577
+ return (u, f) => (s(), w(r(Lt), { collapsed: e.collapsed }, qe({
578
578
  header: m(() => [
579
- d("div", cn, [
580
- d("div", mn, h(e.brandMark), 1),
581
- e.collapsed ? F("", !0) : (s(), c("div", fn, h(e.brandName), 1))
579
+ d("div", pn, [
580
+ d("div", gn, h(e.brandMark), 1),
581
+ e.collapsed ? F("", !0) : (s(), c("div", hn, h(e.brandName), 1))
582
582
  ]),
583
- e.tenant && !e.collapsed ? (s(), c("div", vn, [
583
+ e.tenant && !e.collapsed ? (s(), c("div", _n, [
584
584
  d("span", null, h(e.tenant.label), 1),
585
585
  d("b", null, h(e.tenant.name), 1)
586
586
  ])) : F("", !0)
587
587
  ]),
588
588
  nav: m(() => [
589
- (s(!0), c(T, null, I(o.value, (v, b) => (s(), w(r(Ut), {
589
+ (s(!0), c(T, null, I(o.value, (v, b) => (s(), w(r(Pt), {
590
590
  key: `grp-${b}`,
591
591
  title: v.group ?? void 0
592
592
  }, {
593
593
  default: m(() => [
594
- (s(!0), c(T, null, I(v.items, (S) => (s(), w(r(Et), {
594
+ (s(!0), c(T, null, I(v.items, (S) => (s(), w(r(Tt), {
595
595
  key: S.key,
596
596
  to: i(S),
597
597
  active: a(S),
598
598
  badge: S.badge ?? void 0
599
- }, Ne({
599
+ }, qe({
600
600
  default: m(() => [
601
601
  C(" " + h(S.label), 1)
602
602
  ]),
@@ -605,7 +605,7 @@ const X = ee("admin-auth", () => {
605
605
  S.icon ? {
606
606
  name: "icon",
607
607
  fn: m(() => [
608
- (s(), w(oe(l(S.icon))))
608
+ (s(), w(ue(l(S.icon))))
609
609
  ]),
610
610
  key: "0"
611
611
  } : void 0
@@ -619,24 +619,24 @@ const X = ee("admin-auth", () => {
619
619
  e.version || e.docsUrl ? {
620
620
  name: "footer",
621
621
  fn: m(() => [
622
- d("div", pn, [
623
- e.version ? (s(), c("span", gn, h(e.version), 1)) : F("", !0),
622
+ d("div", yn, [
623
+ e.version ? (s(), c("span", bn, h(e.version), 1)) : F("", !0),
624
624
  e.docsUrl ? (s(), c("a", {
625
625
  key: 1,
626
626
  href: e.docsUrl,
627
627
  class: "admin-sidebar-foot__text admin-sidebar-foot__link"
628
- }, " Docs ", 8, hn)) : F("", !0)
628
+ }, " Docs ", 8, kn)) : F("", !0)
629
629
  ])
630
630
  ]),
631
631
  key: "0"
632
632
  } : void 0
633
633
  ]), 1032, ["collapsed"]));
634
634
  }
635
- }), yn = { class: "admin-shell-root" }, bn = {
635
+ }), $n = { class: "admin-shell-root" }, xn = {
636
636
  key: 0,
637
637
  class: "admin-impersonation-banner",
638
638
  role: "status"
639
- }, Te = "data-admin-impersonating", kn = /* @__PURE__ */ L({
639
+ }, Be = "data-admin-impersonating", Cn = /* @__PURE__ */ L({
640
640
  __name: "AdminShell",
641
641
  props: {
642
642
  collapsed: { type: Boolean, default: !1 },
@@ -651,16 +651,16 @@ const X = ee("admin-auth", () => {
651
651
  function l() {
652
652
  o("exit-impersonation");
653
653
  }
654
- return Z(
654
+ return te(
655
655
  () => n.impersonation,
656
656
  (i) => {
657
- typeof document > "u" || (i !== null ? document.documentElement.setAttribute(Te, "true") : document.documentElement.removeAttribute(Te));
657
+ typeof document > "u" || (i !== null ? document.documentElement.setAttribute(Be, "true") : document.documentElement.removeAttribute(Be));
658
658
  },
659
659
  { immediate: !0 }
660
- ), yt(() => {
661
- typeof document < "u" && document.documentElement.removeAttribute(Te);
662
- }), (i, u) => (s(), c("div", yn, [
663
- e.impersonation ? (s(), c("div", bn, [
660
+ ), $t(() => {
661
+ typeof document < "u" && document.documentElement.removeAttribute(Be);
662
+ }), (i, u) => (s(), c("div", $n, [
663
+ e.impersonation ? (s(), c("div", xn, [
664
664
  d("span", null, [
665
665
  u[1] || (u[1] = C(" Вы вошли как ", -1)),
666
666
  d("b", null, h(e.impersonation.asName), 1),
@@ -672,18 +672,18 @@ const X = ee("admin-auth", () => {
672
672
  onClick: l
673
673
  }, " Выйти из режима ")
674
674
  ])) : F("", !0),
675
- x(r(Ft), {
675
+ x(r(Mt), {
676
676
  "model-value": e.collapsed,
677
677
  "onUpdate:modelValue": a
678
678
  }, {
679
679
  sidebar: m(() => [
680
680
  H(i.$slots, "sidebar", {}, () => [
681
- x(_n, { collapsed: e.collapsed }, null, 8, ["collapsed"])
681
+ x(wn, { collapsed: e.collapsed }, null, 8, ["collapsed"])
682
682
  ])
683
683
  ]),
684
684
  header: m(() => [
685
685
  H(i.$slots, "topbar", {}, () => [
686
- x(un, {
686
+ x(fn, {
687
687
  onToggleSidebar: u[0] || (u[0] = (f) => a(!e.collapsed))
688
688
  })
689
689
  ])
@@ -695,13 +695,13 @@ const X = ee("admin-auth", () => {
695
695
  }, 8, ["model-value"])
696
696
  ]));
697
697
  }
698
- }), wn = /* @__PURE__ */ L({
698
+ }), Sn = /* @__PURE__ */ L({
699
699
  __name: "AdminApp",
700
700
  setup(e) {
701
- const t = pe(), n = p(() => !(t.meta?.fullscreen === !0 || t.meta?.kind === "auth" || t.name === "admin.notFound"));
701
+ const t = _e(), n = p(() => !(t.meta?.fullscreen === !0 || t.meta?.kind === "auth" || t.name === "admin.notFound"));
702
702
  return (o, a) => {
703
- const l = et("router-view");
704
- return n.value ? (s(), w(kn, { key: 0 }, {
703
+ const l = lt("router-view");
704
+ return n.value ? (s(), w(Cn, { key: 0 }, {
705
705
  default: m(() => [
706
706
  x(l)
707
707
  ]),
@@ -709,7 +709,7 @@ const X = ee("admin-auth", () => {
709
709
  })) : (s(), w(l, { key: 1 }));
710
710
  };
711
711
  }
712
- }), ae = ee("admin-manifest", () => {
712
+ }), se = ne("admin-manifest", () => {
713
713
  const e = E(null), t = E(!1), n = E(null), o = p(() => e.value !== null), a = p(() => e.value?.version ?? null), l = p(() => e.value?.resources ?? []), i = p(() => e.value?.screens ?? []), u = p(() => e.value?.settings ?? []), f = p(() => e.value?.plugins ?? []);
714
714
  function v(_) {
715
715
  return l.value.find((g) => g.slug === _) ?? null;
@@ -720,7 +720,7 @@ const X = ee("admin-auth", () => {
720
720
  function S(_) {
721
721
  return u.value.find((g) => g.slug === _) ?? null;
722
722
  }
723
- async function R(_ = !1) {
723
+ async function A(_ = !1) {
724
724
  if (e.value !== null && !_)
725
725
  return e.value;
726
726
  t.value = !0, n.value = null;
@@ -733,7 +733,7 @@ const X = ee("admin-auth", () => {
733
733
  t.value = !1;
734
734
  }
735
735
  }
736
- function A() {
736
+ function R() {
737
737
  e.value = null, n.value = null, t.value = !1;
738
738
  }
739
739
  return {
@@ -752,30 +752,30 @@ const X = ee("admin-auth", () => {
752
752
  getResource: v,
753
753
  getScreen: b,
754
754
  getSettings: S,
755
- load: R,
756
- reset: A
755
+ load: A,
756
+ reset: R
757
757
  };
758
- }), $n = { class: "admin-home" }, xn = { class: "admin-home__title" }, Cn = {
758
+ }), An = { class: "admin-home" }, Rn = { class: "admin-home__title" }, Un = {
759
759
  key: 0,
760
760
  class: "admin-home__resources"
761
- }, Sn = { class: "admin-home__grid" }, An = ["onClick"], Rn = { class: "admin-home__card-label" }, Un = { class: "admin-home__card-slug" }, En = /* @__PURE__ */ L({
761
+ }, En = { class: "admin-home__grid" }, Fn = ["onClick"], Ln = { class: "admin-home__card-label" }, Pn = { class: "admin-home__card-slug" }, Tn = /* @__PURE__ */ L({
762
762
  __name: "HomePage",
763
763
  setup(e) {
764
- const t = ae(), n = X(), o = ne(), a = p(() => n.user?.name ?? ""), l = p(() => t.manifest?.resources ?? []);
765
- return (i, u) => (s(), c("div", $n, [
764
+ const t = se(), n = J(), o = le(), a = p(() => n.user?.name ?? ""), l = p(() => t.manifest?.resources ?? []);
765
+ return (i, u) => (s(), c("div", An, [
766
766
  x(r(q), {
767
767
  padding: "lg",
768
768
  class: "admin-home__hero"
769
769
  }, {
770
770
  default: m(() => [
771
- d("h1", xn, "Добро пожаловать" + h(a.value ? ", " + a.value : ""), 1),
771
+ d("h1", Rn, "Добро пожаловать" + h(a.value ? ", " + a.value : ""), 1),
772
772
  u[0] || (u[0] = d("p", { class: "admin-home__lead" }, " Админ-панель готова. Воспользуйтесь сайдбаром или переходите к ресурсам ниже. ", -1))
773
773
  ]),
774
774
  _: 1
775
775
  }),
776
- l.value.length ? (s(), c("section", Cn, [
776
+ l.value.length ? (s(), c("section", Un, [
777
777
  u[1] || (u[1] = d("h2", { class: "admin-home__heading" }, "Ресурсы", -1)),
778
- d("ul", Sn, [
778
+ d("ul", En, [
779
779
  (s(!0), c(T, null, I(l.value, (f) => (s(), c("li", {
780
780
  key: f.slug
781
781
  }, [
@@ -784,19 +784,19 @@ const X = ee("admin-auth", () => {
784
784
  class: "admin-home__card",
785
785
  onClick: (v) => r(o).push({ name: `admin.resource.${f.slug}.index` })
786
786
  }, [
787
- d("span", Rn, h(f.label), 1),
788
- d("span", Un, h(f.slug), 1)
789
- ], 8, An)
787
+ d("span", Ln, h(f.label), 1),
788
+ d("span", Pn, h(f.slug), 1)
789
+ ], 8, Fn)
790
790
  ]))), 128))
791
791
  ])
792
792
  ])) : F("", !0)
793
793
  ]));
794
794
  }
795
- }), Fn = { class: "admin-status-page" }, Ln = /* @__PURE__ */ L({
795
+ }), Mn = { class: "admin-status-page" }, Nn = /* @__PURE__ */ L({
796
796
  __name: "ForbiddenPage",
797
797
  setup(e) {
798
- const t = ne();
799
- return (n, o) => (s(), c("div", Fn, [
798
+ const t = le();
799
+ return (n, o) => (s(), c("div", Mn, [
800
800
  x(r(q), {
801
801
  padding: "lg",
802
802
  class: "admin-status-page__card"
@@ -818,11 +818,11 @@ const X = ee("admin-auth", () => {
818
818
  })
819
819
  ]));
820
820
  }
821
- }), Pn = { class: "admin-status-page" }, Tn = /* @__PURE__ */ L({
821
+ }), In = { class: "admin-status-page" }, Bn = /* @__PURE__ */ L({
822
822
  __name: "NotFoundPage",
823
823
  setup(e) {
824
- const t = ne();
825
- return (n, o) => (s(), c("div", Pn, [
824
+ const t = le();
825
+ return (n, o) => (s(), c("div", In, [
826
826
  x(r(q), {
827
827
  padding: "lg",
828
828
  class: "admin-status-page__card"
@@ -844,38 +844,38 @@ const X = ee("admin-auth", () => {
844
844
  })
845
845
  ]));
846
846
  }
847
- }), Mn = { class: "admin-settings-page" }, Nn = { class: "admin-settings-page__title" }, In = {
847
+ }), Vn = { class: "admin-settings-page" }, zn = { class: "admin-settings-page__title" }, qn = {
848
848
  key: 0,
849
849
  class: "admin-settings-page__hint"
850
- }, Bn = {
850
+ }, Dn = {
851
851
  key: 1,
852
852
  class: "admin-settings-page__debug"
853
- }, Vn = /* @__PURE__ */ L({
853
+ }, On = /* @__PURE__ */ L({
854
854
  __name: "SettingsPage",
855
855
  setup(e) {
856
- const t = pe(), n = ae(), o = p(() => String(t.params.slug ?? "")), a = p(() => n.manifest?.settings?.find((l) => l.slug === o.value) ?? null);
857
- return (l, i) => (s(), c("div", Mn, [
856
+ const t = _e(), n = se(), o = p(() => String(t.params.slug ?? "")), a = p(() => n.manifest?.settings?.find((l) => l.slug === o.value) ?? null);
857
+ return (l, i) => (s(), c("div", Vn, [
858
858
  x(r(q), { padding: "lg" }, {
859
859
  default: m(() => [
860
- d("h1", Nn, h(a.value?.label ?? o.value), 1),
861
- a.value ? (s(), c("pre", Bn, h(JSON.stringify(a.value.fields, null, 2)), 1)) : (s(), c("p", In, " Settings «" + h(o.value) + "» не найдено в manifest'е. ", 1))
860
+ d("h1", zn, h(a.value?.label ?? o.value), 1),
861
+ a.value ? (s(), c("pre", Dn, h(JSON.stringify(a.value.fields, null, 2)), 1)) : (s(), c("p", qn, " Settings «" + h(o.value) + "» не найдено в manifest'е. ", 1))
862
862
  ]),
863
863
  _: 1
864
864
  })
865
865
  ]));
866
866
  }
867
- }), zn = { class: "admin-status-page" }, qn = { class: "admin-status-page__title" }, Dn = { class: "admin-status-page__hint" }, On = /* @__PURE__ */ L({
867
+ }), Wn = { class: "admin-status-page" }, jn = { class: "admin-status-page__title" }, Kn = { class: "admin-status-page__hint" }, Gn = /* @__PURE__ */ L({
868
868
  __name: "UnknownScreenPage",
869
869
  setup(e) {
870
- const t = pe(), n = p(() => String(t.params.slug ?? "")), o = p(() => String(t.meta?.title ?? n.value));
871
- return (a, l) => (s(), c("div", zn, [
870
+ const t = _e(), n = p(() => String(t.params.slug ?? "")), o = p(() => String(t.meta?.title ?? n.value));
871
+ return (a, l) => (s(), c("div", Wn, [
872
872
  x(r(q), {
873
873
  padding: "lg",
874
874
  class: "admin-status-page__card"
875
875
  }, {
876
876
  default: m(() => [
877
- d("h1", qn, h(o.value), 1),
878
- d("p", Dn, [
877
+ d("h1", jn, h(o.value), 1),
878
+ d("p", Kn, [
879
879
  C(" Это заглушка для screen «" + h(n.value) + "». Передайте свой компонент через ", 1),
880
880
  l[0] || (l[0] = d("code", null, "createAdminApp(" + h("{") + " pages: " + h("{") + " screen: MyScreen " + h("}") + " " + h("}") + ")", -1)),
881
881
  l[1] || (l[1] = C(". ", -1))
@@ -885,10 +885,10 @@ const X = ee("admin-auth", () => {
885
885
  })
886
886
  ]));
887
887
  }
888
- }), Wn = { class: "admin-auth-card__row" }, jn = ["href"], Kn = {
888
+ }), Hn = { class: "admin-auth-card__row" }, Xn = ["href"], Jn = {
889
889
  key: 1,
890
890
  style: { "text-align": "center", "font-size": "var(--uid-font-size-xs)", color: "var(--uid-text-secondary)", "padding-top": "4px" }
891
- }, Gn = ["href"], Hn = /* @__PURE__ */ L({
891
+ }, Yn = ["href"], Qn = /* @__PURE__ */ L({
892
892
  __name: "LoginForm",
893
893
  props: {
894
894
  forgotUrl: { default: null },
@@ -897,30 +897,30 @@ const X = ee("admin-auth", () => {
897
897
  },
898
898
  emits: ["success"],
899
899
  setup(e, { emit: t }) {
900
- const n = t, o = X(), a = E(""), l = E(""), i = E(!1), u = E(!1), f = E(null), v = E({}), b = p(() => v.value.email?.[0]), S = p(() => v.value.password?.[0]);
901
- async function R() {
900
+ const n = t, o = J(), a = E(""), l = E(""), i = E(!1), u = E(!1), f = E(null), v = E({}), b = p(() => v.value.email?.[0]), S = p(() => v.value.password?.[0]);
901
+ async function A() {
902
902
  if (!u.value) {
903
903
  u.value = !0, f.value = null, v.value = {};
904
904
  try {
905
- const A = await o.login({
905
+ const R = await o.login({
906
906
  email: a.value,
907
907
  password: l.value,
908
908
  remember: i.value
909
909
  });
910
- n("success", A);
911
- } catch (A) {
912
- A instanceof Re ? (v.value = A.fields, f.value = A.firstFieldMessage()) : A instanceof Ue ? f.value = "Нет соединения с сервером" : A instanceof Q ? f.value = A.message || "Не удалось войти" : f.value = A.message;
910
+ n("success", R);
911
+ } catch (R) {
912
+ R instanceof Le ? (v.value = R.fields, f.value = R.firstFieldMessage()) : R instanceof Pe ? f.value = "Нет соединения с сервером" : R instanceof Z ? f.value = R.message || "Не удалось войти" : f.value = R.message;
913
913
  } finally {
914
914
  u.value = !1;
915
915
  }
916
916
  }
917
917
  }
918
- return (A, _) => (s(), c("form", {
918
+ return (R, _) => (s(), c("form", {
919
919
  class: "admin-auth-card__bd",
920
920
  novalidate: "",
921
- onSubmit: Be(R, ["prevent"])
921
+ onSubmit: Oe(A, ["prevent"])
922
922
  }, [
923
- f.value ? (s(), w(r(Y), {
923
+ f.value ? (s(), w(r(Q), {
924
924
  key: 0,
925
925
  variant: "danger",
926
926
  class: "admin-auth-card__alert",
@@ -931,7 +931,7 @@ const X = ee("admin-auth", () => {
931
931
  ]),
932
932
  _: 1
933
933
  })) : F("", !0),
934
- x(r(ie), {
934
+ x(r(re), {
935
935
  modelValue: a.value,
936
936
  "onUpdate:modelValue": _[0] || (_[0] = (g) => a.value = g),
937
937
  type: "email",
@@ -943,7 +943,7 @@ const X = ee("admin-auth", () => {
943
943
  error: b.value,
944
944
  name: "email"
945
945
  }, null, 8, ["modelValue", "disabled", "error"]),
946
- x(r(ie), {
946
+ x(r(re), {
947
947
  modelValue: l.value,
948
948
  "onUpdate:modelValue": _[1] || (_[1] = (g) => l.value = g),
949
949
  type: "password",
@@ -954,8 +954,8 @@ const X = ee("admin-auth", () => {
954
954
  error: S.value,
955
955
  name: "password"
956
956
  }, null, 8, ["modelValue", "disabled", "error"]),
957
- d("div", Wn, [
958
- x(r(we), {
957
+ d("div", Hn, [
958
+ x(r(Se), {
959
959
  modelValue: i.value,
960
960
  "onUpdate:modelValue": _[2] || (_[2] = (g) => i.value = g),
961
961
  disabled: u.value
@@ -969,7 +969,7 @@ const X = ee("admin-auth", () => {
969
969
  key: 0,
970
970
  href: e.forgotUrl,
971
971
  class: "admin-auth-card__link"
972
- }, " Забыли пароль? ", 8, jn)) : F("", !0)
972
+ }, " Забыли пароль? ", 8, Xn)) : F("", !0)
973
973
  ]),
974
974
  x(r(B), {
975
975
  type: "submit",
@@ -983,29 +983,29 @@ const X = ee("admin-auth", () => {
983
983
  ]),
984
984
  _: 1
985
985
  }, 8, ["loading", "disabled"]),
986
- e.ssoLinkLabel && e.ssoUrl ? (s(), c("div", Kn, [
986
+ e.ssoLinkLabel && e.ssoUrl ? (s(), c("div", Jn, [
987
987
  _[4] || (_[4] = C(" или войдите через ", -1)),
988
988
  d("a", {
989
989
  href: e.ssoUrl,
990
990
  class: "admin-auth-card__link"
991
- }, h(e.ssoLinkLabel), 9, Gn)
991
+ }, h(e.ssoLinkLabel), 9, Yn)
992
992
  ])) : F("", !0)
993
993
  ], 32));
994
994
  }
995
- }), Xn = ["value", "disabled", "aria-label", "onInput", "onKeydown"], Jn = { class: "admin-auth-card__row" }, Yn = /* @__PURE__ */ L({
995
+ }), Zn = ["value", "disabled", "aria-label", "onInput", "onKeydown"], ea = { class: "admin-auth-card__row" }, ta = /* @__PURE__ */ L({
996
996
  __name: "TwoFactorForm",
997
997
  emits: ["success", "cancel"],
998
998
  setup(e, { emit: t }) {
999
- const n = t, o = X(), a = E("totp"), l = E(["", "", "", "", "", ""]), i = E(""), u = E([]), f = E(!1), v = E(null), b = E(null), S = p(() => l.value.join("")), R = p(() => a.value === "totp" ? S.value.length === 6 : i.value.trim().length > 0);
1000
- function A($, V) {
999
+ const n = t, o = J(), a = E("totp"), l = E(["", "", "", "", "", ""]), i = E(""), u = E([]), f = E(!1), v = E(null), b = E(null), S = p(() => l.value.join("")), A = p(() => a.value === "totp" ? S.value.length === 6 : i.value.trim().length > 0);
1000
+ function R($, V) {
1001
1001
  V instanceof HTMLInputElement && (u.value[$] = V);
1002
1002
  }
1003
1003
  function _($, V) {
1004
1004
  const j = V.target, D = j.value.replace(/\D/g, "").slice(-1);
1005
- l.value[$] = D, j.value = D, D && $ < l.value.length - 1 && Pe(() => u.value[$ + 1]?.focus()), S.value.length === l.value.length && P();
1005
+ l.value[$] = D, j.value = D, D && $ < l.value.length - 1 && Ie(() => u.value[$ + 1]?.focus()), S.value.length === l.value.length && P();
1006
1006
  }
1007
1007
  function g($, V) {
1008
- V.key === "Backspace" && !l.value[$] && $ > 0 ? Pe(() => u.value[$ - 1]?.focus()) : V.key === "ArrowLeft" && $ > 0 ? (u.value[$ - 1]?.focus(), V.preventDefault()) : V.key === "ArrowRight" && $ < l.value.length - 1 && (u.value[$ + 1]?.focus(), V.preventDefault());
1008
+ V.key === "Backspace" && !l.value[$] && $ > 0 ? Ie(() => u.value[$ - 1]?.focus()) : V.key === "ArrowLeft" && $ > 0 ? (u.value[$ - 1]?.focus(), V.preventDefault()) : V.key === "ArrowRight" && $ < l.value.length - 1 && (u.value[$ + 1]?.focus(), V.preventDefault());
1009
1009
  }
1010
1010
  function U($) {
1011
1011
  const j = ($.clipboardData?.getData("text") ?? "").replace(/\D/g, "").slice(0, l.value.length);
@@ -1013,13 +1013,13 @@ const X = ee("admin-auth", () => {
1013
1013
  $.preventDefault();
1014
1014
  for (let D = 0; D < l.value.length; D++)
1015
1015
  l.value[D] = j[D] ?? "";
1016
- Pe(() => {
1016
+ Ie(() => {
1017
1017
  u.value[Math.min(j.length, l.value.length - 1)]?.focus(), j.length === l.value.length && P();
1018
1018
  });
1019
1019
  }
1020
1020
  }
1021
1021
  async function P() {
1022
- if (!(f.value || !R.value)) {
1022
+ if (!(f.value || !A.value)) {
1023
1023
  f.value = !0, v.value = null;
1024
1024
  try {
1025
1025
  if (a.value === "totp")
@@ -1030,7 +1030,7 @@ const X = ee("admin-auth", () => {
1030
1030
  }
1031
1031
  n("success");
1032
1032
  } catch ($) {
1033
- $ instanceof Re ? v.value = $.firstFieldMessage() ?? "Неверный код" : $ instanceof Ue ? v.value = "Нет соединения с сервером" : $ instanceof Q ? v.value = $.message || "Не удалось проверить код" : v.value = $.message;
1033
+ $ instanceof Le ? v.value = $.firstFieldMessage() ?? "Неверный код" : $ instanceof Pe ? v.value = "Нет соединения с сервером" : $ instanceof Z ? v.value = $.message || "Не удалось проверить код" : v.value = $.message;
1034
1034
  } finally {
1035
1035
  f.value = !1;
1036
1036
  }
@@ -1045,9 +1045,9 @@ const X = ee("admin-auth", () => {
1045
1045
  return ($, V) => (s(), c("form", {
1046
1046
  class: "admin-auth-card__bd",
1047
1047
  novalidate: "",
1048
- onSubmit: Be(P, ["prevent"])
1048
+ onSubmit: Oe(P, ["prevent"])
1049
1049
  }, [
1050
- v.value ? (s(), w(r(Y), {
1050
+ v.value ? (s(), w(r(Q), {
1051
1051
  key: 0,
1052
1052
  variant: "danger",
1053
1053
  class: "admin-auth-card__alert",
@@ -1058,7 +1058,7 @@ const X = ee("admin-auth", () => {
1058
1058
  ]),
1059
1059
  _: 1
1060
1060
  })) : F("", !0),
1061
- b.value !== null ? (s(), w(r(Y), {
1061
+ b.value !== null ? (s(), w(r(Q), {
1062
1062
  key: 1,
1063
1063
  variant: "info",
1064
1064
  class: "admin-auth-card__alert",
@@ -1077,7 +1077,7 @@ const X = ee("admin-auth", () => {
1077
1077
  (s(!0), c(T, null, I(l.value, (j, D) => (s(), c("input", {
1078
1078
  key: D,
1079
1079
  ref_for: !0,
1080
- ref: (M) => A(D, M),
1080
+ ref: (M) => R(D, M),
1081
1081
  value: l.value[D],
1082
1082
  type: "text",
1083
1083
  inputmode: "numeric",
@@ -1087,8 +1087,8 @@ const X = ee("admin-auth", () => {
1087
1087
  "aria-label": `Цифра ${D + 1}`,
1088
1088
  onInput: (M) => _(D, M),
1089
1089
  onKeydown: (M) => g(D, M)
1090
- }, null, 40, Xn))), 128))
1091
- ], 32)) : (s(), w(r(ie), {
1090
+ }, null, 40, Zn))), 128))
1091
+ ], 32)) : (s(), w(r(re), {
1092
1092
  key: 3,
1093
1093
  modelValue: i.value,
1094
1094
  "onUpdate:modelValue": V[0] || (V[0] = (j) => i.value = j),
@@ -1103,14 +1103,14 @@ const X = ee("admin-auth", () => {
1103
1103
  variant: "primary",
1104
1104
  size: "lg",
1105
1105
  loading: f.value,
1106
- disabled: f.value || !R.value
1106
+ disabled: f.value || !A.value
1107
1107
  }, {
1108
1108
  default: m(() => [
1109
1109
  C(h(f.value ? "Проверка…" : "Подтвердить"), 1)
1110
1110
  ]),
1111
1111
  _: 1
1112
1112
  }, 8, ["loading", "disabled"]),
1113
- d("div", Jn, [
1113
+ d("div", ea, [
1114
1114
  d("button", {
1115
1115
  type: "button",
1116
1116
  class: "admin-auth-card__link",
@@ -1130,13 +1130,13 @@ const X = ee("admin-auth", () => {
1130
1130
  ])
1131
1131
  ], 32));
1132
1132
  }
1133
- }), Qn = { class: "admin-auth-page" }, Zn = {
1133
+ }), na = { class: "admin-auth-page" }, aa = {
1134
1134
  key: 0,
1135
1135
  class: "admin-auth-page__corner"
1136
- }, ea = { class: "admin-auth-card__hd" }, ta = ["src", "alt"], na = {
1136
+ }, la = { class: "admin-auth-card__hd" }, sa = ["src", "alt"], ia = {
1137
1137
  key: 1,
1138
1138
  "aria-hidden": "true"
1139
- }, aa = { key: 2 }, la = { class: "admin-auth-card__title" }, sa = { class: "admin-auth-card__sub" }, ia = /* @__PURE__ */ L({
1139
+ }, oa = { key: 2 }, ra = { class: "admin-auth-card__title" }, ua = { class: "admin-auth-card__sub" }, da = /* @__PURE__ */ L({
1140
1140
  __name: "LoginPage",
1141
1141
  props: {
1142
1142
  brandName: { default: "Laravel Admin" },
@@ -1150,7 +1150,7 @@ const X = ee("admin-auth", () => {
1150
1150
  showCornerActions: { type: Boolean, default: !0 }
1151
1151
  },
1152
1152
  setup(e) {
1153
- const t = e, n = X(), o = ne(), a = pe();
1153
+ const t = e, n = J(), o = le(), a = _e();
1154
1154
  async function l() {
1155
1155
  const i = a.query[t.redirectQueryKey];
1156
1156
  if (typeof i == "string" && i.length > 0 && i.startsWith("/")) {
@@ -1159,41 +1159,41 @@ const X = ee("admin-auth", () => {
1159
1159
  }
1160
1160
  await o.push({ name: t.homeRouteName });
1161
1161
  }
1162
- return Z(
1162
+ return te(
1163
1163
  () => n.isAuthenticated,
1164
1164
  (i) => {
1165
1165
  i && l();
1166
1166
  }
1167
- ), xe(() => {
1167
+ ), Re(() => {
1168
1168
  n.isAuthenticated && l();
1169
- }), (i, u) => (s(), c("div", Qn, [
1170
- e.showCornerActions ? (s(), c("div", Zn, [
1171
- x(rt),
1172
- x(ut)
1169
+ }), (i, u) => (s(), c("div", na, [
1170
+ e.showCornerActions ? (s(), c("div", aa, [
1171
+ x(mt),
1172
+ x(ft)
1173
1173
  ])) : F("", !0),
1174
1174
  x(r(q), {
1175
- class: J(["admin-auth-card", r(n).isChallengePending ? "admin-auth-card--wide" : ""]),
1175
+ class: Y(["admin-auth-card", r(n).isChallengePending ? "admin-auth-card--wide" : ""]),
1176
1176
  padding: "none"
1177
1177
  }, {
1178
1178
  default: m(() => [
1179
- d("div", ea, [
1179
+ d("div", la, [
1180
1180
  d("div", {
1181
- class: J(["admin-auth-card__logo", r(n).isChallengePending ? "admin-auth-card__logo--accent" : ""])
1181
+ class: Y(["admin-auth-card__logo", r(n).isChallengePending ? "admin-auth-card__logo--accent" : ""])
1182
1182
  }, [
1183
1183
  e.brandLogo && !r(n).isChallengePending ? (s(), c("img", {
1184
1184
  key: 0,
1185
1185
  src: e.brandLogo,
1186
1186
  alt: e.brandName
1187
- }, null, 8, ta)) : r(n).isChallengePending ? (s(), c("span", na, "🛡")) : (s(), c("span", aa, h(e.brandMark), 1))
1187
+ }, null, 8, sa)) : r(n).isChallengePending ? (s(), c("span", ia, "🛡")) : (s(), c("span", oa, h(e.brandMark), 1))
1188
1188
  ], 2),
1189
- d("div", la, [
1189
+ d("div", ra, [
1190
1190
  r(n).isChallengePending ? (s(), c(T, { key: 0 }, [
1191
1191
  C("Двухфакторная проверка")
1192
1192
  ], 64)) : (s(), c(T, { key: 1 }, [
1193
1193
  C(h(e.brandName), 1)
1194
1194
  ], 64))
1195
1195
  ]),
1196
- d("div", sa, [
1196
+ d("div", ua, [
1197
1197
  r(n).isChallengePending ? (s(), c(T, { key: 0 }, [
1198
1198
  C(" Введите 6-значный код из приложения-аутентификатора ")
1199
1199
  ], 64)) : (s(), c(T, { key: 1 }, [
@@ -1201,13 +1201,13 @@ const X = ee("admin-auth", () => {
1201
1201
  ], 64))
1202
1202
  ])
1203
1203
  ]),
1204
- r(n).isChallengePending ? (s(), w(Yn, {
1204
+ r(n).isChallengePending ? (s(), w(ta, {
1205
1205
  key: 0,
1206
1206
  onSuccess: u[0] || (u[0] = () => {
1207
1207
  }),
1208
1208
  onCancel: u[1] || (u[1] = () => {
1209
1209
  })
1210
- })) : (s(), w(Hn, {
1210
+ })) : (s(), w(Qn, {
1211
1211
  key: 1,
1212
1212
  "forgot-url": e.forgotUrl,
1213
1213
  "sso-link-label": e.ssoLinkLabel,
@@ -1220,8 +1220,8 @@ const X = ee("admin-auth", () => {
1220
1220
  }, 8, ["class"])
1221
1221
  ]));
1222
1222
  }
1223
- }), Ge = { page: 1, per_page: 20, total: 0, last_page: 1 }, oa = ee("admin-resource-index", () => {
1224
- const e = E(null), t = E([]), n = E({ ...Ge }), o = E(!1), a = E(null), l = E(""), i = E({}), u = E(null), f = E("asc"), v = E(/* @__PURE__ */ new Set()), b = p(() => !o.value && a.value === null && t.value.length === 0), S = p(() => v.value.size), R = p(() => v.value.size > 0), A = p(() => a.value !== null), _ = p(() => v.value.size === 0 || t.value.length === 0 ? "none" : t.value.every((z) => v.value.has(g(z))) ? "all" : "mixed");
1223
+ }), Qe = { page: 1, per_page: 20, total: 0, last_page: 1 }, ca = ne("admin-resource-index", () => {
1224
+ const e = E(null), t = E([]), n = E({ ...Qe }), o = E(!1), a = E(null), l = E(""), i = E({}), u = E(null), f = E("asc"), v = E(/* @__PURE__ */ new Set()), b = p(() => !o.value && a.value === null && t.value.length === 0), S = p(() => v.value.size), A = p(() => v.value.size > 0), R = p(() => a.value !== null), _ = p(() => v.value.size === 0 || t.value.length === 0 ? "none" : t.value.every((z) => v.value.has(g(z))) ? "all" : "mixed");
1225
1225
  function g(N) {
1226
1226
  return N.id ?? N.key ?? "";
1227
1227
  }
@@ -1229,28 +1229,28 @@ const X = ee("admin-auth", () => {
1229
1229
  e.value !== N && (e.value = N, P());
1230
1230
  }
1231
1231
  function P() {
1232
- t.value = [], n.value = { ...Ge }, o.value = !1, a.value = null, l.value = "", i.value = {}, u.value = null, f.value = "asc", v.value = /* @__PURE__ */ new Set();
1232
+ t.value = [], n.value = { ...Qe }, o.value = !1, a.value = null, l.value = "", i.value = {}, u.value = null, f.value = "asc", v.value = /* @__PURE__ */ new Set();
1233
1233
  }
1234
1234
  function k(N = {}) {
1235
1235
  const z = {
1236
1236
  page: N.page ?? n.value.page,
1237
1237
  per_page: N.per_page ?? n.value.per_page
1238
- }, _e = N.search ?? l.value;
1239
- _e && (z.q = _e);
1240
- const fe = N.sort ?? u.value;
1241
- fe && (z.order = [{ column: fe, direction: N.direction ?? f.value }]);
1242
- const gt = N.filters ?? i.value, Le = {};
1243
- for (const [ht, le] of Object.entries(gt))
1244
- le == null || le === "" || (Le[ht] = Array.isArray(le) ? le.join(",") : le);
1245
- return Object.keys(Le).length > 0 && (z.filters = Le), z;
1238
+ }, ke = N.search ?? l.value;
1239
+ ke && (z.q = ke);
1240
+ const pe = N.sort ?? u.value;
1241
+ pe && (z.order = [{ column: pe, direction: N.direction ?? f.value }]);
1242
+ const bt = N.filters ?? i.value, Ne = {};
1243
+ for (const [kt, ie] of Object.entries(bt))
1244
+ ie == null || ie === "" || (Ne[kt] = Array.isArray(ie) ? ie.join(",") : ie);
1245
+ return Object.keys(Ne).length > 0 && (z.filters = Ne), z;
1246
1246
  }
1247
1247
  async function y(N = {}) {
1248
1248
  if (!e.value)
1249
1249
  throw new Error("useResourceIndexStore.load() called before setSlug()");
1250
1250
  o.value = !0, a.value = null;
1251
1251
  try {
1252
- const z = W(), _e = k(N), fe = await z.post(`/${e.value}/search`, _e);
1253
- t.value = fe.data, n.value = fe.meta;
1252
+ const z = W(), ke = k(N), pe = await z.post(`/${e.value}/search`, ke);
1253
+ t.value = pe.data, n.value = pe.meta;
1254
1254
  } catch (z) {
1255
1255
  throw a.value = z instanceof Error ? z : new Error(String(z)), z;
1256
1256
  } finally {
@@ -1288,10 +1288,10 @@ const X = ee("admin-auth", () => {
1288
1288
  for (const z of t.value) N.add(g(z));
1289
1289
  v.value = N;
1290
1290
  }
1291
- function te() {
1291
+ function ae() {
1292
1292
  v.value = /* @__PURE__ */ new Set();
1293
1293
  }
1294
- function pt(N) {
1294
+ function yt(N) {
1295
1295
  return v.value.has(N);
1296
1296
  }
1297
1297
  return {
@@ -1308,8 +1308,8 @@ const X = ee("admin-auth", () => {
1308
1308
  selection: v,
1309
1309
  // getters
1310
1310
  isEmpty: b,
1311
- hasError: A,
1312
- hasSelection: R,
1311
+ hasError: R,
1312
+ hasSelection: A,
1313
1313
  selectedCount: S,
1314
1314
  selectionState: _,
1315
1315
  // actions
@@ -1324,30 +1324,30 @@ const X = ee("admin-auth", () => {
1324
1324
  setPage: O,
1325
1325
  toggleRow: G,
1326
1326
  toggleAllOnPage: K,
1327
- clearSelection: te,
1328
- isSelected: pt,
1327
+ clearSelection: ae,
1328
+ isSelected: yt,
1329
1329
  rowId: g
1330
1330
  };
1331
- }), ra = { class: "admin-page admin-resource-index" }, ua = { class: "admin-page__hd" }, da = { class: "admin-page__title-wrap" }, ca = { class: "admin-page__title" }, ma = {
1331
+ }), ma = { class: "admin-page admin-resource-index" }, fa = { class: "admin-page__hd" }, va = { class: "admin-page__title-wrap" }, pa = { class: "admin-page__title" }, ga = {
1332
1332
  key: 0,
1333
1333
  class: "admin-page__count"
1334
- }, fa = { class: "admin-page__actions" }, va = {
1334
+ }, ha = { class: "admin-page__actions" }, _a = {
1335
1335
  key: 0,
1336
1336
  class: "admin-bulk-toolbar",
1337
1337
  role: "toolbar"
1338
- }, pa = { class: "admin-bulk-toolbar__count" }, ga = {
1338
+ }, ya = { class: "admin-bulk-toolbar__count" }, ba = {
1339
1339
  key: 1,
1340
1340
  class: "admin-filter-bar"
1341
- }, ha = ["value"], _a = {
1341
+ }, ka = ["value"], wa = {
1342
1342
  key: 2,
1343
1343
  class: "admin-resource-index__loading"
1344
- }, ya = {
1344
+ }, $a = {
1345
1345
  key: 5,
1346
1346
  class: "admin-resource-index__table"
1347
- }, ba = { class: "admin-resource-index__select-header" }, ka = { class: "admin-resource-index__select-overlay" }, wa = ["onClick"], $a = {
1347
+ }, xa = { class: "admin-resource-index__select-header" }, Ca = { class: "admin-resource-index__select-overlay" }, Sa = ["onClick"], Aa = {
1348
1348
  key: 6,
1349
1349
  class: "admin-resource-index__footer"
1350
- }, xa = /* @__PURE__ */ L({
1350
+ }, Ra = /* @__PURE__ */ L({
1351
1351
  __name: "ResourceIndexPage",
1352
1352
  props: {
1353
1353
  slug: {},
@@ -1358,7 +1358,7 @@ const X = ee("admin-auth", () => {
1358
1358
  },
1359
1359
  emits: ["bulk-action", "row-click"],
1360
1360
  setup(e, { emit: t }) {
1361
- const n = e, o = t, a = oa(), l = ae(), i = p(() => l.getResource(n.slug)), u = p(
1361
+ const n = e, o = t, a = ca(), l = se(), i = p(() => l.getResource(n.slug)), u = p(
1362
1362
  () => n.title ?? i.value?.label ?? n.slug
1363
1363
  ), f = p(() => (i.value?.columns ?? []).map((k) => {
1364
1364
  const y = k;
@@ -1373,11 +1373,11 @@ const X = ee("admin-auth", () => {
1373
1373
  const P = a.meta.total;
1374
1374
  return P === 0 ? "" : `${a.items.length} из ${P}`;
1375
1375
  });
1376
- xe(async () => {
1376
+ Re(async () => {
1377
1377
  a.setSlug(n.slug), l.manifest === null && await l.load().catch(() => {
1378
1378
  }), await a.load().catch(() => {
1379
1379
  });
1380
- }), Z(
1380
+ }), te(
1381
1381
  () => n.slug,
1382
1382
  async (P, k) => {
1383
1383
  P !== k && (a.setSlug(P), await a.load().catch(() => {
@@ -1390,10 +1390,10 @@ const X = ee("admin-auth", () => {
1390
1390
  async function S(P) {
1391
1391
  await a.setPage(P);
1392
1392
  }
1393
- function R() {
1393
+ function A() {
1394
1394
  a.toggleAllOnPage();
1395
1395
  }
1396
- function A(P) {
1396
+ function R(P) {
1397
1397
  a.toggleRow(P);
1398
1398
  }
1399
1399
  function _(P) {
@@ -1406,11 +1406,11 @@ const X = ee("admin-auth", () => {
1406
1406
  await a.load().catch(() => {
1407
1407
  });
1408
1408
  }
1409
- return (P, k) => (s(), c("section", ra, [
1410
- d("header", ua, [
1411
- d("div", da, [
1412
- d("h1", ca, h(u.value), 1),
1413
- e.subtitle || v.value ? (s(), c("div", ma, [
1409
+ return (P, k) => (s(), c("section", ma, [
1410
+ d("header", fa, [
1411
+ d("div", va, [
1412
+ d("h1", pa, h(u.value), 1),
1413
+ e.subtitle || v.value ? (s(), c("div", ga, [
1414
1414
  e.subtitle ? (s(), c(T, { key: 0 }, [
1415
1415
  C(h(e.subtitle), 1)
1416
1416
  ], 64)) : F("", !0),
@@ -1422,7 +1422,7 @@ const X = ee("admin-auth", () => {
1422
1422
  ], 64)) : F("", !0)
1423
1423
  ])) : F("", !0)
1424
1424
  ]),
1425
- d("div", fa, [
1425
+ d("div", ha, [
1426
1426
  H(P.$slots, "actions"),
1427
1427
  e.createRouteName ? (s(), w(r(B), {
1428
1428
  key: 0,
@@ -1436,8 +1436,8 @@ const X = ee("admin-auth", () => {
1436
1436
  })) : F("", !0)
1437
1437
  ])
1438
1438
  ]),
1439
- r(a).hasSelection ? (s(), c("div", va, [
1440
- d("span", pa, [
1439
+ r(a).hasSelection ? (s(), c("div", _a, [
1440
+ d("span", ya, [
1441
1441
  k[8] || (k[8] = C(" Выбрано ", -1)),
1442
1442
  d("b", null, h(r(a).selectedCount), 1)
1443
1443
  ]),
@@ -1493,14 +1493,14 @@ const X = ee("admin-auth", () => {
1493
1493
  ])]),
1494
1494
  _: 1
1495
1495
  }, 8, ["onClick"])
1496
- ])) : (s(), c("div", ga, [
1496
+ ])) : (s(), c("div", ba, [
1497
1497
  d("input", {
1498
1498
  value: r(a).search,
1499
1499
  type: "search",
1500
1500
  placeholder: "Поиск…",
1501
1501
  class: "admin-filter-bar__search",
1502
- onKeydown: k[5] || (k[5] = bt((y) => r(a).setSearch(y.target.value), ["enter"]))
1503
- }, null, 40, ha),
1502
+ onKeydown: k[5] || (k[5] = xt((y) => r(a).setSearch(y.target.value), ["enter"]))
1503
+ }, null, 40, ka),
1504
1504
  H(P.$slots, "filters", {
1505
1505
  filters: r(a).filters,
1506
1506
  setFilter: r(a).setFilter
@@ -1518,12 +1518,12 @@ const X = ee("admin-auth", () => {
1518
1518
  _: 1
1519
1519
  }, 8, ["onClick"])) : F("", !0)
1520
1520
  ])),
1521
- r(a).loading ? (s(), c("div", _a, [
1522
- (s(), c(T, null, I(8, (y) => x(r(Ve), {
1521
+ r(a).loading ? (s(), c("div", wa, [
1522
+ (s(), c(T, null, I(8, (y) => x(r(We), {
1523
1523
  key: y,
1524
1524
  height: "40px"
1525
1525
  })), 64))
1526
- ])) : r(a).hasError ? (s(), w(r(Lt), {
1526
+ ])) : r(a).hasError ? (s(), w(r(Nt), {
1527
1527
  key: 3,
1528
1528
  title: "Не удалось загрузить данные",
1529
1529
  description: r(a).error?.message ?? "Попробуйте обновить страницу.",
@@ -1541,7 +1541,7 @@ const X = ee("admin-auth", () => {
1541
1541
  })
1542
1542
  ]),
1543
1543
  _: 1
1544
- }, 8, ["description"])) : r(a).isEmpty ? (s(), w(r(Pt), {
1544
+ }, 8, ["description"])) : r(a).isEmpty ? (s(), w(r(It), {
1545
1545
  key: 4,
1546
1546
  title: "Пока пусто",
1547
1547
  description: "Создайте первую запись или измените фильтры.",
@@ -1560,22 +1560,22 @@ const X = ee("admin-auth", () => {
1560
1560
  })) : F("", !0)
1561
1561
  ]),
1562
1562
  _: 1
1563
- })) : (s(), c("div", ya, [
1564
- d("div", ba, [
1565
- x(r(we), {
1563
+ })) : (s(), c("div", $a, [
1564
+ d("div", xa, [
1565
+ x(r(Se), {
1566
1566
  "model-value": r(a).selectionState === "all",
1567
1567
  indeterminate: r(a).selectionState === "mixed",
1568
1568
  "aria-label": "Выделить всё",
1569
- "onUpdate:modelValue": R
1569
+ "onUpdate:modelValue": A
1570
1570
  }, null, 8, ["model-value", "indeterminate"])
1571
1571
  ]),
1572
- x(r(ze), {
1572
+ x(r(je), {
1573
1573
  columns: f.value,
1574
1574
  data: r(a).items,
1575
1575
  "sort-key": r(a).sortKey ?? "",
1576
1576
  "sort-direction": r(a).sortDirection,
1577
1577
  "onUpdate:sortKey": b
1578
- }, Ne({ _: 2 }, [
1578
+ }, qe({ _: 2 }, [
1579
1579
  I(f.value, (y) => ({
1580
1580
  name: `cell-${y.key}`,
1581
1581
  fn: m(($) => [
@@ -1585,27 +1585,27 @@ const X = ee("admin-auth", () => {
1585
1585
  ])
1586
1586
  }))
1587
1587
  ]), 1032, ["columns", "data", "sort-key", "sort-direction"]),
1588
- d("div", ka, [
1588
+ d("div", Ca, [
1589
1589
  (s(!0), c(T, null, I(r(a).items, (y) => (s(), c("div", {
1590
1590
  key: String(r(a).rowId(y)),
1591
- class: J([
1591
+ class: Y([
1592
1592
  "admin-resource-index__row",
1593
1593
  { "admin-resource-index__row--selected": r(a).isSelected(r(a).rowId(y)) }
1594
1594
  ]),
1595
1595
  onClick: ($) => _(y)
1596
1596
  }, [
1597
- x(r(we), {
1597
+ x(r(Se), {
1598
1598
  "model-value": r(a).isSelected(r(a).rowId(y)),
1599
1599
  "aria-label": `Строка ${r(a).rowId(y)}`,
1600
- "onUpdate:modelValue": ($) => A(r(a).rowId(y)),
1601
- onClick: k[7] || (k[7] = Be(() => {
1600
+ "onUpdate:modelValue": ($) => R(r(a).rowId(y)),
1601
+ onClick: k[7] || (k[7] = Oe(() => {
1602
1602
  }, ["stop"]))
1603
1603
  }, null, 8, ["model-value", "aria-label", "onUpdate:modelValue"])
1604
- ], 10, wa))), 128))
1604
+ ], 10, Sa))), 128))
1605
1605
  ])
1606
1606
  ])),
1607
- !r(a).loading && !r(a).hasError && !r(a).isEmpty ? (s(), c("footer", $a, [
1608
- x(r(Tt), {
1607
+ !r(a).loading && !r(a).hasError && !r(a).isEmpty ? (s(), c("footer", Aa, [
1608
+ x(r(Bt), {
1609
1609
  "model-value": r(a).meta.page,
1610
1610
  total: r(a).meta.total,
1611
1611
  "per-page": r(a).meta.per_page,
@@ -1614,8 +1614,8 @@ const X = ee("admin-auth", () => {
1614
1614
  ])) : F("", !0)
1615
1615
  ]));
1616
1616
  }
1617
- }), ct = ee("admin-resource-form", () => {
1618
- const e = E(null), t = E("create"), n = E(null), o = E({}), a = E({}), l = E({}), i = E(!1), u = E(!1), f = E(!1), v = E(null), b = p(() => t.value === "create"), S = p(() => t.value === "edit"), R = p(() => t.value === "view"), A = p(() => v.value !== null), _ = p(() => {
1617
+ }), pt = ne("admin-resource-form", () => {
1618
+ const e = E(null), t = E("create"), n = E(null), o = E({}), a = E({}), l = E({}), i = E(!1), u = E(!1), f = E(!1), v = E(null), b = p(() => t.value === "create"), S = p(() => t.value === "edit"), A = p(() => t.value === "view"), R = p(() => v.value !== null), _ = p(() => {
1619
1619
  const M = o.value, O = a.value, G = /* @__PURE__ */ new Set([...Object.keys(M), ...Object.keys(O)]);
1620
1620
  for (const K of G)
1621
1621
  if (!Object.is(M[K], O[K]))
@@ -1638,10 +1638,10 @@ const X = ee("admin-auth", () => {
1638
1638
  async function k(M, O, G = "edit") {
1639
1639
  e.value = M, t.value = G, n.value = O, i.value = !0, v.value = null, l.value = {};
1640
1640
  try {
1641
- const te = await W().get(`/${M}/read`, {
1641
+ const ae = await W().get(`/${M}/read`, {
1642
1642
  params: { id: O }
1643
1643
  });
1644
- g(o.value, te.data), g(a.value, te.data);
1644
+ g(o.value, ae.data), g(a.value, ae.data);
1645
1645
  } catch (K) {
1646
1646
  throw v.value = K instanceof Error ? K : new Error(String(K)), K;
1647
1647
  } finally {
@@ -1665,10 +1665,10 @@ const X = ee("admin-auth", () => {
1665
1665
  if (u.value) throw new Error("Already saving");
1666
1666
  u.value = !0, v.value = null, l.value = {};
1667
1667
  try {
1668
- const M = W(), O = t.value === "create" ? `/${e.value}/create` : `/${e.value}/update`, G = t.value === "create" ? o.value : { id: n.value, ...o.value }, te = (await M.post(O, G)).id;
1669
- return n.value = te, g(a.value, { ...o.value }), t.value = "edit", te;
1668
+ const M = W(), O = t.value === "create" ? `/${e.value}/create` : `/${e.value}/update`, G = t.value === "create" ? o.value : { id: n.value, ...o.value }, ae = (await M.post(O, G)).id;
1669
+ return n.value = ae, g(a.value, { ...o.value }), t.value = "edit", ae;
1670
1670
  } catch (M) {
1671
- throw M instanceof Re ? l.value = { ...M.fields } : (M instanceof Q || M instanceof Error) && (v.value = M), M;
1671
+ throw M instanceof Le ? l.value = { ...M.fields } : (M instanceof Z || M instanceof Error) && (v.value = M), M;
1672
1672
  } finally {
1673
1673
  u.value = !1;
1674
1674
  }
@@ -1701,9 +1701,9 @@ const X = ee("admin-auth", () => {
1701
1701
  // getters
1702
1702
  isCreate: b,
1703
1703
  isEdit: S,
1704
- isView: R,
1704
+ isView: A,
1705
1705
  isDirty: _,
1706
- hasError: A,
1706
+ hasError: R,
1707
1707
  // actions
1708
1708
  reset: U,
1709
1709
  prepareCreate: P,
@@ -1715,7 +1715,7 @@ const X = ee("admin-auth", () => {
1715
1715
  destroy: D
1716
1716
  };
1717
1717
  });
1718
- function Ee() {
1718
+ function Te() {
1719
1719
  const e = /* @__PURE__ */ new Map();
1720
1720
  return {
1721
1721
  register(t, n) {
@@ -1739,21 +1739,21 @@ function Ee() {
1739
1739
  }
1740
1740
  };
1741
1741
  }
1742
- const ue = Ee(), de = Ee(), Vi = ue.register, mt = ue.get, zi = ue.has, qi = ue.list, Di = de.register, He = de.get, Oi = de.has, Wi = de.list;
1742
+ const ce = Te(), me = Te(), Vi = ce.register, gt = ce.get, zi = ce.has, qi = ce.list, Di = me.register, Ze = me.get, Oi = me.has, Wi = me.list;
1743
1743
  function ji() {
1744
- ue.clear(), de.clear();
1744
+ ce.clear(), me.clear();
1745
1745
  }
1746
- function Ca(e) {
1747
- e.fields && ue.registerBundle(e.fields), e.layouts && de.registerBundle(e.layouts);
1746
+ function Ua(e) {
1747
+ e.fields && ce.registerBundle(e.fields), e.layouts && me.registerBundle(e.layouts);
1748
1748
  }
1749
- const ft = /* @__PURE__ */ L({
1749
+ const ht = /* @__PURE__ */ L({
1750
1750
  __name: "UnknownField",
1751
1751
  props: {
1752
1752
  type: {},
1753
1753
  name: {}
1754
1754
  },
1755
1755
  setup(e) {
1756
- return (t, n) => (s(), w(r(Y), { variant: "warning" }, {
1756
+ return (t, n) => (s(), w(r(Q), { variant: "warning" }, {
1757
1757
  title: m(() => [
1758
1758
  C("Неизвестный тип поля: " + h(e.type), 1)
1759
1759
  ]),
@@ -1768,23 +1768,23 @@ const ft = /* @__PURE__ */ L({
1768
1768
  _: 1
1769
1769
  }));
1770
1770
  }
1771
- }), vt = /* @__PURE__ */ L({
1771
+ }), _t = /* @__PURE__ */ L({
1772
1772
  __name: "FieldRenderer",
1773
1773
  props: {
1774
1774
  node: {}
1775
1775
  },
1776
1776
  setup(e) {
1777
- const t = e, n = p(() => mt(t.node.type)), o = p(() => {
1777
+ const t = e, n = p(() => gt(t.node.type)), o = p(() => {
1778
1778
  const { type: a, ...l } = t.node;
1779
1779
  return l;
1780
1780
  });
1781
- return (a, l) => n.value ? (s(), w(oe(n.value), Ce(Se({ key: 0 }, o.value)), null, 16)) : (s(), w(ft, {
1781
+ return (a, l) => n.value ? (s(), w(ue(n.value), Ue(Ee({ key: 0 }, o.value)), null, 16)) : (s(), w(ht, {
1782
1782
  key: 1,
1783
1783
  type: e.node.type,
1784
1784
  name: e.node.name
1785
1785
  }, null, 8, ["type", "name"]));
1786
1786
  }
1787
- }), he = /* @__PURE__ */ L({
1787
+ }), be = /* @__PURE__ */ L({
1788
1788
  __name: "LayoutRenderer",
1789
1789
  props: {
1790
1790
  node: {}
@@ -1794,31 +1794,31 @@ const ft = /* @__PURE__ */ L({
1794
1794
  if (t.node.kind === "field")
1795
1795
  return { kind: "field" };
1796
1796
  if (t.node.kind === "layout") {
1797
- const i = He(t.node.type);
1797
+ const i = Ze(t.node.type);
1798
1798
  return i ? { kind: "layout", component: i } : { kind: "unknown" };
1799
1799
  }
1800
- const l = He(t.node.type);
1801
- return l ? { kind: "layout", component: l } : mt(t.node.type) ? { kind: "field" } : { kind: "unknown" };
1800
+ const l = Ze(t.node.type);
1801
+ return l ? { kind: "layout", component: l } : gt(t.node.type) ? { kind: "field" } : { kind: "unknown" };
1802
1802
  }), o = p(() => {
1803
1803
  const { type: l, kind: i, ...u } = t.node;
1804
1804
  return u;
1805
1805
  }), a = p(() => t.node);
1806
- return (l, i) => n.value.kind === "layout" && n.value.component ? (s(), w(oe(n.value.component), Ce(Se({ key: 0 }, o.value)), null, 16)) : n.value.kind === "field" ? (s(), w(vt, {
1806
+ return (l, i) => n.value.kind === "layout" && n.value.component ? (s(), w(ue(n.value.component), Ue(Ee({ key: 0 }, o.value)), null, 16)) : n.value.kind === "field" ? (s(), w(_t, {
1807
1807
  key: 1,
1808
1808
  node: a.value
1809
- }, null, 8, ["node"])) : (s(), w(ft, {
1809
+ }, null, 8, ["node"])) : (s(), w(ht, {
1810
1810
  key: 2,
1811
1811
  type: e.node.type,
1812
1812
  name: e.node.name
1813
1813
  }, null, 8, ["type", "name"]));
1814
1814
  }
1815
- }), Sa = { class: "admin-page admin-resource-form" }, Aa = { class: "admin-page__hd" }, Ra = { class: "admin-page__title-wrap" }, Ua = { class: "admin-page__title" }, Ea = { class: "admin-page__actions" }, Fa = {
1815
+ }), Ea = { class: "admin-page admin-resource-form" }, Fa = { class: "admin-page__hd" }, La = { class: "admin-page__title-wrap" }, Pa = { class: "admin-page__title" }, Ta = { class: "admin-page__actions" }, Ma = {
1816
1816
  key: 1,
1817
1817
  class: "admin-resource-form__loading"
1818
- }, La = {
1818
+ }, Na = {
1819
1819
  key: 3,
1820
1820
  class: "admin-resource-form__savebar"
1821
- }, Xe = /* @__PURE__ */ L({
1821
+ }, et = /* @__PURE__ */ L({
1822
1822
  __name: "ResourceFormPage",
1823
1823
  props: {
1824
1824
  slug: {},
@@ -1826,8 +1826,8 @@ const ft = /* @__PURE__ */ L({
1826
1826
  indexRouteName: { default: "admin.home" }
1827
1827
  },
1828
1828
  setup(e) {
1829
- const t = e, n = ct(), o = ae(), a = ne(), l = ot(n.state, n.errors);
1830
- Z(
1829
+ const t = e, n = pt(), o = se(), a = le(), l = ct(n.state, n.errors);
1830
+ te(
1831
1831
  () => n.errors,
1832
1832
  (_) => {
1833
1833
  l.setErrors({ ..._ });
@@ -1851,11 +1851,11 @@ const ft = /* @__PURE__ */ L({
1851
1851
  return "default";
1852
1852
  }
1853
1853
  });
1854
- xe(async () => {
1854
+ Re(async () => {
1855
1855
  o.manifest === null && await o.load().catch(() => {
1856
1856
  }), t.id !== null && t.id !== void 0 ? await n.load(t.slug, t.id, "edit").catch(() => {
1857
1857
  }) : n.prepareCreate(t.slug);
1858
- }), Z(
1858
+ }), te(
1859
1859
  () => [t.slug, t.id],
1860
1860
  async ([_, g]) => {
1861
1861
  g != null ? await n.load(_, g, "edit").catch(() => {
@@ -1873,24 +1873,24 @@ const ft = /* @__PURE__ */ L({
1873
1873
  } catch {
1874
1874
  }
1875
1875
  }
1876
- async function R() {
1876
+ async function A() {
1877
1877
  confirm("Удалить запись?") && (await n.destroy().catch(() => {
1878
1878
  }), n.hasError || a.push({ name: t.indexRouteName }).catch(() => {
1879
1879
  }));
1880
1880
  }
1881
- function A() {
1881
+ function R() {
1882
1882
  n.isDirty && !confirm("Несохранённые изменения будут потеряны. Продолжить?") || a.push({ name: t.indexRouteName }).catch(() => {
1883
1883
  });
1884
1884
  }
1885
- return (_, g) => (s(), c("section", Sa, [
1886
- d("header", Aa, [
1887
- d("div", Ra, [
1885
+ return (_, g) => (s(), c("section", Ea, [
1886
+ d("header", Fa, [
1887
+ d("div", La, [
1888
1888
  d("a", {
1889
1889
  class: "admin-resource-form__back",
1890
- onClick: A
1890
+ onClick: R
1891
1891
  }, "← Назад"),
1892
- d("h1", Ua, h(f.value), 1),
1893
- v.value ? (s(), w(r(qe), {
1892
+ d("h1", Pa, h(f.value), 1),
1893
+ v.value ? (s(), w(r(Ke), {
1894
1894
  key: 0,
1895
1895
  variant: b.value
1896
1896
  }, {
@@ -1900,11 +1900,11 @@ const ft = /* @__PURE__ */ L({
1900
1900
  _: 1
1901
1901
  }, 8, ["variant"])) : F("", !0)
1902
1902
  ]),
1903
- d("div", Ea, [
1903
+ d("div", Ta, [
1904
1904
  x(r(B), {
1905
1905
  variant: "ghost",
1906
1906
  disabled: r(n).saving || r(n).deleting,
1907
- onClick: A
1907
+ onClick: R
1908
1908
  }, {
1909
1909
  default: m(() => [...g[0] || (g[0] = [
1910
1910
  C(" Отмена ", -1)
@@ -1916,7 +1916,7 @@ const ft = /* @__PURE__ */ L({
1916
1916
  variant: "danger",
1917
1917
  disabled: r(n).saving || r(n).deleting,
1918
1918
  loading: r(n).deleting,
1919
- onClick: R
1919
+ onClick: A
1920
1920
  }, {
1921
1921
  default: m(() => [...g[1] || (g[1] = [
1922
1922
  C(" Удалить ", -1)
@@ -1936,7 +1936,7 @@ const ft = /* @__PURE__ */ L({
1936
1936
  }, 8, ["disabled", "loading"])
1937
1937
  ])
1938
1938
  ]),
1939
- r(n).hasError ? (s(), w(r(Y), {
1939
+ r(n).hasError ? (s(), w(r(Q), {
1940
1940
  key: 0,
1941
1941
  variant: "danger",
1942
1942
  class: "admin-resource-form__alert",
@@ -1947,8 +1947,8 @@ const ft = /* @__PURE__ */ L({
1947
1947
  ]),
1948
1948
  _: 1
1949
1949
  })) : F("", !0),
1950
- r(n).loading ? (s(), c("div", Fa, [
1951
- (s(), c(T, null, I(6, (U) => x(r(Ve), {
1950
+ r(n).loading ? (s(), c("div", Ma, [
1951
+ (s(), c(T, null, I(6, (U) => x(r(We), {
1952
1952
  key: U,
1953
1953
  height: "40px"
1954
1954
  })), 64))
@@ -1958,19 +1958,19 @@ const ft = /* @__PURE__ */ L({
1958
1958
  class: "admin-resource-form__body"
1959
1959
  }, {
1960
1960
  default: m(() => [
1961
- (s(!0), c(T, null, I(u.value, (U, P) => (s(), w(he, {
1961
+ (s(!0), c(T, null, I(u.value, (U, P) => (s(), w(be, {
1962
1962
  key: P,
1963
1963
  node: U
1964
1964
  }, null, 8, ["node"]))), 128))
1965
1965
  ]),
1966
1966
  _: 1
1967
1967
  })),
1968
- r(n).isDirty && !r(n).loading ? (s(), c("div", La, [
1968
+ r(n).isDirty && !r(n).loading ? (s(), c("div", Na, [
1969
1969
  g[4] || (g[4] = d("span", { class: "admin-resource-form__savebar-hint" }, " Есть несохранённые изменения ", -1)),
1970
1970
  x(r(B), {
1971
1971
  variant: "ghost",
1972
1972
  size: "sm",
1973
- onClick: A
1973
+ onClick: R
1974
1974
  }, {
1975
1975
  default: m(() => [...g[2] || (g[2] = [
1976
1976
  C("Отмена", -1)
@@ -1992,14 +1992,14 @@ const ft = /* @__PURE__ */ L({
1992
1992
  ])) : F("", !0)
1993
1993
  ]));
1994
1994
  }
1995
- }), ce = Ee(), Ki = ce.register, Je = ce.get, Gi = ce.has, Hi = ce.list, Xi = ce.clear, Pa = ce.registerBundle, Ta = /* @__PURE__ */ L({
1995
+ }), fe = Te(), Ki = fe.register, tt = fe.get, Gi = fe.has, Hi = fe.list, Xi = fe.clear, Ia = fe.registerBundle, Ba = /* @__PURE__ */ L({
1996
1996
  __name: "UnknownEntry",
1997
1997
  props: {
1998
1998
  type: {},
1999
1999
  name: {}
2000
2000
  },
2001
2001
  setup(e) {
2002
- return (t, n) => (s(), w(r(Y), { variant: "warning" }, {
2002
+ return (t, n) => (s(), w(r(Q), { variant: "warning" }, {
2003
2003
  title: m(() => [
2004
2004
  C("Неизвестный тип infolist-entry: " + h(e.type), 1)
2005
2005
  ]),
@@ -2011,31 +2011,31 @@ const ft = /* @__PURE__ */ L({
2011
2011
  _: 1
2012
2012
  }));
2013
2013
  }
2014
- }), Ma = {
2014
+ }), Va = {
2015
2015
  key: 1,
2016
2016
  class: "admin-infolist-rows"
2017
- }, Na = {
2017
+ }, za = {
2018
2018
  key: 2,
2019
2019
  class: "admin-infolist-cols"
2020
- }, Ia = {
2020
+ }, qa = {
2021
2021
  key: 3,
2022
2022
  class: "admin-infolist-section"
2023
- }, Ba = {
2023
+ }, Da = {
2024
2024
  key: 0,
2025
2025
  class: "admin-infolist-section__hd"
2026
- }, Va = {
2026
+ }, Oa = {
2027
2027
  key: 0,
2028
2028
  class: "admin-infolist-section__title"
2029
- }, za = {
2029
+ }, Wa = {
2030
2030
  key: 1,
2031
2031
  class: "admin-infolist-section__description"
2032
- }, qa = { class: "admin-infolist-section__body" }, Da = {
2032
+ }, ja = { class: "admin-infolist-section__body" }, Ka = {
2033
2033
  key: 4,
2034
2034
  class: "admin-infolist-tabs"
2035
- }, Oa = {
2035
+ }, Ga = {
2036
2036
  class: "admin-infolist-tabs__list",
2037
2037
  role: "tablist"
2038
- }, Wa = { class: "admin-infolist-tabs__panel" }, ja = /* @__PURE__ */ L({
2038
+ }, Ha = { class: "admin-infolist-tabs__panel" }, Xa = /* @__PURE__ */ L({
2039
2039
  __name: "InfolistRenderer",
2040
2040
  props: {
2041
2041
  node: {}
@@ -2043,18 +2043,18 @@ const ft = /* @__PURE__ */ L({
2043
2043
  setup(e) {
2044
2044
  const t = e, n = /* @__PURE__ */ new Set(["rows", "columns", "section", "block", "tabs"]), o = p(() => {
2045
2045
  if (t.node.kind === "entry") {
2046
- const S = Je(t.node.type);
2046
+ const S = tt(t.node.type);
2047
2047
  return S ? { kind: "entry", component: S } : { kind: "unknown" };
2048
2048
  }
2049
2049
  if (t.node.kind === "layout")
2050
2050
  return n.has(t.node.type) ? { kind: "layout", layoutType: t.node.type } : { kind: "unknown" };
2051
2051
  if (n.has(t.node.type))
2052
2052
  return { kind: "layout", layoutType: t.node.type };
2053
- const b = Je(t.node.type);
2053
+ const b = tt(t.node.type);
2054
2054
  return b ? { kind: "entry", component: b } : { kind: "unknown" };
2055
2055
  }), a = p(() => {
2056
- const { type: b, kind: S, items: R, ...A } = t.node;
2057
- return A;
2056
+ const { type: b, kind: S, items: A, ...R } = t.node;
2057
+ return R;
2058
2058
  }), l = p(
2059
2059
  () => t.node.items ?? []
2060
2060
  ), i = p(() => t.node.title ?? null), u = p(
@@ -2064,73 +2064,73 @@ const ft = /* @__PURE__ */ L({
2064
2064
  return typeof b == "number" ? b : 0;
2065
2065
  }), v = p(() => t.node.items ?? []);
2066
2066
  return (b, S) => {
2067
- const R = et("InfolistRenderer", !0);
2068
- return o.value.kind === "entry" ? (s(), w(oe(o.value.component), Ce(Se({ key: 0 }, a.value)), null, 16)) : o.value.kind === "layout" && o.value.layoutType === "rows" ? (s(), c("div", Ma, [
2069
- (s(!0), c(T, null, I(l.value, (A, _) => (s(), w(R, {
2067
+ const A = lt("InfolistRenderer", !0);
2068
+ return o.value.kind === "entry" ? (s(), w(ue(o.value.component), Ue(Ee({ key: 0 }, a.value)), null, 16)) : o.value.kind === "layout" && o.value.layoutType === "rows" ? (s(), c("div", Va, [
2069
+ (s(!0), c(T, null, I(l.value, (R, _) => (s(), w(A, {
2070
2070
  key: _,
2071
- node: A
2071
+ node: R
2072
2072
  }, null, 8, ["node"]))), 128))
2073
- ])) : o.value.kind === "layout" && o.value.layoutType === "columns" ? (s(), c("div", Na, [
2074
- (s(!0), c(T, null, I(l.value, (A, _) => (s(), c("div", {
2073
+ ])) : o.value.kind === "layout" && o.value.layoutType === "columns" ? (s(), c("div", za, [
2074
+ (s(!0), c(T, null, I(l.value, (R, _) => (s(), c("div", {
2075
2075
  key: _,
2076
2076
  class: "admin-infolist-cols__item",
2077
- style: Ae({
2078
- gridColumn: `span ${typeof A.span == "number" ? A.span : Math.max(1, Math.floor(12 / l.value.length))}`
2077
+ style: Fe({
2078
+ gridColumn: `span ${typeof R.span == "number" ? R.span : Math.max(1, Math.floor(12 / l.value.length))}`
2079
2079
  })
2080
2080
  }, [
2081
- x(R, { node: A }, null, 8, ["node"])
2081
+ x(A, { node: R }, null, 8, ["node"])
2082
2082
  ], 4))), 128))
2083
- ])) : o.value.kind === "layout" && (o.value.layoutType === "section" || o.value.layoutType === "block") ? (s(), c("section", Ia, [
2084
- i.value || u.value ? (s(), c("header", Ba, [
2085
- i.value ? (s(), c("h3", Va, h(i.value), 1)) : F("", !0),
2086
- u.value ? (s(), c("p", za, h(u.value), 1)) : F("", !0)
2083
+ ])) : o.value.kind === "layout" && (o.value.layoutType === "section" || o.value.layoutType === "block") ? (s(), c("section", qa, [
2084
+ i.value || u.value ? (s(), c("header", Da, [
2085
+ i.value ? (s(), c("h3", Oa, h(i.value), 1)) : F("", !0),
2086
+ u.value ? (s(), c("p", Wa, h(u.value), 1)) : F("", !0)
2087
2087
  ])) : F("", !0),
2088
- d("div", qa, [
2089
- (s(!0), c(T, null, I(l.value, (A, _) => (s(), w(R, {
2088
+ d("div", ja, [
2089
+ (s(!0), c(T, null, I(l.value, (R, _) => (s(), w(A, {
2090
2090
  key: _,
2091
- node: A
2091
+ node: R
2092
2092
  }, null, 8, ["node"]))), 128))
2093
2093
  ])
2094
- ])) : o.value.kind === "layout" && o.value.layoutType === "tabs" ? (s(), c("div", Da, [
2095
- d("ul", Oa, [
2096
- (s(!0), c(T, null, I(v.value, (A, _) => (s(), c("li", {
2097
- key: A.key ?? _,
2098
- class: J([
2094
+ ])) : o.value.kind === "layout" && o.value.layoutType === "tabs" ? (s(), c("div", Ka, [
2095
+ d("ul", Ga, [
2096
+ (s(!0), c(T, null, I(v.value, (R, _) => (s(), c("li", {
2097
+ key: R.key ?? _,
2098
+ class: Y([
2099
2099
  "admin-infolist-tabs__tab",
2100
2100
  { "admin-infolist-tabs__tab--active": _ === f.value }
2101
2101
  ])
2102
- }, h(A.label), 3))), 128))
2102
+ }, h(R.label), 3))), 128))
2103
2103
  ]),
2104
- d("div", Wa, [
2105
- (s(!0), c(T, null, I(v.value[f.value]?.items ?? [], (A, _) => (s(), w(R, {
2104
+ d("div", Ha, [
2105
+ (s(!0), c(T, null, I(v.value[f.value]?.items ?? [], (R, _) => (s(), w(A, {
2106
2106
  key: _,
2107
- node: A
2107
+ node: R
2108
2108
  }, null, 8, ["node"]))), 128))
2109
2109
  ])
2110
- ])) : (s(), w(Ta, {
2110
+ ])) : (s(), w(Ba, {
2111
2111
  key: 5,
2112
2112
  type: e.node.type,
2113
2113
  name: e.node.name
2114
2114
  }, null, 8, ["type", "name"]));
2115
2115
  };
2116
2116
  }
2117
- }), je = /* @__PURE__ */ Symbol("admin.infolist-record");
2118
- function Ka(e) {
2119
- kt(je, e);
2117
+ }), Je = /* @__PURE__ */ Symbol("admin.infolist-record");
2118
+ function Ja(e) {
2119
+ Ct(Je, e);
2120
2120
  }
2121
2121
  function Ji() {
2122
- const e = tt(je);
2122
+ const e = st(Je);
2123
2123
  if (!e)
2124
2124
  throw new Error("useRecord() called outside of provideRecord() scope");
2125
2125
  return e;
2126
2126
  }
2127
- function Fe() {
2128
- return tt(je, null);
2127
+ function Me() {
2128
+ return st(Je, null);
2129
2129
  }
2130
- const Ga = { class: "admin-page admin-resource-view" }, Ha = { class: "admin-page__hd" }, Xa = { class: "admin-page__title-wrap" }, Ja = { class: "admin-page__title" }, Ya = { class: "admin-page__actions" }, Qa = {
2130
+ const Ya = { class: "admin-page admin-resource-view" }, Qa = { class: "admin-page__hd" }, Za = { class: "admin-page__title-wrap" }, el = { class: "admin-page__title" }, tl = { class: "admin-page__actions" }, nl = {
2131
2131
  key: 1,
2132
2132
  class: "admin-resource-view__loading"
2133
- }, Za = /* @__PURE__ */ L({
2133
+ }, al = /* @__PURE__ */ L({
2134
2134
  __name: "ResourceViewPage",
2135
2135
  props: {
2136
2136
  slug: {},
@@ -2139,18 +2139,18 @@ const Ga = { class: "admin-page admin-resource-view" }, Ha = { class: "admin-pag
2139
2139
  indexRouteName: { default: "admin.home" }
2140
2140
  },
2141
2141
  setup(e) {
2142
- const t = e, n = ct(), o = ae(), a = ne();
2143
- Ka(n.state);
2142
+ const t = e, n = pt(), o = se(), a = le();
2143
+ Ja(n.state);
2144
2144
  const l = p(() => o.getResource(t.slug)), i = p(
2145
2145
  () => l.value?.fields ?? []
2146
2146
  ), u = p(
2147
2147
  () => `${l.value?.label ?? t.slug}: запись #${t.id}`
2148
2148
  );
2149
- xe(async () => {
2149
+ Re(async () => {
2150
2150
  o.manifest === null && await o.load().catch(() => {
2151
2151
  }), await n.load(t.slug, t.id, "view").catch(() => {
2152
2152
  });
2153
- }), Z(
2153
+ }), te(
2154
2154
  () => [t.slug, t.id],
2155
2155
  async ([b, S]) => {
2156
2156
  await n.load(b, S, "view").catch(() => {
@@ -2171,12 +2171,12 @@ const Ga = { class: "admin-page admin-resource-view" }, Ha = { class: "admin-pag
2171
2171
  }), n.hasError || a.push({ name: t.indexRouteName }).catch(() => {
2172
2172
  }));
2173
2173
  }
2174
- return (b, S) => (s(), c("section", Ga, [
2175
- d("header", Ha, [
2176
- d("div", Xa, [
2177
- d("h1", Ja, h(u.value), 1)
2174
+ return (b, S) => (s(), c("section", Ya, [
2175
+ d("header", Qa, [
2176
+ d("div", Za, [
2177
+ d("h1", el, h(u.value), 1)
2178
2178
  ]),
2179
- d("div", Ya, [
2179
+ d("div", tl, [
2180
2180
  x(r(B), {
2181
2181
  variant: "ghost",
2182
2182
  onClick: f
@@ -2199,7 +2199,7 @@ const Ga = { class: "admin-page admin-resource-view" }, Ha = { class: "admin-pag
2199
2199
  }, 8, ["loading", "disabled"])
2200
2200
  ])
2201
2201
  ]),
2202
- r(n).hasError ? (s(), w(r(Y), {
2202
+ r(n).hasError ? (s(), w(r(Q), {
2203
2203
  key: 0,
2204
2204
  variant: "danger",
2205
2205
  class: "admin-resource-view__alert",
@@ -2210,9 +2210,9 @@ const Ga = { class: "admin-page admin-resource-view" }, Ha = { class: "admin-pag
2210
2210
  ]),
2211
2211
  _: 1
2212
2212
  })) : F("", !0),
2213
- r(n).loading ? (s(), c("div", Qa, [
2214
- (s(), c(T, null, I(8, (R) => x(r(Ve), {
2215
- key: R,
2213
+ r(n).loading ? (s(), c("div", nl, [
2214
+ (s(), c(T, null, I(8, (A) => x(r(We), {
2215
+ key: A,
2216
2216
  height: "24px"
2217
2217
  })), 64))
2218
2218
  ])) : (s(), w(r(q), {
@@ -2221,25 +2221,25 @@ const Ga = { class: "admin-page admin-resource-view" }, Ha = { class: "admin-pag
2221
2221
  class: "admin-resource-view__body"
2222
2222
  }, {
2223
2223
  default: m(() => [
2224
- (s(!0), c(T, null, I(i.value, (R, A) => (s(), w(ja, {
2225
- key: A,
2226
- node: R
2224
+ (s(!0), c(T, null, I(i.value, (A, R) => (s(), w(Xa, {
2225
+ key: R,
2226
+ node: A
2227
2227
  }, null, 8, ["node"]))), 128))
2228
2228
  ]),
2229
2229
  _: 1
2230
2230
  }))
2231
2231
  ]));
2232
2232
  }
2233
- }), el = { class: "admin-page admin-profile" }, tl = { class: "admin-page__hd" }, nl = { class: "admin-page__title-wrap" }, al = { class: "admin-page__title" }, ll = { class: "admin-page__count" }, sl = { class: "admin-profile__layout" }, il = {
2233
+ }), ll = { class: "admin-page admin-profile" }, sl = { class: "admin-page__hd" }, il = { class: "admin-page__title-wrap" }, ol = { class: "admin-page__title" }, rl = { class: "admin-page__count" }, ul = { class: "admin-profile__layout" }, dl = {
2234
2234
  class: "admin-profile__nav",
2235
2235
  "aria-label": "Profile sections"
2236
- }, ol = ["onClick"], rl = ["data-icon"], ul = { class: "admin-profile__content" }, dl = { class: "admin-profile__hero" }, cl = { class: "admin-profile__hero-text" }, ml = { class: "admin-profile__hero-name" }, fl = { class: "admin-profile__hero-meta" }, vl = { class: "admin-profile__form" }, pl = { class: "admin-profile__card-ft" }, gl = { class: "admin-profile__card-hd" }, hl = {
2236
+ }, cl = ["onClick"], ml = ["data-icon"], fl = { class: "admin-profile__content" }, vl = { class: "admin-profile__hero" }, pl = { class: "admin-profile__hero-text" }, gl = { class: "admin-profile__hero-name" }, hl = { class: "admin-profile__hero-meta" }, _l = { class: "admin-profile__form" }, yl = { class: "admin-profile__card-ft" }, bl = { class: "admin-profile__card-hd" }, kl = {
2237
2237
  key: 0,
2238
2238
  class: "admin-profile__hint"
2239
- }, _l = {
2239
+ }, wl = {
2240
2240
  key: 1,
2241
2241
  class: "admin-profile__hint"
2242
- }, yl = { class: "admin-profile__card-ft" }, bl = { class: "admin-profile__hint" }, kl = /* @__PURE__ */ L({
2242
+ }, $l = { class: "admin-profile__card-ft" }, xl = { class: "admin-profile__hint" }, Cl = /* @__PURE__ */ L({
2243
2243
  __name: "ProfilePage",
2244
2244
  props: {
2245
2245
  title: { default: "Profile" },
@@ -2248,7 +2248,7 @@ const Ga = { class: "admin-page admin-resource-view" }, Ha = { class: "admin-pag
2248
2248
  },
2249
2249
  emits: ["update:section", "avatar-replace", "two-factor-disable", "two-factor-regenerate", "save"],
2250
2250
  setup(e, { emit: t }) {
2251
- const n = e, o = t, a = X(), l = De(), i = Oe(), u = [
2251
+ const n = e, o = t, a = J(), l = Ge(), i = He(), u = [
2252
2252
  { id: "general", label: "Основное", icon: "user" },
2253
2253
  { id: "security", label: "Безопасность", icon: "shield" },
2254
2254
  { id: "tokens", label: "API токены", icon: "key" },
@@ -2264,10 +2264,10 @@ const Ga = { class: "admin-page admin-resource-view" }, Ha = { class: "admin-pag
2264
2264
  theme: l.current
2265
2265
  }), S = p(
2266
2266
  () => i.available.map((k) => ({ value: k, label: k.toUpperCase() }))
2267
- ), R = p(
2267
+ ), A = p(
2268
2268
  () => l.available.map((k) => ({ value: k, label: k === "dark" ? "Тёмная" : k === "light" ? "Светлая" : k }))
2269
2269
  );
2270
- function A() {
2270
+ function R() {
2271
2271
  o("save", { ...b.value });
2272
2272
  }
2273
2273
  function _() {
@@ -2280,19 +2280,19 @@ const Ga = { class: "admin-page admin-resource-view" }, Ha = { class: "admin-pag
2280
2280
  o("two-factor-regenerate");
2281
2281
  }
2282
2282
  const P = p(() => !!a.user?.twoFactorEnabled);
2283
- return (k, y) => (s(), c("section", el, [
2284
- d("header", tl, [
2285
- d("div", nl, [
2286
- d("h1", al, h(e.title), 1),
2287
- d("div", ll, h(e.subtitle), 1)
2283
+ return (k, y) => (s(), c("section", ll, [
2284
+ d("header", sl, [
2285
+ d("div", il, [
2286
+ d("h1", ol, h(e.title), 1),
2287
+ d("div", rl, h(e.subtitle), 1)
2288
2288
  ])
2289
2289
  ]),
2290
- d("div", sl, [
2291
- d("nav", il, [
2290
+ d("div", ul, [
2291
+ d("nav", dl, [
2292
2292
  (s(), c(T, null, I(u, ($) => d("button", {
2293
2293
  key: $.id,
2294
2294
  type: "button",
2295
- class: J([
2295
+ class: Y([
2296
2296
  "admin-profile__nav-item",
2297
2297
  { "admin-profile__nav-item--active": f.value === $.id }
2298
2298
  ]),
@@ -2301,11 +2301,11 @@ const Ga = { class: "admin-page admin-resource-view" }, Ha = { class: "admin-pag
2301
2301
  d("span", {
2302
2302
  class: "admin-profile__nav-icon",
2303
2303
  "data-icon": $.icon
2304
- }, null, 8, rl),
2304
+ }, null, 8, ml),
2305
2305
  d("span", null, h($.label), 1)
2306
- ], 10, ol)), 64))
2306
+ ], 10, cl)), 64))
2307
2307
  ]),
2308
- d("div", ul, [
2308
+ d("div", fl, [
2309
2309
  f.value === "general" ? (s(), w(r(q), {
2310
2310
  key: 0,
2311
2311
  padding: "md"
@@ -2314,15 +2314,15 @@ const Ga = { class: "admin-page admin-resource-view" }, Ha = { class: "admin-pag
2314
2314
  y[7] || (y[7] = d("header", { class: "admin-profile__card-hd" }, [
2315
2315
  d("h3", { class: "admin-profile__card-title" }, "Профиль")
2316
2316
  ], -1)),
2317
- d("div", dl, [
2318
- x(r(lt), {
2317
+ d("div", vl, [
2318
+ x(r(rt), {
2319
2319
  src: r(a).user?.avatar ?? void 0,
2320
2320
  name: r(a).user?.name ?? "?",
2321
2321
  size: "lg"
2322
2322
  }, null, 8, ["src", "name"]),
2323
- d("div", cl, [
2324
- d("div", ml, h(r(a).user?.name ?? "—"), 1),
2325
- d("div", fl, h(r(a).user?.email ?? "—"), 1)
2323
+ d("div", pl, [
2324
+ d("div", gl, h(r(a).user?.name ?? "—"), 1),
2325
+ d("div", hl, h(r(a).user?.email ?? "—"), 1)
2326
2326
  ]),
2327
2327
  y[5] || (y[5] = d("div", { style: { flex: "1" } }, null, -1)),
2328
2328
  x(r(B), {
@@ -2336,37 +2336,37 @@ const Ga = { class: "admin-page admin-resource-view" }, Ha = { class: "admin-pag
2336
2336
  _: 1
2337
2337
  })
2338
2338
  ]),
2339
- d("div", vl, [
2340
- x(r(ie), {
2339
+ d("div", _l, [
2340
+ x(r(re), {
2341
2341
  modelValue: b.value.name,
2342
2342
  "onUpdate:modelValue": y[0] || (y[0] = ($) => b.value.name = $),
2343
2343
  label: "Имя",
2344
2344
  name: "name"
2345
2345
  }, null, 8, ["modelValue"]),
2346
- x(r(ie), {
2346
+ x(r(re), {
2347
2347
  modelValue: b.value.email,
2348
2348
  "onUpdate:modelValue": y[1] || (y[1] = ($) => b.value.email = $),
2349
2349
  label: "Email",
2350
2350
  type: "email",
2351
2351
  name: "email"
2352
2352
  }, null, 8, ["modelValue"]),
2353
- x(r($e), {
2353
+ x(r(Ae), {
2354
2354
  modelValue: b.value.locale,
2355
2355
  "onUpdate:modelValue": y[2] || (y[2] = ($) => b.value.locale = $),
2356
2356
  options: S.value,
2357
2357
  label: "Язык"
2358
2358
  }, null, 8, ["modelValue", "options"]),
2359
- x(r($e), {
2359
+ x(r(Ae), {
2360
2360
  modelValue: b.value.theme,
2361
2361
  "onUpdate:modelValue": y[3] || (y[3] = ($) => b.value.theme = $),
2362
- options: R.value,
2362
+ options: A.value,
2363
2363
  label: "Тема"
2364
2364
  }, null, 8, ["modelValue", "options"])
2365
2365
  ]),
2366
- d("footer", pl, [
2366
+ d("footer", yl, [
2367
2367
  x(r(B), {
2368
2368
  variant: "primary",
2369
- onClick: A
2369
+ onClick: R
2370
2370
  }, {
2371
2371
  default: m(() => [...y[6] || (y[6] = [
2372
2372
  C("Сохранить", -1)
@@ -2381,9 +2381,9 @@ const Ga = { class: "admin-page admin-resource-view" }, Ha = { class: "admin-pag
2381
2381
  padding: "md"
2382
2382
  }, {
2383
2383
  default: m(() => [
2384
- d("header", gl, [
2384
+ d("header", bl, [
2385
2385
  y[8] || (y[8] = d("h3", { class: "admin-profile__card-title" }, "Двухфакторная аутентификация", -1)),
2386
- x(r(qe), {
2386
+ x(r(Ke), {
2387
2387
  variant: P.value ? "success" : "default"
2388
2388
  }, {
2389
2389
  default: m(() => [
@@ -2392,8 +2392,8 @@ const Ga = { class: "admin-page admin-resource-view" }, Ha = { class: "admin-pag
2392
2392
  _: 1
2393
2393
  }, 8, ["variant"])
2394
2394
  ]),
2395
- P.value ? (s(), c("p", hl, " 2FA включена. У вас остались recovery-коды на случай потери устройства. ")) : (s(), c("p", _l, " Включите 2FA для дополнительной защиты аккаунта. ")),
2396
- d("footer", yl, [
2395
+ P.value ? (s(), c("p", kl, " 2FA включена. У вас остались recovery-коды на случай потери устройства. ")) : (s(), c("p", wl, " Включите 2FA для дополнительной защиты аккаунта. ")),
2396
+ d("footer", $l, [
2397
2397
  P.value ? (s(), c(T, { key: 0 }, [
2398
2398
  x(r(B), {
2399
2399
  variant: "ghost",
@@ -2435,7 +2435,7 @@ const Ga = { class: "admin-page admin-resource-view" }, Ha = { class: "admin-pag
2435
2435
  }, () => [
2436
2436
  x(r(q), { padding: "md" }, {
2437
2437
  default: m(() => [
2438
- d("p", bl, " Section «" + h(f.value) + "» не реализована библиотекой — host-проект подключает её через slot " + h(f.value) + ". ", 1)
2438
+ d("p", xl, " Section «" + h(f.value) + "» не реализована библиотекой — host-проект подключает её через slot " + h(f.value) + ". ", 1)
2439
2439
  ]),
2440
2440
  _: 1
2441
2441
  })
@@ -2444,13 +2444,13 @@ const Ga = { class: "admin-page admin-resource-view" }, Ha = { class: "admin-pag
2444
2444
  ])
2445
2445
  ]));
2446
2446
  }
2447
- }), me = Ee(), Yi = me.register, wl = me.get, Qi = me.has, Zi = me.list, eo = me.clear, $l = me.registerBundle, xl = /* @__PURE__ */ L({
2447
+ }), ve = Te(), Yi = ve.register, Sl = ve.get, Qi = ve.has, Zi = ve.list, eo = ve.clear, Al = ve.registerBundle, Rl = /* @__PURE__ */ L({
2448
2448
  __name: "UnknownWidget",
2449
2449
  props: {
2450
2450
  type: {}
2451
2451
  },
2452
2452
  setup(e) {
2453
- return (t, n) => (s(), w(r(Y), { variant: "warning" }, {
2453
+ return (t, n) => (s(), w(r(Q), { variant: "warning" }, {
2454
2454
  title: m(() => [
2455
2455
  C("Неизвестный widget-тип: " + h(e.type), 1)
2456
2456
  ]),
@@ -2462,25 +2462,25 @@ const Ga = { class: "admin-page admin-resource-view" }, Ha = { class: "admin-pag
2462
2462
  _: 1
2463
2463
  }));
2464
2464
  }
2465
- }), Cl = /* @__PURE__ */ L({
2465
+ }), Ul = /* @__PURE__ */ L({
2466
2466
  __name: "WidgetRenderer",
2467
2467
  props: {
2468
2468
  node: {}
2469
2469
  },
2470
2470
  setup(e) {
2471
- const t = e, n = p(() => wl(t.node.type)), o = p(() => {
2471
+ const t = e, n = p(() => Sl(t.node.type)), o = p(() => {
2472
2472
  const { type: a, span: l, ...i } = t.node;
2473
2473
  return i;
2474
2474
  });
2475
- return (a, l) => n.value ? (s(), w(oe(n.value), Ce(Se({ key: 0 }, o.value)), null, 16)) : (s(), w(xl, {
2475
+ return (a, l) => n.value ? (s(), w(ue(n.value), Ue(Ee({ key: 0 }, o.value)), null, 16)) : (s(), w(Rl, {
2476
2476
  key: 1,
2477
2477
  type: e.node.type
2478
2478
  }, null, 8, ["type"]));
2479
2479
  }
2480
- }), Sl = { class: "admin-page admin-dashboard" }, Al = { class: "admin-page__hd" }, Rl = { class: "admin-page__title-wrap" }, Ul = { class: "admin-page__title" }, El = {
2480
+ }), El = { class: "admin-page admin-dashboard" }, Fl = { class: "admin-page__hd" }, Ll = { class: "admin-page__title-wrap" }, Pl = { class: "admin-page__title" }, Tl = {
2481
2481
  key: 0,
2482
2482
  class: "admin-page__count"
2483
- }, Fl = { class: "admin-page__actions" }, Ll = { class: "admin-dashboard__grid" }, Pl = /* @__PURE__ */ L({
2483
+ }, Ml = { class: "admin-page__actions" }, Nl = { class: "admin-dashboard__grid" }, Il = /* @__PURE__ */ L({
2484
2484
  __name: "DashboardPage",
2485
2485
  props: {
2486
2486
  slug: { default: void 0 },
@@ -2489,7 +2489,7 @@ const Ga = { class: "admin-page admin-resource-view" }, Ha = { class: "admin-pag
2489
2489
  subtitle: { default: void 0 }
2490
2490
  },
2491
2491
  setup(e) {
2492
- const t = e, n = ae(), o = p(() => !t.slug || !n.manifest ? null : n.manifest.dashboards?.find((v) => v.slug === t.slug) ?? null), a = p(() => t.widgets ? t.widgets : o.value ? o.value.widgets ?? [] : []), l = p(
2492
+ const t = e, n = se(), o = p(() => !t.slug || !n.manifest ? null : n.manifest.dashboards?.find((v) => v.slug === t.slug) ?? null), a = p(() => t.widgets ? t.widgets : o.value ? o.value.widgets ?? [] : []), l = p(
2493
2493
  () => t.title ?? o.value?.label ?? "Dashboard"
2494
2494
  ), i = p(
2495
2495
  () => t.subtitle ?? o.value?.description ?? null
@@ -2498,28 +2498,28 @@ const Ga = { class: "admin-page admin-resource-view" }, Ha = { class: "admin-pag
2498
2498
  const v = typeof f.span == "number" ? f.span : 12;
2499
2499
  return Math.max(1, Math.min(12, v));
2500
2500
  }
2501
- return (f, v) => (s(), c("section", Sl, [
2502
- d("header", Al, [
2503
- d("div", Rl, [
2504
- d("h1", Ul, h(l.value), 1),
2505
- i.value ? (s(), c("div", El, h(i.value), 1)) : F("", !0)
2501
+ return (f, v) => (s(), c("section", El, [
2502
+ d("header", Fl, [
2503
+ d("div", Ll, [
2504
+ d("h1", Pl, h(l.value), 1),
2505
+ i.value ? (s(), c("div", Tl, h(i.value), 1)) : F("", !0)
2506
2506
  ]),
2507
- d("div", Fl, [
2507
+ d("div", Ml, [
2508
2508
  H(f.$slots, "actions")
2509
2509
  ])
2510
2510
  ]),
2511
- d("div", Ll, [
2511
+ d("div", Nl, [
2512
2512
  (s(!0), c(T, null, I(a.value, (b, S) => (s(), c("div", {
2513
2513
  key: S,
2514
2514
  class: "admin-dashboard__cell",
2515
- style: Ae({ gridColumn: `span ${u(b)} / span ${u(b)}` })
2515
+ style: Fe({ gridColumn: `span ${u(b)} / span ${u(b)}` })
2516
2516
  }, [
2517
- x(Cl, { node: b }, null, 8, ["node"])
2517
+ x(Ul, { node: b }, null, 8, ["node"])
2518
2518
  ], 4))), 128))
2519
2519
  ])
2520
2520
  ]));
2521
2521
  }
2522
- }), Tl = /* @__PURE__ */ L({
2522
+ }), Bl = /* @__PURE__ */ L({
2523
2523
  __name: "StatWidget",
2524
2524
  props: {
2525
2525
  title: { default: "" },
@@ -2539,7 +2539,7 @@ const Ga = { class: "admin-page admin-resource-view" }, Ha = { class: "admin-pag
2539
2539
  warning: "warning",
2540
2540
  info: "info"
2541
2541
  }, o = p(() => n[t.tone]);
2542
- return (a, l) => (s(), w(r(be), {
2542
+ return (a, l) => (s(), w(r(xe), {
2543
2543
  title: e.title,
2544
2544
  value: e.value,
2545
2545
  prefix: e.prefix,
@@ -2550,16 +2550,16 @@ const Ga = { class: "admin-page admin-resource-view" }, Ha = { class: "admin-pag
2550
2550
  loading: e.loading
2551
2551
  }, null, 8, ["title", "value", "prefix", "suffix", "trend", "precision", "tone", "loading"]));
2552
2552
  }
2553
- }), Ml = {
2553
+ }), Vl = {
2554
2554
  key: 0,
2555
2555
  class: "admin-widget__hd"
2556
- }, Nl = {
2556
+ }, zl = {
2557
2557
  key: 0,
2558
2558
  class: "admin-widget__title"
2559
- }, Il = {
2559
+ }, ql = {
2560
2560
  key: 1,
2561
2561
  class: "admin-widget__desc"
2562
- }, Bl = ["viewBox", "height", "aria-label"], Vl = ["x", "y", "width", "height", "fill", "data-label", "data-value"], zl = /* @__PURE__ */ L({
2562
+ }, Dl = ["viewBox", "height", "aria-label"], Ol = ["x", "y", "width", "height", "fill", "data-label", "data-value"], Wl = /* @__PURE__ */ L({
2563
2563
  __name: "BarChartWidget",
2564
2564
  props: {
2565
2565
  title: { default: "" },
@@ -2584,9 +2584,9 @@ const Ga = { class: "admin-page admin-resource-view" }, Ha = { class: "admin-pag
2584
2584
  class: "admin-widget"
2585
2585
  }, {
2586
2586
  default: m(() => [
2587
- e.title || e.description ? (s(), c("header", Ml, [
2588
- e.title ? (s(), c("h3", Nl, h(e.title), 1)) : F("", !0),
2589
- e.description ? (s(), c("p", Il, h(e.description), 1)) : F("", !0)
2587
+ e.title || e.description ? (s(), c("header", Vl, [
2588
+ e.title ? (s(), c("h3", zl, h(e.title), 1)) : F("", !0),
2589
+ e.description ? (s(), c("p", ql, h(e.description), 1)) : F("", !0)
2590
2590
  ])) : F("", !0),
2591
2591
  (s(), c("svg", {
2592
2592
  class: "admin-widget-bar-chart",
@@ -2609,16 +2609,16 @@ const Ga = { class: "admin-page admin-resource-view" }, Ha = { class: "admin-pag
2609
2609
  "data-value": i.value
2610
2610
  }, [
2611
2611
  d("title", null, h(i.label) + ": " + h(i.value), 1)
2612
- ], 8, Vl))), 128))
2613
- ], 8, Bl))
2612
+ ], 8, Ol))), 128))
2613
+ ], 8, Dl))
2614
2614
  ]),
2615
2615
  _: 1
2616
2616
  }));
2617
2617
  }
2618
- }), ql = {
2618
+ }), jl = {
2619
2619
  key: 0,
2620
2620
  class: "admin-widget__hd"
2621
- }, Dl = { class: "admin-widget__title" }, Ol = { class: "admin-donut-widget__row" }, Wl = ["aria-label"], jl = ["d", "fill"], Kl = { class: "admin-donut-widget__legend" }, Gl = { class: "admin-donut-widget__label" }, Hl = { class: "admin-donut-widget__value" }, Xl = /* @__PURE__ */ L({
2621
+ }, Kl = { class: "admin-widget__title" }, Gl = { class: "admin-donut-widget__row" }, Hl = ["aria-label"], Xl = ["d", "fill"], Jl = { class: "admin-donut-widget__legend" }, Yl = { class: "admin-donut-widget__label" }, Ql = { class: "admin-donut-widget__value" }, Zl = /* @__PURE__ */ L({
2622
2622
  __name: "DonutChartWidget",
2623
2623
  props: {
2624
2624
  title: { default: "" },
@@ -2636,7 +2636,7 @@ const Ga = { class: "admin-page admin-resource-view" }, Ha = { class: "admin-pag
2636
2636
  return t.data.map((i, u) => {
2637
2637
  const f = l / o.value * 2 * Math.PI;
2638
2638
  l += i.value;
2639
- const v = l / o.value * 2 * Math.PI, b = 50, S = 60, R = 60, A = S + b * Math.cos(f - Math.PI / 2), _ = R + b * Math.sin(f - Math.PI / 2), g = S + b * Math.cos(v - Math.PI / 2), U = R + b * Math.sin(v - Math.PI / 2), P = v - f > Math.PI ? 1 : 0, k = t.data.length === 1 ? `M ${S - b} ${R} a ${b} ${b} 0 1 0 ${b * 2} 0 a ${b} ${b} 0 1 0 ${-b * 2} 0` : `M ${S} ${R} L ${A} ${_} A ${b} ${b} 0 ${P} 1 ${g} ${U} Z`;
2639
+ const v = l / o.value * 2 * Math.PI, b = 50, S = 60, A = 60, R = S + b * Math.cos(f - Math.PI / 2), _ = A + b * Math.sin(f - Math.PI / 2), g = S + b * Math.cos(v - Math.PI / 2), U = A + b * Math.sin(v - Math.PI / 2), P = v - f > Math.PI ? 1 : 0, k = t.data.length === 1 ? `M ${S - b} ${A} a ${b} ${b} 0 1 0 ${b * 2} 0 a ${b} ${b} 0 1 0 ${-b * 2} 0` : `M ${S} ${A} L ${R} ${_} A ${b} ${b} 0 ${P} 1 ${g} ${U} Z`;
2640
2640
  return {
2641
2641
  ...i,
2642
2642
  path: k,
@@ -2650,10 +2650,10 @@ const Ga = { class: "admin-page admin-resource-view" }, Ha = { class: "admin-pag
2650
2650
  class: "admin-widget admin-donut-widget"
2651
2651
  }, {
2652
2652
  default: m(() => [
2653
- e.title ? (s(), c("header", ql, [
2654
- d("h3", Dl, h(e.title), 1)
2653
+ e.title ? (s(), c("header", jl, [
2654
+ d("h3", Kl, h(e.title), 1)
2655
2655
  ])) : F("", !0),
2656
- d("div", Ol, [
2656
+ d("div", Gl, [
2657
2657
  (s(), c("svg", {
2658
2658
  viewBox: "0 0 120 120",
2659
2659
  class: "admin-donut-widget__svg",
@@ -2666,22 +2666,22 @@ const Ga = { class: "admin-page admin-resource-view" }, Ha = { class: "admin-pag
2666
2666
  fill: u.color
2667
2667
  }, [
2668
2668
  d("title", null, h(u.label) + ": " + h(u.value) + " (" + h(u.pct) + "%)", 1)
2669
- ], 8, jl))), 128)),
2669
+ ], 8, Xl))), 128)),
2670
2670
  i[0] || (i[0] = d("circle", {
2671
2671
  cx: "60",
2672
2672
  cy: "60",
2673
2673
  r: "30",
2674
2674
  fill: "var(--uid-surface-raised)"
2675
2675
  }, null, -1))
2676
- ], 8, Wl)),
2677
- d("ul", Kl, [
2676
+ ], 8, Hl)),
2677
+ d("ul", Jl, [
2678
2678
  (s(!0), c(T, null, I(a.value, (u, f) => (s(), c("li", { key: f }, [
2679
2679
  d("span", {
2680
2680
  class: "admin-donut-widget__dot",
2681
- style: Ae({ background: u.color })
2681
+ style: Fe({ background: u.color })
2682
2682
  }, null, 4),
2683
- d("span", Gl, h(u.label), 1),
2684
- d("span", Hl, h(u.pct) + "%", 1)
2683
+ d("span", Yl, h(u.label), 1),
2684
+ d("span", Ql, h(u.pct) + "%", 1)
2685
2685
  ]))), 128))
2686
2686
  ])
2687
2687
  ])
@@ -2689,10 +2689,10 @@ const Ga = { class: "admin-page admin-resource-view" }, Ha = { class: "admin-pag
2689
2689
  _: 1
2690
2690
  }));
2691
2691
  }
2692
- }), Jl = {
2692
+ }), es = {
2693
2693
  key: 0,
2694
2694
  class: "admin-widget__hd"
2695
- }, Yl = { class: "admin-widget__title" }, Ql = /* @__PURE__ */ L({
2695
+ }, ts = { class: "admin-widget__title" }, ns = /* @__PURE__ */ L({
2696
2696
  __name: "RecentTableWidget",
2697
2697
  props: {
2698
2698
  title: { default: "" },
@@ -2706,10 +2706,10 @@ const Ga = { class: "admin-page admin-resource-view" }, Ha = { class: "admin-pag
2706
2706
  class: "admin-widget"
2707
2707
  }, {
2708
2708
  default: m(() => [
2709
- e.title ? (s(), c("header", Jl, [
2710
- d("h3", Yl, h(e.title), 1)
2709
+ e.title ? (s(), c("header", es, [
2710
+ d("h3", ts, h(e.title), 1)
2711
2711
  ])) : F("", !0),
2712
- x(r(ze), {
2712
+ x(r(je), {
2713
2713
  columns: e.columns,
2714
2714
  data: e.rows,
2715
2715
  "empty-text": e.emptyText
@@ -2718,10 +2718,10 @@ const Ga = { class: "admin-page admin-resource-view" }, Ha = { class: "admin-pag
2718
2718
  _: 1
2719
2719
  }));
2720
2720
  }
2721
- }), Zl = {
2721
+ }), as = {
2722
2722
  key: 0,
2723
2723
  class: "admin-widget__hd"
2724
- }, es = { class: "admin-widget__title" }, ts = /* @__PURE__ */ L({
2724
+ }, ls = { class: "admin-widget__title" }, ss = /* @__PURE__ */ L({
2725
2725
  __name: "HeatmapWidget",
2726
2726
  props: {
2727
2727
  title: { default: "" },
@@ -2736,10 +2736,10 @@ const Ga = { class: "admin-page admin-resource-view" }, Ha = { class: "admin-pag
2736
2736
  class: "admin-widget"
2737
2737
  }, {
2738
2738
  default: m(() => [
2739
- e.title ? (s(), c("header", Zl, [
2740
- d("h3", es, h(e.title), 1)
2739
+ e.title ? (s(), c("header", as, [
2740
+ d("h3", ls, h(e.title), 1)
2741
2741
  ])) : F("", !0),
2742
- x(r(Mt), {
2742
+ x(r(Vt), {
2743
2743
  data: e.data,
2744
2744
  levels: e.levels,
2745
2745
  color: e.color,
@@ -2749,10 +2749,10 @@ const Ga = { class: "admin-page admin-resource-view" }, Ha = { class: "admin-pag
2749
2749
  _: 1
2750
2750
  }));
2751
2751
  }
2752
- }), ns = {
2752
+ }), is = {
2753
2753
  key: 0,
2754
2754
  class: "admin-widget__hd"
2755
- }, as = { class: "admin-widget__title" }, ls = { style: { display: "flex", "justify-content": "center" } }, ss = /* @__PURE__ */ L({
2755
+ }, os = { class: "admin-widget__title" }, rs = { style: { display: "flex", "justify-content": "center" } }, us = /* @__PURE__ */ L({
2756
2756
  __name: "GaugeWidget",
2757
2757
  props: {
2758
2758
  title: { default: "" },
@@ -2779,11 +2779,11 @@ const Ga = { class: "admin-page admin-resource-view" }, Ha = { class: "admin-pag
2779
2779
  class: "admin-widget"
2780
2780
  }, {
2781
2781
  default: m(() => [
2782
- e.title ? (s(), c("header", ns, [
2783
- d("h3", as, h(e.title), 1)
2782
+ e.title ? (s(), c("header", is, [
2783
+ d("h3", os, h(e.title), 1)
2784
2784
  ])) : F("", !0),
2785
- d("div", ls, [
2786
- x(r(Nt), {
2785
+ d("div", rs, [
2786
+ x(r(zt), {
2787
2787
  value: e.value,
2788
2788
  min: e.min,
2789
2789
  max: e.max,
@@ -2800,10 +2800,10 @@ const Ga = { class: "admin-page admin-resource-view" }, Ha = { class: "admin-pag
2800
2800
  _: 1
2801
2801
  }));
2802
2802
  }
2803
- }), is = {
2803
+ }), ds = {
2804
2804
  key: 0,
2805
2805
  class: "admin-widget__hd"
2806
- }, os = { class: "admin-widget__title" }, rs = { class: "admin-markdown-widget" }, us = /* @__PURE__ */ L({
2806
+ }, cs = { class: "admin-widget__title" }, ms = { class: "admin-markdown-widget" }, fs = /* @__PURE__ */ L({
2807
2807
  __name: "MarkdownWidget",
2808
2808
  props: {
2809
2809
  title: { default: "" },
@@ -2815,34 +2815,34 @@ const Ga = { class: "admin-page admin-resource-view" }, Ha = { class: "admin-pag
2815
2815
  class: "admin-widget"
2816
2816
  }, {
2817
2817
  default: m(() => [
2818
- e.title ? (s(), c("header", is, [
2819
- d("h3", os, h(e.title), 1)
2818
+ e.title ? (s(), c("header", ds, [
2819
+ d("h3", cs, h(e.title), 1)
2820
2820
  ])) : F("", !0),
2821
- d("div", rs, h(e.content), 1)
2821
+ d("div", ms, h(e.content), 1)
2822
2822
  ]),
2823
2823
  _: 1
2824
2824
  }));
2825
2825
  }
2826
2826
  });
2827
- function ds() {
2828
- $l({
2829
- stat: Tl,
2830
- "bar-chart": zl,
2831
- "donut-chart": Xl,
2832
- "recent-table": Ql,
2833
- heatmap: ts,
2834
- gauge: ss,
2835
- markdown: us
2827
+ function vs() {
2828
+ Al({
2829
+ stat: Bl,
2830
+ "bar-chart": Wl,
2831
+ "donut-chart": Zl,
2832
+ "recent-table": ns,
2833
+ heatmap: ss,
2834
+ gauge: us,
2835
+ markdown: fs
2836
2836
  });
2837
2837
  }
2838
- function cs(e) {
2838
+ function ps(e) {
2839
2839
  return e.success === !0;
2840
2840
  }
2841
2841
  function to(e) {
2842
2842
  return e.success === !1;
2843
2843
  }
2844
- function ms(e) {
2845
- const t = Ht.create({
2844
+ function gs(e) {
2845
+ const t = Qt.create({
2846
2846
  baseURL: e.baseURL,
2847
2847
  withCredentials: !0,
2848
2848
  headers: {
@@ -2851,15 +2851,15 @@ function ms(e) {
2851
2851
  }
2852
2852
  });
2853
2853
  e.csrfToken && (t.defaults.headers.common["X-CSRF-TOKEN"] = e.csrfToken), e.locale && (t.defaults.headers.common["X-Admin-Locale"] = e.locale), t.interceptors.request.use((a) => {
2854
- const l = fs("XSRF-TOKEN");
2854
+ const l = hs("XSRF-TOKEN");
2855
2855
  return l && a.headers.set("X-XSRF-TOKEN", decodeURIComponent(l)), a;
2856
2856
  }), t.interceptors.response.use(
2857
2857
  (a) => {
2858
2858
  const l = a.data;
2859
2859
  if (l && typeof l == "object" && "success" in l) {
2860
- if (cs(l))
2860
+ if (ps(l))
2861
2861
  return a.data = l.payload, a;
2862
- throw Ke(a.status, l.payload);
2862
+ throw Ye(a.status, l.payload);
2863
2863
  }
2864
2864
  return a;
2865
2865
  },
@@ -2868,10 +2868,10 @@ function ms(e) {
2868
2868
  const l = a.response.status, i = a.response.data?.payload ?? {
2869
2869
  errorKey: "unknown",
2870
2870
  message: a.message
2871
- }, u = Ke(l, i);
2872
- return u instanceof dt && e.onUnauthenticated?.(), Promise.reject(u);
2871
+ }, u = Ye(l, i);
2872
+ return u instanceof vt && e.onUnauthenticated?.(), Promise.reject(u);
2873
2873
  }
2874
- return Promise.reject(new Ue(a.message));
2874
+ return Promise.reject(new Pe(a.message));
2875
2875
  }
2876
2876
  );
2877
2877
  const n = (a, l, i) => t[a](l, i).then((u) => u.data), o = (a, l, i, u) => t[a](l, i, u).then((f) => f.data);
@@ -2887,26 +2887,26 @@ function ms(e) {
2887
2887
  }
2888
2888
  };
2889
2889
  }
2890
- function fs(e) {
2890
+ function hs(e) {
2891
2891
  if (typeof document > "u") return null;
2892
- const t = document.cookie.match(new RegExp("(^|; )" + vs(e) + "=([^;]*)"));
2892
+ const t = document.cookie.match(new RegExp("(^|; )" + _s(e) + "=([^;]*)"));
2893
2893
  return t ? t[2] : null;
2894
2894
  }
2895
- function vs(e) {
2895
+ function _s(e) {
2896
2896
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
2897
2897
  }
2898
- function ye(e, t) {
2898
+ function we(e, t) {
2899
2899
  const n = e.permissions?.[t];
2900
2900
  return typeof n == "string" && n.length > 0 ? [n] : [];
2901
2901
  }
2902
- function ps(e, t) {
2902
+ function ys(e, t) {
2903
2903
  const n = e.permissions?.[t];
2904
2904
  return typeof n == "string" && n.length > 0 ? [n] : [];
2905
2905
  }
2906
- function gs(e) {
2906
+ function bs(e) {
2907
2907
  return Array.isArray(e.permission) ? e.permission : typeof e.permission == "string" && e.permission.length > 0 ? [e.permission] : [];
2908
2908
  }
2909
- function hs(e, t) {
2909
+ function ks(e, t) {
2910
2910
  const n = e.slug, o = `/r/${n}`;
2911
2911
  return [
2912
2912
  {
@@ -2918,7 +2918,7 @@ function hs(e, t) {
2918
2918
  kind: "resource",
2919
2919
  slug: n,
2920
2920
  title: e.label,
2921
- permissions: ye(e, "view")
2921
+ permissions: we(e, "view")
2922
2922
  },
2923
2923
  // slug передаётся в page-component'ы как prop. Конкретный slug запекаем в
2924
2924
  // function-mode, чтобы page видел его одинаково и через named-route, и через
@@ -2934,7 +2934,7 @@ function hs(e, t) {
2934
2934
  kind: "resource",
2935
2935
  slug: n,
2936
2936
  title: `${e.label}: создать`,
2937
- permissions: ye(e, "create")
2937
+ permissions: we(e, "create")
2938
2938
  },
2939
2939
  props: { slug: n }
2940
2940
  },
@@ -2947,7 +2947,7 @@ function hs(e, t) {
2947
2947
  kind: "resource",
2948
2948
  slug: n,
2949
2949
  title: `${e.label}: редактирование`,
2950
- permissions: ye(e, "update")
2950
+ permissions: we(e, "update")
2951
2951
  },
2952
2952
  // slug запекаем, id из route-params.
2953
2953
  props: (a) => ({ slug: n, id: a.params.id })
@@ -2961,13 +2961,13 @@ function hs(e, t) {
2961
2961
  kind: "resource",
2962
2962
  slug: n,
2963
2963
  title: e.label,
2964
- permissions: ye(e, "view")
2964
+ permissions: we(e, "view")
2965
2965
  },
2966
2966
  props: (a) => ({ slug: n, id: a.params.id })
2967
2967
  }
2968
2968
  ];
2969
2969
  }
2970
- function _s(e, t) {
2970
+ function ws(e, t) {
2971
2971
  return {
2972
2972
  path: `/screens/${e.slug}`,
2973
2973
  name: `admin.screen.${e.slug}`,
@@ -2977,11 +2977,11 @@ function _s(e, t) {
2977
2977
  kind: "screen",
2978
2978
  slug: e.slug,
2979
2979
  title: e.name,
2980
- permissions: gs(e)
2980
+ permissions: bs(e)
2981
2981
  }
2982
2982
  };
2983
2983
  }
2984
- function ys(e, t) {
2984
+ function $s(e, t) {
2985
2985
  return {
2986
2986
  path: `/settings/${e.slug}`,
2987
2987
  name: `admin.settings.${e.slug}`,
@@ -2991,11 +2991,11 @@ function ys(e, t) {
2991
2991
  kind: "settings",
2992
2992
  slug: e.slug,
2993
2993
  title: e.label,
2994
- permissions: ps(e, "view")
2994
+ permissions: ys(e, "view")
2995
2995
  }
2996
2996
  };
2997
2997
  }
2998
- function bs(e, t) {
2998
+ function xs(e, t) {
2999
2999
  if (typeof e.slug != "string" || e.slug.length === 0) return null;
3000
3000
  const n = e.permission, o = Array.isArray(n) ? n : typeof n == "string" && n.length > 0 ? [n] : [];
3001
3001
  return {
@@ -3011,27 +3011,27 @@ function bs(e, t) {
3011
3011
  }
3012
3012
  };
3013
3013
  }
3014
- function ks(e, t) {
3014
+ function Cs(e, t) {
3015
3015
  if (e === null) return [];
3016
3016
  const n = [];
3017
3017
  for (const o of e.resources)
3018
- n.push(...hs(o, t));
3018
+ n.push(...ks(o, t));
3019
3019
  for (const o of e.screens)
3020
- n.push(_s(o, t));
3020
+ n.push(ws(o, t));
3021
3021
  for (const o of e.settings)
3022
- n.push(ys(o, t));
3022
+ n.push($s(o, t));
3023
3023
  for (const o of e.dashboards) {
3024
- const a = bs(o, t);
3024
+ const a = xs(o, t);
3025
3025
  a && n.push(a);
3026
3026
  }
3027
3027
  return n;
3028
3028
  }
3029
- function ws(e = {}) {
3029
+ function Ss(e = {}) {
3030
3030
  const t = e.loginRouteName ?? "admin.login", n = e.forbiddenRouteName ?? "admin.forbidden", o = e.redirectQueryKey ?? "redirect";
3031
3031
  return (a) => {
3032
3032
  if (a.name === t)
3033
3033
  return !0;
3034
- const l = X();
3034
+ const l = J();
3035
3035
  if (a.meta?.requiresAuth === !0 && !l.isAuthenticated)
3036
3036
  return {
3037
3037
  name: t,
@@ -3046,7 +3046,7 @@ function ws(e = {}) {
3046
3046
  return Array.isArray(u) && u.length > 0 && !l.hasAnyPermission(u) ? { name: n } : !0;
3047
3047
  };
3048
3048
  }
3049
- function $s(e = {}) {
3049
+ function As(e = {}) {
3050
3050
  const t = e.template, n = e.brand ?? "", o = e.fallback ?? "";
3051
3051
  return (a) => {
3052
3052
  if (typeof document > "u") return;
@@ -3055,17 +3055,17 @@ function $s(e = {}) {
3055
3055
  t ? i = t.replace("{title}", l).replace("{brand}", n) : l && n ? i = `${l} · ${n}` : i = l || n, document.title = i;
3056
3056
  };
3057
3057
  }
3058
- const xs = [
3058
+ const Rs = [
3059
3059
  "admin.resource.",
3060
3060
  "admin.screen.",
3061
3061
  "admin.settings.",
3062
3062
  "admin.dashboard."
3063
3063
  ];
3064
- function Cs(e) {
3065
- return typeof e != "string" ? !1 : xs.some((t) => e.startsWith(t));
3064
+ function Us(e) {
3065
+ return typeof e != "string" ? !1 : Rs.some((t) => e.startsWith(t));
3066
3066
  }
3067
- function Ss(e) {
3068
- const t = e.base ?? "/admin", n = e.history ?? nt(t), o = [
3067
+ function Es(e) {
3068
+ const t = e.base ?? "/admin", n = e.history ?? it(t), o = [
3069
3069
  {
3070
3070
  path: "/login",
3071
3071
  name: "admin.login",
@@ -3101,22 +3101,22 @@ function Ss(e) {
3101
3101
  name: "admin.notFound",
3102
3102
  component: e.components.notFound,
3103
3103
  meta: { kind: "system", title: "404" }
3104
- }, l = St({
3104
+ }, l = Et({
3105
3105
  history: n,
3106
3106
  routes: [...o, ...e.extraRoutes ?? [], a]
3107
3107
  });
3108
- return l.beforeEach(ws(e.authGuard)), l.afterEach($s(e.titleGuard)), l.replaceManifestRoutes = (i) => {
3108
+ return l.beforeEach(Ss(e.authGuard)), l.afterEach(As(e.titleGuard)), l.replaceManifestRoutes = (i) => {
3109
3109
  const u = l.getRoutes();
3110
3110
  for (const v of u)
3111
- Cs(v.name) && l.removeRoute(v.name);
3111
+ Us(v.name) && l.removeRoute(v.name);
3112
3112
  l.hasRoute("admin.notFound") && l.removeRoute("admin.notFound");
3113
- const f = ks(i, e.components);
3113
+ const f = Cs(i, e.components);
3114
3114
  for (const v of f)
3115
3115
  l.addRoute(v);
3116
3116
  l.addRoute(a);
3117
3117
  }, l;
3118
3118
  }
3119
- const se = /* @__PURE__ */ L({
3119
+ const X = /* @__PURE__ */ L({
3120
3120
  __name: "TextField",
3121
3121
  props: {
3122
3122
  name: {},
@@ -3130,11 +3130,11 @@ const se = /* @__PURE__ */ L({
3130
3130
  autocomplete: { default: null }
3131
3131
  },
3132
3132
  setup(e) {
3133
- const t = e, n = re(), o = p(() => n.getField(t.name) ?? ""), a = p(() => n.errors[t.name]?.[0]);
3133
+ const t = e, n = de(), o = p(() => n.getField(t.name) ?? ""), a = p(() => n.errors[t.name]?.[0]);
3134
3134
  function l(i) {
3135
3135
  n.setField(t.name, i);
3136
3136
  }
3137
- return (i, u) => (s(), w(r(ie), {
3137
+ return (i, u) => (s(), w(r(re), {
3138
3138
  "model-value": o.value,
3139
3139
  type: e.inputType,
3140
3140
  label: e.label ?? void 0,
@@ -3149,7 +3149,7 @@ const se = /* @__PURE__ */ L({
3149
3149
  "onUpdate:modelValue": l
3150
3150
  }, null, 8, ["model-value", "type", "label", "hint", "error", "placeholder", "required", "disabled", "readonly", "name", "autocomplete"]));
3151
3151
  }
3152
- }), As = /* @__PURE__ */ L({
3152
+ }), $e = /* @__PURE__ */ L({
3153
3153
  __name: "TextAreaField",
3154
3154
  props: {
3155
3155
  name: {},
@@ -3162,11 +3162,11 @@ const se = /* @__PURE__ */ L({
3162
3162
  readonly: { type: Boolean, default: !1 }
3163
3163
  },
3164
3164
  setup(e) {
3165
- const t = e, n = re(), o = p(() => n.getField(t.name) ?? ""), a = p(() => n.errors[t.name]?.[0]);
3165
+ const t = e, n = de(), o = p(() => n.getField(t.name) ?? ""), a = p(() => n.errors[t.name]?.[0]);
3166
3166
  function l(i) {
3167
3167
  n.setField(t.name, i);
3168
3168
  }
3169
- return (i, u) => (s(), w(r(ge), {
3169
+ return (i, u) => (s(), w(r(ye), {
3170
3170
  label: e.label ?? void 0,
3171
3171
  hint: e.help ?? void 0,
3172
3172
  error: a.value,
@@ -3174,7 +3174,7 @@ const se = /* @__PURE__ */ L({
3174
3174
  disabled: e.disabled
3175
3175
  }, {
3176
3176
  default: m(() => [
3177
- x(r(It), {
3177
+ x(r(qt), {
3178
3178
  "model-value": o.value,
3179
3179
  rows: e.rows,
3180
3180
  placeholder: e.placeholder ?? void 0,
@@ -3187,7 +3187,7 @@ const se = /* @__PURE__ */ L({
3187
3187
  _: 1
3188
3188
  }, 8, ["label", "hint", "error", "required", "disabled"]));
3189
3189
  }
3190
- }), Rs = /* @__PURE__ */ L({
3190
+ }), Ve = /* @__PURE__ */ L({
3191
3191
  __name: "NumberField",
3192
3192
  props: {
3193
3193
  name: {},
@@ -3202,14 +3202,14 @@ const se = /* @__PURE__ */ L({
3202
3202
  readonly: { type: Boolean, default: !1 }
3203
3203
  },
3204
3204
  setup(e) {
3205
- const t = e, n = re(), o = p(() => {
3205
+ const t = e, n = de(), o = p(() => {
3206
3206
  const i = n.getField(t.name);
3207
3207
  return i == null || i === "" ? null : typeof i == "number" ? i : Number(i);
3208
3208
  }), a = p(() => n.errors[t.name]?.[0]);
3209
3209
  function l(i) {
3210
3210
  n.setField(t.name, i);
3211
3211
  }
3212
- return (i, u) => (s(), w(r(ge), {
3212
+ return (i, u) => (s(), w(r(ye), {
3213
3213
  label: e.label ?? void 0,
3214
3214
  hint: e.help ?? void 0,
3215
3215
  error: a.value,
@@ -3217,7 +3217,7 @@ const se = /* @__PURE__ */ L({
3217
3217
  disabled: e.disabled
3218
3218
  }, {
3219
3219
  default: m(() => [
3220
- x(r(Bt), {
3220
+ x(r(Dt), {
3221
3221
  "model-value": o.value,
3222
3222
  min: e.min ?? void 0,
3223
3223
  max: e.max ?? void 0,
@@ -3232,7 +3232,7 @@ const se = /* @__PURE__ */ L({
3232
3232
  _: 1
3233
3233
  }, 8, ["label", "hint", "error", "required", "disabled"]));
3234
3234
  }
3235
- }), Us = /* @__PURE__ */ L({
3235
+ }), ee = /* @__PURE__ */ L({
3236
3236
  __name: "SelectField",
3237
3237
  props: {
3238
3238
  name: {},
@@ -3247,14 +3247,14 @@ const se = /* @__PURE__ */ L({
3247
3247
  size: { default: "md" }
3248
3248
  },
3249
3249
  setup(e) {
3250
- const t = e, n = re(), o = p(() => {
3250
+ const t = e, n = de(), o = p(() => {
3251
3251
  const i = n.getField(t.name);
3252
3252
  return i == null || i === "" ? null : i;
3253
3253
  }), a = p(() => n.errors[t.name]?.[0]);
3254
3254
  function l(i) {
3255
3255
  n.setField(t.name, i);
3256
3256
  }
3257
- return (i, u) => (s(), w(r(ge), {
3257
+ return (i, u) => (s(), w(r(ye), {
3258
3258
  label: e.label ?? void 0,
3259
3259
  hint: e.help ?? void 0,
3260
3260
  error: a.value,
@@ -3262,7 +3262,7 @@ const se = /* @__PURE__ */ L({
3262
3262
  disabled: e.disabled
3263
3263
  }, {
3264
3264
  default: m(() => [
3265
- x(r($e), {
3265
+ x(r(Ae), {
3266
3266
  "model-value": o.value,
3267
3267
  options: e.options,
3268
3268
  placeholder: e.placeholder ?? void 0,
@@ -3276,7 +3276,7 @@ const se = /* @__PURE__ */ L({
3276
3276
  _: 1
3277
3277
  }, 8, ["label", "hint", "error", "required", "disabled"]));
3278
3278
  }
3279
- }), Ye = /* @__PURE__ */ L({
3279
+ }), ze = /* @__PURE__ */ L({
3280
3280
  __name: "CheckboxField",
3281
3281
  props: {
3282
3282
  name: {},
@@ -3287,11 +3287,11 @@ const se = /* @__PURE__ */ L({
3287
3287
  disabled: { type: Boolean, default: !1 }
3288
3288
  },
3289
3289
  setup(e) {
3290
- const t = e, n = re(), o = p(() => !!n.getField(t.name)), a = p(() => n.errors[t.name]?.[0]);
3290
+ const t = e, n = de(), o = p(() => !!n.getField(t.name)), a = p(() => n.errors[t.name]?.[0]);
3291
3291
  function l(i) {
3292
3292
  n.setField(t.name, i);
3293
3293
  }
3294
- return (i, u) => (s(), w(r(ge), {
3294
+ return (i, u) => (s(), w(r(ye), {
3295
3295
  label: e.label ?? void 0,
3296
3296
  hint: e.help ?? void 0,
3297
3297
  error: a.value,
@@ -3299,7 +3299,7 @@ const se = /* @__PURE__ */ L({
3299
3299
  disabled: e.disabled
3300
3300
  }, {
3301
3301
  default: m(() => [
3302
- x(r(we), {
3302
+ x(r(Se), {
3303
3303
  "model-value": o.value,
3304
3304
  disabled: e.disabled,
3305
3305
  name: e.name,
@@ -3316,7 +3316,7 @@ const se = /* @__PURE__ */ L({
3316
3316
  _: 1
3317
3317
  }, 8, ["label", "hint", "error", "required", "disabled"]));
3318
3318
  }
3319
- }), Me = /* @__PURE__ */ L({
3319
+ }), oe = /* @__PURE__ */ L({
3320
3320
  __name: "DateField",
3321
3321
  props: {
3322
3322
  name: {},
@@ -3329,14 +3329,14 @@ const se = /* @__PURE__ */ L({
3329
3329
  disabled: { type: Boolean, default: !1 }
3330
3330
  },
3331
3331
  setup(e) {
3332
- const t = e, n = re(), o = p(() => {
3332
+ const t = e, n = de(), o = p(() => {
3333
3333
  const i = n.getField(t.name);
3334
3334
  return i == null || i === "" ? null : String(i);
3335
3335
  }), a = p(() => n.errors[t.name]?.[0]);
3336
3336
  function l(i) {
3337
3337
  n.setField(t.name, i);
3338
3338
  }
3339
- return (i, u) => (s(), w(r(ge), {
3339
+ return (i, u) => (s(), w(r(ye), {
3340
3340
  label: e.label ?? void 0,
3341
3341
  hint: e.help ?? void 0,
3342
3342
  error: a.value,
@@ -3344,7 +3344,7 @@ const se = /* @__PURE__ */ L({
3344
3344
  disabled: e.disabled
3345
3345
  }, {
3346
3346
  default: m(() => [
3347
- x(r(Vt), {
3347
+ x(r(Ot), {
3348
3348
  "model-value": o.value,
3349
3349
  min: e.min ?? void 0,
3350
3350
  max: e.max ?? void 0,
@@ -3356,20 +3356,20 @@ const se = /* @__PURE__ */ L({
3356
3356
  _: 1
3357
3357
  }, 8, ["label", "hint", "error", "required", "disabled"]));
3358
3358
  }
3359
- }), Es = /* @__PURE__ */ L({
3359
+ }), nt = /* @__PURE__ */ L({
3360
3360
  __name: "RowsLayout",
3361
3361
  props: {
3362
3362
  items: {},
3363
3363
  gap: { default: "var(--uid-space-md)" }
3364
3364
  },
3365
3365
  setup(e) {
3366
- return (t, n) => (s(), w(r(zt), {
3366
+ return (t, n) => (s(), w(r(Wt), {
3367
3367
  direction: "column",
3368
3368
  gap: e.gap,
3369
3369
  align: "stretch"
3370
3370
  }, {
3371
3371
  default: m(() => [
3372
- (s(!0), c(T, null, I(e.items, (o, a) => (s(), w(he, {
3372
+ (s(!0), c(T, null, I(e.items, (o, a) => (s(), w(be, {
3373
3373
  key: a,
3374
3374
  node: o
3375
3375
  }, null, 8, ["node"]))), 128))
@@ -3390,7 +3390,7 @@ const se = /* @__PURE__ */ L({
3390
3390
  const l = a.span;
3391
3391
  return typeof l == "number" && l > 0 ? Math.min(l, t.cols) : n.value;
3392
3392
  }
3393
- return (a, l) => (s(), w(r(qt), {
3393
+ return (a, l) => (s(), w(r(jt), {
3394
3394
  cols: e.cols,
3395
3395
  gap: e.gap
3396
3396
  }, {
@@ -3398,9 +3398,9 @@ const se = /* @__PURE__ */ L({
3398
3398
  (s(!0), c(T, null, I(e.items, (i, u) => (s(), c("div", {
3399
3399
  key: u,
3400
3400
  class: "admin-columns__item",
3401
- style: Ae({ gridColumn: `span ${o(i)} / span ${o(i)}` })
3401
+ style: Fe({ gridColumn: `span ${o(i)} / span ${o(i)}` })
3402
3402
  }, [
3403
- x(he, { node: i }, null, 8, ["node"])
3403
+ x(be, { node: i }, null, 8, ["node"])
3404
3404
  ], 4))), 128))
3405
3405
  ]),
3406
3406
  _: 1
@@ -3415,7 +3415,7 @@ const se = /* @__PURE__ */ L({
3415
3415
  }, Ts = {
3416
3416
  key: 1,
3417
3417
  class: "admin-section__description"
3418
- }, Ms = { class: "admin-section__body" }, Qe = /* @__PURE__ */ L({
3418
+ }, Ms = { class: "admin-section__body" }, ge = /* @__PURE__ */ L({
3419
3419
  __name: "SectionLayout",
3420
3420
  props: {
3421
3421
  items: {},
@@ -3433,7 +3433,7 @@ const se = /* @__PURE__ */ L({
3433
3433
  e.description ? (s(), c("p", Ts, h(e.description), 1)) : F("", !0)
3434
3434
  ])) : F("", !0),
3435
3435
  d("div", Ms, [
3436
- (s(!0), c(T, null, I(e.items, (o, a) => (s(), w(he, {
3436
+ (s(!0), c(T, null, I(e.items, (o, a) => (s(), w(be, {
3437
3437
  key: a,
3438
3438
  node: o
3439
3439
  }, null, 8, ["node"]))), 128))
@@ -3458,12 +3458,12 @@ const se = /* @__PURE__ */ L({
3458
3458
  function i(u) {
3459
3459
  l.value = u, o("update:active", u);
3460
3460
  }
3461
- return (u, f) => (s(), w(r(st), {
3461
+ return (u, f) => (s(), w(r(ut), {
3462
3462
  "model-value": l.value,
3463
3463
  "onUpdate:modelValue": i
3464
3464
  }, {
3465
3465
  list: m(() => [
3466
- (s(!0), c(T, null, I(e.items, (v, b) => (s(), w(r(ke), {
3466
+ (s(!0), c(T, null, I(e.items, (v, b) => (s(), w(r(Ce), {
3467
3467
  key: a(v, b),
3468
3468
  value: a(v, b)
3469
3469
  }, {
@@ -3474,13 +3474,13 @@ const se = /* @__PURE__ */ L({
3474
3474
  }, 1032, ["value"]))), 128))
3475
3475
  ]),
3476
3476
  default: m(() => [
3477
- (s(!0), c(T, null, I(e.items, (v, b) => (s(), w(r(it), {
3477
+ (s(!0), c(T, null, I(e.items, (v, b) => (s(), w(r(dt), {
3478
3478
  key: `panel-${a(v, b)}`,
3479
3479
  value: a(v, b)
3480
3480
  }, {
3481
3481
  default: m(() => [
3482
- (s(!0), c(T, null, I(v.items, (S, R) => (s(), w(he, {
3483
- key: R,
3482
+ (s(!0), c(T, null, I(v.items, (S, A) => (s(), w(be, {
3483
+ key: A,
3484
3484
  node: S
3485
3485
  }, null, 8, ["node"]))), 128))
3486
3486
  ]),
@@ -3492,29 +3492,60 @@ const se = /* @__PURE__ */ L({
3492
3492
  }
3493
3493
  });
3494
3494
  function Is() {
3495
- Ca({
3495
+ Ua({
3496
3496
  fields: {
3497
- text: se,
3498
- email: se,
3499
- url: se,
3500
- password: se,
3501
- tel: se,
3502
- search: se,
3503
- textarea: As,
3504
- number: Rs,
3505
- select: Us,
3506
- checkbox: Ye,
3507
- switcher: Ye,
3508
- date: Me,
3509
- datetime: Me,
3510
- time: Me
3497
+ // Backend Field-классы из dskripchenko/laravel-admin отдают эти fieldType()
3498
+ // строки. Соответствие см. core/src/Field/{Input,TextArea,Select,...}.php.
3499
+ input: X,
3500
+ text: X,
3501
+ email: X,
3502
+ url: X,
3503
+ password: X,
3504
+ tel: X,
3505
+ search: X,
3506
+ slug: X,
3507
+ hidden: X,
3508
+ label: X,
3509
+ textarea: $e,
3510
+ // Fallback для wysiwyg/markdown/code — обычный TextAreaField.
3511
+ // Реальный rich-editor host подключает через subpath:
3512
+ // import { QuillField } from '@dskripchenko/laravel-admin/quill'
3513
+ // registerField('wysiwyg', QuillField)
3514
+ wysiwyg: $e,
3515
+ markdown: $e,
3516
+ code: $e,
3517
+ number: Ve,
3518
+ slider: Ve,
3519
+ rating: Ve,
3520
+ select: ee,
3521
+ combobox: ee,
3522
+ radio: ee,
3523
+ tags: ee,
3524
+ "morph-switcher": ee,
3525
+ relation: ee,
3526
+ cascader: ee,
3527
+ "tree-select": ee,
3528
+ checkbox: ze,
3529
+ switcher: ze,
3530
+ boolean: ze,
3531
+ date: oe,
3532
+ datetime: oe,
3533
+ datepicker: oe,
3534
+ "date-range": oe,
3535
+ time: oe,
3536
+ "time-picker": oe,
3537
+ "color-picker": X
3511
3538
  },
3512
3539
  layouts: {
3513
- rows: Es,
3540
+ rows: nt,
3514
3541
  columns: Fs,
3515
- section: Qe,
3516
- block: Qe,
3517
- tabs: Ns
3542
+ section: ge,
3543
+ block: ge,
3544
+ tabs: Ns,
3545
+ accordion: ge,
3546
+ group: nt,
3547
+ step: ge,
3548
+ wizard: ge
3518
3549
  }
3519
3550
  });
3520
3551
  }
@@ -3528,12 +3559,12 @@ const Bs = /* @__PURE__ */ L({
3528
3559
  mono: { type: Boolean, default: !1 }
3529
3560
  },
3530
3561
  setup(e) {
3531
- const t = e, n = Fe(), o = p(() => {
3562
+ const t = e, n = Me(), o = p(() => {
3532
3563
  let a = t.value;
3533
3564
  return a === void 0 && n && t.name && (a = n[t.name]), a == null || a === "" ? t.placeholder : String(a);
3534
3565
  });
3535
3566
  return (a, l) => (s(), c("span", {
3536
- class: J(["admin-infolist-text", e.mono ? "admin-infolist-text--mono" : ""])
3567
+ class: Y(["admin-infolist-text", e.mono ? "admin-infolist-text--mono" : ""])
3537
3568
  }, h(o.value), 3));
3538
3569
  }
3539
3570
  }), Vs = {
@@ -3549,11 +3580,11 @@ const Bs = /* @__PURE__ */ L({
3549
3580
  variant: { default: void 0 }
3550
3581
  },
3551
3582
  setup(e) {
3552
- const t = e, n = Fe(), o = p(() => {
3583
+ const t = e, n = Me(), o = p(() => {
3553
3584
  let l = t.value;
3554
3585
  return l === void 0 && n && t.name && (l = n[t.name]), l == null ? "" : String(l);
3555
3586
  }), a = p(() => t.variant ? t.variant : t.map[o.value] ?? "default");
3556
- return (l, i) => o.value ? (s(), w(r(qe), {
3587
+ return (l, i) => o.value ? (s(), w(r(Ke), {
3557
3588
  key: 0,
3558
3589
  variant: a.value
3559
3590
  }, {
@@ -3575,12 +3606,12 @@ const Bs = /* @__PURE__ */ L({
3575
3606
  falseLabel: { default: "" }
3576
3607
  },
3577
3608
  setup(e) {
3578
- const t = e, n = Fe(), o = p(() => {
3609
+ const t = e, n = Me(), o = p(() => {
3579
3610
  let i = t.value;
3580
3611
  return i === void 0 && n && t.name && (i = n[t.name]), !!i;
3581
3612
  }), a = p(() => o.value ? t.trueLabel : t.falseLabel), l = p(() => o.value ? t.trueIcon : t.falseIcon);
3582
3613
  return (i, u) => (s(), c("span", {
3583
- class: J(["admin-infolist-icon", o.value ? "admin-infolist-icon--on" : "admin-infolist-icon--off"])
3614
+ class: Y(["admin-infolist-icon", o.value ? "admin-infolist-icon--on" : "admin-infolist-icon--off"])
3584
3615
  }, [
3585
3616
  d("span", {
3586
3617
  class: "admin-infolist-icon__glyph",
@@ -3592,7 +3623,7 @@ const Bs = /* @__PURE__ */ L({
3592
3623
  }), Ws = {
3593
3624
  key: 1,
3594
3625
  class: "admin-infolist-text"
3595
- }, Ze = /* @__PURE__ */ L({
3626
+ }, at = /* @__PURE__ */ L({
3596
3627
  __name: "KeyValueEntry",
3597
3628
  props: {
3598
3629
  name: { default: "" },
@@ -3600,20 +3631,20 @@ const Bs = /* @__PURE__ */ L({
3600
3631
  value: { default: void 0 }
3601
3632
  },
3602
3633
  setup(e) {
3603
- const t = e, n = Fe(), o = p(() => {
3634
+ const t = e, n = Me(), o = p(() => {
3604
3635
  let l = t.value;
3605
3636
  return l === void 0 && n && t.name && (l = n[t.name]), l == null ? [] : typeof l != "object" ? [] : Object.entries(l);
3606
3637
  });
3607
3638
  function a(l) {
3608
3639
  return l == null ? "—" : typeof l == "object" ? JSON.stringify(l) : String(l);
3609
3640
  }
3610
- return (l, i) => o.value.length > 0 ? (s(), w(r(Dt), {
3641
+ return (l, i) => o.value.length > 0 ? (s(), w(r(Kt), {
3611
3642
  key: 0,
3612
3643
  direction: "vertical",
3613
3644
  columns: 1
3614
3645
  }, {
3615
3646
  default: m(() => [
3616
- (s(!0), c(T, null, I(o.value, ([u, f]) => (s(), w(r(Ot), {
3647
+ (s(!0), c(T, null, I(o.value, ([u, f]) => (s(), w(r(Gt), {
3617
3648
  key: u,
3618
3649
  label: u
3619
3650
  }, {
@@ -3628,55 +3659,57 @@ const Bs = /* @__PURE__ */ L({
3628
3659
  }
3629
3660
  });
3630
3661
  function js() {
3631
- Pa({
3662
+ Ia({
3632
3663
  text: Bs,
3633
3664
  badge: zs,
3634
3665
  icon: Os,
3635
- keyvalue: Ze,
3636
- "key-value": Ze
3666
+ keyvalue: at,
3667
+ "key-value": at
3637
3668
  });
3638
3669
  }
3639
3670
  function no(e, t = {}) {
3640
- const n = t.pages ?? {}, o = t.base ?? Ks(e.baseUrl) ?? "/admin", a = ms({
3671
+ const n = t.pages ?? {}, o = t.base ?? Ks(e.baseUrl) ?? "/admin", a = gs({
3641
3672
  baseURL: e.apiUrl,
3642
3673
  csrfToken: e.csrf
3643
3674
  });
3644
- Xt(a);
3645
- const l = wt(wn), i = xt();
3646
- l.use(i), X().hydrate(e), Oe().hydrate(e), De().hydrate(e), We().hydrate(e), Is(), ds(), js();
3647
- const u = Ss({
3675
+ Zt(a);
3676
+ const l = St(Sn), i = Rt();
3677
+ l.use(i), J().hydrate(e), He().hydrate(e), Ge().hydrate(e), Xe().hydrate(e), Is(), vs(), js();
3678
+ const u = Es({
3648
3679
  base: o,
3649
- history: t.router?.history ?? nt(o),
3680
+ history: t.router?.history ?? it(o),
3650
3681
  components: {
3651
- login: n.login ?? ia,
3652
- home: n.home ?? En,
3653
- forbidden: n.forbidden ?? Ln,
3654
- notFound: n.notFound ?? Tn,
3655
- profile: n.profile ?? kl,
3656
- resourceIndex: n.resourceIndex ?? xa,
3657
- resourceCreate: n.resourceCreate ?? Xe,
3658
- resourceEdit: n.resourceEdit ?? Xe,
3659
- resourceView: n.resourceView ?? Za,
3660
- dashboard: n.dashboard ?? Pl,
3661
- settings: n.settings ?? Vn,
3662
- screen: n.screen ?? On
3682
+ login: n.login ?? da,
3683
+ home: n.home ?? Tn,
3684
+ forbidden: n.forbidden ?? Nn,
3685
+ notFound: n.notFound ?? Bn,
3686
+ profile: n.profile ?? Cl,
3687
+ resourceIndex: n.resourceIndex ?? Ra,
3688
+ resourceCreate: n.resourceCreate ?? et,
3689
+ resourceEdit: n.resourceEdit ?? et,
3690
+ resourceView: n.resourceView ?? al,
3691
+ dashboard: n.dashboard ?? Il,
3692
+ settings: n.settings ?? On,
3693
+ screen: n.screen ?? Gn
3663
3694
  },
3664
3695
  extraRoutes: t.router?.extraRoutes,
3665
3696
  authGuard: t.router?.authGuard,
3666
3697
  titleGuard: t.router?.titleGuard
3667
3698
  });
3668
3699
  if (l.use(u), !t.skipManifestLoad) {
3669
- const f = ae(), v = X(), b = () => {
3700
+ const f = se(), v = J(), b = () => {
3670
3701
  f.load().then((S) => {
3671
3702
  u.replaceManifestRoutes(S);
3703
+ const A = u.currentRoute.value;
3704
+ A.name === "admin.notFound" && A.fullPath !== "/" && u.replace(A.fullPath);
3672
3705
  }).catch((S) => {
3673
3706
  typeof console < "u" && console.error("[laravel-admin] manifest load failed:", S);
3674
3707
  });
3675
3708
  };
3676
- v.isAuthenticated && b(), Z(
3709
+ v.isAuthenticated && b(), te(
3677
3710
  () => v.user,
3678
- (S, R) => {
3679
- S && !R && b();
3711
+ (S, A) => {
3712
+ S && !A && b();
3680
3713
  }
3681
3714
  );
3682
3715
  }
@@ -3699,7 +3732,7 @@ async function ao(e = {}) {
3699
3732
  const n = e.xhrUrl ?? "/system/bootstrap";
3700
3733
  return await e.client.get(n);
3701
3734
  } catch (n) {
3702
- if (n instanceof Ue)
3735
+ if (n instanceof Pe)
3703
3736
  return null;
3704
3737
  throw n;
3705
3738
  }
@@ -3736,11 +3769,11 @@ const Hs = { class: "admin-notifs__hd" }, Xs = { class: "admin-notifs__title" },
3736
3769
  },
3737
3770
  emits: ["update:open", "select-item"],
3738
3771
  setup(e, { emit: t }) {
3739
- const n = e, o = t, a = We();
3772
+ const n = e, o = t, a = Xe();
3740
3773
  function l(g) {
3741
3774
  o("update:open", g);
3742
3775
  }
3743
- Z(
3776
+ te(
3744
3777
  () => n.open,
3745
3778
  async (g) => {
3746
3779
  g && await a.load(a.lastFilter ?? "all", 1).catch(() => {
@@ -3769,10 +3802,10 @@ const Hs = { class: "admin-notifs__hd" }, Xs = { class: "admin-notifs__title" },
3769
3802
  const U = g.data.level;
3770
3803
  return U === "success" || U === "warning" || U === "danger" ? U : "info";
3771
3804
  }
3772
- function R(g) {
3805
+ function A(g) {
3773
3806
  return g.data.title ?? "—";
3774
3807
  }
3775
- function A(g) {
3808
+ function R(g) {
3776
3809
  return g.data.body ?? "";
3777
3810
  }
3778
3811
  function _(g) {
@@ -3785,7 +3818,7 @@ const Hs = { class: "admin-notifs__hd" }, Xs = { class: "admin-notifs__title" },
3785
3818
  const $ = Math.floor(y / 24);
3786
3819
  return $ < 7 ? `${$} д назад` : U.toLocaleDateString("ru-RU");
3787
3820
  }
3788
- return (g, U) => (s(), w(r(Wt), {
3821
+ return (g, U) => (s(), w(r(Ht), {
3789
3822
  "model-value": e.open,
3790
3823
  side: "right",
3791
3824
  width: "400px",
@@ -3812,18 +3845,18 @@ const Hs = { class: "admin-notifs__hd" }, Xs = { class: "admin-notifs__title" },
3812
3845
  ])
3813
3846
  ]),
3814
3847
  default: m(() => [
3815
- x(r(st), {
3848
+ x(r(ut), {
3816
3849
  "model-value": i.value,
3817
3850
  "onUpdate:modelValue": u
3818
3851
  }, {
3819
3852
  list: m(() => [
3820
- x(r(ke), { value: "all" }, {
3853
+ x(r(Ce), { value: "all" }, {
3821
3854
  default: m(() => [...U[2] || (U[2] = [
3822
3855
  C("Все", -1)
3823
3856
  ])]),
3824
3857
  _: 1
3825
3858
  }),
3826
- x(r(ke), { value: "unread" }, {
3859
+ x(r(Ce), { value: "unread" }, {
3827
3860
  default: m(() => [
3828
3861
  U[3] || (U[3] = C(" Непрочитанные", -1)),
3829
3862
  r(a).unreadCount > 0 ? (s(), c(T, { key: 0 }, [
@@ -3832,7 +3865,7 @@ const Hs = { class: "admin-notifs__hd" }, Xs = { class: "admin-notifs__title" },
3832
3865
  ]),
3833
3866
  _: 1
3834
3867
  }),
3835
- x(r(ke), { value: "read" }, {
3868
+ x(r(Ce), { value: "read" }, {
3836
3869
  default: m(() => [...U[4] || (U[4] = [
3837
3870
  C("Прочитанные", -1)
3838
3871
  ])]),
@@ -3840,7 +3873,7 @@ const Hs = { class: "admin-notifs__hd" }, Xs = { class: "admin-notifs__title" },
3840
3873
  })
3841
3874
  ]),
3842
3875
  default: m(() => [
3843
- (s(), c(T, null, I(["all", "unread", "read"], (P) => x(r(it), {
3876
+ (s(), c(T, null, I(["all", "unread", "read"], (P) => x(r(dt), {
3844
3877
  key: P,
3845
3878
  value: P
3846
3879
  }, {
@@ -3849,7 +3882,7 @@ const Hs = { class: "admin-notifs__hd" }, Xs = { class: "admin-notifs__title" },
3849
3882
  r(a).loading ? (s(), c("li", Qs, " Загрузка… ")) : r(a).items.length === 0 ? (s(), c("li", Zs, " Нет уведомлений ")) : F("", !0),
3850
3883
  (s(!0), c(T, null, I(r(a).items, (k) => (s(), c("li", {
3851
3884
  key: k.id,
3852
- class: J([
3885
+ class: Y([
3853
3886
  "admin-notifs__item",
3854
3887
  `admin-notifs__item--${S(k)}`,
3855
3888
  { "admin-notifs__item--unread": !k.read_at }
@@ -3862,10 +3895,10 @@ const Hs = { class: "admin-notifs__hd" }, Xs = { class: "admin-notifs__title" },
3862
3895
  }, null, 8, ti),
3863
3896
  d("div", ni, [
3864
3897
  d("div", ai, [
3865
- k.read_at ? (s(), c("span", si, h(R(k)), 1)) : (s(), c("strong", li, h(R(k)), 1)),
3898
+ k.read_at ? (s(), c("span", si, h(A(k)), 1)) : (s(), c("strong", li, h(A(k)), 1)),
3866
3899
  d("span", ii, h(_(k.created_at)), 1)
3867
3900
  ]),
3868
- A(k) ? (s(), c("p", oi, h(A(k)), 1)) : F("", !0)
3901
+ R(k) ? (s(), c("p", oi, h(R(k)), 1)) : F("", !0)
3869
3902
  ]),
3870
3903
  d("button", {
3871
3904
  type: "button",
@@ -3930,14 +3963,14 @@ const Hs = { class: "admin-notifs__hd" }, Xs = { class: "admin-notifs__title" },
3930
3963
  function S(y, $) {
3931
3964
  b.value[y] = $ === null || $ === "" ? null : String($);
3932
3965
  }
3933
- function R() {
3966
+ function A() {
3934
3967
  return n.headers.map((y) => ({
3935
3968
  source: y.key,
3936
3969
  target: b.value[y.key] ?? null
3937
3970
  }));
3938
3971
  }
3939
- function A() {
3940
- o("mapping-submit", R()), u(2);
3972
+ function R() {
3973
+ o("mapping-submit", A()), u(2);
3941
3974
  }
3942
3975
  function _() {
3943
3976
  o("run-import"), u(3);
@@ -3977,7 +4010,7 @@ const Hs = { class: "admin-notifs__hd" }, Xs = { class: "admin-notifs__title" },
3977
4010
  })
3978
4011
  ])
3979
4012
  ]),
3980
- x(r(jt), {
4013
+ x(r(Xt), {
3981
4014
  steps: a,
3982
4015
  current: i.value
3983
4016
  }, null, 8, ["current"]),
@@ -3991,7 +4024,7 @@ const Hs = { class: "admin-notifs__hd" }, Xs = { class: "admin-notifs__title" },
3991
4024
  d("h3", null, "1. Загрузите файл"),
3992
4025
  d("p", null, "CSV / TSV / XLSX, до 50 MB")
3993
4026
  ], -1)),
3994
- x(r(Kt), {
4027
+ x(r(Jt), {
3995
4028
  "model-value": f.value,
3996
4029
  accept: ".csv,.tsv,.xlsx",
3997
4030
  "max-size": 50 * 1024 * 1024,
@@ -4022,7 +4055,7 @@ const Hs = { class: "admin-notifs__hd" }, Xs = { class: "admin-notifs__title" },
4022
4055
  V.sample ? (s(), c("span", hi, " «" + h(V.sample) + "» ", 1)) : F("", !0)
4023
4056
  ]),
4024
4057
  $[4] || ($[4] = d("span", { class: "admin-import-wizard__map-arrow" }, "→", -1)),
4025
- x(r($e), {
4058
+ x(r(Ae), {
4026
4059
  "model-value": b.value[V.key] ?? "",
4027
4060
  options: P.value,
4028
4061
  placeholder: "Не импортировать",
@@ -4042,7 +4075,7 @@ const Hs = { class: "admin-notifs__hd" }, Xs = { class: "admin-notifs__title" },
4042
4075
  $[6] || ($[6] = d("h3", null, "3. Предпросмотр", -1)),
4043
4076
  d("p", null, "Первые " + h(e.preview.length) + " строк перед импортом", 1)
4044
4077
  ]),
4045
- e.preview.some((V) => V.__warning) ? (s(), w(r(Y), {
4078
+ e.preview.some((V) => V.__warning) ? (s(), w(r(Q), {
4046
4079
  key: 0,
4047
4080
  variant: "warning",
4048
4081
  style: { "margin-bottom": "var(--uid-space-md)" }
@@ -4052,7 +4085,7 @@ const Hs = { class: "admin-notifs__hd" }, Xs = { class: "admin-notifs__title" },
4052
4085
  ])]),
4053
4086
  _: 1
4054
4087
  })) : F("", !0),
4055
- e.previewColumns.length > 0 ? (s(), w(r(ze), {
4088
+ e.previewColumns.length > 0 ? (s(), w(r(je), {
4056
4089
  key: 1,
4057
4090
  columns: e.previewColumns,
4058
4091
  data: e.preview
@@ -4069,23 +4102,23 @@ const Hs = { class: "admin-notifs__hd" }, Xs = { class: "admin-notifs__title" },
4069
4102
  d("h3", null, "4. Импорт")
4070
4103
  ], -1)),
4071
4104
  e.progress ? (s(), c(T, { key: 1 }, [
4072
- e.progress.total > 0 ? (s(), w(r(Gt), {
4105
+ e.progress.total > 0 ? (s(), w(r(Yt), {
4073
4106
  key: 0,
4074
4107
  "model-value": e.progress.created + e.progress.updated + e.progress.errors,
4075
4108
  max: e.progress.total
4076
4109
  }, null, 8, ["model-value", "max"])) : F("", !0),
4077
4110
  d("div", ki, [
4078
- x(r(be), {
4111
+ x(r(xe), {
4079
4112
  title: "Создано",
4080
4113
  value: e.progress.created,
4081
4114
  tone: "success"
4082
4115
  }, null, 8, ["value"]),
4083
- x(r(be), {
4116
+ x(r(xe), {
4084
4117
  title: "Обновлено",
4085
4118
  value: e.progress.updated,
4086
4119
  tone: "info"
4087
4120
  }, null, 8, ["value"]),
4088
- x(r(be), {
4121
+ x(r(xe), {
4089
4122
  title: "Ошибки",
4090
4123
  value: e.progress.errors,
4091
4124
  tone: "danger"
@@ -4121,7 +4154,7 @@ const Hs = { class: "admin-notifs__hd" }, Xs = { class: "admin-notifs__title" },
4121
4154
  key: 2,
4122
4155
  variant: "primary",
4123
4156
  disabled: !U.value,
4124
- onClick: A
4157
+ onClick: R
4125
4158
  }, {
4126
4159
  default: m(() => [...$[11] || ($[11] = [
4127
4160
  C(" Подтвердить mapping ", -1)
@@ -4204,10 +4237,10 @@ const Hs = { class: "admin-notifs__hd" }, Xs = { class: "admin-notifs__title" },
4204
4237
  node: { type: "date", name: "demo_date", label: "Дата публикации", inputType: "date" },
4205
4238
  initial: { demo_date: "2026-05-01" }
4206
4239
  }
4207
- ], n = t.reduce((a, l) => (a[l.group] || (a[l.group] = []), a[l.group].push(l), a), {}), o = $t(
4240
+ ], n = t.reduce((a, l) => (a[l.group] || (a[l.group] = []), a[l.group].push(l), a), {}), o = At(
4208
4241
  t.reduce((a, l) => Object.assign(a, l.initial), {})
4209
4242
  );
4210
- return ot(o), (a, l) => (s(), c("section", $i, [
4243
+ return ct(o), (a, l) => (s(), c("section", $i, [
4211
4244
  l[0] || (l[0] = d("header", { class: "admin-page__hd" }, [
4212
4245
  d("div", { class: "admin-page__title-wrap" }, [
4213
4246
  d("h1", { class: "admin-page__title" }, "Field Gallery"),
@@ -4232,7 +4265,7 @@ const Hs = { class: "admin-notifs__hd" }, Xs = { class: "admin-notifs__title" },
4232
4265
  ]),
4233
4266
  d("p", Ui, h(f.description), 1),
4234
4267
  d("div", Ei, [
4235
- x(vt, {
4268
+ x(_t, {
4236
4269
  node: f.node
4237
4270
  }, null, 8, ["node"])
4238
4271
  ])
@@ -4245,118 +4278,118 @@ const Hs = { class: "admin-notifs__hd" }, Xs = { class: "admin-notifs__title" },
4245
4278
  }
4246
4279
  });
4247
4280
  export {
4248
- wn as AdminApp,
4249
- kn as AdminShell,
4250
- _n as AdminSidebar,
4251
- un as AdminTopBar,
4252
- Q as ApiError,
4281
+ Sn as AdminApp,
4282
+ Cn as AdminShell,
4283
+ wn as AdminSidebar,
4284
+ fn as AdminTopBar,
4285
+ Z as ApiError,
4253
4286
  zs as BadgeEntry,
4254
- zl as BarChartWidget,
4255
- Ye as CheckboxField,
4287
+ Wl as BarChartWidget,
4288
+ ze as CheckboxField,
4256
4289
  Fs as ColumnsLayout,
4257
- Pl as DashboardPage,
4258
- Me as DateField,
4259
- Xl as DonutChartWidget,
4290
+ Il as DashboardPage,
4291
+ oe as DateField,
4292
+ Zl as DonutChartWidget,
4260
4293
  oo as FieldGalleryPage,
4261
- vt as FieldRenderer,
4262
- tn as ForbiddenError,
4263
- Ln as ForbiddenPage,
4264
- ss as GaugeWidget,
4265
- ts as HeatmapWidget,
4266
- En as HomePage,
4294
+ _t as FieldRenderer,
4295
+ sn as ForbiddenError,
4296
+ Nn as ForbiddenPage,
4297
+ us as GaugeWidget,
4298
+ ss as HeatmapWidget,
4299
+ Tn as HomePage,
4267
4300
  Os as IconEntry,
4268
4301
  io as ImportWizardPage,
4269
- ja as InfolistRenderer,
4270
- Ze as KeyValueEntry,
4271
- he as LayoutRenderer,
4272
- ut as LocaleSwitcher,
4273
- Hn as LoginForm,
4274
- ia as LoginPage,
4275
- us as MarkdownWidget,
4276
- Ue as NetworkError,
4277
- nn as NotFoundError,
4278
- Tn as NotFoundPage,
4279
- en as NotificationBell,
4302
+ Xa as InfolistRenderer,
4303
+ at as KeyValueEntry,
4304
+ be as LayoutRenderer,
4305
+ ft as LocaleSwitcher,
4306
+ Qn as LoginForm,
4307
+ da as LoginPage,
4308
+ fs as MarkdownWidget,
4309
+ Pe as NetworkError,
4310
+ on as NotFoundError,
4311
+ Bn as NotFoundPage,
4312
+ ln as NotificationBell,
4280
4313
  so as NotificationsDrawer,
4281
- Rs as NumberField,
4282
- kl as ProfilePage,
4283
- Ql as RecentTableWidget,
4284
- Xe as ResourceFormPage,
4285
- xa as ResourceIndexPage,
4286
- Za as ResourceViewPage,
4287
- Es as RowsLayout,
4288
- Qe as SectionLayout,
4289
- Us as SelectField,
4290
- Vn as SettingsPage,
4291
- Tl as StatWidget,
4314
+ Ve as NumberField,
4315
+ Cl as ProfilePage,
4316
+ ns as RecentTableWidget,
4317
+ et as ResourceFormPage,
4318
+ Ra as ResourceIndexPage,
4319
+ al as ResourceViewPage,
4320
+ nt as RowsLayout,
4321
+ ge as SectionLayout,
4322
+ ee as SelectField,
4323
+ On as SettingsPage,
4324
+ Bl as StatWidget,
4292
4325
  Ns as TabsLayout,
4293
- As as TextAreaField,
4326
+ $e as TextAreaField,
4294
4327
  Bs as TextEntry,
4295
- se as TextField,
4296
- rt as ThemeToggle,
4297
- Yn as TwoFactorForm,
4298
- dt as UnauthenticatedError,
4299
- Ta as UnknownEntry,
4300
- ft as UnknownField,
4301
- On as UnknownScreenPage,
4302
- xl as UnknownWidget,
4303
- ln as UserMenu,
4304
- Re as ValidationError,
4305
- Cl as WidgetRenderer,
4306
- ks as buildRoutesFromManifest,
4328
+ X as TextField,
4329
+ mt as ThemeToggle,
4330
+ ta as TwoFactorForm,
4331
+ vt as UnauthenticatedError,
4332
+ Ba as UnknownEntry,
4333
+ ht as UnknownField,
4334
+ Gn as UnknownScreenPage,
4335
+ Rl as UnknownWidget,
4336
+ un as UserMenu,
4337
+ Le as ValidationError,
4338
+ Ul as WidgetRenderer,
4339
+ Cs as buildRoutesFromManifest,
4307
4340
  Ii as clearAdminClient,
4308
4341
  Xi as clearInfolistRegistry,
4309
4342
  ji as clearRegistry,
4310
4343
  eo as clearWidgetRegistry,
4311
4344
  no as createAdminApp,
4312
- ms as createAdminClient,
4313
- Ss as createAdminRouter,
4314
- ws as createAuthGuard,
4315
- $s as createTitleGuard,
4345
+ gs as createAdminClient,
4346
+ Es as createAdminRouter,
4347
+ Ss as createAuthGuard,
4348
+ As as createTitleGuard,
4316
4349
  W as getAdminClient,
4317
- mt as getField,
4318
- Je as getInfolistEntry,
4319
- He as getLayout,
4320
- wl as getWidget,
4350
+ gt as getField,
4351
+ tt as getInfolistEntry,
4352
+ Ze as getLayout,
4353
+ Sl as getWidget,
4321
4354
  Bi as hasAdminClient,
4322
4355
  zi as hasField,
4323
4356
  Gi as hasInfolistEntry,
4324
4357
  Oi as hasLayout,
4325
4358
  Qi as hasWidget,
4326
4359
  to as isError,
4327
- cs as isSuccess,
4360
+ ps as isSuccess,
4328
4361
  qi as listFields,
4329
4362
  Hi as listInfolistEntries,
4330
4363
  Wi as listLayouts,
4331
4364
  Zi as listWidgets,
4332
4365
  ao as loadBootstrap,
4333
- ot as provideFormState,
4334
- Ka as provideRecord,
4366
+ ct as provideFormState,
4367
+ Ja as provideRecord,
4335
4368
  lo as readCsrfFromMeta,
4336
4369
  Gs as readInlineBootstrap,
4337
4370
  Is as registerBuiltinComponents,
4338
4371
  js as registerBuiltinInfolistEntries,
4339
- ds as registerBuiltinWidgets,
4340
- Ca as registerComponents,
4372
+ vs as registerBuiltinWidgets,
4373
+ Ua as registerComponents,
4341
4374
  Vi as registerField,
4342
- Pa as registerInfolistEntries,
4375
+ Ia as registerInfolistEntries,
4343
4376
  Ki as registerInfolistEntry,
4344
4377
  Di as registerLayout,
4345
4378
  Yi as registerWidget,
4346
- $l as registerWidgets,
4347
- Xt as setAdminClient,
4348
- Ke as toApiError,
4379
+ Al as registerWidgets,
4380
+ Zt as setAdminClient,
4381
+ Ye as toApiError,
4349
4382
  co as tryUseFormState,
4350
- Fe as tryUseRecord,
4351
- X as useAuthStore,
4352
- re as useFormState,
4353
- Oe as useLocaleStore,
4354
- ae as useManifestStore,
4355
- dn as useMenuStore,
4356
- We as useNotificationsStore,
4383
+ Me as tryUseRecord,
4384
+ J as useAuthStore,
4385
+ de as useFormState,
4386
+ He as useLocaleStore,
4387
+ se as useManifestStore,
4388
+ vn as useMenuStore,
4389
+ Xe as useNotificationsStore,
4357
4390
  Ji as useRecord,
4358
- ct as useResourceFormStore,
4359
- oa as useResourceIndexStore,
4360
- De as useThemeStore
4391
+ pt as useResourceFormStore,
4392
+ ca as useResourceIndexStore,
4393
+ Ge as useThemeStore
4361
4394
  };
4362
4395
  //# sourceMappingURL=index.mjs.map