@orchidui/dashboard 1.8.1-9 → 1.8.1-91

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,15 +1,15 @@
1
1
  var pt = Object.defineProperty;
2
2
  var gt = (n, V, r) => V in n ? pt(n, V, { enumerable: !0, configurable: !0, writable: !0, value: r }) : n[V] = r;
3
- var We = (n, V, r) => gt(n, typeof V != "symbol" ? V + "" : V, r);
4
- import { ref as v, computed as ke, openBlock as m, createBlock as X, unref as w, normalizeClass as A, withCtx as W, createVNode as T, createCommentVNode as D, createSlots as vt, renderSlot as ze, createElementBlock as E, normalizeStyle as te, onMounted as Je, createElementVNode as h, Fragment as ge, renderList as Ke, toDisplayString as Fe, createTextVNode as ve, watch as we, withKeys as ot, inject as Re, reactive as _e, provide as Be, nextTick as mt, withDirectives as ft, vShow as ht, defineComponent as bt, defineAsyncComponent as it } from "vue";
5
- import { Q as Y, a as yt } from "./QuillEditor-BHWfmp5D.js";
6
- import { BaseInput as st, Dropdown as rt, Input as $e, Icon as Q, Modal as xt, Select as Ze, Slider as Qe } from "@orchidui/core";
7
- import { hslToRgb as et, hsl2Hex as tt, rgb2Hex as lt, rgbaToHex8 as kt, hexToRgb as je, rgbToHue as Ae, rgbToHsl as at, hex8ToRgba as $t, parseRgba as wt, parseRgb as St } from "./Dashboard/ColorPicker/components/converters.js";
3
+ var ze = (n, V, r) => gt(n, typeof V != "symbol" ? V + "" : V, r);
4
+ import { ref as v, computed as he, openBlock as m, createBlock as q, unref as w, normalizeClass as Q, withCtx as Y, createVNode as T, createCommentVNode as D, createSlots as vt, renderSlot as Ke, createElementBlock as E, normalizeStyle as ee, onMounted as _e, watch as ye, createElementVNode as h, Fragment as pe, renderList as Ze, toDisplayString as Ne, createTextVNode as ge, withKeys as it, inject as Be, reactive as et, provide as Te, nextTick as mt, withDirectives as ft, vShow as bt, defineComponent as ht, defineAsyncComponent as st } from "vue";
5
+ import { Q as G, a as yt } from "./QuillEditor-BHWfmp5D.js";
6
+ import { BaseInput as rt, Dropdown as ut, Input as $e, Icon as A, Modal as xt, Select as Je, Slider as Fe } from "@orchidui/core";
7
+ import { hslToRgb as tt, hsl2Hex as lt, rgb2Hex as at, rgbaToHex8 as kt, hexToRgb as je, rgbToHue as Ae, rgbToHsl as nt, hex8ToRgba as $t, parseRgba as wt, parseRgb as St } from "./Dashboard/ColorPicker/components/converters.js";
8
8
  import { PieChart as Ct } from "./Dashboard/Charts/PieChart/OcPieChart.js";
9
9
  import { LineChart as Ol } from "./Dashboard/Charts/LineChart/OcLineChart.js";
10
- import { BarChart as Ql } from "./Dashboard/Charts/BarChart/OcBarChart.js";
10
+ import { BarChart as Al } from "./Dashboard/Charts/BarChart/OcBarChart.js";
11
11
  import { BarRaceChart as Nl } from "./Dashboard/Charts/BarRaceChart/OcBarRaceChart.js";
