@wpic/ui 0.9.39 → 0.9.41

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/wpic-ui.js CHANGED
@@ -1,8 +1,8 @@
1
- import { defineComponent as X, openBlock as e, createBlock as Z, resolveDynamicComponent as S1, normalizeClass as g, withCtx as o1, createElementVNode as i, createCommentVNode as u, renderSlot as N, createElementBlock as t, createVNode as $, unref as m, Fragment as I, renderList as l1, toDisplayString as v, useModel as i2, useSlots as X2, computed as M, ref as T, watch as C1, onBeforeUnmount as U1, mergeProps as G1, createTextVNode as v1, withDirectives as j1, normalizeStyle as h1, vModelDynamic as k0, mergeModels as l2, vModelCheckbox as t3, withModifiers as b1, onMounted as E2, withKeys as w2, inject as f2, provide as D1, nextTick as H1, Teleport as Z1, isRef as i3, vShow as l3, Transition as c2, getCurrentInstance as G2, vModelText as p2, useAttrs as a3, TransitionGroup as o3, useCssVars as s3, vModelSelect as r3, onUnmounted as p3, createSlots as d3, createStaticVNode as A1 } from "vue";
2
- import { Loader2 as R1, Calendar as x0, DollarSign as w3, X as $1, Check as _1, Search as W2, ChevronUp as y0, ChevronDown as N1, ChevronsUpDown as _2, ChevronRight as E1, ChevronLeft as x2, Download as u3, Minimize as h3, Expand as m3, CalendarDays as D2, FolderSymlink as v3, Minimize2 as f3, Maximize2 as b3, Plus as $2, Trash2 as g3, Folder as v0, MoreHorizontal as z3, Bot as M0, Paperclip as B2, ThumbsUp as C3, ThumbsDown as k3, Copy as x3, Pencil as y3, MessageSquarePlus as M3, Square as L3, ArrowUp as L0, CircleAlert as V3, CircleCheck as $3, ShieldAlert as B3, Lightbulb as S3, PanelLeftOpen as A3, PanelLeftClose as F3, AlertTriangle as H3, Tag as T2, Clock as P3, RefreshCw as T3, MoveDownRight as j3 } from "lucide-vue-next";
1
+ import { defineComponent as X, openBlock as e, createBlock as Z, resolveDynamicComponent as S1, normalizeClass as g, withCtx as o1, createElementVNode as i, createCommentVNode as u, renderSlot as N, createElementBlock as t, createVNode as $, unref as m, Fragment as I, renderList as l1, toDisplayString as v, useModel as i2, useSlots as X2, computed as M, ref as T, watch as x1, onBeforeUnmount as O1, mergeProps as G1, createTextVNode as f1, withDirectives as j1, normalizeStyle as m1, vModelDynamic as x0, mergeModels as l2, vModelCheckbox as t3, withModifiers as b1, onMounted as E2, withKeys as w2, inject as f2, provide as I1, nextTick as H1, Teleport as N1, isRef as i3, vShow as l3, Transition as c2, getCurrentInstance as G2, vModelText as p2, useAttrs as a3, TransitionGroup as o3, useCssVars as s3, vModelSelect as r3, onUnmounted as p3, createSlots as d3, createStaticVNode as A1 } from "vue";
2
+ import { Loader2 as Z1, Calendar as y0, DollarSign as w3, X as $1, Check as _1, Search as W2, ChevronUp as M0, ChevronDown as K1, ChevronsUpDown as _2, ChevronRight as E1, ChevronLeft as x2, Download as u3, Minimize as h3, Expand as m3, CalendarDays as D2, FolderSymlink as v3, Minimize2 as f3, Maximize2 as b3, Plus as $2, Trash2 as g3, Folder as f0, MoreHorizontal as z3, Bot as L0, Paperclip as B2, ThumbsUp as C3, ThumbsDown as k3, Copy as x3, Pencil as y3, MessageSquarePlus as M3, Square as L3, ArrowUp as V0, CircleAlert as V3, CircleCheck as $3, ShieldAlert as B3, Lightbulb as S3, PanelLeftOpen as A3, PanelLeftClose as F3, AlertTriangle as H3, Tag as T2, Clock as P3, RefreshCw as T3, MoveDownRight as j3 } from "lucide-vue-next";
3
3
  import { offset as b2, autoPlacement as E3, flip as g2, shift as z2, size as n0, useFloating as C2, autoUpdate as k2, arrow as W3 } from "@floating-ui/vue";
4
4
  import { defineStore as D3 } from "pinia";
5
- import { useEditor as V0, EditorContent as $0 } from "@tiptap/vue-3";
5
+ import { useEditor as $0, EditorContent as B0 } from "@tiptap/vue-3";
6
6
  import I3 from "@tiptap/extension-document";
7
7
  import R3 from "@tiptap/extension-paragraph";
8
8
  import Z3 from "@tiptap/extension-text";
@@ -70,7 +70,7 @@ const O3 = {
70
70
  N(r.$slots, "default")
71
71
  ], 2),
72
72
  n.loading ? (e(), t("span", O3, [
73
- $(m(R1), {
73
+ $(m(Z1), {
74
74
  size: (c.size ?? "md") === "xs" ? 10 : (c.size ?? "md") === "sm" ? 13 : (c.size ?? "md") === "lg" ? 17 : 15,
75
75
  class: "wpic:animate-spin"
76
76
  }, null, 8, ["size"])
@@ -110,7 +110,7 @@ const O3 = {
110
110
  key: 0,
111
111
  class: "wpic:ml-0.5",
112
112
  style: { color: "#EF4444" }
113
- }, B0 = /* @__PURE__ */ X({
113
+ }, S0 = /* @__PURE__ */ X({
114
114
  __name: "WFormLabel",
115
115
  props: {
116
116
  required: { type: Boolean }
@@ -124,7 +124,7 @@ const O3 = {
124
124
  }), _3 = { class: "wpic:relative wpic:flex wpic:items-center wpic:w-full" }, n5 = ["data-size", "data-variant", "type", "placeholder", "disabled", "required"], e5 = {
125
125
  key: 2,
126
126
  class: "wpic:pointer-events-none wpic:absolute wpic:right-2.5 wpic:text-zinc-400 wpic:dark:text-zinc-500"
127
- }, S0 = /* @__PURE__ */ X({
127
+ }, A0 = /* @__PURE__ */ X({
128
128
  inheritAttrs: !1,
129
129
  __name: "WInput",
130
130
  props: /* @__PURE__ */ l2({
@@ -148,23 +148,23 @@ const O3 = {
148
148
  setup(n) {
149
149
  const d = i2(n, "modelValue"), c = n, o = X2(), r = M(() => c.prepend !== void 0 || !!o.prepend), l = M(() => c.append !== void 0 || !!o.append), a = M(() => {
150
150
  if (c.icon) return c.icon;
151
- if (c.type === "date") return x0;
151
+ if (c.type === "date") return y0;
152
152
  if (c.type === "money") return w3;
153
153
  }), f = M(() => ({ sm: 12, md: 13, lg: 14, xl: 16 })[c.size ?? "md"]), b = M(() => c.type === "money" ? "number" : c.type ?? "text"), V = T(), s = T(), F = T(0);
154
154
  let L;
155
- C1(s, (H) => {
156
- L?.disconnect(), F.value = H?.getBoundingClientRect().width ?? 0, H && (L = new ResizeObserver(() => {
157
- F.value = H.getBoundingClientRect().width;
158
- }), L.observe(H));
159
- }, { flush: "post" }), U1(() => L?.disconnect());
155
+ x1(s, (P) => {
156
+ L?.disconnect(), F.value = P?.getBoundingClientRect().width ?? 0, P && (L = new ResizeObserver(() => {
157
+ F.value = P.getBoundingClientRect().width;
158
+ }), L.observe(P));
159
+ }, { flush: "post" }), O1(() => L?.disconnect());
160
160
  function B() {
161
161
  c.type === "date" && V.value?.showPicker();
162
162
  }
163
163
  if (typeof document < "u") {
164
- const H = "winput-date-no-picker";
165
- if (!document.getElementById(H)) {
164
+ const P = "winput-date-no-picker";
165
+ if (!document.getElementById(P)) {
166
166
  const k = document.createElement("style");
167
- k.id = H, k.textContent = 'input[type="date"]::-webkit-calendar-picker-indicator { display: none; }', document.head.appendChild(k);
167
+ k.id = P, k.textContent = 'input[type="date"]::-webkit-calendar-picker-indicator { display: none; }', document.head.appendChild(k);
168
168
  }
169
169
  const x = "winput-number-no-spinner";
170
170
  if (!document.getElementById(x)) {
@@ -172,13 +172,13 @@ const O3 = {
172
172
  k.id = x, k.textContent = "input.winput-number::-webkit-outer-spin-button, input.winput-number::-webkit-inner-spin-button { display: none; } input.winput-number { -moz-appearance: textfield; }", document.head.appendChild(k);
173
173
  }
174
174
  }
175
- return (H, x) => (e(), t("div", G1(H.$attrs, { class: "wpic:w-full" }), [
176
- c.label ? (e(), Z(B0, {
175
+ return (P, x) => (e(), t("div", G1(P.$attrs, { class: "wpic:w-full" }), [
176
+ c.label ? (e(), Z(S0, {
177
177
  key: 0,
178
178
  required: c.required
179
179
  }, {
180
180
  default: o1(() => [
181
- v1(v(c.label), 1)
181
+ f1(v(c.label), 1)
182
182
  ]),
183
183
  _: 1
184
184
  }, 8, ["required"])) : u("", !0),
@@ -194,8 +194,8 @@ const O3 = {
194
194
  ref: s,
195
195
  class: "wpic:pointer-events-none wpic:absolute wpic:left-2.5 wpic:text-zinc-400 wpic:dark:text-zinc-500"
196
196
  }, [
197
- N(H.$slots, "prepend", {}, () => [
198
- v1(v(c.prepend), 1)
197
+ N(P.$slots, "prepend", {}, () => [
198
+ f1(v(c.prepend), 1)
199
199
  ])
200
200
  ], 512)) : u("", !0),
201
201
  j1(i("input", {
@@ -210,7 +210,7 @@ const O3 = {
210
210
  l.value && (c.clearable && d.value || c.loading) ? "wpic:pr-14" : l.value ? "wpic:pr-9" : c.clearable && d.value || c.loading ? c.size === "xl" ? "wpic:pr-10" : "wpic:pr-7" : c.size === "xl" ? "wpic:pr-4" : "wpic:pr-2.5",
211
211
  c.variant === "plain" ? "wpic:bg-transparent wpic:border-0 wpic:text-zinc-900 wpic:dark:text-zinc-100 wpic:placeholder:text-zinc-400 wpic:focus-visible:ring-1 wpic:focus-visible:ring-current wpic:disabled:opacity-60 wpic:disabled:cursor-not-allowed" : c.disabled ? (c.variant ?? "default") === "subtle" ? "wpic:bg-zinc-100 wpic:dark:bg-zinc-800 wpic:border wpic:border-zinc-100 wpic:dark:border-zinc-800 wpic:text-zinc-400 wpic:dark:text-zinc-500 wpic:cursor-not-allowed wpic:opacity-60" : "wpic:bg-zinc-50 wpic:dark:bg-zinc-800 wpic:border wpic:border-zinc-200 wpic:dark:border-zinc-800 wpic:text-zinc-400 wpic:dark:text-zinc-500 wpic:cursor-not-allowed wpic:opacity-60" : (c.variant ?? "default") === "subtle" ? "wpic:bg-zinc-100 wpic:dark:bg-zinc-800 wpic:border wpic:border-zinc-100 wpic:dark:border-zinc-800 wpic:text-zinc-900 wpic:dark:text-zinc-100 wpic:placeholder:text-zinc-400 wpic:dark:placeholder:text-zinc-500 wpic:cursor-text wpic:hover:bg-zinc-200/70 wpic:dark:hover:bg-zinc-700" : "wpic:bg-white wpic:dark:bg-zinc-900 wpic:border wpic:border-zinc-200 wpic:dark:border-zinc-800 wpic:text-zinc-900 wpic:dark:text-zinc-100 wpic:placeholder:text-zinc-400 wpic:dark:placeholder:text-zinc-500 wpic-input-field wpic:cursor-text"
212
212
  ]]),
213
- style: h1(r.value && !a.value ? { paddingLeft: `calc(${F.value}px + 1.25rem)` } : void 0),
213
+ style: m1(r.value && !a.value ? { paddingLeft: `calc(${F.value}px + 1.25rem)` } : void 0),
214
214
  "data-size": c.size ?? "md",
215
215
  "data-variant": c.variant ?? "default",
216
216
  "onUpdate:modelValue": x[0] || (x[0] = (k) => d.value = k),
@@ -219,14 +219,14 @@ const O3 = {
219
219
  disabled: c.disabled,
220
220
  required: c.required
221
221
  }, null, 14, n5), [
222
- [k0, d.value]
222
+ [x0, d.value]
223
223
  ]),
224
224
  l.value ? (e(), t("span", e5, [
225
- N(H.$slots, "append", {}, () => [
226
- v1(v(c.append), 1)
225
+ N(P.$slots, "append", {}, () => [
226
+ f1(v(c.append), 1)
227
227
  ])
228
228
  ])) : u("", !0),
229
- c.loading ? (e(), Z(m(R1), {
229
+ c.loading ? (e(), Z(m(Z1), {
230
230
  key: 3,
231
231
  size: c.size === "xl" ? 14 : 11,
232
232
  class: g(["wpic:absolute wpic:animate-spin wpic:text-zinc-400 wpic:dark:text-zinc-500", l.value ? "wpic:right-8" : c.size === "xl" ? "wpic:right-4" : "wpic:right-2"])
@@ -243,7 +243,7 @@ const O3 = {
243
243
  ])
244
244
  ], 16));
245
245
  }
246
- }), c5 = ["disabled"], f0 = /* @__PURE__ */ X({
246
+ }), c5 = ["disabled"], b0 = /* @__PURE__ */ X({
247
247
  __name: "WCheckbox",
248
248
  props: /* @__PURE__ */ l2({
249
249
  disabled: { type: Boolean }
@@ -326,14 +326,17 @@ const O3 = {
326
326
  class: "wpic-table__summary wpic-table__divider wpic:border-b wpic:border-zinc-200 wpic:font-medium wpic:dark:border-zinc-700"
327
327
  }, h5 = { key: 0 }, m5 = { key: 1 }, v5 = ["onClick"], f5 = ["onClick"], b5 = {
328
328
  key: 0,
329
- class: "wpic-table__divider wpic:border-b wpic:border-zinc-100 wpic:dark:border-zinc-800"
330
- }, g5 = ["colspan"], z5 = { key: 2 }, C5 = ["colspan"], k5 = { class: "wpic:flex wpic:flex-col wpic:items-center wpic:gap-2" }, x5 = { class: "wpic:tabular-nums wpic:text-zinc-400 wpic:dark:text-zinc-500" }, y5 = {
329
+ class: "wpic-table__divider wpic:border-b wpic:last:border-b-0 wpic:border-zinc-100 wpic:dark:border-zinc-800"
330
+ }, g5 = ["colspan"], z5 = { key: 2 }, C5 = ["colspan"], k5 = { class: "wpic:flex wpic:flex-col wpic:items-center wpic:gap-2" }, x5 = {
331
+ key: 0,
332
+ class: "wpic-table__footer wpic:flex wpic:flex-wrap wpic:min-h-14 wpic:items-center wpic:justify-between wpic:gap-3 wpic-table__divider wpic:border-t wpic:border-zinc-100 wpic:dark:border-zinc-800 wpic-table__pad-x wpic:py-3"
333
+ }, y5 = { class: "wpic:tabular-nums wpic:text-zinc-400 wpic:dark:text-zinc-500" }, M5 = {
331
334
  key: 0,
332
- class: "wpic-table__pagination wpic:flex wpic:items-center wpic:gap-0.5"
333
- }, M5 = ["aria-label", "disabled"], L5 = {
335
+ class: "wpic-table__pagination wpic:flex wpic:items-center wpic:gap-1"
336
+ }, L5 = ["aria-label", "disabled"], V5 = {
334
337
  key: 0,
335
338
  class: "wpic:w-6 wpic:text-center wpic:text-base wpic:select-none wpic:text-zinc-400 wpic:dark:text-zinc-500"
336
- }, V5 = ["onClick"], $5 = ["aria-label", "disabled"], tl = /* @__PURE__ */ X({
339
+ }, $5 = ["aria-current", "onClick"], B5 = ["aria-label", "disabled"], tl = /* @__PURE__ */ X({
337
340
  __name: "WTable",
338
341
  props: {
339
342
  data: {},
@@ -371,20 +374,20 @@ const O3 = {
371
374
  }
372
375
  const f = X2(), b = M(() => o.pageSize ?? 25), V = T({ field: null, direction: "asc" }), s = M(() => (o.serverSort ?? V.value).field), F = M(() => (o.serverSort ?? V.value).direction);
373
376
  function L(J) {
374
- const K = s.value === J && F.value === "asc" ? "desc" : "asc", A = { field: J, direction: K };
375
- o.serverSort ? r("update:serverSort", A) : V.value = A;
377
+ const K = s.value === J && F.value === "asc" ? "desc" : "asc", S = { field: J, direction: K };
378
+ o.serverSort ? r("update:serverSort", S) : V.value = S;
376
379
  }
377
- const B = T(""), H = M(() => o.columns.some((J) => J.searchable)), x = M(() => {
380
+ const B = T(""), P = M(() => o.columns.some((J) => J.searchable)), x = M(() => {
378
381
  let J = o.data ?? [];
379
382
  const K = B.value.trim().toLowerCase();
380
383
  if (K) {
381
- const A = o.columns.filter((_) => _.searchable).map((_) => _.field);
382
- J = J.filter((_) => A.some((m1) => String(_[m1] ?? "").toLowerCase().includes(K)));
384
+ const S = o.columns.filter((_) => _.searchable).map((_) => _.field);
385
+ J = J.filter((_) => S.some((v1) => String(_[v1] ?? "").toLowerCase().includes(K)));
383
386
  }
384
387
  if (s.value && !o.serverSort) {
385
- const A = s.value;
386
- J = [...J].sort((_, m1) => {
387
- const g1 = _[A] ?? "", B1 = m1[A] ?? "", C = typeof g1 == "number" && typeof B1 == "number" ? g1 - B1 : String(g1).toLowerCase().localeCompare(String(B1).toLowerCase());
388
+ const S = s.value;
389
+ J = [...J].sort((_, v1) => {
390
+ const g1 = _[S] ?? "", B1 = v1[S] ?? "", C = typeof g1 == "number" && typeof B1 == "number" ? g1 - B1 : String(g1).toLowerCase().localeCompare(String(B1).toLowerCase());
388
391
  return F.value === "asc" ? C : -C;
389
392
  });
390
393
  }
@@ -395,7 +398,7 @@ const O3 = {
395
398
  O.value ? r("update:serverPage", J) : k.value = J;
396
399
  }
397
400
  }), s1 = M(() => O.value ? o.serverTotal ?? 0 : x.value.length), r1 = M(() => Math.max(1, Math.ceil(s1.value / b.value)));
398
- C1([B, () => o.data], () => {
401
+ x1([B, () => o.data], () => {
399
402
  O.value || (c1.value = 1), l.value.clear();
400
403
  });
401
404
  const n1 = M(() => {
@@ -404,31 +407,31 @@ const O3 = {
404
407
  return x.value.slice(J, J + b.value);
405
408
  });
406
409
  function U(J, K) {
407
- const A = J[o.rowKey];
408
- return typeof A == "string" || typeof A == "number" ? A : `${c1.value}:${K}`;
410
+ const S = J[o.rowKey];
411
+ return typeof S == "string" || typeof S == "number" ? S : `${c1.value}:${K}`;
409
412
  }
410
413
  const E = M(() => new Set(o.selectedKeys ?? [])), Y = M(() => n1.value.map(U)), z = M(
411
414
  () => o.selectable && Y.value.length > 0 && Y.value.every((J) => E.value.has(J))
412
415
  );
413
- function G(J, K, A) {
414
- const _ = U(J, K), m1 = new Set(o.selectedKeys ?? []), g1 = A === !0;
415
- g1 ? m1.add(_) : m1.delete(_), r("update:selectedKeys", [...m1]), r("row-select", J, g1);
416
+ function G(J, K, S) {
417
+ const _ = U(J, K), v1 = new Set(o.selectedKeys ?? []), g1 = S === !0;
418
+ g1 ? v1.add(_) : v1.delete(_), r("update:selectedKeys", [...v1]), r("row-select", J, g1);
416
419
  }
417
420
  function p1(J) {
418
- const K = new Set(o.selectedKeys ?? []), A = J === !0;
421
+ const K = new Set(o.selectedKeys ?? []), S = J === !0;
419
422
  for (const _ of Y.value)
420
- A ? K.add(_) : K.delete(_);
423
+ S ? K.add(_) : K.delete(_);
421
424
  r("update:selectedKeys", [...K]);
422
425
  }
423
- const k1 = M(() => s1.value === 0 ? 0 : (c1.value - 1) * b.value + 1), j = M(() => Math.min(c1.value * b.value, s1.value)), e1 = M(() => {
426
+ const y1 = M(() => s1.value === 0 ? 0 : (c1.value - 1) * b.value + 1), j = M(() => Math.min(c1.value * b.value, s1.value)), e1 = M(() => {
424
427
  const J = r1.value;
425
428
  if (J <= 7) return Array.from({ length: J }, (g1, B1) => B1 + 1);
426
- const K = c1.value, A = [], _ = new Set([1, J, K - 1, K, K + 1].filter((g1) => g1 >= 1 && g1 <= J));
427
- let m1 = 0;
429
+ const K = c1.value, S = [], _ = new Set([1, J, K - 1, K, K + 1].filter((g1) => g1 >= 1 && g1 <= J));
430
+ let v1 = 0;
428
431
  for (const g1 of [..._].sort((B1, C) => B1 - C))
429
- g1 - m1 > 1 && A.push("…"), A.push(g1), m1 = g1;
430
- return A;
431
- }), q = M(() => o.padding ? `wpic-table--padding-${o.padding}` : o.compact ? "wpic-table--padding-sm" : "wpic-table--padding-inherit"), x1 = (J) => J === "right" ? "wpic:text-right" : J === "center" ? "wpic:text-center" : "wpic:text-left", z1 = (J, K) => [
432
+ g1 - v1 > 1 && S.push("…"), S.push(g1), v1 = g1;
433
+ return S;
434
+ }), q = M(() => o.padding ? `wpic-table--padding-${o.padding}` : o.compact ? "wpic-table--padding-sm" : "wpic-table--padding-inherit"), M1 = (J) => J === "right" ? "wpic:text-right" : J === "center" ? "wpic:text-center" : "wpic:text-left", k1 = (J, K) => [
432
435
  K,
433
436
  o.flushEdges && J === 0 && !o.expandable && !o.selectable ? "wpic:pl-0" : "wpic-table__pad-l",
434
437
  o.flushEdges && J === o.columns.length - 1 ? "wpic:pr-0" : "wpic-table__pad-r"
@@ -439,14 +442,14 @@ const O3 = {
439
442
  return d({ filteredCount: M(() => x.value.length), searchQuery: B }), (J, K) => (e(), t("div", {
440
443
  class: g(["wpic-table", [q.value, { "wpic-table--column-dividers": n.columnDividers }]])
441
444
  }, [
442
- (H.value || m(f).toolbar) && !n.loading ? (e(), t("div", {
445
+ (P.value || m(f).toolbar) && !n.loading ? (e(), t("div", {
443
446
  key: 0,
444
447
  class: g(["wpic:flex wpic:items-center wpic:gap-2 wpic-table__divider wpic:border-b wpic:border-zinc-100 wpic:dark:border-zinc-800 wpic-table__pad-x", n.compact ? "wpic:py-1" : "wpic:py-2"])
445
448
  }, [
446
- H.value ? (e(), t(I, { key: 0 }, [
447
- $(S0, {
449
+ P.value ? (e(), t(I, { key: 0 }, [
450
+ $(A0, {
448
451
  modelValue: B.value,
449
- "onUpdate:modelValue": K[0] || (K[0] = (A) => B.value = A),
452
+ "onUpdate:modelValue": K[0] || (K[0] = (S) => B.value = S),
450
453
  placeholder: n.searchPlaceholder,
451
454
  icon: m(W2),
452
455
  class: "wpic:flex-1"
@@ -467,9 +470,9 @@ const O3 = {
467
470
  i("colgroup", null, [
468
471
  n.selectable ? (e(), t("col", o5)) : u("", !0),
469
472
  n.expandable ? (e(), t("col", s5)) : u("", !0),
470
- (e(!0), t(I, null, l1(n.columns, (A) => (e(), t("col", {
471
- key: A.field,
472
- style: h1(d1(A))
473
+ (e(!0), t(I, null, l1(n.columns, (S) => (e(), t("col", {
474
+ key: S.field,
475
+ style: m1(d1(S))
473
476
  }, null, 4))), 128))
474
477
  ]),
475
478
  o.showHeader !== !1 ? (e(), t("thead", r5, [
@@ -478,7 +481,7 @@ const O3 = {
478
481
  key: 0,
479
482
  class: g(["wpic:w-9 wpic:pr-2", n.compact ? "wpic:py-1.5" : "wpic:py-3", n.flushEdges ? "wpic:pl-0" : "wpic:pl-2"])
480
483
  }, [
481
- $(f0, {
484
+ $(b0, {
482
485
  "model-value": z.value,
483
486
  onClick: K[1] || (K[1] = b1(() => {
484
487
  }, ["stop"])),
@@ -489,32 +492,32 @@ const O3 = {
489
492
  key: 1,
490
493
  class: g(["wpic:w-8 wpic:pr-2", n.compact ? "wpic:py-1.5" : "wpic:py-3", n.flushEdges && !n.selectable ? "wpic:pl-0" : "wpic:pl-2"])
491
494
  }, null, 2)) : u("", !0),
492
- (e(!0), t(I, null, l1(n.columns, (A, _) => (e(), t("th", {
493
- key: A.field,
494
- class: g([z1(_, n.compact ? "wpic:py-1.5" : "wpic:py-3"), "wpic:whitespace-nowrap wpic:text-zinc-500 wpic:dark:text-zinc-300 wpic:font-medium", x1(A.align), _ === 0 && !n.expandable && !n.selectable ? "wpic-table__sticky wpic:sticky wpic:left-0 wpic:z-10" : ""]),
495
- style: h1({ ...d1(A) })
495
+ (e(!0), t(I, null, l1(n.columns, (S, _) => (e(), t("th", {
496
+ key: S.field,
497
+ class: g([k1(_, n.compact ? "wpic:py-1.5" : "wpic:py-3"), "wpic:whitespace-nowrap wpic:text-zinc-500 wpic:dark:text-zinc-300 wpic:font-medium", M1(S.align), _ === 0 && !n.expandable && !n.selectable ? "wpic-table__sticky wpic:sticky wpic:left-0 wpic:z-10" : ""]),
498
+ style: m1({ ...d1(S) })
496
499
  }, [
497
- N(J.$slots, "th-" + A.field, {
498
- col: A,
500
+ N(J.$slots, "th-" + S.field, {
501
+ col: S,
499
502
  sortField: s.value,
500
503
  sortDir: F.value,
501
504
  toggleSort: L
502
505
  }, () => [
503
- A.sortable ? (e(), t("button", {
506
+ S.sortable ? (e(), t("button", {
504
507
  key: 0,
505
- onClick: (m1) => L(A.field),
508
+ onClick: (v1) => L(S.field),
506
509
  class: g([
507
510
  "wpic:inline-flex wpic:items-center wpic:gap-1 wpic:cursor-pointer wpic:transition-colors wpic:whitespace-nowrap",
508
- A.align === "right" ? "wpic:ml-auto" : ""
511
+ S.align === "right" ? "wpic:ml-auto" : ""
509
512
  ]),
510
513
  style: { color: "inherit" }
511
514
  }, [
512
- v1(v(A.label) + " ", 1),
513
- s.value === A.field && F.value === "asc" ? (e(), Z(m(y0), {
515
+ f1(v(S.label) + " ", 1),
516
+ s.value === S.field && F.value === "asc" ? (e(), Z(m(M0), {
514
517
  key: 0,
515
518
  size: 11,
516
519
  style: { color: "#5E6AD2" }
517
- })) : s.value === A.field && F.value === "desc" ? (e(), Z(m(N1), {
520
+ })) : s.value === S.field && F.value === "desc" ? (e(), Z(m(K1), {
518
521
  key: 1,
519
522
  size: 11,
520
523
  style: { color: "#5E6AD2" }
@@ -524,7 +527,7 @@ const O3 = {
524
527
  style: { opacity: "0.3" }
525
528
  }))
526
529
  ], 10, d5)) : (e(), t(I, { key: 1 }, [
527
- v1(v(A.label), 1)
530
+ f1(v(S.label), 1)
528
531
  ], 64))
529
532
  ])
530
533
  ], 6))), 128))
@@ -534,23 +537,23 @@ const O3 = {
534
537
  n.summaryRow ? (e(), t("tr", u5, [
535
538
  n.selectable ? (e(), t("td", h5)) : u("", !0),
536
539
  n.expandable ? (e(), t("td", m5)) : u("", !0),
537
- (e(!0), t(I, null, l1(n.columns, (A, _) => (e(), t("td", {
538
- key: A.field,
539
- class: g([z1(_, n.compact ? "wpic:py-1" : "wpic:py-2.5"), x1(A.align), _ === 0 && !n.expandable && !n.selectable ? "wpic-table__sticky wpic:sticky wpic:left-0 wpic:z-10 wpic:text-zinc-900 wpic:dark:text-zinc-100" : "wpic:text-zinc-700 wpic:dark:text-zinc-200"])
540
+ (e(!0), t(I, null, l1(n.columns, (S, _) => (e(), t("td", {
541
+ key: S.field,
542
+ class: g([k1(_, n.compact ? "wpic:py-1" : "wpic:py-2.5"), M1(S.align), _ === 0 && !n.expandable && !n.selectable ? "wpic-table__sticky wpic:sticky wpic:left-0 wpic:z-10 wpic:text-zinc-900 wpic:dark:text-zinc-100" : "wpic:text-zinc-700 wpic:dark:text-zinc-200"])
540
543
  }, [
541
- N(J.$slots, "summary-" + A.field, {
544
+ N(J.$slots, "summary-" + S.field, {
542
545
  row: n.summaryRow,
543
- value: n.summaryRow[A.field]
546
+ value: n.summaryRow[S.field]
544
547
  }, () => [
545
- v1(v(n.summaryRow[A.field] ?? "—"), 1)
548
+ f1(v(n.summaryRow[S.field] ?? "—"), 1)
546
549
  ])
547
550
  ], 2))), 128))
548
551
  ])) : u("", !0),
549
- n1.value.length ? (e(!0), t(I, { key: 1 }, l1(n1.value, (A, _) => (e(), t(I, { key: _ }, [
552
+ n1.value.length ? (e(!0), t(I, { key: 1 }, l1(n1.value, (S, _) => (e(), t(I, { key: _ }, [
550
553
  i("tr", {
551
- class: g(["wpic-table__row wpic:group wpic-table__divider wpic:border-b wpic:border-zinc-100 wpic:dark:border-zinc-800", [n.expandable && l.value.has(_) ? "wpic:border-b-0" : "", n.rowClass?.(A)]]),
552
- style: h1({ cursor: n.rowClickable || n.expandable ? "pointer" : "default", ...n.rowStyle?.(A) ?? {} }),
553
- onClick: (m1) => n.expandable ? a(_) : n.rowClickable && r("row-click", A)
554
+ class: g(["wpic-table__row wpic:group wpic-table__divider wpic:border-b wpic:last:border-b-0 wpic:border-zinc-100 wpic:dark:border-zinc-800", [n.expandable && l.value.has(_) ? "wpic:border-b-0" : "", n.rowClass?.(S)]]),
555
+ style: m1({ cursor: n.rowClickable || n.expandable ? "pointer" : "default", ...n.rowStyle?.(S) ?? {} }),
556
+ onClick: (v1) => n.expandable ? a(_) : n.rowClickable && r("row-click", S)
554
557
  }, [
555
558
  n.selectable ? (e(), t("td", {
556
559
  key: 0,
@@ -558,16 +561,16 @@ const O3 = {
558
561
  onClick: K[2] || (K[2] = b1(() => {
559
562
  }, ["stop"]))
560
563
  }, [
561
- $(f0, {
562
- "model-value": E.value.has(U(A, _)),
563
- "onUpdate:modelValue": (m1) => G(A, _, m1)
564
+ $(b0, {
565
+ "model-value": E.value.has(U(S, _)),
566
+ "onUpdate:modelValue": (v1) => G(S, _, v1)
564
567
  }, null, 8, ["model-value", "onUpdate:modelValue"])
565
568
  ], 2)) : u("", !0),
566
569
  n.expandable ? (e(), t("td", {
567
570
  key: 1,
568
571
  class: g(["wpic:w-8 wpic:pr-1 wpic:text-zinc-400 wpic:dark:text-zinc-500", n.compact ? "wpic:py-1" : "wpic:py-2.5", n.flushEdges && !n.selectable ? "wpic:pl-0" : "wpic:pl-3"])
569
572
  }, [
570
- l.value.has(_) ? (e(), Z(m(N1), {
573
+ l.value.has(_) ? (e(), Z(m(K1), {
571
574
  key: 0,
572
575
  size: 13,
573
576
  style: { transition: "transform .15s" }
@@ -577,21 +580,21 @@ const O3 = {
577
580
  style: { transition: "transform .15s" }
578
581
  }))
579
582
  ], 2)) : u("", !0),
580
- (e(!0), t(I, null, l1(n.columns, (m1, g1) => (e(), t("td", {
581
- key: m1.field,
583
+ (e(!0), t(I, null, l1(n.columns, (v1, g1) => (e(), t("td", {
584
+ key: v1.field,
582
585
  class: g([
583
- z1(g1, n.compact ? "wpic:py-1" : "wpic:py-2.5"),
584
- x1(m1.align),
586
+ k1(g1, n.compact ? "wpic:py-1" : "wpic:py-2.5"),
587
+ M1(v1.align),
585
588
  g1 === 0 && !n.expandable && !n.selectable ? "wpic-table__sticky wpic:sticky wpic:left-0 wpic:z-10 wpic:text-zinc-900 wpic:dark:text-zinc-100 wpic:font-medium" : "wpic:text-zinc-700 wpic:dark:text-zinc-200"
586
589
  ]),
587
- style: h1(n.cellStyle?.(A, m1)),
588
- onClick: (B1) => n.expandable ? (n.rowClickable && r("row-click", A), B1.stopPropagation()) : void 0
590
+ style: m1(n.cellStyle?.(S, v1)),
591
+ onClick: (B1) => n.expandable ? (n.rowClickable && r("row-click", S), B1.stopPropagation()) : void 0
589
592
  }, [
590
- N(J.$slots, m1.field, {
591
- row: A,
592
- value: A[m1.field]
593
+ N(J.$slots, v1.field, {
594
+ row: S,
595
+ value: S[v1.field]
593
596
  }, () => [
594
- v1(v(A[m1.field] ?? "—"), 1)
597
+ f1(v(S[v1.field] ?? "—"), 1)
595
598
  ])
596
599
  ], 14, f5))), 128))
597
600
  ], 14, v5),
@@ -600,7 +603,7 @@ const O3 = {
600
603
  colspan: n.columns.length + (n.expandable ? 1 : 0) + (n.selectable ? 1 : 0),
601
604
  class: "wpic-table__pad-x wpic:pb-3 wpic:pt-0"
602
605
  }, [
603
- N(J.$slots, "expand", { row: A })
606
+ N(J.$slots, "expand", { row: S })
604
607
  ], 8, g5)
605
608
  ])) : u("", !0)
606
609
  ], 64))), 128)) : (e(), t("tr", z5, [
@@ -610,79 +613,80 @@ const O3 = {
610
613
  }, [
611
614
  i("div", k5, [
612
615
  N(J.$slots, "empty-icon"),
613
- v1(" " + v(n.emptyText ?? "No data"), 1)
616
+ f1(" " + v(n.emptyText ?? "No data"), 1)
614
617
  ])
615
618
  ], 8, C5)
616
619
  ]))
617
620
  ]))
618
621
  ])
619
622
  ]),
620
- n.showFooter && s1.value > 0 ? (e(), t("div", {
621
- key: 0,
622
- class: g(["wpic-table__footer", ["wpic:flex wpic:items-center wpic:justify-between wpic-table__divider wpic:border-t wpic:border-zinc-100 wpic:dark:border-zinc-800 wpic-table__pad-x", n.compact ? "wpic:py-1" : "wpic:py-2.5"]])
623
- }, [
624
- i("span", x5, [
623
+ n.showFooter && s1.value > 0 ? (e(), t("div", x5, [
624
+ i("span", y5, [
625
625
  r1.value > 1 ? (e(), t(I, { key: 0 }, [
626
- v1(v(k1.value) + "–" + v(j.value) + " " + v(n.labels?.of ?? "of") + " " + v(s1.value), 1)
626
+ f1(v(y1.value) + "–" + v(j.value) + " " + v(n.labels?.of ?? "of") + " " + v(s1.value), 1)
627
627
  ], 64)) : (e(), t(I, { key: 1 }, [
628
- v1(v(s1.value) + " " + v(s1.value === 1 ? n.labels?.item ?? "item" : n.labels?.items ?? "items"), 1)
628
+ f1(v(s1.value) + " " + v(s1.value === 1 ? n.labels?.item ?? "item" : n.labels?.items ?? "items"), 1)
629
629
  ], 64))
630
630
  ]),
631
- r1.value > 1 ? (e(), t("div", y5, [
631
+ r1.value > 1 ? (e(), t("div", M5, [
632
632
  i("button", {
633
+ type: "button",
633
634
  "aria-label": n.labels?.previous ?? "Previous page",
634
- onClick: K[3] || (K[3] = (A) => c1.value--),
635
+ onClick: K[3] || (K[3] = (S) => c1.value--),
635
636
  disabled: c1.value === 1,
636
- class: "wpic:h-7 wpic:w-7 wpic:flex wpic:items-center wpic:justify-center wpic:rounded-md wpic:transition-colors wpic:cursor-pointer wpic:disabled:opacity-30 wpic:hover:bg-zinc-50 wpic:dark:hover:bg-zinc-800/50 wpic:text-zinc-400"
637
+ class: "wpic:h-8 wpic:w-8 wpic:flex wpic:items-center wpic:justify-center wpic:rounded-lg wpic:transition-colors wpic:cursor-pointer wpic:disabled:opacity-30 wpic:hover:bg-zinc-50 wpic:dark:hover:bg-zinc-800/50 wpic:text-zinc-400"
637
638
  }, [
638
639
  $(m(x2), { size: 13 })
639
- ], 8, M5),
640
- (e(!0), t(I, null, l1(e1.value, (A) => (e(), t(I, { key: A }, [
641
- A === "…" ? (e(), t("span", L5, "…")) : (e(), t("button", {
640
+ ], 8, L5),
641
+ (e(!0), t(I, null, l1(e1.value, (S) => (e(), t(I, { key: S }, [
642
+ S === "…" ? (e(), t("span", V5, "…")) : (e(), t("button", {
642
643
  key: 1,
643
- onClick: (_) => c1.value = A,
644
+ type: "button",
645
+ "aria-current": c1.value === S ? "page" : void 0,
646
+ onClick: (_) => c1.value = S,
644
647
  class: g([
645
- "wpic:h-7 wpic:min-w-7 wpic:px-2 wpic:rounded-md wpic:text-sm wpic:font-medium wpic:transition-colors wpic:cursor-pointer",
646
- c1.value === A ? "" : "wpic:text-zinc-700 wpic:dark:text-zinc-200 wpic:hover:bg-zinc-100 wpic:dark:hover:bg-zinc-700"
648
+ "wpic:h-8 wpic:min-w-8 wpic:px-2 wpic:rounded-lg wpic:text-sm wpic:font-medium wpic:transition-colors wpic:cursor-pointer",
649
+ c1.value === S ? "" : "wpic:text-zinc-700 wpic:dark:text-zinc-200 wpic:hover:bg-zinc-100 wpic:dark:hover:bg-zinc-700"
647
650
  ]),
648
- style: h1(c1.value === A ? "background:rgba(94,106,210,0.1);color:#5E6AD2" : void 0)
649
- }, v(A), 15, V5))
651
+ style: m1(c1.value === S ? "background:rgba(94,106,210,0.1);color:#5E6AD2" : void 0)
652
+ }, v(S), 15, $5))
650
653
  ], 64))), 128)),
651
654
  i("button", {
655
+ type: "button",
652
656
  "aria-label": n.labels?.next ?? "Next page",
653
- onClick: K[4] || (K[4] = (A) => c1.value++),
657
+ onClick: K[4] || (K[4] = (S) => c1.value++),
654
658
  disabled: c1.value === r1.value,
655
- class: "wpic:h-7 wpic:w-7 wpic:flex wpic:items-center wpic:justify-center wpic:rounded-md wpic:transition-colors wpic:cursor-pointer wpic:disabled:opacity-30 wpic:hover:bg-zinc-50 wpic:dark:hover:bg-zinc-800/50 wpic:text-zinc-400"
659
+ class: "wpic:h-8 wpic:w-8 wpic:flex wpic:items-center wpic:justify-center wpic:rounded-lg wpic:transition-colors wpic:cursor-pointer wpic:disabled:opacity-30 wpic:hover:bg-zinc-50 wpic:dark:hover:bg-zinc-800/50 wpic:text-zinc-400"
656
660
  }, [
657
661
  $(m(E1), { size: 13 })
658
- ], 8, $5)
662
+ ], 8, B5)
659
663
  ])) : u("", !0)
660
- ], 2)) : u("", !0)
664
+ ])) : u("", !0)
661
665
  ], 64))
662
666
  ], 2));
663
667
  }
664
- }), B5 = {
668
+ }), S5 = {
665
669
  key: 0,
666
670
  class: "w-spreadsheet-frame__heading"
667
- }, S5 = {
671
+ }, A5 = {
668
672
  key: 1,
669
673
  class: "w-spreadsheet-frame__status"
670
- }, A5 = ["title", "aria-label"], F5 = {
674
+ }, F5 = ["title", "aria-label"], H5 = {
671
675
  key: 1,
672
676
  class: "wpic:flex wpic:min-h-64 wpic:items-center wpic:justify-center wpic:gap-3 wpic:text-zinc-400 wpic:dark:text-zinc-500"
673
- }, H5 = {
677
+ }, P5 = {
674
678
  key: 0,
675
679
  class: "w-spreadsheet__row-axis-col"
676
- }, P5 = { key: 0 }, T5 = {
680
+ }, T5 = { key: 0 }, j5 = {
677
681
  key: 0,
678
682
  class: "w-spreadsheet__corner"
679
- }, j5 = {
683
+ }, E5 = {
680
684
  key: 0,
681
685
  class: "w-spreadsheet__axis"
682
- }, E5 = ["colspan", "title", "tabindex", "onClick", "onKeydown", "onPointerenter", "onPointerdown"], W5 = {
686
+ }, W5 = ["colspan", "title", "tabindex", "onClick", "onKeydown", "onPointerenter", "onPointerdown"], D5 = {
683
687
  key: 0,
684
688
  class: "w-spreadsheet__editor"
685
- }, D5 = ["type", "value", "min", "placeholder", "onInput"], I5 = ["onPointerdown"], il = /* @__PURE__ */ X({
689
+ }, I5 = ["type", "value", "min", "placeholder", "onInput"], R5 = ["onPointerdown"], il = /* @__PURE__ */ X({
686
690
  __name: "WSpreadsheet",
687
691
  props: {
688
692
  appearance: {},
@@ -707,23 +711,23 @@ const O3 = {
707
711
  },
708
712
  emits: ["update:expanded", "cell-change"],
709
713
  setup(n, { expose: d, emit: c }) {
710
- const o = n, r = c, l = M(() => o.showAxes && o.showColumnLetters), a = M(() => o.showAxes && o.showRowNumbers), f = M(() => o.columns.some((C) => C.sticky)), b = T(null), V = T("asc"), s = T(o.expanded ?? !1), F = T(null), L = T(null), B = T(null), H = T(null), x = T(null);
714
+ const o = n, r = c, l = M(() => o.showAxes && o.showColumnLetters), a = M(() => o.showAxes && o.showRowNumbers), f = M(() => o.columns.some((C) => C.sticky)), b = T(null), V = T("asc"), s = T(o.expanded ?? !1), F = T(null), L = T(null), B = T(null), P = T(null), x = T(null);
711
715
  function k() {
712
716
  if (!o.downloadable) return;
713
717
  const C = (R) => `"${String(R ?? "").replace(/"/g, '""')}"`, D = U.value.map((R) => o.columns.map((Q) => C(r1(R, Q.key))).join(",")).join(`\r
714
- `), S = new Blob([`\uFEFF${D}`], { type: "text/csv;charset=utf-8" }), a1 = URL.createObjectURL(S), u1 = document.createElement("a");
715
- u1.href = a1, u1.download = o.downloadFilename || "spreadsheet.csv", u1.click(), URL.revokeObjectURL(a1);
718
+ `), A = new Blob([`\uFEFF${D}`], { type: "text/csv;charset=utf-8" }), a1 = URL.createObjectURL(A), w1 = document.createElement("a");
719
+ w1.href = a1, w1.download = o.downloadFilename || "spreadsheet.csv", w1.click(), URL.revokeObjectURL(a1);
716
720
  }
717
721
  function O(C, D = !0) {
718
722
  if (s.value === C) return;
719
- const S = performance.now();
723
+ const A = performance.now();
720
724
  console.debug(`[WSpreadsheet] ${C ? "expand" : "minimize"} requested`), s.value = C, D && r("update:expanded", C), requestAnimationFrame(() => requestAnimationFrame(() => {
721
- console.debug(`[WSpreadsheet] ${C ? "expand" : "minimize"} painted in ${(performance.now() - S).toFixed(1)}ms`);
725
+ console.debug(`[WSpreadsheet] ${C ? "expand" : "minimize"} painted in ${(performance.now() - A).toFixed(1)}ms`);
722
726
  }));
723
727
  }
724
- C1(() => o.expanded, (C) => {
728
+ x1(() => o.expanded, (C) => {
725
729
  C != null && O(C, !1);
726
- }), C1(() => o.downloadRequest, (C, D) => {
730
+ }), x1(() => o.downloadRequest, (C, D) => {
727
731
  C != null && C !== D && k();
728
732
  }), d({
729
733
  expand: () => {
@@ -742,17 +746,17 @@ const O3 = {
742
746
  }
743
747
  function s1(C) {
744
748
  if (C.target?.closest(".w-spreadsheet__cell")?.querySelector(".w-spreadsheet__input")) return;
745
- H.value = null, x.value = null;
749
+ P.value = null, x.value = null;
746
750
  const a1 = document.activeElement;
747
751
  a1 && F.value?.contains(a1) && a1.blur();
748
752
  }
749
753
  E2(() => {
750
754
  document.addEventListener("keydown", c1), document.addEventListener("pointerdown", s1);
751
- }), U1(() => {
752
- document.removeEventListener("keydown", c1), document.removeEventListener("pointerdown", s1), window.removeEventListener("pointerup", A);
755
+ }), O1(() => {
756
+ document.removeEventListener("keydown", c1), document.removeEventListener("pointerdown", s1), window.removeEventListener("pointerup", S);
753
757
  });
754
758
  function r1(C, D) {
755
- return C.cells.find((S) => S.key === D)?.value ?? "";
759
+ return C.cells.find((A) => A.key === D)?.value ?? "";
756
760
  }
757
761
  function n1(C) {
758
762
  if (typeof C == "number") return C;
@@ -762,95 +766,95 @@ const O3 = {
762
766
  const U = M(() => {
763
767
  if (!b.value) return o.rows;
764
768
  const C = o.rows.filter((a1) => a1.sortable !== !1), D = V.value === "asc" ? 1 : -1;
765
- C.sort((a1, u1) => {
766
- const R = n1(r1(a1, b.value)), Q = n1(r1(u1, b.value));
769
+ C.sort((a1, w1) => {
770
+ const R = n1(r1(a1, b.value)), Q = n1(r1(w1, b.value));
767
771
  return typeof R == "number" && typeof Q == "number" ? (R - Q) * D : String(R).localeCompare(String(Q), void 0, { numeric: !0 }) * D;
768
772
  });
769
- let S = 0;
770
- return o.rows.map((a1) => a1.sortable === !1 ? a1 : C[S++]);
773
+ let A = 0;
774
+ return o.rows.map((a1) => a1.sortable === !1 ? a1 : C[A++]);
771
775
  });
772
776
  function E(C) {
773
- const D = o.columns.find((S) => S.key === C.key);
777
+ const D = o.columns.find((A) => A.key === C.key);
774
778
  return !!(o.sortable && C.variant === "header" && D?.sortable !== !1);
775
779
  }
776
780
  function Y(C) {
777
781
  E(C) && (b.value === C.key ? V.value = V.value === "asc" ? "desc" : "asc" : (b.value = C.key, V.value = "asc"));
778
782
  }
779
783
  function z(C, D) {
780
- return C.cells.slice(0, D).reduce((S, a1) => S + (a1.colspan || 1), 0);
784
+ return C.cells.slice(0, D).reduce((A, a1) => A + (a1.colspan || 1), 0);
781
785
  }
782
786
  function G(C, D) {
783
787
  return !!o.columns[z(C, D)]?.sticky;
784
788
  }
785
789
  function p1(C, D) {
786
- const S = z(C, D);
787
- return !!(o.columns[S]?.sticky && !o.columns.slice(0, S).some((a1) => a1.sticky));
790
+ const A = z(C, D);
791
+ return !!(o.columns[A]?.sticky && !o.columns.slice(0, A).some((a1) => a1.sticky));
788
792
  }
789
- function k1(C, D) {
790
- const S = z(C, D);
791
- if (!o.columns[S]?.sticky) return;
792
- const a1 = o.columns.slice(0, S).map((u1) => u1.width || "0px");
793
+ function y1(C, D) {
794
+ const A = z(C, D);
795
+ if (!o.columns[A]?.sticky) return;
796
+ const a1 = o.columns.slice(0, A).map((w1) => w1.width || "0px");
793
797
  return { left: a1.length ? `calc(${a1.join(" + ")})` : "0px" };
794
798
  }
795
799
  function j(C, D) {
796
800
  return `${C.key}\0${D.key}`;
797
801
  }
798
802
  function e1(C, D) {
799
- !D.editable || L.value || (H.value = { rowKey: C.key, cellKey: D.key }, x.value = null);
803
+ !D.editable || L.value || (P.value = { rowKey: C.key, cellKey: D.key }, x.value = null);
800
804
  }
801
805
  function q(C, D) {
802
- return H.value?.rowKey === C.key && H.value?.cellKey === D.key;
806
+ return P.value?.rowKey === C.key && P.value?.cellKey === D.key;
803
807
  }
804
- function x1(C, D, S) {
808
+ function M1(C, D, A) {
805
809
  const a1 = U.value[C];
806
- !o.fillHandle || !S.editable || !a1 || !q(a1, S) || (x.value = null, L.value = { row: C, cell: D, value: String(S.value ?? "") }, B.value = { row: C, cell: D }, window.addEventListener("pointerup", A, { once: !0 }));
810
+ !o.fillHandle || !A.editable || !a1 || !q(a1, A) || (x.value = null, L.value = { row: C, cell: D, value: String(A.value ?? "") }, B.value = { row: C, cell: D }, window.addEventListener("pointerup", S, { once: !0 }));
807
811
  }
808
- function z1(C, D) {
812
+ function k1(C, D) {
809
813
  L.value && (B.value = { row: C, cell: D });
810
814
  }
811
815
  function d1(C, D) {
812
816
  if (!L.value || !B.value) return !1;
813
- const S = Math.min(L.value.row, B.value.row), a1 = Math.max(L.value.row, B.value.row), u1 = Math.min(L.value.cell, B.value.cell), R = Math.max(L.value.cell, B.value.cell);
814
- return C >= S && C <= a1 && D >= u1 && D <= R;
817
+ const A = Math.min(L.value.row, B.value.row), a1 = Math.max(L.value.row, B.value.row), w1 = Math.min(L.value.cell, B.value.cell), R = Math.max(L.value.cell, B.value.cell);
818
+ return C >= A && C <= a1 && D >= w1 && D <= R;
815
819
  }
816
820
  function J(C, D) {
817
821
  if (!d1(C, D) || !L.value || !B.value) return {};
818
- const S = Math.min(L.value.row, B.value.row), a1 = Math.max(L.value.row, B.value.row), u1 = Math.min(L.value.cell, B.value.cell), R = Math.max(L.value.cell, B.value.cell);
822
+ const A = Math.min(L.value.row, B.value.row), a1 = Math.max(L.value.row, B.value.row), w1 = Math.min(L.value.cell, B.value.cell), R = Math.max(L.value.cell, B.value.cell);
819
823
  return {
820
824
  "w-spreadsheet__cell--fill-range": !0,
821
- "w-spreadsheet__cell--fill-top": C === S,
825
+ "w-spreadsheet__cell--fill-top": C === A,
822
826
  "w-spreadsheet__cell--fill-bottom": C === a1,
823
- "w-spreadsheet__cell--fill-left": D === u1,
827
+ "w-spreadsheet__cell--fill-left": D === w1,
824
828
  "w-spreadsheet__cell--fill-right": D === R
825
829
  };
826
830
  }
827
831
  function K(C, D) {
828
- const S = j(C, D);
832
+ const A = j(C, D);
829
833
  return {
830
- "w-spreadsheet__cell--fill-completed": !!x.value?.cells.has(S),
831
- "w-spreadsheet__cell--fill-source": x.value?.source === S
834
+ "w-spreadsheet__cell--fill-completed": !!x.value?.cells.has(A),
835
+ "w-spreadsheet__cell--fill-source": x.value?.source === A
832
836
  };
833
837
  }
834
- function A() {
838
+ function S() {
835
839
  if (!L.value || !B.value) return;
836
- const C = L.value, D = B.value, S = Math.min(C.row, D.row), a1 = Math.max(C.row, D.row), u1 = Math.min(C.cell, D.cell), R = Math.max(C.cell, D.cell), Q = /* @__PURE__ */ new Set(), t1 = U.value[C.row], L1 = t1?.cells[C.cell];
837
- for (let T1 = S; T1 <= a1; T1++) {
840
+ const C = L.value, D = B.value, A = Math.min(C.row, D.row), a1 = Math.max(C.row, D.row), w1 = Math.min(C.cell, D.cell), R = Math.max(C.cell, D.cell), Q = /* @__PURE__ */ new Set(), i1 = U.value[C.row], L1 = i1?.cells[C.cell];
841
+ for (let T1 = A; T1 <= a1; T1++) {
838
842
  const a2 = U.value[T1];
839
843
  if (a2)
840
- for (let n2 = u1; n2 <= R; n2++) {
844
+ for (let n2 = w1; n2 <= R; n2++) {
841
845
  const u2 = a2.cells[n2];
842
846
  u2?.editable && (Q.add(j(a2, u2)), r("cell-change", { rowKey: a2.key, cellKey: u2.key, value: C.value, row: a2, cell: u2 }));
843
847
  }
844
848
  }
845
- L.value = null, B.value = null, x.value = t1 && L1 ? { cells: Q, source: j(t1, L1) } : null;
849
+ L.value = null, B.value = null, x.value = i1 && L1 ? { cells: Q, source: j(i1, L1) } : null;
846
850
  }
847
851
  function _(C) {
848
- let D = C + 1, S = "";
852
+ let D = C + 1, A = "";
849
853
  for (; D > 0; )
850
- D -= 1, S = String.fromCharCode(65 + D % 26) + S, D = Math.floor(D / 26);
851
- return S;
854
+ D -= 1, A = String.fromCharCode(65 + D % 26) + A, D = Math.floor(D / 26);
855
+ return A;
852
856
  }
853
- function m1(C) {
857
+ function v1(C) {
854
858
  return [
855
859
  `w-spreadsheet__cell--${C.variant || "default"}`,
856
860
  `w-spreadsheet__cell--${C.align || "left"}`,
@@ -859,13 +863,13 @@ const O3 = {
859
863
  C.class || ""
860
864
  ];
861
865
  }
862
- function g1(C, D, S) {
863
- const a1 = S.target.value;
866
+ function g1(C, D, A) {
867
+ const a1 = A.target.value;
864
868
  r("cell-change", { rowKey: C.key, cellKey: D.key, value: a1, row: C, cell: D });
865
869
  }
866
870
  function B1(C) {
867
- const S = C.currentTarget.previousElementSibling;
868
- S?.focus(), S?.showPicker?.();
871
+ const A = C.currentTarget.previousElementSibling;
872
+ A?.focus(), A?.showPicker?.();
869
873
  }
870
874
  return (C, D) => (e(), t("div", {
871
875
  ref_key: "frameRef",
@@ -877,7 +881,7 @@ const O3 = {
877
881
  type: "button",
878
882
  class: "w-spreadsheet-frame__backdrop",
879
883
  "aria-label": "Restore spreadsheet",
880
- onClick: D[0] || (D[0] = (S) => O(!1))
884
+ onClick: D[0] || (D[0] = (A) => O(!1))
881
885
  })) : u("", !0),
882
886
  i("div", {
883
887
  class: g(["w-spreadsheet-frame__surface", { "w-spreadsheet--plain": n.appearance === "plain" }])
@@ -886,10 +890,10 @@ const O3 = {
886
890
  key: 0,
887
891
  class: g(["w-spreadsheet-frame__toolbar", { "w-spreadsheet-frame__toolbar--hover": n.actionsOnHover && !s.value }])
888
892
  }, [
889
- s.value && C.$slots["expanded-header"] ? (e(), t("div", B5, [
893
+ s.value && C.$slots["expanded-header"] ? (e(), t("div", S5, [
890
894
  N(C.$slots, "expanded-header")
891
895
  ])) : u("", !0),
892
- C.$slots["toolbar-status"] ? (e(), t("div", S5, [
896
+ C.$slots["toolbar-status"] ? (e(), t("div", A5, [
893
897
  N(C.$slots, "toolbar-status")
894
898
  ])) : u("", !0),
895
899
  N(C.$slots, "toolbar"),
@@ -909,7 +913,7 @@ const O3 = {
909
913
  class: "w-spreadsheet-frame__expand",
910
914
  title: s.value ? "Restore spreadsheet" : "Expand spreadsheet",
911
915
  "aria-label": s.value ? "Restore spreadsheet" : "Expand spreadsheet",
912
- onClick: D[1] || (D[1] = (S) => O(!s.value))
916
+ onClick: D[1] || (D[1] = (A) => O(!s.value))
913
917
  }, [
914
918
  s.value ? (e(), Z(m(h3), {
915
919
  key: 0,
@@ -918,72 +922,72 @@ const O3 = {
918
922
  key: 1,
919
923
  size: 16
920
924
  }))
921
- ], 8, A5)) : u("", !0)
925
+ ], 8, F5)) : u("", !0)
922
926
  ], 2)) : u("", !0),
923
- n.loading ? (e(), t("div", F5, [
927
+ n.loading ? (e(), t("div", H5, [
924
928
  $(e0),
925
929
  D[2] || (D[2] = i("span", null, "Preparing sales estimate…", -1))
926
930
  ])) : (e(), t("div", {
927
931
  key: 2,
928
932
  class: g(["w-spreadsheet", { "w-spreadsheet--with-column-axis": l.value }]),
929
- style: h1({ maxHeight: s.value ? "calc(100vh - 96px)" : n.maxHeight })
933
+ style: m1({ maxHeight: s.value ? "calc(100vh - 96px)" : n.maxHeight })
930
934
  }, [
931
935
  i("table", {
932
936
  class: g(["w-spreadsheet__table", { "w-spreadsheet__table--sticky-columns": f.value }]),
933
- style: h1({ minWidth: n.minWidth })
937
+ style: m1({ minWidth: n.minWidth })
934
938
  }, [
935
939
  i("colgroup", null, [
936
- a.value ? (e(), t("col", H5)) : u("", !0),
937
- (e(!0), t(I, null, l1(n.columns, (S) => (e(), t("col", {
938
- key: S.key,
939
- style: h1({ width: S.width })
940
+ a.value ? (e(), t("col", P5)) : u("", !0),
941
+ (e(!0), t(I, null, l1(n.columns, (A) => (e(), t("col", {
942
+ key: A.key,
943
+ style: m1({ width: A.width })
940
944
  }, null, 4))), 128))
941
945
  ]),
942
- l.value ? (e(), t("thead", P5, [
946
+ l.value ? (e(), t("thead", T5, [
943
947
  i("tr", null, [
944
- a.value ? (e(), t("th", T5)) : u("", !0),
945
- (e(!0), t(I, null, l1(n.columns, (S, a1) => (e(), t("th", {
946
- key: S.key,
948
+ a.value ? (e(), t("th", j5)) : u("", !0),
949
+ (e(!0), t(I, null, l1(n.columns, (A, a1) => (e(), t("th", {
950
+ key: A.key,
947
951
  class: "w-spreadsheet__axis"
948
- }, v(S.label || _(a1)), 1))), 128))
952
+ }, v(A.label || _(a1)), 1))), 128))
949
953
  ])
950
954
  ])) : u("", !0),
951
955
  i("tbody", null, [
952
- (e(!0), t(I, null, l1(U.value, (S, a1) => (e(), t("tr", {
953
- key: S.key,
954
- class: g({ "w-spreadsheet__row--sticky": S.sticky })
956
+ (e(!0), t(I, null, l1(U.value, (A, a1) => (e(), t("tr", {
957
+ key: A.key,
958
+ class: g({ "w-spreadsheet__row--sticky": A.sticky })
955
959
  }, [
956
- a.value ? (e(), t("th", j5, v(a1 + 1), 1)) : u("", !0),
957
- (e(!0), t(I, null, l1(S.cells, (u1, R) => (e(), t("td", {
958
- key: u1.key,
959
- class: g(["w-spreadsheet__cell", [m1(u1), { "w-spreadsheet__cell--sortable": E(u1), "w-spreadsheet__cell--sticky": G(S, R), "w-spreadsheet__cell--sticky-first": p1(S, R), "w-spreadsheet__cell--active": q(S, u1) }, J(a1, R), K(S, u1)]]),
960
- colspan: u1.colspan || 1,
961
- title: u1.title,
962
- style: h1(k1(S, R)),
963
- tabindex: E(u1) ? 0 : void 0,
964
- onClick: (Q) => Y(u1),
960
+ a.value ? (e(), t("th", E5, v(a1 + 1), 1)) : u("", !0),
961
+ (e(!0), t(I, null, l1(A.cells, (w1, R) => (e(), t("td", {
962
+ key: w1.key,
963
+ class: g(["w-spreadsheet__cell", [v1(w1), { "w-spreadsheet__cell--sortable": E(w1), "w-spreadsheet__cell--sticky": G(A, R), "w-spreadsheet__cell--sticky-first": p1(A, R), "w-spreadsheet__cell--active": q(A, w1) }, J(a1, R), K(A, w1)]]),
964
+ colspan: w1.colspan || 1,
965
+ title: w1.title,
966
+ style: m1(y1(A, R)),
967
+ tabindex: E(w1) ? 0 : void 0,
968
+ onClick: (Q) => Y(w1),
965
969
  onKeydown: [
966
- w2(b1((Q) => Y(u1), ["prevent"]), ["enter"]),
967
- w2(b1((Q) => Y(u1), ["prevent"]), ["space"])
970
+ w2(b1((Q) => Y(w1), ["prevent"]), ["enter"]),
971
+ w2(b1((Q) => Y(w1), ["prevent"]), ["space"])
968
972
  ],
969
- onPointerenter: (Q) => z1(a1, R),
970
- onPointerdown: (Q) => e1(S, u1)
973
+ onPointerenter: (Q) => k1(a1, R),
974
+ onPointerdown: (Q) => e1(A, w1)
971
975
  }, [
972
- N(C.$slots, `cell-${u1.key}`, {
973
- row: S,
974
- cell: u1,
976
+ N(C.$slots, `cell-${w1.key}`, {
977
+ row: A,
978
+ cell: w1,
975
979
  rowIndex: a1
976
980
  }, () => [
977
- u1.editable ? (e(), t("div", W5, [
981
+ w1.editable ? (e(), t("div", D5, [
978
982
  i("input", {
979
- class: g(["w-spreadsheet__input", { "w-spreadsheet__input--date": u1.inputType === "date" }]),
980
- type: u1.inputType || "text",
981
- value: u1.value ?? "",
982
- min: u1.min,
983
- placeholder: u1.placeholder,
984
- onInput: (Q) => g1(S, u1, Q)
985
- }, null, 42, D5),
986
- u1.inputType === "date" ? (e(), t("button", {
983
+ class: g(["w-spreadsheet__input", { "w-spreadsheet__input--date": w1.inputType === "date" }]),
984
+ type: w1.inputType || "text",
985
+ value: w1.value ?? "",
986
+ min: w1.min,
987
+ placeholder: w1.placeholder,
988
+ onInput: (Q) => g1(A, w1, Q)
989
+ }, null, 42, I5),
990
+ w1.inputType === "date" ? (e(), t("button", {
987
991
  key: 0,
988
992
  type: "button",
989
993
  class: "w-spreadsheet__calendar",
@@ -994,23 +998,23 @@ const O3 = {
994
998
  $(m(D2), { size: 16 })
995
999
  ])) : u("", !0)
996
1000
  ])) : (e(), t(I, { key: 1 }, [
997
- v1(v(u1.value ?? ""), 1)
1001
+ f1(v(w1.value ?? ""), 1)
998
1002
  ], 64))
999
1003
  ]),
1000
- E(u1) ? (e(), Z(S1(b.value === u1.key ? V.value === "asc" ? m(y0) : m(N1) : m(_2)), {
1004
+ E(w1) ? (e(), Z(S1(b.value === w1.key ? V.value === "asc" ? m(M0) : m(K1) : m(_2)), {
1001
1005
  key: 0,
1002
1006
  class: "w-spreadsheet__sort-icon",
1003
1007
  size: 14
1004
1008
  })) : u("", !0),
1005
- n.fillHandle && u1.editable && q(S, u1) ? (e(), t("button", {
1009
+ n.fillHandle && w1.editable && q(A, w1) ? (e(), t("button", {
1006
1010
  key: 1,
1007
1011
  type: "button",
1008
1012
  class: "w-spreadsheet__fill-handle",
1009
1013
  "aria-label": "Fill adjacent cells",
1010
1014
  title: "Drag to fill adjacent cells",
1011
- onPointerdown: b1((Q) => x1(a1, R, u1), ["stop", "prevent"])
1012
- }, null, 40, I5)) : u("", !0)
1013
- ], 46, E5))), 128))
1015
+ onPointerdown: b1((Q) => M1(a1, R, w1), ["stop", "prevent"])
1016
+ }, null, 40, R5)) : u("", !0)
1017
+ ], 46, W5))), 128))
1014
1018
  ], 2))), 128))
1015
1019
  ])
1016
1020
  ], 6)
@@ -1023,13 +1027,13 @@ const O3 = {
1023
1027
  for (const [o, r] of d)
1024
1028
  c[o] = r;
1025
1029
  return c;
1026
- }, R5 = {}, Z5 = { class: "wpic:min-w-40 wpic:rounded-lg wpic:bg-white wpic:p-1.5 wpic:shadow-md wpic:shadow-zinc-900/5 wpic:dark:bg-zinc-700 wpic:dark:shadow-black/20" };
1027
- function N5(n, d) {
1028
- return e(), t("div", Z5, [
1030
+ }, Z5 = {}, N5 = { class: "wpic:min-w-40 wpic:rounded-lg wpic:bg-white wpic:p-1.5 wpic:shadow-md wpic:shadow-zinc-900/5 wpic:dark:bg-zinc-700 wpic:dark:shadow-black/20" };
1031
+ function K5(n, d) {
1032
+ return e(), t("div", N5, [
1029
1033
  N(n.$slots, "default")
1030
1034
  ]);
1031
1035
  }
1032
- const b0 = /* @__PURE__ */ W1(R5, [["render", N5]]), K5 = ["disabled"], v2 = /* @__PURE__ */ X({
1036
+ const g0 = /* @__PURE__ */ W1(Z5, [["render", K5]]), U5 = ["disabled"], v2 = /* @__PURE__ */ X({
1033
1037
  __name: "WActionMenuItem",
1034
1038
  props: {
1035
1039
  danger: { type: Boolean },
@@ -1045,9 +1049,9 @@ const b0 = /* @__PURE__ */ W1(R5, [["render", N5]]), K5 = ["disabled"], v2 = /*
1045
1049
  class: g(["wpic:flex wpic:h-8 wpic:w-full wpic:items-center wpic:gap-2 wpic:rounded-md wpic:px-2 wpic:text-left wpic:font-medium wpic:transition wpic:disabled:cursor-not-allowed wpic:disabled:opacity-40", n.danger ? "wpic:text-red-500 wpic:hover:bg-red-50 wpic:dark:hover:bg-red-950/30" : "wpic:text-zinc-600 wpic:hover:bg-zinc-100 wpic:hover:text-zinc-900 wpic:dark:text-zinc-100 wpic:dark:hover:bg-zinc-600 wpic:dark:hover:text-white"])
1046
1050
  }, [
1047
1051
  N(o.$slots, "default")
1048
- ], 10, K5));
1052
+ ], 10, U5));
1049
1053
  }
1050
- }), U5 = {
1054
+ }), O5 = {
1051
1055
  light: {
1052
1056
  trendPositive: "#15803D",
1053
1057
  trendNegative: "#DB2777",
@@ -1112,8 +1116,8 @@ const b0 = /* @__PURE__ */ W1(R5, [["render", N5]]), K5 = ["disabled"], v2 = /*
1112
1116
  light: ["#3B73E1", "#0891A6", "#8B5CD6", "#C58A16", "#D64D79", "#527FA8"],
1113
1117
  dark: ["#7C9FE0", "#5FB8C4", "#AF94D5", "#D8B26A", "#D88FA5", "#94A8BD"]
1114
1118
  };
1115
- function O5(n, d = {}) {
1116
- const c = { ...U5[n], ...d }, o = {};
1119
+ function Y5(n, d = {}) {
1120
+ const c = { ...O5[n], ...d }, o = {};
1117
1121
  for (const [r, l] of Object.entries(c))
1118
1122
  o[`--wpic-${r.replace(/[A-Z]/g, (a) => `-${a.toLowerCase()}`)}`] = l;
1119
1123
  Object.assign(o, {
@@ -1140,22 +1144,22 @@ function O5(n, d = {}) {
1140
1144
  r.startsWith("--wpic-legacy-") && (o[r.replace("--wpic-legacy-", "--")] = l);
1141
1145
  return o;
1142
1146
  }
1143
- const A0 = /* @__PURE__ */ Symbol("wpic-theme");
1147
+ const F0 = /* @__PURE__ */ Symbol("wpic-theme");
1144
1148
  function y2() {
1145
- return f2(A0, M(() => null));
1149
+ return f2(F0, M(() => null));
1146
1150
  }
1147
- let g0 = 0, z0 = "";
1148
- function F0() {
1149
- g0++ === 0 && (z0 = document.body.style.overflow, document.body.style.overflow = "hidden");
1151
+ let z0 = 0, C0 = "";
1152
+ function H0() {
1153
+ z0++ === 0 && (C0 = document.body.style.overflow, document.body.style.overflow = "hidden");
1150
1154
  let n = !1;
1151
1155
  return () => {
1152
- n || (n = !0, --g0 === 0 && (document.body.style.overflow = z0));
1156
+ n || (n = !0, --z0 === 0 && (document.body.style.overflow = C0));
1153
1157
  };
1154
1158
  }
1155
- const Y5 = ["data-wpic-theme"], q5 = ["aria-label"], Q5 = { class: "wpic-bottom-sheet-header" }, J5 = ["aria-label"], X5 = {
1159
+ const q5 = ["data-wpic-theme"], Q5 = ["aria-label"], J5 = { class: "wpic-bottom-sheet-header" }, X5 = ["aria-label"], G5 = {
1156
1160
  key: 0,
1157
1161
  class: "wpic-bottom-sheet-footer"
1158
- }, X1 = [], q2 = /* @__PURE__ */ new Map(), H0 = /* @__PURE__ */ X({
1162
+ }, X1 = [], q2 = /* @__PURE__ */ new Map(), P0 = /* @__PURE__ */ X({
1159
1163
  __name: "WBottomSheet",
1160
1164
  props: {
1161
1165
  returnFocus: {},
@@ -1167,19 +1171,19 @@ const Y5 = ["data-wpic-theme"], q5 = ["aria-label"], Q5 = { class: "wpic-bottom-
1167
1171
  emits: ["update:modelValue"],
1168
1172
  setup(n, { emit: d }) {
1169
1173
  const c = n, o = d, r = y2(), l = T(null), a = /* @__PURE__ */ Symbol("sheet"), f = f2("wpic-overlay-layer", T(9998)), b = T(1e4);
1170
- D1("wpic-overlay-layer", b);
1174
+ I1("wpic-overlay-layer", b);
1171
1175
  const V = T({ height: 0, top: 0 }), s = M(() => V.value.height ? { height: `${V.value.height}px`, top: `${V.value.top}px` } : {}), F = /* @__PURE__ */ Symbol.for("wpic-ui-popover-descendants"), L = f2(F, null), B = /* @__PURE__ */ new Set();
1172
- D1(F, {
1176
+ I1(F, {
1173
1177
  add(z) {
1174
1178
  B.add(z), L?.add(z);
1175
1179
  },
1176
1180
  remove(z) {
1177
1181
  B.delete(z), L?.remove(z);
1178
1182
  }
1179
- }), D1("wpic-pagination-url-sync", !1), C1(l, (z, G) => {
1183
+ }), I1("wpic-pagination-url-sync", !1), x1(l, (z, G) => {
1180
1184
  G && L?.remove(G), z && L?.add(z);
1181
1185
  });
1182
- let H = null, x = !1, k;
1186
+ let P = null, x = !1, k;
1183
1187
  const O = (z) => !!z.getClientRects().length && getComputedStyle(z).visibility !== "hidden";
1184
1188
  function c1() {
1185
1189
  return [l.value, ...B].filter((z) => !!z && O(z)).flatMap((z) => [...z.querySelectorAll('a[href],button:not(:disabled),input:not(:disabled),select:not(:disabled),textarea:not(:disabled),[tabindex="0"]')]).filter(O);
@@ -1219,21 +1223,21 @@ const Y5 = ["data-wpic-theme"], q5 = ["aria-label"], Q5 = { class: "wpic-bottom-
1219
1223
  if (!x) return;
1220
1224
  x = !1;
1221
1225
  const z = X1[X1.length - 1] === a;
1222
- X1.splice(X1.indexOf(a), 1), q2.delete(a), k?.(), k = void 0, document.removeEventListener("keydown", r1), document.removeEventListener("focusin", U), window.visualViewport?.removeEventListener("resize", E), window.visualViewport?.removeEventListener("scroll", E), z && H?.isConnected && H.focus({ preventScroll: !0 });
1226
+ X1.splice(X1.indexOf(a), 1), q2.delete(a), k?.(), k = void 0, document.removeEventListener("keydown", r1), document.removeEventListener("focusin", U), window.visualViewport?.removeEventListener("resize", E), window.visualViewport?.removeEventListener("scroll", E), z && P?.isConnected && P.focus({ preventScroll: !0 });
1223
1227
  }
1224
- return C1(() => c.modelValue, async (z) => {
1228
+ return x1(() => c.modelValue, async (z) => {
1225
1229
  if (!z) {
1226
1230
  Y();
1227
1231
  return;
1228
1232
  }
1229
- x || (x = !0, H = c.returnFocus ?? document.activeElement, k = F0(), b.value = Math.max(f.value, 9998, ...q2.values()) + 2, X1.push(a), q2.set(a, b.value), E(), document.addEventListener("keydown", r1), document.addEventListener("focusin", U), window.visualViewport?.addEventListener("resize", E), window.visualViewport?.addEventListener("scroll", E), await H1(), c.modelValue && l.value?.focus({ preventScroll: !0 }));
1230
- }, { immediate: !0 }), U1(() => {
1233
+ x || (x = !0, P = c.returnFocus ?? document.activeElement, k = H0(), b.value = Math.max(f.value, 9998, ...q2.values()) + 2, X1.push(a), q2.set(a, b.value), E(), document.addEventListener("keydown", r1), document.addEventListener("focusin", U), window.visualViewport?.addEventListener("resize", E), window.visualViewport?.addEventListener("scroll", E), await H1(), c.modelValue && l.value?.focus({ preventScroll: !0 }));
1234
+ }, { immediate: !0 }), O1(() => {
1231
1235
  l.value && L?.remove(l.value), Y();
1232
- }), (z, G) => (e(), Z(Z1, { to: "body" }, [
1236
+ }), (z, G) => (e(), Z(N1, { to: "body" }, [
1233
1237
  n.modelValue ? (e(), t("div", {
1234
1238
  key: 0,
1235
1239
  class: g(["wpic-bottom-sheet-overlay", { "wpic-theme": m(r), dark: m(r)?.mode === "dark" }]),
1236
- style: h1([m(r)?.variables, s.value, { zIndex: b.value }]),
1240
+ style: m1([m(r)?.variables, s.value, { zIndex: b.value }]),
1237
1241
  "data-wpic-theme": m(r)?.mode,
1238
1242
  onClick: b1(s1, ["self"])
1239
1243
  }, [
@@ -1250,7 +1254,7 @@ const Y5 = ["data-wpic-theme"], q5 = ["aria-label"], Q5 = { class: "wpic-bottom-
1250
1254
  class: "wpic-bottom-sheet-handle",
1251
1255
  "aria-hidden": "true"
1252
1256
  }, null, -1)),
1253
- i("header", Q5, [
1257
+ i("header", J5, [
1254
1258
  N(z.$slots, "header", {}, () => [
1255
1259
  i("h2", null, v(n.title), 1)
1256
1260
  ]),
@@ -1260,18 +1264,18 @@ const Y5 = ["data-wpic-theme"], q5 = ["aria-label"], Q5 = { class: "wpic-bottom-
1260
1264
  onClick: s1
1261
1265
  }, [
1262
1266
  $(m($1), { size: 20 })
1263
- ], 8, J5)
1267
+ ], 8, X5)
1264
1268
  ]),
1265
1269
  i("div", {
1266
1270
  class: g(["wpic-bottom-sheet-body", { "wpic-bottom-sheet-padded": !n.noPadding }])
1267
1271
  }, [
1268
1272
  N(z.$slots, "default")
1269
1273
  ], 2),
1270
- z.$slots.footer ? (e(), t("footer", X5, [
1274
+ z.$slots.footer ? (e(), t("footer", G5, [
1271
1275
  N(z.$slots, "footer")
1272
1276
  ])) : u("", !0)
1273
- ], 8, q5)
1274
- ], 14, Y5)) : u("", !0)
1277
+ ], 8, Q5)
1278
+ ], 14, q5)) : u("", !0)
1275
1279
  ]));
1276
1280
  }
1277
1281
  });
@@ -1279,9 +1283,9 @@ function c0() {
1279
1283
  const n = typeof window < "u" ? window.matchMedia("(max-width: 767px)") : null, d = T(n?.matches ?? !1), c = () => {
1280
1284
  d.value = n?.matches ?? !1;
1281
1285
  };
1282
- return n?.addEventListener("change", c), U1(() => n?.removeEventListener("change", c)), d;
1286
+ return n?.addEventListener("change", c), O1(() => n?.removeEventListener("change", c)), d;
1283
1287
  }
1284
- const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
1288
+ const _5 = ["data-wpic-theme"], U1 = /* @__PURE__ */ X({
1285
1289
  __name: "WPopover",
1286
1290
  props: {
1287
1291
  mobileSheet: { type: Boolean },
@@ -1309,9 +1313,9 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
1309
1313
  emits: ["close"],
1310
1314
  setup(n, { emit: d }) {
1311
1315
  const c = n, o = f2("wpic-overlay-layer", T(0)), r = M(() => Math.max(Number(c.zIndex) || 9999, o.value + 1));
1312
- D1("wpic-overlay-layer", r);
1316
+ I1("wpic-overlay-layer", r);
1313
1317
  const l = y2(), a = c0(), f = M(() => a.value && c.mobileSheet), b = d, V = /* @__PURE__ */ Symbol.for("wpic-ui-popover-descendants"), s = f2(V, null), F = /* @__PURE__ */ new Set();
1314
- D1(V, {
1318
+ I1(V, {
1315
1319
  add(j) {
1316
1320
  F.add(j), s?.add(j);
1317
1321
  },
@@ -1322,18 +1326,18 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
1322
1326
  const L = M(() => {
1323
1327
  const j = c.anchor;
1324
1328
  return j ? i3(j) ? j.value : j : null;
1325
- }), B = T(null), H = T(null), x = M(() => H.value ?? c.placement ?? "bottom-start"), k = M(() => {
1329
+ }), B = T(null), P = T(null), x = M(() => P.value ?? c.placement ?? "bottom-start"), k = M(() => {
1326
1330
  const j = [b2(c.offset ?? 6)];
1327
- return H.value || (c.autoPlacement ? j.push(E3({ alignment: "start" })) : c.flip && j.push(g2({ crossAxis: !c.shiftCrossAxis }))), j.push(z2({ padding: c.autoPlacement ? 8 : 4, crossAxis: c.autoPlacement || c.shiftCrossAxis })), j.push(
1331
+ return P.value || (c.autoPlacement ? j.push(E3({ alignment: "start" })) : c.flip && j.push(g2({ crossAxis: !c.shiftCrossAxis }))), j.push(z2({ padding: c.autoPlacement ? 8 : 4, crossAxis: c.autoPlacement || c.shiftCrossAxis })), j.push(
1328
1332
  n0({
1329
1333
  padding: 8,
1330
- apply({ availableHeight: e1, availableWidth: q, rects: x1, elements: z1 }) {
1334
+ apply({ availableHeight: e1, availableWidth: q, rects: M1, elements: k1 }) {
1331
1335
  const d1 = Math.max(e1 - 8, 50), J = c.maxHeight ? `min(${c.maxHeight}, ${d1}px)` : `${d1}px`, K = { maxWidth: `${Math.max(q, 0)}px`, maxHeight: J, overflowY: c.panelScroll ? "auto" : "hidden" };
1332
1336
  if (c.height && (K.height = `min(${c.height}, ${d1}px)`), c.minHeight && (K.minHeight = `min(${c.minHeight}, ${d1}px)`), c.matchAnchorWidth) {
1333
- const A = `${Math.min(x1.reference.width, Math.max(q, 0))}px`;
1334
- K.width = c.fitAnchorContent ? "max-content" : A, K.minWidth = A;
1337
+ const S = `${Math.min(M1.reference.width, Math.max(q, 0))}px`;
1338
+ K.width = c.fitAnchorContent ? "max-content" : S, K.minWidth = S;
1335
1339
  }
1336
- Object.assign(z1.floating.style, K);
1340
+ Object.assign(k1.floating.style, K);
1337
1341
  }
1338
1342
  })
1339
1343
  ), j;
@@ -1348,8 +1352,8 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
1348
1352
  return j.startsWith("top") ? "bottom" : j.startsWith("bottom") ? "top" : j.startsWith("left") ? "right" : j.startsWith("right") ? "left" : "top";
1349
1353
  }), U = (j) => {
1350
1354
  if (f.value) return;
1351
- const e1 = j.target, q = L.value, x1 = B.value;
1352
- x1 && x1.contains(e1) || [...F].some((z1) => z1.contains(e1)) || q && q.contains(e1) || c.extraPanels?.some((z1) => z1?.contains(e1)) || b("close");
1355
+ const e1 = j.target, q = L.value, M1 = B.value;
1356
+ M1 && M1.contains(e1) || [...F].some((k1) => k1.contains(e1)) || q && q.contains(e1) || c.extraPanels?.some((k1) => k1?.contains(e1)) || b("close");
1353
1357
  }, E = (j) => {
1354
1358
  if (f.value || j.key !== "Escape" || !c.open || [...F].some((q) => q.isConnected && q.style.display !== "none")) return;
1355
1359
  j.preventDefault(), j.stopImmediatePropagation(), b("close");
@@ -1363,18 +1367,18 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
1363
1367
  function p1() {
1364
1368
  z && (document.removeEventListener("pointerdown", U, !0), document.removeEventListener("keydown", E, !0), z = !1);
1365
1369
  }
1366
- C1(() => c.open, (j) => {
1370
+ x1(() => c.open, (j) => {
1367
1371
  j ? H1(() => {
1368
1372
  Y || !c.open || (c.autoPlacement && B.value && (B.value.style.maxHeight = ""), s1(), G());
1369
- }) : (H.value = null, p1());
1370
- }, { immediate: !0 }), C1(B, (j, e1) => {
1373
+ }) : (P.value = null, p1());
1374
+ }, { immediate: !0 }), x1(B, (j, e1) => {
1371
1375
  e1 && s?.remove(e1), j && s?.add(j);
1372
- }), C1(r1, (j) => {
1373
- j && c.open && c.freezePositionOnOpen && !H.value && (H.value = c1.value);
1374
- }), U1(() => {
1376
+ }), x1(r1, (j) => {
1377
+ j && c.open && c.freezePositionOnOpen && !P.value && (P.value = c1.value);
1378
+ }), O1(() => {
1375
1379
  Y = !0, p1(), B.value && s?.remove(B.value);
1376
1380
  });
1377
- const k1 = M(() => ({
1381
+ const y1 = M(() => ({
1378
1382
  // Omit width properties entirely when the size middleware owns them.
1379
1383
  // Binding `undefined` still makes Vue remove the middleware's inline style
1380
1384
  // during an autoUpdate render (notably while scrolling).
@@ -1383,7 +1387,7 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
1383
1387
  transformOrigin: n1.value,
1384
1388
  zIndex: r.value
1385
1389
  }));
1386
- return (j, e1) => f.value ? (e(), Z(H0, {
1390
+ return (j, e1) => f.value ? (e(), Z(P0, {
1387
1391
  key: 0,
1388
1392
  "return-focus": L.value,
1389
1393
  "model-value": n.open,
@@ -1396,7 +1400,7 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
1396
1400
  N(j.$slots, "default")
1397
1401
  ]),
1398
1402
  _: 3
1399
- }, 8, ["return-focus", "model-value", "title", "close-label"])) : (e(), Z(Z1, {
1403
+ }, 8, ["return-focus", "model-value", "title", "close-label"])) : (e(), Z(N1, {
1400
1404
  key: 1,
1401
1405
  to: "body",
1402
1406
  class: "wpic-popover"
@@ -1406,45 +1410,45 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
1406
1410
  ref: B,
1407
1411
  "data-wpic-theme": m(l)?.mode,
1408
1412
  class: g([{ "wpic-theme": m(l), dark: m(l)?.mode === "dark" }, "wpic-popover-panel wpic:flex wpic:flex-col wpic:bg-white wpic:dark:bg-zinc-900 wpic:border wpic:border-zinc-200 wpic:dark:border-zinc-800 wpic:rounded-xl wpic:shadow-xl wpic:dark:shadow-black/40 wpic:overflow-hidden"]),
1409
- style: h1([m(l)?.variables, m(O), k1.value])
1413
+ style: m1([m(l)?.variables, m(O), y1.value])
1410
1414
  }, [
1411
1415
  N(j.$slots, "default")
1412
- ], 14, G5), [
1416
+ ], 14, _5), [
1413
1417
  [l3, n.open]
1414
1418
  ])
1415
1419
  ]));
1416
1420
  }
1417
- }), _5 = {
1421
+ }), n4 = {
1418
1422
  key: 0,
1419
1423
  class: "wpic:fixed wpic:right-0 wpic:top-0 wpic:z-[9997] wpic:flex wpic:h-full wpic:w-20 wpic:items-center wpic:justify-center wpic:border-l-2 wpic:border-[var(--wpic-primary)] wpic:bg-[var(--wpic-primary)]/10 wpic:text-[var(--wpic-primary)] wpic:pointer-events-none"
1420
- }, n4 = ["data-variant", "data-maximized", "data-docked"], e4 = ["title"], c4 = { class: "wpic:min-w-0 wpic:flex-1 wpic:px-2 wpic:text-center" }, t4 = { class: "wpic:truncate wpic:font-medium wpic:text-zinc-700 wpic:dark:text-zinc-200" }, i4 = {
1424
+ }, e4 = ["data-variant", "data-maximized", "data-docked"], c4 = ["title"], t4 = { class: "wpic:min-w-0 wpic:flex-1 wpic:px-2 wpic:text-center" }, i4 = { class: "wpic:truncate wpic:font-medium wpic:text-zinc-700 wpic:dark:text-zinc-200" }, l4 = {
1421
1425
  key: 0,
1422
1426
  class: "wpic:truncate wpic:text-zinc-500 wpic:dark:text-zinc-400"
1423
- }, l4 = { class: "wpic:flex wpic:shrink-0 wpic:items-center wpic:gap-1" }, a4 = ["title"], o4 = ["title"], s4 = ["title"], r4 = ["title"], p4 = { class: "wpic:flex wpic:h-11 wpic:shrink-0 wpic:items-center wpic:justify-between wpic:px-3" }, d4 = { class: "wpic:font-medium wpic:text-zinc-700 wpic:dark:text-zinc-200" }, w4 = ["title"], u4 = { class: "wpic:space-y-2 wpic:px-3 wpic:pb-3" }, h4 = { class: "wpic:truncate" }, m4 = { class: "wpic:flex-1 wpic:overflow-y-auto wpic:overflow-x-visible wpic:px-2 wpic:pb-3" }, v4 = { class: "wpic:mb-2 wpic:flex wpic:h-7 wpic:items-center wpic:justify-between wpic:px-2 wpic:font-medium wpic:text-zinc-500 wpic:dark:text-zinc-400" }, f4 = { class: "wpic:truncate" }, b4 = ["title"], g4 = { class: "wpic:space-y-0.5" }, z4 = {
1427
+ }, a4 = { class: "wpic:flex wpic:shrink-0 wpic:items-center wpic:gap-1" }, o4 = ["title"], s4 = ["title"], r4 = ["title"], p4 = ["title"], d4 = { class: "wpic:flex wpic:h-11 wpic:shrink-0 wpic:items-center wpic:justify-between wpic:px-3" }, w4 = { class: "wpic:font-medium wpic:text-zinc-700 wpic:dark:text-zinc-200" }, u4 = ["title"], h4 = { class: "wpic:space-y-2 wpic:px-3 wpic:pb-3" }, m4 = { class: "wpic:truncate" }, v4 = { class: "wpic:flex-1 wpic:overflow-y-auto wpic:overflow-x-visible wpic:px-2 wpic:pb-3" }, f4 = { class: "wpic:mb-2 wpic:flex wpic:h-7 wpic:items-center wpic:justify-between wpic:px-2 wpic:font-medium wpic:text-zinc-500 wpic:dark:text-zinc-400" }, b4 = { class: "wpic:truncate" }, g4 = ["title"], z4 = { class: "wpic:space-y-0.5" }, C4 = {
1424
1428
  key: 0,
1425
1429
  class: "wpic:rounded-lg wpic:border wpic:border-dashed wpic:border-zinc-200 wpic:px-2 wpic:py-2 wpic:text-zinc-500 wpic:dark:border-zinc-700 wpic:dark:text-zinc-400"
1426
- }, C4 = ["onMouseenter"], k4 = ["onClick"], x4 = { class: "wpic:min-w-0 wpic:flex-1 wpic:truncate" }, y4 = {
1430
+ }, k4 = ["onMouseenter"], x4 = ["onClick"], y4 = { class: "wpic:min-w-0 wpic:flex-1 wpic:truncate" }, M4 = {
1427
1431
  key: 0,
1428
1432
  class: "wpic:shrink-0 wpic:text-zinc-400"
1429
- }, M4 = {
1433
+ }, L4 = {
1430
1434
  key: 0,
1431
1435
  class: "wpic:px-3 wpic:py-2 wpic:text-zinc-400 wpic:dark:text-zinc-500"
1432
- }, L4 = ["onPointerdown", "onClick"], V4 = { class: "wpic:min-w-0 wpic:flex-1 wpic:truncate" }, $4 = { class: "wpic:shrink-0 wpic:text-zinc-400" }, B4 = { class: "wpic:mt-4" }, S4 = { class: "wpic:flex wpic:h-7 wpic:items-center wpic:px-2 wpic:font-medium wpic:text-zinc-500 wpic:dark:text-zinc-400" }, A4 = { class: "wpic:truncate" }, F4 = { class: "wpic:space-y-0.5" }, H4 = {
1436
+ }, V4 = ["onPointerdown", "onClick"], $4 = { class: "wpic:min-w-0 wpic:flex-1 wpic:truncate" }, B4 = { class: "wpic:shrink-0 wpic:text-zinc-400" }, S4 = { class: "wpic:mt-4" }, A4 = { class: "wpic:flex wpic:h-7 wpic:items-center wpic:px-2 wpic:font-medium wpic:text-zinc-500 wpic:dark:text-zinc-400" }, F4 = { class: "wpic:truncate" }, H4 = { class: "wpic:space-y-0.5" }, P4 = {
1433
1437
  key: 0,
1434
1438
  class: "wpic:rounded-lg wpic:border wpic:border-dashed wpic:border-zinc-200 wpic:px-2 wpic:py-2 wpic:text-zinc-500 wpic:dark:border-zinc-700 wpic:dark:text-zinc-400"
1435
- }, P4 = ["onPointerdown", "onClick"], T4 = { class: "wpic:block wpic:truncate" }, j4 = { class: "wpic:shrink-0 wpic:text-zinc-400" }, E4 = ["onClick"], W4 = ["onPointerenter", "onMouseenter"], D4 = { class: "wpic:truncate" }, I4 = { class: "wpic:flex wpic:min-h-0 wpic:flex-1" }, R4 = { class: "wpic:flex wpic:min-h-0 wpic:min-w-0 wpic:flex-1 wpic:flex-col" }, Z4 = {
1439
+ }, T4 = ["onPointerdown", "onClick"], j4 = { class: "wpic:block wpic:truncate" }, E4 = { class: "wpic:shrink-0 wpic:text-zinc-400" }, W4 = ["onClick"], D4 = ["onPointerenter", "onMouseenter"], I4 = { class: "wpic:truncate" }, R4 = { class: "wpic:flex wpic:min-h-0 wpic:flex-1" }, Z4 = { class: "wpic:flex wpic:min-h-0 wpic:min-w-0 wpic:flex-1 wpic:flex-col" }, N4 = {
1436
1440
  key: 0,
1437
1441
  class: "wpic:flex wpic:h-full wpic:flex-col wpic:items-center wpic:justify-center wpic:px-5 wpic:text-center wpic:text-zinc-500 wpic:dark:text-zinc-400"
1438
- }, N4 = { class: "wpic:font-medium" }, K4 = {
1442
+ }, K4 = { class: "wpic:font-medium" }, U4 = {
1439
1443
  key: 1,
1440
1444
  class: "wpic:flex wpic:h-full wpic:flex-col wpic:items-center wpic:justify-center wpic:px-5 wpic:text-center"
1441
- }, U4 = { class: "wpic:mb-3 wpic:flex wpic:h-11 wpic:w-11 wpic:items-center wpic:justify-center wpic:rounded-xl wpic:bg-zinc-100 wpic:text-zinc-500 wpic:dark:bg-zinc-700 wpic:dark:text-zinc-300" }, O4 = { class: "wpic:font-semibold wpic:text-zinc-800 wpic:dark:text-zinc-100" }, Y4 = {
1445
+ }, O4 = { class: "wpic:mb-3 wpic:flex wpic:h-11 wpic:w-11 wpic:items-center wpic:justify-center wpic:rounded-xl wpic:bg-zinc-100 wpic:text-zinc-500 wpic:dark:bg-zinc-700 wpic:dark:text-zinc-300" }, Y4 = { class: "wpic:font-semibold wpic:text-zinc-800 wpic:dark:text-zinc-100" }, q4 = {
1442
1446
  key: 0,
1443
1447
  class: "wpic:mt-1 wpic:max-w-xs wpic:text-zinc-500 wpic:dark:text-zinc-400"
1444
- }, q4 = {
1448
+ }, Q4 = {
1445
1449
  key: 2,
1446
1450
  class: "wpic:space-y-4"
1447
- }, Q4 = { class: "wpic:max-w-[82%]" }, J4 = ["src", "alt"], X4 = { class: "wpic:max-w-40 wpic:truncate" }, G4 = {
1451
+ }, J4 = ["src", "alt"], X4 = { class: "wpic:max-w-40 wpic:truncate" }, G4 = {
1448
1452
  key: 0,
1449
1453
  class: "wpic:shrink-0 wpic:text-zinc-400"
1450
1454
  }, _4 = {
@@ -1470,7 +1474,7 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
1470
1474
  }, b6 = ["onMousedown"], g6 = { class: "wpic:min-w-0 wpic:truncate wpic:font-medium wpic:text-zinc-900 wpic:dark:text-zinc-100" }, z6 = {
1471
1475
  key: 0,
1472
1476
  class: "wpic:max-w-32 wpic:shrink-0 wpic:truncate wpic:text-xs wpic:text-zinc-500 wpic:dark:text-zinc-400"
1473
- }, C6 = ["accept"], k6 = ["value", "placeholder", "disabled"], x6 = { class: "wpic:flex wpic:items-center wpic:gap-1" }, y6 = ["title"], M6 = ["disabled", "title"], C0 = 80, L6 = /* @__PURE__ */ X({
1477
+ }, C6 = ["accept"], k6 = ["value", "placeholder", "disabled"], x6 = { class: "wpic:flex wpic:items-center wpic:gap-1" }, y6 = ["title"], M6 = ["disabled", "title"], k0 = 80, L6 = /* @__PURE__ */ X({
1474
1478
  __name: "WChatPanel",
1475
1479
  props: {
1476
1480
  open: { type: Boolean },
@@ -1541,21 +1545,21 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
1541
1545
  },
1542
1546
  emits: ["close", "send", "clear", "new", "new-project", "new-conversation", "select-project", "select-session", "rename-project", "rename-session", "delete-project", "delete-session", "move-session", "edit-message", "new-chat-from-message", "message-feedback", "apply-message-proposal", "navigate", "cancel", "attach", "files-selected", "remove-attachment", "update:modelValue", "update:docked", "update:maximized", "update:width", "update:height", "update:x", "update:y"],
1543
1547
  setup(n, { emit: d }) {
1544
- const c = n, o = d, r = X2(), l = T(null), a = T(null), f = T(null), b = T(null), V = T(null), s = T(0), F = T(0), L = T(!1), B = T(null), H = T(null);
1548
+ const c = n, o = d, r = X2(), l = T(null), a = T(null), f = T(null), b = T(null), V = T(null), s = T(0), F = T(0), L = T(!1), B = T(null), P = T(null);
1545
1549
  let x = null;
1546
1550
  const k = T(!1), O = T(!1), c1 = T(!1);
1547
1551
  T(/* @__PURE__ */ new Set());
1548
1552
  const s1 = T(null), r1 = T(null), n1 = T({}), U = T(null);
1549
1553
  let E = null;
1550
- const Y = M(() => U.value ? [] : c.messages.filter((p) => p.role !== "system")), z = M(() => c.loading || U.value !== null), G = M(() => c.modelValue.trim().length > 0 && !c.loading), p1 = M(() => c.attachments.length > 0), k1 = M(() => {
1554
+ const Y = M(() => U.value ? [] : c.messages.filter((p) => p.role !== "system")), z = M(() => c.loading || U.value !== null), G = M(() => c.modelValue.trim().length > 0 && !c.loading), p1 = M(() => c.attachments.length > 0), y1 = M(() => {
1551
1555
  const p = c.modelValue.slice(0, F.value), w = p.match(/(?:^|\s)@([^\s@]*)$/);
1552
1556
  return w ? { start: p.length - w[0].length + (w[0].startsWith(" ") ? 1 : 0), query: w[1].toLowerCase() } : null;
1553
1557
  }), j = M(() => {
1554
- const p = k1.value;
1558
+ const p = y1.value;
1555
1559
  if (!p) return [];
1556
1560
  const w = p.query;
1557
1561
  return c.mentionItems.filter((h) => h.label.toLowerCase().includes(w)).slice(0, 6);
1558
- }), e1 = M(() => c.showNavigator && L.value), q = M(() => c.selectedProjectId ?? null), x1 = M(() => c.sessions.filter((p) => !p.projectId)), z1 = M(() => {
1562
+ }), e1 = M(() => c.showNavigator && L.value), q = M(() => c.selectedProjectId ?? null), M1 = M(() => c.sessions.filter((p) => !p.projectId)), k1 = M(() => {
1559
1563
  const p = /* @__PURE__ */ new Map();
1560
1564
  for (const w of c.projects) p.set(w.id, []);
1561
1565
  for (const w of c.sessions) {
@@ -1586,59 +1590,59 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
1586
1590
  }
1587
1591
  }
1588
1592
  function K(p) {
1589
- const w = [], h = /* @__PURE__ */ new Set(), P = /\b(gpt[-\s]?image[-\s]?[12]|imagen\s*4|doubao\s+seedance\s+1\.5(?:\s+pro)?|seedance\s+1\.5(?:\s+pro)?|doubao\s+seedream\s+(?:5(?:\.0)?|4\.5|4)|seedream\s+(?:5(?:\.0)?|4\.5|4)|[a-z][a-z0-9_-]+:[a-z0-9._-]+|auto)\b/gi;
1590
- for (const y of p.matchAll(P)) {
1591
- const W = y[1], i1 = d1(W);
1592
- !i1 || h.has(i1) || (h.add(i1), w.push({ label: W, value: i1 }));
1593
+ const w = [], h = /* @__PURE__ */ new Set(), H = /\b(gpt[-\s]?image[-\s]?[12]|imagen\s*4|doubao\s+seedance\s+1\.5(?:\s+pro)?|seedance\s+1\.5(?:\s+pro)?|doubao\s+seedream\s+(?:5(?:\.0)?|4\.5|4)|seedream\s+(?:5(?:\.0)?|4\.5|4)|[a-z][a-z0-9_-]+:[a-z0-9._-]+|auto)\b/gi;
1594
+ for (const y of p.matchAll(H)) {
1595
+ const W = y[1], t1 = d1(W);
1596
+ !t1 || h.has(t1) || (h.add(t1), w.push({ label: W, value: t1 }));
1593
1597
  }
1594
1598
  return w;
1595
1599
  }
1596
- function A(p, w) {
1600
+ function S(p, w) {
1597
1601
  return p.match(new RegExp(`${w}=["']([^"']+)["']`, "i"))?.[1];
1598
1602
  }
1599
1603
  function _(p) {
1600
1604
  const w = {};
1601
- for (const P of p.matchAll(/\[SETTING\s+([^\]]+)\]([\s\S]*?)\[\/SETTING\]/gi)) {
1602
- const y = P[1] ?? "", W = A(y, "key"), i1 = A(y, "value") ?? P[2]?.trim();
1603
- if (!(!W || !i1))
1605
+ for (const H of p.matchAll(/\[SETTING\s+([^\]]+)\]([\s\S]*?)\[\/SETTING\]/gi)) {
1606
+ const y = H[1] ?? "", W = S(y, "key"), t1 = S(y, "value") ?? H[2]?.trim();
1607
+ if (!(!W || !t1))
1604
1608
  if (W === "duration" || W === "fps" || W === "count") {
1605
- const w1 = Number(i1);
1606
- Number.isFinite(w1) && (w[W] = w1);
1609
+ const h1 = Number(t1);
1610
+ Number.isFinite(h1) && (w[W] = h1);
1607
1611
  } else if (W === "model") {
1608
- const w1 = d1(i1) ?? d1(P[2]?.trim() ?? "");
1609
- w1 && (w.model = w1);
1610
- } else (W === "aspect" || W === "resolution" || W === "format") && (w[W] = i1);
1612
+ const h1 = d1(t1) ?? d1(H[2]?.trim() ?? "");
1613
+ h1 && (w.model = h1);
1614
+ } else (W === "aspect" || W === "resolution" || W === "format") && (w[W] = t1);
1611
1615
  }
1612
- const h = p.split(/\r?\n/).map((P) => P.replace(/^[\s>*-]+/, "").trim()).filter(Boolean);
1613
- for (const P of h) {
1614
- const y = P.toLowerCase();
1616
+ const h = p.split(/\r?\n/).map((H) => H.replace(/^[\s>*-]+/, "").trim()).filter(Boolean);
1617
+ for (const H of h) {
1618
+ const y = H.toLowerCase();
1615
1619
  if (/(supporte|supports?|disponible|available|dur[eé]es?\s*:|ratios?\s*:|jusqu['’]?à|up to)/i.test(y)) continue;
1616
- const W = P.split(":").slice(1).join(":").trim() || P, i1 = W.match(/\b(\d{1,2}:\d{1,2})\b/);
1617
- (y.includes("format") || y.includes("aspect") || y.includes("ratio")) && i1 && (w.aspect = i1[1]);
1618
- const w1 = W.match(/\b([1248]K)\b/i);
1619
- (y.includes("résolution") || y.includes("resolution")) && w1 && (w.resolution = w1[1].toUpperCase());
1620
- const f1 = W.match(/\b(\d{1,3})\s*(?:s|sec|secondes?|seconds?)\b/i);
1621
- (y.includes("durée") || y.includes("duration")) && f1 && (w.duration = Number(f1[1]));
1622
- const y1 = W.match(/\b(\d{1,3})\s*fps\b/i);
1623
- y.includes("fps") && y1 && (w.fps = Number(y1[1]));
1624
- const M1 = W.match(/\b(\d{1,2})\b/);
1625
- if ((y.includes("count") || y.includes("nombre") || y.includes("variantes")) && M1 && (w.count = Number(M1[1])), y.includes("modèle") || y.includes("modele") || y.includes("model")) {
1626
- const I1 = d1(W);
1627
- I1 && (w.model = I1);
1620
+ const W = H.split(":").slice(1).join(":").trim() || H, t1 = W.match(/\b(\d{1,2}:\d{1,2})\b/);
1621
+ (y.includes("format") || y.includes("aspect") || y.includes("ratio")) && t1 && (w.aspect = t1[1]);
1622
+ const h1 = W.match(/\b([1248]K)\b/i);
1623
+ (y.includes("résolution") || y.includes("resolution")) && h1 && (w.resolution = h1[1].toUpperCase());
1624
+ const u1 = W.match(/\b(\d{1,3})\s*(?:s|sec|secondes?|seconds?)\b/i);
1625
+ (y.includes("durée") || y.includes("duration")) && u1 && (w.duration = Number(u1[1]));
1626
+ const z1 = W.match(/\b(\d{1,3})\s*fps\b/i);
1627
+ y.includes("fps") && z1 && (w.fps = Number(z1[1]));
1628
+ const C1 = W.match(/\b(\d{1,2})\b/);
1629
+ if ((y.includes("count") || y.includes("nombre") || y.includes("variantes")) && C1 && (w.count = Number(C1[1])), y.includes("modèle") || y.includes("modele") || y.includes("model")) {
1630
+ const R1 = d1(W);
1631
+ R1 && (w.model = R1);
1628
1632
  }
1629
1633
  y.includes("jpg") || y.includes("jpeg") ? w.format = "jpg" : y.includes("png") ? w.format = "png" : y.includes("webp") && (w.format = "webp");
1630
1634
  }
1631
1635
  return Object.keys(w).length ? w : void 0;
1632
1636
  }
1633
- function m1(p) {
1637
+ function v1(p) {
1634
1638
  const w = p.match(/\[TASK(?:\s+([^\]]+))?\](?:([\s\S]*?)\[\/TASK\])?/i);
1635
1639
  if (w) {
1636
- const P = (A(w[1] ?? "", "value") ?? w[2]?.trim())?.toLowerCase();
1637
- if (["image", "video", "audio", "text"].includes(String(P))) return P;
1640
+ const H = (S(w[1] ?? "", "value") ?? w[2]?.trim())?.toLowerCase();
1641
+ if (["image", "video", "audio", "text"].includes(String(H))) return H;
1638
1642
  }
1639
- const h = p.split(/\r?\n/).map((P) => P.replace(/^[\s>*-]+/, "").trim()).filter(Boolean);
1640
- for (const P of h) {
1641
- const y = P.toLowerCase(), W = P.split(":").slice(1).join(":").trim().toLowerCase() || y;
1643
+ const h = p.split(/\r?\n/).map((H) => H.replace(/^[\s>*-]+/, "").trim()).filter(Boolean);
1644
+ for (const H of h) {
1645
+ const y = H.toLowerCase(), W = H.split(":").slice(1).join(":").trim().toLowerCase() || y;
1642
1646
  if (/(task|type|mode|surface|format|réglage|reglage|setting)/i.test(y)) {
1643
1647
  if (/\baudio\b|subtitles?|sous-titres?|transcri|tts|voice|voix/.test(W)) return "audio";
1644
1648
  if (/\bvid[eé]o\b|\bvideo\b|\bfps\b|duration|dur[eé]e/.test(W)) return "video";
@@ -1650,33 +1654,33 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
1650
1654
  function g1(p) {
1651
1655
  const w = p.match(/\[PROMPT\]([\s\S]*?)\[\/PROMPT\]/i)?.[1];
1652
1656
  if (w) {
1653
- const f1 = L1(w).trim().replace(/^["“]|["”]$/g, "");
1654
- if (f1) return f1;
1657
+ const u1 = L1(w).trim().replace(/^["“]|["”]$/g, "");
1658
+ if (u1) return u1;
1655
1659
  }
1656
1660
  const h = p.replace(/\r\n/g, `
1657
1661
  `).split(`
1658
- `), P = [];
1659
- let y = !1, W = !1, i1 = !1;
1660
- for (const f1 of h) {
1661
- const y1 = f1.trim().replace(/^[\s>*-]+/, "").replace(/^#{1,6}\s+/, "").replace(/^\*\*|\*\*$/g, "").trim();
1662
+ `), H = [];
1663
+ let y = !1, W = !1, t1 = !1;
1664
+ for (const u1 of h) {
1665
+ const z1 = u1.trim().replace(/^[\s>*-]+/, "").replace(/^#{1,6}\s+/, "").replace(/^\*\*|\*\*$/g, "").trim();
1662
1666
  if (W) {
1663
- if (/^```/.test(y1)) break;
1664
- P.push(f1);
1667
+ if (/^```/.test(z1)) break;
1668
+ H.push(u1);
1665
1669
  continue;
1666
1670
  }
1667
1671
  if (!y) {
1668
- const M1 = y1.match(/^(?:(?:voici|essayez|utilisez|use|try)\s+(?:ce\s+)?(?:prompt)|prompt\s+(?:modifi[eé]|am[eé]lior[eé]|propos[eé]|recommand[eé])|prompt)\s*:\s*(.*)$/i);
1669
- if (!M1) {
1670
- i1 ||= /\bprompt\b/i.test(y1), i1 && /^```/.test(y1) && (y = !0, W = !0);
1672
+ const C1 = z1.match(/^(?:(?:voici|essayez|utilisez|use|try)\s+(?:ce\s+)?(?:prompt)|prompt\s+(?:modifi[eé]|am[eé]lior[eé]|propos[eé]|recommand[eé])|prompt)\s*:\s*(.*)$/i);
1673
+ if (!C1) {
1674
+ t1 ||= /\bprompt\b/i.test(z1), t1 && /^```/.test(z1) && (y = !0, W = !0);
1671
1675
  continue;
1672
1676
  }
1673
- y = !0, M1[1]?.trim() && P.push(M1[1].trim());
1677
+ y = !0, C1[1]?.trim() && H.push(C1[1].trim());
1674
1678
  continue;
1675
1679
  }
1676
- if (/^(?:r[eé]glages?(?:\s+recommand[eé]s?)?|settings?|mod[eè]le|model)\s*:/i.test(y1)) break;
1677
- P.push(f1);
1680
+ if (/^(?:r[eé]glages?(?:\s+recommand[eé]s?)?|settings?|mod[eè]le|model)\s*:/i.test(z1)) break;
1681
+ H.push(u1);
1678
1682
  }
1679
- return L1(P.join(`
1683
+ return L1(H.join(`
1680
1684
  `)).trim().replace(/^["“]|["”]$/g, "") || void 0;
1681
1685
  }
1682
1686
  function B1(p) {
@@ -1689,16 +1693,16 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
1689
1693
  const w = p.match(/\[TASK(?:\s+([^\]]+))?\]([\s\S]*?)\[\/TASK\]/i), h = `${w?.[1] ?? ""} ${w?.[2] ?? ""}`.toLowerCase();
1690
1694
  return B1(p) && (/\bimage\b/.test(h) || !C(p));
1691
1695
  }
1692
- function S(p) {
1696
+ function A(p) {
1693
1697
  return /\[(?:TASK|PROMPT|SETTING)\b/i.test(p);
1694
1698
  }
1695
1699
  function a1(p) {
1696
- const w = (P) => Array.isArray(P) ? P.flatMap((y) => {
1700
+ const w = (H) => Array.isArray(H) ? H.flatMap((y) => {
1697
1701
  if (!y || typeof y != "object") return [];
1698
- const W = y, i1 = typeof W.url == "string" ? W.url : null;
1699
- return i1 ? [{
1702
+ const W = y, t1 = typeof W.url == "string" ? W.url : null;
1703
+ return t1 ? [{
1700
1704
  type: typeof W.type == "string" ? W.type : "image",
1701
- url: i1,
1705
+ url: t1,
1702
1706
  posterUrl: typeof W.posterUrl == "string" ? W.posterUrl : null,
1703
1707
  width: typeof W.width == "number" ? W.width : null,
1704
1708
  height: typeof W.height == "number" ? W.height : null,
@@ -1706,16 +1710,16 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
1706
1710
  href: typeof W.href == "string" ? W.href : null
1707
1711
  }] : [];
1708
1712
  }) : [], h = p.metadata?.generatedMedia;
1709
- return w(h).filter((P) => P.type === "image" || !P.type);
1713
+ return w(h).filter((H) => H.type === "image" || !H.type);
1710
1714
  }
1711
- function u1(p) {
1715
+ function w1(p) {
1712
1716
  const w = p.metadata?.attachments;
1713
- return Array.isArray(w) ? w.flatMap((h, P) => {
1717
+ return Array.isArray(w) ? w.flatMap((h, H) => {
1714
1718
  if (!h || typeof h != "object") return [];
1715
- const y = h, W = y.metadata && typeof y.metadata == "object" ? y.metadata : {}, i1 = typeof y.name == "string" && y.name.trim() ? y.name.trim() : `Attachment ${P + 1}`;
1719
+ const y = h, W = y.metadata && typeof y.metadata == "object" ? y.metadata : {}, t1 = typeof y.name == "string" && y.name.trim() ? y.name.trim() : `Attachment ${H + 1}`;
1716
1720
  return [{
1717
- id: typeof y.id == "string" ? y.id : `${p.id ?? "message"}-attachment-${P}`,
1718
- name: i1,
1721
+ id: typeof y.id == "string" ? y.id : `${p.id ?? "message"}-attachment-${H}`,
1722
+ name: t1,
1719
1723
  mimeType: typeof y.mimeType == "string" ? y.mimeType : null,
1720
1724
  bytes: typeof y.bytes == "number" ? y.bytes : null,
1721
1725
  status: "ready",
@@ -1728,15 +1732,15 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
1728
1732
  }) : [];
1729
1733
  }
1730
1734
  function R(p) {
1731
- const w = p.metadata && typeof p.metadata == "object" ? p.metadata : {}, h = p.mimeType ?? "", P = typeof w.kind == "string" ? w.kind : "", y = p.displayUrl ?? (typeof w.displayUrl == "string" ? w.displayUrl : null);
1732
- return !y || !h.startsWith("image/") && P !== "image" ? null : y;
1735
+ const w = p.metadata && typeof p.metadata == "object" ? p.metadata : {}, h = p.mimeType ?? "", H = typeof w.kind == "string" ? w.kind : "", y = p.displayUrl ?? (typeof w.displayUrl == "string" ? w.displayUrl : null);
1736
+ return !y || !h.startsWith("image/") && H !== "image" ? null : y;
1733
1737
  }
1734
1738
  function Q(p) {
1735
1739
  if (p.role !== "assistant" || !p.streaming) return !1;
1736
1740
  const w = p.content.trim();
1737
- return w === "Generating image..." || S(w);
1741
+ return w === "Generating image..." || A(w);
1738
1742
  }
1739
- function t1(p) {
1743
+ function i1(p) {
1740
1744
  return p.replace(/\[PROMPT\]([\s\S]*?)\[\/PROMPT\]/gi, "$1").replace(/\[SETTING\s+[^\]]*\]([\s\S]*?)\[\/SETTING\]/gi, "$1").replace(/\[TASK(?:\s+[^\]]*)?\]([\s\S]*?)\[\/TASK\]/gi, "").replace(/^\s*\[TASK(?:\s+[^\]]*)?\]\s*$/gim, "");
1741
1745
  }
1742
1746
  function L1(p) {
@@ -1748,8 +1752,8 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
1748
1752
  }
1749
1753
  function T1(p) {
1750
1754
  if (p.role !== "assistant" || p.streaming || p.error) return null;
1751
- const w = g1(p.content), h = _(p.content), P = m1(p.content);
1752
- return !w && !h && !P ? null : { prompt: w, taskType: P, settings: h };
1755
+ const w = g1(p.content), h = _(p.content), H = v1(p.content);
1756
+ return !w && !h && !H ? null : { prompt: w, taskType: H, settings: h };
1753
1757
  }
1754
1758
  const a2 = M(() => {
1755
1759
  if (c.maximized) {
@@ -1798,7 +1802,7 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
1798
1802
  function u2(p) {
1799
1803
  return p.authorLabel ? p.authorLabel : p.role === "user" ? "Vous" : "Webber";
1800
1804
  }
1801
- function P0(p, w) {
1805
+ function T0(p, w) {
1802
1806
  if (p.createdAt) {
1803
1807
  const h = t0(p.createdAt);
1804
1808
  return h || p.createdAt;
@@ -1809,34 +1813,34 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
1809
1813
  if (!p) return "";
1810
1814
  const w = new Date(p);
1811
1815
  if (Number.isNaN(w.getTime())) return p;
1812
- const h = /* @__PURE__ */ new Date(), P = w.toDateString() === h.toDateString();
1816
+ const h = /* @__PURE__ */ new Date(), H = w.toDateString() === h.toDateString();
1813
1817
  return new Intl.DateTimeFormat(
1814
1818
  void 0,
1815
- P ? { hour: "2-digit", minute: "2-digit" } : { month: "short", day: "numeric" }
1819
+ H ? { hour: "2-digit", minute: "2-digit" } : { month: "short", day: "numeric" }
1816
1820
  ).format(w);
1817
1821
  }
1818
1822
  function i0(p) {
1819
1823
  return t0(p.updatedAt) || p.subtitle || "";
1820
1824
  }
1821
- function O1(p) {
1825
+ function D1(p) {
1822
1826
  return p.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
1823
1827
  }
1824
1828
  function M2(p) {
1825
- return O1(p).replace(/`/g, "&#96;");
1829
+ return D1(p).replace(/`/g, "&#96;");
1826
1830
  }
1827
- function o2(p, w, h, P) {
1831
+ function o2(p, w, h, H) {
1828
1832
  const y = w === "all" ? c.applyAllLabel : w === "prompt" ? c.applyPromptLabel : c.applySettingLabel, W = [
1829
1833
  'type="button"',
1830
1834
  'class="wpic-chat-inline-action"',
1831
1835
  `title="${M2(y)}"`,
1832
1836
  `data-wpic-chat-action="${w}"`
1833
1837
  ];
1834
- return h && W.push(`data-wpic-chat-key="${M2(h)}"`), P !== void 0 && W.push(`data-wpic-chat-value="${M2(String(P))}"`), `<button ${W.join(" ")}>${O1(p)}</button>`;
1838
+ return h && W.push(`data-wpic-chat-key="${M2(h)}"`), H !== void 0 && W.push(`data-wpic-chat-value="${M2(String(H))}"`), `<button ${W.join(" ")}>${D1(p)}</button>`;
1835
1839
  }
1836
- function T0(p) {
1840
+ function j0(p) {
1837
1841
  return o2(c.applyPromptLabel, "prompt", "prompt", p);
1838
1842
  }
1839
- function j0(p) {
1843
+ function E0(p) {
1840
1844
  if (!p || typeof p != "object" || Array.isArray(p)) return !1;
1841
1845
  const w = p;
1842
1846
  return typeof w.prompt == "string" || ["image", "video", "text", "audio"].includes(String(w.taskType)) || !!(w.settings && typeof w.settings == "object");
@@ -1845,17 +1849,17 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
1845
1849
  const w = p.metadata?.actions;
1846
1850
  return Array.isArray(w) ? w.flatMap((h) => {
1847
1851
  if (!h || typeof h != "object" || Array.isArray(h)) return [];
1848
- const P = h, y = typeof P.id == "string" ? P.id : "", W = P.type, i1 = typeof P.label == "string" ? P.label : "", w1 = P.proposal;
1849
- return !y || !i1 || !j0(w1) ? [] : W !== "apply_prompt" && W !== "apply_setting" && W !== "apply_all" ? [] : [{
1852
+ const H = h, y = typeof H.id == "string" ? H.id : "", W = H.type, t1 = typeof H.label == "string" ? H.label : "", h1 = H.proposal;
1853
+ return !y || !t1 || !E0(h1) ? [] : W !== "apply_prompt" && W !== "apply_setting" && W !== "apply_all" ? [] : [{
1850
1854
  id: y,
1851
1855
  type: W,
1852
- label: i1,
1853
- exactText: typeof P.exactText == "string" ? P.exactText : void 0,
1854
- proposal: w1
1856
+ label: t1,
1857
+ exactText: typeof H.exactText == "string" ? H.exactText : void 0,
1858
+ proposal: h1
1855
1859
  }];
1856
1860
  }) : [];
1857
1861
  }
1858
- function E0(p, w) {
1862
+ function W0(p, w) {
1859
1863
  return I2(p).find((h) => h.id === w)?.proposal ?? null;
1860
1864
  }
1861
1865
  function l0(p, w = p.label) {
@@ -1865,60 +1869,60 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
1865
1869
  `title="${M2(w)}"`,
1866
1870
  'data-wpic-chat-action="metadata"',
1867
1871
  `data-wpic-chat-action-id="${M2(p.id)}"`
1868
- ].join(" ")}>${O1(w)}</button>`;
1872
+ ].join(" ")}>${D1(w)}</button>`;
1869
1873
  }
1870
- function W0(p) {
1874
+ function D0(p) {
1871
1875
  return /(supporte|supports?|disponible|available|dur[eé]es?\s*:|ratios?\s*:|jusqu['’]?à|up to)/i.test(p);
1872
1876
  }
1873
1877
  function a0(p) {
1874
1878
  return /(current settings|current model|currently|réglages? actuels?|paramètres? actuels?|mod[eè]le actuel)/i.test(p);
1875
1879
  }
1876
- function D0(p, w, h) {
1877
- let P = w;
1880
+ function I0(p, w, h) {
1881
+ let H = w;
1878
1882
  for (const y of I2(h)) {
1879
1883
  if (y.type === "apply_prompt" && B1(h.content)) continue;
1880
1884
  const W = y.exactText;
1881
1885
  if (!W || !p.includes(W)) continue;
1882
- const i1 = p.split(/\r?\n/).find((w1) => w1.includes(W)) ?? "";
1883
- W0(i1) || a0(i1) || (P = P.replace(O1(W), l0(y)));
1886
+ const t1 = p.split(/\r?\n/).find((h1) => h1.includes(W)) ?? "";
1887
+ D0(t1) || a0(t1) || (H = H.replace(D1(W), l0(y)));
1884
1888
  }
1885
- return P;
1889
+ return H;
1886
1890
  }
1887
- function I0(p, w, h) {
1888
- const P = D0(p, w, h);
1889
- if (P !== w) return P;
1891
+ function R0(p, w, h) {
1892
+ const H = I0(p, w, h);
1893
+ if (H !== w) return H;
1890
1894
  const y = T1(h), W = K(p);
1891
1895
  if (!y && !W.length) return w;
1892
- const i1 = /(?:prompt\s+(?:modifi[eé]|am[eé]lior[eé]|propos[eé])|prompt)\s*:/i;
1893
- if (y?.prompt && i1.test(p))
1896
+ const t1 = /(?:prompt\s+(?:modifi[eé]|am[eé]lior[eé]|propos[eé])|prompt)\s*:/i;
1897
+ if (y?.prompt && t1.test(p))
1894
1898
  return w.replace(/(:)/, `$1 ${o2(c.applyPromptLabel, "prompt")}`);
1895
- const w1 = p.toLowerCase();
1896
- let f1 = w;
1899
+ const h1 = p.toLowerCase();
1900
+ let u1 = w;
1897
1901
  if (!a0(p))
1898
- for (const M1 of W)
1899
- f1 = f1.replace(O1(M1.label), o2(M1.label, "setting", "model", M1.value));
1900
- if (!y?.settings) return f1;
1901
- const y1 = (M1, I1, e2) => {
1902
+ for (const C1 of W)
1903
+ u1 = u1.replace(D1(C1.label), o2(C1.label, "setting", "model", C1.value));
1904
+ if (!y?.settings) return u1;
1905
+ const z1 = (C1, R1, e2) => {
1902
1906
  if (e2 == null) return;
1903
- const q1 = p.match(M1);
1904
- q1?.[1] && (f1 = f1.replace(O1(q1[1]), o2(q1[1], "setting", I1, e2)));
1907
+ const q1 = p.match(C1);
1908
+ q1?.[1] && (u1 = u1.replace(D1(q1[1]), o2(q1[1], "setting", R1, e2)));
1905
1909
  };
1906
- if ((w1.includes("format") || w1.includes("aspect") || w1.includes("ratio")) && y1(/\b(\d{1,2}:\d{1,2})\b/, "aspect", y.settings.aspect), (w1.includes("résolution") || w1.includes("resolution")) && y1(/\b([1248]K)\b/i, "resolution", y.settings.resolution), (w1.includes("durée") || w1.includes("duration")) && y1(/\b(\d{1,3})\s*(?:s|sec|secondes?|seconds?)\b/i, "duration", y.settings.duration), w1.includes("fps") && y1(/\b(\d{1,3})\s*fps\b/i, "fps", y.settings.fps), y.settings.format) {
1907
- const M1 = p.match(/\b(jpe?g|png|webp)\b/i)?.[1];
1908
- M1 && (f1 = f1.replace(O1(M1), o2(M1, "setting", "format", y.settings.format)));
1910
+ if ((h1.includes("format") || h1.includes("aspect") || h1.includes("ratio")) && z1(/\b(\d{1,2}:\d{1,2})\b/, "aspect", y.settings.aspect), (h1.includes("résolution") || h1.includes("resolution")) && z1(/\b([1248]K)\b/i, "resolution", y.settings.resolution), (h1.includes("durée") || h1.includes("duration")) && z1(/\b(\d{1,3})\s*(?:s|sec|secondes?|seconds?)\b/i, "duration", y.settings.duration), h1.includes("fps") && z1(/\b(\d{1,3})\s*fps\b/i, "fps", y.settings.fps), y.settings.format) {
1911
+ const C1 = p.match(/\b(jpe?g|png|webp)\b/i)?.[1];
1912
+ C1 && (u1 = u1.replace(D1(C1), o2(C1, "setting", "format", y.settings.format)));
1909
1913
  }
1910
- return f1;
1914
+ return u1;
1911
1915
  }
1912
1916
  function L2(p, w) {
1913
- const h = t1(p);
1914
- let P = O1(h);
1915
- return w?.role === "assistant" && !w.streaming && !w.error && (P = I0(h, P, w)), P = P.replace(/`([^`]+)`/g, "<code>$1</code>").replace(/\*\*([^*]+)\*\*/g, "<strong>$1</strong>").replace(/__([^_]+)__/g, "<strong>$1</strong>").replace(/\*([^*]+)\*/g, "<em>$1</em>").replace(/_([^_]+)_/g, "<em>$1</em>").replace(/\[([^\]]+)\]\(((?:https?:\/\/|\/(?!\/))[^)\s]+)\)/g, (y, W, i1) => {
1916
- const f1 = /^https?:\/\//.test(i1) ? ' target="_blank" rel="noopener noreferrer"' : "";
1917
- return `<a href="${i1}"${f1}>${W}</a>`;
1918
- }).replace(/\b([A-ZÀ-ÖØ-Þ][\p{L}\p{N} _-]{1,40})\s+\(((?:\/(?!\/)[A-Za-z0-9._~:/?#[\]@!$&'*+,;=%-]+))\)/gu, (y, W, i1) => `<a href="${i1}">${W.trim()}</a>`).replace(/(^|[\s(])((?:\/(?!\/)[A-Za-z0-9._~:/?#[\]@!$&'*+,;=%-]+))/g, (y, W, i1) => y.includes("<a ") ? y : `${W}<a href="${i1}">${i1}</a>`), P;
1917
+ const h = i1(p);
1918
+ let H = D1(h);
1919
+ return w?.role === "assistant" && !w.streaming && !w.error && (H = R0(h, H, w)), H = H.replace(/`([^`]+)`/g, "<code>$1</code>").replace(/\*\*([^*]+)\*\*/g, "<strong>$1</strong>").replace(/__([^_]+)__/g, "<strong>$1</strong>").replace(/\*([^*]+)\*/g, "<em>$1</em>").replace(/_([^_]+)_/g, "<em>$1</em>").replace(/\[([^\]]+)\]\(((?:https?:\/\/|\/(?!\/))[^)\s]+)\)/g, (y, W, t1) => {
1920
+ const u1 = /^https?:\/\//.test(t1) ? ' target="_blank" rel="noopener noreferrer"' : "";
1921
+ return `<a href="${t1}"${u1}>${W}</a>`;
1922
+ }).replace(/\b([A-ZÀ-ÖØ-Þ][\p{L}\p{N} _-]{1,40})\s+\(((?:\/(?!\/)[A-Za-z0-9._~:/?#[\]@!$&'*+,;=%-]+))\)/gu, (y, W, t1) => `<a href="${t1}">${W.trim()}</a>`).replace(/(^|[\s(])((?:\/(?!\/)[A-Za-z0-9._~:/?#[\]@!$&'*+,;=%-]+))/g, (y, W, t1) => y.includes("<a ") ? y : `${W}<a href="${t1}">${t1}</a>`), H;
1919
1923
  }
1920
- function R0(p) {
1921
- if (p.role === "assistant" && p.streaming && S(p.content))
1924
+ function Z0(p) {
1925
+ if (p.role === "assistant" && p.streaming && A(p.content))
1922
1926
  return "<p>Preparing image...</p>";
1923
1927
  const w = [], h = p.content.replace(/\[PROMPT\]([\s\S]*?)\[\/PROMPT\]/gi, (V1, P1) => {
1924
1928
  const F1 = L1(P1).trim();
@@ -1927,71 +1931,71 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
1927
1931
  return `${P1}
1928
1932
 
1929
1933
  [[WPIC_CHAT_APPLY_PROMPT_${P2}]]`;
1930
- }), P = t1(h).replace(/\r\n/g, `
1934
+ }), H = i1(h).replace(/\r\n/g, `
1931
1935
  `).split(`
1932
1936
  `), y = [];
1933
- let W = !1, i1 = [], w1 = !1, f1 = !1;
1934
- const y1 = () => {
1935
- w1 && (y.push("</ul>"), w1 = !1);
1936
- }, M1 = () => {
1937
- f1 && (y.push("</tbody></table></div>"), f1 = !1);
1938
- }, I1 = () => {
1939
- W && (y.push(`<pre><code>${O1(i1.join(`
1940
- `))}</code></pre>`), i1 = [], W = !1);
1937
+ let W = !1, t1 = [], h1 = !1, u1 = !1;
1938
+ const z1 = () => {
1939
+ h1 && (y.push("</ul>"), h1 = !1);
1940
+ }, C1 = () => {
1941
+ u1 && (y.push("</tbody></table></div></div>"), u1 = !1);
1942
+ }, R1 = () => {
1943
+ W && (y.push(`<pre><code>${D1(t1.join(`
1944
+ `))}</code></pre>`), t1 = [], W = !1);
1941
1945
  }, e2 = (V1) => {
1942
1946
  const P1 = V1.trim().replace(/^\|/, "").replace(/\|$/, "").split("|").map((F1) => F1.trim());
1943
1947
  return P1.length > 1 && P1.every((F1) => /^:?-{3,}:?$/.test(F1));
1944
1948
  }, q1 = (V1) => V1.trim().replace(/^\|/, "").replace(/\|$/, "").split("|").map((P1) => P1.trim());
1945
- for (let V1 = 0; V1 < P.length; V1 += 1) {
1946
- const P1 = P[V1];
1949
+ for (let V1 = 0; V1 < H.length; V1 += 1) {
1950
+ const P1 = H[V1];
1947
1951
  if (P1.trim().startsWith("```")) {
1948
- W ? I1() : (M1(), y1(), W = !0, i1 = []);
1952
+ W ? R1() : (C1(), z1(), W = !0, t1 = []);
1949
1953
  continue;
1950
1954
  }
1951
1955
  if (W) {
1952
- i1.push(P1);
1956
+ t1.push(P1);
1953
1957
  continue;
1954
1958
  }
1955
1959
  const F1 = P1.trim(), P2 = F1.match(/^\[\[WPIC_CHAT_APPLY_PROMPT_(\d+)\]\]$/);
1956
1960
  if (P2) {
1957
- M1(), y1();
1961
+ C1(), z1();
1958
1962
  const J1 = w[Number(P2[1])];
1959
- J1 && y.push(`<p class="wpic-chat-actions-end">${T0(J1)}</p>`);
1963
+ J1 && y.push(`<p class="wpic-chat-actions-end">${j0(J1)}</p>`);
1960
1964
  continue;
1961
1965
  }
1962
1966
  if (!F1) {
1963
- M1(), y1();
1967
+ C1(), z1();
1964
1968
  continue;
1965
1969
  }
1966
- if (!f1 && F1.includes("|") && P[V1 + 1] && e2(P[V1 + 1])) {
1967
- y1();
1970
+ if (!u1 && F1.includes("|") && H[V1 + 1] && e2(H[V1 + 1])) {
1971
+ z1();
1968
1972
  const J1 = q1(F1);
1969
- y.push('<div class="wpic-chat-table-wrap"><table><thead><tr>'), y.push(J1.map((Y2) => `<th>${L2(Y2, p)}</th>`).join("")), y.push("</tr></thead><tbody>"), f1 = !0, V1 += 1;
1973
+ y.push(`<div class="wpic-chat-table-block"><button type="button" class="wpic-chat-table-copy" data-wpic-chat-copy-table aria-label="${D1(c.copyLabel)}" title="${D1(c.copyLabel)}"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></svg></button><div class="wpic-chat-table-wrap"><table><thead><tr>`), y.push(J1.map((Y2) => `<th>${L2(Y2, p)}</th>`).join("")), y.push("</tr></thead><tbody>"), u1 = !0, V1 += 1;
1970
1974
  continue;
1971
1975
  }
1972
- if (f1) {
1976
+ if (u1) {
1973
1977
  if (F1.includes("|")) {
1974
1978
  const J1 = q1(F1);
1975
1979
  y.push("<tr>"), y.push(J1.map((Y2) => `<td>${L2(Y2, p)}</td>`).join("")), y.push("</tr>");
1976
1980
  continue;
1977
1981
  }
1978
- M1();
1982
+ C1();
1979
1983
  }
1980
1984
  const O2 = /^(#{1,3})\s+(.+)$/.exec(F1);
1981
1985
  if (O2) {
1982
- M1(), y1();
1986
+ C1(), z1();
1983
1987
  const J1 = O2[1].length + 2;
1984
1988
  y.push(`<h${J1}>${L2(O2[2], p)}</h${J1}>`);
1985
1989
  continue;
1986
1990
  }
1987
- const m0 = /^[-*]\s+(.+)$/.exec(F1);
1988
- if (m0) {
1989
- M1(), w1 || (y.push("<ul>"), w1 = !0), y.push(`<li>${L2(m0[1], p)}</li>`);
1991
+ const v0 = /^[-*]\s+(.+)$/.exec(F1);
1992
+ if (v0) {
1993
+ C1(), h1 || (y.push("<ul>"), h1 = !0), y.push(`<li>${L2(v0[1], p)}</li>`);
1990
1994
  continue;
1991
1995
  }
1992
- M1(), y1(), y.push(`<p>${L2(F1, p)}</p>`);
1996
+ C1(), z1(), y.push(`<p>${L2(F1, p)}</p>`);
1993
1997
  }
1994
- I1(), M1(), y1();
1998
+ R1(), C1(), z1();
1995
1999
  const r2 = I2(p).find((V1) => V1.type === "apply_all" && !V1.exactText), Q1 = T1(p);
1996
2000
  if (!(p.role === "assistant" && D(p.content))) {
1997
2001
  if (r2)
@@ -2003,18 +2007,18 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
2003
2007
  }
2004
2008
  return y.join("");
2005
2009
  }
2006
- function Z0(p, w) {
2007
- x && window.clearTimeout(x), B.value = p, H.value = w.currentTarget;
2010
+ function N0(p, w) {
2011
+ x && window.clearTimeout(x), B.value = p, P.value = w.currentTarget;
2008
2012
  }
2009
- function N0() {
2013
+ function K0() {
2010
2014
  x && window.clearTimeout(x);
2011
2015
  }
2012
2016
  function R2() {
2013
2017
  x && window.clearTimeout(x), x = window.setTimeout(() => {
2014
- B.value = null, H.value = null;
2018
+ B.value = null, P.value = null;
2015
2019
  }, 140);
2016
2020
  }
2017
- function K0(p) {
2021
+ function U0(p) {
2018
2022
  s1.value = s1.value === p ? null : p, r1.value = null;
2019
2023
  }
2020
2024
  function h2() {
@@ -2024,11 +2028,11 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
2024
2028
  h2();
2025
2029
  const h = w.currentTarget instanceof HTMLElement ? w.currentTarget : null;
2026
2030
  if (h) {
2027
- const P = h.getBoundingClientRect(), y = 192, W = 4, i1 = P.right + W + y <= window.innerWidth - 8;
2031
+ const H = h.getBoundingClientRect(), y = 192, W = 4, t1 = H.right + W + y <= window.innerWidth - 8;
2028
2032
  n1.value = {
2029
2033
  position: "fixed",
2030
- top: `${Math.max(8, Math.min(P.top, window.innerHeight - 240))}px`,
2031
- left: `${i1 ? P.right + W : Math.max(8, P.left - y - W)}px`,
2034
+ top: `${Math.max(8, Math.min(H.top, window.innerHeight - 240))}px`,
2035
+ left: `${t1 ? H.right + W : Math.max(8, H.left - y - W)}px`,
2032
2036
  zIndex: 1e4
2033
2037
  };
2034
2038
  }
@@ -2057,51 +2061,65 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
2057
2061
  function d0(p) {
2058
2062
  Z2(p), o("select-session", p), L.value = !1, s2(), H1(() => a.value?.focus());
2059
2063
  }
2060
- function U0(p) {
2064
+ function O0(p) {
2061
2065
  o("delete-session", p), s2();
2062
2066
  }
2063
- function O0(p) {
2067
+ function Y0(p) {
2064
2068
  o("update:modelValue", p.content), o("edit-message", p), H1(() => a.value?.focus());
2065
2069
  }
2066
2070
  function A2(p, w) {
2067
2071
  o("apply-message-proposal", p, w);
2068
2072
  }
2069
- function Y0(p, w) {
2070
- const h = w.target instanceof Element ? w.target.closest("[data-wpic-chat-action]") : null;
2073
+ function q0(p, w) {
2074
+ const h = w.target instanceof Element ? w.target.closest("[data-wpic-chat-copy-table]") : null;
2071
2075
  if (h) {
2076
+ const t1 = h.closest(".wpic-chat-table-block")?.querySelector("table");
2077
+ if (t1) {
2078
+ const h1 = Array.from(t1.rows, (u1) => Array.from(u1.cells, (z1) => z1.textContent?.trim() ?? "").join(" ")).join(`
2079
+ `);
2080
+ u0(h1, "table").then(() => {
2081
+ h.setAttribute("aria-label", c.copiedLabel), h.title = c.copiedLabel, window.setTimeout(() => {
2082
+ h.setAttribute("aria-label", c.copyLabel), h.title = c.copyLabel;
2083
+ }, 1500);
2084
+ });
2085
+ }
2086
+ return;
2087
+ }
2088
+ const H = w.target instanceof Element ? w.target.closest("[data-wpic-chat-action]") : null;
2089
+ if (H) {
2072
2090
  w.preventDefault(), w.stopPropagation();
2073
- const W = h.dataset.wpicChatAction, i1 = T1(p);
2074
- if (W === "metadata") {
2075
- const w1 = h.dataset.wpicChatActionId, f1 = w1 ? E0(p, w1) : null;
2076
- f1 && A2(p, f1);
2091
+ const t1 = H.dataset.wpicChatAction, h1 = T1(p);
2092
+ if (t1 === "metadata") {
2093
+ const u1 = H.dataset.wpicChatActionId, z1 = u1 ? W0(p, u1) : null;
2094
+ z1 && A2(p, z1);
2077
2095
  return;
2078
2096
  }
2079
- if (W === "prompt") {
2080
- const w1 = h.dataset.wpicChatValue || i1?.prompt;
2081
- w1 && A2(p, { prompt: w1 });
2097
+ if (t1 === "prompt") {
2098
+ const u1 = H.dataset.wpicChatValue || h1?.prompt;
2099
+ u1 && A2(p, { prompt: u1 });
2082
2100
  return;
2083
2101
  }
2084
- if (W === "all" && i1) {
2085
- A2(p, i1);
2102
+ if (t1 === "all" && h1) {
2103
+ A2(p, h1);
2086
2104
  return;
2087
2105
  }
2088
- if (W === "setting") {
2089
- const w1 = h.dataset.wpicChatKey, f1 = h.dataset.wpicChatValue;
2090
- if (!w1 || f1 === void 0) return;
2091
- const y1 = ["duration", "fps", "count"].includes(w1) ? Number(f1) : f1;
2106
+ if (t1 === "setting") {
2107
+ const u1 = H.dataset.wpicChatKey, z1 = H.dataset.wpicChatValue;
2108
+ if (!u1 || z1 === void 0) return;
2109
+ const C1 = ["duration", "fps", "count"].includes(u1) ? Number(z1) : z1;
2092
2110
  A2(p, {
2093
- ...w1 === "model" && typeof y1 == "string" ? { taskType: J(y1) } : {},
2094
- settings: { [w1]: y1 }
2111
+ ...u1 === "model" && typeof C1 == "string" ? { taskType: J(C1) } : {},
2112
+ settings: { [u1]: C1 }
2095
2113
  });
2096
2114
  }
2097
2115
  return;
2098
2116
  }
2099
- const P = w.target instanceof Element ? w.target.closest("a[href]") : null;
2100
- if (!P) return;
2101
- const y = P.getAttribute("href") ?? "";
2102
- !y.startsWith("/") || y.startsWith("//") || (w.preventDefault(), w.stopPropagation(), o("navigate", y));
2117
+ const y = w.target instanceof Element ? w.target.closest("a[href]") : null;
2118
+ if (!y) return;
2119
+ const W = y.getAttribute("href") ?? "";
2120
+ !W.startsWith("/") || W.startsWith("//") || (w.preventDefault(), w.stopPropagation(), o("navigate", W));
2103
2121
  }
2104
- function q0(p, w) {
2122
+ function Q0(p, w) {
2105
2123
  !w.startsWith("/") || w.startsWith("//") || (p.preventDefault(), p.stopPropagation(), o("navigate", w));
2106
2124
  }
2107
2125
  function N2() {
@@ -2112,9 +2130,9 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
2112
2130
  F.value = a.value?.selectionStart ?? c.modelValue.length;
2113
2131
  }
2114
2132
  function w0(p) {
2115
- const w = k1.value;
2133
+ const w = y1.value;
2116
2134
  if (!w) return;
2117
- const h = c.modelValue.slice(0, w.start), P = c.modelValue.slice(F.value), y = `${h}@${p.label} ${P.replace(/^\s+/, "")}`;
2135
+ const h = c.modelValue.slice(0, w.start), H = c.modelValue.slice(F.value), y = `${h}@${p.label} ${H.replace(/^\s+/, "")}`;
2118
2136
  o("update:modelValue", y), s.value = 0, H1(() => {
2119
2137
  const W = `${h}@${p.label} `.length;
2120
2138
  a.value?.focus(), a.value?.setSelectionRange(W, W), F2(), V2();
@@ -2129,10 +2147,10 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
2129
2147
  p.style.height = `${Math.min(p.scrollHeight, h)}px`;
2130
2148
  });
2131
2149
  }
2132
- function Q0(p) {
2150
+ function J0(p) {
2133
2151
  o("update:modelValue", p.target.value), F2(), s.value = 0, V2();
2134
2152
  }
2135
- function J0() {
2153
+ function X0() {
2136
2154
  if (!c.loading) {
2137
2155
  if (c.customAttachmentPicker) {
2138
2156
  o("attach");
@@ -2141,14 +2159,14 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
2141
2159
  f.value?.click();
2142
2160
  }
2143
2161
  }
2144
- function X0(p) {
2162
+ function G0(p) {
2145
2163
  const w = p.target, h = Array.from(w.files ?? []);
2146
2164
  w.value = "", h.length && o("files-selected", h);
2147
2165
  }
2148
2166
  function H2(p) {
2149
2167
  return p ? p < 1024 ? `${p} B` : p < 1024 * 1024 ? `${Math.round(p / 1024)} KB` : `${(p / (1024 * 1024)).toFixed(1)} MB` : "";
2150
2168
  }
2151
- function G0(p) {
2169
+ function _0(p) {
2152
2170
  if (j.value.length) {
2153
2171
  if (p.key === "ArrowDown") {
2154
2172
  p.preventDefault(), s.value = (s.value + 1) % j.value.length;
@@ -2169,23 +2187,23 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
2169
2187
  }
2170
2188
  p.key !== "Enter" || p.shiftKey || p.metaKey || p.ctrlKey || p.altKey || (p.preventDefault(), N2());
2171
2189
  }
2172
- async function _0(p, w) {
2190
+ async function u0(p, w) {
2173
2191
  try {
2174
- navigator.clipboard?.writeText ? await navigator.clipboard.writeText(p) : u0(p);
2192
+ navigator.clipboard?.writeText ? await navigator.clipboard.writeText(p) : h0(p);
2175
2193
  } catch {
2176
- u0(p);
2194
+ h0(p);
2177
2195
  }
2178
2196
  V.value = w, window.setTimeout(() => {
2179
2197
  V.value === w && (V.value = null);
2180
2198
  }, 1500);
2181
2199
  }
2182
- function u0(p) {
2200
+ function h0(p) {
2183
2201
  const w = document.createElement("textarea");
2184
2202
  w.value = p, w.setAttribute("readonly", ""), w.style.position = "fixed", w.style.left = "-9999px", w.style.top = "0", document.body.appendChild(w), w.select(), document.execCommand("copy"), document.body.removeChild(w);
2185
2203
  }
2186
2204
  let K2 = 0, U2 = 0;
2187
2205
  function n3(p, w = c.width) {
2188
- return p + w > window.innerWidth - C0;
2206
+ return p + w > window.innerWidth - k0;
2189
2207
  }
2190
2208
  function e3() {
2191
2209
  return Math.max(c.minHeight, Math.min(c.height, window.innerHeight - c.topOffset - 96));
@@ -2197,58 +2215,58 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
2197
2215
  if (!w) return;
2198
2216
  K2 = p.clientX - w.left, U2 = p.clientY - w.top;
2199
2217
  let h = !1;
2200
- const P = (W) => {
2201
- const i1 = Math.max(0, Math.min(window.innerWidth - c.width, W.clientX - K2)), w1 = Math.max(c.topOffset, Math.min(window.innerHeight - c.height - 16, W.clientY - U2));
2202
- o("update:x", i1), o("update:y", w1), h = n3(i1), c1.value = h;
2218
+ const H = (W) => {
2219
+ const t1 = Math.max(0, Math.min(window.innerWidth - c.width, W.clientX - K2)), h1 = Math.max(c.topOffset, Math.min(window.innerHeight - c.height - 16, W.clientY - U2));
2220
+ o("update:x", t1), o("update:y", h1), h = n3(t1), c1.value = h;
2203
2221
  }, y = () => {
2204
- k.value = !1, h && (o("update:docked", !0), o("update:width", Math.max(c.minWidth, Math.min(c.width, window.innerWidth)))), c1.value = !1, document.removeEventListener("mousemove", P), document.removeEventListener("mouseup", y);
2222
+ k.value = !1, h && (o("update:docked", !0), o("update:width", Math.max(c.minWidth, Math.min(c.width, window.innerWidth)))), c1.value = !1, document.removeEventListener("mousemove", H), document.removeEventListener("mouseup", y);
2205
2223
  };
2206
2224
  if (c.docked) {
2207
- const W = (w1) => {
2208
- if (w1.clientX >= window.innerWidth - C0) return;
2225
+ const W = (h1) => {
2226
+ if (h1.clientX >= window.innerWidth - k0) return;
2209
2227
  o("update:docked", !1), k.value = !0;
2210
- const f1 = e3(), y1 = Math.max(0, Math.min(window.innerWidth - c.width, w1.clientX - K2)), M1 = Math.max(c.topOffset, Math.min(window.innerHeight - f1 - 16, w1.clientY - U2));
2211
- o("update:x", y1), o("update:y", M1), o("update:height", f1), document.removeEventListener("mousemove", W), document.removeEventListener("mouseup", i1), document.addEventListener("mousemove", P), document.addEventListener("mouseup", y);
2212
- }, i1 = () => {
2213
- document.removeEventListener("mousemove", W), document.removeEventListener("mouseup", i1);
2228
+ const u1 = e3(), z1 = Math.max(0, Math.min(window.innerWidth - c.width, h1.clientX - K2)), C1 = Math.max(c.topOffset, Math.min(window.innerHeight - u1 - 16, h1.clientY - U2));
2229
+ o("update:x", z1), o("update:y", C1), o("update:height", u1), document.removeEventListener("mousemove", W), document.removeEventListener("mouseup", t1), document.addEventListener("mousemove", H), document.addEventListener("mouseup", y);
2230
+ }, t1 = () => {
2231
+ document.removeEventListener("mousemove", W), document.removeEventListener("mouseup", t1);
2214
2232
  };
2215
- document.addEventListener("mousemove", W), document.addEventListener("mouseup", i1);
2233
+ document.addEventListener("mousemove", W), document.addEventListener("mouseup", t1);
2216
2234
  return;
2217
2235
  }
2218
- k.value = !0, o("update:x", w.left), o("update:y", w.top), document.addEventListener("mousemove", P), document.addEventListener("mouseup", y);
2236
+ k.value = !0, o("update:x", w.left), o("update:y", w.top), document.addEventListener("mousemove", H), document.addEventListener("mouseup", y);
2219
2237
  }
2220
2238
  function Y1(p, w) {
2221
2239
  p.preventDefault(), p.stopPropagation();
2222
2240
  const h = b.value?.getBoundingClientRect();
2223
2241
  if (!h) return;
2224
2242
  O.value = !0;
2225
- const P = p.clientX, y = p.clientY, W = h.width, i1 = h.height, w1 = h.left, f1 = h.top, y1 = (I1) => {
2226
- const e2 = I1.clientX - P, q1 = I1.clientY - y;
2227
- let r2 = W, Q1 = i1, V1 = w1, P1 = f1;
2228
- w.includes("e") && (r2 = Math.max(c.minWidth, W + e2)), w.includes("s") && (Q1 = Math.max(c.minHeight, i1 + q1)), w.includes("w") && (r2 = Math.max(c.minWidth, W - e2), V1 = w1 + (W - r2)), w.includes("n") && (Q1 = Math.max(c.minHeight, i1 - q1), P1 = Math.max(c.topOffset, f1 + (i1 - Q1))), o("update:width", Math.min(r2, window.innerWidth)), o("update:height", Math.min(Q1, window.innerHeight - c.topOffset)), c.docked || (o("update:x", Math.max(0, V1)), o("update:y", Math.max(c.topOffset, P1)));
2229
- }, M1 = () => {
2230
- O.value = !1, document.removeEventListener("mousemove", y1), document.removeEventListener("mouseup", M1);
2243
+ const H = p.clientX, y = p.clientY, W = h.width, t1 = h.height, h1 = h.left, u1 = h.top, z1 = (R1) => {
2244
+ const e2 = R1.clientX - H, q1 = R1.clientY - y;
2245
+ let r2 = W, Q1 = t1, V1 = h1, P1 = u1;
2246
+ w.includes("e") && (r2 = Math.max(c.minWidth, W + e2)), w.includes("s") && (Q1 = Math.max(c.minHeight, t1 + q1)), w.includes("w") && (r2 = Math.max(c.minWidth, W - e2), V1 = h1 + (W - r2)), w.includes("n") && (Q1 = Math.max(c.minHeight, t1 - q1), P1 = Math.max(c.topOffset, u1 + (t1 - Q1))), o("update:width", Math.min(r2, window.innerWidth)), o("update:height", Math.min(Q1, window.innerHeight - c.topOffset)), c.docked || (o("update:x", Math.max(0, V1)), o("update:y", Math.max(c.topOffset, P1)));
2247
+ }, C1 = () => {
2248
+ O.value = !1, document.removeEventListener("mousemove", z1), document.removeEventListener("mouseup", C1);
2231
2249
  };
2232
- document.addEventListener("mousemove", y1), document.addEventListener("mouseup", M1);
2250
+ document.addEventListener("mousemove", z1), document.addEventListener("mouseup", C1);
2233
2251
  }
2234
- function h0() {
2252
+ function m0() {
2235
2253
  H1(() => {
2236
2254
  const p = l.value;
2237
2255
  p && (p.scrollTop = p.scrollHeight);
2238
2256
  });
2239
2257
  }
2240
- return C1(() => c.messages.map((p) => p.content).join(`
2241
- `), h0), C1([() => c.selectedSessionId, () => c.loading, () => c.messages.length], () => {
2258
+ return x1(() => c.messages.map((p) => p.content).join(`
2259
+ `), m0), x1([() => c.selectedSessionId, () => c.loading, () => c.messages.length], () => {
2242
2260
  U.value && c.selectedSessionId === U.value && !c.loading && (U.value = null);
2243
- }), C1(() => c.modelValue, V2), C1(() => c.open, (p) => {
2244
- p && (h0(), V2(), H1(() => {
2261
+ }), x1(() => c.modelValue, V2), x1(() => c.open, (p) => {
2262
+ p && (m0(), V2(), H1(() => {
2245
2263
  a.value?.focus();
2246
2264
  }));
2247
2265
  }), E2(() => {
2248
2266
  V2(), document.addEventListener("pointerdown", s0, !0);
2249
- }), U1(() => {
2267
+ }), O1(() => {
2250
2268
  x && window.clearTimeout(x), h2(), document.removeEventListener("pointerdown", s0, !0);
2251
- }), (p, w) => (e(), Z(Z1, { to: "body" }, [
2269
+ }), (p, w) => (e(), Z(N1, { to: "body" }, [
2252
2270
  $(c2, {
2253
2271
  "enter-active-class": "wpic:transition-opacity wpic:duration-150",
2254
2272
  "enter-from-class": "wpic:opacity-0",
@@ -2258,7 +2276,7 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
2258
2276
  "leave-to-class": "wpic:opacity-0"
2259
2277
  }, {
2260
2278
  default: o1(() => [
2261
- c1.value ? (e(), t("div", _5, [...w[23] || (w[23] = [
2279
+ c1.value ? (e(), t("div", n4, [...w[23] || (w[23] = [
2262
2280
  i("span", { class: "wpic:font-medium" }, "Dock", -1)
2263
2281
  ])])) : u("", !0)
2264
2282
  ]),
@@ -2281,7 +2299,7 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
2281
2299
  "data-variant": n.variant,
2282
2300
  "data-maximized": n.maximized,
2283
2301
  "data-docked": n.docked,
2284
- style: h1(a2.value),
2302
+ style: m1(a2.value),
2285
2303
  "aria-label": "Chat"
2286
2304
  }, [
2287
2305
  i("div", {
@@ -2352,12 +2370,12 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
2352
2370
  onClick: w[0] || (w[0] = (h) => L.value = !L.value)
2353
2371
  }, [
2354
2372
  $(m(v3), { size: 16 })
2355
- ], 8, e4)) : u("", !0),
2356
- i("div", c4, [
2357
- i("p", t4, v(n.title), 1),
2358
- n.subtitle ? (e(), t("p", i4, v(n.subtitle), 1)) : u("", !0)
2373
+ ], 8, c4)) : u("", !0),
2374
+ i("div", t4, [
2375
+ i("p", i4, v(n.title), 1),
2376
+ n.subtitle ? (e(), t("p", l4, v(n.subtitle), 1)) : u("", !0)
2359
2377
  ]),
2360
- i("div", l4, [
2378
+ i("div", a4, [
2361
2379
  n.docked ? u("", !0) : (e(), t("button", {
2362
2380
  key: 0,
2363
2381
  type: "button",
@@ -2372,7 +2390,7 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
2372
2390
  key: 1,
2373
2391
  size: 16
2374
2392
  }))
2375
- ], 8, a4)),
2393
+ ], 8, o4)),
2376
2394
  n.hideNewConversation ? u("", !0) : (e(), t("button", {
2377
2395
  key: 1,
2378
2396
  type: "button",
@@ -2381,7 +2399,7 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
2381
2399
  onClick: w[2] || (w[2] = (h) => p0())
2382
2400
  }, [
2383
2401
  $(m($2), { size: 16 })
2384
- ], 8, o4)),
2402
+ ], 8, s4)),
2385
2403
  n.hideClear ? u("", !0) : (e(), t("button", {
2386
2404
  key: 2,
2387
2405
  type: "button",
@@ -2390,7 +2408,7 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
2390
2408
  onClick: w[3] || (w[3] = (h) => o("clear"))
2391
2409
  }, [
2392
2410
  $(m(g3), { size: 16 })
2393
- ], 8, s4)),
2411
+ ], 8, r4)),
2394
2412
  i("button", {
2395
2413
  type: "button",
2396
2414
  class: "wpic:flex wpic:h-8 wpic:w-8 wpic:items-center wpic:justify-center wpic:rounded-lg wpic:text-zinc-400 wpic:transition wpic:hover:bg-zinc-100 wpic:hover:text-zinc-700 wpic:dark:hover:bg-zinc-700 wpic:dark:hover:text-zinc-100",
@@ -2398,7 +2416,7 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
2398
2416
  onClick: w[4] || (w[4] = (h) => o("close"))
2399
2417
  }, [
2400
2418
  $(m($1), { size: 16 })
2401
- ], 8, r4)
2419
+ ], 8, p4)
2402
2420
  ])
2403
2421
  ], 32),
2404
2422
  i("div", {
@@ -2411,8 +2429,8 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
2411
2429
  "wpic:bg-white wpic:dark:bg-zinc-800"
2412
2430
  ], "wpic-chat-panel__navigator wpic:m-2 wpic:flex wpic:h-[calc(100%-16px)] wpic:w-[calc(100%-16px)] wpic:flex-col wpic:overflow-visible wpic:rounded-xl wpic:shadow-2xl wpic:shadow-zinc-900/10 wpic:transition-all wpic:duration-200 wpic:ease-out wpic:sm:w-4/5 wpic:dark:shadow-black/30"])
2413
2431
  }, [
2414
- i("div", p4, [
2415
- i("span", d4, v(n.conversationsLabel), 1),
2432
+ i("div", d4, [
2433
+ i("span", w4, v(n.conversationsLabel), 1),
2416
2434
  i("button", {
2417
2435
  type: "button",
2418
2436
  class: "wpic:flex wpic:h-8 wpic:w-8 wpic:items-center wpic:justify-center wpic:rounded-lg wpic:text-zinc-400 wpic:transition wpic:hover:bg-zinc-100/80 wpic:hover:text-zinc-700 wpic:dark:hover:bg-zinc-700/70 wpic:dark:hover:text-zinc-100",
@@ -2420,22 +2438,22 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
2420
2438
  onClick: w[5] || (w[5] = (h) => L.value = !1)
2421
2439
  }, [
2422
2440
  $(m($1), { size: 16 })
2423
- ], 8, w4)
2441
+ ], 8, u4)
2424
2442
  ]),
2425
- i("div", u4, [
2443
+ i("div", h4, [
2426
2444
  i("button", {
2427
2445
  type: "button",
2428
2446
  class: "wpic:flex wpic:h-9 wpic:w-full wpic:items-center wpic:justify-center wpic:gap-2 wpic:rounded-lg wpic:bg-[var(--wpic-primary)] wpic:font-medium wpic:text-[var(--wpic-primary-fg,#fff)] wpic:transition wpic:hover:bg-[var(--wpic-primary-hover)]",
2429
2447
  onClick: w[6] || (w[6] = (h) => p0())
2430
2448
  }, [
2431
2449
  $(m($2), { size: 16 }),
2432
- i("span", h4, v(n.newConversationLabel), 1)
2450
+ i("span", m4, v(n.newConversationLabel), 1)
2433
2451
  ])
2434
2452
  ]),
2435
- i("div", m4, [
2453
+ i("div", v4, [
2436
2454
  i("section", null, [
2437
- i("div", v4, [
2438
- i("span", f4, v(n.projectsLabel), 1),
2455
+ i("div", f4, [
2456
+ i("span", b4, v(n.projectsLabel), 1),
2439
2457
  i("button", {
2440
2458
  type: "button",
2441
2459
  class: "wpic:flex wpic:h-6 wpic:w-6 wpic:items-center wpic:justify-center wpic:rounded-md wpic:text-zinc-400 wpic:transition wpic:hover:bg-zinc-100/80 wpic:hover:text-zinc-700 wpic:dark:hover:bg-zinc-700/70 wpic:dark:hover:text-zinc-100",
@@ -2443,39 +2461,39 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
2443
2461
  onClick: w[7] || (w[7] = (h) => o("new-project"))
2444
2462
  }, [
2445
2463
  $(m($2), { size: 14 })
2446
- ], 8, b4)
2464
+ ], 8, g4)
2447
2465
  ]),
2448
- i("div", g4, [
2449
- n.projects.length ? u("", !0) : (e(), t("div", z4, v(n.noProjectsLabel), 1)),
2466
+ i("div", z4, [
2467
+ n.projects.length ? u("", !0) : (e(), t("div", C4, v(n.noProjectsLabel), 1)),
2450
2468
  (e(!0), t(I, null, l1(n.projects, (h) => (e(), t("div", {
2451
2469
  key: h.id,
2452
2470
  class: "wpic:mb-3",
2453
- onMouseenter: (P) => Z0(h.id, P),
2471
+ onMouseenter: (H) => N0(h.id, H),
2454
2472
  onMouseleave: R2
2455
2473
  }, [
2456
2474
  i("button", {
2457
2475
  type: "button",
2458
2476
  class: g(["wpic:flex wpic:h-8 wpic:w-full wpic:items-center wpic:gap-2 wpic:rounded-lg wpic:px-2 wpic:text-left wpic:font-medium wpic:text-zinc-600 wpic:transition wpic:hover:bg-zinc-100/80 wpic:hover:text-zinc-900 wpic:dark:text-zinc-300 wpic:dark:hover:bg-zinc-700/70 wpic:dark:hover:text-zinc-100", h.id === n.selectedProjectId ? "wpic:bg-zinc-100/90 wpic:text-zinc-900 wpic:dark:bg-zinc-700/80 wpic:dark:text-zinc-100" : ""]),
2459
- onClick: (P) => o("select-project", h.id)
2477
+ onClick: (H) => o("select-project", h.id)
2460
2478
  }, [
2461
- $(m(v0), {
2479
+ $(m(f0), {
2462
2480
  size: 14,
2463
2481
  class: "wpic:shrink-0 wpic:text-zinc-400"
2464
2482
  }),
2465
- i("span", x4, v(h.name), 1),
2466
- h.count !== void 0 ? (e(), t("span", y4, v(h.count), 1)) : u("", !0),
2483
+ i("span", y4, v(h.name), 1),
2484
+ h.count !== void 0 ? (e(), t("span", M4, v(h.count), 1)) : u("", !0),
2467
2485
  $(m(E1), {
2468
2486
  size: 12,
2469
2487
  class: "wpic:shrink-0 wpic:text-zinc-400"
2470
2488
  })
2471
- ], 10, k4),
2489
+ ], 10, x4),
2472
2490
  u("", !0)
2473
- ], 40, C4))), 128))
2491
+ ], 40, k4))), 128))
2474
2492
  ])
2475
2493
  ]),
2476
- $(K1, {
2494
+ $(U1, {
2477
2495
  open: !!B.value,
2478
- anchor: H.value,
2496
+ anchor: P.value,
2479
2497
  placement: "right",
2480
2498
  width: "320px",
2481
2499
  "max-height": "360px",
@@ -2486,31 +2504,31 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
2486
2504
  default: o1(() => [
2487
2505
  i("div", {
2488
2506
  class: "wpic:py-1",
2489
- onMouseenter: N0,
2507
+ onMouseenter: K0,
2490
2508
  onMouseleave: R2
2491
2509
  }, [
2492
- !B.value || !(z1.value.get(B.value) ?? []).length ? (e(), t("p", M4, v(n.noConversationsLabel), 1)) : u("", !0),
2493
- (e(!0), t(I, null, l1(B.value ? z1.value.get(B.value) ?? [] : [], (h) => (e(), t("button", {
2510
+ !B.value || !(k1.value.get(B.value) ?? []).length ? (e(), t("p", L4, v(n.noConversationsLabel), 1)) : u("", !0),
2511
+ (e(!0), t(I, null, l1(B.value ? k1.value.get(B.value) ?? [] : [], (h) => (e(), t("button", {
2494
2512
  key: h.id,
2495
2513
  type: "button",
2496
2514
  class: g(["wpic:flex wpic:min-h-9 wpic:w-full wpic:items-center wpic:gap-3 wpic:px-3 wpic:py-2 wpic:text-left wpic:text-zinc-600 wpic:transition wpic:hover:bg-zinc-100/80 wpic:hover:text-zinc-900 wpic:dark:text-zinc-300 wpic:dark:hover:bg-zinc-700/70 wpic:dark:hover:text-zinc-100", h.id === n.selectedSessionId ? "wpic:bg-zinc-100/90 wpic:dark:bg-zinc-700/80" : ""]),
2497
- onPointerdown: b1((P) => Z2(h.id), ["stop"]),
2498
- onClick: b1((P) => d0(h.id), ["stop"])
2515
+ onPointerdown: b1((H) => Z2(h.id), ["stop"]),
2516
+ onClick: b1((H) => d0(h.id), ["stop"])
2499
2517
  }, [
2500
- i("span", V4, v(h.title), 1),
2501
- i("span", $4, v(i0(h)), 1)
2502
- ], 42, L4))), 128))
2518
+ i("span", $4, v(h.title), 1),
2519
+ i("span", B4, v(i0(h)), 1)
2520
+ ], 42, V4))), 128))
2503
2521
  ], 32)
2504
2522
  ]),
2505
2523
  _: 1
2506
2524
  }, 8, ["open", "anchor"]),
2507
- i("section", B4, [
2508
- i("div", S4, [
2509
- i("span", A4, v(n.conversationsLabel), 1)
2525
+ i("section", S4, [
2526
+ i("div", A4, [
2527
+ i("span", F4, v(n.conversationsLabel), 1)
2510
2528
  ]),
2511
- i("div", F4, [
2512
- x1.value.length ? u("", !0) : (e(), t("div", H4, v(n.noConversationsLabel), 1)),
2513
- (e(!0), t(I, null, l1(x1.value, (h) => (e(), t("div", {
2529
+ i("div", H4, [
2530
+ M1.value.length ? u("", !0) : (e(), t("div", P4, v(n.noConversationsLabel), 1)),
2531
+ (e(!0), t(I, null, l1(M1.value, (h) => (e(), t("div", {
2514
2532
  key: h.id,
2515
2533
  class: g(["wpic:group/conversation wpic:relative wpic:flex wpic:min-h-8 wpic:w-full wpic:items-center wpic:gap-2 wpic:rounded-lg wpic:px-2 wpic:py-1 wpic:text-left wpic:transition", h.id === n.selectedSessionId ? "wpic:bg-zinc-100/90 wpic:text-zinc-900 wpic:dark:bg-zinc-700/80 wpic:dark:text-zinc-100" : "wpic:text-zinc-500 wpic:hover:bg-zinc-100/80 wpic:hover:text-zinc-800 wpic:dark:text-zinc-400 wpic:dark:hover:bg-zinc-700/70 wpic:dark:hover:text-zinc-100"]),
2516
2534
  onClick: s2
@@ -2518,21 +2536,21 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
2518
2536
  i("button", {
2519
2537
  type: "button",
2520
2538
  class: "wpic:min-w-0 wpic:flex-1 wpic:text-left",
2521
- onPointerdown: b1((P) => Z2(h.id), ["stop"]),
2522
- onClick: b1((P) => d0(h.id), ["stop"])
2539
+ onPointerdown: b1((H) => Z2(h.id), ["stop"]),
2540
+ onClick: b1((H) => d0(h.id), ["stop"])
2523
2541
  }, [
2524
- i("span", T4, v(h.title), 1)
2525
- ], 40, P4),
2526
- i("span", j4, v(i0(h)), 1),
2542
+ i("span", j4, v(h.title), 1)
2543
+ ], 40, T4),
2544
+ i("span", E4, v(i0(h)), 1),
2527
2545
  i("button", {
2528
2546
  type: "button",
2529
2547
  class: "wpic:flex wpic:h-6 wpic:w-6 wpic:shrink-0 wpic:items-center wpic:justify-center wpic:rounded-md wpic:text-zinc-400 wpic:opacity-0 wpic:transition wpic:hover:bg-zinc-100/80 wpic:hover:text-zinc-700 wpic:group-hover/conversation:opacity-100 wpic:dark:hover:bg-zinc-700/70 wpic:dark:hover:text-zinc-100",
2530
2548
  title: "Conversation actions",
2531
2549
  "data-wpic-chat-menu-trigger": "",
2532
- onClick: b1((P) => K0(`loose-${h.id}`), ["stop"])
2550
+ onClick: b1((H) => U0(`loose-${h.id}`), ["stop"])
2533
2551
  }, [
2534
2552
  $(m(z3), { size: 14 })
2535
- ], 8, E4),
2553
+ ], 8, W4),
2536
2554
  s1.value === `loose-${h.id}` ? (e(), t("div", {
2537
2555
  key: 0,
2538
2556
  class: "wpic:absolute wpic:right-2 wpic:top-8 wpic:z-30 wpic:text-left",
@@ -2540,12 +2558,12 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
2540
2558
  onClick: w[11] || (w[11] = b1(() => {
2541
2559
  }, ["stop"]))
2542
2560
  }, [
2543
- $(b0, null, {
2561
+ $(g0, null, {
2544
2562
  default: o1(() => [
2545
2563
  i("div", {
2546
2564
  class: "wpic:relative wpic:border-b wpic:border-zinc-100 wpic:pb-1 wpic:dark:border-zinc-700/60",
2547
- onPointerenter: (P) => o0(`loose-${h.id}`, P),
2548
- onMouseenter: (P) => o0(`loose-${h.id}`, P),
2565
+ onPointerenter: (H) => o0(`loose-${h.id}`, H),
2566
+ onMouseenter: (H) => o0(`loose-${h.id}`, H),
2549
2567
  onPointerleave: S2,
2550
2568
  onMouseleave: S2
2551
2569
  }, [
@@ -2559,10 +2577,10 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
2559
2577
  ]),
2560
2578
  _: 1
2561
2579
  }),
2562
- (e(), Z(Z1, { to: "body" }, [
2580
+ (e(), Z(N1, { to: "body" }, [
2563
2581
  r1.value === `loose-${h.id}` ? (e(), t("div", {
2564
2582
  key: 0,
2565
- style: h1(n1.value),
2583
+ style: m1(n1.value),
2566
2584
  "data-wpic-chat-menu-root": "",
2567
2585
  onPointerenter: h2,
2568
2586
  onMouseenter: h2,
@@ -2571,27 +2589,27 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
2571
2589
  onClick: w[10] || (w[10] = b1(() => {
2572
2590
  }, ["stop"]))
2573
2591
  }, [
2574
- $(b0, { class: "wpic:max-h-56 wpic:min-w-48 wpic:overflow-y-auto" }, {
2592
+ $(g0, { class: "wpic:max-h-56 wpic:min-w-48 wpic:overflow-y-auto" }, {
2575
2593
  default: o1(() => [
2576
2594
  w[29] || (w[29] = i("p", { class: "wpic:px-2 wpic:py-1 wpic:font-medium wpic:text-zinc-400 wpic:dark:text-zinc-300" }, "Project", -1)),
2577
- (e(!0), t(I, null, l1(n.projects, (P) => (e(), Z(v2, {
2578
- key: P.id,
2579
- onClick: (y) => r0(h, P.id)
2595
+ (e(!0), t(I, null, l1(n.projects, (H) => (e(), Z(v2, {
2596
+ key: H.id,
2597
+ onClick: (y) => r0(h, H.id)
2580
2598
  }, {
2581
2599
  default: o1(() => [
2582
- $(m(v0), {
2600
+ $(m(f0), {
2583
2601
  size: 14,
2584
2602
  class: "wpic:text-zinc-400 wpic:dark:text-zinc-300"
2585
2603
  }),
2586
- i("span", D4, v(P.name), 1)
2604
+ i("span", I4, v(H.name), 1)
2587
2605
  ]),
2588
2606
  _: 2
2589
2607
  }, 1032, ["onClick"]))), 128)),
2590
2608
  $(v2, {
2591
- onClick: (P) => r0(h, null)
2609
+ onClick: (H) => r0(h, null)
2592
2610
  }, {
2593
2611
  default: o1(() => [...w[28] || (w[28] = [
2594
- v1("No project", -1)
2612
+ f1("No project", -1)
2595
2613
  ])]),
2596
2614
  _: 1
2597
2615
  }, 8, ["onClick"])
@@ -2600,9 +2618,9 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
2600
2618
  }, 1024)
2601
2619
  ], 36)) : u("", !0)
2602
2620
  ]))
2603
- ], 40, W4),
2621
+ ], 40, D4),
2604
2622
  $(v2, {
2605
- onClick: (P) => {
2623
+ onClick: (H) => {
2606
2624
  o("rename-session", h), s2();
2607
2625
  }
2608
2626
  }, {
@@ -2612,7 +2630,7 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
2612
2630
  _: 1
2613
2631
  }, 8, ["onClick"]),
2614
2632
  $(v2, {
2615
- onClick: (P) => U0(h)
2633
+ onClick: (H) => O0(h)
2616
2634
  }, {
2617
2635
  default: o1(() => [
2618
2636
  i("span", null, v(n.deleteConversationLabel), 1)
@@ -2629,33 +2647,35 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
2629
2647
  ])
2630
2648
  ], 2)
2631
2649
  ], 2),
2632
- i("div", I4, [
2633
- i("div", R4, [
2650
+ i("div", R4, [
2651
+ i("div", Z4, [
2634
2652
  i("div", {
2635
2653
  ref_key: "scroller",
2636
2654
  ref: l,
2637
2655
  class: "wpic-chat-panel__messages wpic:min-h-0 wpic:flex-1 wpic:overflow-y-auto wpic:px-5 wpic:py-5"
2638
2656
  }, [
2639
- z.value && !Y.value.length ? (e(), t("div", Z4, [
2640
- $(m(R1), {
2657
+ z.value && !Y.value.length ? (e(), t("div", N4, [
2658
+ $(m(Z1), {
2641
2659
  size: 22,
2642
2660
  class: "wpic:mb-3 wpic:animate-spin"
2643
2661
  }),
2644
- i("p", N4, v(n.thinkingLabel), 1)
2645
- ])) : Y.value.length ? (e(), t("div", q4, [
2646
- (e(!0), t(I, null, l1(Y.value, (h, P) => (e(), t("article", {
2647
- key: n2(h, P),
2662
+ i("p", K4, v(n.thinkingLabel), 1)
2663
+ ])) : Y.value.length ? (e(), t("div", Q4, [
2664
+ (e(!0), t(I, null, l1(Y.value, (h, H) => (e(), t("article", {
2665
+ key: n2(h, H),
2648
2666
  class: g(["wpic:group wpic:flex", h.role === "user" ? "wpic:justify-end" : "wpic:justify-start"])
2649
2667
  }, [
2650
- i("div", Q4, [
2668
+ i("div", {
2669
+ class: g(h.role === "user" ? "wpic:max-w-[82%]" : "wpic:w-full wpic:min-w-0")
2670
+ }, [
2651
2671
  i("p", {
2652
2672
  class: g(["wpic:mb-1 wpic:text-zinc-400", h.role === "user" ? "wpic:text-right" : "wpic:text-left"])
2653
- }, v(u2(h)) + " · " + v(P0(h, P)), 3),
2654
- u1(h).length ? (e(), t("div", {
2673
+ }, v(u2(h)) + " · " + v(T0(h, H)), 3),
2674
+ w1(h).length ? (e(), t("div", {
2655
2675
  key: 0,
2656
2676
  class: g(["wpic:mb-1.5 wpic:flex wpic:flex-wrap wpic:gap-1.5", h.role === "user" ? "wpic:justify-end" : "wpic:justify-start"])
2657
2677
  }, [
2658
- (e(!0), t(I, null, l1(u1(h), (y) => (e(), t("span", {
2678
+ (e(!0), t(I, null, l1(w1(h), (y) => (e(), t("span", {
2659
2679
  key: y.id,
2660
2680
  class: g(["wpic:relative wpic:inline-flex wpic:max-w-full wpic:items-center wpic:gap-1.5 wpic:rounded-md wpic:bg-zinc-100 wpic:text-zinc-600 wpic:dark:bg-zinc-900 wpic:dark:text-zinc-300", R(y) ? "wpic:h-12 wpic:w-12 wpic:overflow-hidden wpic:p-0" : "wpic:px-2 wpic:py-1"])
2661
2681
  }, [
@@ -2681,7 +2701,7 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
2681
2701
  ]])
2682
2702
  }, [
2683
2703
  h.streaming && !h.content.trim() ? (e(), t("div", _4, [
2684
- $(m(R1), {
2704
+ $(m(Z1), {
2685
2705
  size: 16,
2686
2706
  class: "wpic:animate-spin"
2687
2707
  }),
@@ -2690,8 +2710,8 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
2690
2710
  i("span", { class: "wpic-chat-loading-card__label" }, "Generating image...", -1)
2691
2711
  ])])) : (e(), t("div", {
2692
2712
  key: 2,
2693
- innerHTML: R0(h),
2694
- onClick: (y) => Y0(h, y)
2713
+ innerHTML: Z0(h),
2714
+ onClick: (y) => q0(h, y)
2695
2715
  }, null, 8, e6)),
2696
2716
  a1(h).length ? (e(), t("div", {
2697
2717
  key: 3,
@@ -2701,7 +2721,7 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
2701
2721
  key: y.url,
2702
2722
  href: y.href ?? y.url,
2703
2723
  class: "wpic:block wpic:overflow-hidden wpic:rounded-lg wpic:bg-zinc-100 wpic:transition wpic:hover:opacity-90 wpic:dark:bg-zinc-800",
2704
- onClick: (W) => q0(W, y.href ?? y.url)
2724
+ onClick: (W) => Q0(W, y.href ?? y.url)
2705
2725
  }, [
2706
2726
  i("img", {
2707
2727
  src: y.url,
@@ -2740,17 +2760,17 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
2740
2760
  i("button", {
2741
2761
  type: "button",
2742
2762
  class: "wpic:flex wpic:h-7 wpic:w-7 wpic:items-center wpic:justify-center wpic:rounded-md wpic:text-zinc-400 wpic:transition wpic:hover:bg-zinc-100 wpic:hover:text-zinc-700 wpic:dark:hover:bg-zinc-700 wpic:dark:hover:text-zinc-100",
2743
- title: V.value === n2(h, P) ? n.copiedLabel : n.copyLabel,
2744
- onClick: (y) => _0(h.content, n2(h, P))
2763
+ title: V.value === n2(h, H) ? n.copiedLabel : n.copyLabel,
2764
+ onClick: (y) => u0(h.content, n2(h, H))
2745
2765
  }, [
2746
- (e(), Z(S1(V.value === n2(h, P) ? m(_1) : m(x3)), { size: 14 }))
2766
+ (e(), Z(S1(V.value === n2(h, H) ? m(_1) : m(x3)), { size: 14 }))
2747
2767
  ], 8, a6),
2748
2768
  h.role === "user" ? (e(), t("button", {
2749
2769
  key: 1,
2750
2770
  type: "button",
2751
2771
  class: "wpic:flex wpic:h-7 wpic:w-7 wpic:items-center wpic:justify-center wpic:rounded-md wpic:text-zinc-400 wpic:transition wpic:hover:bg-zinc-100 wpic:hover:text-zinc-700 wpic:dark:hover:bg-zinc-700 wpic:dark:hover:text-zinc-100",
2752
2772
  title: "Edit",
2753
- onClick: (y) => O0(h)
2773
+ onClick: (y) => Y0(h)
2754
2774
  }, [
2755
2775
  $(m(y3), { size: 14 })
2756
2776
  ], 8, o6)) : u("", !0),
@@ -2763,14 +2783,14 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
2763
2783
  $(m(M3), { size: 14 })
2764
2784
  ], 8, s6)
2765
2785
  ], 2)
2766
- ])
2786
+ ], 2)
2767
2787
  ], 2))), 128))
2768
- ])) : (e(), t("div", K4, [
2769
- i("div", U4, [
2770
- $(m(M0), { size: 20 })
2788
+ ])) : (e(), t("div", U4, [
2789
+ i("div", O4, [
2790
+ $(m(L0), { size: 20 })
2771
2791
  ]),
2772
- i("p", O4, v(n.emptyTitle), 1),
2773
- n.emptyDescription ? (e(), t("p", Y4, v(n.emptyDescription), 1)) : u("", !0)
2792
+ i("p", Y4, v(n.emptyTitle), 1),
2793
+ n.emptyDescription ? (e(), t("p", q4, v(n.emptyDescription), 1)) : u("", !0)
2774
2794
  ]))
2775
2795
  ], 512),
2776
2796
  i("footer", r6, [
@@ -2804,7 +2824,7 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
2804
2824
  type: "button",
2805
2825
  class: g(["wpic:inline-flex wpic:h-4 wpic:w-4 wpic:shrink-0 wpic:items-center wpic:justify-center wpic:rounded-full wpic:text-zinc-400 wpic:hover:bg-zinc-200 wpic:hover:text-zinc-700 wpic:dark:hover:bg-zinc-800 wpic:dark:hover:text-zinc-100", R(h) ? "wpic:absolute wpic:right-0.5 wpic:top-0.5 wpic:bg-black/45 wpic:text-white wpic:hover:bg-black/60 wpic:hover:text-white wpic:dark:hover:bg-black/70" : "wpic:ml-0.5"]),
2806
2826
  title: n.removeAttachmentLabel,
2807
- onClick: (P) => o("remove-attachment", h)
2827
+ onClick: (H) => o("remove-attachment", h)
2808
2828
  }, [
2809
2829
  $(m($1), { size: 10 })
2810
2830
  ], 10, m6)
@@ -2812,10 +2832,10 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
2812
2832
  ])) : u("", !0),
2813
2833
  i("div", v6, [
2814
2834
  !r.composer && j.value.length ? (e(), t("div", f6, [
2815
- (e(!0), t(I, null, l1(j.value, (h, P) => (e(), t("button", {
2835
+ (e(!0), t(I, null, l1(j.value, (h, H) => (e(), t("button", {
2816
2836
  key: h.id,
2817
2837
  type: "button",
2818
- class: g(["wpic:flex wpic:w-full wpic:items-center wpic:justify-between wpic:gap-3 wpic:px-3 wpic:py-2 wpic:text-left wpic:text-sm wpic:transition wpic:hover:bg-zinc-100 wpic:dark:hover:bg-zinc-700", P === s.value ? "wpic:bg-zinc-100 wpic:dark:bg-zinc-700" : ""]),
2838
+ class: g(["wpic:flex wpic:w-full wpic:items-center wpic:justify-between wpic:gap-3 wpic:px-3 wpic:py-2 wpic:text-left wpic:text-sm wpic:transition wpic:hover:bg-zinc-100 wpic:dark:hover:bg-zinc-700", H === s.value ? "wpic:bg-zinc-100 wpic:dark:bg-zinc-700" : ""]),
2819
2839
  onMousedown: b1((y) => w0(h), ["prevent"])
2820
2840
  }, [
2821
2841
  i("span", g6, "@" + v(h.label), 1),
@@ -2830,7 +2850,7 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
2830
2850
  multiple: "",
2831
2851
  class: "wpic:sr-only",
2832
2852
  accept: n.accept || void 0,
2833
- onChange: X0
2853
+ onChange: G0
2834
2854
  }, null, 40, C6)) : u("", !0),
2835
2855
  p.$slots.composer ? N(p.$slots, "composer", {
2836
2856
  modelValue: n.modelValue,
@@ -2847,14 +2867,14 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
2847
2867
  rows: "2",
2848
2868
  class: "wpic:max-h-40 wpic:min-h-[3.75rem] wpic:w-full wpic:resize-none wpic:overflow-y-auto wpic:bg-transparent wpic:px-4 wpic:py-3 wpic:text-zinc-900 wpic:outline-none wpic:placeholder:text-zinc-400 wpic:disabled:opacity-50 wpic:dark:text-zinc-100 wpic:dark:placeholder:text-zinc-500",
2849
2869
  disabled: n.loading,
2850
- onInput: Q0,
2870
+ onInput: J0,
2851
2871
  onClick: F2,
2852
2872
  onKeyup: F2,
2853
- onKeydown: G0
2873
+ onKeydown: _0
2854
2874
  }, null, 40, k6)),
2855
2875
  i("div", {
2856
2876
  class: "wpic:flex wpic:items-center wpic:justify-between wpic:px-2 wpic:pb-2",
2857
- style: h1(n.showAttachments ? void 0 : { justifyContent: "flex-end" })
2877
+ style: m1(n.showAttachments ? void 0 : { justifyContent: "flex-end" })
2858
2878
  }, [
2859
2879
  i("div", x6, [
2860
2880
  n.showAttachments ? (e(), Z(t2, {
@@ -2866,7 +2886,7 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
2866
2886
  disabled: n.loading,
2867
2887
  title: n.attachFilesLabel,
2868
2888
  "aria-label": n.attachFilesLabel,
2869
- onClick: J0
2889
+ onClick: X0
2870
2890
  }, {
2871
2891
  default: o1(() => [
2872
2892
  $(m(B2), { size: 16 })
@@ -2895,11 +2915,11 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
2895
2915
  title: n.sendLabel,
2896
2916
  onClick: N2
2897
2917
  }, [
2898
- n.loading ? (e(), Z(m(R1), {
2918
+ n.loading ? (e(), Z(m(Z1), {
2899
2919
  key: 0,
2900
2920
  size: 16,
2901
2921
  class: "wpic:animate-spin"
2902
- })) : (e(), Z(m(L0), {
2922
+ })) : (e(), Z(m(V0), {
2903
2923
  key: 1,
2904
2924
  size: 17,
2905
2925
  "stroke-width": "2.5"
@@ -2950,13 +2970,13 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
2950
2970
  onMousedown: w[22] || (w[22] = (h) => Y1(h, "sw"))
2951
2971
  }, null, 32)
2952
2972
  ], 64))
2953
- ], 14, n4)) : u("", !0)
2973
+ ], 14, e4)) : u("", !0)
2954
2974
  ]),
2955
2975
  _: 3
2956
2976
  })
2957
2977
  ]));
2958
2978
  }
2959
- }), al = /* @__PURE__ */ W1(L6, [["__scopeId", "data-v-92a41e2c"]]), V6 = { class: "wpic-pagination wpic:flex wpic:items-center wpic:justify-between wpic:gap-4" }, $6 = { class: "wpic:text-sm wpic:text-zinc-400 wpic:dark:text-zinc-500 wpic:shrink-0" }, B6 = { class: "wpic:flex wpic:items-center wpic:gap-1" }, S6 = ["disabled"], A6 = {
2979
+ }), al = /* @__PURE__ */ W1(L6, [["__scopeId", "data-v-5fa0cae7"]]), V6 = { class: "wpic-pagination wpic:flex wpic:items-center wpic:justify-between wpic:gap-4" }, $6 = { class: "wpic:text-sm wpic:text-zinc-400 wpic:dark:text-zinc-500 wpic:shrink-0" }, B6 = { class: "wpic:flex wpic:items-center wpic:gap-1" }, S6 = ["disabled"], A6 = {
2960
2980
  key: 0,
2961
2981
  class: "wpic:w-7 wpic:h-7 wpic:inline-flex wpic:items-center wpic:justify-center wpic:text-sm wpic:text-zinc-400 wpic:select-none"
2962
2982
  }, F6 = ["onClick"], H6 = ["disabled"], ol = /* @__PURE__ */ X({
@@ -2974,40 +2994,40 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
2974
2994
  let l = null;
2975
2995
  const a = M(() => c.limit ?? 20), f = M(() => Math.max(1, Math.ceil(c.total / a.value))), b = M(() => c.syncUrl && r);
2976
2996
  function V() {
2977
- const H = new URL(window.location.href).searchParams.get(c.queryParam), x = Number.parseInt(H ?? "", 10);
2997
+ const P = new URL(window.location.href).searchParams.get(c.queryParam), x = Number.parseInt(P ?? "", 10);
2978
2998
  return Number.isFinite(x) && x > 0 ? x : 1;
2979
2999
  }
2980
- function s(H, x) {
3000
+ function s(P, x) {
2981
3001
  if (!b.value || l === null || window.location.pathname !== l) return;
2982
3002
  const k = new URL(window.location.href);
2983
- H === 1 ? k.searchParams.delete(c.queryParam) : k.searchParams.set(c.queryParam, String(H)), window.history[`${x}State`](window.history.state, "", k);
3003
+ P === 1 ? k.searchParams.delete(c.queryParam) : k.searchParams.set(c.queryParam, String(P)), window.history[`${x}State`](window.history.state, "", k);
2984
3004
  }
2985
3005
  function F() {
2986
3006
  if (!b.value) return;
2987
- const H = Math.min(V(), f.value);
2988
- H !== c.modelValue && o("update:modelValue", H);
3007
+ const P = Math.min(V(), f.value);
3008
+ P !== c.modelValue && o("update:modelValue", P);
2989
3009
  }
2990
3010
  E2(() => {
2991
3011
  l = window.location.pathname, F(), window.addEventListener("popstate", F);
2992
- }), U1(() => window.removeEventListener("popstate", F)), C1(
3012
+ }), O1(() => window.removeEventListener("popstate", F)), x1(
2993
3013
  () => c.modelValue,
2994
- (H) => {
3014
+ (P) => {
2995
3015
  const x = V();
2996
- (H !== x || H === 1 && new URL(window.location.href).searchParams.has(c.queryParam)) && s(H, "replace");
3016
+ (P !== x || P === 1 && new URL(window.location.href).searchParams.has(c.queryParam)) && s(P, "replace");
2997
3017
  }
2998
3018
  );
2999
3019
  const L = M(() => {
3000
- const H = c.modelValue, x = f.value;
3020
+ const P = c.modelValue, x = f.value;
3001
3021
  if (x <= 7) return Array.from({ length: x }, (s1, r1) => r1 + 1);
3002
3022
  const k = [];
3003
- k.push(1), H > 4 && k.push("...");
3004
- const O = Math.max(2, H - 2), c1 = Math.min(x - 1, H + 2);
3023
+ k.push(1), P > 4 && k.push("...");
3024
+ const O = Math.max(2, P - 2), c1 = Math.min(x - 1, P + 2);
3005
3025
  for (let s1 = O; s1 <= c1; s1++) k.push(s1);
3006
- return H < x - 3 && k.push("..."), k.push(x), k;
3007
- }), B = (H) => {
3008
- H >= 1 && H <= f.value && H !== c.modelValue && (s(H, "push"), o("update:modelValue", H));
3026
+ return P < x - 3 && k.push("..."), k.push(x), k;
3027
+ }), B = (P) => {
3028
+ P >= 1 && P <= f.value && P !== c.modelValue && (s(P, "push"), o("update:modelValue", P));
3009
3029
  };
3010
- return (H, x) => (e(), t("div", V6, [
3030
+ return (P, x) => (e(), t("div", V6, [
3011
3031
  i("span", $6, " Page " + v(n.modelValue) + " / " + v(f.value) + "  ·  " + v(n.total.toLocaleString()), 1),
3012
3032
  i("div", B6, [
3013
3033
  i("button", {
@@ -3122,16 +3142,16 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
3122
3142
  emits: ["update:modelValue", "open-change"],
3123
3143
  setup(n, { emit: d }) {
3124
3144
  const c = n, o = d, r = (E) => typeof E == "object" && E !== null ? E : { value: E, label: String(E), icon: void 0, iconKey: void 0, meta: void 0, metaVariant: void 0 }, l = c0(), a = T(!1), f = T(null), b = `wpic-select-${G2().uid}`, V = T(null), s = T(""), F = T(c.multiple ? [...c.modelValue ?? []] : []);
3125
- C1(() => c.modelValue, (E) => {
3145
+ x1(() => c.modelValue, (E) => {
3126
3146
  c.multiple && (F.value = [...E ?? []]);
3127
- }, { deep: !0 }), C1(a, (E) => {
3147
+ }, { deep: !0 }), x1(a, (E) => {
3128
3148
  o("open-change", E), E && c.searchable && !l.value && H1(() => V.value?.focus()), E || (s.value = "");
3129
3149
  });
3130
3150
  const L = M(() => (c.options ?? []).map(r)), B = M(() => {
3131
3151
  if (!c.searchable || !s.value) return L.value;
3132
3152
  const E = s.value.toLowerCase();
3133
3153
  return L.value.filter((Y) => String(Y.label).toLowerCase().includes(E));
3134
- }), H = (E, Y = !1) => {
3154
+ }), P = (E, Y = !1) => {
3135
3155
  Y || (o("update:modelValue", E), a.value = !1);
3136
3156
  }, x = (E, Y = !1) => {
3137
3157
  if (Y) return;
@@ -3162,21 +3182,21 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
3162
3182
  if (z === 0) return c.placeholder ?? "Select…";
3163
3183
  const G = c.allLabel ?? c.placeholder ?? "All";
3164
3184
  if (z === E) return `${G} · ${E}`;
3165
- const p1 = c.maxLabels ?? 3, k1 = Y.map((j) => {
3185
+ const p1 = c.maxLabels ?? 3, y1 = Y.map((j) => {
3166
3186
  const e1 = L.value.find((q) => String(q.value) === String(j));
3167
3187
  return e1 ? e1.label : null;
3168
3188
  }).filter(Boolean);
3169
- return k1.length ? z <= p1 ? k1.join(", ") : `${k1.slice(0, p1).join(", ")} · ${z}` : c.placeholder ? `${c.placeholder} · ${z}` : `${z} selected`;
3189
+ return y1.length ? z <= p1 ? y1.join(", ") : `${y1.slice(0, p1).join(", ")} · ${z}` : c.placeholder ? `${c.placeholder} · ${z}` : `${z} selected`;
3170
3190
  }), n1 = M(() => c.multiple ? F.value.length > 0 : c.modelValue != null && c.modelValue !== ""), U = M(() => c.variant ?? "default");
3171
3191
  return (E, Y) => (e(), t("div", {
3172
- style: h1({ position: "relative", width: U.value === "plain" ? "auto" : "100%", minWidth: 0 })
3192
+ style: m1({ position: "relative", width: U.value === "plain" ? "auto" : "100%", minWidth: 0 })
3173
3193
  }, [
3174
- n.label && n.labelPlacement !== "inline" ? (e(), Z(B0, {
3194
+ n.label && n.labelPlacement !== "inline" ? (e(), Z(S0, {
3175
3195
  key: 0,
3176
3196
  for: b
3177
3197
  }, {
3178
3198
  default: o1(() => [
3179
- v1(v(n.label), 1)
3199
+ f1(v(n.label), 1)
3180
3200
  ]),
3181
3201
  _: 1
3182
3202
  })) : u("", !0),
@@ -3210,7 +3230,7 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
3210
3230
  n.label && n.labelPlacement === "inline" ? (e(), t("span", W6, v(n.label) + ":", 1)) : u("", !0),
3211
3231
  i("span", D6, v(r1.value), 1)
3212
3232
  ], 2),
3213
- n.loading ? (e(), Z(m(R1), {
3233
+ n.loading ? (e(), Z(m(Z1), {
3214
3234
  key: 0,
3215
3235
  size: 13,
3216
3236
  class: "wpic:shrink-0 wpic:animate-spin wpic:text-zinc-400 wpic:dark:text-zinc-500"
@@ -3223,7 +3243,7 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
3223
3243
  class: "wpic:flex wpic:items-center wpic:p-0.5 wpic:rounded wpic:shrink-0 wpic:text-zinc-400 wpic:hover:text-zinc-700 wpic:dark:hover:text-zinc-200 wpic:transition wpic:cursor-pointer wpic:bg-transparent wpic:border-none"
3224
3244
  }, [
3225
3245
  $(m($1), { size: 11 })
3226
- ])) : U.value === "plain" ? (e(), Z(m(N1), {
3246
+ ])) : U.value === "plain" ? (e(), Z(m(K1), {
3227
3247
  key: 2,
3228
3248
  size: 14,
3229
3249
  class: "wpic:shrink-0 wpic:text-zinc-400 wpic:dark:text-zinc-500"
@@ -3233,7 +3253,7 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
3233
3253
  class: "wpic:shrink-0 wpic:text-zinc-400 wpic:dark:text-zinc-500"
3234
3254
  }))
3235
3255
  ], 10, E6),
3236
- $(K1, {
3256
+ $(U1, {
3237
3257
  "mobile-sheet": "",
3238
3258
  "sheet-title": n.label || n.placeholder || f.value?.getAttribute("aria-label") || String(r1.value),
3239
3259
  "close-label": n.closeLabel,
@@ -3300,7 +3320,7 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
3300
3320
  selected: c1(z.value),
3301
3321
  "separator-before": !!(z.separatorBefore && !z.groupLabel),
3302
3322
  title: z.description,
3303
- onClick: (G) => n.multiple ? x(z.value, z.disabled) : H(z.value, z.disabled)
3323
+ onClick: (G) => n.multiple ? x(z.value, z.disabled) : P(z.value, z.disabled)
3304
3324
  }, {
3305
3325
  default: o1(() => [
3306
3326
  N(E.$slots, "option", {
@@ -3330,7 +3350,7 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
3330
3350
  z.meta ? (e(), t("span", {
3331
3351
  key: 2,
3332
3352
  class: "wpic:shrink-0 wpic:px-1.5 wpic:py-px wpic:rounded wpic:text-[11px]",
3333
- style: h1({
3353
+ style: m1({
3334
3354
  background: z.metaVariant === "success" ? "rgba(34,197,94,0.12)" : z.metaVariant === "warning" ? "rgba(245,158,11,0.12)" : z.metaVariant === "error" ? "rgba(239,68,68,0.12)" : z.metaVariant === "subtle" ? "rgba(113,113,122,0.12)" : "transparent",
3335
3355
  color: z.metaVariant === "success" ? "#22C55E" : z.metaVariant === "warning" ? "#F59E0B" : z.metaVariant === "error" ? "#EF4444" : "rgb(161 161 170)"
3336
3356
  })
@@ -3351,7 +3371,7 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
3351
3371
  size: 14,
3352
3372
  class: "wpic:shrink-0"
3353
3373
  }),
3354
- v1(' Create "' + v(s.value.trim()) + '" ', 1)
3374
+ f1(' Create "' + v(s.value.trim()) + '" ', 1)
3355
3375
  ])) : u("", !0)
3356
3376
  ])
3357
3377
  ]),
@@ -3367,7 +3387,7 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
3367
3387
  setup(n) {
3368
3388
  return (d, c) => (e(), t("span", q6, [
3369
3389
  N(d.$slots, "default", {}, () => [
3370
- v1(v(n.label), 1)
3390
+ f1(v(n.label), 1)
3371
3391
  ])
3372
3392
  ]));
3373
3393
  }
@@ -3396,7 +3416,7 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
3396
3416
  max: n.max,
3397
3417
  step: n.step,
3398
3418
  disabled: n.disabled,
3399
- style: h1({ "--wpic-slider-progress": `${o.value}%` }),
3419
+ style: m1({ "--wpic-slider-progress": `${o.value}%` }),
3400
3420
  class: g([
3401
3421
  "wpic-slider",
3402
3422
  `wpic-slider--${n.variant}`,
@@ -3426,7 +3446,7 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
3426
3446
  function o(r) {
3427
3447
  c("update:modelValue", r), c("close");
3428
3448
  }
3429
- return (r, l) => (e(), Z(K1, {
3449
+ return (r, l) => (e(), Z(U1, {
3430
3450
  open: !0,
3431
3451
  anchor: n.anchor,
3432
3452
  "min-width": "160px",
@@ -3444,7 +3464,7 @@ const G5 = ["data-wpic-theme"], K1 = /* @__PURE__ */ X({
3444
3464
  a.color ? (e(), t("span", {
3445
3465
  key: 0,
3446
3466
  class: "wpic:w-2 wpic:h-2 wpic:rounded-full wpic:shrink-0",
3447
- style: h1({ background: a.color })
3467
+ style: m1({ background: a.color })
3448
3468
  }, null, 4)) : a.icon ? (e(), Z(S1(a.icon), {
3449
3469
  key: 1,
3450
3470
  size: 13,
@@ -3532,8 +3552,8 @@ const n9 = {
3532
3552
  emits: ["update:modelValue", "update:checked", "remove"],
3533
3553
  setup(n, { emit: d }) {
3534
3554
  const c = n, o = d, r = a3(), l = T(null), a = M(() => l.value?.$el ?? l.value ?? null), f = T(!1), b = M(() => c.checkable || c.editable), V = M(() => b.value && c.removable), s = M(() => {
3535
- const H = { ...r };
3536
- return delete H.class, H;
3555
+ const P = { ...r };
3556
+ return delete P.class, P;
3537
3557
  }), F = M(() => ({
3538
3558
  ...c.checkable ? { "aria-pressed": c.checked } : {},
3539
3559
  ...c.editable && !c.checkable ? { "aria-expanded": f.value, "aria-haspopup": "listbox" } : {},
@@ -3543,9 +3563,9 @@ const n9 = {
3543
3563
  function B() {
3544
3564
  c.disabled || (c.checkable ? o("update:checked", !c.checked) : c.editable && (f.value = !f.value));
3545
3565
  }
3546
- return C1(() => [c.disabled, c.checkable, c.editable], () => {
3566
+ return x1(() => [c.disabled, c.checkable, c.editable], () => {
3547
3567
  (c.disabled || c.checkable || !c.editable) && (f.value = !1);
3548
- }), (H, x) => (e(), t(I, null, [
3568
+ }), (P, x) => (e(), t(I, null, [
3549
3569
  (e(), Z(S1(b.value && !n.removable ? "button" : "span"), G1({
3550
3570
  ref_key: "anchorRef",
3551
3571
  ref: l
@@ -3575,7 +3595,7 @@ const n9 = {
3575
3595
  }, null, -1)),
3576
3596
  n.checked ? (e(), t("path", o9)) : u("", !0)
3577
3597
  ])) : u("", !0),
3578
- N(H.$slots, "default")
3598
+ N(P.$slots, "default")
3579
3599
  ]),
3580
3600
  _: 3
3581
3601
  }, 16, ["class"])),
@@ -3714,7 +3734,7 @@ const n9 = {
3714
3734
  title: n.title
3715
3735
  }, [
3716
3736
  N(d.$slots, "title", {}, () => [
3717
- v1(v(n.title), 1)
3737
+ f1(v(n.title), 1)
3718
3738
  ])
3719
3739
  ], 8, z9),
3720
3740
  d.$slots.actions ? (e(), t("div", C9, [
@@ -3725,12 +3745,12 @@ const n9 = {
3725
3745
  i("div", x9, [
3726
3746
  i("div", y9, [
3727
3747
  N(d.$slots, "value", {}, () => [
3728
- v1(v(n.value), 1)
3748
+ f1(v(n.value), 1)
3729
3749
  ])
3730
3750
  ]),
3731
3751
  n.subtitle || d.$slots.subtitle ? (e(), t("p", M9, [
3732
3752
  N(d.$slots, "subtitle", {}, () => [
3733
- v1(v(n.subtitle), 1)
3753
+ f1(v(n.subtitle), 1)
3734
3754
  ])
3735
3755
  ])) : u("", !0)
3736
3756
  ]),
@@ -3750,14 +3770,14 @@ const n9 = {
3750
3770
  class: g([n.titleSize === "base" ? "wpic:text-base" : "wpic:text-lg", "wpic-card__title wpic:font-semibold wpic:text-zinc-800 wpic:dark:text-zinc-200 wpic:flex-1 wpic:min-w-0 wpic:truncate"])
3751
3771
  }, [
3752
3772
  N(d.$slots, "title", {}, () => [
3753
- v1(v(n.title), 1)
3773
+ f1(v(n.title), 1)
3754
3774
  ])
3755
3775
  ], 2),
3756
3776
  N(d.$slots, "actions")
3757
3777
  ]),
3758
3778
  n.subtitle || d.$slots.subtitle ? (e(), t("p", $9, [
3759
3779
  N(d.$slots, "subtitle", {}, () => [
3760
- v1(v(n.subtitle), 1)
3780
+ f1(v(n.subtitle), 1)
3761
3781
  ])
3762
3782
  ])) : u("", !0)
3763
3783
  ], 2)) : u("", !0),
@@ -3817,7 +3837,7 @@ const n9 = {
3817
3837
  setup(n) {
3818
3838
  return (d, c) => (e(), t("div", {
3819
3839
  class: "wpic-skeleton wpic:animate-pulse wpic:bg-zinc-200 wpic:dark:bg-zinc-800",
3820
- style: h1({
3840
+ style: m1({
3821
3841
  width: n.width ?? "100%",
3822
3842
  height: n.height ?? "1rem",
3823
3843
  borderRadius: n.rounded ?? "4px"
@@ -3904,9 +3924,9 @@ const n9 = {
3904
3924
  emits: ["close"],
3905
3925
  setup(n, { emit: d }) {
3906
3926
  const c = y2(), o = d, r = T(!1);
3907
- return D1("wpic-pagination-url-sync", !1), D1("wpic-overlay-layer", T(99999)), (l, a) => (e(), Z(Z1, { to: "body" }, [
3927
+ return I1("wpic-pagination-url-sync", !1), I1("wpic-overlay-layer", T(99999)), (l, a) => (e(), Z(N1, { to: "body" }, [
3908
3928
  i("div", {
3909
- style: h1(m(c)?.variables),
3929
+ style: m1(m(c)?.variables),
3910
3930
  "data-wpic-theme": m(c)?.mode,
3911
3931
  class: g([{ "wpic-theme": m(c), dark: m(c)?.mode === "dark" }, "wpic-modal-overlay wpic:flex wpic:items-center wpic:justify-center wpic:bg-black/50 wpic:backdrop-blur-sm", n.size === "screen" ? "wpic:px-3" : "wpic:px-4", n.zIndex]),
3912
3932
  onMousedown: a[2] || (a[2] = b1((f) => r.value = !0, ["self"])),
@@ -3971,7 +3991,7 @@ const n9 = {
3971
3991
  emits: ["close"],
3972
3992
  setup(n, { emit: d }) {
3973
3993
  const c = d;
3974
- return D1("wpic-pagination-url-sync", !1), (o, r) => (e(), Z(Z1, { to: "body" }, [
3994
+ return I1("wpic-pagination-url-sync", !1), (o, r) => (e(), Z(N1, { to: "body" }, [
3975
3995
  i("div", {
3976
3996
  class: g(["wpic:flex wpic:items-center wpic:justify-center wpic:bg-black/50 wpic:backdrop-blur-sm wpic:px-4", n.zIndex ?? "wpic:z-[60]"]),
3977
3997
  style: { position: "fixed", top: "0", left: "0", right: "0", bottom: "0", width: "100vw", height: "100vh" },
@@ -4049,7 +4069,7 @@ const n9 = {
4049
4069
  __name: "ToastContainer",
4050
4070
  setup(n) {
4051
4071
  const d = Y9();
4052
- return (c, o) => (e(), Z(Z1, { to: "body" }, [
4072
+ return (c, o) => (e(), Z(N1, { to: "body" }, [
4053
4073
  i("div", q9, [
4054
4074
  $(o3, {
4055
4075
  tag: "div",
@@ -4352,7 +4372,7 @@ const Cl = /* @__PURE__ */ W1(M7, [["render", V7]]), $7 = ["placeholder", "rows"
4352
4372
  n.error ? "wpic:border-red-500" : "wpic:border-zinc-200 wpic:dark:border-zinc-800 focus:border-wpic-green"
4353
4373
  ]
4354
4374
  }), null, 16, B7)), [
4355
- [k0, d.value]
4375
+ [x0, d.value]
4356
4376
  ]);
4357
4377
  }
4358
4378
  }), S7 = {
@@ -4409,74 +4429,74 @@ const Cl = /* @__PURE__ */ W1(M7, [["render", V7]]), $7 = ["placeholder", "rows"
4409
4429
  placement: "bottom-start",
4410
4430
  middleware: [b2(4), g2({ padding: 8 }), z2({ padding: 8 })],
4411
4431
  whileElementsMounted: k2
4412
- }), V = /* @__PURE__ */ new Date(), s = T(V.getFullYear()), F = T(V.getMonth()), L = M(() => F.value === 11 ? s.value + 1 : s.value), B = M(() => F.value === 11 ? 0 : F.value + 1), H = T(null), x = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], k = ["Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"], O = (K, A) => {
4413
- const m1 = (new Date(K, A, 1).getDay() + 6) % 7, g1 = new Date(K, A + 1, 0).getDate(), B1 = new Date(K, A, 0).getDate(), C = [];
4414
- for (let S = m1 - 1; S >= 0; S--)
4415
- C.push({ day: B1 - S, month: A - 1, year: K, outside: !0 });
4416
- for (let S = 1; S <= g1; S++)
4417
- C.push({ day: S, month: A, year: K, outside: !1 });
4432
+ }), V = /* @__PURE__ */ new Date(), s = T(V.getFullYear()), F = T(V.getMonth()), L = M(() => F.value === 11 ? s.value + 1 : s.value), B = M(() => F.value === 11 ? 0 : F.value + 1), P = T(null), x = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], k = ["Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"], O = (K, S) => {
4433
+ const v1 = (new Date(K, S, 1).getDay() + 6) % 7, g1 = new Date(K, S + 1, 0).getDate(), B1 = new Date(K, S, 0).getDate(), C = [];
4434
+ for (let A = v1 - 1; A >= 0; A--)
4435
+ C.push({ day: B1 - A, month: S - 1, year: K, outside: !0 });
4436
+ for (let A = 1; A <= g1; A++)
4437
+ C.push({ day: A, month: S, year: K, outside: !1 });
4418
4438
  const D = 42 - C.length;
4419
- for (let S = 1; S <= D; S++)
4420
- C.push({ day: S, month: A + 1, year: K, outside: !0 });
4439
+ for (let A = 1; A <= D; A++)
4440
+ C.push({ day: A, month: S + 1, year: K, outside: !0 });
4421
4441
  return C;
4422
4442
  }, c1 = M(() => O(s.value, F.value)), s1 = M(() => O(L.value, B.value)), r1 = (K) => {
4423
- const A = K.month < 0 ? K.year - 1 : K.month > 11 ? K.year + 1 : K.year, _ = (K.month % 12 + 12) % 12;
4424
- return `${A}-${String(_ + 1).padStart(2, "0")}-${String(K.day).padStart(2, "0")}`;
4443
+ const S = K.month < 0 ? K.year - 1 : K.month > 11 ? K.year + 1 : K.year, _ = (K.month % 12 + 12) % 12;
4444
+ return `${S}-${String(_ + 1).padStart(2, "0")}-${String(K.day).padStart(2, "0")}`;
4425
4445
  }, n1 = `${V.getFullYear()}-${String(V.getMonth() + 1).padStart(2, "0")}-${String(V.getDate()).padStart(2, "0")}`, U = M(() => r.value ? c.modelValue?.start ?? null : c.modelValue ?? null), E = M(() => r.value ? c.modelValue?.end ?? null : null), Y = M(() => !!(U.value && E.value)), z = T(null), G = (K) => {
4426
4446
  if (!r.value) return !1;
4427
- const A = r1(K);
4428
- return Y.value && !H.value ? A > U.value && A < E.value : !1;
4447
+ const S = r1(K);
4448
+ return Y.value && !P.value ? S > U.value && S < E.value : !1;
4429
4449
  }, p1 = (K) => {
4430
- if (!r.value || !H.value || !z.value) return !1;
4431
- const A = r1(K), [_, m1] = [H.value, z.value].sort();
4432
- return A > _ && A < m1;
4433
- }, k1 = (K) => {
4450
+ if (!r.value || !P.value || !z.value) return !1;
4451
+ const S = r1(K), [_, v1] = [P.value, z.value].sort();
4452
+ return S > _ && S < v1;
4453
+ }, y1 = (K) => {
4434
4454
  if (!r.value) return !1;
4435
- const A = r1(K);
4436
- return A === U.value || A === E.value || H.value && A === H.value;
4455
+ const S = r1(K);
4456
+ return S === U.value || S === E.value || P.value && S === P.value;
4437
4457
  }, j = (K) => {
4438
- const A = r1(K);
4458
+ const S = r1(K);
4439
4459
  if (!r.value) {
4440
- o("update:modelValue", A), l.value = !1;
4460
+ o("update:modelValue", S), l.value = !1;
4441
4461
  return;
4442
4462
  }
4443
4463
  if (Y.value) {
4444
- o("update:modelValue", null), H.value = A;
4464
+ o("update:modelValue", null), P.value = S;
4445
4465
  return;
4446
4466
  }
4447
- if (!H.value) {
4448
- H.value = A;
4467
+ if (!P.value) {
4468
+ P.value = S;
4449
4469
  return;
4450
4470
  }
4451
- const [_, m1] = [H.value, A].sort();
4452
- o("update:modelValue", { start: _, end: m1 }), H.value = null, l.value = !1;
4471
+ const [_, v1] = [P.value, S].sort();
4472
+ o("update:modelValue", { start: _, end: v1 }), P.value = null, l.value = !1;
4453
4473
  }, e1 = (K) => {
4454
- K.stopPropagation(), o("update:modelValue", null), H.value = null;
4474
+ K.stopPropagation(), o("update:modelValue", null), P.value = null;
4455
4475
  }, q = () => {
4456
4476
  F.value === 0 ? (F.value = 11, s.value--) : F.value--;
4457
- }, x1 = () => {
4477
+ }, M1 = () => {
4458
4478
  F.value === 11 ? (F.value = 0, s.value++) : F.value++;
4459
- }, z1 = (K) => {
4460
- const [A, _, m1] = K.split("-");
4461
- return `${m1}/${_}/${A}`;
4479
+ }, k1 = (K) => {
4480
+ const [S, _, v1] = K.split("-");
4481
+ return `${v1}/${_}/${S}`;
4462
4482
  }, d1 = M(() => {
4463
- if (!r.value) return c.modelValue ? z1(c.modelValue) : "";
4483
+ if (!r.value) return c.modelValue ? k1(c.modelValue) : "";
4464
4484
  const K = c.modelValue;
4465
- return K?.start ? `${z1(K.start)} → ${K.end ? z1(K.end) : "..."}` : "";
4485
+ return K?.start ? `${k1(K.start)} → ${K.end ? k1(K.end) : "..."}` : "";
4466
4486
  });
4467
- C1(l, (K) => {
4468
- K || (H.value = null);
4469
- }), C1(l, (K) => {
4487
+ x1(l, (K) => {
4488
+ K || (P.value = null);
4489
+ }), x1(l, (K) => {
4470
4490
  if (!K || !U.value) return;
4471
- const [A, _] = U.value.split("-").map(Number);
4472
- s.value = A, F.value = _ - 1;
4491
+ const [S, _] = U.value.split("-").map(Number);
4492
+ s.value = S, F.value = _ - 1;
4473
4493
  });
4474
- const J = (K) => k1(K) ? "wpic:bg-indigo-500 wpic:text-white wpic:font-semibold" : G(K) || p1(K) ? "wpic:bg-indigo-500/15 text-wpic-green" : r1(K) === n1 ? "wpic:ring-1 ring-wpic-green/50 text-wpic-green wpic:font-medium wpic:hover:bg-black/5 wpic:dark:hover:bg-white/5" : K.outside ? "wpic:text-zinc-300 wpic:dark:text-zinc-600 wpic:hover:bg-black/5 wpic:dark:hover:bg-white/5" : "wpic:text-zinc-900 wpic:dark:text-zinc-100 wpic:hover:bg-black/5 wpic:dark:hover:bg-white/5";
4475
- return (K, A) => (e(), t("div", F7, [
4494
+ const J = (K) => y1(K) ? "wpic:bg-indigo-500 wpic:text-white wpic:font-semibold" : G(K) || p1(K) ? "wpic:bg-indigo-500/15 text-wpic-green" : r1(K) === n1 ? "wpic:ring-1 ring-wpic-green/50 text-wpic-green wpic:font-medium wpic:hover:bg-black/5 wpic:dark:hover:bg-white/5" : K.outside ? "wpic:text-zinc-300 wpic:dark:text-zinc-600 wpic:hover:bg-black/5 wpic:dark:hover:bg-white/5" : "wpic:text-zinc-900 wpic:dark:text-zinc-100 wpic:hover:bg-black/5 wpic:dark:hover:bg-white/5";
4495
+ return (K, S) => (e(), t("div", F7, [
4476
4496
  i("button", {
4477
4497
  ref_key: "triggerRef",
4478
4498
  ref: a,
4479
- onClick: A[0] || (A[0] = (_) => l.value = !l.value),
4499
+ onClick: S[0] || (S[0] = (_) => l.value = !l.value),
4480
4500
  type: "button",
4481
4501
  class: g([
4482
4502
  "wpic:w-full wpic:bg-zinc-100 wpic:dark:bg-zinc-800 wpic:border wpic:border-zinc-200 wpic:dark:border-zinc-800 wpic:hover:border-[var(--wpic-legacy-border-hover)] wpic:rounded-lg wpic:px-3 wpic:outline-none wpic:cursor-pointer wpic:flex wpic:items-center wpic:gap-2 wpic:transition",
@@ -4484,7 +4504,7 @@ const Cl = /* @__PURE__ */ W1(M7, [["render", V7]]), $7 = ["placeholder", "rows"
4484
4504
  d1.value ? "wpic:text-zinc-900 wpic:dark:text-zinc-100" : "wpic:text-zinc-400 wpic:dark:text-zinc-500"
4485
4505
  ])
4486
4506
  }, [
4487
- $(m(x0), {
4507
+ $(m(y0), {
4488
4508
  size: 13,
4489
4509
  class: "wpic:shrink-0 wpic:text-zinc-400 wpic:dark:text-zinc-500"
4490
4510
  }),
@@ -4496,7 +4516,7 @@ const Cl = /* @__PURE__ */ W1(M7, [["render", V7]]), $7 = ["placeholder", "rows"
4496
4516
  class: "wpic:text-zinc-400 wpic:dark:text-zinc-500 wpic:hover:text-zinc-900 wpic:dark:hover:text-zinc-100 wpic:transition wpic:cursor-pointer wpic:shrink-0"
4497
4517
  }, [
4498
4518
  $(m($1), { size: 12 })
4499
- ])) : (e(), Z(m(N1), {
4519
+ ])) : (e(), Z(m(K1), {
4500
4520
  key: 1,
4501
4521
  size: 14,
4502
4522
  class: "wpic:shrink-0 wpic:text-zinc-400 wpic:dark:text-zinc-500"
@@ -4506,7 +4526,7 @@ const Cl = /* @__PURE__ */ W1(M7, [["render", V7]]), $7 = ["placeholder", "rows"
4506
4526
  key: 0,
4507
4527
  ref_key: "floatingRef",
4508
4528
  ref: f,
4509
- style: h1({ ...m(b), minWidth: r.value ? "560px" : "280px" }),
4529
+ style: m1({ ...m(b), minWidth: r.value ? "560px" : "280px" }),
4510
4530
  class: "wpic:bg-white wpic:dark:bg-zinc-900 wpic:border wpic:border-zinc-200 wpic:dark:border-zinc-800 wpic:rounded-xl wpic:shadow-xl wpic:z-50 wpic:p-3"
4511
4531
  }, [
4512
4532
  i("div", P7, [
@@ -4522,7 +4542,7 @@ const Cl = /* @__PURE__ */ W1(M7, [["render", V7]]), $7 = ["placeholder", "rows"
4522
4542
  i("span", E7, v(x[F.value]) + " " + v(s.value), 1),
4523
4543
  r.value ? (e(), t("div", W7)) : (e(), t("button", {
4524
4544
  key: 0,
4525
- onClick: x1,
4545
+ onClick: M1,
4526
4546
  type: "button",
4527
4547
  class: "wpic:p-1 wpic:rounded wpic:hover:bg-black/5 wpic:dark:hover:bg-white/5 wpic:text-zinc-400 wpic:dark:text-zinc-500 wpic:hover:text-zinc-900 wpic:dark:hover:text-zinc-100 wpic:transition wpic:cursor-pointer"
4528
4548
  }, [
@@ -4536,24 +4556,24 @@ const Cl = /* @__PURE__ */ W1(M7, [["render", V7]]), $7 = ["placeholder", "rows"
4536
4556
  }, v(_), 1)), 64))
4537
4557
  ]),
4538
4558
  i("div", I7, [
4539
- (e(!0), t(I, null, l1(c1.value, (_, m1) => (e(), t("button", {
4540
- key: m1,
4559
+ (e(!0), t(I, null, l1(c1.value, (_, v1) => (e(), t("button", {
4560
+ key: v1,
4541
4561
  onClick: (g1) => j(_),
4542
4562
  onMouseenter: (g1) => z.value = r1(_),
4543
- onMouseleave: A[1] || (A[1] = (g1) => z.value = null),
4563
+ onMouseleave: S[1] || (S[1] = (g1) => z.value = null),
4544
4564
  type: "button",
4545
4565
  class: g(["wpic:h-8 wpic:w-full wpic:flex wpic:items-center wpic:justify-center wpic:rounded-lg wpic:transition wpic:cursor-pointer", J(_)])
4546
4566
  }, v(_.day), 43, R7))), 128))
4547
4567
  ])
4548
4568
  ]),
4549
4569
  r.value ? (e(), t(I, { key: 0 }, [
4550
- A[5] || (A[5] = i("div", { class: "wpic:w-px wpic:bg-zinc-200 wpic:dark:bg-zinc-700 wpic:shrink-0" }, null, -1)),
4570
+ S[5] || (S[5] = i("div", { class: "wpic:w-px wpic:bg-zinc-200 wpic:dark:bg-zinc-700 wpic:shrink-0" }, null, -1)),
4551
4571
  i("div", Z7, [
4552
4572
  i("div", N7, [
4553
- A[4] || (A[4] = i("div", { class: "wpic:w-6" }, null, -1)),
4573
+ S[4] || (S[4] = i("div", { class: "wpic:w-6" }, null, -1)),
4554
4574
  i("span", K7, v(x[B.value]) + " " + v(L.value), 1),
4555
4575
  i("button", {
4556
- onClick: x1,
4576
+ onClick: M1,
4557
4577
  type: "button",
4558
4578
  class: "wpic:p-1 wpic:rounded wpic:hover:bg-black/5 wpic:dark:hover:bg-white/5 wpic:text-zinc-400 wpic:dark:text-zinc-500 wpic:hover:text-zinc-900 wpic:dark:hover:text-zinc-100 wpic:transition wpic:cursor-pointer"
4559
4579
  }, [
@@ -4567,11 +4587,11 @@ const Cl = /* @__PURE__ */ W1(M7, [["render", V7]]), $7 = ["placeholder", "rows"
4567
4587
  }, v(_), 1)), 64))
4568
4588
  ]),
4569
4589
  i("div", O7, [
4570
- (e(!0), t(I, null, l1(s1.value, (_, m1) => (e(), t("button", {
4571
- key: m1,
4590
+ (e(!0), t(I, null, l1(s1.value, (_, v1) => (e(), t("button", {
4591
+ key: v1,
4572
4592
  onClick: (g1) => j(_),
4573
4593
  onMouseenter: (g1) => z.value = r1(_),
4574
- onMouseleave: A[2] || (A[2] = (g1) => z.value = null),
4594
+ onMouseleave: S[2] || (S[2] = (g1) => z.value = null),
4575
4595
  type: "button",
4576
4596
  class: g(["wpic:h-8 wpic:w-full wpic:flex wpic:items-center wpic:justify-center wpic:rounded-lg wpic:transition wpic:cursor-pointer", J(_)])
4577
4597
  }, v(_.day), 43, Y7))), 128))
@@ -4579,12 +4599,12 @@ const Cl = /* @__PURE__ */ W1(M7, [["render", V7]]), $7 = ["placeholder", "rows"
4579
4599
  ])
4580
4600
  ], 64)) : u("", !0)
4581
4601
  ]),
4582
- r.value ? (e(), t("div", q7, v(H.value ? "Now click the end date" : Y.value ? "Click any day to reset" : "Click start date"), 1)) : u("", !0)
4602
+ r.value ? (e(), t("div", q7, v(P.value ? "Now click the end date" : Y.value ? "Click any day to reset" : "Click start date"), 1)) : u("", !0)
4583
4603
  ], 4)) : u("", !0),
4584
4604
  l.value ? (e(), t("div", {
4585
4605
  key: 1,
4586
4606
  class: "wpic:fixed wpic:inset-0 wpic:z-40",
4587
- onClick: A[3] || (A[3] = (_) => l.value = !1)
4607
+ onClick: S[3] || (S[3] = (_) => l.value = !1)
4588
4608
  })) : u("", !0)
4589
4609
  ]));
4590
4610
  }
@@ -4682,7 +4702,7 @@ const $l = /* @__PURE__ */ W1(c8, [["render", t8]]), Bl = /* @__PURE__ */ X({
4682
4702
  emits: ["confirm", "cancel"],
4683
4703
  setup(n, { emit: d }) {
4684
4704
  const c = d;
4685
- return D1("wpic-pagination-url-sync", !1), (o, r) => (e(), Z(Z1, { to: "body" }, [
4705
+ return I1("wpic-pagination-url-sync", !1), (o, r) => (e(), Z(N1, { to: "body" }, [
4686
4706
  i("div", {
4687
4707
  class: "wpic:fixed wpic:inset-0 wpic:flex wpic:items-center wpic:justify-center wpic:bg-black/60 wpic:backdrop-blur-sm",
4688
4708
  style: { "z-index": "100010" },
@@ -4713,7 +4733,7 @@ const $l = /* @__PURE__ */ W1(c8, [["render", t8]]), Bl = /* @__PURE__ */ X({
4713
4733
  onClick: r[0] || (r[0] = (l) => c("cancel"))
4714
4734
  }, {
4715
4735
  default: o1(() => [
4716
- v1(v(n.cancelText ?? "Cancel"), 1)
4736
+ f1(v(n.cancelText ?? "Cancel"), 1)
4717
4737
  ]),
4718
4738
  _: 1
4719
4739
  }, 8, ["disabled"]),
@@ -4723,7 +4743,7 @@ const $l = /* @__PURE__ */ W1(c8, [["render", t8]]), Bl = /* @__PURE__ */ X({
4723
4743
  onClick: r[1] || (r[1] = (l) => c("confirm"))
4724
4744
  }, {
4725
4745
  default: o1(() => [
4726
- v1(v(n.confirmText ?? "Confirm"), 1)
4746
+ f1(v(n.confirmText ?? "Confirm"), 1)
4727
4747
  ]),
4728
4748
  _: 1
4729
4749
  }, 8, ["variant", "loading"])
@@ -4801,23 +4821,23 @@ const $l = /* @__PURE__ */ W1(c8, [["render", t8]]), Bl = /* @__PURE__ */ X({
4801
4821
  emits: ["update:modelValue"],
4802
4822
  setup(n, { emit: d }) {
4803
4823
  const c = n, o = d;
4804
- D1("wpic-pagination-url-sync", !1);
4824
+ I1("wpic-pagination-url-sync", !1);
4805
4825
  const r = M(() => c.width && /^(?:[0-9]|calc\(|min\(|max\(|clamp\(|var\()/.test(c.width) ? c.width : void 0), l = c0(), a = M(() => l.value && c.mobileBottom !== !1);
4806
4826
  let f = !1, b;
4807
4827
  function V() {
4808
4828
  f && (f = !1, b?.(), b = void 0);
4809
4829
  }
4810
- C1([() => c.modelValue, a], ([F]) => {
4830
+ x1([() => c.modelValue, a], ([F]) => {
4811
4831
  if (!F || a.value) {
4812
4832
  V();
4813
4833
  return;
4814
4834
  }
4815
- f || (f = !0, b = F0());
4835
+ f || (f = !0, b = H0());
4816
4836
  }, { immediate: !0 }), p3(V);
4817
4837
  function s() {
4818
4838
  o("update:modelValue", !1);
4819
4839
  }
4820
- return (F, L) => a.value ? (e(), Z(H0, {
4840
+ return (F, L) => a.value ? (e(), Z(P0, {
4821
4841
  key: 0,
4822
4842
  "model-value": n.modelValue,
4823
4843
  title: n.title,
@@ -4844,7 +4864,7 @@ const $l = /* @__PURE__ */ W1(c8, [["render", t8]]), Bl = /* @__PURE__ */ X({
4844
4864
  ]),
4845
4865
  key: "1"
4846
4866
  } : void 0
4847
- ]), 1032, ["model-value", "title", "close-label", "no-padding"])) : (e(), Z(Z1, {
4867
+ ]), 1032, ["model-value", "title", "close-label", "no-padding"])) : (e(), Z(N1, {
4848
4868
  key: 1,
4849
4869
  to: "body",
4850
4870
  class: "wpic-slide-panel"
@@ -4854,7 +4874,7 @@ const $l = /* @__PURE__ */ W1(c8, [["render", t8]]), Bl = /* @__PURE__ */ X({
4854
4874
  n.modelValue ? (e(), t("div", {
4855
4875
  key: 0,
4856
4876
  class: "wpic:fixed wpic:inset-0 wpic:bg-black/30 wpic:backdrop-blur-[2px]",
4857
- style: h1({ zIndex: (n.zIndex ?? 70) - 1, right: j2 }),
4877
+ style: m1({ zIndex: (n.zIndex ?? 70) - 1, right: j2 }),
4858
4878
  onClick: L[1] || (L[1] = (B) => s())
4859
4879
  }, null, 4)) : u("", !0)
4860
4880
  ]),
@@ -4865,7 +4885,7 @@ const $l = /* @__PURE__ */ W1(c8, [["render", t8]]), Bl = /* @__PURE__ */ X({
4865
4885
  n.modelValue ? (e(), t("div", {
4866
4886
  key: 0,
4867
4887
  class: g(["wpic-slide-panel wpic:fixed wpic:box-border wpic:flex wpic:flex-col wpic:bg-white wpic:dark:bg-zinc-900 wpic:border-zinc-200 wpic:dark:border-zinc-800 wpic:shadow-2xl", n.island ? "wpic:top-3 wpic:bottom-3 wpic:rounded-xl wpic:border wpic:overflow-hidden" : "wpic:top-0 wpic:h-full wpic:border-l", r.value ? "" : n.width ?? "wpic:w-[420px]"]),
4868
- style: h1({ width: r.value, zIndex: n.zIndex ?? 70, right: n.island ? `calc(${j2} + 12px)` : j2, maxWidth: `calc(100vw - ${j2}${n.island ? " - 24px" : ""})` })
4888
+ style: m1({ width: r.value, zIndex: n.zIndex ?? 70, right: n.island ? `calc(${j2} + 12px)` : j2, maxWidth: `calc(100vw - ${j2}${n.island ? " - 24px" : ""})` })
4869
4889
  }, [
4870
4890
  n.hideHeader ? u("", !0) : (e(), t("div", d8, [
4871
4891
  N(F.$slots, "header", {}, () => [
@@ -4956,8 +4976,8 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
4956
4976
  emits: ["update:modelValue", "update:simpleValue"],
4957
4977
  setup(n, { emit: d }) {
4958
4978
  const c = n, o = d, r = M(() => c.simpleValue ?? []), l = T(""), a = T(!1), f = M(() => {
4959
- const R = l.value.trim().toLowerCase(), Q = new Set(r.value), t1 = c.options ?? [];
4960
- return R ? t1.filter((L1) => L1.toLowerCase().includes(R) && !Q.has(L1)) : t1.filter((L1) => !Q.has(L1)).slice(0, 8);
4979
+ const R = l.value.trim().toLowerCase(), Q = new Set(r.value), i1 = c.options ?? [];
4980
+ return R ? i1.filter((L1) => L1.toLowerCase().includes(R) && !Q.has(L1)) : i1.filter((L1) => !Q.has(L1)).slice(0, 8);
4961
4981
  }), b = M(() => {
4962
4982
  if (!c.creatable || !l.value.trim()) return !1;
4963
4983
  const R = l.value.trim();
@@ -4978,9 +4998,9 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
4978
4998
  a.value = !1;
4979
4999
  }, 150);
4980
5000
  }
4981
- const B = T(""), H = T("idle"), x = T(null), k = T(null), O = T(null), c1 = T(""), s1 = T(null), r1 = T(null), n1 = T(null), U = T(!1), E = T([]), Y = T(!1);
5001
+ const B = T(""), P = T("idle"), x = T(null), k = T(null), O = T(null), c1 = T(""), s1 = T(null), r1 = T(null), n1 = T(null), U = T(!1), E = T([]), Y = T(!1);
4982
5002
  let z = null;
4983
- const { getRecent: G, addRecent: p1 } = v8(c.recentKey, 10), { floatingStyles: k1 } = C2(r1, n1, {
5003
+ const { getRecent: G, addRecent: p1 } = v8(c.recentKey, 10), { floatingStyles: y1 } = C2(r1, n1, {
4984
5004
  placement: "bottom-start",
4985
5005
  middleware: [
4986
5006
  b2(4),
@@ -5000,17 +5020,17 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
5000
5020
  function q(R) {
5001
5021
  return (c.modelValue ?? []).some((Q) => Q.tag_id === R.tag_id);
5002
5022
  }
5003
- function x1(R) {
5023
+ function M1(R) {
5004
5024
  const Q = B.value.trim().toLowerCase();
5005
5025
  if (!Q) return null;
5006
- const t1 = e1(R).toLowerCase();
5026
+ const i1 = e1(R).toLowerCase();
5007
5027
  for (const [L1, T1] of Object.entries(R.translations ?? {}))
5008
- if (T1?.value && T1.value.toLowerCase().includes(Q) && T1.value.toLowerCase() !== t1)
5028
+ if (T1?.value && T1.value.toLowerCase().includes(Q) && T1.value.toLowerCase() !== i1)
5009
5029
  return { locale: L1.toUpperCase(), value: T1.value };
5010
5030
  return null;
5011
5031
  }
5012
- const z1 = M(() => B.value.trim() ? E.value : G().map(
5013
- (Q) => (c.modelValue ?? []).find((t1) => t1.tag_id === Q) || E.value.find((t1) => t1.tag_id === Q)
5032
+ const k1 = M(() => B.value.trim() ? E.value : G().map(
5033
+ (Q) => (c.modelValue ?? []).find((i1) => i1.tag_id === Q) || E.value.find((i1) => i1.tag_id === Q)
5014
5034
  ).filter((Q) => !!Q).filter((Q) => !q(Q))), d1 = M(() => B.value.trim() ? null : c.labelRecent), J = () => {
5015
5035
  U.value = !0;
5016
5036
  }, K = () => {
@@ -5018,7 +5038,7 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
5018
5038
  U.value = !1;
5019
5039
  }, 150);
5020
5040
  };
5021
- function A() {
5041
+ function S() {
5022
5042
  if (z && clearTimeout(z), x.value && (x.value = null), k.value = null, !B.value.trim()) {
5023
5043
  E.value = [];
5024
5044
  return;
@@ -5040,12 +5060,12 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
5040
5060
  Y.value = !1;
5041
5061
  }
5042
5062
  }
5043
- function m1(R) {
5063
+ function v1(R) {
5044
5064
  R.key === "Enter" && (z && clearTimeout(z), B1()), R.key === "Escape" && (D(), U.value = !1);
5045
5065
  }
5046
5066
  async function g1(R) {
5047
5067
  if (q(R)) return;
5048
- H.value = "confirming", U.value = !1;
5068
+ P.value = "confirming", U.value = !1;
5049
5069
  const Q = c.modelValue ?? [];
5050
5070
  o("update:modelValue", [...Q, R]), p1(R.tag_id), B.value = "";
5051
5071
  try {
@@ -5053,50 +5073,50 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
5053
5073
  } catch {
5054
5074
  o("update:modelValue", Q), k.value = c.labelErrorAdding;
5055
5075
  } finally {
5056
- H.value = "idle";
5076
+ P.value = "idle";
5057
5077
  }
5058
5078
  }
5059
5079
  async function B1() {
5060
5080
  const R = B.value.trim();
5061
5081
  if (!R) return;
5062
5082
  const Q = E.value.find(
5063
- (t1) => Object.values(t1.translations ?? {}).some((L1) => L1.value?.toLowerCase() === R.toLowerCase()) || t1.slug === R.toLowerCase()
5083
+ (i1) => Object.values(i1.translations ?? {}).some((L1) => L1.value?.toLowerCase() === R.toLowerCase()) || i1.slug === R.toLowerCase()
5064
5084
  );
5065
5085
  if (Q) {
5066
5086
  g1(Q);
5067
5087
  return;
5068
5088
  }
5069
5089
  if (c.resolveFn) {
5070
- H.value = "resolving", U.value = !1, k.value = null;
5090
+ P.value = "resolving", U.value = !1, k.value = null;
5071
5091
  try {
5072
- const t1 = await c.resolveFn(R, c.locale);
5073
- if (x.value = t1, t1.existed && !q(t1)) {
5074
- await g1(t1), x.value = null;
5092
+ const i1 = await c.resolveFn(R, c.locale);
5093
+ if (x.value = i1, i1.existed && !q(i1)) {
5094
+ await g1(i1), x.value = null;
5075
5095
  return;
5076
5096
  }
5077
- H.value = "preview";
5097
+ P.value = "preview";
5078
5098
  } catch {
5079
- k.value = c.labelErrorResolving, H.value = "idle";
5099
+ k.value = c.labelErrorResolving, P.value = "idle";
5080
5100
  }
5081
5101
  }
5082
5102
  }
5083
5103
  async function C() {
5084
5104
  if (!x.value) return;
5085
- H.value = "confirming";
5105
+ P.value = "confirming";
5086
5106
  const R = x.value, Q = c.modelValue ?? [];
5087
5107
  o("update:modelValue", [...Q, R]), p1(R.tag_id);
5088
5108
  try {
5089
5109
  await c.mutateFn?.("add", R), D();
5090
5110
  } catch {
5091
- o("update:modelValue", Q), k.value = c.labelErrorAdding, H.value = "preview";
5111
+ o("update:modelValue", Q), k.value = c.labelErrorAdding, P.value = "preview";
5092
5112
  }
5093
5113
  }
5094
5114
  function D() {
5095
- x.value = null, B.value = "", k.value = null, H.value = "idle", O.value = null, E.value = [];
5115
+ x.value = null, B.value = "", k.value = null, P.value = "idle", O.value = null, E.value = [];
5096
5116
  }
5097
- async function S(R) {
5117
+ async function A(R) {
5098
5118
  const Q = c.modelValue ?? [];
5099
- o("update:modelValue", Q.filter((t1) => t1.tag_id !== R.tag_id));
5119
+ o("update:modelValue", Q.filter((i1) => i1.tag_id !== R.tag_id));
5100
5120
  try {
5101
5121
  await c.mutateFn?.("remove", R);
5102
5122
  } catch {
@@ -5106,15 +5126,15 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
5106
5126
  function a1(R) {
5107
5127
  O.value = R, c1.value = x.value?.translations?.[R]?.value || "", H1(() => s1.value?.focus());
5108
5128
  }
5109
- function u1(R) {
5129
+ function w1(R) {
5110
5130
  const Q = c1.value.trim();
5111
5131
  Q && x.value?.translations?.[R] && (x.value.translations[R].value = Q, x.value.translations[R].source = "human"), O.value = null;
5112
5132
  }
5113
5133
  return (R, Q) => (e(), t("div", f8, [
5114
5134
  n.simple ? (e(), t(I, { key: 0 }, [
5115
5135
  r.value.length ? (e(), t("div", b8, [
5116
- (e(!0), t(I, null, l1(r.value, (t1) => (e(), Z(m2, {
5117
- key: t1,
5136
+ (e(!0), t(I, null, l1(r.value, (i1) => (e(), Z(m2, {
5137
+ key: i1,
5118
5138
  variant: "default",
5119
5139
  class: "wpic:cursor-default"
5120
5140
  }, {
@@ -5123,10 +5143,10 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
5123
5143
  size: 9,
5124
5144
  class: "wpic:shrink-0 wpic:mr-0.5"
5125
5145
  }),
5126
- v1(" " + v(t1) + " ", 1),
5146
+ f1(" " + v(i1) + " ", 1),
5127
5147
  i("button", {
5128
5148
  class: "wpic:ml-1 wpic:text-zinc-400 wpic:dark:text-zinc-500 wpic:hover:text-gray-900 wpic:dark:hover:text-white wpic:transition",
5129
- onClick: (L1) => s(t1)
5149
+ onClick: (L1) => s(i1)
5130
5150
  }, [
5131
5151
  $(m($1), { size: 9 })
5132
5152
  ], 8, g8)
@@ -5136,46 +5156,46 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
5136
5156
  ])) : u("", !0),
5137
5157
  i("div", z8, [
5138
5158
  j1(i("input", {
5139
- "onUpdate:modelValue": Q[0] || (Q[0] = (t1) => l.value = t1),
5159
+ "onUpdate:modelValue": Q[0] || (Q[0] = (i1) => l.value = i1),
5140
5160
  placeholder: n.placeholder,
5141
5161
  class: "wpic:flex-1 wpic:w-full wpic:h-9 wpic:px-2.5 wpic:text-base wpic:rounded-lg wpic:border wpic:border-zinc-200 wpic:dark:border-zinc-800 wpic:bg-white wpic:dark:bg-zinc-900 wpic:text-zinc-900 wpic:dark:text-zinc-100 wpic:placeholder:text-zinc-400 wpic:dark:placeholder:text-zinc-500 wpic:outline-none wpic:transition wpic-input-field",
5142
5162
  onKeydown: F,
5143
- onFocus: Q[1] || (Q[1] = (t1) => a.value = !0),
5163
+ onFocus: Q[1] || (Q[1] = (i1) => a.value = !0),
5144
5164
  onBlur: L
5145
5165
  }, null, 40, C8), [
5146
5166
  [p2, l.value]
5147
5167
  ]),
5148
5168
  a.value && (f.value.length || b.value) ? (e(), t("div", k8, [
5149
- (e(!0), t(I, null, l1(f.value, (t1) => (e(), t("button", {
5150
- key: t1,
5169
+ (e(!0), t(I, null, l1(f.value, (i1) => (e(), t("button", {
5170
+ key: i1,
5151
5171
  type: "button",
5152
5172
  class: "wpic:flex wpic:w-full wpic:items-center wpic:gap-2 wpic:px-3 wpic:py-2 wpic:text-left wpic:text-sm wpic:text-zinc-700 wpic:hover:bg-zinc-50 wpic:dark:text-zinc-200 wpic:dark:hover:bg-zinc-800 wpic:transition-colors",
5153
- onMousedown: b1((L1) => V(t1), ["prevent"])
5173
+ onMousedown: b1((L1) => V(i1), ["prevent"])
5154
5174
  }, [
5155
5175
  $(m(T2), {
5156
5176
  size: 12,
5157
5177
  class: "wpic:shrink-0 wpic:text-zinc-400"
5158
5178
  }),
5159
- v1(" " + v(t1), 1)
5179
+ f1(" " + v(i1), 1)
5160
5180
  ], 40, x8))), 128)),
5161
5181
  b.value ? (e(), t("button", {
5162
5182
  key: 0,
5163
5183
  type: "button",
5164
5184
  class: "wpic:flex wpic:w-full wpic:items-center wpic:gap-2 wpic:px-3 wpic:py-2 wpic:text-left wpic:text-sm wpic:text-indigo-600 wpic:hover:bg-indigo-50 wpic:dark:text-indigo-400 wpic:dark:hover:bg-indigo-950/40 wpic:transition-colors wpic:border-t wpic:border-zinc-100 wpic:dark:border-zinc-800",
5165
- onMousedown: Q[2] || (Q[2] = b1((t1) => V(l.value), ["prevent"]))
5185
+ onMousedown: Q[2] || (Q[2] = b1((i1) => V(l.value), ["prevent"]))
5166
5186
  }, [
5167
5187
  $(m($2), {
5168
5188
  size: 12,
5169
5189
  class: "wpic:shrink-0"
5170
5190
  }),
5171
- v1(' Create "' + v(l.value.trim()) + '" ', 1)
5191
+ f1(' Create "' + v(l.value.trim()) + '" ', 1)
5172
5192
  ], 32)) : u("", !0)
5173
5193
  ])) : u("", !0)
5174
5194
  ])
5175
5195
  ], 64)) : (e(), t(I, { key: 1 }, [
5176
5196
  (n.modelValue ?? []).length ? (e(), t("div", y8, [
5177
- (e(!0), t(I, null, l1(n.modelValue, (t1) => (e(), Z(m2, {
5178
- key: t1.tag_id,
5197
+ (e(!0), t(I, null, l1(n.modelValue, (i1) => (e(), Z(m2, {
5198
+ key: i1.tag_id,
5179
5199
  variant: "teal",
5180
5200
  class: "wpic:cursor-default"
5181
5201
  }, {
@@ -5184,10 +5204,10 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
5184
5204
  size: 9,
5185
5205
  class: "wpic:shrink-0 wpic:mr-0.5"
5186
5206
  }),
5187
- v1(" " + v(e1(t1)) + " ", 1),
5207
+ f1(" " + v(e1(i1)) + " ", 1),
5188
5208
  i("button", {
5189
5209
  class: "wpic:ml-1 wpic:text-zinc-400 wpic:dark:text-zinc-500 wpic:hover:text-gray-900 wpic:dark:hover:text-white wpic:transition",
5190
- onClick: (L1) => S(t1)
5210
+ onClick: (L1) => A(i1)
5191
5211
  }, [
5192
5212
  $(m($1), { size: 9 })
5193
5213
  ], 8, M8)
@@ -5202,63 +5222,63 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
5202
5222
  }, [
5203
5223
  i("div", L8, [
5204
5224
  j1(i("input", {
5205
- "onUpdate:modelValue": Q[3] || (Q[3] = (t1) => B.value = t1),
5206
- disabled: H.value === "resolving" || H.value === "confirming",
5225
+ "onUpdate:modelValue": Q[3] || (Q[3] = (i1) => B.value = i1),
5226
+ disabled: P.value === "resolving" || P.value === "confirming",
5207
5227
  placeholder: n.placeholder,
5208
5228
  class: "wpic:flex-1 wpic:h-9 wpic:px-2.5 wpic:text-base wpic:rounded-lg wpic:border wpic:border-zinc-200 wpic:dark:border-zinc-800 wpic:bg-white wpic:dark:bg-zinc-900 wpic:text-zinc-900 wpic:dark:text-zinc-100 wpic:placeholder:text-zinc-400 wpic:dark:placeholder:text-zinc-500 wpic:outline-none wpic:disabled:opacity-50 wpic:transition wpic-input-field",
5209
- onInput: A,
5210
- onKeydown: m1,
5229
+ onInput: S,
5230
+ onKeydown: v1,
5211
5231
  onFocus: J,
5212
5232
  onBlur: K
5213
5233
  }, null, 40, V8), [
5214
5234
  [p2, B.value]
5215
5235
  ]),
5216
- H.value === "resolving" || Y.value ? (e(), Z(m(R1), {
5236
+ P.value === "resolving" || Y.value ? (e(), Z(m(Z1), {
5217
5237
  key: 0,
5218
5238
  size: 13,
5219
5239
  class: "wpic:text-zinc-400 wpic:dark:text-zinc-500 wpic:animate-spin wpic:shrink-0"
5220
5240
  })) : u("", !0)
5221
5241
  ]),
5222
5242
  k.value ? (e(), t("p", $8, v(k.value), 1)) : u("", !0),
5223
- U.value && z1.value.length && !x.value ? (e(), t("div", {
5243
+ U.value && k1.value.length && !x.value ? (e(), t("div", {
5224
5244
  key: 1,
5225
5245
  ref_key: "dropdownRef",
5226
5246
  ref: n1,
5227
- style: h1({ ...m(k1), minWidth: r1.value?.offsetWidth + "px" }),
5247
+ style: m1({ ...m(y1), minWidth: r1.value?.offsetWidth + "px" }),
5228
5248
  class: "wpic:bg-white wpic:dark:bg-zinc-900 wpic:border wpic:border-zinc-200 wpic:dark:border-zinc-800 wpic:rounded-lg wpic:shadow-xl wpic:z-50 wpic:overflow-y-auto"
5229
5249
  }, [
5230
5250
  d1.value ? (e(), t("div", B8, [
5231
5251
  $(m(P3), { size: 10 }),
5232
- v1(" " + v(d1.value), 1)
5252
+ f1(" " + v(d1.value), 1)
5233
5253
  ])) : u("", !0),
5234
- (e(!0), t(I, null, l1(z1.value, (t1) => (e(), t("button", {
5235
- key: t1.tag_id,
5236
- class: g(["wpic:w-full wpic:text-left wpic:px-3 wpic:py-2 wpic:hover:bg-black/5 wpic:dark:hover:bg-white/5 wpic:cursor-pointer wpic:transition wpic:flex wpic:items-center wpic:gap-2", q(t1) ? "wpic:opacity-40 wpic:cursor-default" : "wpic:text-zinc-600 wpic:dark:text-zinc-400"]),
5237
- onMousedown: b1((L1) => !q(t1) && g1(t1), ["prevent"])
5254
+ (e(!0), t(I, null, l1(k1.value, (i1) => (e(), t("button", {
5255
+ key: i1.tag_id,
5256
+ class: g(["wpic:w-full wpic:text-left wpic:px-3 wpic:py-2 wpic:hover:bg-black/5 wpic:dark:hover:bg-white/5 wpic:cursor-pointer wpic:transition wpic:flex wpic:items-center wpic:gap-2", q(i1) ? "wpic:opacity-40 wpic:cursor-default" : "wpic:text-zinc-600 wpic:dark:text-zinc-400"]),
5257
+ onMousedown: b1((L1) => !q(i1) && g1(i1), ["prevent"])
5238
5258
  }, [
5239
5259
  $(m(T2), {
5240
5260
  size: 11,
5241
5261
  class: "wpic:shrink-0 wpic:text-zinc-400 wpic:dark:text-zinc-500"
5242
5262
  }),
5243
- i("span", A8, v(e1(t1)), 1),
5244
- x1(t1) ? (e(), t(I, { key: 0 }, [
5245
- i("span", F8, v(x1(t1).locale), 1),
5246
- i("span", H8, v(x1(t1).value), 1)
5263
+ i("span", A8, v(e1(i1)), 1),
5264
+ M1(i1) ? (e(), t(I, { key: 0 }, [
5265
+ i("span", F8, v(M1(i1).locale), 1),
5266
+ i("span", H8, v(M1(i1).value), 1)
5247
5267
  ], 64)) : u("", !0),
5248
- q(t1) ? (e(), Z(m2, {
5268
+ q(i1) ? (e(), Z(m2, {
5249
5269
  key: 1,
5250
5270
  variant: "default",
5251
5271
  class: "wpic:ml-auto wpic:shrink-0"
5252
5272
  }, {
5253
5273
  default: o1(() => [
5254
- v1(v(n.labelAlreadyAdded), 1)
5274
+ f1(v(n.labelAlreadyAdded), 1)
5255
5275
  ]),
5256
5276
  _: 1
5257
5277
  })) : u("", !0)
5258
5278
  ], 42, S8))), 128))
5259
5279
  ], 4)) : u("", !0)
5260
5280
  ], 512),
5261
- x.value && (H.value === "preview" || H.value === "confirming") ? (e(), t("div", P8, [
5281
+ x.value && (P.value === "preview" || P.value === "confirming") ? (e(), t("div", P8, [
5262
5282
  i("div", T8, [
5263
5283
  i("div", j8, [
5264
5284
  i("span", E8, v(x.value.translations[n.locale]?.value || x.value.translations.en?.value || x.value.slug), 1),
@@ -5267,7 +5287,7 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
5267
5287
  variant: "default"
5268
5288
  }, {
5269
5289
  default: o1(() => [
5270
- v1(v(n.labelAlreadyAdded), 1)
5290
+ f1(v(n.labelAlreadyAdded), 1)
5271
5291
  ]),
5272
5292
  _: 1
5273
5293
  })) : x.value.existed ? (e(), Z(m2, {
@@ -5275,7 +5295,7 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
5275
5295
  variant: "default"
5276
5296
  }, {
5277
5297
  default: o1(() => [
5278
- v1(v(n.labelExisting), 1)
5298
+ f1(v(n.labelExisting), 1)
5279
5299
  ]),
5280
5300
  _: 1
5281
5301
  })) : (e(), Z(m2, {
@@ -5283,7 +5303,7 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
5283
5303
  variant: "info"
5284
5304
  }, {
5285
5305
  default: o1(() => [
5286
- v1(v(n.labelNew), 1)
5306
+ f1(v(n.labelNew), 1)
5287
5307
  ]),
5288
5308
  _: 1
5289
5309
  }))
@@ -5291,12 +5311,12 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
5291
5311
  i("span", W8, v(n.labelAutoTranslated), 1)
5292
5312
  ]),
5293
5313
  i("div", null, [
5294
- (e(!0), t(I, null, l1(n.locales, (t1) => (e(), t("div", {
5295
- key: t1,
5314
+ (e(!0), t(I, null, l1(n.locales, (i1) => (e(), t("div", {
5315
+ key: i1,
5296
5316
  class: "wpic:flex wpic:items-center wpic:gap-2 wpic:px-3 wpic:py-1.5 wpic:hover:bg-zinc-100 wpic:dark:hover:bg-zinc-800 wpic:transition wpic:group/row"
5297
5317
  }, [
5298
- i("span", D8, v(j.value[t1]), 1),
5299
- O.value === t1 ? (e(), t(I, { key: 0 }, [
5318
+ i("span", D8, v(j.value[i1]), 1),
5319
+ O.value === i1 ? (e(), t(I, { key: 0 }, [
5300
5320
  j1(i("input", {
5301
5321
  ref_for: !0,
5302
5322
  ref_key: "editInputRef",
@@ -5304,7 +5324,7 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
5304
5324
  "onUpdate:modelValue": Q[4] || (Q[4] = (L1) => c1.value = L1),
5305
5325
  class: "wpic:flex-1 wpic:h-6 wpic:px-2 wpic:text-sm wpic:bg-zinc-100 wpic:dark:bg-zinc-800 wpic:border wpic:border-zinc-200 wpic:dark:border-zinc-800 wpic:rounded wpic:text-zinc-900 wpic:dark:text-zinc-100 wpic:outline-none wpic:focus:border-gray-400 wpic:dark:focus:border-gray-500",
5306
5326
  onKeydown: [
5307
- w2((L1) => u1(t1), ["enter"]),
5327
+ w2((L1) => w1(i1), ["enter"]),
5308
5328
  Q[5] || (Q[5] = w2((L1) => O.value = null, ["escape"]))
5309
5329
  ]
5310
5330
  }, null, 40, I8), [
@@ -5312,7 +5332,7 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
5312
5332
  ]),
5313
5333
  i("button", {
5314
5334
  class: "wpic:p-0.5 wpic:text-zinc-400 wpic:dark:text-zinc-500 wpic:hover:text-green-500 wpic:transition",
5315
- onClick: (L1) => u1(t1)
5335
+ onClick: (L1) => w1(i1)
5316
5336
  }, [
5317
5337
  $(m(_1), { size: 12 })
5318
5338
  ], 8, R8),
@@ -5323,15 +5343,15 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
5323
5343
  $(m($1), { size: 12 })
5324
5344
  ])
5325
5345
  ], 64)) : (e(), t(I, { key: 1 }, [
5326
- i("span", Z8, v(x.value.translations[t1]?.value || "—"), 1),
5327
- x.value.translations[t1]?.source === "auto" ? (e(), t("span", {
5346
+ i("span", Z8, v(x.value.translations[i1]?.value || "—"), 1),
5347
+ x.value.translations[i1]?.source === "auto" ? (e(), t("span", {
5328
5348
  key: 0,
5329
5349
  class: "wpic:w-1.5 wpic:h-1.5 wpic:rounded-full wpic:bg-zinc-300 wpic:dark:bg-zinc-600 wpic:shrink-0",
5330
5350
  title: n.labelAutoTranslated
5331
5351
  }, null, 8, N8)) : u("", !0),
5332
5352
  i("button", {
5333
5353
  class: "wpic:invisible wpic:group-hover/row:visible wpic:text-sm wpic:text-zinc-400 wpic:dark:text-zinc-500 wpic:hover:text-zinc-600 wpic:dark:hover:text-zinc-400 wpic:px-1.5 wpic:py-0.5 wpic:rounded wpic:transition",
5334
- onClick: (L1) => a1(t1)
5354
+ onClick: (L1) => a1(i1)
5335
5355
  }, v(n.labelEdit), 9, K8)
5336
5356
  ], 64))
5337
5357
  ]))), 128))
@@ -5343,7 +5363,7 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
5343
5363
  onClick: D
5344
5364
  }, {
5345
5365
  default: o1(() => [
5346
- v1(v(n.labelCancel), 1)
5366
+ f1(v(n.labelCancel), 1)
5347
5367
  ]),
5348
5368
  _: 1
5349
5369
  }),
@@ -5351,11 +5371,11 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
5351
5371
  key: 0,
5352
5372
  variant: "primary",
5353
5373
  size: "sm",
5354
- loading: H.value === "confirming",
5374
+ loading: P.value === "confirming",
5355
5375
  onClick: C
5356
5376
  }, {
5357
5377
  default: o1(() => [
5358
- v1(v(n.labelConfirm), 1)
5378
+ f1(v(n.labelConfirm), 1)
5359
5379
  ]),
5360
5380
  _: 1
5361
5381
  }, 8, ["loading"]))
@@ -5430,10 +5450,10 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
5430
5450
  ],
5431
5451
  whileElementsMounted: k2
5432
5452
  });
5433
- C1(r, (z) => {
5453
+ x1(r, (z) => {
5434
5454
  z ? H1(() => V.value?.focus()) : a.value = null;
5435
5455
  });
5436
- const H = M(() => {
5456
+ const P = M(() => {
5437
5457
  const z = l.value.toLowerCase();
5438
5458
  return z ? c.items.filter((G) => G.name.toLowerCase().includes(z) ? !0 : (c.subItems[G.id] ?? []).some((p1) => p1.name.toLowerCase().includes(z))) : c.items;
5439
5459
  }), x = M(() => {
@@ -5492,7 +5512,7 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
5492
5512
  }, [
5493
5513
  $(m($1), { size: 12 })
5494
5514
  ])) : u("", !0),
5495
- $(m(N1), {
5515
+ $(m(K1), {
5496
5516
  size: 13,
5497
5517
  class: "wpic:shrink-0 wpic:text-zinc-400 wpic:dark:text-zinc-500"
5498
5518
  })
@@ -5501,7 +5521,7 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
5501
5521
  key: 0,
5502
5522
  ref_key: "floatingRef",
5503
5523
  ref: b,
5504
- style: h1({ ...m(L), minWidth: f.value?.offsetWidth + "px", width: "280px" }),
5524
+ style: m1({ ...m(L), minWidth: f.value?.offsetWidth + "px", width: "280px" }),
5505
5525
  class: "wpic:bg-white wpic:dark:bg-zinc-900 wpic:border wpic:border-zinc-200 wpic:dark:border-zinc-800 wpic:rounded-lg wpic:shadow-xl wpic:z-50 wpic:overflow-hidden"
5506
5526
  }, [
5507
5527
  i("div", Y8, [
@@ -5535,12 +5555,12 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
5535
5555
  n.modelValue ? "wpic:text-zinc-400 wpic:dark:text-zinc-500" : "text-wpic-green"
5536
5556
  ])
5537
5557
  }, v(n.placeholder), 35),
5538
- (e(!0), t(I, null, l1(H.value, (p1) => (e(), t("div", {
5558
+ (e(!0), t(I, null, l1(P.value, (p1) => (e(), t("div", {
5539
5559
  key: p1.id
5540
5560
  }, [
5541
5561
  i("button", {
5542
- onMousedown: b1((k1) => U(p1), ["prevent"]),
5543
- onMouseenter: (k1) => (n.subItems[p1.id] ?? []).length ? c1(p1.id, k1) : null,
5562
+ onMousedown: b1((y1) => U(p1), ["prevent"]),
5563
+ onMouseenter: (y1) => (n.subItems[p1.id] ?? []).length ? c1(p1.id, y1) : null,
5544
5564
  onMouseleave: s1,
5545
5565
  class: g([
5546
5566
  "wpic:w-full wpic:text-left wpic:px-3 wpic:py-2 wpic:cursor-pointer wpic:transition wpic:flex wpic:items-center wpic:justify-between",
@@ -5555,14 +5575,14 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
5555
5575
  })) : u("", !0)
5556
5576
  ], 42, Q8)
5557
5577
  ]))), 128)),
5558
- H.value.length ? u("", !0) : (e(), t("div", X8, "No results"))
5578
+ P.value.length ? u("", !0) : (e(), t("div", X8, "No results"))
5559
5579
  ])
5560
5580
  ], 4)) : u("", !0),
5561
5581
  r.value && a.value !== null && k.value.length ? (e(), t("div", {
5562
5582
  key: 1,
5563
5583
  ref_key: "subPanelRef",
5564
5584
  ref: F,
5565
- style: h1(m(B)),
5585
+ style: m1(m(B)),
5566
5586
  class: "wpic:bg-white wpic:dark:bg-zinc-900 wpic:border wpic:border-zinc-200 wpic:dark:border-zinc-800 wpic:rounded-lg wpic:shadow-xl wpic:z-[51] wpic:overflow-hidden wpic:w-[320px] wpic:max-h-[280px] wpic:overflow-y-auto",
5567
5587
  onMouseenter: r1,
5568
5588
  onMouseleave: n1
@@ -5572,7 +5592,7 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
5572
5592
  ]),
5573
5593
  (e(!0), t(I, null, l1(k.value, (p1) => (e(), t("button", {
5574
5594
  key: p1.id,
5575
- onMousedown: b1((k1) => E(a.value, p1), ["prevent"]),
5595
+ onMousedown: b1((y1) => E(a.value, p1), ["prevent"]),
5576
5596
  class: g([
5577
5597
  "wpic:w-full wpic:text-left wpic:px-3 wpic:py-2 wpic:cursor-pointer wpic:transition wpic:flex wpic:items-center wpic:gap-2",
5578
5598
  n.subValue === p1.id ? "text-wpic-green" : "wpic:text-zinc-600 wpic:dark:text-zinc-400 wpic:hover:bg-black/5 wpic:dark:hover:bg-white/5 wpic:hover:text-zinc-900 wpic:dark:hover:text-zinc-100 wpic:dark:hover:text-white"
@@ -5583,7 +5603,7 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
5583
5603
  size: 12,
5584
5604
  class: "wpic:shrink-0 wpic:text-zinc-400 wpic:dark:text-zinc-500"
5585
5605
  })) : u("", !0),
5586
- v1(" " + v(p1.name), 1)
5606
+ f1(" " + v(p1.name), 1)
5587
5607
  ], 42, nn))), 128))
5588
5608
  ], 36)) : u("", !0),
5589
5609
  r.value ? (e(), t("div", {
@@ -5638,7 +5658,7 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
5638
5658
  ], 10, cn))), 128)),
5639
5659
  n.files.length ? u("", !0) : (e(), t("div", an, [
5640
5660
  N(r.$slots, "empty", {}, () => [
5641
- l[0] || (l[0] = v1("No files", -1))
5661
+ l[0] || (l[0] = f1("No files", -1))
5642
5662
  ])
5643
5663
  ]))
5644
5664
  ]));
@@ -5675,11 +5695,11 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
5675
5695
  a.value = !0;
5676
5696
  }, d.delay ?? 300));
5677
5697
  }
5678
- function H() {
5698
+ function P() {
5679
5699
  f && clearTimeout(f), a.value = !1;
5680
5700
  }
5681
- return U1(H), C1(() => d.disabled, (x) => {
5682
- x && H();
5701
+ return O1(P), x1(() => d.disabled, (x) => {
5702
+ x && P();
5683
5703
  }), (x, k) => (e(), t(I, null, [
5684
5704
  i("span", G1({
5685
5705
  ref_key: "reference",
@@ -5687,15 +5707,15 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
5687
5707
  }, x.$attrs, {
5688
5708
  class: ["wpic-tooltip", d.inline === !1 ? "wpic:block" : "wpic:inline-flex"],
5689
5709
  onMouseenter: B,
5690
- onMouseleave: H,
5691
- onClickCapture: H,
5710
+ onMouseleave: P,
5711
+ onClickCapture: P,
5692
5712
  onFocusin: B,
5693
- onFocusout: H,
5694
- onKeydown: w2(H, ["esc"])
5713
+ onFocusout: P,
5714
+ onKeydown: w2(P, ["esc"])
5695
5715
  }), [
5696
5716
  N(x.$slots, "default")
5697
5717
  ], 16),
5698
- (e(), Z(Z1, { to: "body" }, [
5718
+ (e(), Z(N1, { to: "body" }, [
5699
5719
  $(c2, {
5700
5720
  "enter-active-class": "wpic:transition-opacity wpic:duration-150 wpic:ease-out",
5701
5721
  "enter-from-class": "wpic:opacity-0",
@@ -5709,17 +5729,17 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
5709
5729
  key: 0,
5710
5730
  ref_key: "floating",
5711
5731
  ref: r,
5712
- style: h1([m(c)?.variables, m(b)]),
5732
+ style: m1([m(c)?.variables, m(b)]),
5713
5733
  class: g([{ "wpic-theme": m(c), dark: m(c)?.mode === "dark" }, "wpic-tooltip-panel wpic:pointer-events-none wpic:z-[9999] wpic:max-w-[200px] wpic:whitespace-pre-line wpic:break-words"]),
5714
5734
  "data-wpic-theme": m(c)?.mode,
5715
5735
  role: "tooltip"
5716
5736
  }, [
5717
- v1(v(n.content) + " ", 1),
5737
+ f1(v(n.content) + " ", 1),
5718
5738
  i("div", {
5719
5739
  ref_key: "arrowEl",
5720
5740
  ref: l,
5721
5741
  class: "wpic-tooltip-arrow",
5722
- style: h1(L.value)
5742
+ style: m1(L.value)
5723
5743
  }, null, 4)
5724
5744
  ], 14, on)) : u("", !0)
5725
5745
  ]),
@@ -5806,7 +5826,7 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
5806
5826
  class: "wpic-stat-card__change wpic:shrink-0 wpic:text-xs wpic:font-medium wpic:tabular-nums",
5807
5827
  title: n.changeTitle,
5808
5828
  "aria-label": n.changeTitle ? `${n.change}. ${n.changeTitle}` : void 0,
5809
- style: h1({ color: n.changeTone === "negative" ? "var(--wpic-negative)" : n.changeTone === "neutral" ? "var(--wpic-muted)" : "var(--wpic-accent)" })
5829
+ style: m1({ color: n.changeTone === "negative" ? "var(--wpic-negative)" : n.changeTone === "neutral" ? "var(--wpic-muted)" : "var(--wpic-accent)" })
5810
5830
  }, v(n.change), 13, un)) : u("", !0)
5811
5831
  ]),
5812
5832
  i("div", {
@@ -5814,16 +5834,16 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
5814
5834
  }, [
5815
5835
  i("strong", {
5816
5836
  class: g([n.compact ? "wpic:text-lg" : "wpic:text-2xl", "wpic-stat-card__value wpic:font-semibold wpic:tracking-tight wpic:tabular-nums wpic:text-[var(--wpic-text)]"]),
5817
- style: h1(n.color ? { color: n.color } : void 0)
5837
+ style: m1(n.color ? { color: n.color } : void 0)
5818
5838
  }, [
5819
- v1(v(n.value), 1),
5839
+ f1(v(n.value), 1),
5820
5840
  n.unit ? (e(), t("span", hn, v(n.unit), 1)) : u("", !0)
5821
5841
  ], 6),
5822
5842
  n.change && n.changePosition !== "label" ? (e(), t("span", {
5823
5843
  key: 0,
5824
5844
  title: n.changeTitle,
5825
5845
  class: "wpic-stat-card__change wpic:shrink-0 wpic:text-sm wpic:font-medium",
5826
- style: h1({ color: n.changeTone === "negative" ? "var(--wpic-negative)" : n.changeTone === "neutral" ? "var(--wpic-muted)" : "var(--wpic-accent)" })
5846
+ style: m1({ color: n.changeTone === "negative" ? "var(--wpic-negative)" : n.changeTone === "neutral" ? "var(--wpic-muted)" : "var(--wpic-accent)" })
5827
5847
  }, v(n.change), 13, mn)) : u("", !0)
5828
5848
  ], 2),
5829
5849
  n.trend !== void 0 ? (e(), t("div", vn, [
@@ -5837,7 +5857,7 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
5837
5857
  n.sub ? (e(), t("p", {
5838
5858
  key: 1,
5839
5859
  class: "wpic:mt-2 wpic:text-xs wpic:tabular-nums",
5840
- style: h1({ color: n.subColor || "var(--wpic-muted)" })
5860
+ style: m1({ color: n.subColor || "var(--wpic-muted)" })
5841
5861
  }, v(n.sub), 5)) : u("", !0)
5842
5862
  ]),
5843
5863
  _: 1
@@ -5848,15 +5868,15 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
5848
5868
  i("p", bn, v(n.label), 1),
5849
5869
  i("p", {
5850
5870
  class: "wpic:text-2xl wpic:font-semibold wpic:tabular-nums wpic:tracking-tight wpic:leading-none wpic-legacy-text-main wpic:mb-2",
5851
- style: h1(n.color ? `color:${n.color}` : "")
5871
+ style: m1(n.color ? `color:${n.color}` : "")
5852
5872
  }, [
5853
- v1(v(n.value) + " ", 1),
5873
+ f1(v(n.value) + " ", 1),
5854
5874
  n.unit ? (e(), t("span", gn, v(n.unit), 1)) : u("", !0)
5855
5875
  ], 4),
5856
5876
  n.sub ? (e(), t("p", {
5857
5877
  key: 0,
5858
5878
  class: "wpic:text-xs wpic:mt-1 wpic:tabular-nums",
5859
- style: h1(n.subColor ? `color:${n.subColor}` : "color:var(--wpic-legacy-text-dim)")
5879
+ style: m1(n.subColor ? `color:${n.subColor}` : "color:var(--wpic-legacy-text-dim)")
5860
5880
  }, v(n.sub), 5)) : u("", !0)
5861
5881
  ], 2));
5862
5882
  }
@@ -5975,7 +5995,7 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
5975
5995
  }, [
5976
5996
  i("div", {
5977
5997
  class: g(["wpic:h-full wpic:rounded-full", [n.color ? "" : "wpic:bg-indigo-500", n.animated ? "wpic:animate-pulse" : ""]]),
5978
- style: h1(r.value)
5998
+ style: m1(r.value)
5979
5999
  }, null, 6)
5980
6000
  ], 2)
5981
6001
  ]));
@@ -6040,7 +6060,7 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
6040
6060
  V.dot ? (e(), t("span", {
6041
6061
  key: 1,
6042
6062
  class: "wpic:w-1.5 wpic:h-1.5 wpic:rounded-full wpic:shrink-0",
6043
- style: h1({ background: V.dot })
6063
+ style: m1({ background: V.dot })
6044
6064
  }, null, 4)) : u("", !0),
6045
6065
  n.selectionIndicator ? (e(), t("span", {
6046
6066
  key: 2,
@@ -6075,7 +6095,7 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
6075
6095
  V.dot ? (e(), t("span", {
6076
6096
  key: 1,
6077
6097
  class: "wpic:w-1.5 wpic:h-1.5 wpic:rounded-full wpic:shrink-0",
6078
- style: h1({ background: V.dot })
6098
+ style: m1({ background: V.dot })
6079
6099
  }, null, 4)) : u("", !0),
6080
6100
  n.selectionIndicator ? (e(), t("span", {
6081
6101
  key: 2,
@@ -6133,7 +6153,7 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
6133
6153
  },
6134
6154
  setup(n) {
6135
6155
  const d = n, c = T(!1);
6136
- C1(() => d.src, () => {
6156
+ x1(() => d.src, () => {
6137
6157
  c.value = !1;
6138
6158
  });
6139
6159
  const o = M(() => !!d.src && !c.value), r = M(() => ({
@@ -6246,7 +6266,7 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
6246
6266
  function s(n1) {
6247
6267
  return b(n1)?.toLocaleDateString(c.locale, { year: "numeric", month: "short", day: "numeric" }) ?? n1;
6248
6268
  }
6249
- const F = M(() => c.displayLabel || (c.modelValue ? s(c.modelValue) : c.placeholder)), L = M(() => f.value.toLocaleDateString(c.locale, { month: "long", year: "numeric" })), B = M(() => c.popoverAutoPlacement ?? !c.popoverPlacement), H = M(() => {
6269
+ const F = M(() => c.displayLabel || (c.modelValue ? s(c.modelValue) : c.placeholder)), L = M(() => f.value.toLocaleDateString(c.locale, { month: "long", year: "numeric" })), B = M(() => c.popoverAutoPlacement ?? !c.popoverPlacement), P = M(() => {
6250
6270
  const n1 = new Date(2024, 0, c.weekStartsOn === 1 ? 1 : 7);
6251
6271
  return Array.from({ length: 7 }, (U, E) => {
6252
6272
  const Y = new Date(n1);
@@ -6255,8 +6275,8 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
6255
6275
  }), x = M(() => {
6256
6276
  const n1 = f.value.getFullYear(), U = f.value.getMonth(), E = new Date(n1, U, 1), Y = c.weekStartsOn === 1 ? (E.getDay() + 6) % 7 : E.getDay(), z = new Date(n1, U, 1 - Y);
6257
6277
  return Array.from({ length: 42 }, (G, p1) => {
6258
- const k1 = new Date(z);
6259
- return k1.setDate(z.getDate() + p1), { iso: V(k1), day: k1.getDate(), inMonth: k1.getMonth() === U };
6278
+ const y1 = new Date(z);
6279
+ return y1.setDate(z.getDate() + p1), { iso: V(y1), day: y1.getDate(), inMonth: y1.getMonth() === U };
6260
6280
  });
6261
6281
  });
6262
6282
  function k(n1) {
@@ -6274,7 +6294,7 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
6274
6294
  function r1(n1) {
6275
6295
  return n1.iso === c.modelValue ? "wpic:bg-[var(--wpic-primary)] wpic:text-white wpic:font-semibold" : k(n1.iso) ? "wpic:cursor-not-allowed wpic:text-zinc-200 wpic:dark:text-zinc-700" : n1.inMonth ? n1.iso === V(a) ? "wpic:text-[var(--wpic-primary)] wpic:ring-1 wpic:ring-[var(--wpic-primary)]/40 wpic:hover:bg-zinc-100 wpic:dark:hover:bg-zinc-800" : "wpic:text-zinc-700 wpic:hover:bg-zinc-100 wpic:dark:text-zinc-200 wpic:dark:hover:bg-zinc-800" : "wpic:text-zinc-300 wpic:hover:bg-zinc-100 wpic:dark:text-zinc-600 wpic:dark:hover:bg-zinc-800";
6276
6296
  }
6277
- return C1(r, (n1) => {
6297
+ return x1(r, (n1) => {
6278
6298
  if (!n1) return;
6279
6299
  const U = b(c.modelValue), E = b(c.max) ?? a, Y = U ?? E;
6280
6300
  f.value = new Date(Y.getFullYear(), Y.getMonth(), 1);
@@ -6300,7 +6320,7 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
6300
6320
  class: "wpic:shrink-0 wpic:text-zinc-400"
6301
6321
  }),
6302
6322
  i("span", Kn, v(F.value), 1),
6303
- !n.clearable || !n.modelValue ? (e(), Z(m(N1), {
6323
+ !n.clearable || !n.modelValue ? (e(), Z(m(K1), {
6304
6324
  key: 0,
6305
6325
  size: 14,
6306
6326
  class: "wpic:ml-auto wpic:shrink-0 wpic:text-zinc-400"
@@ -6316,7 +6336,7 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
6316
6336
  }, [
6317
6337
  $(m($1), { size: 14 })
6318
6338
  ], 8, Un)) : u("", !0),
6319
- $(K1, {
6339
+ $(U1, {
6320
6340
  open: r.value,
6321
6341
  anchor: l.value,
6322
6342
  placement: n.popoverPlacement ?? "bottom-start",
@@ -6347,7 +6367,7 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
6347
6367
  ])
6348
6368
  ]),
6349
6369
  i("div", Qn, [
6350
- (e(!0), t(I, null, l1(H.value, (E) => (e(), t("span", {
6370
+ (e(!0), t(I, null, l1(P.value, (E) => (e(), t("span", {
6351
6371
  key: E,
6352
6372
  class: "wpic:py-1 wpic:text-center wpic:text-[11px] wpic:font-medium wpic:uppercase wpic:text-zinc-400 wpic:dark:text-zinc-500"
6353
6373
  }, v(E), 1))), 128))
@@ -6411,24 +6431,24 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
6411
6431
  }, 600);
6412
6432
  }
6413
6433
  return (L, B) => (e(), t("div", _n, [
6414
- (e(!0), t(I, null, l1(l.value, (H, x) => (e(), t("div", {
6434
+ (e(!0), t(I, null, l1(l.value, (P, x) => (e(), t("div", {
6415
6435
  key: x,
6416
6436
  class: g("wpic:flex wpic:items-center wpic:gap-2 wpic:overflow-x-auto no-scrollbar wpic:py-1 wpic:flex-nowrap wpic:sm:flex-wrap")
6417
6437
  }, [
6418
- (e(!0), t(I, null, l1(H, (k, O) => (e(), t(I, { key: O }, [
6419
- k.type === "search" ? (e(), Z(S0, {
6438
+ (e(!0), t(I, null, l1(P, (k, O) => (e(), t(I, { key: O }, [
6439
+ k.type === "search" ? (e(), Z(A0, {
6420
6440
  key: 0,
6421
6441
  "model-value": a(k.modelKey),
6422
6442
  icon: m(W2),
6423
6443
  placeholder: k.placeholder ?? "Search…",
6424
6444
  clearable: k.clearable ?? !0,
6425
6445
  class: "wpic:flex-1 wpic:min-w-0",
6426
- style: h1(k.width ? { width: k.width } : {}),
6446
+ style: m1(k.width ? { width: k.width } : {}),
6427
6447
  "onUpdate:modelValue": (c1) => V(k.modelKey, c1)
6428
6448
  }, null, 8, ["model-value", "icon", "placeholder", "clearable", "style", "onUpdate:modelValue"])) : k.type === "select" ? (e(), t("div", {
6429
6449
  key: 1,
6430
6450
  class: "wpic:shrink-0 wpic:text-base",
6431
- style: h1({ width: k.width ?? "150px" })
6451
+ style: m1({ width: k.width ?? "150px" })
6432
6452
  }, [
6433
6453
  $(J2, G1({ ref_for: !0 }, n.selectLabels, {
6434
6454
  "model-value": a(k.modelKey),
@@ -6449,7 +6469,7 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
6449
6469
  max: k.max,
6450
6470
  clearable: k.clearable ?? !0,
6451
6471
  class: "wpic:shrink-0",
6452
- style: h1({ width: k.width ?? "170px" }),
6472
+ style: m1({ width: k.width ?? "170px" }),
6453
6473
  "onUpdate:modelValue": (c1) => s(k.modelKey, c1)
6454
6474
  }, null, 8, ["model-value", "placeholder", "locale", "min", "max", "clearable", "style", "onUpdate:modelValue"])) : k.type === "pills" ? (e(), t(I, { key: 3 }, [
6455
6475
  $(Pn, {
@@ -6531,14 +6551,14 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
6531
6551
  onClick: b[1] || (b[1] = (V) => o.value = !o.value)
6532
6552
  }, {
6533
6553
  default: o1(() => [
6534
- $(m(N1), { size: 14 })
6554
+ $(m(K1), { size: 14 })
6535
6555
  ]),
6536
6556
  _: 1
6537
6557
  }, 8, ["variant", "size", "disabled", "aria-expanded", "aria-label"])
6538
6558
  ]),
6539
6559
  _: 3
6540
6560
  }, 512),
6541
- $(K1, {
6561
+ $(U1, {
6542
6562
  open: o.value,
6543
6563
  anchor: l.value,
6544
6564
  placement: "bottom-end",
@@ -7072,7 +7092,7 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
7072
7092
  }, null, 2),
7073
7093
  i("span", ae, v(b.value ? b.value.shade ? `${b.value.name}-${b.value.shade}` : b.value.name : n.modelValue), 1)
7074
7094
  ], 512),
7075
- $(K1, {
7095
+ $(U1, {
7076
7096
  open: l.value,
7077
7097
  anchor: r.value,
7078
7098
  placement: "bottom-start",
@@ -7106,7 +7126,7 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
7106
7126
  n.modelValue === `bg-${L}-${B}` ? "wpic:border-indigo-500 wpic:ring-2 wpic:ring-indigo-500/40" : "wpic:border-black/10 wpic:dark:border-white/10"
7107
7127
  ]]),
7108
7128
  title: `bg-${L}-${B}`,
7109
- onClick: (H) => V(`bg-${L}-${B}`)
7129
+ onClick: (P) => V(`bg-${L}-${B}`)
7110
7130
  }, null, 10, pe))), 128))
7111
7131
  ], 64))), 128))
7112
7132
  ])
@@ -7164,38 +7184,38 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
7164
7184
  return `${j.getFullYear()}-${String(j.getMonth() + 1).padStart(2, "0")}-${String(j.getDate()).padStart(2, "0")}`;
7165
7185
  }
7166
7186
  function B(j) {
7167
- const e1 = /* @__PURE__ */ new Date(), q = e1.getFullYear(), x1 = e1.getMonth(), z1 = e1.getDate();
7187
+ const e1 = /* @__PURE__ */ new Date(), q = e1.getFullYear(), M1 = e1.getMonth(), k1 = e1.getDate();
7168
7188
  switch (j) {
7169
7189
  case "today":
7170
7190
  return { since: L(e1), until: L(e1), preset: j };
7171
7191
  case "yesterday": {
7172
7192
  const d1 = new Date(e1);
7173
- return d1.setDate(z1 - 1), { since: L(d1), until: L(d1), preset: j };
7193
+ return d1.setDate(k1 - 1), { since: L(d1), until: L(d1), preset: j };
7174
7194
  }
7175
7195
  case "7d": {
7176
7196
  const d1 = new Date(e1);
7177
- return d1.setDate(z1 - 6), { since: L(d1), until: L(e1), preset: j };
7197
+ return d1.setDate(k1 - 6), { since: L(d1), until: L(e1), preset: j };
7178
7198
  }
7179
7199
  case "30d": {
7180
7200
  const d1 = new Date(e1);
7181
- return d1.setDate(z1 - 29), { since: L(d1), until: L(e1), preset: j };
7201
+ return d1.setDate(k1 - 29), { since: L(d1), until: L(e1), preset: j };
7182
7202
  }
7183
7203
  case "90d": {
7184
7204
  const d1 = new Date(e1);
7185
- return d1.setDate(z1 - 89), { since: L(d1), until: L(e1), preset: j };
7205
+ return d1.setDate(k1 - 89), { since: L(d1), until: L(e1), preset: j };
7186
7206
  }
7187
7207
  case "mtd":
7188
- return { since: `${q}-${String(x1 + 1).padStart(2, "0")}-01`, until: L(e1), preset: j };
7208
+ return { since: `${q}-${String(M1 + 1).padStart(2, "0")}-01`, until: L(e1), preset: j };
7189
7209
  case "ytd":
7190
7210
  return { since: `${q}-01-01`, until: L(e1), preset: j };
7191
7211
  default:
7192
7212
  return { since: f.value, until: b.value || L(e1), preset: "custom" };
7193
7213
  }
7194
7214
  }
7195
- const H = M(() => {
7215
+ const P = M(() => {
7196
7216
  if (!c.modelValue) return "";
7197
7217
  const { since: j, until: e1, preset: q } = c.modelValue;
7198
- return q && q !== "custom" ? c.presets.find((x1) => x1.value === q)?.label ?? "" : j === e1 ? j : `${j} → ${e1}`;
7218
+ return q && q !== "custom" ? c.presets.find((M1) => M1.value === q)?.label ?? "" : j === e1 ? j : `${j} → ${e1}`;
7199
7219
  });
7200
7220
  function x(j) {
7201
7221
  a.value = j, j !== "custom" && (o("update:modelValue", B(j)), r.value = !1);
@@ -7211,8 +7231,8 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
7211
7231
  }
7212
7232
  const U = M(() => {
7213
7233
  const j = new Date(k.value, O.value, 1), e1 = new Date(k.value, O.value + 1, 0), q = [];
7214
- let x1 = j.getDay() === 0 ? 6 : j.getDay() - 1;
7215
- for (let d1 = x1 - 1; d1 >= 0; d1--) {
7234
+ let M1 = j.getDay() === 0 ? 6 : j.getDay() - 1;
7235
+ for (let d1 = M1 - 1; d1 >= 0; d1--) {
7216
7236
  const J = new Date(k.value, O.value, -d1);
7217
7237
  q.push({ date: L(J), day: J.getDate(), inMonth: !1 });
7218
7238
  }
@@ -7220,9 +7240,9 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
7220
7240
  const J = new Date(k.value, O.value, d1);
7221
7241
  q.push({ date: L(J), day: d1, inMonth: !0 });
7222
7242
  }
7223
- const z1 = 7 - q.length % 7;
7224
- if (z1 < 7)
7225
- for (let d1 = 1; d1 <= z1; d1++) {
7243
+ const k1 = 7 - q.length % 7;
7244
+ if (k1 < 7)
7245
+ for (let d1 = 1; d1 <= k1; d1++) {
7226
7246
  const J = new Date(k.value, O.value + 1, d1);
7227
7247
  q.push({ date: L(J), day: d1, inMonth: !1 });
7228
7248
  }
@@ -7247,10 +7267,10 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
7247
7267
  preset: "custom"
7248
7268
  }), r.value = !1);
7249
7269
  }
7250
- function k1() {
7270
+ function y1() {
7251
7271
  a.value = null, f.value = "", b.value = "", o("update:modelValue", null), r.value = !1;
7252
7272
  }
7253
- return C1(() => c.modelValue, (j) => {
7273
+ return x1(() => c.modelValue, (j) => {
7254
7274
  a.value = j?.preset ?? null, f.value = j?.since ?? "", b.value = j?.until ?? "", F.value = "from";
7255
7275
  }), (j, e1) => (e(), t("div", de, [
7256
7276
  i("button", {
@@ -7272,8 +7292,8 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
7272
7292
  size: 16,
7273
7293
  class: "wpic:shrink-0 wpic:text-zinc-400"
7274
7294
  }),
7275
- H.value ? (e(), t("span", ue, v(H.value), 1)) : (e(), t("span", he, v(n.placeholder), 1)),
7276
- !n.clearable || !n.modelValue ? (e(), Z(m(N1), {
7295
+ P.value ? (e(), t("span", ue, v(P.value), 1)) : (e(), t("span", he, v(n.placeholder), 1)),
7296
+ !n.clearable || !n.modelValue ? (e(), Z(m(K1), {
7277
7297
  key: 2,
7278
7298
  size: 14,
7279
7299
  class: "wpic:ml-auto wpic:shrink-0 wpic:text-zinc-400"
@@ -7284,12 +7304,12 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
7284
7304
  type: "button",
7285
7305
  disabled: n.disabled,
7286
7306
  "aria-label": n.clearLabel,
7287
- onClick: b1(k1, ["stop"]),
7307
+ onClick: b1(y1, ["stop"]),
7288
7308
  class: "wpic-date-clear wpic:absolute wpic:right-2 wpic:top-1/2 wpic:-translate-y-1/2 wpic:rounded wpic:p-0.5 wpic:cursor-pointer wpic:text-zinc-400 wpic:hover:text-zinc-700 wpic:dark:hover:text-zinc-200 wpic:disabled:cursor-not-allowed wpic:disabled:opacity-50 wpic:focus-visible:outline-2 wpic:focus-visible:outline-[var(--wpic-primary)]"
7289
7309
  }, [
7290
7310
  $(m($1), { size: 14 })
7291
7311
  ], 8, me)) : u("", !0),
7292
- $(K1, {
7312
+ $(U1, {
7293
7313
  "mobile-sheet": "",
7294
7314
  "sheet-title": n.ariaLabel || n.placeholder,
7295
7315
  "close-label": n.closeLabel,
@@ -7309,7 +7329,7 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
7309
7329
  ]]),
7310
7330
  "aria-pressed": a.value === q.value,
7311
7331
  type: "button",
7312
- onClick: (x1) => x(q.value)
7332
+ onClick: (M1) => x(q.value)
7313
7333
  }, v(q.label), 11, be))), 128))
7314
7334
  ]),
7315
7335
  a.value === "custom" ? (e(), t("div", ge, [
@@ -7346,7 +7366,7 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
7346
7366
  "data-in-range": Y(q.date) || void 0,
7347
7367
  "data-today": z(q.date) || void 0,
7348
7368
  type: "button",
7349
- onClick: (x1) => G(q.date),
7369
+ onClick: (M1) => G(q.date),
7350
7370
  class: g([
7351
7371
  "wpic-calendar-day wpic:relative wpic:flex wpic:h-8 wpic:w-8 wpic:items-center wpic:justify-center wpic:rounded-full wpic:text-sm wpic:transition-colors wpic:cursor-pointer",
7352
7372
  !q.inMonth && "wpic:text-zinc-300 wpic:dark:text-zinc-600",
@@ -7409,10 +7429,10 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
7409
7429
  function B(x) {
7410
7430
  return !!(c.min && x < c.min || c.max && x > c.max);
7411
7431
  }
7412
- function H(x) {
7432
+ function P(x) {
7413
7433
  B(x) || (o("update:modelValue", x), o("change", x), r.value = !1);
7414
7434
  }
7415
- return C1(r, (x) => {
7435
+ return x1(r, (x) => {
7416
7436
  x && (f.value = b(c.modelValue)?.getFullYear() ?? a.getFullYear());
7417
7437
  }), (x, k) => (e(), t("div", Fe, [
7418
7438
  i("button", {
@@ -7431,12 +7451,12 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
7431
7451
  class: "wpic:shrink-0 wpic:text-zinc-400 wpic:dark:text-zinc-500"
7432
7452
  }),
7433
7453
  i("span", Pe, v(F.value), 1),
7434
- $(m(N1), {
7454
+ $(m(K1), {
7435
7455
  size: 13,
7436
7456
  class: "wpic:ml-auto wpic:shrink-0 wpic:text-zinc-400 wpic:dark:text-zinc-500"
7437
7457
  })
7438
7458
  ], 10, He),
7439
- $(K1, {
7459
+ $(U1, {
7440
7460
  open: r.value,
7441
7461
  anchor: l.value,
7442
7462
  placement: "bottom-start",
@@ -7470,7 +7490,7 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
7470
7490
  type: "button",
7471
7491
  disabled: B(O.value),
7472
7492
  class: g(["wpic:rounded-lg wpic:px-2 wpic:py-2 wpic:capitalize wpic:transition wpic:disabled:cursor-not-allowed wpic:disabled:opacity-30", O.value === n.modelValue ? "wpic:bg-zinc-900 wpic:font-medium wpic:text-white wpic:dark:bg-zinc-100 wpic:dark:text-zinc-900" : "wpic:text-zinc-700 wpic:hover:bg-zinc-100 wpic:dark:text-zinc-200 wpic:dark:hover:bg-zinc-800"]),
7473
- onClick: (c1) => H(O.value)
7493
+ onClick: (c1) => P(O.value)
7474
7494
  }, v(O.label), 11, De))), 128))
7475
7495
  ])
7476
7496
  ])
@@ -7504,9 +7524,9 @@ const f8 = { class: "wpic-tag-input" }, b8 = {
7504
7524
  n.visible ? (e(), t("div", Ie, [
7505
7525
  i("span", Re, [
7506
7526
  n.count && n.count > 0 ? (e(), t(I, { key: 0 }, [
7507
- v1(v(n.count) + " " + v(n.countLabel ?? "selected"), 1)
7527
+ f1(v(n.count) + " " + v(n.countLabel ?? "selected"), 1)
7508
7528
  ], 64)) : (e(), t(I, { key: 1 }, [
7509
- v1(v(n.emptyLabel ?? "Select items"), 1)
7529
+ f1(v(n.emptyLabel ?? "Select items"), 1)
7510
7530
  ], 64))
7511
7531
  ]),
7512
7532
  N(d.$slots, "default"),
@@ -18223,15 +18243,15 @@ c36 -78 76 -117 152 -146 53 -20 76 -23 190 -22 137 2 262 27 295 59 10 11 17
18223
18243
  o.value = document.documentElement.classList.contains("dark") ? "dark" : "light";
18224
18244
  };
18225
18245
  f(), r = new MutationObserver(f), r.observe(document.documentElement, { attributes: !0, attributeFilter: ["class"] });
18226
- }), U1(() => r?.disconnect());
18246
+ }), O1(() => r?.disconnect());
18227
18247
  const l = M(() => d.mode === "auto" ? c.value?.mode ?? o.value : d.mode), a = M(() => ({
18228
18248
  mode: l.value,
18229
- variables: O5(l.value, d.colors?.[l.value])
18249
+ variables: Y5(l.value, d.colors?.[l.value])
18230
18250
  }));
18231
- return D1(A0, a), (f, b) => (e(), t("div", {
18251
+ return I1(F0, a), (f, b) => (e(), t("div", {
18232
18252
  class: g({ "wpic-theme": a.value, dark: a.value?.mode === "dark" }),
18233
18253
  "data-wpic-theme": a.value?.mode,
18234
- style: h1(a.value?.variables)
18254
+ style: m1(a.value?.variables)
18235
18255
  }, [
18236
18256
  N(f.$slots, "default")
18237
18257
  ], 14, ei));
@@ -18262,7 +18282,7 @@ c36 -78 76 -117 152 -146 53 -20 76 -23 190 -22 137 2 262 27 295 59 10 11 17
18262
18282
  (e(), Z(S1(`h${n.headingLevel}`), { class: "wpic:text-2xl wpic:font-semibold wpic:leading-tight wpic:tracking-tight wpic:[overflow-wrap:anywhere]" }, {
18263
18283
  default: o1(() => [
18264
18284
  N(d.$slots, "title", {}, () => [
18265
- v1(v(n.title), 1)
18285
+ f1(v(n.title), 1)
18266
18286
  ])
18267
18287
  ]),
18268
18288
  _: 3
@@ -18294,7 +18314,7 @@ c36 -78 76 -117 152 -146 53 -20 76 -23 190 -22 137 2 262 27 295 59 10 11 17
18294
18314
  setup(n, { emit: d }) {
18295
18315
  const c = n, o = d, r = (f) => ({ type: "doc", content: [{ type: "paragraph", content: f ? [{ type: "text", text: f }] : [] }] });
18296
18316
  let l = c.modelValue;
18297
- const a = V0({
18317
+ const a = $0({
18298
18318
  extensions: [I3.extend({ content: "paragraph" }), R3.extend({ renderHTML: () => ["span", 0] }), Z3, N3.configure({ limit: c.maxLength })],
18299
18319
  content: r(c.modelValue),
18300
18320
  editable: !c.disabled,
@@ -18317,11 +18337,11 @@ c36 -78 76 -117 152 -146 53 -20 76 -23 190 -22 137 2 262 27 295 59 10 11 17
18317
18337
  f.commands.setContent(r(b), { emitUpdate: !1 }), o("update:modelValue", b), o("commit", b);
18318
18338
  }
18319
18339
  });
18320
- return C1(() => c.modelValue, (f) => {
18340
+ return x1(() => c.modelValue, (f) => {
18321
18341
  a.value && a.value.getText() !== f && a.value.commands.setContent(r(f), { emitUpdate: !1 });
18322
- }), C1(() => [c.disabled, c.label, c.placeholder], () => {
18342
+ }), x1(() => [c.disabled, c.label, c.placeholder], () => {
18323
18343
  a.value?.setEditable(!c.disabled), a.value?.setOptions({ editorProps: { attributes: { role: "textbox", "aria-label": c.label, "aria-multiline": "false", "aria-readonly": String(c.disabled), "data-placeholder": c.placeholder, spellcheck: "true", tabindex: c.disabled ? "-1" : "0" } } });
18324
- }), (f, b) => (e(), Z(m($0), {
18344
+ }), (f, b) => (e(), Z(m(B0), {
18325
18345
  editor: m(a),
18326
18346
  class: "wpic-editable-text",
18327
18347
  "data-empty": !n.modelValue
@@ -18343,7 +18363,7 @@ c36 -78 76 -117 152 -146 53 -20 76 -23 190 -22 137 2 262 27 295 59 10 11 17
18343
18363
  return { type: "doc", content: f.split(`
18344
18364
  `).map((b) => ({ type: "paragraph", content: b ? [{ type: "text", text: b }] : [] })) };
18345
18365
  }
18346
- const a = V0({
18366
+ const a = $0({
18347
18367
  extensions: [
18348
18368
  K3.configure({
18349
18369
  heading: !1,
@@ -18368,18 +18388,18 @@ c36 -78 76 -117 152 -146 53 -20 76 -23 190 -22 137 2 262 27 295 59 10 11 17
18368
18388
  r("update:modelValue", f.getText());
18369
18389
  }
18370
18390
  });
18371
- return C1(() => o.modelValue, (f) => {
18391
+ return x1(() => o.modelValue, (f) => {
18372
18392
  !a.value || a.value.getText() === f || a.value.commands.setContent(l(f), { emitUpdate: !1 });
18373
- }), C1(() => o.placeholder, (f) => {
18393
+ }), x1(() => o.placeholder, (f) => {
18374
18394
  a.value?.setOptions({ editorProps: { attributes: { class: "wpic-chat-tiptap wpic:overflow-y-auto wpic:outline-none", "aria-label": f } } }), a.value && a.value.view.dispatch(a.value.state.tr);
18375
- }), C1(() => o.disabled, (f) => {
18395
+ }), x1(() => o.disabled, (f) => {
18376
18396
  a.value?.setEditable(!f);
18377
18397
  }), d({
18378
18398
  focus: () => a.value?.commands.focus("end")
18379
- }), (f, b) => (e(), Z(m($0), {
18399
+ }), (f, b) => (e(), Z(m(B0), {
18380
18400
  editor: m(a),
18381
18401
  class: "wpic-chat-editor wpic:min-w-0 wpic:flex-1 wpic:px-4 wpic:pb-3 wpic:pt-1.5 wpic:text-base wpic:leading-7 wpic:text-zinc-900 wpic:dark:text-zinc-100",
18382
- style: h1(`--chat-min-lines:${o.minLines ?? 3};--chat-max-lines:${o.maxLines ?? 6}`),
18402
+ style: m1(`--chat-min-lines:${o.minLines ?? 3};--chat-max-lines:${o.maxLines ?? 6}`),
18383
18403
  onClick: b[0] || (b[0] = (V) => m(a)?.commands.focus())
18384
18404
  }, null, 8, ["editor", "style"]));
18385
18405
  }
@@ -18447,11 +18467,11 @@ c36 -78 76 -117 152 -146 53 -20 76 -23 190 -22 137 2 262 27 295 59 10 11 17
18447
18467
  },
18448
18468
  emits: ["submit", "select-session", "request-history", "files-selected", "remove-attachment", "update:minimized"],
18449
18469
  setup(n, { expose: d, emit: c }) {
18450
- const o = n, r = c, l = `wpic-chat-composer-${G2().uid}`, a = `url(#${l})`, f = T(""), b = M(() => !o.attachments.some((C) => C.status === "loading")), V = M(() => !!f.value.trim() && !o.disabled && b.value), s = T(null), F = T(null), L = T(null), B = T(!1), H = M({ get: () => o.minimized, set: (C) => r("update:minimized", C) }), x = M(() => B.value || !H.value), k = M(() => f.value.trim() || o.placeholder), O = T(!1);
18470
+ const o = n, r = c, l = `wpic-chat-composer-${G2().uid}`, a = `url(#${l})`, f = T(""), b = M(() => !o.attachments.some((C) => C.status === "loading")), V = M(() => !!f.value.trim() && !o.disabled && b.value), s = T(null), F = T(null), L = T(null), B = T(!1), P = M({ get: () => o.minimized, set: (C) => r("update:minimized", C) }), x = M(() => B.value || !P.value), k = M(() => f.value.trim() || o.placeholder), O = T(!1);
18451
18471
  let c1 = null;
18452
18472
  const s1 = T(!1), r1 = T(null), n1 = T(null);
18453
18473
  let U = null;
18454
- C1(s1, (C) => {
18474
+ x1(s1, (C) => {
18455
18475
  C || (U && clearTimeout(U), r1.value = null, n1.value = null);
18456
18476
  });
18457
18477
  const E = M(() => {
@@ -18467,7 +18487,7 @@ c36 -78 76 -117 152 -146 53 -20 76 -23 190 -22 137 2 262 27 295 59 10 11 17
18467
18487
  function p1() {
18468
18488
  U && clearTimeout(U);
18469
18489
  }
18470
- function k1() {
18490
+ function y1() {
18471
18491
  U && clearTimeout(U), U = setTimeout(() => {
18472
18492
  r1.value = null, n1.value = null;
18473
18493
  }, 140);
@@ -18477,15 +18497,15 @@ c36 -78 76 -117 152 -146 53 -20 76 -23 190 -22 137 2 262 27 295 59 10 11 17
18477
18497
  }
18478
18498
  function e1() {
18479
18499
  if (!x.value) {
18480
- H.value = !1;
18500
+ P.value = !1;
18481
18501
  return;
18482
18502
  }
18483
- o.showHistory ? j() : m1();
18503
+ o.showHistory ? j() : v1();
18484
18504
  }
18485
18505
  function q() {
18486
- s1.value = !1, B.value = !1, O.value = !1, H.value = !0;
18506
+ s1.value = !1, B.value = !1, O.value = !1, P.value = !0;
18487
18507
  }
18488
- function x1(C) {
18508
+ function M1(C) {
18489
18509
  if (!C) return "";
18490
18510
  const D = new Date(C);
18491
18511
  return Number.isNaN(D.getTime()) ? "" : new Intl.DateTimeFormat(o.locale, {
@@ -18494,7 +18514,7 @@ c36 -78 76 -117 152 -146 53 -20 76 -23 190 -22 137 2 262 27 295 59 10 11 17
18494
18514
  year: D.getFullYear() === (/* @__PURE__ */ new Date()).getFullYear() ? void 0 : "numeric"
18495
18515
  }).format(D);
18496
18516
  }
18497
- function z1(C) {
18517
+ function k1(C) {
18498
18518
  s1.value = !1, r("select-session", C);
18499
18519
  }
18500
18520
  function d1() {
@@ -18507,20 +18527,20 @@ c36 -78 76 -117 152 -146 53 -20 76 -23 190 -22 137 2 262 27 295 59 10 11 17
18507
18527
  function K() {
18508
18528
  o.disabled || L.value?.click();
18509
18529
  }
18510
- async function A(C) {
18511
- const D = C.target, S = Array.from(D.files ?? []);
18512
- D.value = "", S.length && (B.value = !0, r("files-selected", S), await H1(), F.value?.focus());
18530
+ async function S(C) {
18531
+ const D = C.target, A = Array.from(D.files ?? []);
18532
+ D.value = "", A.length && (B.value = !0, r("files-selected", A), await H1(), F.value?.focus());
18513
18533
  }
18514
18534
  function _(C) {
18515
18535
  return C ? C < 1024 ? `${C} B` : C < 1024 * 1024 ? `${Math.round(C / 1024)} KB` : `${(C / (1024 * 1024)).toFixed(1)} MB` : "";
18516
18536
  }
18517
- async function m1() {
18537
+ async function v1() {
18518
18538
  B.value || (B.value = !0, O.value = !1, c1 && clearTimeout(c1), c1 = setTimeout(() => {
18519
18539
  O.value = !0, c1 = null;
18520
18540
  }, 500)), await H1(), requestAnimationFrame(() => F.value?.focus());
18521
18541
  }
18522
18542
  async function g1(C) {
18523
- f.value = C, await m1();
18543
+ f.value = C, await v1();
18524
18544
  }
18525
18545
  d({ openWithPrompt: g1 });
18526
18546
  function B1(C) {
@@ -18528,7 +18548,7 @@ c36 -78 76 -117 152 -146 53 -20 76 -23 190 -22 137 2 262 27 295 59 10 11 17
18528
18548
  const D = C?.relatedTarget;
18529
18549
  D instanceof Node && s.value?.contains(D) || !C && document.activeElement instanceof Node && s.value?.contains(document.activeElement) || (B.value = !1, O.value = !1);
18530
18550
  }
18531
- return U1(() => {
18551
+ return O1(() => {
18532
18552
  c1 && clearTimeout(c1), U && clearTimeout(U);
18533
18553
  }), (C, D) => (e(), t("div", {
18534
18554
  class: g(["wpic:pointer-events-none wpic-chat-composer-position wpic:fixed wpic:inset-x-3 wpic:bottom-20 wpic:z-[9100] wpic:flex wpic:sm:bottom-5", x.value ? "wpic:justify-center" : "wpic:justify-end"])
@@ -18555,7 +18575,7 @@ c36 -78 76 -117 152 -146 53 -20 76 -23 190 -22 137 2 262 27 295 59 10 11 17
18555
18575
  width: "100%",
18556
18576
  height: "100%",
18557
18577
  rx: "24",
18558
- style: h1({ stroke: a })
18578
+ style: m1({ stroke: a })
18559
18579
  }, null, 4)
18560
18580
  ])) : u("", !0),
18561
18581
  x.value ? (e(), t("span", wi)) : u("", !0),
@@ -18566,7 +18586,7 @@ c36 -78 76 -117 152 -146 53 -20 76 -23 190 -22 137 2 262 27 295 59 10 11 17
18566
18586
  "aria-expanded": s1.value,
18567
18587
  onClick: e1
18568
18588
  }, [
18569
- $(m(M0), { size: 21 })
18589
+ $(m(L0), { size: 21 })
18570
18590
  ], 10, ui),
18571
18591
  $(c2, { name: "wpic-composer-content" }, {
18572
18592
  default: o1(() => [
@@ -18574,13 +18594,13 @@ c36 -78 76 -117 152 -146 53 -20 76 -23 190 -22 137 2 262 27 295 59 10 11 17
18574
18594
  key: "compact",
18575
18595
  type: "button",
18576
18596
  class: "wpic:min-w-0 wpic:flex-1 wpic:truncate wpic:px-4 wpic:py-2.5 wpic:text-left wpic:text-base wpic:text-zinc-500 wpic:transition-colors wpic:hover:text-zinc-900 wpic:dark:text-zinc-500 wpic:dark:hover:text-zinc-300",
18577
- onClick: m1
18597
+ onClick: v1
18578
18598
  }, v(k.value), 1)) : B.value ? (e(), t("div", hi, [
18579
18599
  $(pi, {
18580
18600
  ref_key: "editor",
18581
18601
  ref: F,
18582
18602
  modelValue: f.value,
18583
- "onUpdate:modelValue": D[0] || (D[0] = (S) => f.value = S),
18603
+ "onUpdate:modelValue": D[0] || (D[0] = (A) => f.value = A),
18584
18604
  placeholder: n.placeholder,
18585
18605
  disabled: n.disabled,
18586
18606
  "min-lines": 3,
@@ -18588,11 +18608,11 @@ c36 -78 76 -117 152 -146 53 -20 76 -23 190 -22 137 2 262 27 295 59 10 11 17
18588
18608
  onSubmit: d1
18589
18609
  }, null, 8, ["modelValue", "placeholder", "disabled"]),
18590
18610
  o.attachments.length ? (e(), t("div", mi, [
18591
- (e(!0), t(I, null, l1(o.attachments, (S) => (e(), t("span", {
18592
- key: S.id,
18593
- class: g(["wpic:inline-flex wpic:max-w-56 wpic:items-center wpic:gap-1.5 wpic:rounded-lg wpic:bg-white/60 wpic:px-2 wpic:py-1 wpic:text-xs wpic:text-zinc-600 wpic:ring-1 wpic:ring-indigo-900/[0.06] wpic:dark:bg-black/20 wpic:dark:text-zinc-300 wpic:dark:ring-white/[0.06]", S.status === "error" ? "wpic:bg-red-50/80 wpic:text-red-700 wpic:dark:bg-red-950/40 wpic:dark:text-red-300" : ""])
18611
+ (e(!0), t(I, null, l1(o.attachments, (A) => (e(), t("span", {
18612
+ key: A.id,
18613
+ class: g(["wpic:inline-flex wpic:max-w-56 wpic:items-center wpic:gap-1.5 wpic:rounded-lg wpic:bg-white/60 wpic:px-2 wpic:py-1 wpic:text-xs wpic:text-zinc-600 wpic:ring-1 wpic:ring-indigo-900/[0.06] wpic:dark:bg-black/20 wpic:dark:text-zinc-300 wpic:dark:ring-white/[0.06]", A.status === "error" ? "wpic:bg-red-50/80 wpic:text-red-700 wpic:dark:bg-red-950/40 wpic:dark:text-red-300" : ""])
18594
18614
  }, [
18595
- S.status === "loading" ? (e(), Z(m(R1), {
18615
+ A.status === "loading" ? (e(), Z(m(Z1), {
18596
18616
  key: 0,
18597
18617
  size: 12,
18598
18618
  class: "wpic:shrink-0 wpic:animate-spin"
@@ -18601,14 +18621,14 @@ c36 -78 76 -117 152 -146 53 -20 76 -23 190 -22 137 2 262 27 295 59 10 11 17
18601
18621
  size: 12,
18602
18622
  class: "wpic:shrink-0"
18603
18623
  })),
18604
- i("span", vi, v(S.name), 1),
18605
- _(S.bytes) ? (e(), t("span", fi, v(_(S.bytes)), 1)) : u("", !0),
18624
+ i("span", vi, v(A.name), 1),
18625
+ _(A.bytes) ? (e(), t("span", fi, v(_(A.bytes)), 1)) : u("", !0),
18606
18626
  i("button", {
18607
18627
  type: "button",
18608
18628
  class: "wpic:ml-0.5 wpic:inline-flex wpic:h-4 wpic:w-4 wpic:shrink-0 wpic:items-center wpic:justify-center wpic:rounded-full wpic:text-zinc-400 wpic:transition wpic:hover:bg-black/5 wpic:hover:text-zinc-700 wpic:dark:hover:bg-white/10 wpic:dark:hover:text-zinc-100",
18609
18629
  title: n.removeAttachmentLabel,
18610
18630
  "aria-label": n.removeAttachmentLabel,
18611
- onClick: (a1) => J(S)
18631
+ onClick: (a1) => J(A)
18612
18632
  }, [
18613
18633
  $(m($1), { size: 10 })
18614
18634
  ], 8, bi)
@@ -18638,11 +18658,11 @@ c36 -78 76 -117 152 -146 53 -20 76 -23 190 -22 137 2 262 27 295 59 10 11 17
18638
18658
  "aria-label": n.sendLabel,
18639
18659
  onClick: d1
18640
18660
  }, [
18641
- n.disabled ? (e(), Z(m(R1), {
18661
+ n.disabled ? (e(), Z(m(Z1), {
18642
18662
  key: 0,
18643
18663
  size: 17,
18644
18664
  class: "wpic:animate-spin"
18645
- })) : (e(), Z(m(L0), {
18665
+ })) : (e(), Z(m(V0), {
18646
18666
  key: 1,
18647
18667
  size: 17,
18648
18668
  "stroke-width": "2.5"
@@ -18659,7 +18679,7 @@ c36 -78 76 -117 152 -146 53 -20 76 -23 190 -22 137 2 262 27 295 59 10 11 17
18659
18679
  multiple: "",
18660
18680
  class: "wpic:sr-only",
18661
18681
  accept: n.accept,
18662
- onChange: A
18682
+ onChange: S
18663
18683
  }, null, 40, Ci)) : u("", !0),
18664
18684
  B.value ? (e(), t("div", ki, [
18665
18685
  N(C.$slots, "composer-actions", {}, void 0, !0)
@@ -18681,42 +18701,42 @@ c36 -78 76 -117 152 -146 53 -20 76 -23 190 -22 137 2 262 27 295 59 10 11 17
18681
18701
  }, 8, ["disabled", "title", "aria-label"])
18682
18702
  ])) : u("", !0)
18683
18703
  ], 34),
18684
- $(K1, {
18704
+ $(U1, {
18685
18705
  open: s1.value,
18686
18706
  anchor: s.value,
18687
18707
  placement: "top",
18688
18708
  width: "min(520px, calc(100vw - 16px))",
18689
18709
  "max-height": "320px",
18690
- onClose: D[1] || (D[1] = (S) => s1.value = !1)
18710
+ onClose: D[1] || (D[1] = (A) => s1.value = !1)
18691
18711
  }, {
18692
18712
  default: o1(() => [
18693
18713
  i("div", yi, [
18694
18714
  n.historyLoading ? (e(), t("div", Mi, [
18695
- $(m(R1), {
18715
+ $(m(Z1), {
18696
18716
  size: 15,
18697
18717
  class: "wpic:animate-spin"
18698
18718
  }),
18699
- v1(" " + v(n.loadingLabel), 1)
18719
+ f1(" " + v(n.loadingLabel), 1)
18700
18720
  ])) : o.sessions.length ? (e(), t(I, { key: 2 }, [
18701
18721
  o.projects.length ? (e(), t("div", Vi, [
18702
18722
  i("p", $i, v(n.projectsLabel), 1),
18703
- (e(!0), t(I, null, l1(o.projects, (S) => (e(), t("div", {
18704
- key: S.id,
18723
+ (e(!0), t(I, null, l1(o.projects, (A) => (e(), t("div", {
18724
+ key: A.id,
18705
18725
  class: "wpic-select-option wpic:rounded-lg wpic:flex wpic:items-center wpic:gap-2 wpic:px-4 wpic:py-2 wpic:text-base wpic:text-zinc-700 wpic:hover:bg-zinc-100 wpic:dark:text-zinc-200 wpic:dark:hover:bg-zinc-700",
18706
18726
  tabindex: "0",
18707
18727
  role: "button",
18708
- "aria-expanded": r1.value === S.id,
18709
- onFocus: (a1) => G(S.id, a1),
18710
- onClick: (a1) => G(S.id, a1),
18728
+ "aria-expanded": r1.value === A.id,
18729
+ onFocus: (a1) => G(A.id, a1),
18730
+ onClick: (a1) => G(A.id, a1),
18711
18731
  onKeydown: [
18712
- w2(b1((a1) => G(S.id, a1), ["prevent"]), ["enter"]),
18713
- w2(b1((a1) => G(S.id, a1), ["prevent"]), ["space"])
18732
+ w2(b1((a1) => G(A.id, a1), ["prevent"]), ["enter"]),
18733
+ w2(b1((a1) => G(A.id, a1), ["prevent"]), ["space"])
18714
18734
  ],
18715
- onMouseenter: (a1) => G(S.id, a1),
18716
- onMouseleave: k1
18735
+ onMouseenter: (a1) => G(A.id, a1),
18736
+ onMouseleave: y1
18717
18737
  }, [
18718
- i("span", Si, v(S.name), 1),
18719
- i("span", Ai, v(E.value.get(S.id)?.length ?? 0), 1),
18738
+ i("span", Si, v(A.name), 1),
18739
+ i("span", Ai, v(E.value.get(A.id)?.length ?? 0), 1),
18720
18740
  $(m(E1), {
18721
18741
  size: 14,
18722
18742
  class: "wpic:text-zinc-400"
@@ -18724,55 +18744,55 @@ c36 -78 76 -117 152 -146 53 -20 76 -23 190 -22 137 2 262 27 295 59 10 11 17
18724
18744
  ], 40, Bi))), 128))
18725
18745
  ])) : u("", !0),
18726
18746
  i("p", Fi, v(n.conversationsLabel), 1),
18727
- (e(!0), t(I, null, l1(Y.value, (S) => (e(), t("button", {
18728
- key: S.id,
18747
+ (e(!0), t(I, null, l1(Y.value, (A) => (e(), t("button", {
18748
+ key: A.id,
18729
18749
  type: "button",
18730
- class: g(["wpic-select-option wpic:rounded-lg wpic:grid wpic:w-full wpic:grid-cols-[minmax(0,1fr)_auto] wpic:items-center wpic:gap-5 wpic:px-4 wpic:py-3 wpic:text-left wpic:text-base wpic:text-zinc-700 wpic:transition wpic:hover:bg-zinc-100 wpic:dark:text-zinc-200 wpic:dark:hover:bg-zinc-700", S.highlighted ? "wpic:bg-indigo-50/70 wpic:dark:bg-indigo-950/30" : ""]),
18731
- onClick: (a1) => z1(S.id)
18750
+ class: g(["wpic-select-option wpic:rounded-lg wpic:grid wpic:w-full wpic:grid-cols-[minmax(0,1fr)_auto] wpic:items-center wpic:gap-5 wpic:px-4 wpic:py-3 wpic:text-left wpic:text-base wpic:text-zinc-700 wpic:transition wpic:hover:bg-zinc-100 wpic:dark:text-zinc-200 wpic:dark:hover:bg-zinc-700", A.highlighted ? "wpic:bg-indigo-50/70 wpic:dark:bg-indigo-950/30" : ""]),
18751
+ onClick: (a1) => k1(A.id)
18732
18752
  }, [
18733
18753
  i("span", Pi, [
18734
18754
  i("span", Ti, [
18735
- i("span", ji, v(S.title), 1),
18736
- S.badge ? (e(), t("span", Ei, v(S.badge), 1)) : u("", !0)
18755
+ i("span", ji, v(A.title), 1),
18756
+ A.badge ? (e(), t("span", Ei, v(A.badge), 1)) : u("", !0)
18737
18757
  ]),
18738
- i("span", Wi, v(S.subtitle || n.generalConversationLabel), 1)
18758
+ i("span", Wi, v(A.subtitle || n.generalConversationLabel), 1)
18739
18759
  ]),
18740
- S.updatedAt ? (e(), t("time", {
18760
+ A.updatedAt ? (e(), t("time", {
18741
18761
  key: 0,
18742
- datetime: S.updatedAt,
18762
+ datetime: A.updatedAt,
18743
18763
  class: "wpic:whitespace-nowrap wpic:text-base wpic:text-zinc-400 wpic:dark:text-zinc-500"
18744
- }, v(x1(S.updatedAt)), 9, Di)) : u("", !0)
18764
+ }, v(M1(A.updatedAt)), 9, Di)) : u("", !0)
18745
18765
  ], 10, Hi))), 128))
18746
18766
  ], 64)) : (e(), t("p", Li, v(n.noConversationsLabel), 1))
18747
18767
  ]),
18748
- $(K1, {
18768
+ $(U1, {
18749
18769
  open: s1.value && !!r1.value,
18750
18770
  anchor: n1.value,
18751
18771
  placement: "right",
18752
18772
  width: "min(360px, calc(100vw - 16px))",
18753
18773
  "max-height": "320px",
18754
18774
  offset: 4,
18755
- onClose: k1
18775
+ onClose: y1
18756
18776
  }, {
18757
18777
  default: o1(() => [
18758
18778
  i("div", {
18759
18779
  class: "wpic-chat-composer-menu wpic:p-1",
18760
18780
  onMouseenter: p1,
18761
- onMouseleave: k1
18781
+ onMouseleave: y1
18762
18782
  }, [
18763
18783
  z.value.length ? u("", !0) : (e(), t("p", Ii, v(n.noConversationsLabel), 1)),
18764
- (e(!0), t(I, null, l1(z.value, (S) => (e(), t("button", {
18765
- key: S.id,
18784
+ (e(!0), t(I, null, l1(z.value, (A) => (e(), t("button", {
18785
+ key: A.id,
18766
18786
  type: "button",
18767
18787
  class: "wpic-select-option wpic:rounded-lg wpic:grid wpic:w-full wpic:grid-cols-[minmax(0,1fr)_auto] wpic:gap-4 wpic:px-3 wpic:py-2 wpic:text-left wpic:text-base wpic:text-zinc-700 wpic:hover:bg-zinc-100 wpic:dark:text-zinc-200 wpic:dark:hover:bg-zinc-700",
18768
- onClick: (a1) => z1(S.id)
18788
+ onClick: (a1) => k1(A.id)
18769
18789
  }, [
18770
- i("span", Zi, v(S.title), 1),
18771
- S.updatedAt ? (e(), t("time", {
18790
+ i("span", Zi, v(A.title), 1),
18791
+ A.updatedAt ? (e(), t("time", {
18772
18792
  key: 0,
18773
- datetime: S.updatedAt,
18793
+ datetime: A.updatedAt,
18774
18794
  class: "wpic:whitespace-nowrap wpic:text-zinc-400"
18775
- }, v(x1(S.updatedAt)), 9, Ni)) : u("", !0)
18795
+ }, v(M1(A.updatedAt)), 9, Ni)) : u("", !0)
18776
18796
  ], 8, Ri))), 128))
18777
18797
  ], 32)
18778
18798
  ]),
@@ -18803,7 +18823,7 @@ export {
18803
18823
  Bl as TableRow,
18804
18824
  vl as ToastContainer,
18805
18825
  jl as TreeSelect,
18806
- b0 as WActionMenu,
18826
+ g0 as WActionMenu,
18807
18827
  v2 as WActionMenuItem,
18808
18828
  pl as WActionPanel,
18809
18829
  Kl as WAlert,
@@ -18811,14 +18831,14 @@ export {
18811
18831
  Il as WBadge,
18812
18832
  f9 as WBanner,
18813
18833
  Xl as WBatchActionBar,
18814
- H0 as WBottomSheet,
18834
+ P0 as WBottomSheet,
18815
18835
  t2 as WButton,
18816
18836
  q3 as WButtonGroup,
18817
18837
  A9 as WCard,
18818
18838
  ia as WChatComposer,
18819
18839
  pi as WChatEditor,
18820
18840
  al as WChatPanel,
18821
- f0 as WCheckbox,
18841
+ b0 as WCheckbox,
18822
18842
  Gn as WDatePicker,
18823
18843
  Ql as WDateRangePicker,
18824
18844
  ta as WEditableText,
@@ -18828,9 +18848,9 @@ export {
18828
18848
  cl as WFilter,
18829
18849
  Ol as WFilterBar,
18830
18850
  gl as WFormActions,
18831
- B0 as WFormLabel,
18851
+ S0 as WFormLabel,
18832
18852
  Ul as WImageTile,
18833
- S0 as WInput,
18853
+ A0 as WInput,
18834
18854
  wl as WLoader,
18835
18855
  hl as WModal,
18836
18856
  Jl as WMonthPicker,
@@ -18838,7 +18858,7 @@ export {
18838
18858
  ca as WPageHeader,
18839
18859
  ol as WPagination,
18840
18860
  Pn as WPillGroup,
18841
- K1 as WPopover,
18861
+ U1 as WPopover,
18842
18862
  Rl as WProgress,
18843
18863
  p8 as WSearchSelect,
18844
18864
  Gl as WSegmentedControl,
@@ -18864,8 +18884,8 @@ export {
18864
18884
  zl as WTwoColumnFormSection,
18865
18885
  bl as WWorkflowNav,
18866
18886
  ll as chartPalettes,
18867
- O5 as themeVariables,
18868
- U5 as ui5Theme,
18887
+ Y5 as themeVariables,
18888
+ O5 as ui5Theme,
18869
18889
  v8 as useRecentItems,
18870
18890
  Y9 as useToastStore,
18871
18891
  y2 as useWTheme