@webx-ui/module-banners 0.3.2 → 0.3.3

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.
@@ -1,39 +1,39 @@
1
- import { provide as Vt, inject as zt, defineComponent as lt, computed as v, openBlock as f, createElementBlock as x, createElementVNode as g, createVNode as d, unref as e, withCtx as m, createTextVNode as O, toDisplayString as z, Fragment as H, createBlock as W, createCommentVNode as I, isRef as me, renderList as oe, normalizeClass as J, normalizeStyle as xe, ref as te, reactive as _t, watch as Ct, onMounted as St, onBeforeUnmount as Ot, resolveDynamicComponent as Bt, withModifiers as Ee, defineAsyncComponent as at } from "vue";
2
- import { useLocales as nt, WxInput as Ze, WxButton as E, WxIcon as F, WxFormItem as S, WxTextarea as Lt, WxText as Y, WxSelect as ye, WxInputNumber as ge, WxSwitch as _e, WxSegmented as st, WxColorPicker as Nt, WxTooltip as qe, WxSortableList as Pt } from "@webx-ui/core";
3
- import { useAdmin as ot, useTranslate as it, WxLinkField as Ut } from "@webx-ui/module-admin";
4
- import { WxMediaField as Wt, createMediaApi as Tt } from "@webx-ui/module-media";
5
- function It(t) {
1
+ import { provide as St, inject as _t, defineComponent as lt, computed as v, openBlock as f, createElementBlock as x, createElementVNode as w, createVNode as d, unref as e, withCtx as m, createTextVNode as _, toDisplayString as V, Fragment as H, createBlock as W, createCommentVNode as I, isRef as ye, renderList as ie, normalizeClass as J, normalizeStyle as ke, ref as ae, reactive as Ot, watch as Bt, onMounted as Lt, onBeforeUnmount as Nt, resolveDynamicComponent as Pt, withModifiers as De, defineAsyncComponent as nt } from "vue";
2
+ import { useLocales as st, WxInput as qe, WxPopconfirm as ot, WxButton as E, WxIcon as F, WxFormItem as S, WxTextarea as Tt, WxText as Y, WxSelect as pe, WxInputNumber as xe, WxSwitch as Se, WxSegmented as it, WxColorPicker as Ut, WxTooltip as Ge, WxSortableList as Wt } from "@webx-ui/core";
3
+ import { useAdmin as rt, useTranslate as dt, useRemoveConfirm as ut, WxLinkField as It } from "@webx-ui/module-admin";
4
+ import { WxMediaField as Et, createMediaApi as Dt } from "@webx-ui/module-media";
5
+ function At(t) {
6
6
  const c = `${t.apiPath}/banners`, r = (s) => `${c}/places/${encodeURIComponent(s)}`, y = (s) => s.data;
7
7
  return {
8
8
  places: () => t.http.get(`${c}/places`).then(y),
9
9
  createPlace: (s) => t.http.post(`${c}/places`, s).then(y),
10
- renamePlace: (s, w) => t.http.put(r(s), { title: w }).then(y),
10
+ renamePlace: (s, g) => t.http.put(r(s), { title: g }).then(y),
11
11
  removePlace: (s) => t.http.delete(r(s)).then(() => {
12
12
  }),
13
- list: (s, w = !1) => t.http.get(`${r(s)}/banners${w ? "?trashed=1" : ""}`).then(y),
13
+ list: (s, g = !1) => t.http.get(`${r(s)}/banners${g ? "?trashed=1" : ""}`).then(y),
14
14
  get: (s) => t.http.get(`${c}/${s}`).then(y),
15
- create: (s, w) => t.http.post(`${r(s)}/banners`, { values: w }).then(y),
16
- save: (s, w, B) => t.http.put(
15
+ create: (s, g) => t.http.post(`${r(s)}/banners`, { values: g }).then(y),
16
+ save: (s, g, O) => t.http.put(
17
17
  `${c}/${s}`,
18
- B === void 0 ? { values: w } : { values: w, place: B }
18
+ O === void 0 ? { values: g } : { values: g, place: O }
19
19
  ).then(y),
20
20
  remove: (s) => t.http.delete(`${c}/${s}`).then(() => {
21
21
  }),
22
22
  // The resource of the list line, and not the form's pair: a restored banner stays closed.
23
23
  restore: (s) => t.http.post(`${c}/${s}/restore`, {}).then(y),
24
- reorder: (s, w) => t.http.post(`${r(s)}/reorder`, { ids: w }).then(() => {
24
+ reorder: (s, g) => t.http.post(`${r(s)}/reorder`, { ids: g }).then(() => {
25
25
  }),
26
26
  theme: () => t.http.get(`${c}/theme`).then(y)
27
27
  };
28
28
  }
29
- const rt = /* @__PURE__ */ Symbol("wx-banner-editor");
30
- function El(t) {
31
- Vt(rt, t);
29
+ const ct = /* @__PURE__ */ Symbol("wx-banner-editor");
30
+ function Ma(t) {
31
+ St(ct, t);
32
32
  }
33
- function Et() {
34
- return zt(rt, null);
33
+ function Mt() {
34
+ return _t(ct, null);
35
35
  }
36
- const Dt = {
36
+ const Ft = {
37
37
  module: {
38
38
  banners: "Banners"
39
39
  },
@@ -228,15 +228,15 @@ const Dt = {
228
228
  "loop-spin": "Spin",
229
229
  "loop-float": "Float"
230
230
  }
231
- }, Ge = /* @__PURE__ */ new WeakSet();
232
- function At() {
231
+ }, Xe = /* @__PURE__ */ new WeakSet();
232
+ function Rt() {
233
233
  try {
234
- const { i18n: t } = ot();
235
- Ge.has(t) || (t.defaults("webx-banners", Dt), Ge.add(t));
234
+ const { i18n: t } = rt();
235
+ Xe.has(t) || (t.defaults("webx-banners", Ft), Xe.add(t));
236
236
  } catch {
237
237
  }
238
238
  }
239
- const ke = {
239
+ const $e = {
240
240
  x: [-50, 150, 5],
241
241
  y: [-50, 150, 5],
242
242
  w: [1, 150, 40],
@@ -246,7 +246,7 @@ const ke = {
246
246
  tracking: [-0.2, 1, 0],
247
247
  rotate: [-180, 180, 0],
248
248
  gap: [0, 10, 1]
249
- }, Mt = ["tl", "t", "tr", "l", "c", "r", "bl", "b", "br"], Ft = {
249
+ }, Kt = ["tl", "t", "tr", "l", "c", "r", "bl", "b", "br"], jt = {
250
250
  tl: [0, 0],
251
251
  t: [-50, 0],
252
252
  tr: [-100, 0],
@@ -256,8 +256,8 @@ const ke = {
256
256
  bl: [0, -100],
257
257
  b: [-50, -100],
258
258
  br: [-100, -100]
259
- }, Xe = ["fade", "rise", "slide-start", "slide-end", "zoom"], Ye = ["spin", "float"], Rt = ["title", "text"];
260
- function ie(t = {}) {
259
+ }, Ye = ["fade", "rise", "slide-start", "slide-end", "zoom"], Qe = ["spin", "float"], Jt = ["title", "text"];
260
+ function re(t = {}) {
261
261
  return {
262
262
  x: 5,
263
263
  y: 5,
@@ -273,7 +273,7 @@ function ie(t = {}) {
273
273
  ...t
274
274
  };
275
275
  }
276
- function Ce(t = {}) {
276
+ function _e(t = {}) {
277
277
  return {
278
278
  font: null,
279
279
  weight: 400,
@@ -288,13 +288,13 @@ function Ce(t = {}) {
288
288
  ...t
289
289
  };
290
290
  }
291
- function Se(t = {}) {
291
+ function Oe(t = {}) {
292
292
  return { in: null, loop: null, delay: 0, duration: 600, ...t };
293
293
  }
294
- function De(t) {
294
+ function Ae(t) {
295
295
  return JSON.parse(JSON.stringify(t));
296
296
  }
297
- function dt(t = []) {
297
+ function mt(t = []) {
298
298
  const c = new Set(t);
299
299
  let r = "";
300
300
  do
@@ -302,21 +302,21 @@ function dt(t = []) {
302
302
  while (c.has(r) || !/^[a-z0-9]{4,12}$/.test(r));
303
303
  return r;
304
304
  }
305
- function Qe(t, c, r) {
306
- const y = { id: dt(c), type: t, style: Ce(), motion: Se() };
305
+ function et(t, c, r) {
306
+ const y = { id: mt(c), type: t, style: _e(), motion: Oe() };
307
307
  switch (t) {
308
308
  case "text":
309
309
  return {
310
310
  ...y,
311
311
  text: { [r]: "Text" },
312
312
  tag: "p",
313
- frames: { desktop: ie({ x: 10, y: 10, size: 2.4 }), mobile: null }
313
+ frames: { desktop: re({ x: 10, y: 10, size: 2.4 }), mobile: null }
314
314
  };
315
315
  case "image":
316
316
  return {
317
317
  ...y,
318
318
  image: null,
319
- frames: { desktop: ie({ x: 60, y: 10, w: 20 }), mobile: null }
319
+ frames: { desktop: re({ x: 60, y: 10, w: 20 }), mobile: null }
320
320
  };
321
321
  case "button":
322
322
  return {
@@ -324,18 +324,18 @@ function Qe(t, c, r) {
324
324
  text: { [r]: "Button" },
325
325
  link: null,
326
326
  variant: null,
327
- frames: { desktop: ie({ x: 10, y: 25, w: 30, size: 1.2 }), mobile: null }
327
+ frames: { desktop: re({ x: 10, y: 25, w: 30, size: 1.2 }), mobile: null }
328
328
  };
329
329
  case "buttons":
330
330
  return {
331
331
  ...y,
332
- frames: { desktop: ie({ x: 6, y: 27, w: 50, size: 1.2 }), mobile: null }
332
+ frames: { desktop: re({ x: 6, y: 27, w: 50, size: 1.2 }), mobile: null }
333
333
  };
334
334
  }
335
335
  }
336
- function Dl(t) {
336
+ function Fa(t) {
337
337
  const c = [], r = (y) => {
338
- const s = { ...y, id: dt(c) };
338
+ const s = { ...y, id: mt(c) };
339
339
  return c.push(s.id), s;
340
340
  };
341
341
  return [
@@ -343,67 +343,67 @@ function Dl(t) {
343
343
  type: "text",
344
344
  text: { [t]: "{title}" },
345
345
  tag: "h2",
346
- style: Ce({ weight: 700, line_height: 1.05, color: "#ffffff", shadow: !0 }),
347
- frames: { desktop: ie({ x: 6, y: 6, w: 45, size: 4.2 }), mobile: null },
348
- motion: Se({ in: "rise" })
346
+ style: _e({ weight: 700, line_height: 1.05, color: "#ffffff", shadow: !0 }),
347
+ frames: { desktop: re({ x: 6, y: 6, w: 45, size: 4.2 }), mobile: null },
348
+ motion: Oe({ in: "rise" })
349
349
  }),
350
350
  r({
351
351
  type: "text",
352
352
  text: { [t]: "{text}" },
353
353
  tag: "p",
354
- style: Ce({ line_height: 1.4, color: "#ffffff", shadow: !0 }),
355
- frames: { desktop: ie({ x: 6, y: 18, w: 40, size: 1.4 }), mobile: null },
356
- motion: Se({ in: "rise", delay: 150 })
354
+ style: _e({ line_height: 1.4, color: "#ffffff", shadow: !0 }),
355
+ frames: { desktop: re({ x: 6, y: 18, w: 40, size: 1.4 }), mobile: null },
356
+ motion: Oe({ in: "rise", delay: 150 })
357
357
  }),
358
358
  r({
359
359
  type: "buttons",
360
- style: Ce(),
361
- frames: { desktop: ie({ x: 6, y: 28, w: 50, size: 1.2 }), mobile: null },
362
- motion: Se({ in: "rise", delay: 300 })
360
+ style: _e(),
361
+ frames: { desktop: re({ x: 6, y: 28, w: 50, size: 1.2 }), mobile: null },
362
+ motion: Oe({ in: "rise", delay: 300 })
363
363
  })
364
364
  ];
365
365
  }
366
- function Kt(t, c, r, y) {
366
+ function Ht(t, c, r, y) {
367
367
  const s = t ?? {};
368
- return ([.../* @__PURE__ */ new Set([c, ...r, ...Object.keys(s)])].map((T) => s[T]).find((T) => (T ?? "").trim() !== "") ?? "").replaceAll("{title}", y.title ?? "").replaceAll("{text}", y.text ?? "").trim();
368
+ return ([.../* @__PURE__ */ new Set([c, ...r, ...Object.keys(s)])].map((L) => s[L]).find((L) => (L ?? "").trim() !== "") ?? "").replaceAll("{title}", y.title ?? "").replaceAll("{text}", y.text ?? "").trim();
369
369
  }
370
- function jt(t) {
371
- return [...t.matchAll(/\{([a-z_.]+)\}/g)].map((c) => c[1] ?? "").filter((c) => !Rt.includes(c));
370
+ function Zt(t) {
371
+ return [...t.matchAll(/\{([a-z_.]+)\}/g)].map((c) => c[1] ?? "").filter((c) => !Jt.includes(c));
372
372
  }
373
- function et(t) {
373
+ function tt(t) {
374
374
  if (typeof t != "string") return null;
375
375
  if (/^#[0-9a-f]{6}([0-9a-f]{2})?$/.test(t)) return t;
376
376
  const c = /^token:([a-z][a-z0-9-]{0,40})$/.exec(t);
377
377
  return c ? `var(--site-color-${c[1]})` : null;
378
378
  }
379
- const ut = (t) => Math.round(t * 100) / 100;
380
- function Jt(t, c) {
379
+ const bt = (t) => Math.round(t * 100) / 100;
380
+ function qt(t, c) {
381
381
  const r = {}, y = t.frames.desktop, s = t.frames.mobile ?? y;
382
- for (const [T, C] of [
382
+ for (const [L, Q] of [
383
383
  ["", y],
384
384
  ["m-", s]
385
385
  ]) {
386
- for (const V of Object.keys(ke))
387
- r[`--${T}${V}`] = String(ut(C[V]));
388
- const [p, k] = Ft[C.origin] ?? [0, 0];
389
- r[`--${T}ox`] = `${p}%`, r[`--${T}oy`] = `${k}%`, r[`--${T}display`] = C.hidden ? "none" : "block";
386
+ for (const k of Object.keys($e))
387
+ r[`--${L}${k}`] = String(bt(Q[k]));
388
+ const [p, B] = jt[Q.origin] ?? [0, 0];
389
+ r[`--${L}ox`] = `${p}%`, r[`--${L}oy`] = `${B}%`, r[`--${L}display`] = Q.hidden ? "none" : "block";
390
390
  }
391
391
  r["--weight"] = String(t.style.weight), r["--leading"] = String(t.style.line_height), r["--opacity"] = String(t.style.opacity), r["--align"] = t.style.align;
392
- const w = et(t.style.color), B = et(t.style.background);
393
- return w && (r["--color"] = w), B && (r["--background"] = B), t.style.font && (r["--font"] = `var(--site-font-${t.style.font})`), r["z-index"] = String(c), r;
392
+ const g = tt(t.style.color), O = tt(t.style.background);
393
+ return g && (r["--color"] = g), O && (r["--background"] = O), t.style.font && (r["--font"] = `var(--site-font-${t.style.font})`), r["z-index"] = String(c), r;
394
394
  }
395
- function Ht(t) {
395
+ function Gt(t) {
396
396
  const c = ["webx-banner__layer", `webx-banner__layer--${t.type}`];
397
397
  return t.style.italic && c.push("is-italic"), t.style.uppercase && c.push("is-uppercase"), t.style.shadow && c.push("is-shadow"), t.style.background && c.push("has-background"), c;
398
398
  }
399
- function tt(t, c) {
399
+ function at(t, c) {
400
400
  if (typeof t == "number") return t > 0 ? t : c;
401
401
  const r = /^\s*(\d+(?:\.\d+)?)\s*(?:\/\s*(\d+(?:\.\d+)?))?\s*$/.exec(t ?? "");
402
402
  if (!r) return c;
403
403
  const y = Number(r[1]) / Number(r[2] ?? 1);
404
404
  return Number.isFinite(y) && y > 0 ? y : c;
405
405
  }
406
- function Zt(t, c) {
406
+ function Xt(t, c) {
407
407
  if (t > c) {
408
408
  const y = c / t * 100;
409
409
  return { left: (100 - y) / 2, top: 0, width: y, height: 100 };
@@ -411,18 +411,18 @@ function Zt(t, c) {
411
411
  const r = t / c * 100;
412
412
  return { left: 0, top: (100 - r) / 2, width: 100, height: r };
413
413
  }
414
- function qt(t) {
414
+ function Yt(t) {
415
415
  const c = { ...t };
416
- for (const r of Object.keys(ke)) {
417
- const [y, s] = ke[r];
418
- c[r] = ut(Math.min(s, Math.max(y, Number(c[r]) || 0)));
416
+ for (const r of Object.keys($e)) {
417
+ const [y, s] = $e[r];
418
+ c[r] = bt(Math.min(s, Math.max(y, Number(c[r]) || 0)));
419
419
  }
420
420
  return c;
421
421
  }
422
- const Gt = { class: "wx-banner-layer-inspector" }, Xt = { class: "wx-banner-layer-inspector__head" }, Yt = { class: "wx-banner-layer-inspector__fields" }, Qt = { class: "wx-banner-layer-inspector__group" }, el = { class: "wx-banner-layer-inspector__title" }, tl = { class: "wx-banner-layer-inspector__grid" }, ll = ["aria-label"], al = ["aria-checked", "aria-label", "disabled", "onClick"], nl = {
422
+ const Qt = { class: "wx-banner-layer-inspector" }, ea = { class: "wx-banner-layer-inspector__head" }, ta = { class: "wx-banner-layer-inspector__fields" }, aa = { class: "wx-banner-layer-inspector__group" }, la = { class: "wx-banner-layer-inspector__title" }, na = { class: "wx-banner-layer-inspector__grid" }, sa = ["aria-label"], oa = ["aria-checked", "aria-label", "disabled", "onClick"], ia = {
423
423
  key: 5,
424
424
  class: "wx-banner-layer-inspector__group"
425
- }, sl = { class: "wx-banner-layer-inspector__grid" }, ol = { class: "wx-banner-layer-inspector__switches" }, il = { class: "wx-banner-layer-inspector__color" }, rl = ["title", "aria-label", "disabled", "onClick"], dl = { class: "wx-banner-layer-inspector__group" }, ul = { class: "wx-banner-layer-inspector__grid" }, cl = /* @__PURE__ */ lt({
425
+ }, ra = { class: "wx-banner-layer-inspector__grid" }, da = { class: "wx-banner-layer-inspector__switches" }, ua = { class: "wx-banner-layer-inspector__color" }, ca = ["title", "aria-label", "disabled", "onClick"], ma = { class: "wx-banner-layer-inspector__group" }, ba = { class: "wx-banner-layer-inspector__grid" }, ya = /* @__PURE__ */ lt({
426
426
  name: "WxBannerLayerInspector",
427
427
  __name: "LayerInspector",
428
428
  props: {
@@ -435,81 +435,81 @@ const Gt = { class: "wx-banner-layer-inspector" }, Xt = { class: "wx-banner-laye
435
435
  },
436
436
  emits: ["update", "frame", "same-as-desktop", "delete"],
437
437
  setup(t, { emit: c }) {
438
- const r = t, y = c, s = it("webx-banners"), w = nt(), B = v(
438
+ const r = t, y = c, s = dt("webx-banners"), g = ut(), O = st(), L = v(
439
439
  () => r.view === "mobile" ? r.layer.frames.mobile ?? r.layer.frames.desktop : r.layer.frames.desktop
440
- ), T = v(() => r.view === "mobile" && r.layer.frames.mobile !== null);
441
- function C(u) {
442
- const a = De(r.layer);
443
- u(a), y("update", a);
440
+ ), Q = v(() => r.view === "mobile" && r.layer.frames.mobile !== null);
441
+ function p(u) {
442
+ const l = Ae(r.layer);
443
+ u(l), y("update", l);
444
444
  }
445
- function p(u, a) {
446
- C((o) => {
447
- o.style[u] = a;
445
+ function B(u, l) {
446
+ p((o) => {
447
+ o.style[u] = l;
448
448
  });
449
449
  }
450
- const k = v(() => r.layer.type === "text" || r.layer.type === "button"), V = v({
450
+ const k = v(() => r.layer.type === "text" || r.layer.type === "button"), C = v({
451
451
  get: () => r.layer.text ?? {},
452
- set: (u) => C((a) => {
453
- a.text = u;
452
+ set: (u) => p((l) => {
453
+ l.text = u;
454
454
  })
455
455
  }), D = v({
456
456
  get: () => r.layer.name ?? "",
457
- set: (u) => C((a) => {
458
- a.name = u;
457
+ set: (u) => p((l) => {
458
+ l.name = u;
459
459
  })
460
- }), N = v(() => jt(V.value[w.active.value] ?? "")), Q = v(() => N.value.map((u) => `{${u}}`).join(", ")), Z = v(() => {
461
- const u = V.value, a = w.active.value;
462
- return (u[a] ?? "").trim() !== "" ? null : [...w.list.value.map((o) => o.code), ...Object.keys(u)].find(
460
+ }), P = v(() => Zt(C.value[O.active.value] ?? "")), ee = v(() => P.value.map((u) => `{${u}}`).join(", ")), Z = v(() => {
461
+ const u = C.value, l = O.active.value;
462
+ return (u[l] ?? "").trim() !== "" ? null : [...O.list.value.map((o) => o.code), ...Object.keys(u)].find(
463
463
  (o) => (u[o] ?? "").trim() !== ""
464
464
  ) ?? null;
465
465
  });
466
- function $e(u) {
467
- const a = w.active.value, o = V.value[a] ?? "";
468
- V.value = { ...V.value, [a]: `${o}${o === "" ? "" : " "}{${u}}` };
466
+ function Ve(u) {
467
+ const l = O.active.value, o = C.value[l] ?? "";
468
+ C.value = { ...C.value, [l]: `${o}${o === "" ? "" : " "}{${u}}` };
469
469
  }
470
470
  const A = v({
471
471
  get: () => r.layer.image ?? null,
472
- set: (u) => C((a) => {
473
- a.image = u;
472
+ set: (u) => p((l) => {
473
+ l.image = u;
474
474
  })
475
475
  }), R = v({
476
476
  get: () => r.layer.link ?? null,
477
- set: (u) => C((a) => {
478
- a.link = u;
477
+ set: (u) => p((l) => {
478
+ l.link = u;
479
479
  })
480
- }), q = (u, a) => v({
480
+ }), q = (u, l) => v({
481
481
  get: () => u(),
482
- set: (o) => a(o)
482
+ set: (o) => l(o)
483
483
  }), G = q(
484
484
  () => r.layer.tag ?? "p",
485
- (u) => C((a) => {
486
- a.tag = u;
485
+ (u) => p((l) => {
486
+ l.tag = u;
487
487
  })
488
- ), re = q(
488
+ ), de = q(
489
489
  () => r.layer.variant ?? r.variants[0]?.value ?? null,
490
- (u) => C((a) => {
491
- a.variant = u;
490
+ (u) => p((l) => {
491
+ l.variant = u;
492
492
  })
493
493
  ), le = q(
494
494
  () => r.layer.style.font ?? "site",
495
- (u) => p("font", u === "heading" || u === "body" ? u : null)
496
- ), ae = q(
495
+ (u) => B("font", u === "heading" || u === "body" ? u : null)
496
+ ), ne = q(
497
497
  () => r.layer.style.weight,
498
- (u) => p("weight", Number(u))
498
+ (u) => B("weight", Number(u))
499
499
  ), M = v({
500
500
  get: () => r.layer.style.align,
501
- set: (u) => p("align", u)
501
+ set: (u) => B("align", u)
502
502
  }), K = q(
503
503
  () => r.layer.motion.in ?? "none",
504
- (u) => C((a) => {
505
- a.motion.in = Xe.includes(u) ? u : null;
504
+ (u) => p((l) => {
505
+ l.motion.in = Ye.includes(u) ? u : null;
506
506
  })
507
507
  ), j = q(
508
508
  () => r.layer.motion.loop ?? "none",
509
- (u) => C((a) => {
510
- a.motion.loop = Ye.includes(u) ? u : null;
509
+ (u) => p((l) => {
510
+ l.motion.loop = Qe.includes(u) ? u : null;
511
511
  })
512
- ), Oe = v(() => {
512
+ ), Be = v(() => {
513
513
  switch (r.layer.type) {
514
514
  case "image":
515
515
  return ["x", "y", "w", "radius", "rotate"];
@@ -518,7 +518,7 @@ const Gt = { class: "wx-banner-layer-inspector" }, Xt = { class: "wx-banner-laye
518
518
  default:
519
519
  return ["x", "y", "w", "size", "pad", "radius", "tracking", "rotate"];
520
520
  }
521
- }), de = {
521
+ }), ue = {
522
522
  x: 0.05,
523
523
  y: 0.05,
524
524
  w: 0.5,
@@ -529,63 +529,76 @@ const Gt = { class: "wx-banner-layer-inspector" }, Xt = { class: "wx-banner-laye
529
529
  rotate: 1,
530
530
  gap: 0.1
531
531
  };
532
- function pe(u, a) {
533
- a === null || Number.isNaN(a) || y("frame", { [u]: a });
532
+ function fe(u, l) {
533
+ l === null || Number.isNaN(l) || y("frame", { [u]: l });
534
534
  }
535
- function Be(u) {
535
+ function Le(u) {
536
536
  y("frame", { origin: u });
537
537
  }
538
- const Le = v(() => [
538
+ const Ne = v(() => [
539
539
  { value: "site", label: s("layers.font-site") },
540
540
  { value: "heading", label: s("layers.font-heading") },
541
541
  { value: "body", label: s("layers.font-body") }
542
- ]), Ne = [100, 200, 300, 400, 500, 600, 700, 800, 900].map((u) => ({
542
+ ]), Pe = [100, 200, 300, 400, 500, 600, 700, 800, 900].map((u) => ({
543
543
  value: u,
544
544
  label: String(u)
545
- })), Ve = v(() => [
545
+ })), ze = v(() => [
546
546
  { value: "start", label: s("layers.align-start") },
547
547
  { value: "center", label: s("layers.align-center") },
548
548
  { value: "end", label: s("layers.align-end") }
549
549
  ]), X = v(() => [
550
550
  { value: "none", label: s("layers.motion-none") },
551
- ...Xe.map((u) => ({ value: u, label: s(`layers.in-${u}`) }))
552
- ]), ue = v(() => [
551
+ ...Ye.map((u) => ({ value: u, label: s(`layers.in-${u}`) }))
552
+ ]), ce = v(() => [
553
553
  { value: "none", label: s("layers.motion-none") },
554
- ...Ye.map((u) => ({ value: u, label: s(`layers.loop-${u}`) }))
554
+ ...Qe.map((u) => ({ value: u, label: s(`layers.loop-${u}`) }))
555
555
  ]);
556
- function Pe(u) {
557
- const a = r.layer.style[u];
558
- return a === null ? null : a.startsWith("token:") ? r.palette.find((o) => `token:${o.key}` === a)?.value ?? null : a;
556
+ function Te(u) {
557
+ const l = r.layer.style[u];
558
+ return l === null ? null : l.startsWith("token:") ? r.palette.find((o) => `token:${o.key}` === l)?.value ?? null : l;
559
559
  }
560
- function fe(u, a) {
561
- const o = typeof a == "string" && /^#[0-9a-f]{6}([0-9a-f]{2})?$/i.test(a) ? a.toLowerCase() : null;
562
- p(u, o);
560
+ function ve(u, l) {
561
+ const o = typeof l == "string" && /^#[0-9a-f]{6}([0-9a-f]{2})?$/i.test(l) ? l.toLowerCase() : null;
562
+ B(u, o);
563
563
  }
564
- return (u, a) => (f(), x("div", Gt, [
565
- g("div", Xt, [
566
- d(e(Ze), {
564
+ return (u, l) => (f(), x("div", Qt, [
565
+ w("div", ea, [
566
+ d(e(qe), {
567
567
  modelValue: D.value,
568
- "onUpdate:modelValue": a[0] || (a[0] = (o) => D.value = o),
568
+ "onUpdate:modelValue": l[0] || (l[0] = (o) => D.value = o),
569
569
  size: "sm",
570
570
  placeholder: e(s)("layers.name"),
571
571
  "aria-label": e(s)("layers.name"),
572
572
  disabled: t.disabled
573
573
  }, null, 8, ["modelValue", "placeholder", "aria-label", "disabled"]),
574
- d(e(E), {
575
- size: "sm",
576
- variant: "outline",
577
- danger: "",
574
+ d(e(ot), {
575
+ title: e(g).confirm,
576
+ "confirm-text": e(g).confirmText,
577
+ "cancel-text": e(g).cancelText,
578
+ "confirm-type": "danger",
579
+ side: "bottom",
580
+ align: "end",
578
581
  disabled: t.disabled,
579
- onClick: a[1] || (a[1] = (o) => y("delete"))
582
+ onConfirm: l[1] || (l[1] = (o) => y("delete"))
580
583
  }, {
581
- icon: m(() => [
582
- d(e(F), { name: "trash" })
583
- ]),
584
- default: m(() => [
585
- O(" " + z(e(s)("layers.delete")), 1)
584
+ trigger: m(() => [
585
+ d(e(E), {
586
+ size: "sm",
587
+ variant: "outline",
588
+ danger: "",
589
+ disabled: t.disabled
590
+ }, {
591
+ icon: m(() => [
592
+ d(e(F), { name: "trash" })
593
+ ]),
594
+ default: m(() => [
595
+ _(" " + V(e(s)("layers.delete")), 1)
596
+ ]),
597
+ _: 1
598
+ }, 8, ["disabled"])
586
599
  ]),
587
600
  _: 1
588
- }, 8, ["disabled"])
601
+ }, 8, ["title", "confirm-text", "cancel-text", "disabled"])
589
602
  ]),
590
603
  k.value ? (f(), x(H, { key: 0 }, [
591
604
  d(e(S), {
@@ -593,32 +606,32 @@ const Gt = { class: "wx-banner-layer-inspector" }, Xt = { class: "wx-banner-laye
593
606
  help: Z.value ? e(s)("layers.falls-back", { code: Z.value.toUpperCase() }) : e(s)("layers.words-help")
594
607
  }, {
595
608
  default: m(() => [
596
- t.layer.type === "text" ? (f(), W(e(Lt), {
609
+ t.layer.type === "text" ? (f(), W(e(Tt), {
597
610
  key: 0,
598
- modelValue: V.value,
599
- "onUpdate:modelValue": a[2] || (a[2] = (o) => V.value = o),
611
+ modelValue: C.value,
612
+ "onUpdate:modelValue": l[2] || (l[2] = (o) => C.value = o),
600
613
  localized: "",
601
614
  rows: 2,
602
615
  disabled: t.disabled
603
- }, null, 8, ["modelValue", "disabled"])) : (f(), W(e(Ze), {
616
+ }, null, 8, ["modelValue", "disabled"])) : (f(), W(e(qe), {
604
617
  key: 1,
605
- modelValue: V.value,
606
- "onUpdate:modelValue": a[3] || (a[3] = (o) => V.value = o),
618
+ modelValue: C.value,
619
+ "onUpdate:modelValue": l[3] || (l[3] = (o) => C.value = o),
607
620
  localized: "",
608
621
  disabled: t.disabled
609
622
  }, null, 8, ["modelValue", "disabled"]))
610
623
  ]),
611
624
  _: 1
612
625
  }, 8, ["label", "help"]),
613
- g("div", Yt, [
626
+ w("div", ta, [
614
627
  d(e(E), {
615
628
  size: "sm",
616
629
  variant: "text",
617
630
  disabled: t.disabled,
618
- onClick: a[4] || (a[4] = (o) => $e("title"))
631
+ onClick: l[4] || (l[4] = (o) => Ve("title"))
619
632
  }, {
620
- default: m(() => [...a[24] || (a[24] = [
621
- O("+ {title}", -1)
633
+ default: m(() => [...l[24] || (l[24] = [
634
+ _("+ {title}", -1)
622
635
  ])]),
623
636
  _: 1
624
637
  }, 8, ["disabled"]),
@@ -626,21 +639,21 @@ const Gt = { class: "wx-banner-layer-inspector" }, Xt = { class: "wx-banner-laye
626
639
  size: "sm",
627
640
  variant: "text",
628
641
  disabled: t.disabled,
629
- onClick: a[5] || (a[5] = (o) => $e("text"))
642
+ onClick: l[5] || (l[5] = (o) => Ve("text"))
630
643
  }, {
631
- default: m(() => [...a[25] || (a[25] = [
632
- O("+ {text}", -1)
644
+ default: m(() => [...l[25] || (l[25] = [
645
+ _("+ {text}", -1)
633
646
  ])]),
634
647
  _: 1
635
648
  }, 8, ["disabled"])
636
649
  ]),
637
- N.value.length > 0 ? (f(), W(e(Y), {
650
+ P.value.length > 0 ? (f(), W(e(Y), {
638
651
  key: 0,
639
652
  size: "sm",
640
653
  tone: "warning"
641
654
  }, {
642
655
  default: m(() => [
643
- O(z(e(s)("layers.unknown-field", { fields: Q.value })), 1)
656
+ _(V(e(s)("layers.unknown-field", { fields: ee.value })), 1)
644
657
  ]),
645
658
  _: 1
646
659
  })) : I("", !0)
@@ -650,9 +663,9 @@ const Gt = { class: "wx-banner-layer-inspector" }, Xt = { class: "wx-banner-laye
650
663
  label: e(s)("layers.tag")
651
664
  }, {
652
665
  default: m(() => [
653
- d(e(ye), {
666
+ d(e(pe), {
654
667
  modelValue: e(G),
655
- "onUpdate:modelValue": a[6] || (a[6] = (o) => me(G) ? G.value = o : null),
668
+ "onUpdate:modelValue": l[6] || (l[6] = (o) => ye(G) ? G.value = o : null),
656
669
  options: t.tags,
657
670
  size: "sm",
658
671
  disabled: t.disabled
@@ -665,9 +678,9 @@ const Gt = { class: "wx-banner-layer-inspector" }, Xt = { class: "wx-banner-laye
665
678
  label: e(s)("layers.image")
666
679
  }, {
667
680
  default: m(() => [
668
- d(e(Wt), {
681
+ d(e(Et), {
669
682
  modelValue: A.value,
670
- "onUpdate:modelValue": a[7] || (a[7] = (o) => A.value = o),
683
+ "onUpdate:modelValue": l[7] || (l[7] = (o) => A.value = o),
671
684
  accept: "image",
672
685
  aspect: null,
673
686
  height: 120,
@@ -681,9 +694,9 @@ const Gt = { class: "wx-banner-layer-inspector" }, Xt = { class: "wx-banner-laye
681
694
  label: e(s)("layers.link")
682
695
  }, {
683
696
  default: m(() => [
684
- d(e(Ut), {
697
+ d(e(It), {
685
698
  modelValue: R.value,
686
- "onUpdate:modelValue": a[8] || (a[8] = (o) => R.value = o),
699
+ "onUpdate:modelValue": l[8] || (l[8] = (o) => R.value = o),
687
700
  "allow-none": !1,
688
701
  disabled: t.disabled
689
702
  }, null, 8, ["modelValue", "disabled"])
@@ -694,9 +707,9 @@ const Gt = { class: "wx-banner-layer-inspector" }, Xt = { class: "wx-banner-laye
694
707
  label: e(s)("layers.variant")
695
708
  }, {
696
709
  default: m(() => [
697
- d(e(ye), {
698
- modelValue: e(re),
699
- "onUpdate:modelValue": a[9] || (a[9] = (o) => me(re) ? re.value = o : null),
710
+ d(e(pe), {
711
+ modelValue: e(de),
712
+ "onUpdate:modelValue": l[9] || (l[9] = (o) => ye(de) ? de.value = o : null),
700
713
  options: t.variants,
701
714
  size: "sm",
702
715
  disabled: t.disabled
@@ -711,30 +724,30 @@ const Gt = { class: "wx-banner-layer-inspector" }, Xt = { class: "wx-banner-laye
711
724
  tone: "muted"
712
725
  }, {
713
726
  default: m(() => [
714
- O(z(e(s)("layers.buttons-help")), 1)
727
+ _(V(e(s)("layers.buttons-help")), 1)
715
728
  ]),
716
729
  _: 1
717
730
  })) : I("", !0),
718
- g("section", Qt, [
719
- g("div", el, [
731
+ w("section", aa, [
732
+ w("div", la, [
720
733
  d(e(Y), {
721
734
  size: "sm",
722
735
  strong: ""
723
736
  }, {
724
737
  default: m(() => [
725
- O(z(t.view === "mobile" ? T.value ? e(s)("layers.geometry-mobile-own") : e(s)("layers.geometry-mobile-same") : e(s)("layers.geometry-desktop")), 1)
738
+ _(V(t.view === "mobile" ? Q.value ? e(s)("layers.geometry-mobile-own") : e(s)("layers.geometry-mobile-same") : e(s)("layers.geometry-desktop")), 1)
726
739
  ]),
727
740
  _: 1
728
741
  }),
729
- T.value ? (f(), W(e(E), {
742
+ Q.value ? (f(), W(e(E), {
730
743
  key: 0,
731
744
  size: "sm",
732
745
  variant: "text",
733
746
  disabled: t.disabled,
734
- onClick: a[10] || (a[10] = (o) => y("same-as-desktop"))
747
+ onClick: l[10] || (l[10] = (o) => y("same-as-desktop"))
735
748
  }, {
736
749
  default: m(() => [
737
- O(z(e(s)("layers.same-as-desktop")), 1)
750
+ _(V(e(s)("layers.same-as-desktop")), 1)
738
751
  ]),
739
752
  _: 1
740
753
  }, 8, ["disabled"])) : I("", !0)
@@ -744,25 +757,25 @@ const Gt = { class: "wx-banner-layer-inspector" }, Xt = { class: "wx-banner-laye
744
757
  tone: "muted"
745
758
  }, {
746
759
  default: m(() => [
747
- O(z(e(s)("layers.unit")), 1)
760
+ _(V(e(s)("layers.unit")), 1)
748
761
  ]),
749
762
  _: 1
750
763
  }),
751
- g("div", tl, [
752
- (f(!0), x(H, null, oe(Oe.value, (o) => (f(), W(e(S), {
764
+ w("div", na, [
765
+ (f(!0), x(H, null, ie(Be.value, (o) => (f(), W(e(S), {
753
766
  key: o,
754
767
  label: e(s)(`layers.${o}`)
755
768
  }, {
756
769
  default: m(() => [
757
- d(e(ge), {
758
- "model-value": B.value[o],
759
- min: e(ke)[o][0],
760
- max: e(ke)[o][1],
761
- step: de[o],
770
+ d(e(xe), {
771
+ "model-value": L.value[o],
772
+ min: e($e)[o][0],
773
+ max: e($e)[o][1],
774
+ step: ue[o],
762
775
  precision: 2,
763
776
  size: "sm",
764
777
  disabled: t.disabled,
765
- "onUpdate:modelValue": (_) => pe(o, _ ?? null)
778
+ "onUpdate:modelValue": (z) => fe(o, z ?? null)
766
779
  }, null, 8, ["model-value", "min", "max", "step", "disabled", "onUpdate:modelValue"])
767
780
  ]),
768
781
  _: 2
@@ -773,54 +786,54 @@ const Gt = { class: "wx-banner-layer-inspector" }, Xt = { class: "wx-banner-laye
773
786
  help: e(s)("layers.origin-help")
774
787
  }, {
775
788
  default: m(() => [
776
- g("div", {
789
+ w("div", {
777
790
  class: "wx-banner-layer-inspector__origins",
778
791
  role: "radiogroup",
779
792
  "aria-label": e(s)("layers.origin")
780
793
  }, [
781
- (f(!0), x(H, null, oe(e(Mt), (o) => (f(), x("button", {
794
+ (f(!0), x(H, null, ie(e(Kt), (o) => (f(), x("button", {
782
795
  key: o,
783
796
  type: "button",
784
797
  role: "radio",
785
- "aria-checked": B.value.origin === o,
798
+ "aria-checked": L.value.origin === o,
786
799
  "aria-label": o,
787
800
  disabled: t.disabled,
788
801
  class: J([
789
802
  "wx-banner-layer-inspector__origin",
790
- { "is-active": B.value.origin === o }
803
+ { "is-active": L.value.origin === o }
791
804
  ]),
792
- onClick: (_) => Be(o)
793
- }, null, 10, al))), 128))
794
- ], 8, ll)
805
+ onClick: (z) => Le(o)
806
+ }, null, 10, oa))), 128))
807
+ ], 8, sa)
795
808
  ]),
796
809
  _: 1
797
810
  }, 8, ["label", "help"]),
798
- d(e(_e), {
799
- "model-value": B.value.hidden,
811
+ d(e(Se), {
812
+ "model-value": L.value.hidden,
800
813
  label: e(s)("layers.hidden-here"),
801
814
  disabled: t.disabled,
802
- "onUpdate:modelValue": a[11] || (a[11] = (o) => y("frame", { hidden: o === !0 }))
815
+ "onUpdate:modelValue": l[11] || (l[11] = (o) => y("frame", { hidden: o === !0 }))
803
816
  }, null, 8, ["model-value", "label", "disabled"])
804
817
  ]),
805
- t.layer.type !== "image" ? (f(), x("section", nl, [
818
+ t.layer.type !== "image" ? (f(), x("section", ia, [
806
819
  d(e(Y), {
807
820
  size: "sm",
808
821
  strong: ""
809
822
  }, {
810
823
  default: m(() => [
811
- O(z(e(s)("layers.look")), 1)
824
+ _(V(e(s)("layers.look")), 1)
812
825
  ]),
813
826
  _: 1
814
827
  }),
815
- g("div", sl, [
828
+ w("div", ra, [
816
829
  d(e(S), {
817
830
  label: e(s)("layers.font")
818
831
  }, {
819
832
  default: m(() => [
820
- d(e(ye), {
833
+ d(e(pe), {
821
834
  modelValue: e(le),
822
- "onUpdate:modelValue": a[12] || (a[12] = (o) => me(le) ? le.value = o : null),
823
- options: Le.value,
835
+ "onUpdate:modelValue": l[12] || (l[12] = (o) => ye(le) ? le.value = o : null),
836
+ options: Ne.value,
824
837
  size: "sm",
825
838
  disabled: t.disabled
826
839
  }, null, 8, ["modelValue", "options", "disabled"])
@@ -831,10 +844,10 @@ const Gt = { class: "wx-banner-layer-inspector" }, Xt = { class: "wx-banner-laye
831
844
  label: e(s)("layers.weight")
832
845
  }, {
833
846
  default: m(() => [
834
- d(e(ye), {
835
- modelValue: e(ae),
836
- "onUpdate:modelValue": a[13] || (a[13] = (o) => me(ae) ? ae.value = o : null),
837
- options: e(Ne),
847
+ d(e(pe), {
848
+ modelValue: e(ne),
849
+ "onUpdate:modelValue": l[13] || (l[13] = (o) => ye(ne) ? ne.value = o : null),
850
+ options: e(Pe),
838
851
  size: "sm",
839
852
  disabled: t.disabled
840
853
  }, null, 8, ["modelValue", "options", "disabled"])
@@ -845,7 +858,7 @@ const Gt = { class: "wx-banner-layer-inspector" }, Xt = { class: "wx-banner-laye
845
858
  label: e(s)("layers.line-height")
846
859
  }, {
847
860
  default: m(() => [
848
- d(e(ge), {
861
+ d(e(xe), {
849
862
  "model-value": t.layer.style.line_height,
850
863
  min: 0.8,
851
864
  max: 3,
@@ -853,7 +866,7 @@ const Gt = { class: "wx-banner-layer-inspector" }, Xt = { class: "wx-banner-laye
853
866
  precision: 2,
854
867
  size: "sm",
855
868
  disabled: t.disabled,
856
- "onUpdate:modelValue": a[14] || (a[14] = (o) => o != null && p("line_height", o))
869
+ "onUpdate:modelValue": l[14] || (l[14] = (o) => o != null && B("line_height", o))
857
870
  }, null, 8, ["model-value", "disabled"])
858
871
  ]),
859
872
  _: 1
@@ -862,7 +875,7 @@ const Gt = { class: "wx-banner-layer-inspector" }, Xt = { class: "wx-banner-laye
862
875
  label: e(s)("layers.opacity")
863
876
  }, {
864
877
  default: m(() => [
865
- d(e(ge), {
878
+ d(e(xe), {
866
879
  "model-value": t.layer.style.opacity,
867
880
  min: 0,
868
881
  max: 1,
@@ -870,7 +883,7 @@ const Gt = { class: "wx-banner-layer-inspector" }, Xt = { class: "wx-banner-laye
870
883
  precision: 2,
871
884
  size: "sm",
872
885
  disabled: t.disabled,
873
- "onUpdate:modelValue": a[15] || (a[15] = (o) => o != null && p("opacity", o))
886
+ "onUpdate:modelValue": l[15] || (l[15] = (o) => o != null && B("opacity", o))
874
887
  }, null, 8, ["model-value", "disabled"])
875
888
  ]),
876
889
  _: 1
@@ -880,85 +893,85 @@ const Gt = { class: "wx-banner-layer-inspector" }, Xt = { class: "wx-banner-laye
880
893
  label: e(s)("layers.align")
881
894
  }, {
882
895
  default: m(() => [
883
- d(e(st), {
896
+ d(e(it), {
884
897
  modelValue: M.value,
885
- "onUpdate:modelValue": a[16] || (a[16] = (o) => M.value = o),
886
- options: Ve.value,
898
+ "onUpdate:modelValue": l[16] || (l[16] = (o) => M.value = o),
899
+ options: ze.value,
887
900
  size: "sm",
888
901
  disabled: t.disabled
889
902
  }, null, 8, ["modelValue", "options", "disabled"])
890
903
  ]),
891
904
  _: 1
892
905
  }, 8, ["label"]),
893
- g("div", ol, [
894
- d(e(_e), {
906
+ w("div", da, [
907
+ d(e(Se), {
895
908
  "model-value": t.layer.style.italic,
896
909
  label: e(s)("layers.italic"),
897
910
  disabled: t.disabled,
898
- "onUpdate:modelValue": a[17] || (a[17] = (o) => p("italic", o === !0))
911
+ "onUpdate:modelValue": l[17] || (l[17] = (o) => B("italic", o === !0))
899
912
  }, null, 8, ["model-value", "label", "disabled"]),
900
- d(e(_e), {
913
+ d(e(Se), {
901
914
  "model-value": t.layer.style.uppercase,
902
915
  label: e(s)("layers.uppercase"),
903
916
  disabled: t.disabled,
904
- "onUpdate:modelValue": a[18] || (a[18] = (o) => p("uppercase", o === !0))
917
+ "onUpdate:modelValue": l[18] || (l[18] = (o) => B("uppercase", o === !0))
905
918
  }, null, 8, ["model-value", "label", "disabled"]),
906
- d(e(_e), {
919
+ d(e(Se), {
907
920
  "model-value": t.layer.style.shadow,
908
921
  label: e(s)("layers.shadow"),
909
922
  disabled: t.disabled,
910
- "onUpdate:modelValue": a[19] || (a[19] = (o) => p("shadow", o === !0))
923
+ "onUpdate:modelValue": l[19] || (l[19] = (o) => B("shadow", o === !0))
911
924
  }, null, 8, ["model-value", "label", "disabled"])
912
925
  ]),
913
- (f(), x(H, null, oe(["color", "background"], (o) => d(e(S), {
926
+ (f(), x(H, null, ie(["color", "background"], (o) => d(e(S), {
914
927
  key: o,
915
928
  label: e(s)(`layers.${o}`)
916
929
  }, {
917
930
  default: m(() => [
918
- g("div", il, [
919
- (f(!0), x(H, null, oe(t.palette, (_) => (f(), x("button", {
920
- key: _.key,
931
+ w("div", ua, [
932
+ (f(!0), x(H, null, ie(t.palette, (z) => (f(), x("button", {
933
+ key: z.key,
921
934
  type: "button",
922
- title: _.key,
923
- "aria-label": _.key,
935
+ title: z.key,
936
+ "aria-label": z.key,
924
937
  disabled: t.disabled,
925
938
  class: J([
926
939
  "wx-banner-layer-inspector__swatch",
927
- { "is-active": t.layer.style[o] === `token:${_.key}` }
940
+ { "is-active": t.layer.style[o] === `token:${z.key}` }
928
941
  ]),
929
- style: xe({ background: _.value }),
930
- onClick: (ne) => p(o, `token:${_.key}`)
931
- }, null, 14, rl))), 128)),
932
- d(e(Nt), {
933
- "model-value": Pe(o),
942
+ style: ke({ background: z.value }),
943
+ onClick: (se) => B(o, `token:${z.key}`)
944
+ }, null, 14, ca))), 128)),
945
+ d(e(Ut), {
946
+ "model-value": Te(o),
934
947
  clearable: "",
935
948
  size: "sm",
936
949
  disabled: t.disabled,
937
- "onUpdate:modelValue": (_) => fe(o, _)
950
+ "onUpdate:modelValue": (z) => ve(o, z)
938
951
  }, null, 8, ["model-value", "disabled", "onUpdate:modelValue"])
939
952
  ])
940
953
  ]),
941
954
  _: 2
942
955
  }, 1032, ["label"])), 64))
943
956
  ])) : I("", !0),
944
- g("section", dl, [
957
+ w("section", ma, [
945
958
  d(e(Y), {
946
959
  size: "sm",
947
960
  strong: ""
948
961
  }, {
949
962
  default: m(() => [
950
- O(z(e(s)("layers.motion")), 1)
963
+ _(V(e(s)("layers.motion")), 1)
951
964
  ]),
952
965
  _: 1
953
966
  }),
954
- g("div", ul, [
967
+ w("div", ba, [
955
968
  d(e(S), {
956
969
  label: e(s)("layers.entrance")
957
970
  }, {
958
971
  default: m(() => [
959
- d(e(ye), {
972
+ d(e(pe), {
960
973
  modelValue: e(K),
961
- "onUpdate:modelValue": a[20] || (a[20] = (o) => me(K) ? K.value = o : null),
974
+ "onUpdate:modelValue": l[20] || (l[20] = (o) => ye(K) ? K.value = o : null),
962
975
  options: X.value,
963
976
  size: "sm",
964
977
  disabled: t.disabled
@@ -970,10 +983,10 @@ const Gt = { class: "wx-banner-layer-inspector" }, Xt = { class: "wx-banner-laye
970
983
  label: e(s)("layers.loop")
971
984
  }, {
972
985
  default: m(() => [
973
- d(e(ye), {
986
+ d(e(pe), {
974
987
  modelValue: e(j),
975
- "onUpdate:modelValue": a[21] || (a[21] = (o) => me(j) ? j.value = o : null),
976
- options: ue.value,
988
+ "onUpdate:modelValue": l[21] || (l[21] = (o) => ye(j) ? j.value = o : null),
989
+ options: ce.value,
977
990
  size: "sm",
978
991
  disabled: t.disabled
979
992
  }, null, 8, ["modelValue", "options", "disabled"])
@@ -984,14 +997,14 @@ const Gt = { class: "wx-banner-layer-inspector" }, Xt = { class: "wx-banner-laye
984
997
  label: e(s)("layers.delay")
985
998
  }, {
986
999
  default: m(() => [
987
- d(e(ge), {
1000
+ d(e(xe), {
988
1001
  "model-value": t.layer.motion.delay,
989
1002
  min: 0,
990
1003
  max: 1e4,
991
1004
  step: 50,
992
1005
  size: "sm",
993
1006
  disabled: t.disabled || t.layer.motion.in === null,
994
- "onUpdate:modelValue": a[22] || (a[22] = (o) => o != null && C((_) => _.motion.delay = o))
1007
+ "onUpdate:modelValue": l[22] || (l[22] = (o) => o != null && p((z) => z.motion.delay = o))
995
1008
  }, null, 8, ["model-value", "disabled"])
996
1009
  ]),
997
1010
  _: 1
@@ -1000,14 +1013,14 @@ const Gt = { class: "wx-banner-layer-inspector" }, Xt = { class: "wx-banner-laye
1000
1013
  label: e(s)("layers.duration")
1001
1014
  }, {
1002
1015
  default: m(() => [
1003
- d(e(ge), {
1016
+ d(e(xe), {
1004
1017
  "model-value": t.layer.motion.duration,
1005
1018
  min: 100,
1006
1019
  max: 5e3,
1007
1020
  step: 50,
1008
1021
  size: "sm",
1009
1022
  disabled: t.disabled || t.layer.motion.in === null,
1010
- "onUpdate:modelValue": a[23] || (a[23] = (o) => o != null && C((_) => _.motion.duration = o))
1023
+ "onUpdate:modelValue": l[23] || (l[23] = (o) => o != null && p((z) => z.motion.duration = o))
1011
1024
  }, null, 8, ["model-value", "disabled"])
1012
1025
  ]),
1013
1026
  _: 1
@@ -1016,27 +1029,27 @@ const Gt = { class: "wx-banner-layer-inspector" }, Xt = { class: "wx-banner-laye
1016
1029
  ])
1017
1030
  ]));
1018
1031
  }
1019
- }), ct = (t, c) => {
1032
+ }), yt = (t, c) => {
1020
1033
  const r = t.__vccOpts || t;
1021
1034
  for (const [y, s] of c)
1022
1035
  r[y] = s;
1023
1036
  return r;
1024
- }, bl = /* @__PURE__ */ ct(cl, [["__scopeId", "data-v-32ff51cd"]]), ml = { class: "wx-banner-layers__bar" }, yl = { class: "wx-banner-layers__tools" }, pl = { class: "wx-banner-layers__body" }, fl = { class: "wx-banner-layers__main" }, vl = ["aria-label"], hl = { class: "webx-banner__picture" }, wl = ["src"], gl = {
1037
+ }, pa = /* @__PURE__ */ yt(ya, [["__scopeId", "data-v-c9a97c91"]]), fa = { class: "wx-banner-layers__bar" }, va = { class: "wx-banner-layers__tools" }, ha = { class: "wx-banner-layers__body" }, wa = { class: "wx-banner-layers__main" }, ga = ["aria-label"], xa = { class: "webx-banner__picture" }, ka = ["src"], $a = {
1025
1038
  key: 1,
1026
1039
  class: "wx-banner-layers__empty"
1027
- }, xl = {
1040
+ }, Va = {
1028
1041
  key: 0,
1029
1042
  class: "webx-banner__inner wx-banner-layers__words"
1030
- }, kl = ["src"], $l = {
1043
+ }, za = ["src"], Ca = {
1031
1044
  key: 2,
1032
1045
  class: "webx-banner__inner webx-banner__buttons"
1033
- }, Vl = {
1046
+ }, Sa = {
1034
1047
  key: 3,
1035
1048
  class: "webx-banner__inner webx-banner__buttons"
1036
- }, zl = {
1049
+ }, _a = {
1037
1050
  key: 0,
1038
1051
  class: "webx-banner__button"
1039
- }, _l = ["onPointerdown"], Cl = ["onPointerdown"], Sl = ["onClick"], Ol = { class: "wx-banner-layers__name" }, Bl = 3, Ll = 6, Nl = /* @__PURE__ */ lt({
1052
+ }, Oa = ["onPointerdown"], Ba = ["onPointerdown"], La = ["onClick"], Na = { class: "wx-banner-layers__name" }, Pa = 3, Ta = 6, Ua = /* @__PURE__ */ lt({
1040
1053
  name: "WxBannerLayers",
1041
1054
  __name: "LayersField",
1042
1055
  props: {
@@ -1045,68 +1058,68 @@ const Gt = { class: "wx-banner-layer-inspector" }, Xt = { class: "wx-banner-laye
1045
1058
  },
1046
1059
  emits: ["update:modelValue"],
1047
1060
  setup(t, { emit: c }) {
1048
- const r = t, y = c, s = ot(), w = Et(), B = nt(), T = Tt(s), C = It(s);
1049
- At();
1050
- const p = it("webx-banners"), k = v(() => r.modelValue ?? []), V = v(() => w?.place.value?.layers ?? null), D = te("desktop"), N = te(null), Q = v(() => k.value.find((l) => l.id === N.value) ?? null), Z = v(() => {
1051
- const l = B.active.value;
1052
- return B.list.value.some((n) => n.code === l) ? l : B.list.value[0]?.code ?? "en";
1053
- }), $e = v(() => B.list.value.map((l) => l.code)), A = te([]), R = te([]);
1061
+ const r = t, y = c, s = rt(), g = Mt(), O = st(), L = Dt(s), Q = At(s);
1062
+ Rt();
1063
+ const p = dt("webx-banners"), B = ut(), k = v(() => r.modelValue ?? []), C = v(() => g?.place.value?.layers ?? null), D = ae("desktop"), P = ae(null), ee = v(() => k.value.find((a) => a.id === P.value) ?? null), Z = v(() => {
1064
+ const a = O.active.value;
1065
+ return O.list.value.some((n) => n.code === a) ? a : O.list.value[0]?.code ?? "en";
1066
+ }), Ve = v(() => O.list.value.map((a) => a.code)), A = ae([]), R = ae([]);
1054
1067
  function q() {
1055
1068
  A.value = [...A.value.slice(-99), JSON.stringify(k.value)], R.value = [];
1056
1069
  }
1057
- function G(l, n = !0) {
1058
- n && q(), y("update:modelValue", l);
1070
+ function G(a, n = !0) {
1071
+ n && q(), y("update:modelValue", a);
1059
1072
  }
1060
- function re() {
1061
- const l = A.value.at(-1);
1062
- l !== void 0 && (R.value = [...R.value, JSON.stringify(k.value)], A.value = A.value.slice(0, -1), y("update:modelValue", JSON.parse(l)));
1073
+ function de() {
1074
+ const a = A.value.at(-1);
1075
+ a !== void 0 && (R.value = [...R.value, JSON.stringify(k.value)], A.value = A.value.slice(0, -1), y("update:modelValue", JSON.parse(a)));
1063
1076
  }
1064
1077
  function le() {
1065
- const l = R.value.at(-1);
1066
- l !== void 0 && (A.value = [...A.value, JSON.stringify(k.value)], R.value = R.value.slice(0, -1), y("update:modelValue", JSON.parse(l)));
1078
+ const a = R.value.at(-1);
1079
+ a !== void 0 && (A.value = [...A.value, JSON.stringify(k.value)], R.value = R.value.slice(0, -1), y("update:modelValue", JSON.parse(a)));
1067
1080
  }
1068
- function ae(l, n, i = !0) {
1081
+ function ne(a, n, i = !0) {
1069
1082
  G(
1070
- k.value.map((b) => b.id === l ? n(De(b)) : b),
1083
+ k.value.map((b) => b.id === a ? n(Ae(b)) : b),
1071
1084
  i
1072
1085
  );
1073
1086
  }
1074
- function M(l, n = D.value) {
1075
- return n === "mobile" ? l.frames.mobile ?? l.frames.desktop : l.frames.desktop;
1087
+ function M(a, n = D.value) {
1088
+ return n === "mobile" ? a.frames.mobile ?? a.frames.desktop : a.frames.desktop;
1076
1089
  }
1077
- function K(l, n, i = !0) {
1078
- ae(
1079
- l,
1090
+ function K(a, n, i = !0) {
1091
+ ne(
1092
+ a,
1080
1093
  (b) => {
1081
- const h = qt({ ...M(b), ...n });
1094
+ const h = Yt({ ...M(b), ...n });
1082
1095
  return D.value === "mobile" ? b.frames.mobile = h : b.frames.desktop = h, b;
1083
1096
  },
1084
1097
  i
1085
1098
  );
1086
1099
  }
1087
1100
  let j = { id: "", at: 0 };
1088
- function Oe(l) {
1089
- const n = Date.now(), i = j.id === l.id && n - j.at < 800;
1090
- j = { id: l.id, at: n }, ae(l.id, () => l, !i);
1101
+ function Be(a) {
1102
+ const n = Date.now(), i = j.id === a.id && n - j.at < 800;
1103
+ j = { id: a.id, at: n }, ne(a.id, () => a, !i);
1091
1104
  }
1092
- function de(l) {
1093
- const n = Qe(
1094
- l,
1105
+ function ue(a) {
1106
+ const n = et(
1107
+ a,
1095
1108
  k.value.map((i) => i.id),
1096
1109
  Z.value
1097
1110
  );
1098
- G([n, ...k.value]), N.value = n.id;
1111
+ G([n, ...k.value]), P.value = n.id;
1099
1112
  }
1100
- function pe(l) {
1101
- G(k.value.filter((n) => n.id !== l)), N.value === l && (N.value = null);
1113
+ function fe(a) {
1114
+ G(k.value.filter((n) => n.id !== a)), P.value === a && (P.value = null);
1102
1115
  }
1103
- function Be(l) {
1104
- const n = k.value.findIndex((P) => P.id === l), i = k.value[n];
1116
+ function Le(a) {
1117
+ const n = k.value.findIndex((T) => T.id === a), i = k.value[n];
1105
1118
  if (!i || i.type === "buttons") return;
1106
- const b = De(i);
1107
- b.id = Qe(
1119
+ const b = Ae(i);
1120
+ b.id = et(
1108
1121
  "text",
1109
- k.value.map((P) => P.id),
1122
+ k.value.map((T) => T.id),
1110
1123
  Z.value
1111
1124
  ).id, b.frames.desktop = {
1112
1125
  ...b.frames.desktop,
@@ -1114,207 +1127,207 @@ const Gt = { class: "wx-banner-layer-inspector" }, Xt = { class: "wx-banner-laye
1114
1127
  y: b.frames.desktop.y + 2
1115
1128
  };
1116
1129
  const h = [...k.value];
1117
- h.splice(n, 0, b), G(h), N.value = b.id;
1130
+ h.splice(n, 0, b), G(h), P.value = b.id;
1118
1131
  }
1119
- function Le(l) {
1120
- K(l.id, { hidden: !M(l).hidden });
1132
+ function Ne(a) {
1133
+ K(a.id, { hidden: !M(a).hidden });
1121
1134
  }
1122
- const Ne = v(() => k.value.some((l) => l.type === "buttons")), Ve = v({
1135
+ const Pe = v(() => k.value.some((a) => a.type === "buttons")), ze = v({
1123
1136
  get: () => k.value,
1124
- set: (l) => G(l)
1125
- }), X = _t({});
1126
- function ue(l) {
1127
- const n = l?.path;
1137
+ set: (a) => G(a)
1138
+ }), X = Ot({});
1139
+ function ce(a) {
1140
+ const n = a?.path;
1128
1141
  return typeof n == "string" && n !== "" ? n : null;
1129
1142
  }
1130
- async function Pe(l) {
1131
- if (!(l === null || l in X)) {
1132
- X[l] = null;
1143
+ async function Te(a) {
1144
+ if (!(a === null || a in X)) {
1145
+ X[a] = null;
1133
1146
  try {
1134
- const n = await T.fileByPath(l);
1135
- X[l] = n ? { url: n.url, ratio: n.width && n.height ? n.width / n.height : null } : null;
1147
+ const n = await L.fileByPath(a);
1148
+ X[a] = n ? { url: n.url, ratio: n.width && n.height ? n.width / n.height : null } : null;
1136
1149
  } catch {
1137
- X[l] = null;
1150
+ X[a] = null;
1138
1151
  }
1139
1152
  }
1140
1153
  }
1141
- const fe = v(() => ue(w?.values.value.image)), u = v(() => ue(w?.values.value.image_mobile));
1142
- Ct(
1143
- () => [fe.value, u.value, ...k.value.map((l) => ue(l.image))],
1144
- (l) => l.forEach((n) => {
1145
- Pe(n);
1154
+ const ve = v(() => ce(g?.values.value.image)), u = v(() => ce(g?.values.value.image_mobile));
1155
+ Bt(
1156
+ () => [ve.value, u.value, ...k.value.map((a) => ce(a.image))],
1157
+ (a) => a.forEach((n) => {
1158
+ Te(n);
1146
1159
  }),
1147
1160
  { immediate: !0 }
1148
1161
  );
1149
- const a = v(
1150
- () => D.value === "mobile" ? tt(V.value?.ratio_mobile, 0.8) : tt(V.value?.ratio, 16 / 6)
1162
+ const l = v(
1163
+ () => D.value === "mobile" ? at(C.value?.ratio_mobile, 0.8) : at(C.value?.ratio, 16 / 6)
1151
1164
  ), o = v(() => {
1152
- const l = u.value === null ? null : X[u.value] ?? null, n = fe.value === null ? null : X[fe.value] ?? null;
1153
- return D.value === "mobile" ? l ?? n : n;
1154
- }), _ = v(() => o.value?.ratio ?? a.value), ne = v(() => Zt(_.value, a.value)), bt = v(() => {
1155
- const l = String(_.value);
1156
- return { "--ratio": l, "--ratio-mobile": l, "--img": l, "--img-m": l };
1157
- }), mt = v(() => {
1158
- const l = (n) => (w?.values.value[n]?.[Z.value] ?? "").trim();
1159
- return { title: l("title"), text: l("text") };
1165
+ const a = u.value === null ? null : X[u.value] ?? null, n = ve.value === null ? null : X[ve.value] ?? null;
1166
+ return D.value === "mobile" ? a ?? n : n;
1167
+ }), z = v(() => o.value?.ratio ?? l.value), se = v(() => Xt(z.value, l.value)), pt = v(() => {
1168
+ const a = String(z.value);
1169
+ return { "--ratio": a, "--ratio-mobile": a, "--img": a, "--img-m": a };
1170
+ }), ft = v(() => {
1171
+ const a = (n) => (g?.values.value[n]?.[Z.value] ?? "").trim();
1172
+ return { title: a("title"), text: a("text") };
1160
1173
  });
1161
- function Ae(l) {
1162
- return Kt(l.text, Z.value, $e.value, mt.value);
1174
+ function Me(a) {
1175
+ return Ht(a.text, Z.value, Ve.value, ft.value);
1163
1176
  }
1164
- const Me = v(
1165
- () => (w?.values.value.buttons ?? []).map((l) => ({
1166
- label: (l.label?.[Z.value] ?? "").trim(),
1167
- variant: l.variant ?? V.value?.variants[0]?.value ?? "primary"
1168
- })).filter((l) => l.label !== "")
1177
+ const Fe = v(
1178
+ () => (g?.values.value.buttons ?? []).map((a) => ({
1179
+ label: (a.label?.[Z.value] ?? "").trim(),
1180
+ variant: a.variant ?? C.value?.variants[0]?.value ?? "primary"
1181
+ })).filter((a) => a.label !== "")
1169
1182
  );
1170
- function yt(l) {
1171
- return l.type === "text" && /^(p|span|h[1-6])$/.test(l.tag ?? "") ? l.tag : "div";
1183
+ function vt(a) {
1184
+ return a.type === "text" && /^(p|span|h[1-6])$/.test(a.tag ?? "") ? a.tag : "div";
1172
1185
  }
1173
- function pt(l) {
1174
- if (l.name) return l.name;
1175
- const n = l.text?.[Z.value] ?? Object.values(l.text ?? {})[0] ?? "";
1176
- return n.trim() === "{title}" ? p("layers.title-layer") : n.trim() === "{text}" ? p("layers.text-layer") : l.type === "buttons" ? p("layers.buttons-layer") : l.type === "image" ? p("layers.image") : n.trim() || p(`layers.${l.type}`);
1186
+ function ht(a) {
1187
+ if (a.name) return a.name;
1188
+ const n = a.text?.[Z.value] ?? Object.values(a.text ?? {})[0] ?? "";
1189
+ return n.trim() === "{title}" ? p("layers.title-layer") : n.trim() === "{text}" ? p("layers.text-layer") : a.type === "buttons" ? p("layers.buttons-layer") : a.type === "image" ? p("layers.image") : n.trim() || p(`layers.${a.type}`);
1177
1190
  }
1178
- const ft = {
1191
+ const wt = {
1179
1192
  text: "file-text",
1180
1193
  image: "image",
1181
1194
  button: "link",
1182
1195
  buttons: "grid"
1183
1196
  };
1184
- function Fe(l) {
1185
- const n = M(l), i = 100 / _.value, b = ne.value, h = b.left, P = b.left + b.width, L = b.top / 100 * i, U = (b.top + b.height) / 100 * i, $ = n.x + Te(n.origin)[0] / 100 * n.w;
1186
- return $ > P || $ + n.w < h || n.y > U || n.y < L - 50;
1197
+ function Re(a) {
1198
+ const n = M(a), i = 100 / z.value, b = se.value, h = b.left, T = b.left + b.width, N = b.top / 100 * i, U = (b.top + b.height) / 100 * i, $ = n.x + Ie(n.origin)[0] / 100 * n.w;
1199
+ return $ > T || $ + n.w < h || n.y > U || n.y < N - 50;
1187
1200
  }
1188
- const Ue = te(null), Re = te(null), ve = te([]);
1189
- function vt(l, n) {
1190
- const i = 100 / _.value, b = ne.value, h = l === "x" ? [0, 50, 100, b.left, b.left + b.width] : [0, i / 2, i, b.top / 100 * i, (b.top + b.height) / 100 * i];
1191
- for (const P of k.value) {
1192
- if (P.id === n) continue;
1193
- const L = M(P);
1194
- l === "x" ? h.push(L.x, L.x + L.w) : h.push(L.y);
1201
+ const Ue = ae(null), Ke = ae(null), he = ae([]);
1202
+ function gt(a, n) {
1203
+ const i = 100 / z.value, b = se.value, h = a === "x" ? [0, 50, 100, b.left, b.left + b.width] : [0, i / 2, i, b.top / 100 * i, (b.top + b.height) / 100 * i];
1204
+ for (const T of k.value) {
1205
+ if (T.id === n) continue;
1206
+ const N = M(T);
1207
+ a === "x" ? h.push(N.x, N.x + N.w) : h.push(N.y);
1195
1208
  }
1196
1209
  return h;
1197
1210
  }
1198
- function Ke(l, n, i, b, h, P) {
1199
- if (P) return n;
1200
- const L = [0, i / 2, i];
1211
+ function je(a, n, i, b, h, T) {
1212
+ if (T) return n;
1213
+ const N = [0, i / 2, i];
1201
1214
  let U = null;
1202
- for (const $ of vt(l, h))
1203
- for (const ee of L) {
1204
- const ce = $ - (n + ee);
1205
- Math.abs(ce) * b <= Ll && (U === null || Math.abs(ce) < Math.abs(U.delta)) && (U = { delta: ce, at: $ });
1215
+ for (const $ of gt(a, h))
1216
+ for (const te of N) {
1217
+ const me = $ - (n + te);
1218
+ Math.abs(me) * b <= Ta && (U === null || Math.abs(me) < Math.abs(U.delta)) && (U = { delta: me, at: $ });
1206
1219
  }
1207
- return U === null ? n : (ve.value = [...ve.value.filter(($) => $.axis !== l), { axis: l, at: U.at }], n + U.delta);
1220
+ return U === null ? n : (he.value = [...he.value.filter(($) => $.axis !== a), { axis: a, at: U.at }], n + U.delta);
1208
1221
  }
1209
- function je(l) {
1210
- N.value = l.id, Re.value?.focus({ preventScroll: !0 });
1222
+ function Je(a) {
1223
+ P.value = a.id, Ke.value?.focus({ preventScroll: !0 });
1211
1224
  }
1212
- function We(l, n, i) {
1213
- if (je(n), r.disabled || l.button !== 0 || !Ue.value) return;
1214
- l.preventDefault();
1215
- const h = Ue.value.getBoundingClientRect().width / 100, L = l.target.closest(".webx-banner__layer")?.getBoundingClientRect(), U = L ? L.height / h : 0, $ = { ...M(n) }, ee = { x: l.clientX, y: l.clientY };
1216
- let ce = !1;
1217
- const He = (be) => {
1218
- const Ie = (be.clientX - ee.x) / h, xt = (be.clientY - ee.y) / h;
1219
- if (!ce) {
1220
- if (Math.hypot(be.clientX - ee.x, be.clientY - ee.y) < Bl) return;
1221
- ce = !0, q();
1225
+ function We(a, n, i) {
1226
+ if (Je(n), r.disabled || a.button !== 0 || !Ue.value) return;
1227
+ a.preventDefault();
1228
+ const h = Ue.value.getBoundingClientRect().width / 100, N = a.target.closest(".webx-banner__layer")?.getBoundingClientRect(), U = N ? N.height / h : 0, $ = { ...M(n) }, te = { x: a.clientX, y: a.clientY };
1229
+ let me = !1;
1230
+ const Ze = (be) => {
1231
+ const Ee = (be.clientX - te.x) / h, Vt = (be.clientY - te.y) / h;
1232
+ if (!me) {
1233
+ if (Math.hypot(be.clientX - te.x, be.clientY - te.y) < Pa) return;
1234
+ me = !0, q();
1222
1235
  }
1223
- if (ve.value = [], i === "move") {
1224
- const se = {
1225
- x: Te($.origin)[0] / 100 * $.w,
1226
- y: Te($.origin)[1] / 100 * U
1227
- }, kt = Ke("x", $.x + Ie + se.x, $.w, h, n.id, be.altKey), $t = Ke("y", $.y + xt + se.y, U, h, n.id, be.altKey);
1228
- K(n.id, { x: kt - se.x, y: $t - se.y }, !1);
1236
+ if (he.value = [], i === "move") {
1237
+ const oe = {
1238
+ x: Ie($.origin)[0] / 100 * $.w,
1239
+ y: Ie($.origin)[1] / 100 * U
1240
+ }, zt = je("x", $.x + Ee + oe.x, $.w, h, n.id, be.altKey), Ct = je("y", $.y + Vt + oe.y, U, h, n.id, be.altKey);
1241
+ K(n.id, { x: zt - oe.x, y: Ct - oe.y }, !1);
1229
1242
  } else if (i === "width")
1230
- K(n.id, { w: Math.max(1, $.w + Ie) }, !1);
1243
+ K(n.id, { w: Math.max(1, $.w + Ee) }, !1);
1231
1244
  else {
1232
- const se = Math.max(0.05, ($.w + Ie) / $.w);
1233
- K(n.id, { w: $.w * se, size: $.size * se }, !1);
1245
+ const oe = Math.max(0.05, ($.w + Ee) / $.w);
1246
+ K(n.id, { w: $.w * oe, size: $.size * oe }, !1);
1234
1247
  }
1235
- }, ze = () => {
1236
- window.removeEventListener("pointermove", He), window.removeEventListener("pointerup", ze), window.removeEventListener("pointercancel", ze), ve.value = [];
1248
+ }, Ce = () => {
1249
+ window.removeEventListener("pointermove", Ze), window.removeEventListener("pointerup", Ce), window.removeEventListener("pointercancel", Ce), he.value = [];
1237
1250
  };
1238
- window.addEventListener("pointermove", He), window.addEventListener("pointerup", ze), window.addEventListener("pointercancel", ze);
1251
+ window.addEventListener("pointermove", Ze), window.addEventListener("pointerup", Ce), window.addEventListener("pointercancel", Ce);
1239
1252
  }
1240
- function Te(l) {
1241
- const n = l.endsWith("r") ? -100 : l === "t" || l === "c" || l === "b" ? -50 : 0, i = l.startsWith("b") ? -100 : l === "l" || l === "c" || l === "r" ? -50 : 0;
1253
+ function Ie(a) {
1254
+ const n = a.endsWith("r") ? -100 : a === "t" || a === "c" || a === "b" ? -50 : 0, i = a.startsWith("b") ? -100 : a === "l" || a === "c" || a === "r" ? -50 : 0;
1242
1255
  return [n, i];
1243
1256
  }
1244
- function ht(l) {
1245
- l.target.closest(".webx-banner__layer") || (N.value = null);
1257
+ function xt(a) {
1258
+ a.target.closest(".webx-banner__layer") || (P.value = null);
1246
1259
  }
1247
- function wt(l) {
1248
- const n = l.ctrlKey || l.metaKey, i = l.key.toLowerCase();
1260
+ function kt(a) {
1261
+ const n = a.ctrlKey || a.metaKey, i = a.key.toLowerCase();
1249
1262
  if (n && i === "z") {
1250
- l.preventDefault(), l.shiftKey ? le() : re();
1263
+ a.preventDefault(), a.shiftKey ? le() : de();
1251
1264
  return;
1252
1265
  }
1253
1266
  if (n && i === "y") {
1254
- l.preventDefault(), le();
1267
+ a.preventDefault(), le();
1255
1268
  return;
1256
1269
  }
1257
- const b = Q.value;
1270
+ const b = ee.value;
1258
1271
  if (!b || r.disabled) return;
1259
1272
  if (n && i === "d") {
1260
- l.preventDefault(), Be(b.id);
1273
+ a.preventDefault(), Le(b.id);
1261
1274
  return;
1262
1275
  }
1263
1276
  if (i === "delete" || i === "backspace") {
1264
- l.preventDefault(), pe(b.id);
1277
+ a.preventDefault(), fe(b.id);
1265
1278
  return;
1266
1279
  }
1267
1280
  if (i === "escape") {
1268
- N.value = null;
1281
+ P.value = null;
1269
1282
  return;
1270
1283
  }
1271
- const h = l.shiftKey ? 0.5 : 0.05, L = {
1284
+ const h = a.shiftKey ? 0.5 : 0.05, N = {
1272
1285
  arrowleft: [-h, 0],
1273
1286
  arrowright: [h, 0],
1274
1287
  arrowup: [0, -h],
1275
1288
  arrowdown: [0, h]
1276
1289
  }[i];
1277
- if (!L) return;
1278
- l.preventDefault();
1279
- const U = M(b), $ = Date.now(), ee = j.id === `arrows:${b.id}` && $ - j.at < 800;
1280
- j = { id: `arrows:${b.id}`, at: $ }, K(b.id, { x: U.x + L[0], y: U.y + L[1] }, !ee);
1290
+ if (!N) return;
1291
+ a.preventDefault();
1292
+ const U = M(b), $ = Date.now(), te = j.id === `arrows:${b.id}` && $ - j.at < 800;
1293
+ j = { id: `arrows:${b.id}`, at: $ }, K(b.id, { x: U.x + N[0], y: U.y + N[1] }, !te);
1281
1294
  }
1282
- const he = te(null);
1283
- let we = null;
1284
- St(async () => {
1295
+ const we = ae(null);
1296
+ let ge = null;
1297
+ Lt(async () => {
1285
1298
  try {
1286
- he.value = await C.theme();
1299
+ we.value = await Q.theme();
1287
1300
  } catch {
1288
- he.value = null;
1301
+ we.value = null;
1289
1302
  }
1290
- const l = `${he.value?.tokens_css ?? ""}
1291
- ${he.value?.fonts_css ?? ""}`.trim();
1292
- l !== "" && !document.getElementById("wx-banners-theme") && (we = document.createElement("style"), we.id = "wx-banners-theme", we.textContent = l, document.head.append(we));
1293
- }), Ot(() => {
1294
- we?.remove();
1303
+ const a = `${we.value?.tokens_css ?? ""}
1304
+ ${we.value?.fonts_css ?? ""}`.trim();
1305
+ a !== "" && !document.getElementById("wx-banners-theme") && (ge = document.createElement("style"), ge.id = "wx-banners-theme", ge.textContent = a, document.head.append(ge));
1306
+ }), Nt(() => {
1307
+ ge?.remove();
1295
1308
  });
1296
- const gt = v(() => [
1309
+ const $t = v(() => [
1297
1310
  { value: "desktop", label: p("layers.desktop"), icon: "monitor" },
1298
1311
  { value: "mobile", label: p("layers.mobile"), icon: "smartphone" }
1299
- ]), Je = v({
1312
+ ]), He = v({
1300
1313
  get: () => D.value,
1301
- set: (l) => {
1302
- D.value = l === "mobile" ? "mobile" : "desktop";
1314
+ set: (a) => {
1315
+ D.value = a === "mobile" ? "mobile" : "desktop";
1303
1316
  }
1304
1317
  });
1305
- return (l, n) => (f(), x("div", {
1318
+ return (a, n) => (f(), x("div", {
1306
1319
  class: J(["wx-banner-layers", { "is-disabled": t.disabled }])
1307
1320
  }, [
1308
- g("div", ml, [
1309
- d(e(st), {
1310
- modelValue: Je.value,
1311
- "onUpdate:modelValue": n[0] || (n[0] = (i) => Je.value = i),
1312
- options: gt.value,
1321
+ w("div", fa, [
1322
+ d(e(it), {
1323
+ modelValue: He.value,
1324
+ "onUpdate:modelValue": n[0] || (n[0] = (i) => He.value = i),
1325
+ options: $t.value,
1313
1326
  size: "sm",
1314
1327
  "aria-label": e(p)("layers.layout")
1315
1328
  }, null, 8, ["modelValue", "options", "aria-label"]),
1316
- g("div", yl, [
1317
- d(e(qe), {
1329
+ w("div", va, [
1330
+ d(e(Ge), {
1318
1331
  content: e(p)("layers.undo")
1319
1332
  }, {
1320
1333
  default: m(() => [
@@ -1323,7 +1336,7 @@ ${he.value?.fonts_css ?? ""}`.trim();
1323
1336
  variant: "text",
1324
1337
  disabled: t.disabled || A.value.length === 0,
1325
1338
  "aria-label": e(p)("layers.undo"),
1326
- onClick: re
1339
+ onClick: de
1327
1340
  }, {
1328
1341
  icon: m(() => [
1329
1342
  d(e(F), { name: "rotate-left" })
@@ -1333,7 +1346,7 @@ ${he.value?.fonts_css ?? ""}`.trim();
1333
1346
  ]),
1334
1347
  _: 1
1335
1348
  }, 8, ["content"]),
1336
- d(e(qe), {
1349
+ d(e(Ge), {
1337
1350
  content: e(p)("layers.redo")
1338
1351
  }, {
1339
1352
  default: m(() => [
@@ -1356,13 +1369,13 @@ ${he.value?.fonts_css ?? ""}`.trim();
1356
1369
  size: "sm",
1357
1370
  variant: "outline",
1358
1371
  disabled: t.disabled,
1359
- onClick: n[1] || (n[1] = (i) => de("text"))
1372
+ onClick: n[1] || (n[1] = (i) => ue("text"))
1360
1373
  }, {
1361
1374
  icon: m(() => [
1362
1375
  d(e(F), { name: "plus" })
1363
1376
  ]),
1364
1377
  default: m(() => [
1365
- O(" " + z(e(p)("layers.text")), 1)
1378
+ _(" " + V(e(p)("layers.text")), 1)
1366
1379
  ]),
1367
1380
  _: 1
1368
1381
  }, 8, ["disabled"]),
@@ -1370,13 +1383,13 @@ ${he.value?.fonts_css ?? ""}`.trim();
1370
1383
  size: "sm",
1371
1384
  variant: "outline",
1372
1385
  disabled: t.disabled,
1373
- onClick: n[2] || (n[2] = (i) => de("image"))
1386
+ onClick: n[2] || (n[2] = (i) => ue("image"))
1374
1387
  }, {
1375
1388
  icon: m(() => [
1376
1389
  d(e(F), { name: "plus" })
1377
1390
  ]),
1378
1391
  default: m(() => [
1379
- O(" " + z(e(p)("layers.image")), 1)
1392
+ _(" " + V(e(p)("layers.image")), 1)
1380
1393
  ]),
1381
1394
  _: 1
1382
1395
  }, 8, ["disabled"]),
@@ -1384,145 +1397,145 @@ ${he.value?.fonts_css ?? ""}`.trim();
1384
1397
  size: "sm",
1385
1398
  variant: "outline",
1386
1399
  disabled: t.disabled,
1387
- onClick: n[3] || (n[3] = (i) => de("button"))
1400
+ onClick: n[3] || (n[3] = (i) => ue("button"))
1388
1401
  }, {
1389
1402
  icon: m(() => [
1390
1403
  d(e(F), { name: "plus" })
1391
1404
  ]),
1392
1405
  default: m(() => [
1393
- O(" " + z(e(p)("layers.button")), 1)
1406
+ _(" " + V(e(p)("layers.button")), 1)
1394
1407
  ]),
1395
1408
  _: 1
1396
1409
  }, 8, ["disabled"]),
1397
- Ne.value ? I("", !0) : (f(), W(e(E), {
1410
+ Pe.value ? I("", !0) : (f(), W(e(E), {
1398
1411
  key: 0,
1399
1412
  size: "sm",
1400
1413
  variant: "outline",
1401
1414
  disabled: t.disabled,
1402
- onClick: n[4] || (n[4] = (i) => de("buttons"))
1415
+ onClick: n[4] || (n[4] = (i) => ue("buttons"))
1403
1416
  }, {
1404
1417
  icon: m(() => [
1405
1418
  d(e(F), { name: "plus" })
1406
1419
  ]),
1407
1420
  default: m(() => [
1408
- O(" " + z(e(p)("layers.buttons-layer")), 1)
1421
+ _(" " + V(e(p)("layers.buttons-layer")), 1)
1409
1422
  ]),
1410
1423
  _: 1
1411
1424
  }, 8, ["disabled"]))
1412
1425
  ])
1413
1426
  ]),
1414
- V.value ? I("", !0) : (f(), W(e(Y), {
1427
+ C.value ? I("", !0) : (f(), W(e(Y), {
1415
1428
  key: 0,
1416
1429
  size: "sm",
1417
1430
  tone: "muted"
1418
1431
  }, {
1419
1432
  default: m(() => [
1420
- O(z(e(p)("layers.not-here")), 1)
1433
+ _(V(e(p)("layers.not-here")), 1)
1421
1434
  ]),
1422
1435
  _: 1
1423
1436
  })),
1424
- g("div", pl, [
1425
- g("div", fl, [
1426
- g("div", {
1437
+ w("div", ha, [
1438
+ w("div", wa, [
1439
+ w("div", {
1427
1440
  ref_key: "canvas",
1428
- ref: Re,
1429
- class: J(["wx-banner-layers__canvas", { "is-overflow": V.value?.overflow }]),
1441
+ ref: Ke,
1442
+ class: J(["wx-banner-layers__canvas", { "is-overflow": C.value?.overflow }]),
1430
1443
  tabindex: "0",
1431
1444
  "aria-label": e(p)("layers.canvas"),
1432
- onPointerdown: ht,
1433
- onKeydown: wt
1445
+ onPointerdown: xt,
1446
+ onKeydown: kt
1434
1447
  }, [
1435
- g("div", {
1448
+ w("div", {
1436
1449
  class: J(["webx-banner wx-banner-layers__frame", { "is-mobile": D.value === "mobile" }]),
1437
- style: xe(bt.value)
1450
+ style: ke(pt.value)
1438
1451
  }, [
1439
- g("div", hl, [
1452
+ w("div", xa, [
1440
1453
  o.value ? (f(), x("img", {
1441
1454
  key: 0,
1442
1455
  class: "webx-banner__image",
1443
1456
  src: o.value.url,
1444
1457
  alt: ""
1445
- }, null, 8, wl)) : (f(), x("div", gl, z(e(p)("layers.no-picture")), 1))
1458
+ }, null, 8, ka)) : (f(), x("div", $a, V(e(p)("layers.no-picture")), 1))
1446
1459
  ]),
1447
- g("div", {
1460
+ w("div", {
1448
1461
  ref_key: "stage",
1449
1462
  ref: Ue,
1450
1463
  class: "webx-banner__stage"
1451
1464
  }, [
1452
- (f(!0), x(H, null, oe(k.value, (i, b) => (f(), W(Bt(yt(i)), {
1465
+ (f(!0), x(H, null, ie(k.value, (i, b) => (f(), W(Pt(vt(i)), {
1453
1466
  key: i.id,
1454
1467
  class: J([
1455
- ...e(Ht)(i),
1456
- { "is-selected": i.id === N.value, "is-outside": Fe(i) }
1468
+ ...e(Gt)(i),
1469
+ { "is-selected": i.id === P.value, "is-outside": Re(i) }
1457
1470
  ]),
1458
- style: xe(e(Jt)(i, k.value.length - b)),
1459
- onPointerdown: Ee((h) => We(h, i, "move"), ["stop"])
1471
+ style: ke(e(qt)(i, k.value.length - b)),
1472
+ onPointerdown: De((h) => We(h, i, "move"), ["stop"])
1460
1473
  }, {
1461
1474
  default: m(() => [
1462
- i.type === "text" ? (f(), x("span", xl, z(Ae(i) || "…"), 1)) : i.type === "image" ? (f(), x("img", {
1475
+ i.type === "text" ? (f(), x("span", Va, V(Me(i) || "…"), 1)) : i.type === "image" ? (f(), x("img", {
1463
1476
  key: 1,
1464
1477
  class: "webx-banner__inner",
1465
- src: X[ue(i.image) ?? ""]?.url ?? "",
1478
+ src: X[ce(i.image) ?? ""]?.url ?? "",
1466
1479
  alt: "",
1467
1480
  draggable: "false"
1468
- }, null, 8, kl)) : i.type === "button" ? (f(), x("span", $l, [
1469
- g("span", {
1481
+ }, null, 8, za)) : i.type === "button" ? (f(), x("span", Ca, [
1482
+ w("span", {
1470
1483
  class: J([
1471
1484
  "webx-banner__button",
1472
- `webx-banner__button--${i.variant ?? V.value?.variants[0]?.value ?? "primary"}`
1485
+ `webx-banner__button--${i.variant ?? C.value?.variants[0]?.value ?? "primary"}`
1473
1486
  ])
1474
- }, z(Ae(i) || "…"), 3)
1475
- ])) : (f(), x("span", Vl, [
1476
- (f(!0), x(H, null, oe(Me.value, (h, P) => (f(), x("span", {
1477
- key: P,
1487
+ }, V(Me(i) || "…"), 3)
1488
+ ])) : (f(), x("span", Sa, [
1489
+ (f(!0), x(H, null, ie(Fe.value, (h, T) => (f(), x("span", {
1490
+ key: T,
1478
1491
  class: J(["webx-banner__button", `webx-banner__button--${h.variant}`])
1479
- }, z(h.label), 3))), 128)),
1480
- Me.value.length === 0 ? (f(), x("span", zl, z(e(p)("layers.buttons-layer")), 1)) : I("", !0)
1492
+ }, V(h.label), 3))), 128)),
1493
+ Fe.value.length === 0 ? (f(), x("span", _a, V(e(p)("layers.buttons-layer")), 1)) : I("", !0)
1481
1494
  ])),
1482
- i.id === N.value && !t.disabled ? (f(), x(H, { key: 4 }, [
1483
- g("span", {
1495
+ i.id === P.value && !t.disabled ? (f(), x(H, { key: 4 }, [
1496
+ w("span", {
1484
1497
  class: "wx-banner-layers__handle wx-banner-layers__handle--width",
1485
- onPointerdown: Ee((h) => We(h, i, "width"), ["stop"])
1486
- }, null, 40, _l),
1487
- g("span", {
1498
+ onPointerdown: De((h) => We(h, i, "width"), ["stop"])
1499
+ }, null, 40, Oa),
1500
+ w("span", {
1488
1501
  class: "wx-banner-layers__handle wx-banner-layers__handle--scale",
1489
- onPointerdown: Ee((h) => We(h, i, "scale"), ["stop"])
1490
- }, null, 40, Cl)
1502
+ onPointerdown: De((h) => We(h, i, "scale"), ["stop"])
1503
+ }, null, 40, Ba)
1491
1504
  ], 64)) : I("", !0)
1492
1505
  ]),
1493
1506
  _: 2
1494
1507
  }, 1064, ["class", "style", "onPointerdown"]))), 128))
1495
1508
  ], 512),
1496
- g("div", {
1509
+ w("div", {
1497
1510
  class: "wx-banner-layers__crop",
1498
- style: xe({
1499
- left: `${ne.value.left}%`,
1500
- top: `${ne.value.top}%`,
1501
- width: `${ne.value.width}%`,
1502
- height: `${ne.value.height}%`
1511
+ style: ke({
1512
+ left: `${se.value.left}%`,
1513
+ top: `${se.value.top}%`,
1514
+ width: `${se.value.width}%`,
1515
+ height: `${se.value.height}%`
1503
1516
  })
1504
1517
  }, null, 4),
1505
- (f(!0), x(H, null, oe(ve.value, (i) => (f(), x("div", {
1518
+ (f(!0), x(H, null, ie(he.value, (i) => (f(), x("div", {
1506
1519
  key: i.axis,
1507
1520
  class: J(["wx-banner-layers__guide", `wx-banner-layers__guide--${i.axis}`]),
1508
- style: xe(
1521
+ style: ke(
1509
1522
  i.axis === "x" ? { left: `${i.at}%` } : { top: `calc(${i.at} * 1cqw)` }
1510
1523
  )
1511
1524
  }, null, 6))), 128))
1512
1525
  ], 6)
1513
- ], 42, vl),
1526
+ ], 42, ga),
1514
1527
  d(e(Y), {
1515
1528
  size: "sm",
1516
1529
  tone: "muted"
1517
1530
  }, {
1518
1531
  default: m(() => [
1519
- O(z(e(p)("layers.hint")), 1)
1532
+ _(V(e(p)("layers.hint")), 1)
1520
1533
  ]),
1521
1534
  _: 1
1522
1535
  }),
1523
- d(e(Pt), {
1524
- modelValue: Ve.value,
1525
- "onUpdate:modelValue": n[5] || (n[5] = (i) => Ve.value = i),
1536
+ d(e(Wt), {
1537
+ modelValue: ze.value,
1538
+ "onUpdate:modelValue": n[5] || (n[5] = (i) => ze.value = i),
1526
1539
  class: "wx-banner-layers__list",
1527
1540
  "item-key": "id",
1528
1541
  size: "sm",
@@ -1531,22 +1544,22 @@ ${he.value?.fonts_css ?? ""}`.trim();
1531
1544
  "aria-label": e(p)("layers.list")
1532
1545
  }, {
1533
1546
  default: m(({ item: i }) => [
1534
- g("button", {
1547
+ w("button", {
1535
1548
  type: "button",
1536
- class: J(["wx-banner-layers__row", { "is-selected": i.id === N.value }]),
1537
- onClick: (b) => je(i)
1549
+ class: J(["wx-banner-layers__row", { "is-selected": i.id === P.value }]),
1550
+ onClick: (b) => Je(i)
1538
1551
  }, [
1539
1552
  d(e(F), {
1540
- name: ft[i.type]
1553
+ name: wt[i.type]
1541
1554
  }, null, 8, ["name"]),
1542
- g("span", Ol, z(pt(i)), 1),
1543
- Fe(i) ? (f(), W(e(F), {
1555
+ w("span", Na, V(ht(i)), 1),
1556
+ Re(i) ? (f(), W(e(F), {
1544
1557
  key: 0,
1545
1558
  name: "warning",
1546
1559
  class: "wx-banner-layers__warn",
1547
1560
  "aria-label": e(p)("layers.outside")
1548
1561
  }, null, 8, ["aria-label"])) : I("", !0)
1549
- ], 10, Sl)
1562
+ ], 10, La)
1550
1563
  ]),
1551
1564
  actions: m(({ item: i }) => [
1552
1565
  d(e(E), {
@@ -1554,7 +1567,7 @@ ${he.value?.fonts_css ?? ""}`.trim();
1554
1567
  variant: "text",
1555
1568
  disabled: t.disabled,
1556
1569
  "aria-label": M(i).hidden ? e(p)("layers.show") : e(p)("layers.hide"),
1557
- onClick: (b) => Le(i)
1570
+ onClick: (b) => Ne(i)
1558
1571
  }, {
1559
1572
  icon: m(() => [
1560
1573
  d(e(F), {
@@ -1563,38 +1576,49 @@ ${he.value?.fonts_css ?? ""}`.trim();
1563
1576
  ]),
1564
1577
  _: 2
1565
1578
  }, 1032, ["disabled", "aria-label", "onClick"]),
1566
- d(e(E), {
1567
- size: "sm",
1568
- variant: "text",
1579
+ d(e(ot), {
1580
+ title: e(B).confirm,
1581
+ "confirm-text": e(B).confirmText,
1582
+ "cancel-text": e(B).cancelText,
1583
+ "confirm-type": "danger",
1569
1584
  disabled: t.disabled,
1570
- "aria-label": e(p)("layers.delete"),
1571
- onClick: (b) => pe(i.id)
1585
+ onConfirm: (b) => fe(i.id)
1572
1586
  }, {
1573
- icon: m(() => [
1574
- d(e(F), { name: "trash" })
1587
+ trigger: m(() => [
1588
+ d(e(E), {
1589
+ size: "sm",
1590
+ variant: "text",
1591
+ disabled: t.disabled,
1592
+ "aria-label": e(p)("layers.delete")
1593
+ }, {
1594
+ icon: m(() => [
1595
+ d(e(F), { name: "trash" })
1596
+ ]),
1597
+ _: 1
1598
+ }, 8, ["disabled", "aria-label"])
1575
1599
  ]),
1576
1600
  _: 1
1577
- }, 8, ["disabled", "aria-label", "onClick"])
1601
+ }, 8, ["title", "confirm-text", "cancel-text", "disabled", "onConfirm"])
1578
1602
  ]),
1579
1603
  _: 1
1580
1604
  }, 8, ["modelValue", "disabled", "empty-text", "aria-label"])
1581
1605
  ]),
1582
- Q.value ? (f(), W(bl, {
1606
+ ee.value ? (f(), W(pa, {
1583
1607
  key: 0,
1584
1608
  class: "wx-banner-layers__inspector",
1585
- layer: Q.value,
1609
+ layer: ee.value,
1586
1610
  view: D.value,
1587
- tags: V.value?.tags ?? [],
1588
- variants: V.value?.variants ?? [],
1589
- palette: he.value?.palette ?? [],
1611
+ tags: C.value?.tags ?? [],
1612
+ variants: C.value?.variants ?? [],
1613
+ palette: we.value?.palette ?? [],
1590
1614
  disabled: t.disabled,
1591
- onUpdate: Oe,
1592
- onFrame: n[6] || (n[6] = (i) => K(Q.value.id, i)),
1593
- onSameAsDesktop: n[7] || (n[7] = (i) => ae(Q.value.id, (b) => ({
1615
+ onUpdate: Be,
1616
+ onFrame: n[6] || (n[6] = (i) => K(ee.value.id, i)),
1617
+ onSameAsDesktop: n[7] || (n[7] = (i) => ne(ee.value.id, (b) => ({
1594
1618
  ...b,
1595
1619
  frames: { ...b.frames, mobile: null }
1596
1620
  }))),
1597
- onDelete: n[8] || (n[8] = (i) => pe(Q.value.id))
1621
+ onDelete: n[8] || (n[8] = (i) => fe(ee.value.id))
1598
1622
  }, null, 8, ["layer", "view", "tags", "variants", "palette", "disabled"])) : (f(), W(e(Y), {
1599
1623
  key: 1,
1600
1624
  class: "wx-banner-layers__inspector",
@@ -1602,15 +1626,15 @@ ${he.value?.fonts_css ?? ""}`.trim();
1602
1626
  tone: "muted"
1603
1627
  }, {
1604
1628
  default: m(() => [
1605
- O(z(e(p)("layers.choose")), 1)
1629
+ _(V(e(p)("layers.choose")), 1)
1606
1630
  ]),
1607
1631
  _: 1
1608
1632
  }))
1609
1633
  ])
1610
1634
  ], 2));
1611
1635
  }
1612
- }), Pl = /* @__PURE__ */ ct(Nl, [["__scopeId", "data-v-540c304c"]]);
1613
- function Al(t = {}) {
1636
+ }), Wa = /* @__PURE__ */ yt(Ua, [["__scopeId", "data-v-90d46ca5"]]);
1637
+ function Ra(t = {}) {
1614
1638
  const c = t.path ?? "/banners";
1615
1639
  return {
1616
1640
  id: "banners",
@@ -1620,20 +1644,20 @@ function Al(t = {}) {
1620
1644
  {
1621
1645
  path: c,
1622
1646
  name: "webx.banners",
1623
- component: () => import("./BannersPage-Dl_BCozz.js"),
1647
+ component: () => import("./BannersPage-D7hpUcBn.js"),
1624
1648
  props: { base: c }
1625
1649
  },
1626
1650
  // A banner not written yet: the place it goes to rides in the query (`?place=hero`).
1627
1651
  {
1628
1652
  path: `${c}/new`,
1629
1653
  name: "webx.banners.new",
1630
- component: () => import("./BannerEditorPage-j7WlEaek.js"),
1654
+ component: () => import("./BannerEditorPage-B8e-IHkN.js"),
1631
1655
  props: { base: c }
1632
1656
  },
1633
1657
  {
1634
1658
  path: `${c}/:id(\\d+)`,
1635
1659
  name: "webx.banners.edit",
1636
- component: () => import("./BannerEditorPage-j7WlEaek.js"),
1660
+ component: () => import("./BannerEditorPage-B8e-IHkN.js"),
1637
1661
  props: { base: c }
1638
1662
  }
1639
1663
  ],
@@ -1642,40 +1666,40 @@ function Al(t = {}) {
1642
1666
  * picture. A field like any other — its value is the list of layers.
1643
1667
  */
1644
1668
  types: {
1645
- "wx-banner-layers": { component: Pl, kind: "field", wide: !0 }
1669
+ "wx-banner-layers": { component: Wa, kind: "field", wide: !0 }
1646
1670
  }
1647
1671
  };
1648
1672
  }
1649
- const Ml = at(() => import("./BannersPage-Dl_BCozz.js")), Fl = at(() => import("./BannerEditorPage-j7WlEaek.js"));
1673
+ const Ka = nt(() => import("./BannersPage-D7hpUcBn.js")), ja = nt(() => import("./BannerEditorPage-B8e-IHkN.js"));
1650
1674
  export {
1651
- Xe as E,
1652
- Rt as F,
1653
- Ye as L,
1654
- Mt as O,
1655
- Fl as W,
1656
- ct as _,
1657
- ke as a,
1658
- Pl as b,
1659
- It as c,
1660
- Dl as d,
1661
- Ml as e,
1662
- Al as f,
1663
- Dt as g,
1664
- qt as h,
1665
- De as i,
1666
- Zt as j,
1667
- et as k,
1668
- ie as l,
1669
- Ht as m,
1670
- dt as n,
1671
- Jt as o,
1672
- El as p,
1673
- Kt as q,
1674
- Se as r,
1675
- Qe as s,
1676
- tt as t,
1677
- At as u,
1678
- Ce as v,
1679
- jt as w
1675
+ Ye as E,
1676
+ Jt as F,
1677
+ Qe as L,
1678
+ Kt as O,
1679
+ ja as W,
1680
+ yt as _,
1681
+ $e as a,
1682
+ Wa as b,
1683
+ At as c,
1684
+ Fa as d,
1685
+ Ka as e,
1686
+ Ra as f,
1687
+ Ft as g,
1688
+ Yt as h,
1689
+ Ae as i,
1690
+ Xt as j,
1691
+ tt as k,
1692
+ re as l,
1693
+ Gt as m,
1694
+ mt as n,
1695
+ qt as o,
1696
+ Ma as p,
1697
+ Ht as q,
1698
+ Oe as r,
1699
+ et as s,
1700
+ at as t,
1701
+ Rt as u,
1702
+ _e as v,
1703
+ Zt as w
1680
1704
  };
1681
- //# sourceMappingURL=index-3RALKrkh.js.map
1705
+ //# sourceMappingURL=index-QnpLuOX2.js.map