12
- import { _ as Xl } from "./OcCard-w0EuBfr4.js";
12
+ import { _ as Xl } from "./OcCard-BpqC7suH.js";
13
13
  const It = { key: 1 }, Vt = {
14
14
  __name: "OcColorPicker",
15
15
  props: {
@@ -33,9 +33,9 @@ const It = { key: 1 }, Vt = {
33
33
  },
34
34
  emits: ["update:model-value"],
35
35
  setup(n, { emit: V }) {
36
- const r = n, b = V, u = v(!1), f = v(r.modelValue), C = (M) => {
37
- M && (f.value = M, b("update:model-value", M));
38
- }, c = ke(() => r.variant === "gradient" ? {
36
+ const r = n, y = V, u = v(!1), f = v(r.modelValue), C = (M) => {
37
+ M && (f.value = M, y("update:model-value", M));
38
+ }, p = he(() => r.variant === "gradient" ? {
39
39
  class: "w-[20px] h-[20px] hide-svg-icon",
40
40
  style: {
41
41
  background: f.value
@@ -44,35 +44,35 @@ const It = { key: 1 }, Vt = {
44
44
  style: {
45
45
  color: f.value
46
46
  }
47
- }), a = v(), H = v([]), Z = () => {
47
+ }), a = v(), H = v([]), j = () => {
48
48
  H.value.length > 8 && (H.value = H.value.filter((M, F) => F < 8)), localStorage.setItem("ck-cp-local-color-list", JSON.stringify(H.value));
49
49
  };
50
50
  let O = localStorage.getItem("ck-cp-local-color-list");
51
- O && (H.value = [...new Set(JSON.parse(O))], Z());
51
+ O && (H.value = [...new Set(JSON.parse(O))], j());
52
52
  const L = (M) => {
53
53
  if (!M && f.value)
54
54
  if (H.value.find((U) => U === f.value))
55
55
  H.value = [
56
56
  f.value,
57
57
  ...H.value.filter((U) => U !== f.value)
58
- ], Z();
58
+ ], j();
59
59
  else {
60
60
  H.value.length >= 9 && H.value.pop();
61
61
  let U = f.value;
62
- H.value.unshift(U), Z();
62
+ H.value.unshift(U), j();
63
63
  }
64
- }, B = v(!1), j = (M) => {
65
- f.value = M, b("update:model-value", M), u.value = !1;
64
+ }, B = v(!1), W = (M) => {
65
+ f.value = M, y("update:model-value", M), u.value = !1;
66
66
  };
67
- return (M, F) => (m(), X(w(st), {
68
- class: A(n.hideInputColor ? "w-[40px]" : ""),
67
+ return (M, F) => (m(), q(w(rt), {
68
+ class: Q(n.hideInputColor ? "w-[40px]" : ""),
69
69
  onClick: F[1] || (F[1] = () => {
70
70
  var U;
71
71
  return (U = a.value) == null ? void 0 : U.toggleDropdown();
72
72
  })
73
73
  }, {
74
- default: W(() => [
75
- T(w(rt), {
74
+ default: Y(() => [
75
+ T(w(ut), {
76
76
  ref_key: "dropdownRef",
77
77
  ref: a,
78
78
  modelValue: u.value,
@@ -81,10 +81,13 @@ const It = { key: 1 }, Vt = {
81
81
  L
82
82
  ],
83
83
  "max-menu-height": 800,
84
- placement: n.placement
84
+ placement: n.placement,
85
+ "popper-options": {
86
+ strategy: "fixed"
87
+ }
85
88
  }, {
86
- menu: W(() => [
87
- B.value ? D("", !0) : (m(), X(w(xl), {
89
+ menu: Y(() => [
90
+ B.value ? D("", !0) : (m(), q(w(xl), {
88
91
  key: 0,
89
92
  variant: n.variant,
90
93
  "show-alpha": !n.hideOpacity,
@@ -93,30 +96,30 @@ const It = { key: 1 }, Vt = {
93
96
  "last-used-colors": H.value,
94
97
  "preset-colors": n.presetColors,
95
98
  "onUpdate:modelValue": C,
96
- onLastUsedPick: j
99
+ onLastUsedPick: W
97
100
  }, null, 8, ["variant", "show-alpha", "type", "model-value", "last-used-colors", "preset-colors"]))
98
101
  ]),
99
- default: W(() => [
102
+ default: Y(() => [
100
103
  n.hideInputColor ? (m(), E("div", It, [
101
- ze(M.$slots, "picker-icon", {}, () => [
102
- T(w(Q), {
104
+ Ke(M.$slots, "picker-icon", {}, () => [
105
+ T(w(A), {
103
106
  class: "cursor-pointer",
104
- style: te(`color: ${f.value}`),
107
+ style: ee(`color: ${f.value}`),
105
108
  name: "drop"
106
109
  }, null, 8, ["style"])
107
110
  ])
108
- ])) : (m(), X(w($e), {
111
+ ])) : (m(), q(w($e), {
109
112
  key: 0,
110
113
  "model-value": f.value,
111
114
  icon: "drop",
112
- "icon-props": c.value,
115
+ "icon-props": p.value,
113
116
  placeholder: "#FFFFFF",
114
117
  "onUpdate:modelValue": C
115
118
  }, vt({ _: 2 }, [
116
119
  M.$slots.leading ? {
117
120
  name: "leading",
118
- fn: W(() => [
119
- ze(M.$slots, "leading")
121
+ fn: Y(() => [
122
+ Ke(M.$slots, "leading")
120
123
  ]),
121
124
  key: "0"
122
125
  } : void 0
@@ -128,7 +131,7 @@ const It = { key: 1 }, Vt = {
128
131
  _: 3
129
132
  }, 8, ["class"]));
130
133
  }
131
- }, Lt = ["id"], Tt = { class: "flex items-center gap-x-3 px-5" }, Bt = { class: "flex items-center gap-x-5 cursor-pointer" }, Rt = { class: "flex flex-col py-2 overflow-hidden" }, Et = ["onClick"], Mt = { class: "flex gap-x-3 items-center px-5" }, Ut = { class: "flex items-center gap-x-3 px-5" }, Dt = { class: "flex gap-x-3 items-center px-5" }, Ht = { class: "flex gap-x-3 items-center px-5" }, Ot = { class: "flex items-center" }, At = { class: "grid cursor-pointer px-5" }, Qt = {
134
+ }, Lt = ["id"], Tt = { class: "flex items-center gap-x-3 px-5" }, Bt = { class: "flex items-center gap-x-5 cursor-pointer" }, Rt = { class: "flex flex-col py-2 overflow-hidden" }, Et = ["onClick"], Mt = { class: "flex gap-x-3 items-center px-5" }, Ut = { class: "flex items-center gap-x-3 px-5" }, Dt = { class: "flex gap-x-3 items-center px-5" }, Ht = { class: "flex gap-x-3 items-center px-5" }, Ot = { class: "flex items-center" }, Qt = { class: "grid cursor-pointer px-5" }, At = {
132
135
  key: 5,
133
136
  class: "flex gap-x-3 items-center px-5"
134
137
  }, Ft = { class: "flex" }, Nt = { class: "mt-1 mx-2 cursor-pointer" }, Rl = {
@@ -184,7 +187,7 @@ const It = { key: 1 }, Vt = {
184
187
  },
185
188
  emits: ["update:modelValue", "update:image"],
186
189
  setup(n, { emit: V }) {
187
- const r = n, b = V, u = {
190
+ const r = n, y = V, u = {
188
191
  default: [
189
192
  "changes",
190
193
  "font-size",
@@ -197,130 +200,160 @@ const It = { key: 1 }, Vt = {
197
200
  "alignment"
198
201
  ],
199
202
  "text-only": ["changes", "font-size", "font-style", "link", "quote", "list", "alignment"]
200
- }, f = ke(() => u[r.variant]), C = Y.import("attributors/style/size");
201
- C.whitelist = r.fontSizes.map((p) => p.value), Y.register(C, !0);
202
- const c = Y.import("attributors/style/align");
203
- Y.register(c, !0);
204
- const a = Y.import("attributors/style/background");
205
- Y.register(a, !0);
206
- const H = Y.import("attributors/style/color");
207
- Y.register(H, !0);
208
- const Z = Y.import("attributors/style/direction");
209
- Y.register(Z, !0);
210
- const O = Y.import("attributors/style/font");
211
- Y.register(O, !0);
212
- const L = Y.import("blots/block/embed");
203
+ }, f = he(() => u[r.variant]), C = G.import("attributors/style/size");
204
+ C.whitelist = r.fontSizes.map((c) => c.value), G.register(C, !0);
205
+ const p = G.import("attributors/style/align");
206
+ G.register(p, !0);
207
+ const a = G.import("attributors/style/background");
208
+ G.register(a, !0);
209
+ const H = G.import("attributors/style/color");
210
+ G.register(H, !0);
211
+ const j = G.import("attributors/style/direction");
212
+ G.register(j, !0);
213
+ const O = G.import("attributors/style/font");
214
+ G.register(O, !0);
215
+ const L = G.import("blots/block/embed");
213
216
  class B extends L {
214
217
  }
215
- We(B, "blotName", "divider"), We(B, "tagName", "hr"), Y.register(B);
216
- const j = v(
218
+ ze(B, "blotName", "divider"), ze(B, "tagName", "hr"), G.register(B);
219
+ const W = v(
217
220
  Math.random().toString(36).replace(/[^a-zA-Z]+/g, "")
218
- ), M = v(!1), F = v(!1), U = v(!1), le = v(!1), J = v(!1), z = v(!1), R = v(!1), N = v(""), ae = v(""), ee = v(""), x = v(), Se = v(!1), ue = v(r.image), ie = (p) => {
219
- M.value = x.value.getQuill().history.stack.undo.length > 0, F.value = x.value.getQuill().history.stack.redo.length > 0, U.value = x.value.getQuill().getFormat().bold, le.value = x.value.getQuill().getFormat().italic, J.value = x.value.getQuill().getFormat().underline, R.value = x.value.getQuill().getFormat().blockquote, ae.value = x.value.getQuill().getFormat().list, ee.value = x.value.getQuill().getFormat().align;
221
+ ), M = v(!1), F = v(!1), U = v(!1), te = v(!1), K = v(!1), z = v(!1), R = v(!1), X = v(""), le = v(""), _ = v(""), x = v(), we = v(!1), ue = v(r.image), ve = he(() => {
222
+ const c = [
223
+ "background",
224
+ "bold",
225
+ "color",
226
+ "font",
227
+ "code",
228
+ "italic",
229
+ "link",
230
+ "size",
231
+ "strike",
232
+ "script",
233
+ "underline",
234
+ "blockquote",
235
+ "header",
236
+ "indent",
237
+ "list",
238
+ "align",
239
+ "direction",
240
+ "code-block",
241
+ "formula"
242
+ ];
243
+ return f.value.includes("image") && c.push("image"), f.value.includes("media") && c.push("video"), {
244
+ formats: c
245
+ };
246
+ }), Se = (c) => {
247
+ M.value = x.value.getQuill().history.stack.undo.length > 0, F.value = x.value.getQuill().history.stack.redo.length > 0, U.value = x.value.getQuill().getFormat().bold, te.value = x.value.getQuill().getFormat().italic, K.value = x.value.getQuill().getFormat().underline, R.value = x.value.getQuill().getFormat().blockquote, le.value = x.value.getQuill().getFormat().list, _.value = x.value.getQuill().getFormat().align;
220
248
  let o = document.createElement("div");
221
- o.innerHTML = p, Se.value && (o.innerText ? b("update:modelValue", p || "") : b("update:modelValue", ""), o.remove());
222
- }, Ne = () => {
249
+ o.innerHTML = c, we.value && (o.innerText ? y("update:modelValue", c || "") : y("update:modelValue", ""), o.remove());
250
+ }, Re = () => {
223
251
  if (x.value.getQuill().getSelection(!0)) {
224
252
  const o = x.value.getQuill().getSelection(!0);
225
253
  x.value.getQuill().insertText(o.index, `
226
- `, Y.sources.USER), x.value.getQuill().insertEmbed(o.index + 1, "divider", !0, Y.sources.USER), x.value.getQuill().setSelection(o.index + 2, Y.sources.SILENT);
254
+ `, G.sources.USER), x.value.getQuill().insertEmbed(o.index + 1, "divider", !0, G.sources.USER), x.value.getQuill().setSelection(o.index + 2, G.sources.SILENT);
227
255
  }
228
256
  }, Ee = () => {
229
- x.value.getQuill().history.undo(), ie(r.modelValue);
230
- }, Me = () => {
231
- x.value.getQuill().history.redo(), ie(r.modelValue);
257
+ x.value.getQuill().history.undo(), Se(r.modelValue);
232
258
  }, Ce = () => {
233
- var p;
234
- x.value.getQuill().format("bold", !U.value), (p = x.value.getQuill().getSelection()) != null && p.length || (U.value = !U.value);
235
- }, ne = () => {
236
- var p;
237
- x.value.getQuill().format("italic", !le.value), (p = x.value.getQuill().getSelection()) != null && p.length || (le.value = !le.value);
259
+ x.value.getQuill().history.redo(), Se(r.modelValue);
260
+ }, ae = () => {
261
+ var c;
262
+ x.value.getQuill().format("bold", !U.value), (c = x.value.getQuill().getSelection()) != null && c.length || (U.value = !U.value);
238
263
  }, Ie = () => {
239
- var p;
240
- x.value.getQuill().format("underline", !J.value), (p = x.value.getQuill().getSelection()) != null && p.length || (J.value = !J.value);
241
- }, Ue = (p) => {
242
- x.value.getQuill().format("size", p), N.value = p, z.value = !1;
243
- }, me = () => {
244
- const p = x.value.getQuill().getSelection();
245
- p && p.length > 0 && x.value.getQuill().theme.tooltip.edit();
264
+ var c;
265
+ x.value.getQuill().format("italic", !te.value), (c = x.value.getQuill().getSelection()) != null && c.length || (te.value = !te.value);
246
266
  }, Pe = () => {
267
+ var c;
268
+ x.value.getQuill().format("underline", !K.value), (c = x.value.getQuill().getSelection()) != null && c.length || (K.value = !K.value);
269
+ }, de = (c) => {
270
+ x.value.getQuill().format("size", c), X.value = c, z.value = !1;
271
+ }, Xe = () => {
272
+ const c = x.value.getQuill().getSelection();
273
+ c && c.length > 0 && x.value.getQuill().theme.tooltip.edit();
274
+ }, ne = () => {
247
275
  x.value.getQuill().format("blockquote", !R.value);
248
- }, oe = (p) => {
276
+ }, Me = (c) => {
249
277
  const o = x.value.getQuill().getSelection();
250
- o && (x.value.getQuill().clipboard.dangerouslyPasteHTML(o.index, `<img src="${p}" />`), ue.value = p, b("update:image", ue.value));
251
- }, De = () => {
278
+ o && (x.value.getQuill().clipboard.dangerouslyPasteHTML(o.index, `<img src="${c}" />`), ue.value = c, y("update:image", ue.value));
279
+ }, qe = () => {
252
280
  x.value.getQuill().getSelection() || x.value.getQuill().setSelection(x.value.getQuill().getLength() - 1);
253
- const p = document.createElement("input");
254
- p.type = "file", p.accept = "jpg,.jpeg,.png,.webp,.gif", p.onchange = () => {
255
- const o = p.files[0], y = new FileReader();
256
- y.onload = () => oe(y.result), y.readAsDataURL(o);
257
- }, p.click();
258
- }, He = (p) => /^data:image\/(png|jpg|jpeg|gif);base64,/.test(p), P = (p) => {
281
+ const c = document.createElement("input");
282
+ c.type = "file", c.accept = "jpg,.jpeg,.png,.webp,.gif", c.onchange = () => {
283
+ const o = c.files[0], b = new FileReader();
284
+ b.onload = () => Me(b.result), b.readAsDataURL(o);
285
+ }, c.click();
286
+ }, N = (c) => /^data:image\/(png|jpg|jpeg|gif);base64,/.test(c), Z = (c) => {
259
287
  setTimeout(() => {
260
- var y;
261
- if (p) {
262
- const G = x.value.getHTML(), se = document.createElement("div");
263
- se.innerHTML = G;
264
- let ye = se.getElementsByTagName("img");
265
- if (ye && ye.length > 0)
266
- for (let pe = 0; pe < ye.length; pe++) {
267
- const xe = (y = ye[pe]) == null ? void 0 : y.getAttribute("src");
268
- He(xe) && b("update:image", xe);
288
+ var b;
289
+ if (c) {
290
+ const J = x.value.getHTML(), ce = document.createElement("div");
291
+ ce.innerHTML = J;
292
+ let se = ce.getElementsByTagName("img");
293
+ if (se && se.length > 0)
294
+ for (let be = 0; be < se.length; be++) {
295
+ const Qe = (b = se[be]) == null ? void 0 : b.getAttribute("src");
296
+ N(Qe) && y("update:image", Qe);
269
297
  }
270
298
  }
271
299
  }, 100);
272
- const { items: o } = p.clipboardData;
273
- o.length && o[0].getAsString((y) => {
274
- He(y) && (x.value.getQuill().getSelection() || x.value.getQuill().setSelection(x.value.getQuill().getLength() - 1));
300
+ const { items: o } = c.clipboardData;
301
+ o.length && o[0].getAsString((b) => {
302
+ N(b) && (x.value.getQuill().getSelection() || x.value.getQuill().setSelection(x.value.getQuill().getLength() - 1));
275
303
  });
276
- }, _ = () => {
304
+ }, Ue = () => {
277
305
  x.value.getQuill().theme.tooltip.edit("video");
278
- }, Ve = (p) => {
279
- x.value.getQuill().format("list", p), ae.value = p;
280
- }, fe = (p = void 0) => {
281
- x.value.getQuill().format("align", p), ee.value = p;
282
- }, de = v(""), Xe = () => {
283
- x.value.getQuill().format("color", de.value);
306
+ }, De = (c) => {
307
+ x.value.getQuill().format("list", c), le.value = c;
308
+ }, me = (c = void 0) => {
309
+ x.value.getQuill().format("align", c), _.value = c;
310
+ }, fe = v(""), He = () => {
311
+ x.value.getQuill().format("color", fe.value);
284
312
  };
285
- Je(() => {
286
- Ue(r.initialFontSize || r.fontSizes[0].value), Se.value = !0;
313
+ _e(() => {
314
+ de(r.initialFontSize || r.fontSizes[0].value), we.value = !0;
287
315
  });
288
- const he = v(100), ce = v(!1), Le = (p) => {
289
- var y, G;
290
- he.value = p;
291
- const o = (y = window.getSelection()) == null ? void 0 : y.focusNode;
292
- o && o.nodeName !== "#text" && (x.value.getQuill().format("width", `${he.value}%`), (G = o == null ? void 0 : o.querySelector("img")) == null || G.setAttribute("style", "margin:auto;display:block;"));
293
- }, be = (p = "left") => {
294
- var y, G;
295
- const o = (y = window.getSelection()) == null ? void 0 : y.focusNode;
316
+ const ie = v(100), xe = v(!1), Oe = (c) => {
317
+ var b, J;
318
+ ie.value = c;
319
+ const o = (b = window.getSelection()) == null ? void 0 : b.focusNode;
320
+ o && o.nodeName !== "#text" && (x.value.getQuill().format("width", `${ie.value}%`), (J = o == null ? void 0 : o.querySelector("img")) == null || J.setAttribute("style", "margin:auto;display:block;"));
321
+ }, ke = (c = "left") => {
322
+ var b, J;
323
+ const o = (b = window.getSelection()) == null ? void 0 : b.focusNode;
296
324
  if (o && o.nodeName !== "#text") {
297
- let se = "float:left";
298
- p == "center" ? se = "" : p == "right" && (se = "float:right"), (G = o == null ? void 0 : o.querySelector("img")) == null || G.setAttribute("style", `margin:auto;display:block;${se}`);
325
+ let ce = "float:left";
326
+ c == "center" ? ce = "" : c == "right" && (ce = "float:right"), (J = o == null ? void 0 : o.querySelector("img")) == null || J.setAttribute("style", `margin:auto;display:block;${ce}`);
299
327
  }
300
- }, Oe = () => {
328
+ }, oe = () => {
301
329
  var o;
302
- const p = (o = window.getSelection()) == null ? void 0 : o.focusNode;
303
- ce.value = p.innerHTML && p.innerHTML.includes("<img");
304
- }, K = v(!1), q = v(3), Te = v(3), qe = ke(() => {
305
- let p = [];
330
+ const c = (o = window.getSelection()) == null ? void 0 : o.focusNode;
331
+ xe.value = c.innerHTML && c.innerHTML.includes("<img");
332
+ }, P = v(!1), Ve = v(3), Le = v(3), Ge = he(() => {
333
+ let c = [];
306
334
  for (let o = 1; o < 30; o++)
307
- p.push({
335
+ c.push({
308
336
  label: o.toString(),
309
337
  value: o.toString()
310
338
  });
311
- return p;
312
- }), Ge = ke(() => {
313
- let p = [];
339
+ return c;
340
+ }), Ye = he(() => {
341
+ let c = [];
314
342
  for (let o = 1; o < 12; o++)
315
- p.push({
343
+ c.push({
316
344
  label: o.toString(),
317
345
  value: o.toString()
318
346
  });
319
- return p;
320
- }), Ye = () => {
321
- x.value.getQuill().getModule("better-table").insertTable(parseInt(q.value), parseInt(Te.value)), K.value = !1;
347
+ return c;
348
+ }), We = () => {
349
+ x.value.getQuill().getModule("better-table").insertTable(parseInt(Ve.value), parseInt(Le.value)), P.value = !1;
322
350
  };
323
- return (p, o) => (m(), X(w(st), {
351
+ return ye(
352
+ () => r.modelValue,
353
+ (c) => {
354
+ c || x.value.getQuill().setContents([], "silent");
355
+ }
356
+ ), (c, o) => (m(), q(w(rt), {
324
357
  label: n.label,
325
358
  hint: n.hint,
326
359
  "error-message": n.errorMessage,
@@ -329,103 +362,104 @@ const It = { key: 1 }, Vt = {
329
362
  "tooltip-text": n.tooltipText,
330
363
  "tooltip-options": n.tooltipOptions
331
364
  }, {
332
- default: W(() => [
365
+ default: Y(() => [
333
366
  T(w(xt), {
334
367
  title: "Insert table",
335
- modelValue: K.value,
336
- "onUpdate:modelValue": o[2] || (o[2] = (y) => K.value = y),
368
+ modelValue: P.value,
369
+ "onUpdate:modelValue": o[2] || (o[2] = (b) => P.value = b),
337
370
  class: "!w-full !h-full",
338
371
  confirmButtonProps: {
339
372
  label: "Save",
340
- onClick: () => Ye()
373
+ onClick: () => We()
341
374
  }
342
375
  }, {
343
- default: W(() => [
344
- T(w(Ze), {
345
- modelValue: Te.value,
346
- "onUpdate:modelValue": o[0] || (o[0] = (y) => Te.value = y),
347
- options: Ge.value,
376
+ default: Y(() => [
377
+ T(w(Je), {
378
+ modelValue: Le.value,
379
+ "onUpdate:modelValue": o[0] || (o[0] = (b) => Le.value = b),
380
+ options: Ye.value,
348
381
  label: "Table cell",
349
382
  class: "mb-3"
350
383
  }, null, 8, ["modelValue", "options"]),
351
- T(w(Ze), {
352
- modelValue: q.value,
353
- "onUpdate:modelValue": o[1] || (o[1] = (y) => q.value = y),
354
- options: qe.value,
384
+ T(w(Je), {
385
+ modelValue: Ve.value,
386
+ "onUpdate:modelValue": o[1] || (o[1] = (b) => Ve.value = b),
387
+ options: Ge.value,
355
388
  label: "Table rows"
356
389
  }, null, 8, ["modelValue", "options"])
357
390
  ]),
358
391
  _: 1
359
392
  }, 8, ["modelValue", "confirmButtonProps"]),
360
393
  h("div", {
361
- class: A(["grid", { "has-error": n.errorMessage }]),
362
- onClick: Oe
394
+ class: Q(["grid", { "has-error": n.errorMessage }]),
395
+ onClick: oe
363
396
  }, [
364
- j.value ? (m(), X(w(yt), {
397
+ W.value ? (m(), q(w(yt), {
365
398
  key: 0,
366
- id: `#${j.value}`,
399
+ id: `#${W.value}`,
367
400
  ref_key: "quill",
368
401
  ref: x,
369
402
  content: n.modelValue,
370
403
  options: {
371
- bounds: `#${j.value}`
404
+ bounds: `#${W.value}`
372
405
  },
373
406
  theme: "snow",
374
407
  "content-type": "html",
408
+ "global-options": ve.value,
375
409
  class: "min-h-[200px]",
376
410
  placeholder: n.placeholder,
377
- "onUpdate:content": ie,
378
- onPaste: P
411
+ "onUpdate:content": Se,
412
+ onPaste: Z
379
413
  }, {
380
- toolbar: W(() => [
414
+ toolbar: Y(() => [
381
415
  h("div", {
382
- id: j.value,
416
+ id: W.value,
383
417
  class: "flex min-h-[36px] flex-wrap !py-2 !px-3 gap-y-2 rounded-t"
384
418
  }, [
385
- f.value.includes("changes") ? (m(), E(ge, { key: 0 }, [
419
+ f.value.includes("changes") ? (m(), E(pe, { key: 0 }, [
386
420
  h("div", Tt, [
387
- T(w(Q), {
388
- class: A(M.value ? "text-oc-text cursor-pointer" : "text-oc-text-300"),
421
+ T(w(A), {
422
+ class: Q(M.value ? "text-oc-text cursor-pointer" : "text-oc-text-300"),
389
423
  width: "20",
390
424
  height: "20",
391
425
  name: "text-editor/undo",
392
426
  onClick: Ee
393
427
  }, null, 8, ["class"]),
394
- T(w(Q), {
395
- class: A(F.value ? "text-oc-text cursor-pointer" : "text-oc-text-300"),
428
+ T(w(A), {
429
+ class: Q(F.value ? "text-oc-text cursor-pointer" : "text-oc-text-300"),
396
430
  width: "20",
397
431
  height: "20",
398
432
  name: "text-editor/redo",
399
- onClick: Me
433
+ onClick: Ce
400
434
  }, null, 8, ["class"])
401
435
  ]),
402
436
  o[16] || (o[16] = h("div", { class: "border-l border-oc-gray-200" }, null, -1))
403
437
  ], 64)) : D("", !0),
404
- f.value.includes("font-size") ? (m(), E(ge, { key: 1 }, [
405
- T(w(rt), {
438
+ f.value.includes("font-size") ? (m(), E(pe, { key: 1 }, [
439
+ T(w(ut), {
406
440
  modelValue: z.value,
407
- "onUpdate:modelValue": o[3] || (o[3] = (y) => z.value = y),
441
+ "onUpdate:modelValue": o[3] || (o[3] = (b) => z.value = b),
408
442
  class: "px-5"
409
443
  }, {
410
- menu: W(() => [
444
+ menu: Y(() => [
411
445
  h("div", Rt, [
412
- (m(!0), E(ge, null, Ke(n.fontSizes, (y) => (m(), E("div", {
413
- key: y.value,
414
- class: A(["min-w-[120px] cursor-pointer py-2 px-3 hover:bg-oc-gray-50", N.value === y.value ? "font-medium" : ""]),
415
- onClick: (G) => Ue(y.value)
416
- }, Fe(y.label), 11, Et))), 128))
446
+ (m(!0), E(pe, null, Ze(n.fontSizes, (b) => (m(), E("div", {
447
+ key: b.value,
448
+ class: Q(["min-w-[120px] cursor-pointer py-2 px-3 hover:bg-oc-gray-50", X.value === b.value ? "font-medium" : ""]),
449
+ onClick: (J) => de(b.value)
450
+ }, Ne(b.label), 11, Et))), 128))
417
451
  ])
418
452
  ]),
419
- default: W(() => {
420
- var y;
453
+ default: Y(() => {
454
+ var b;
421
455
  return [
422
456
  h("div", Bt, [
423
- ve(Fe((y = n.fontSizes.find((G) => G.value === N.value)) == null ? void 0 : y.label) + " ", 1),
424
- T(w(Q), {
457
+ ge(Ne((b = n.fontSizes.find((J) => J.value === X.value)) == null ? void 0 : b.label) + " ", 1),
458
+ T(w(A), {
425
459
  width: "20",
426
460
  height: "20",
427
461
  name: "chevron-down",
428
- class: A(["transition-all", z.value ? "rotate-180" : ""])
462
+ class: Q(["transition-all", z.value ? "rotate-180" : ""])
429
463
  }, null, 8, ["class"])
430
464
  ])
431
465
  ];
@@ -434,143 +468,143 @@ const It = { key: 1 }, Vt = {
434
468
  }, 8, ["modelValue"]),
435
469
  o[17] || (o[17] = h("div", { class: "border-l border-oc-gray-200" }, null, -1))
436
470
  ], 64)) : D("", !0),
437
- f.value.includes("font-style") ? (m(), E(ge, { key: 2 }, [
471
+ f.value.includes("font-style") ? (m(), E(pe, { key: 2 }, [
438
472
  h("div", Mt, [
439
- T(w(Q), {
440
- class: A(["cursor-pointer", U.value ? "text-oc-text" : "text-oc-text-300"]),
473
+ T(w(A), {
474
+ class: Q(["cursor-pointer", U.value ? "text-oc-text" : "text-oc-text-300"]),
441
475
  width: "20",
442
476
  height: "20",
443
477
  name: "text-editor/bold",
444
- onClick: Ce
478
+ onClick: ae
445
479
  }, null, 8, ["class"]),
446
- T(w(Q), {
447
- class: A(["cursor-pointer", le.value ? "text-oc-text" : "text-oc-text-300"]),
480
+ T(w(A), {
481
+ class: Q(["cursor-pointer", te.value ? "text-oc-text" : "text-oc-text-300"]),
448
482
  width: "20",
449
483
  height: "20",
450
484
  name: "text-editor/italic",
451
- onClick: ne
485
+ onClick: Ie
452
486
  }, null, 8, ["class"]),
453
- T(w(Q), {
454
- class: A(["cursor-pointer", J.value ? "text-oc-text" : "text-oc-text-300"]),
487
+ T(w(A), {
488
+ class: Q(["cursor-pointer", K.value ? "text-oc-text" : "text-oc-text-300"]),
455
489
  width: "20",
456
490
  height: "20",
457
491
  name: "text-editor/underline",
458
- onClick: Ie
492
+ onClick: Pe
459
493
  }, null, 8, ["class"])
460
494
  ]),
461
495
  o[18] || (o[18] = h("div", { class: "border-l border-oc-gray-200" }, null, -1))
462
496
  ], 64)) : D("", !0),
463
497
  h("div", Ut, [
464
- f.value.includes("link") ? (m(), X(w(Q), {
498
+ f.value.includes("link") ? (m(), q(w(A), {
465
499
  key: 0,
466
500
  class: "cursor-pointer",
467
501
  width: "20",
468
502
  height: "20",
469
503
  name: "text-editor/link",
470
- onClick: me
504
+ onClick: Xe
471
505
  })) : D("", !0),
472
- f.value.includes("image") ? (m(), X(w(Q), {
506
+ f.value.includes("image") ? (m(), q(w(A), {
473
507
  key: 1,
474
508
  class: "cursor-pointer",
475
509
  width: "20",
476
510
  height: "20",
477
511
  name: "text-editor/image",
478
- onClick: De
512
+ onClick: qe
479
513
  })) : D("", !0),
480
- f.value.includes("quote") ? (m(), X(w(Q), {
514
+ f.value.includes("quote") ? (m(), q(w(A), {
481
515
  key: 2,
482
- class: A(["cursor-pointer", R.value ? "text-oc-text" : "text-oc-text-300"]),
516
+ class: Q(["cursor-pointer", R.value ? "text-oc-text" : "text-oc-text-300"]),
483
517
  width: "20",
484
518
  height: "20",
485
519
  name: "text-editor/quote",
486
- onClick: Pe
520
+ onClick: ne
487
521
  }, null, 8, ["class"])) : D("", !0),
488
- f.value.includes("media") ? (m(), X(w(Q), {
522
+ f.value.includes("media") ? (m(), q(w(A), {
489
523
  key: 3,
490
524
  class: "cursor-pointer",
491
525
  width: "20",
492
526
  height: "20",
493
527
  name: "text-editor/media",
494
- onClick: _
528
+ onClick: Ue
495
529
  })) : D("", !0),
496
- T(w(Q), {
530
+ T(w(A), {
497
531
  class: "cursor-pointer",
498
532
  width: "20",
499
533
  height: "20",
500
534
  name: "table",
501
- onClick: o[4] || (o[4] = (y) => K.value = !K.value)
535
+ onClick: o[4] || (o[4] = (b) => P.value = !P.value)
502
536
  })
503
537
  ]),
504
- f.value.includes("list") ? (m(), E(ge, { key: 3 }, [
538
+ f.value.includes("list") ? (m(), E(pe, { key: 3 }, [
505
539
  o[19] || (o[19] = h("div", { class: "border-l border-oc-gray-200" }, null, -1)),
506
540
  h("div", Dt, [
507
- T(w(Q), {
508
- class: A(["cursor-pointer", ae.value === "bullet" ? "text-oc-text" : "text-oc-text-300"]),
541
+ T(w(A), {
542
+ class: Q(["cursor-pointer", le.value === "bullet" ? "text-oc-text" : "text-oc-text-300"]),
509
543
  width: "20",
510
544
  height: "20",
511
545
  name: "text-editor/bullet",
512
- onClick: o[5] || (o[5] = (y) => Ve("bullet"))
546
+ onClick: o[5] || (o[5] = (b) => De("bullet"))
513
547
  }, null, 8, ["class"]),
514
- T(w(Q), {
515
- class: A(["cursor-pointer", ae.value === "ordered" ? "text-oc-text" : "text-oc-text-300"]),
548
+ T(w(A), {
549
+ class: Q(["cursor-pointer", le.value === "ordered" ? "text-oc-text" : "text-oc-text-300"]),
516
550
  width: "20",
517
551
  height: "20",
518
552
  name: "text-editor/number",
519
- onClick: o[6] || (o[6] = (y) => Ve("ordered"))
553
+ onClick: o[6] || (o[6] = (b) => De("ordered"))
520
554
  }, null, 8, ["class"])
521
555
  ])
522
556
  ], 64)) : D("", !0),
523
- f.value.includes("alignment") ? (m(), E(ge, { key: 4 }, [
557
+ f.value.includes("alignment") ? (m(), E(pe, { key: 4 }, [
524
558
  o[20] || (o[20] = h("div", { class: "border-l border-oc-gray-200" }, null, -1)),
525
559
  h("div", Ht, [
526
- T(w(Q), {
527
- class: A(["cursor-pointer", ee.value ? "text-oc-text-300" : "text-oc-text"]),
560
+ T(w(A), {
561
+ class: Q(["cursor-pointer", _.value ? "text-oc-text-300" : "text-oc-text"]),
528
562
  width: "20",
529
563
  height: "20",
530
564
  name: "text-editor/left",
531
- onClick: o[7] || (o[7] = (y) => fe())
565
+ onClick: o[7] || (o[7] = (b) => me())
532
566
  }, null, 8, ["class"]),
533
- T(w(Q), {
534
- class: A(["cursor-pointer", ee.value === "center" ? "text-oc-text" : "text-oc-text-300"]),
567
+ T(w(A), {
568
+ class: Q(["cursor-pointer", _.value === "center" ? "text-oc-text" : "text-oc-text-300"]),
535
569
  width: "20",
536
570
  height: "20",
537
571
  name: "text-editor/center",
538
- onClick: o[8] || (o[8] = (y) => fe("center"))
572
+ onClick: o[8] || (o[8] = (b) => me("center"))
539
573
  }, null, 8, ["class"]),
540
- T(w(Q), {
541
- class: A(["cursor-pointer", ee.value === "right" ? "text-oc-text" : "text-oc-text-300"]),
574
+ T(w(A), {
575
+ class: Q(["cursor-pointer", _.value === "right" ? "text-oc-text" : "text-oc-text-300"]),
542
576
  width: "20",
543
577
  height: "20",
544
578
  name: "text-editor/right",
545
- onClick: o[9] || (o[9] = (y) => fe("right"))
579
+ onClick: o[9] || (o[9] = (b) => me("right"))
546
580
  }, null, 8, ["class"]),
547
- T(w(Q), {
548
- class: A(["cursor-pointer", ee.value === "justify" ? "text-oc-text" : "text-oc-text-300"]),
581
+ T(w(A), {
582
+ class: Q(["cursor-pointer", _.value === "justify" ? "text-oc-text" : "text-oc-text-300"]),
549
583
  width: "20",
550
584
  height: "20",
551
585
  name: "text-editor/justify",
552
- onClick: o[10] || (o[10] = (y) => fe("justify"))
586
+ onClick: o[10] || (o[10] = (b) => me("justify"))
553
587
  }, null, 8, ["class"])
554
588
  ])
555
589
  ], 64)) : D("", !0),
556
590
  o[22] || (o[22] = h("div", { class: "border-l border-oc-gray-200" }, null, -1)),
557
591
  h("div", Ot, [
558
592
  T(w(Vt), {
559
- modelValue: de.value,
593
+ modelValue: fe.value,
560
594
  "onUpdate:modelValue": [
561
- o[11] || (o[11] = (y) => de.value = y),
562
- Xe
595
+ o[11] || (o[11] = (b) => fe.value = b),
596
+ He
563
597
  ],
564
598
  "hide-input-color": ""
565
599
  }, {
566
- "picker-icon": W(() => [
567
- h("div", At, [
600
+ "picker-icon": Y(() => [
601
+ h("div", Qt, [
568
602
  h("div", {
569
- style: te(`color:${de.value}`)
603
+ style: ee(`color:${fe.value}`)
570
604
  }, "A", 4),
571
605
  h("div", {
572
606
  class: "h-[5px] w-full rounded border",
573
- style: te(`background:${de.value}`)
607
+ style: ee(`background:${fe.value}`)
574
608
  }, null, 4)
575
609
  ])
576
610
  ]),
@@ -578,36 +612,36 @@ const It = { key: 1 }, Vt = {
578
612
  }, 8, ["modelValue"])
579
613
  ]),
580
614
  o[23] || (o[23] = h("div", { class: "border-l border-oc-gray-200" }, null, -1)),
581
- ce.value ? (m(), E("div", Qt, [
582
- T(w(Qe), {
615
+ xe.value ? (m(), E("div", At, [
616
+ T(w(Fe), {
583
617
  label: "Image width",
584
618
  class: "w-[120px]",
585
- "model-value": he.value,
619
+ "model-value": ie.value,
586
620
  "min-limit": 0,
587
621
  "max-limit": 100,
588
- "onUpdate:modelValue": Le
622
+ "onUpdate:modelValue": Oe
589
623
  }, null, 8, ["model-value"]),
590
624
  h("div", Ft, [
591
- T(w(Q), {
625
+ T(w(A), {
592
626
  class: "cursor-pointer",
593
627
  width: "20",
594
628
  height: "20",
595
629
  name: "text-editor/left",
596
- onClick: o[12] || (o[12] = (y) => be())
630
+ onClick: o[12] || (o[12] = (b) => ke())
597
631
  }),
598
- T(w(Q), {
632
+ T(w(A), {
599
633
  class: "cursor-pointer",
600
634
  width: "20",
601
635
  height: "20",
602
636
  name: "text-editor/center",
603
- onClick: o[13] || (o[13] = (y) => be("center"))
637
+ onClick: o[13] || (o[13] = (b) => ke("center"))
604
638
  }),
605
- T(w(Q), {
639
+ T(w(A), {
606
640
  class: "cursor-pointer",
607
641
  width: "20",
608
642
  height: "20",
609
643
  name: "text-editor/right",
610
- onClick: o[14] || (o[14] = (y) => be("right"))
644
+ onClick: o[14] || (o[14] = (b) => ke("right"))
611
645
  })
612
646
  ])
613
647
  ])) : D("", !0),
@@ -618,7 +652,7 @@ const It = { key: 1 }, Vt = {
618
652
  viewBox: "0 0 15 15",
619
653
  fill: "none",
620
654
  xmlns: "http://www.w3.org/2000/svg",
621
- onClick: o[15] || (o[15] = (y) => Ne())
655
+ onClick: o[15] || (o[15] = (b) => Re())
622
656
  }, o[21] || (o[21] = [
623
657
  h("path", {
624
658
  "fill-rule": "evenodd",
@@ -631,7 +665,7 @@ const It = { key: 1 }, Vt = {
631
665
  ], 8, Lt)
632
666
  ]),
633
667
  _: 1
634
- }, 8, ["id", "content", "options", "placeholder"])) : D("", !0)
668
+ }, 8, ["id", "content", "options", "global-options", "placeholder"])) : D("", !0)
635
669
  ], 2)
636
670
  ]),
637
671
  _: 1
@@ -648,16 +682,16 @@ const It = { key: 1 }, Vt = {
648
682
  "update:modelValue": []
649
683
  },
650
684
  setup(n, { emit: V }) {
651
- const r = n, b = V, u = v(""), f = (c) => {
652
- u.value = c, u.value = `#${c.replace(/#/g, "")}`;
685
+ const r = n, y = V, u = v(""), f = (p) => {
686
+ u.value = p, u.value = `#${p.replace(/#/g, "")}`;
653
687
  }, C = () => {
654
- let c = u.value;
655
- if (c === r.modelValue) return;
656
- if (!/^#[0-9a-fA-F]+$/.test(c)) {
688
+ let p = u.value;
689
+ if (p === r.modelValue) return;
690
+ if (!/^#[0-9a-fA-F]+$/.test(p)) {
657
691
  u.value = r.modelValue;
658
692
  return;
659
693
  }
660
- let a = c.replace(/#/g, "");
694
+ let a = p.replace(/#/g, "");
661
695
  switch (a.length) {
662
696
  case 0:
663
697
  a = r.modelValue.replace("#", "");
@@ -676,24 +710,24 @@ const It = { key: 1 }, Vt = {
676
710
  default:
677
711
  a = a.slice(0, 6);
678
712
  }
679
- u.value = `#${a.toUpperCase()}`, b("update:modelValue", u.value);
713
+ u.value = `#${a.toUpperCase()}`, y("update:modelValue", u.value);
680
714
  };
681
- return we(
715
+ return ye(
682
716
  () => r.modelValue,
683
- (c, a) => {
684
- c !== a && (u.value = c);
717
+ (p, a) => {
718
+ p !== a && (u.value = p);
685
719
  },
686
720
  { immediate: !0 }
687
- ), (c, a) => (m(), X(w($e), {
721
+ ), (p, a) => (m(), q(w($e), {
688
722
  class: "w-[158px]",
689
723
  placeholder: "#FFFFFF",
690
724
  "model-value": u.value,
691
725
  "onUpdate:modelValue": f,
692
726
  onBlur: C,
693
- onKeyup: ot(C, ["enter"])
727
+ onKeyup: it(C, ["enter"])
694
728
  }, null, 8, ["model-value"]));
695
729
  }
696
- }, Xt = { class: "grid grid-cols-3 gap-3" }, nt = {
730
+ }, Xt = { class: "grid grid-cols-3 gap-3" }, ot = {
697
731
  __name: "InputRgbHsl",
698
732
  props: {
699
733
  inputType: {
@@ -712,27 +746,27 @@ const It = { key: 1 }, Vt = {
712
746
  "update-hsl-value": []
713
747
  },
714
748
  setup(n, { emit: V }) {
715
- const r = n, b = V, u = v({
749
+ const r = n, y = V, u = v({
716
750
  r: 0,
717
751
  g: 0,
718
752
  b: 0
719
- }), f = v(), C = v(), c = v(), a = (O, L) => {
720
- var j, M, F;
753
+ }), f = v(), C = v(), p = v(), a = (O, L) => {
754
+ var W, M, F;
721
755
  let B = 255;
722
756
  if (r.inputType == "HSL" && (B = 100, O == "r" && (B = 360)), !isNaN(parseInt(L))) {
723
757
  if (O == "r") {
724
758
  let U = parseInt(L);
725
- U <= B && (u.value.r = U, r.inputType == "RGB" ? H("r") : Z()), (j = f.value) == null || j.focus();
759
+ U <= B && (u.value.r = U, r.inputType == "RGB" ? H("r") : j()), (W = f.value) == null || W.focus();
726
760
  } else if (O == "g") {
727
761
  let U = parseInt(L);
728
- U <= B && (u.value.g = U, r.inputType == "RGB" ? H("g") : Z()), (M = C.value) == null || M.focus();
762
+ U <= B && (u.value.g = U, r.inputType == "RGB" ? H("g") : j()), (M = C.value) == null || M.focus();
729
763
  } else if (O == "b") {
730
764
  let U = parseInt(L);
731
- U <= B && (u.value.b = U, r.inputType == "RGB" ? H("b") : Z()), (F = c.value) == null || F.focus();
765
+ U <= B && (u.value.b = U, r.inputType == "RGB" ? H("b") : j()), (F = p.value) == null || F.focus();
732
766
  }
733
767
  }
734
768
  }, H = (O) => {
735
- b("update-rgb-value", {
769
+ y("update-rgb-value", {
736
770
  type: O,
737
771
  value: {
738
772
  r: parseInt(u.value.r),
@@ -740,20 +774,20 @@ const It = { key: 1 }, Vt = {
740
774
  b: parseInt(u.value.b)
741
775
  }
742
776
  });
743
- }, Z = () => {
744
- b("update-hsl-value", {
777
+ }, j = () => {
778
+ y("update-hsl-value", {
745
779
  h: parseInt(u.value.r),
746
780
  s: parseInt(u.value.g),
747
781
  l: parseInt(u.value.b)
748
782
  });
749
783
  };
750
- return r.inputType === "RGB" ? we(
784
+ return r.inputType === "RGB" ? ye(
751
785
  () => r.rgbValue,
752
786
  (O, L) => {
753
787
  O !== L && (u.value = O);
754
788
  },
755
789
  { immediate: !0, deep: !0 }
756
- ) : we(
790
+ ) : ye(
757
791
  () => r.hslValue,
758
792
  (O) => {
759
793
  u.value = {
@@ -780,7 +814,7 @@ const It = { key: 1 }, Vt = {
780
814
  }, null, 8, ["model-value"]),
781
815
  T(w($e), {
782
816
  ref_key: "bInputEl",
783
- ref: c,
817
+ ref: p,
784
818
  "model-value": u.value.b,
785
819
  placeholder: "100",
786
820
  "onUpdate:modelValue": L[2] || (L[2] = (B) => a("b", B))
@@ -798,28 +832,28 @@ const It = { key: 1 }, Vt = {
798
832
  "update:modelValue": []
799
833
  },
800
834
  setup(n, { emit: V }) {
801
- const r = n, b = V, u = v(""), f = (c) => {
802
- u.value = c;
835
+ const r = n, y = V, u = v(""), f = (p) => {
836
+ u.value = p;
803
837
  }, C = () => {
804
- let c = parseInt(u.value);
805
- c && c <= 100 ? b("update:modelValue", c) : u.value = r.modelValue;
838
+ let p = parseInt(u.value);
839
+ p && p <= 100 ? y("update:modelValue", p) : u.value = r.modelValue;
806
840
  };
807
- return we(
841
+ return ye(
808
842
  () => r.modelValue,
809
- (c, a) => {
810
- c !== a && (u.value = c);
843
+ (p, a) => {
844
+ p !== a && (u.value = p);
811
845
  },
812
846
  { immediate: !0 }
813
- ), (c, a) => (m(), X(w($e), {
847
+ ), (p, a) => (m(), q(w($e), {
814
848
  class: "w-[75px]",
815
849
  placeholder: "100",
816
850
  "model-value": u.value,
817
851
  "onUpdate:modelValue": f,
818
852
  onBlur: C,
819
- onKeyup: ot(C, ["enter"])
853
+ onKeyup: it(C, ["enter"])
820
854
  }, {
821
- leading: W(() => a[0] || (a[0] = [
822
- ve("%")
855
+ leading: Y(() => a[0] || (a[0] = [
856
+ ge("%")
823
857
  ])),
824
858
  _: 1
825
859
  }, 8, ["model-value"]));
@@ -831,12 +865,12 @@ const It = { key: 1 }, Vt = {
831
865
  },
832
866
  emits: ["update:model-value"],
833
867
  setup(n, { emit: V }) {
834
- const b = v(n.modelValue), u = V, f = (C) => {
835
- b.value = C, u("update:model-value", C);
868
+ const y = v(n.modelValue), u = V, f = (C) => {
869
+ y.value = C, u("update:model-value", C);
836
870
  };
837
- return (C, c) => (m(), X(w(Ze), {
871
+ return (C, p) => (m(), q(w(Je), {
838
872
  class: "!w-[80px]",
839
- "model-value": b.value,
873
+ "model-value": y.value,
840
874
  options: [
841
875
  {
842
876
  label: "HEX",
@@ -854,15 +888,15 @@ const It = { key: 1 }, Vt = {
854
888
  "onUpdate:modelValue": f
855
889
  }, null, 8, ["model-value"]));
856
890
  }
857
- }, Yt = { class: "opacity-bar" }, Wt = { class: "picker-opacity-slider opacity-bar-background" }, jt = ["value"], zt = {
891
+ }, Yt = { class: "opacity-bar" }, Wt = { class: "picker-opacity-slider opacity-bar-background" }, zt = ["value"], jt = {
858
892
  __name: "SliderOpacity",
859
893
  props: {
860
894
  modelValue: { default: 0, type: Number }
861
895
  },
862
896
  emits: ["update:modelValue", "onInput"],
863
897
  setup(n, { emit: V }) {
864
- const r = Re("opacitySlider"), b = V, u = (f) => {
865
- b("update:modelValue", parseInt(f.target.value)), b("onInput", f);
898
+ const r = Be("opacitySlider"), y = V, u = (f) => {
899
+ y("update:modelValue", parseInt(f.target.value)), y("onInput", f);
866
900
  };
867
901
  return (f, C) => (m(), E("div", Yt, [
868
902
  h("div", Wt, [
@@ -875,7 +909,7 @@ const It = { key: 1 }, Vt = {
875
909
  min: "0",
876
910
  max: "100",
877
911
  onInput: u
878
- }, null, 40, jt)
912
+ }, null, 40, zt)
879
913
  ])
880
914
  ]));
881
915
  }
@@ -886,39 +920,39 @@ const It = { key: 1 }, Vt = {
886
920
  },
887
921
  emits: ["onAddColor", "onMouseDown", "onDeleteColor"],
888
922
  setup(n, { emit: V }) {
889
- const r = Re("gradientBar"), b = v(), u = V, f = (L) => {
923
+ const r = Be("gradientBar"), y = v(), u = V, f = (L) => {
890
924
  L.preventDefault();
891
- }, C = v("left:0"), c = v(!1), a = (L) => {
925
+ }, C = v("left:0"), p = v(!1), a = (L) => {
892
926
  u("onMouseDown", L);
893
927
  }, H = () => {
894
- let L = b.value.querySelector(".select");
928
+ let L = y.value.querySelector(".select");
895
929
  C.value = L == null ? void 0 : L.getAttribute("style");
896
- }, Z = () => {
930
+ }, j = () => {
897
931
  var B;
898
- H(), (((B = b.value.querySelectorAll(".gradient-handle")) == null ? void 0 : B.length) ?? 2) > 2 ? c.value = !0 : c.value = !1;
932
+ H(), (((B = y.value.querySelectorAll(".gradient-handle")) == null ? void 0 : B.length) ?? 2) > 2 ? p.value = !0 : p.value = !1;
899
933
  }, O = (L) => {
900
- c.value = !1, u("onAddColor", L);
934
+ p.value = !1, u("onAddColor", L);
901
935
  };
902
936
  return (L, B) => (m(), E("div", {
903
937
  ref_key: "gradientSlider",
904
- ref: b,
938
+ ref: y,
905
939
  class: "relative h-[40px]",
906
- onClick: Z
940
+ onClick: j
907
941
  }, [
908
942
  h("button", {
909
943
  type: "button",
910
- class: A(["absolute top-[-18px] text-oc-accent-3 rounded-[4px] border-2 border-oc-gray-200 p-2 bg-oc-bg-light", c.value ? "" : "!hidden"]),
911
- style: te(C.value),
912
- onClick: B[0] || (B[0] = (j) => L.$emit("onDeleteColor"))
944
+ class: Q(["absolute top-[-18px] text-oc-accent-3 rounded-[4px] border-2 border-oc-gray-200 p-2 bg-oc-bg-light", p.value ? "" : "!hidden"]),
945
+ style: ee(C.value),
946
+ onClick: B[0] || (B[0] = (W) => L.$emit("onDeleteColor"))
913
947
  }, [
914
- T(w(Q), {
948
+ T(w(A), {
915
949
  name: "bin",
916
950
  width: "14",
917
951
  height: "14"
918
952
  })
919
953
  ], 6),
920
954
  h("div", {
921
- class: A(["gradient-bar", {
955
+ class: Q(["gradient-bar", {
922
956
  "mt-[20px]": n.gradientType === "linear",
923
957
  "mt-[12px]": n.gradientType === "radial"
924
958
  }]),
@@ -941,7 +975,7 @@ const It = { key: 1 }, Vt = {
941
975
  },
942
976
  emits: ["update:modelValue", "onInput", "onChange"],
943
977
  setup(n, { emit: V }) {
944
- const r = V, b = (u) => {
978
+ const r = V, y = (u) => {
945
979
  r("update:modelValue", parseFloat(u.target.value)), r("onInput", u);
946
980
  };
947
981
  return (u, f) => (m(), E("div", Zt, [
@@ -952,7 +986,7 @@ const It = { key: 1 }, Vt = {
952
986
  min: "0",
953
987
  max: "360",
954
988
  step: "0.1",
955
- onInput: b,
989
+ onInput: y,
956
990
  onChange: f[0] || (f[0] = (C) => u.$emit("onChange", C))
957
991
  }, null, 40, Jt)
958
992
  ]));
@@ -974,13 +1008,13 @@ const It = { key: 1 }, Vt = {
974
1008
  },
975
1009
  emits: ["update:angle", "update:percentageX", "update:percentageY", "onInput"],
976
1010
  setup(n, { emit: V }) {
977
- const r = v(!1), b = v(!1);
978
- Je(() => {
979
- r.value = !0, b.value = !0;
1011
+ const r = v(!1), y = v(!1);
1012
+ _e(() => {
1013
+ r.value = !0, y.value = !0;
980
1014
  });
981
- const u = V, f = (C, c) => {
1015
+ const u = V, f = (C, p) => {
982
1016
  let a = parseInt(C);
983
- switch (c) {
1017
+ switch (p) {
984
1018
  case "angle":
985
1019
  C > 360 ? a = 360 : C < 0 && (a = 0), u("update:angle", a), u("onInput");
986
1020
  break;
@@ -992,52 +1026,52 @@ const It = { key: 1 }, Vt = {
992
1026
  break;
993
1027
  }
994
1028
  };
995
- return (C, c) => (m(), E("div", el, [
996
- n.gradientType == "linear" && r.value ? (m(), X(w(Qe), {
1029
+ return (C, p) => (m(), E("div", el, [
1030
+ n.gradientType == "linear" && r.value ? (m(), q(w(Fe), {
997
1031
  key: 0,
998
1032
  label: "Angle",
999
1033
  "model-value": n.angle,
1000
1034
  "min-limit": 0,
1001
1035
  "max-limit": 360,
1002
- "onUpdate:modelValue": c[0] || (c[0] = (a) => f(a, "angle"))
1036
+ "onUpdate:modelValue": p[0] || (p[0] = (a) => f(a, "angle"))
1003
1037
  }, {
1004
- "min-limit-label": W(() => c[3] || (c[3] = [
1005
- ve("0 ")
1038
+ "min-limit-label": Y(() => p[3] || (p[3] = [
1039
+ ge("0 ")
1006
1040
  ])),
1007
- "max-limit-label": W(() => c[4] || (c[4] = [
1008
- ve("360"),
1041
+ "max-limit-label": Y(() => p[4] || (p[4] = [
1042
+ ge("360"),
1009
1043
  h("span", null, "°", -1)
1010
1044
  ])),
1011
1045
  _: 1
1012
1046
  }, 8, ["model-value"])) : D("", !0),
1013
- n.gradientType == "radial" && b.value ? (m(), E("div", tl, [
1014
- T(w(Qe), {
1047
+ n.gradientType == "radial" && y.value ? (m(), E("div", tl, [
1048
+ T(w(Fe), {
1015
1049
  label: "Position X",
1016
1050
  "model-value": n.percentageX,
1017
1051
  "min-limit": 0,
1018
1052
  "max-limit": 100,
1019
- "onUpdate:modelValue": c[1] || (c[1] = (a) => f(a, "percentageX"))
1053
+ "onUpdate:modelValue": p[1] || (p[1] = (a) => f(a, "percentageX"))
1020
1054
  }, {
1021
- "min-limit-label": W(() => c[5] || (c[5] = [
1022
- ve("0")
1055
+ "min-limit-label": Y(() => p[5] || (p[5] = [
1056
+ ge("0")
1023
1057
  ])),
1024
- "max-limit-label": W(() => c[6] || (c[6] = [
1025
- ve("100%")
1058
+ "max-limit-label": Y(() => p[6] || (p[6] = [
1059
+ ge("100%")
1026
1060
  ])),
1027
1061
  _: 1
1028
1062
  }, 8, ["model-value"]),
1029
- T(w(Qe), {
1063
+ T(w(Fe), {
1030
1064
  label: "Position Y",
1031
1065
  "model-value": n.percentageY,
1032
1066
  "min-limit": 0,
1033
1067
  "max-limit": 100,
1034
- "onUpdate:modelValue": c[2] || (c[2] = (a) => f(a, "percentageY"))
1068
+ "onUpdate:modelValue": p[2] || (p[2] = (a) => f(a, "percentageY"))
1035
1069
  }, {
1036
- "min-limit-label": W(() => c[7] || (c[7] = [
1037
- ve("0")
1070
+ "min-limit-label": Y(() => p[7] || (p[7] = [
1071
+ ge("0")
1038
1072
  ])),
1039
- "max-limit-label": W(() => c[8] || (c[8] = [
1040
- ve("100%")
1073
+ "max-limit-label": Y(() => p[8] || (p[8] = [
1074
+ ge("100%")
1041
1075
  ])),
1042
1076
  _: 1
1043
1077
  }, 8, ["model-value"])
@@ -1048,14 +1082,14 @@ const It = { key: 1 }, Vt = {
1048
1082
  __name: "PickerWrap",
1049
1083
  emits: ["onMouseDown"],
1050
1084
  setup(n) {
1051
- const V = Re("canvas"), r = Re("pickerWrap"), b = Re("pickerPointer"), u = (f) => {
1085
+ const V = Be("canvas"), r = Be("pickerWrap"), y = Be("pickerPointer"), u = (f) => {
1052
1086
  f.preventDefault();
1053
1087
  };
1054
1088
  return (f, C) => (m(), E("div", {
1055
1089
  ref_key: "pickerWrap",
1056
1090
  ref: r,
1057
1091
  class: "cp-picker-wrap",
1058
- onMousedown: C[0] || (C[0] = (c) => f.$emit("onMouseDown", c)),
1092
+ onMousedown: C[0] || (C[0] = (p) => f.$emit("onMouseDown", p)),
1059
1093
  onDragstart: u
1060
1094
  }, [
1061
1095
  h("canvas", {
@@ -1066,7 +1100,7 @@ const It = { key: 1 }, Vt = {
1066
1100
  C[1] || (C[1] = h("div", { class: "colour-area-mask" }, null, -1)),
1067
1101
  h("div", {
1068
1102
  ref_key: "pickerPointer",
1069
- ref: b,
1103
+ ref: y,
1070
1104
  class: "colour-area-point-circle"
1071
1105
  }, null, 512)
1072
1106
  ], 544));
@@ -1101,14 +1135,14 @@ const It = { key: 1 }, Vt = {
1101
1135
  return (V, r) => (m(), E("div", nl, [
1102
1136
  h("button", {
1103
1137
  type: "button",
1104
- class: A(n.mode == "solid" ? "active" : ""),
1138
+ class: Q(n.mode == "solid" ? "active" : ""),
1105
1139
  style: { padding: "7px" },
1106
- onClick: r[0] || (r[0] = (b) => V.$emit("onChangeMode", "solid"))
1140
+ onClick: r[0] || (r[0] = (y) => V.$emit("onChangeMode", "solid"))
1107
1141
  }, [
1108
1142
  n.modelValue && n.mode == "solid" ? (m(), E("div", {
1109
1143
  key: 0,
1110
1144
  class: "w-[28px] h-[28px] rounded-full border",
1111
- style: te(`background:${n.modelValue}`)
1145
+ style: ee(`background:${n.modelValue}`)
1112
1146
  }, null, 4)) : (m(), E("svg", ol, r[3] || (r[3] = [
1113
1147
  h("g", { opacity: "0.5" }, [
1114
1148
  h("path", {
@@ -1120,13 +1154,13 @@ const It = { key: 1 }, Vt = {
1120
1154
  ], 2),
1121
1155
  h("button", {
1122
1156
  type: "button",
1123
- class: A(n.gradientType == "linear" && n.mode != "solid" ? "active" : ""),
1124
- style: te(`${n.iconClasses.linear ? "" : "padding: 7px;"}`),
1125
- onClick: r[1] || (r[1] = (b) => V.$emit("onChangeMode", "linear"))
1157
+ class: Q(n.gradientType == "linear" && n.mode != "solid" ? "active" : ""),
1158
+ style: ee(`${n.iconClasses.linear ? "" : "padding: 7px;"}`),
1159
+ onClick: r[1] || (r[1] = (y) => V.$emit("onChangeMode", "linear"))
1126
1160
  }, [
1127
1161
  h("div", {
1128
1162
  class: "w-[28px] h-[28px] rounded-full border",
1129
- style: te(
1163
+ style: ee(
1130
1164
  n.modelValue && n.gradientType == "linear" && n.mode != "solid" ? `background:${n.modelValue}` : `
1131
1165
  background: linear-gradient(
1132
1166
  180deg,
@@ -1139,13 +1173,13 @@ const It = { key: 1 }, Vt = {
1139
1173
  ], 6),
1140
1174
  h("button", {
1141
1175
  type: "button",
1142
- class: A(n.gradientType == "radial" && n.mode != "solid" ? "active" : ""),
1143
- style: te(`${n.iconClasses.radial ? "" : "padding: 6px;"}`),
1144
- onClick: r[2] || (r[2] = (b) => V.$emit("onChangeMode", "radial"))
1176
+ class: Q(n.gradientType == "radial" && n.mode != "solid" ? "active" : ""),
1177
+ style: ee(`${n.iconClasses.radial ? "" : "padding: 6px;"}`),
1178
+ onClick: r[2] || (r[2] = (y) => V.$emit("onChangeMode", "radial"))
1145
1179
  }, [
1146
1180
  h("div", {
1147
1181
  class: "w-[28px] h-[28px] rounded-full border",
1148
- style: te(
1182
+ style: ee(
1149
1183
  n.modelValue && n.gradientType == "radial" && n.mode != "solid" ? `background:${n.modelValue}` : "background: radial-gradient(circle at 50% 50%, rgb(255, 255, 255) 0%, rgb(3, 16, 47) 100%);"
1150
1184
  )
1151
1185
  }, null, 4)
@@ -1158,10 +1192,10 @@ const It = { key: 1 }, Vt = {
1158
1192
  }, ul = {
1159
1193
  key: 1,
1160
1194
  class: "grid items-center mb-5"
1161
- }, dl = { key: 2 }, cl = { key: 0 }, pl = { class: "ck-cp-local-color-conatiner" }, gl = ["onClick"], vl = { class: "flex items-center gap-2" }, ml = { id: "ck-cp-target-background" }, fl = { class: "flex gap-3" }, hl = {
1195
+ }, dl = { key: 2 }, cl = { key: 0 }, pl = { class: "ck-cp-local-color-conatiner" }, gl = ["onClick"], vl = { class: "flex items-center gap-2" }, ml = { id: "ck-cp-target-background" }, fl = { class: "flex gap-3" }, bl = {
1162
1196
  key: 0,
1163
1197
  class: "w-full flex gap-3"
1164
- }, bl = {
1198
+ }, hl = {
1165
1199
  key: 4,
1166
1200
  class: "ck-cp-local-color-conatiner"
1167
1201
  }, yl = ["onClick"], xl = {
@@ -1201,13 +1235,13 @@ const It = { key: 1 }, Vt = {
1201
1235
  },
1202
1236
  emits: ["update:modelValue", "last-used-pick"],
1203
1237
  setup(n, { emit: V }) {
1204
- const r = n, b = v(r.variant == "gradient" ? "gradient" : "solid"), u = v(null), f = V, C = v(r.modelValue), c = (t) => {
1238
+ const r = n, y = v(r.variant == "gradient" ? "gradient" : "solid"), u = v(null), f = V, C = v(r.modelValue), p = (t) => {
1205
1239
  C.value = t, F.value && f("update:modelValue", t);
1206
1240
  }, a = v([
1207
1241
  { id: 1, r: 68, g: 71, b: 119, a: 100, percent: 0, hue: 0, select: !0 },
1208
1242
  { id: 2, r: 0, g: 0, b: 255, a: 100, percent: 100, hue: 0, select: !1 }
1209
1243
  ]), H = v(r.lastUsedColors);
1210
- we(
1244
+ ye(
1211
1245
  () => r.lastUsedColors,
1212
1246
  () => {
1213
1247
  H.value = r.lastUsedColors;
@@ -1216,49 +1250,49 @@ const It = { key: 1 }, Vt = {
1216
1250
  deep: !0
1217
1251
  }
1218
1252
  );
1219
- const Z = ke(() => r.variant !== "gradient" ? H.value.filter((t) => !t.includes("linear") && !t.includes("radial")) : H.value), O = v(!1), L = v("linear"), B = _e({
1253
+ const j = he(() => r.variant !== "gradient" ? H.value.filter((t) => !t.includes("linear") && !t.includes("radial")) : H.value), O = v(!1), L = v("linear"), B = et({
1220
1254
  angle: 90,
1221
1255
  percentageX: 50,
1222
1256
  percentageY: 50
1223
- }), j = v(""), M = v(r.inputType), F = v(!1), U = v(), le = v(), J = v(), z = v(), R = v(), N = _e({
1257
+ }), W = v(""), M = v(r.inputType), F = v(!1), U = v(), te = v(), K = v(), z = v(), R = v(), X = et({
1224
1258
  h: 0,
1225
1259
  s: 0,
1226
1260
  l: 0
1227
1261
  });
1228
- Be("gradientBar", le), Be("canvas", J), Be("pickerWrap", z), Be("pickerPointer", R), Be("opacitySlider", U);
1229
- let ae = 0, ee = 0, x = 0, Se = 0, ue = 0, ie = 0;
1230
- const Ne = (t) => {
1231
- !z.value || !R.value || (ue = z.value.offsetHeight - R.value.offsetHeight, ie = z.value.offsetWidth - R.value.offsetWidth, x = t.clientX - t.target.getBoundingClientRect().left, Se = t.clientY - t.target.getBoundingClientRect().top, ae = x - R.value.offsetWidth / 2, ee = Se - R.value.offsetHeight / 2, R.value.style.left = `${ae}px`, R.value.style.top = `${ee}px`, Ce(!1), G(), window.addEventListener("mousemove", Ee), window.addEventListener("mouseup", Me));
1232
- }, Ee = (t) => {
1262
+ Te("gradientBar", te), Te("canvas", K), Te("pickerWrap", z), Te("pickerPointer", R), Te("opacitySlider", U);
1263
+ let le = 0, _ = 0, x = 0, we = 0, ue = 0, ve = 0;
1264
+ const Se = (t) => {
1265
+ !z.value || !R.value || (ue = z.value.offsetHeight - R.value.offsetHeight, ve = z.value.offsetWidth - R.value.offsetWidth, x = t.clientX - t.target.getBoundingClientRect().left, we = t.clientY - t.target.getBoundingClientRect().top, le = x - R.value.offsetWidth / 2, _ = we - R.value.offsetHeight / 2, R.value.style.left = `${le}px`, R.value.style.top = `${_}px`, Ce(!1), b(), window.addEventListener("mousemove", Re), window.addEventListener("mouseup", Ee));
1266
+ }, Re = (t) => {
1233
1267
  t.preventDefault();
1234
1268
  const e = z.value.getBoundingClientRect(), l = t.clientX - e.left - R.value.offsetWidth / 2, i = t.clientY - e.top - R.value.offsetHeight / 2;
1235
- l >= 0 && l <= ie ? (ae = l, R.value.style.left = `${l}px`) : 0 > l ? (ae = 0, R.value.style.left = "0px") : l > ie && (ae = ie, R.value.style.left = `${ie}px`), i >= 0 && i <= ue ? (ee = i, R.value.style.top = `${i}px`) : 0 > i ? (ee = 0, R.value.style.top = "0px") : i > ue && (ee = ue, R.value.style.top = `${ue}px`), Ce(!1), G();
1236
- }, Me = () => {
1237
- window.removeEventListener("mousemove", Ee), window.removeEventListener("mouseup", Me);
1269
+ l >= 0 && l <= ve ? (le = l, R.value.style.left = `${l}px`) : 0 > l ? (le = 0, R.value.style.left = "0px") : l > ve && (le = ve, R.value.style.left = `${ve}px`), i >= 0 && i <= ue ? (_ = i, R.value.style.top = `${i}px`) : 0 > i ? (_ = 0, R.value.style.top = "0px") : i > ue && (_ = ue, R.value.style.top = `${ue}px`), Ce(!1), b();
1270
+ }, Ee = () => {
1271
+ window.removeEventListener("mousemove", Re), window.removeEventListener("mouseup", Ee);
1238
1272
  }, Ce = (t) => {
1239
1273
  if (!t) {
1240
- let e = Ue();
1241
- const l = et(ne.value, e.s, e.l);
1274
+ let e = Pe();
1275
+ const l = tt(ae.value, e.s, e.l);
1242
1276
  if (l) {
1243
1277
  if (F.value) {
1244
1278
  let i = a.value.find((s) => s.select == !0);
1245
1279
  i && (i.r = l.r, i.g = l.g, i.b = l.b);
1246
1280
  }
1247
- K(), q();
1281
+ oe(), P();
1248
1282
  }
1249
1283
  }
1250
- }, ne = v(0), Ie = async (t) => {
1251
- const { rgb: e } = tt(ne.value, 100, 50);
1252
- Oe(e), setTimeout(() => {
1253
- Ce(t), G();
1284
+ }, ae = v(0), Ie = async (t) => {
1285
+ const { rgb: e } = lt(ae.value, 100, 50);
1286
+ ke(e), setTimeout(() => {
1287
+ Ce(t), b();
1254
1288
  }, 0);
1255
- }, Ue = () => {
1289
+ }, Pe = () => {
1256
1290
  let t = { s: 0, l: 0 }, e = z.value.offsetWidth - R.value.offsetWidth, l = z.value.offsetHeight - R.value.offsetHeight, i = parseInt(R.value.style.left), d = 1 - parseInt(R.value.style.top) / l, k = i / e;
1257
1291
  return t.l = d / 2 * (2 - k), t.s = d * k / (1 - Math.abs(2 * t.l - 1)), Number.isNaN(t.s) && (t.s = t.l), t.l = t.l > 1 ? 1 : t.l, t.s = t.s > 1 ? 1 : t.s, t;
1258
- }, me = () => {
1292
+ }, de = () => {
1259
1293
  const t = a.value.find((e) => e.select == !0);
1260
1294
  if (t) {
1261
- const { l: e, s: l } = at(t.r, t.g, t.b);
1295
+ const { l: e, s: l } = nt(t.r, t.g, t.b);
1262
1296
  let i = e, s = l;
1263
1297
  Number.isNaN(s) && (s = i);
1264
1298
  let d = { x: 0, y: 0 }, k = z.value.offsetWidth - R.value.offsetWidth, I = z.value.offsetHeight - R.value.offsetHeight;
@@ -1272,26 +1306,26 @@ const It = { key: 1 }, Vt = {
1272
1306
  return d.x = $, d.y = g, d;
1273
1307
  } else
1274
1308
  return null;
1275
- }, Pe = () => {
1309
+ }, Xe = () => {
1276
1310
  const t = a.value.find((e) => e.select == !0);
1277
- t && (t.hue = ne.value);
1278
- }, oe = v(100), De = (t) => {
1311
+ t && (t.hue = ae.value);
1312
+ }, ne = v(100), Me = (t) => {
1279
1313
  if (r.showAlpha) {
1280
1314
  const e = a.value.find((l) => l.select == !0);
1281
- e && (e.a = parseInt(t), q());
1315
+ e && (e.a = parseInt(t), P());
1282
1316
  }
1283
- }, He = (t) => {
1317
+ }, qe = (t) => {
1284
1318
  var l, i, s, d;
1285
1319
  const e = (i = (l = u.value) == null ? void 0 : l.querySelector(".gradient-handle-content")) == null ? void 0 : i.getBoundingClientRect();
1286
- return t === 0 ? "0px" : t === 100 && e ? `${(((s = le.value) == null ? void 0 : s.offsetWidth) || 0) - (e.width || 0)}px` : `${(((d = le.value) == null ? void 0 : d.offsetWidth) || 0) * (t / 100) - ((e == null ? void 0 : e.width) || 0) / 2}px`;
1320
+ return t === 0 ? "0px" : t === 100 && e ? `${(((s = te.value) == null ? void 0 : s.offsetWidth) || 0) - (e.width || 0)}px` : `${(((d = te.value) == null ? void 0 : d.offsetWidth) || 0) * (t / 100) - ((e == null ? void 0 : e.width) || 0) / 2}px`;
1287
1321
  };
1288
- let P = null, _ = null;
1289
- const Ve = (t) => {
1322
+ let N = null, Z = null;
1323
+ const Ue = (t) => {
1290
1324
  var i, s;
1291
1325
  const l = t.target.offsetParent;
1292
1326
  if ((i = l == null ? void 0 : l.id) != null && i.includes("clr-gb-")) {
1293
1327
  const d = l.id.replace("clr-gb-", "");
1294
- _ = l;
1328
+ Z = l;
1295
1329
  const k = a.value.find((I) => I.select == !0);
1296
1330
  if (k && k.id != d) {
1297
1331
  const I = (s = u.value) == null ? void 0 : s.querySelector(".gradient-handle.select");
@@ -1300,30 +1334,30 @@ const It = { key: 1 }, Vt = {
1300
1334
  for (let g = 0; g < a.value.length; g++) {
1301
1335
  const S = a.value[g];
1302
1336
  if (S.id == d) {
1303
- $ != -1 && (a.value[$].select = !1), a.value[g].select = !0, oe.value = S.a, ce(S.r, S.g, S.b, S.hue, !0), K(), G();
1337
+ $ != -1 && (a.value[$].select = !1), a.value[g].select = !0, ne.value = S.a, ie(S.r, S.g, S.b, S.hue, !0), oe(), b();
1304
1338
  break;
1305
1339
  }
1306
1340
  }
1307
1341
  }
1308
- window.addEventListener("mousemove", de), window.addEventListener("mouseup", fe);
1342
+ window.addEventListener("mousemove", me), window.addEventListener("mouseup", De);
1309
1343
  }
1310
- }, fe = () => {
1311
- window.removeEventListener("mousemove", de), window.removeEventListener("mouseup", Ve);
1312
- }, de = (t) => {
1344
+ }, De = () => {
1345
+ window.removeEventListener("mousemove", me), window.removeEventListener("mouseup", Ue);
1346
+ }, me = (t) => {
1313
1347
  var d, k;
1314
1348
  t.preventDefault();
1315
- const e = (k = (d = u.value) == null ? void 0 : d.querySelector(".gradient-handle-content")) == null ? void 0 : k.getBoundingClientRect(), l = P == null ? void 0 : P.getBoundingClientRect(), i = l.width - (e == null ? void 0 : e.width);
1349
+ const e = (k = (d = u.value) == null ? void 0 : d.querySelector(".gradient-handle-content")) == null ? void 0 : k.getBoundingClientRect(), l = N == null ? void 0 : N.getBoundingClientRect(), i = l.width - (e == null ? void 0 : e.width);
1316
1350
  let s = t.clientX - (l.left || 0) - ((e == null ? void 0 : e.width) || 0) / 2;
1317
- if (s < 0 ? s = 0 : s > i && (s = i), _) {
1318
- _.style.left = `${s}px`;
1351
+ if (s < 0 ? s = 0 : s > i && (s = i), Z) {
1352
+ Z.style.left = `${s}px`;
1319
1353
  const I = parseFloat((s / ((l == null ? void 0 : l.width) - (e == null ? void 0 : e.width)) * 100).toFixed(0)), $ = a.value.find(
1320
- (g) => g.id == (_ == null ? void 0 : _.id.replace("clr-gb-", ""))
1354
+ (g) => g.id == (Z == null ? void 0 : Z.id.replace("clr-gb-", ""))
1321
1355
  );
1322
- $ && ($.percent = I), q();
1356
+ $ && ($.percent = I), P();
1323
1357
  }
1324
- }, Xe = (t) => {
1358
+ }, fe = (t) => {
1325
1359
  var I, $;
1326
- const e = P == null ? void 0 : P.getBoundingClientRect(), l = Math.round((t.clientX - ((e == null ? void 0 : e.left) || 0)) / ((e == null ? void 0 : e.width) || 1) * 100), i = a.value.findIndex((g) => g.select == !0), s = a.value[i], d = {
1360
+ const e = N == null ? void 0 : N.getBoundingClientRect(), l = Math.round((t.clientX - ((e == null ? void 0 : e.left) || 0)) / ((e == null ? void 0 : e.width) || 1) * 100), i = a.value.findIndex((g) => g.select == !0), s = a.value[i], d = {
1327
1361
  id: Date.now(),
1328
1362
  r: s.r,
1329
1363
  g: s.g,
@@ -1335,14 +1369,14 @@ const It = { key: 1 }, Vt = {
1335
1369
  };
1336
1370
  a.value[i].select = !1;
1337
1371
  const k = (I = u.value) == null ? void 0 : I.querySelector(".gradient-handle.select");
1338
- k == null || k.classList.remove("select"), a.value = [...a.value, d], be(d), _ = ($ = u.value) == null ? void 0 : $.querySelector(`#clr-gb-${d.id}`), q();
1339
- }, he = (t) => {
1372
+ k == null || k.classList.remove("select"), a.value = [...a.value, d], Oe(d), Z = ($ = u.value) == null ? void 0 : $.querySelector(`#clr-gb-${d.id}`), P();
1373
+ }, He = (t) => {
1340
1374
  if (t.r == 0 && t.g == 0 && t.b == 0)
1341
1375
  return !0;
1342
1376
  if (t.r == 255 && t.g == 255 && t.b == 255)
1343
1377
  return !0;
1344
1378
  {
1345
- const e = J.value.getContext("2d", { willReadFrequently: !0 }), l = J.value.width, i = J.value.height, s = e.getImageData(0, 0, l, i).data, d = t.r, k = t.g, I = t.b;
1379
+ const e = K.value.getContext("2d", { willReadFrequently: !0 }), l = K.value.width, i = K.value.height, s = e.getImageData(0, 0, l, i).data, d = t.r, k = t.g, I = t.b;
1346
1380
  for (let $ = 0; $ < i; $++)
1347
1381
  for (let g = 0; g < l; g++) {
1348
1382
  const S = ($ * l + g) * 4, re = s[S], dt = s[S + 1], ct = s[S + 2];
@@ -1351,44 +1385,44 @@ const It = { key: 1 }, Vt = {
1351
1385
  }
1352
1386
  return !1;
1353
1387
  }
1354
- }, ce = (t, e, l, i, s) => {
1388
+ }, ie = (t, e, l, i, s) => {
1355
1389
  setTimeout(() => {
1356
- if (he({ r: t, g: e, b: l })) {
1357
- let d = me();
1390
+ if (He({ r: t, g: e, b: l })) {
1391
+ let d = de();
1358
1392
  d && (R.value.style.left = `${d.x}px`, R.value.style.top = `${d.y}px`);
1359
1393
  } else {
1360
- let d = me();
1361
- d && (R.value.style.left = `${d.x}px`, R.value.style.top = `${d.y}px`), ne.value = i, Ie(s);
1394
+ let d = de();
1395
+ d && (R.value.style.left = `${d.x}px`, R.value.style.top = `${d.y}px`), ae.value = i, Ie(s);
1362
1396
  }
1363
1397
  }, 0);
1364
- }, Le = () => {
1365
- a.value.forEach((l) => be(l)), Te();
1398
+ }, xe = () => {
1399
+ a.value.forEach((l) => Oe(l)), Ve();
1366
1400
  const t = a.value[0];
1367
- ne.value = t.hue, Ie(!0);
1368
- let e = me();
1369
- e && (R.value.style.left = `${e.x}px`, R.value.style.top = `${e.y}px`), K(), q();
1370
- }, be = (t) => {
1371
- if (b.value == "gradient") {
1401
+ ae.value = t.hue, Ie(!0);
1402
+ let e = de();
1403
+ e && (R.value.style.left = `${e.x}px`, R.value.style.top = `${e.y}px`), oe(), P();
1404
+ }, Oe = (t) => {
1405
+ if (y.value == "gradient") {
1372
1406
  let e = document.createElement("div");
1373
- e.id = `clr-gb-${t.id}`, e.classList.add("gradient-handle"), e.style.left = He(t.percent);
1407
+ e.id = `clr-gb-${t.id}`, e.classList.add("gradient-handle"), e.style.left = qe(t.percent);
1374
1408
  let l = document.createElement("div");
1375
- l.classList.add("gradient-handle-content"), t.select == !0 && e.classList.add("select"), e.appendChild(l), P && P.appendChild(e);
1409
+ l.classList.add("gradient-handle-content"), t.select == !0 && e.classList.add("select"), e.appendChild(l), N && N.appendChild(e);
1376
1410
  }
1377
- }, Oe = (t) => {
1378
- const e = J.value.getContext("2d", { willReadFrequently: !0 }), l = J.value.width, i = J.value.height;
1411
+ }, ke = (t) => {
1412
+ const e = K.value.getContext("2d", { willReadFrequently: !0 }), l = K.value.width, i = K.value.height;
1379
1413
  e.fillStyle = `rgb(${t[0]},${t[1]},${t[2]})`, e.fillRect(0, 0, l, i);
1380
1414
  let s = e.createLinearGradient(0, 0, l - 12, 0);
1381
1415
  s.addColorStop(0, "rgb(255,255,255)"), s.addColorStop(1, "rgba(255,255,255,0)"), e.fillStyle = s, e.fillRect(0, 0, l, i);
1382
1416
  let d = e.createLinearGradient(0, 0, 0, i);
1383
1417
  d.addColorStop(0, "rgba(0,0,0,0)"), d.addColorStop(1, "rgb(0,0,0)"), e.fillStyle = d, e.fillRect(0, 0, l, i);
1384
- }, K = () => {
1418
+ }, oe = () => {
1385
1419
  if (r.showAlpha) {
1386
1420
  let t = a.value.find((e) => e.select == !0);
1387
1421
  t && (U.value.style.background = ` linear-gradient(90deg,rgba(255, 255, 255, 0) 0%, rgba(${t.r}, ${t.g}, ${t.b}, 100) 97%)`);
1388
1422
  }
1389
- }, q = () => {
1423
+ }, P = () => {
1390
1424
  var t;
1391
- if (b.value == "gradient") {
1425
+ if (y.value == "gradient") {
1392
1426
  a.value.sort((s, d) => s.percent - d.percent);
1393
1427
  let e = "linear-gradient(90deg, ", l;
1394
1428
  if (L.value == "linear") {
@@ -1404,9 +1438,9 @@ const It = { key: 1 }, Vt = {
1404
1438
  a.value.length - 1 == s ? (e = e + `rgba(${d},${k},${I},${$ / 100}) ${g}%)`, l = l + `rgba(${d},${k},${I},${$ / 100}) ${g}%)`) : (e = e + `rgba(${d},${k},${I},${$ / 100}) ${g}%, `, l = l + `rgba(${d},${k},${I},${$ / 100}) ${g}%, `);
1405
1439
  }
1406
1440
  }
1407
- le.value.style.backgroundImage = e;
1441
+ te.value.style.backgroundImage = e;
1408
1442
  let i = (t = u.value) == null ? void 0 : t.querySelector("#ck-cp-target-background");
1409
- i && (i.style.backgroundImage = l, F.value && c(i.style.backgroundImage));
1443
+ i && (i.style.backgroundImage = l, F.value && p(i.style.backgroundImage));
1410
1444
  } else {
1411
1445
  const { r: e, g: l, b: i, a: s } = a.value[0];
1412
1446
  let d = "";
@@ -1421,17 +1455,17 @@ const It = { key: 1 }, Vt = {
1421
1455
  d = `rgb(${e},${l},${i})`;
1422
1456
  break;
1423
1457
  case "HEX":
1424
- d = lt(e, l, i);
1458
+ d = at(e, l, i);
1425
1459
  break;
1426
1460
  }
1427
- c(d);
1461
+ p(d);
1428
1462
  }
1429
- }, Te = () => {
1463
+ }, Ve = () => {
1430
1464
  a.value.forEach((t) => {
1431
1465
  t.hue = Ae(t.r, t.g, t.b);
1432
1466
  });
1433
- }, qe = (t) => {
1434
- L.value = t, q();
1467
+ }, Le = (t) => {
1468
+ L.value = t, P();
1435
1469
  }, Ge = () => {
1436
1470
  var t, e;
1437
1471
  if (a.value.length > 2) {
@@ -1442,7 +1476,7 @@ const It = { key: 1 }, Vt = {
1442
1476
  const s = (t = u.value) == null ? void 0 : t.querySelector(`#clr-gb-${i}`);
1443
1477
  s == null || s.remove();
1444
1478
  const d = a.value[0];
1445
- d && (d.select = !0, _ = (e = u.value) == null ? void 0 : e.querySelector(`#clr-gb-${d.id}`), _ == null || _.classList.add("select"), ce(d.r, d.g, d.b, d.hue, !1), G(), q());
1479
+ d && (d.select = !0, Z = (e = u.value) == null ? void 0 : e.querySelector(`#clr-gb-${d.id}`), Z == null || Z.classList.add("select"), ie(d.r, d.g, d.b, d.hue, !1), b(), P());
1446
1480
  }
1447
1481
  }
1448
1482
  }, Ye = () => {
@@ -1452,56 +1486,56 @@ const It = { key: 1 }, Vt = {
1452
1486
  const { sRGBHex: s } = i, d = a.value.find((I) => I.select == !0), k = je(s);
1453
1487
  if (k) {
1454
1488
  const I = Ae(k.r, k.g, k.b);
1455
- if (d && (d.hue = I, d.r = k.r, d.g = k.g, d.b = k.b), he(k)) {
1456
- const $ = me();
1489
+ if (d && (d.hue = I, d.r = k.r, d.g = k.g, d.b = k.b), He(k)) {
1490
+ const $ = de();
1457
1491
  $ && (R.value.style.left = `${$.x}px`, R.value.style.top = `${$.y}px`);
1458
1492
  } else {
1459
- ne.value = I;
1460
- const { rgb: $ } = tt(I, 100, 50);
1461
- Oe($);
1462
- const g = me();
1493
+ ae.value = I;
1494
+ const { rgb: $ } = lt(I, 100, 50);
1495
+ ke($);
1496
+ const g = de();
1463
1497
  g && (R.value.style.left = `${g.x}px`, R.value.style.top = `${g.y}px`);
1464
1498
  }
1465
- G(), K(), q(), t == null || t.classList.remove("active");
1499
+ b(), oe(), P(), t == null || t.classList.remove("active");
1466
1500
  }
1467
1501
  }).catch(() => {
1468
1502
  t == null || t.classList.remove("active");
1469
1503
  });
1470
- }, p = (t) => {
1504
+ }, We = (t) => {
1471
1505
  const { value: e, type: l } = t;
1472
1506
  if (l != "a") {
1473
1507
  const i = a.value.find((s) => s.select == !0);
1474
1508
  if (i) {
1475
1509
  i.r = parseInt(e.r), i.g = parseInt(e.g), i.b = parseInt(e.b);
1476
1510
  const s = Ae(i.r, i.g, i.b);
1477
- i.hue = s, ce(i.r, i.g, i.b, i.hue, !0), q(), K();
1511
+ i.hue = s, ie(i.r, i.g, i.b, i.hue, !0), P(), oe();
1478
1512
  }
1479
1513
  } else
1480
- oe.value = e, q(), K();
1481
- }, o = (t) => {
1482
- N.h = t.h, N.s = t.s, N.l = t.l;
1514
+ ne.value = e, P(), oe();
1515
+ }, c = (t) => {
1516
+ X.h = t.h, X.s = t.s, X.l = t.l;
1483
1517
  const e = a.value.find((l) => l.select == !0);
1484
- if (e && !Number.isNaN(N.h) && !Number.isNaN(N.s) && !Number.isNaN(N.l)) {
1485
- const { r: l, g: i, b: s } = et(N.h, N.s / 100, N.l / 100);
1486
- e.hue = N.h, e.r = l, e.g = i, e.b = s, ce(e.r, e.g, e.b, e.hue, !0), q(), K();
1518
+ if (e && !Number.isNaN(X.h) && !Number.isNaN(X.s) && !Number.isNaN(X.l)) {
1519
+ const { r: l, g: i, b: s } = tt(X.h, X.s / 100, X.l / 100);
1520
+ e.hue = X.h, e.r = l, e.g = i, e.b = s, ie(e.r, e.g, e.b, e.hue, !0), P(), oe();
1487
1521
  }
1488
- }, y = () => {
1489
- if (j.value) {
1490
- const t = je(j.value);
1522
+ }, o = () => {
1523
+ if (W.value) {
1524
+ const t = je(W.value);
1491
1525
  if (t) {
1492
1526
  const e = Ae(t.r, t.g, t.b), l = a.value.find((i) => i.select == !0);
1493
- l && (l.r = t.r, l.g = t.g, l.b = t.b, l.hue = e, ce(t.r, t.g, t.b, l.hue, !0), q(), K(), pe(M.value));
1527
+ l && (l.r = t.r, l.g = t.g, l.b = t.b, l.hue = e, ie(t.r, t.g, t.b, l.hue, !0), P(), oe(), se(M.value));
1494
1528
  }
1495
1529
  }
1496
- }, G = () => {
1530
+ }, b = () => {
1497
1531
  const t = a.value.find((e) => e.select == !0);
1498
- t && (j.value = lt(t.r, t.g, t.b).toUpperCase()), pe(M.value);
1499
- }, se = (t) => {
1532
+ t && (W.value = at(t.r, t.g, t.b).toUpperCase()), se(M.value);
1533
+ }, J = (t) => {
1500
1534
  f("last-used-pick", t);
1501
1535
  };
1502
1536
  window.EyeDropper && (O.value = !0);
1503
- const ye = (t = "") => {
1504
- if (b.value == "gradient") {
1537
+ const ce = (t = "") => {
1538
+ if (y.value == "gradient") {
1505
1539
  let e = t.includes("linear") ? "linear" : "radial", l = [];
1506
1540
  if (L.value = e, e == "linear") {
1507
1541
  let i = /^linear-gradient\((.*)\)$/, s = t.replace(";", "").trim().match(i), d = /,\s*(?![^()]*\))/;
@@ -1559,7 +1593,7 @@ const It = { key: 1 }, Vt = {
1559
1593
  }
1560
1594
  }
1561
1595
  }
1562
- l.length > 1 && (a.value = l, a.value[0].select = !0, oe.value = a.value[0].a);
1596
+ l.length > 1 && (a.value = l, a.value[0].select = !0, ne.value = a.value[0].a);
1563
1597
  } else if (t) {
1564
1598
  let e = {
1565
1599
  r: 0,
@@ -1581,72 +1615,72 @@ const It = { key: 1 }, Vt = {
1581
1615
  let l = St(t);
1582
1616
  l ? (e.a = 1, e.r = l.r, e.g = l.g, e.b = l.b) : e = null;
1583
1617
  }
1584
- e && (a.value[0].r = e.r, a.value[0].b = e.b, a.value[0].g = e.g, a.value[0].a = parseInt((e.a * 100).toFixed(0)), oe.value = a.value[0].a, a.value[0].hue = 0);
1618
+ e && (a.value[0].r = e.r, a.value[0].b = e.b, a.value[0].g = e.g, a.value[0].a = parseInt((e.a * 100).toFixed(0)), ne.value = a.value[0].a, a.value[0].hue = 0);
1585
1619
  }
1586
- }, pe = (t) => {
1620
+ }, se = (t) => {
1587
1621
  const e = a.value.find((l) => l.select == !0);
1588
1622
  if (e) {
1589
1623
  switch (t) {
1590
1624
  case "RGB":
1591
1625
  break;
1592
1626
  case "HSL": {
1593
- const { h: l, s: i, l: s } = at(e.r, e.g, e.b);
1594
- N.h = Math.round(l), N.s = Math.round(i * 100), N.l = Math.round(s * 100);
1627
+ const { h: l, s: i, l: s } = nt(e.r, e.g, e.b);
1628
+ X.h = Math.round(l), X.s = Math.round(i * 100), X.l = Math.round(s * 100);
1595
1629
  break;
1596
1630
  }
1597
1631
  }
1598
1632
  M.value = t;
1599
1633
  }
1600
- }, xe = (t) => {
1601
- t && ye(t), Le();
1634
+ }, be = (t) => {
1635
+ t && ce(t), xe();
1602
1636
  };
1603
- we(
1637
+ ye(
1604
1638
  () => r.modelValue,
1605
1639
  (t, e) => {
1606
1640
  t !== e && t !== C.value && (a.value.forEach((l) => {
1607
- const i = P == null ? void 0 : P.querySelector(`#clr-gb-${l.id}`);
1641
+ const i = N == null ? void 0 : N.querySelector(`#clr-gb-${l.id}`);
1608
1642
  i == null || i.remove();
1609
- }), xe(t));
1643
+ }), be(t));
1610
1644
  }
1611
1645
  );
1612
- const ut = (t) => {
1646
+ const Qe = (t) => {
1613
1647
  a.value.forEach((e) => {
1614
- const l = P == null ? void 0 : P.querySelector(`#clr-gb-${e.id}`);
1648
+ const l = N == null ? void 0 : N.querySelector(`#clr-gb-${e.id}`);
1615
1649
  l == null || l.remove();
1616
- }), t !== "solid" ? (b.value = "gradient", setTimeout(() => {
1650
+ }), t !== "solid" ? (y.value = "gradient", setTimeout(() => {
1617
1651
  var e;
1618
- P = (e = u.value) == null ? void 0 : e.querySelector(".gradient-bar"), qe(t), Le();
1619
- }, 200)) : t === "solid" && (b.value = "solid", a.value = a.value.map((e) => (e.select = !1, e)), a.value[0].select = !0, setTimeout(() => {
1620
- xe(r.modelValue);
1652
+ N = (e = u.value) == null ? void 0 : e.querySelector(".gradient-bar"), Le(t), xe();
1653
+ }, 200)) : t === "solid" && (y.value = "solid", a.value = a.value.map((e) => (e.select = !1, e)), a.value[0].select = !0, setTimeout(() => {
1654
+ be(r.modelValue);
1621
1655
  }, 200));
1622
1656
  };
1623
- return Je(() => {
1657
+ return _e(() => {
1624
1658
  var t;
1625
- b.value = r.modelValue.includes("linear") || r.modelValue.includes("radial") ? "gradient" : "solid", b.value == "gradient" && (P = (t = u.value) == null ? void 0 : t.querySelector(".gradient-bar")), xe(r.modelValue), pe(M.value), mt(() => {
1659
+ y.value = r.modelValue.includes("linear") || r.modelValue.includes("radial") ? "gradient" : "solid", y.value == "gradient" && (N = (t = u.value) == null ? void 0 : t.querySelector(".gradient-bar")), be(r.modelValue), se(M.value), mt(() => {
1626
1660
  F.value = !0;
1627
1661
  });
1628
1662
  }), (t, e) => (m(), E("div", {
1629
1663
  ref_key: "pickerTemplateRef",
1630
1664
  ref: u,
1631
- class: A(["ck-cp-container", n.disabled ? "ck-cp-disabled " : ""]),
1665
+ class: Q(["ck-cp-container", n.disabled ? "ck-cp-disabled " : ""]),
1632
1666
  "cp-theme": n.theme
1633
1667
  }, [
1634
1668
  n.variant == "gradient" ? (m(), E("div", rl, [
1635
1669
  T(il, {
1636
1670
  class: "mr-auto",
1637
1671
  variant: n.variant,
1638
- mode: b.value,
1672
+ mode: y.value,
1639
1673
  "model-value": n.modelValue,
1640
1674
  iconClasses: n.iconClasses,
1641
1675
  gradientType: L.value,
1642
- onOnChangeMode: ut
1676
+ onOnChangeMode: Qe
1643
1677
  }, null, 8, ["variant", "mode", "model-value", "iconClasses", "gradientType"])
1644
1678
  ])) : D("", !0),
1645
- b.value == "gradient" && n.variant == "gradient" ? (m(), E("div", ul, [
1679
+ y.value == "gradient" && n.variant == "gradient" ? (m(), E("div", ul, [
1646
1680
  T(Kt, {
1647
1681
  gradientType: L.value,
1648
- onOnAddColor: Xe,
1649
- onOnMouseDown: Ve,
1682
+ onOnAddColor: fe,
1683
+ onOnMouseDown: Ue,
1650
1684
  onOnDeleteColor: Ge
1651
1685
  }, null, 8, ["gradientType"]),
1652
1686
  T(ll, {
@@ -1657,31 +1691,31 @@ const It = { key: 1 }, Vt = {
1657
1691
  percentageX: B.percentageX,
1658
1692
  "onUpdate:percentageX": e[2] || (e[2] = (l) => B.percentageX = l),
1659
1693
  inputType: M.value,
1660
- mode: b.value,
1694
+ mode: y.value,
1661
1695
  gradientType: L.value,
1662
- onOnInput: q
1696
+ onOnInput: P
1663
1697
  }, null, 8, ["percentageY", "angle", "percentageX", "inputType", "mode", "gradientType"])
1664
1698
  ])) : (m(), E("div", dl, [
1665
1699
  n.presetColors ? (m(), E("div", cl, [
1666
1700
  e[10] || (e[10] = h("div", { class: "text-oc-text-400 text-sm my-3 font-medium" }, "Choose color", -1)),
1667
1701
  h("div", pl, [
1668
- (m(!0), E(ge, null, Ke(n.presetColors, (l) => (m(), E("div", {
1702
+ (m(!0), E(pe, null, Ze(n.presetColors, (l) => (m(), E("div", {
1669
1703
  key: `color-${l}`,
1670
1704
  class: "ck-cp-color-item !w-[32px] !h-[32px]",
1671
- style: te(`background:${l}`),
1672
- onClick: (i) => se(l)
1705
+ style: ee(`background:${l}`),
1706
+ onClick: (i) => J(l)
1673
1707
  }, null, 12, gl))), 128))
1674
1708
  ])
1675
1709
  ])) : D("", !0)
1676
1710
  ])),
1677
- T(al, { onOnMouseDown: Ne }),
1711
+ T(al, { onOnMouseDown: Se }),
1678
1712
  h("div", vl, [
1679
1713
  T(_t, {
1680
- class: A(O.value ? "max-w-[90%]" : ""),
1681
- modelValue: ne.value,
1682
- "onUpdate:modelValue": e[3] || (e[3] = (l) => ne.value = l),
1714
+ class: Q(O.value ? "max-w-[90%]" : ""),
1715
+ modelValue: ae.value,
1716
+ "onUpdate:modelValue": e[3] || (e[3] = (l) => ae.value = l),
1683
1717
  onOnInput: e[4] || (e[4] = (l) => Ie(!1)),
1684
- onOnChange: Pe
1718
+ onOnChange: Xe
1685
1719
  }, null, 8, ["class", "modelValue"]),
1686
1720
  O.value ? (m(), E("button", {
1687
1721
  key: 0,
@@ -1702,57 +1736,57 @@ const It = { key: 1 }, Vt = {
1702
1736
  ], -1)
1703
1737
  ]))) : D("", !0)
1704
1738
  ]),
1705
- n.showAlpha ? (m(), X(zt, {
1739
+ n.showAlpha ? (m(), q(jt, {
1706
1740
  key: 3,
1707
- modelValue: oe.value,
1708
- "onUpdate:modelValue": e[5] || (e[5] = (l) => oe.value = l),
1709
- onOnInput: e[6] || (e[6] = (l) => De(l.target.value))
1741
+ modelValue: ne.value,
1742
+ "onUpdate:modelValue": e[5] || (e[5] = (l) => ne.value = l),
1743
+ onOnInput: e[6] || (e[6] = (l) => Me(l.target.value))
1710
1744
  }, null, 8, ["modelValue"])) : D("", !0),
1711
1745
  ft(h("div", ml, null, 512), [
1712
- [ht, !1]
1746
+ [bt, !1]
1713
1747
  ]),
1714
1748
  h("div", fl, [
1715
1749
  T(Gt, {
1716
1750
  "model-value": M.value,
1717
- "onUpdate:modelValue": pe
1751
+ "onUpdate:modelValue": se
1718
1752
  }, null, 8, ["model-value"]),
1719
- F.value && n.showInputSet ? (m(), E("div", hl, [
1720
- M.value == "HEX" ? (m(), X(Pt, {
1753
+ F.value && n.showInputSet ? (m(), E("div", bl, [
1754
+ M.value == "HEX" ? (m(), q(Pt, {
1721
1755
  key: 0,
1722
- modelValue: j.value,
1756
+ modelValue: W.value,
1723
1757
  "onUpdate:modelValue": [
1724
- e[7] || (e[7] = (l) => j.value = l),
1725
- y
1758
+ e[7] || (e[7] = (l) => W.value = l),
1759
+ o
1726
1760
  ]
1727
1761
  }, null, 8, ["modelValue"])) : D("", !0),
1728
- M.value == "RGB" ? (m(), X(nt, {
1762
+ M.value == "RGB" ? (m(), q(ot, {
1729
1763
  key: 1,
1730
1764
  "rgb-value": a.value.find((l) => l.select == !0),
1731
- onUpdateRgbValue: p
1765
+ onUpdateRgbValue: We
1732
1766
  }, null, 8, ["rgb-value"])) : D("", !0),
1733
- M.value == "HSL" ? (m(), X(nt, {
1767
+ M.value == "HSL" ? (m(), q(ot, {
1734
1768
  key: 2,
1735
1769
  "input-type": "HSL",
1736
- "hsl-value": N,
1737
- onUpdateHslValue: o
1770
+ "hsl-value": X,
1771
+ onUpdateHslValue: c
1738
1772
  }, null, 8, ["hsl-value"])) : D("", !0),
1739
- n.showAlpha ? (m(), X(qt, {
1773
+ n.showAlpha ? (m(), q(qt, {
1740
1774
  key: 3,
1741
- modelValue: oe.value,
1775
+ modelValue: ne.value,
1742
1776
  "onUpdate:modelValue": [
1743
- e[8] || (e[8] = (l) => oe.value = l),
1744
- e[9] || (e[9] = (l) => De(l))
1777
+ e[8] || (e[8] = (l) => ne.value = l),
1778
+ e[9] || (e[9] = (l) => Me(l))
1745
1779
  ]
1746
1780
  }, null, 8, ["modelValue"])) : D("", !0)
1747
1781
  ])) : D("", !0)
1748
1782
  ]),
1749
1783
  e[12] || (e[12] = h("div", { class: "text-oc-text-400 text-sm my-3 font-medium font-inter" }, "Last used", -1)),
1750
- H.value.length > 0 && n.showColorList ? (m(), E("div", bl, [
1751
- (m(!0), E(ge, null, Ke(Z.value, (l) => (m(), E("div", {
1784
+ H.value.length > 0 && n.showColorList ? (m(), E("div", hl, [
1785
+ (m(!0), E(pe, null, Ze(j.value, (l) => (m(), E("div", {
1752
1786
  key: `color-${l}`,
1753
1787
  class: "ck-cp-color-item !w-[32px] !h-[32px]",
1754
- style: te(`background:${l}`),
1755
- onClick: (i) => se(l)
1788
+ style: ee(`background:${l}`),
1789
+ onClick: (i) => J(l)
1756
1790
  }, null, 12, yl))), 128))
1757
1791
  ])) : D("", !0)
1758
1792
  ], 10, sl));
@@ -1763,7 +1797,7 @@ const It = { key: 1 }, Vt = {
1763
1797
  }, Sl = {
1764
1798
  key: 0,
1765
1799
  class: "text-sm text-oc-text-400"
1766
- }, El = /* @__PURE__ */ bt({
1800
+ }, El = /* @__PURE__ */ ht({
1767
1801
  __name: "OcOnboardingProgressbar",
1768
1802
  props: {
1769
1803
  title: {
@@ -1784,7 +1818,7 @@ const It = { key: 1 }, Vt = {
1784
1818
  }
1785
1819
  },
1786
1820
  setup(n) {
1787
- const V = n, r = ke(() => ({
1821
+ const V = n, r = he(() => ({
1788
1822
  grid: {
1789
1823
  containLabel: !1
1790
1824
  },
@@ -1812,7 +1846,7 @@ const It = { key: 1 }, Vt = {
1812
1846
  }
1813
1847
  ]
1814
1848
  }));
1815
- return (b, u) => (m(), E("div", kl, [
1849
+ return (y, u) => (m(), E("div", kl, [
1816
1850
  T(w(Ct), {
1817
1851
  class: "w-[140px] bg-white rounded-full h-[140px]",
1818
1852
  "additional-options": r.value,
@@ -1820,20 +1854,20 @@ const It = { key: 1 }, Vt = {
1820
1854
  "tooltip-value-formatter": () => null
1821
1855
  }, null, 8, ["additional-options"]),
1822
1856
  h("div", $l, [
1823
- n.title ? (m(), E("span", wl, Fe(n.title), 1)) : D("", !0),
1824
- ze(b.$slots, "description", {}, () => [
1825
- n.description ? (m(), E("span", Sl, Fe(n.description), 1)) : D("", !0)
1857
+ n.title ? (m(), E("span", wl, Ne(n.title), 1)) : D("", !0),
1858
+ Ke(y.$slots, "description", {}, () => [
1859
+ n.description ? (m(), E("span", Sl, Ne(n.description), 1)) : D("", !0)
1826
1860
  ])
1827
1861
  ])
1828
1862
  ]));
1829
1863
  }
1830
- }), Ml = it(
1864
+ }), Ml = st(
1831
1865
  () => import("./OcCodeBlock-chTpuRDc.js")
1832
- ), Ul = it(
1866
+ ), Ul = st(
1833
1867
  () => import("./OcLottieAnimation-EBkAB8-y.js")
1834
1868
  );
1835
1869
  export {
1836
- Ql as BarChart,
1870
+ Al as BarChart,
1837
1871
  Nl as BarRaceChart,
1838
1872
  Xl as Card,
1839
1873
  Ml as CodeBlock,