@chaibuilder/sdk 1.2.110 → 1.2.111

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,10 @@
1
1
  var z = Object.defineProperty;
2
2
  var W = (o, n, r) => n in o ? z(o, n, { enumerable: !0, configurable: !0, writable: !0, value: r }) : o[n] = r;
3
- var U = (o, n, r) => (W(o, typeof n != "symbol" ? n + "" : n, r), r);
3
+ var F = (o, n, r) => (W(o, typeof n != "symbol" ? n + "" : n, r), r);
4
4
  import { j as jsxRuntimeExports } from "./jsx-runtime-Sp0orL4X.js";
5
5
  import * as React from "react";
6
6
  import React__default, { createContext, useReducer, useEffect, useDebugValue, useCallback, useContext, useState, useMemo, Component, Children, Suspense, useRef, memo, createElement, lazy } from "react";
7
- import { aq as Skeleton, B as Button, aA as ContextMenu, aB as ContextMenuTrigger, aC as ContextMenuContent, aD as ContextMenuItem, N as Tooltip, O as TooltipTrigger, P as TooltipContent, C as Card, x as CardHeader, E as CardDescription, F as CardContent, L as Label, T as Textarea, y as CardFooter, D as Dialog, r as DialogTrigger, s as DialogContent, t as DialogHeader, v as DialogTitle, w as DialogDescription, u as DialogFooter, U as Popover, V as PopoverTrigger, W as PopoverContent, ar as Command, at as CommandInput, au as CommandList, av as CommandEmpty, aw as CommandGroup, ax as CommandItem, H as Tabs, J as TabsList, K as TabsTrigger, M as TabsContent, a as Switch, A as Accordion, d as AccordionItem, e as AccordionTrigger, f as AccordionContent, an as useToast, I as Input$1, R as TooltipPortal, a6 as DropdownMenu, a7 as DropdownMenuTrigger, a8 as DropdownMenuContent, S as ScrollArea, ac as DropdownMenuLabel, ad as DropdownMenuSeparator, af as DropdownMenuGroup, a9 as DropdownMenuItem, ae as DropdownMenuShortcut, i as AlertDialog, k as AlertDialogContent, l as AlertDialogHeader, n as AlertDialogTitle, j as AlertDialogTrigger, o as AlertDialogDescription, m as AlertDialogFooter, q as AlertDialogCancel, p as AlertDialogAction, aa as DropdownMenuCheckboxItem, X as HoverCard, Y as HoverCardTrigger, Z as HoverCardContent, al as Separator, g as Badge, _ as Select, a1 as SelectTrigger, a0 as SelectValue, a2 as SelectContent, a4 as SelectItem, Q as TooltipProvider, ap as Toaster } from "./context-menu-FPX89OKr.js";
7
+ import { aq as Skeleton, B as Button, aA as ContextMenu, aB as ContextMenuTrigger, aC as ContextMenuContent, aD as ContextMenuItem, N as Tooltip, O as TooltipTrigger, P as TooltipContent, C as Card, x as CardHeader, E as CardDescription, F as CardContent, L as Label, T as Textarea, y as CardFooter, D as Dialog, r as DialogTrigger, s as DialogContent, t as DialogHeader, v as DialogTitle, w as DialogDescription, u as DialogFooter, U as Popover, V as PopoverTrigger, W as PopoverContent, ar as Command, at as CommandInput, au as CommandList, av as CommandEmpty, aw as CommandGroup, ax as CommandItem, H as Tabs, J as TabsList, K as TabsTrigger, M as TabsContent, a as Switch, A as Accordion, d as AccordionItem, e as AccordionTrigger, f as AccordionContent, an as useToast, I as Input$1, R as TooltipPortal, a6 as DropdownMenu, a7 as DropdownMenuTrigger, a8 as DropdownMenuContent, S as ScrollArea, ac as DropdownMenuLabel, ad as DropdownMenuSeparator, af as DropdownMenuGroup, a9 as DropdownMenuItem, ae as DropdownMenuShortcut, i as AlertDialog, k as AlertDialogContent, l as AlertDialogHeader, n as AlertDialogTitle, j as AlertDialogTrigger, o as AlertDialogDescription, m as AlertDialogFooter, q as AlertDialogCancel, p as AlertDialogAction, aa as DropdownMenuCheckboxItem, X as HoverCard, Y as HoverCardTrigger, Z as HoverCardContent, al as Separator, g as Badge, _ as Select$1, a1 as SelectTrigger, a0 as SelectValue, a2 as SelectContent, a4 as SelectItem, Q as TooltipProvider, ap as Toaster } from "./context-menu-FPX89OKr.js";
8
8
  import { has, find, filter, flatten, map, omit, isString as isString$1, includes, without, get, compact, set, endsWith, isEmpty, forIn, isObject as isObject$1, each, first, noop, merge, keys, startsWith, range, values, flattenDeep, isNull, pick, sortBy, memoize, forEach, unset, chunk, throttle, cloneDeep, reverse, debounce, flatMapDeep, capitalize, last, startCase, truncate, isArray as isArray$1, split, toLower, reject, nth, isNumber as isNumber$1, parseInt as parseInt$1, isNaN as isNaN$1, findLast, intersection, groupBy, isFunction as isFunction$1, uniq, toUpper, round } from "lodash-es";
9
9
  import { atom as atom$1, useAtomValue as useAtomValue$1, useAtom as useAtom$1, useSetAtom as useSetAtom$1, getDefaultStore as getDefaultStore$1 } from "jotai";
10
10
  import { g as generateUUID, a as getBreakpointValue, c as cn, G as GenIcon } from "./iconBase-Ief2hJUZ.js";
@@ -21,7 +21,7 @@ import { flip } from "@floating-ui/dom";
21
21
  import { useFloating, shift } from "@floating-ui/react-dom";
22
22
  import { ArrowUpIcon, PlusIcon, CopyIcon, GearIcon, TrashIcon, DragHandleDots2Icon, BoxModelIcon, BoxIcon, DragHandleHorizontalIcon, ViewHorizontalIcon, BorderAllIcon, BorderTopIcon, TableIcon, DropdownMenuIcon, RadiobuttonIcon, InputIcon, ButtonIcon, CheckboxIcon, GroupIcon, SpaceBetweenVerticallyIcon, ColumnsIcon, RowsIcon, TextIcon, SketchLogoIcon, DividerHorizontalIcon, CodeIcon, CursorTextIcon, VideoIcon, Link1Icon, HeadingIcon, ImageIcon, CardStackPlusIcon, CardStackIcon, ScissorsIcon, TriangleRightIcon, EyeOpenIcon, Cross2Icon, EyeClosedIcon, WidthIcon, HeightIcon, ArrowRightIcon, ArrowDownIcon, ArrowLeftIcon, ArrowTopLeftIcon, ArrowTopRightIcon, ArrowBottomRightIcon, ArrowBottomLeftIcon, AlignLeftIcon, AlignCenterHorizontallyIcon, AlignRightIcon, StretchHorizontallyIcon, FontItalicIcon, UnderlineIcon, OverlineIcon, LetterCaseUppercaseIcon, Cross1Icon, InfoCircledIcon, MinusIcon, TriangleDownIcon, RowSpacingIcon, CrossCircledIcon, CaretDownIcon, CaretRightIcon, CheckIcon, ResetIcon, SunIcon, DotsVerticalIcon, MobileIcon, LaptopIcon, DesktopIcon, EraserIcon, ZoomInIcon, MixerHorizontalIcon, KeyboardIcon, LightningBoltIcon } from "@radix-ui/react-icons";
23
23
  import { createEvent } from "react-event-hook";
24
- import typography$1 from "@tailwindcss/typography";
24
+ import typography from "@tailwindcss/typography";
25
25
  import forms from "@tailwindcss/forms";
26
26
  import aspectRatio from "@tailwindcss/aspect-ratio";
27
27
  import { twMerge } from "tailwind-merge";
@@ -32,7 +32,7 @@ import { ErrorBoundary } from "react-error-boundary";
32
32
  import { Resizable } from "re-resizable";
33
33
  import { DatabaseIcon, GlobeIcon, ChevronRight, PlusIcon as PlusIcon$1, EyeOff, EditIcon, TrashIcon as TrashIcon$1, Check, Loader, SparklesIcon, SmileIcon, ShuffleIcon, ChevronDown, Edit2, X, LayoutTemplate, Layers, PaintBucketIcon } from "lucide-react";
34
34
  import validator from "@rjsf/validator-ajv8";
35
- import Form from "@rjsf/core";
35
+ import Form$1 from "@rjsf/core";
36
36
  import { y, s as s$1, h } from "./controls-lEwMTdPQ.js";
37
37
  import { Tree } from "react-arborist";
38
38
  import { parse, stringify } from "himalaya";
@@ -89,257 +89,257 @@ const hasInitialValue = (o) => "init" in o, isActuallyWritableAtom = (o) => !!o.
89
89
  const o = /* @__PURE__ */ new WeakMap(), n = /* @__PURE__ */ new WeakMap(), r = /* @__PURE__ */ new Map();
90
90
  let a, l, i;
91
91
  (define_import_meta_env_default$2 ? "production" : void 0) !== "production" && (a = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set());
92
- const c = (f) => o.get(f), d = (f, _) => {
93
- (define_import_meta_env_default$2 ? "production" : void 0) !== "production" && Object.freeze(_);
94
- const C = o.get(f);
95
- if (o.set(f, _), r.has(f) || r.set(f, C), C && hasPromiseAtomValue(C)) {
96
- const w = "v" in _ ? _.v instanceof Promise ? _.v : Promise.resolve(_.v) : Promise.reject(_.e);
97
- cancelPromise(C.v, w);
92
+ const c = (f) => o.get(f), d = (f, v) => {
93
+ (define_import_meta_env_default$2 ? "production" : void 0) !== "production" && Object.freeze(v);
94
+ const w = o.get(f);
95
+ if (o.set(f, v), r.has(f) || r.set(f, w), w && hasPromiseAtomValue(w)) {
96
+ const A = "v" in v ? v.v instanceof Promise ? v.v : Promise.resolve(v.v) : Promise.reject(v.e);
97
+ cancelPromise(w.v, A);
98
98
  }
99
- }, u = (f, _, C) => {
100
- const w = /* @__PURE__ */ new Map();
99
+ }, u = (f, v, w) => {
100
+ const A = /* @__PURE__ */ new Map();
101
101
  let I = !1;
102
- C.forEach((N, D) => {
103
- !N && D === f && (N = _), N ? (w.set(D, N), _.d.get(D) !== N && (I = !0)) : (define_import_meta_env_default$2 ? "production" : void 0) !== "production" && console.warn("[Bug] atom state not found");
104
- }), (I || _.d.size !== w.size) && (_.d = w);
105
- }, p = (f, _, C) => {
106
- const w = c(f), I = {
107
- d: (w == null ? void 0 : w.d) || /* @__PURE__ */ new Map(),
108
- v: _
102
+ w.forEach((T, D) => {
103
+ !T && D === f && (T = v), T ? (A.set(D, T), v.d.get(D) !== T && (I = !0)) : (define_import_meta_env_default$2 ? "production" : void 0) !== "production" && console.warn("[Bug] atom state not found");
104
+ }), (I || v.d.size !== A.size) && (v.d = A);
105
+ }, p = (f, v, w) => {
106
+ const A = c(f), I = {
107
+ d: (A == null ? void 0 : A.d) || /* @__PURE__ */ new Map(),
108
+ v
109
109
  };
110
- if (C && u(f, I, C), w && isEqualAtomValue(w, I) && w.d === I.d)
111
- return w;
112
- if (w && hasPromiseAtomValue(w) && hasPromiseAtomValue(I) && isEqualPromiseAtomValue(w, I)) {
113
- if (w.d === I.d)
114
- return w;
115
- I.v = w.v;
110
+ if (w && u(f, I, w), A && isEqualAtomValue(A, I) && A.d === I.d)
111
+ return A;
112
+ if (A && hasPromiseAtomValue(A) && hasPromiseAtomValue(I) && isEqualPromiseAtomValue(A, I)) {
113
+ if (A.d === I.d)
114
+ return A;
115
+ I.v = A.v;
116
116
  }
117
117
  return d(f, I), I;
118
- }, m = (f, _, C, w) => {
119
- if (isPromiseLike$2(_)) {
118
+ }, m = (f, v, w, A) => {
119
+ if (isPromiseLike$2(v)) {
120
120
  let I;
121
- const N = new Promise((D, V) => {
121
+ const T = new Promise((D, O) => {
122
122
  let M = !1;
123
- _.then(
124
- (O) => {
123
+ v.then(
124
+ (V) => {
125
125
  if (!M) {
126
126
  M = !0;
127
127
  const $ = c(f), H = p(
128
128
  f,
129
- N,
130
- C
129
+ T,
130
+ w
131
131
  );
132
- resolvePromise(N, O), D(O), ($ == null ? void 0 : $.d) !== H.d && T(f, H, $ == null ? void 0 : $.d);
132
+ resolvePromise(T, V), D(V), ($ == null ? void 0 : $.d) !== H.d && N(f, H, $ == null ? void 0 : $.d);
133
133
  }
134
134
  },
135
- (O) => {
135
+ (V) => {
136
136
  if (!M) {
137
137
  M = !0;
138
138
  const $ = c(f), H = p(
139
139
  f,
140
- N,
141
- C
140
+ T,
141
+ w
142
142
  );
143
- rejectPromise(N, O), V(O), ($ == null ? void 0 : $.d) !== H.d && T(f, H, $ == null ? void 0 : $.d);
143
+ rejectPromise(T, V), O(V), ($ == null ? void 0 : $.d) !== H.d && N(f, H, $ == null ? void 0 : $.d);
144
144
  }
145
145
  }
146
- ), I = (O) => {
147
- M || (M = !0, O.then(
148
- ($) => resolvePromise(N, $),
149
- ($) => rejectPromise(N, $)
150
- ), D(O));
146
+ ), I = (V) => {
147
+ M || (M = !0, V.then(
148
+ ($) => resolvePromise(T, $),
149
+ ($) => rejectPromise(T, $)
150
+ ), D(V));
151
151
  };
152
152
  });
153
- return N.orig = _, N.status = "pending", registerCancelPromise(N, (D) => {
154
- D && I(D), w == null || w();
155
- }), p(f, N, C);
153
+ return T.orig = v, T.status = "pending", registerCancelPromise(T, (D) => {
154
+ D && I(D), A == null || A();
155
+ }), p(f, T, w);
156
156
  }
157
- return p(f, _, C);
158
- }, g = (f, _, C) => {
159
- const w = c(f), I = {
160
- d: (w == null ? void 0 : w.d) || /* @__PURE__ */ new Map(),
161
- e: _
157
+ return p(f, v, w);
158
+ }, g = (f, v, w) => {
159
+ const A = c(f), I = {
160
+ d: (A == null ? void 0 : A.d) || /* @__PURE__ */ new Map(),
161
+ e: v
162
162
  };
163
- return C && u(f, I, C), w && isEqualAtomError(w, I) && w.d === I.d ? w : (d(f, I), I);
163
+ return w && u(f, I, w), A && isEqualAtomError(A, I) && A.d === I.d ? A : (d(f, I), I);
164
164
  }, x = (f) => {
165
- const _ = c(f);
166
- if (_ && (_.d.forEach((M, O) => {
167
- O !== f && !n.has(O) && x(O);
168
- }), Array.from(_.d).every(([M, O]) => {
165
+ const v = c(f);
166
+ if (v && (v.d.forEach((M, V) => {
167
+ V !== f && !n.has(V) && x(V);
168
+ }), Array.from(v.d).every(([M, V]) => {
169
169
  const $ = c(M);
170
- return M === f || $ === O || // TODO This is a hack, we should find a better solution.
171
- $ && !hasPromiseAtomValue($) && isEqualAtomValue($, O);
170
+ return M === f || $ === V || // TODO This is a hack, we should find a better solution.
171
+ $ && !hasPromiseAtomValue($) && isEqualAtomValue($, V);
172
172
  })))
173
- return _;
174
- const C = /* @__PURE__ */ new Map();
175
- let w = !0;
173
+ return v;
174
+ const w = /* @__PURE__ */ new Map();
175
+ let A = !0;
176
176
  const I = (M) => {
177
177
  if (M === f) {
178
178
  const $ = c(M);
179
179
  if ($)
180
- return C.set(M, $), returnAtomValue($);
180
+ return w.set(M, $), returnAtomValue($);
181
181
  if (hasInitialValue(M))
182
- return C.set(M, void 0), M.init;
182
+ return w.set(M, void 0), M.init;
183
183
  throw new Error("no atom init");
184
184
  }
185
- const O = x(M);
186
- return C.set(M, O), returnAtomValue(O);
185
+ const V = x(M);
186
+ return w.set(M, V), returnAtomValue(V);
187
187
  };
188
- let N, D;
189
- const V = {
188
+ let T, D;
189
+ const O = {
190
190
  get signal() {
191
- return N || (N = new AbortController()), N.signal;
191
+ return T || (T = new AbortController()), T.signal;
192
192
  },
193
193
  get setSelf() {
194
194
  return (define_import_meta_env_default$2 ? "production" : void 0) !== "production" && !isActuallyWritableAtom(f) && console.warn("setSelf function cannot be used with read-only atom"), !D && isActuallyWritableAtom(f) && (D = (...M) => {
195
- if ((define_import_meta_env_default$2 ? "production" : void 0) !== "production" && w && console.warn("setSelf function cannot be called in sync"), !w)
196
- return B(f, ...M);
195
+ if ((define_import_meta_env_default$2 ? "production" : void 0) !== "production" && A && console.warn("setSelf function cannot be called in sync"), !A)
196
+ return _(f, ...M);
197
197
  }), D;
198
198
  }
199
199
  };
200
200
  try {
201
- const M = f.read(I, V);
201
+ const M = f.read(I, O);
202
202
  return m(
203
203
  f,
204
204
  M,
205
- C,
206
- () => N == null ? void 0 : N.abort()
205
+ w,
206
+ () => T == null ? void 0 : T.abort()
207
207
  );
208
208
  } catch (M) {
209
- return g(f, M, C);
209
+ return g(f, M, w);
210
210
  } finally {
211
- w = !1;
211
+ A = !1;
212
212
  }
213
213
  }, j = (f) => returnAtomValue(x(f)), E = (f) => {
214
- let _ = n.get(f);
215
- return _ || (_ = R(f)), _;
216
- }, b = (f, _) => !_.l.size && (!_.t.size || _.t.size === 1 && _.t.has(f)), k = (f) => {
217
- const _ = n.get(f);
218
- _ && b(f, _) && A(f);
219
- }, v = (f) => {
220
- const _ = /* @__PURE__ */ new Map(), C = /* @__PURE__ */ new WeakMap(), w = (N) => {
221
- const D = n.get(N);
222
- D == null || D.t.forEach((V) => {
223
- V !== N && (_.set(
224
- V,
225
- (_.get(V) || /* @__PURE__ */ new Set()).add(N)
226
- ), C.set(V, (C.get(V) || 0) + 1), w(V));
214
+ let v = n.get(f);
215
+ return v || (v = C(f)), v;
216
+ }, b = (f, v) => !v.l.size && (!v.t.size || v.t.size === 1 && v.t.has(f)), k = (f) => {
217
+ const v = n.get(f);
218
+ v && b(f, v) && B(f);
219
+ }, S = (f) => {
220
+ const v = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new WeakMap(), A = (T) => {
221
+ const D = n.get(T);
222
+ D == null || D.t.forEach((O) => {
223
+ O !== T && (v.set(
224
+ O,
225
+ (v.get(O) || /* @__PURE__ */ new Set()).add(T)
226
+ ), w.set(O, (w.get(O) || 0) + 1), A(O));
227
227
  });
228
228
  };
229
- w(f);
230
- const I = (N) => {
231
- const D = n.get(N);
232
- D == null || D.t.forEach((V) => {
229
+ A(f);
230
+ const I = (T) => {
231
+ const D = n.get(T);
232
+ D == null || D.t.forEach((O) => {
233
233
  var M;
234
- if (V !== N) {
235
- let O = C.get(V);
236
- if (O && C.set(V, --O), !O) {
237
- let $ = !!((M = _.get(V)) != null && M.size);
234
+ if (O !== T) {
235
+ let V = w.get(O);
236
+ if (V && w.set(O, --V), !V) {
237
+ let $ = !!((M = v.get(O)) != null && M.size);
238
238
  if ($) {
239
- const H = c(V), F = x(V);
240
- $ = !H || !isEqualAtomValue(H, F);
239
+ const H = c(O), U = x(O);
240
+ $ = !H || !isEqualAtomValue(H, U);
241
241
  }
242
- $ || _.forEach((H) => H.delete(V));
242
+ $ || v.forEach((H) => H.delete(O));
243
243
  }
244
- I(V);
244
+ I(O);
245
245
  }
246
246
  });
247
247
  };
248
248
  I(f);
249
- }, S = (f, ..._) => {
250
- let C = !0;
251
- const w = (D) => returnAtomValue(x(D)), I = (D, ...V) => {
249
+ }, R = (f, ...v) => {
250
+ let w = !0;
251
+ const A = (D) => returnAtomValue(x(D)), I = (D, ...O) => {
252
252
  let M;
253
253
  if (D === f) {
254
254
  if (!hasInitialValue(D))
255
255
  throw new Error("atom not writable");
256
- const O = c(D), $ = m(D, V[0]);
257
- (!O || !isEqualAtomValue(O, $)) && v(D);
256
+ const V = c(D), $ = m(D, O[0]);
257
+ (!V || !isEqualAtomValue(V, $)) && S(D);
258
258
  } else
259
- M = S(D, ...V);
260
- if (!C) {
261
- const O = L();
259
+ M = R(D, ...O);
260
+ if (!w) {
261
+ const V = L();
262
262
  (define_import_meta_env_default$2 ? "production" : void 0) !== "production" && l.forEach(
263
- ($) => $({ type: "async-write", flushed: O })
263
+ ($) => $({ type: "async-write", flushed: V })
264
264
  );
265
265
  }
266
266
  return M;
267
- }, N = f.write(w, I, ..._);
268
- return C = !1, N;
269
- }, B = (f, ..._) => {
270
- const C = S(f, ..._), w = L();
267
+ }, T = f.write(A, I, ...v);
268
+ return w = !1, T;
269
+ }, _ = (f, ...v) => {
270
+ const w = R(f, ...v), A = L();
271
271
  return (define_import_meta_env_default$2 ? "production" : void 0) !== "production" && l.forEach(
272
- (I) => I({ type: "write", flushed: w })
273
- ), C;
274
- }, R = (f, _) => {
275
- const C = {
276
- t: new Set(_ && [_]),
272
+ (I) => I({ type: "write", flushed: A })
273
+ ), w;
274
+ }, C = (f, v) => {
275
+ const w = {
276
+ t: new Set(v && [v]),
277
277
  l: /* @__PURE__ */ new Set()
278
278
  };
279
- if (n.set(f, C), (define_import_meta_env_default$2 ? "production" : void 0) !== "production" && i.add(f), x(f).d.forEach((w, I) => {
280
- const N = n.get(I);
281
- N ? N.t.add(f) : I !== f && R(I, f);
279
+ if (n.set(f, w), (define_import_meta_env_default$2 ? "production" : void 0) !== "production" && i.add(f), x(f).d.forEach((A, I) => {
280
+ const T = n.get(I);
281
+ T ? T.t.add(f) : I !== f && C(I, f);
282
282
  }), x(f), isActuallyWritableAtom(f) && f.onMount) {
283
- const w = f.onMount((...I) => B(f, ...I));
284
- w && (C.u = w);
283
+ const A = f.onMount((...I) => _(f, ...I));
284
+ A && (w.u = A);
285
285
  }
286
- return C;
287
- }, A = (f) => {
288
- var _;
289
- const C = (_ = n.get(f)) == null ? void 0 : _.u;
290
- C && C(), n.delete(f), (define_import_meta_env_default$2 ? "production" : void 0) !== "production" && i.delete(f);
291
- const w = c(f);
292
- w ? (hasPromiseAtomValue(w) && cancelPromise(w.v), w.d.forEach((I, N) => {
293
- if (N !== f) {
294
- const D = n.get(N);
295
- D && (D.t.delete(f), b(N, D) && A(N));
286
+ return w;
287
+ }, B = (f) => {
288
+ var v;
289
+ const w = (v = n.get(f)) == null ? void 0 : v.u;
290
+ w && w(), n.delete(f), (define_import_meta_env_default$2 ? "production" : void 0) !== "production" && i.delete(f);
291
+ const A = c(f);
292
+ A ? (hasPromiseAtomValue(A) && cancelPromise(A.v), A.d.forEach((I, T) => {
293
+ if (T !== f) {
294
+ const D = n.get(T);
295
+ D && (D.t.delete(f), b(T, D) && B(T));
296
296
  }
297
297
  })) : (define_import_meta_env_default$2 ? "production" : void 0) !== "production" && console.warn("[Bug] could not find atom state to unmount", f);
298
- }, T = (f, _, C) => {
299
- const w = new Set(_.d.keys());
300
- C == null || C.forEach((I, N) => {
301
- if (w.has(N)) {
302
- w.delete(N);
298
+ }, N = (f, v, w) => {
299
+ const A = new Set(v.d.keys());
300
+ w == null || w.forEach((I, T) => {
301
+ if (A.has(T)) {
302
+ A.delete(T);
303
303
  return;
304
304
  }
305
- const D = n.get(N);
306
- D && (D.t.delete(f), b(N, D) && A(N));
307
- }), w.forEach((I) => {
308
- const N = n.get(I);
309
- N ? N.t.add(f) : n.has(f) && R(I, f);
305
+ const D = n.get(T);
306
+ D && (D.t.delete(f), b(T, D) && B(T));
307
+ }), A.forEach((I) => {
308
+ const T = n.get(I);
309
+ T ? T.t.add(f) : n.has(f) && C(I, f);
310
310
  });
311
311
  }, L = () => {
312
312
  let f;
313
313
  for ((define_import_meta_env_default$2 ? "production" : void 0) !== "production" && (f = /* @__PURE__ */ new Set()); r.size; ) {
314
- const _ = Array.from(r);
315
- r.clear(), _.forEach(([C, w]) => {
316
- const I = c(C);
314
+ const v = Array.from(r);
315
+ r.clear(), v.forEach(([w, A]) => {
316
+ const I = c(w);
317
317
  if (I) {
318
- I.d !== (w == null ? void 0 : w.d) && T(C, I, w == null ? void 0 : w.d);
319
- const N = n.get(C);
320
- N && !// TODO This seems pretty hacky. Hope to fix it.
318
+ I.d !== (A == null ? void 0 : A.d) && N(w, I, A == null ? void 0 : A.d);
319
+ const T = n.get(w);
320
+ T && !// TODO This seems pretty hacky. Hope to fix it.
321
321
  // Maybe we could `mountDependencies` in `setAtomState`?
322
- (w && !hasPromiseAtomValue(w) && (isEqualAtomValue(w, I) || isEqualAtomError(w, I))) && (N.l.forEach((D) => D()), (define_import_meta_env_default$2 ? "production" : void 0) !== "production" && f.add(C));
322
+ (A && !hasPromiseAtomValue(A) && (isEqualAtomValue(A, I) || isEqualAtomError(A, I))) && (T.l.forEach((D) => D()), (define_import_meta_env_default$2 ? "production" : void 0) !== "production" && f.add(w));
323
323
  } else
324
324
  (define_import_meta_env_default$2 ? "production" : void 0) !== "production" && console.warn("[Bug] no atom state to flush");
325
325
  });
326
326
  }
327
327
  if ((define_import_meta_env_default$2 ? "production" : void 0) !== "production")
328
- return a.forEach((_) => _("state")), f;
329
- }, P = (f, _) => {
330
- const C = E(f), w = L(), I = C.l;
331
- return I.add(_), (define_import_meta_env_default$2 ? "production" : void 0) !== "production" && (a.forEach((N) => N("sub")), l.forEach(
332
- (N) => N({ type: "sub", flushed: w })
328
+ return a.forEach((v) => v("state")), f;
329
+ }, P = (f, v) => {
330
+ const w = E(f), A = L(), I = w.l;
331
+ return I.add(v), (define_import_meta_env_default$2 ? "production" : void 0) !== "production" && (a.forEach((T) => T("sub")), l.forEach(
332
+ (T) => T({ type: "sub", flushed: A })
333
333
  )), () => {
334
- I.delete(_), k(f), (define_import_meta_env_default$2 ? "production" : void 0) !== "production" && (a.forEach((N) => N("unsub")), l.forEach((N) => N({ type: "unsub" })));
334
+ I.delete(v), k(f), (define_import_meta_env_default$2 ? "production" : void 0) !== "production" && (a.forEach((T) => T("unsub")), l.forEach((T) => T({ type: "unsub" })));
335
335
  };
336
336
  };
337
337
  return (define_import_meta_env_default$2 ? "production" : void 0) !== "production" ? {
338
338
  get: j,
339
- set: B,
339
+ set: _,
340
340
  sub: P,
341
341
  // store dev methods (these are tentative and subject to change without notice)
342
- dev_subscribe_store: (f, _) => _ !== 2 ? (console.warn(
342
+ dev_subscribe_store: (f, v) => v !== 2 ? (console.warn(
343
343
  "The current StoreListener revision is 2. The older ones are deprecated."
344
344
  ), a.add(f), () => {
345
345
  a.delete(f);
@@ -350,16 +350,16 @@ const hasInitialValue = (o) => "init" in o, isActuallyWritableAtom = (o) => !!o.
350
350
  dev_get_atom_state: (f) => o.get(f),
351
351
  dev_get_mounted: (f) => n.get(f),
352
352
  dev_restore_atoms: (f) => {
353
- for (const [C, w] of f)
354
- hasInitialValue(C) && (m(C, w), v(C));
355
- const _ = L();
353
+ for (const [w, A] of f)
354
+ hasInitialValue(w) && (m(w, A), S(w));
355
+ const v = L();
356
356
  l.forEach(
357
- (C) => C({ type: "restore", flushed: _ })
357
+ (w) => w({ type: "restore", flushed: v })
358
358
  );
359
359
  }
360
360
  } : {
361
361
  get: j,
362
- set: B,
362
+ set: _,
363
363
  sub: P
364
364
  };
365
365
  };
@@ -386,27 +386,27 @@ function splitAtom(o, n) {
386
386
  m[j] = b;
387
387
  return;
388
388
  }
389
- const k = (S) => {
390
- const B = S(l), R = S(o), T = a(R, B == null ? void 0 : B.arr).keyList.indexOf(E);
391
- if (T < 0 || T >= R.length) {
389
+ const k = (R) => {
390
+ const _ = R(l), C = R(o), N = a(C, _ == null ? void 0 : _.arr).keyList.indexOf(E);
391
+ if (N < 0 || N >= C.length) {
392
392
  const L = c[a(c).keyList.indexOf(E)];
393
393
  if (L)
394
394
  return L;
395
395
  throw new Error("splitAtom: index out of bounds for read");
396
396
  }
397
- return R[T];
398
- }, v = (S, B, R) => {
399
- const A = S(l), T = S(o), P = a(T, A == null ? void 0 : A.arr).keyList.indexOf(E);
400
- if (P < 0 || P >= T.length)
397
+ return C[N];
398
+ }, S = (R, _, C) => {
399
+ const B = R(l), N = R(o), P = a(N, B == null ? void 0 : B.arr).keyList.indexOf(E);
400
+ if (P < 0 || P >= N.length)
401
401
  throw new Error("splitAtom: index out of bounds for write");
402
- const f = isFunction(R) ? R(T[P]) : R;
403
- B(o, [
404
- ...T.slice(0, P),
402
+ const f = isFunction(C) ? C(N[P]) : C;
403
+ _(o, [
404
+ ...N.slice(0, P),
405
405
  f,
406
- ...T.slice(P + 1)
406
+ ...N.slice(P + 1)
407
407
  ]);
408
408
  };
409
- m[j] = isWritable(o) ? atom(k, v) : atom(k);
409
+ m[j] = isWritable(o) ? atom(k, S) : atom(k);
410
410
  }), p && p.keyList.length === g.length && p.keyList.every((x, j) => x === g[j]) ? u = p : u = { arr: c, atomList: m, keyList: g }, r.set(c, u), u;
411
411
  }, l = atom((c) => {
412
412
  const d = c(l), u = c(o);
@@ -1196,13 +1196,13 @@ const useBlocksStoreManager = () => {
1196
1196
  } = useBlocksStoreManager();
1197
1197
  return {
1198
1198
  moveBlocks: (E, b, k) => {
1199
- const v = map(E, (B) => {
1200
- const A = n.find((P) => P._id === B)._parent || null, L = n.filter((P) => A ? P._parent === A : !P._parent).map((P) => P._id).indexOf(B);
1201
- return { _id: B, oldParent: A, oldPosition: L };
1202
- }), S = v.find(({ _id: B }) => B === E[0]);
1203
- S && S.oldParent === b && S.oldPosition === k || (i(E, b, k), o({
1204
- undo: () => each(v, ({ _id: B, oldParent: R, oldPosition: A }) => {
1205
- i([B], R, A);
1199
+ const S = map(E, (_) => {
1200
+ const B = n.find((P) => P._id === _)._parent || null, L = n.filter((P) => B ? P._parent === B : !P._parent).map((P) => P._id).indexOf(_);
1201
+ return { _id: _, oldParent: B, oldPosition: L };
1202
+ }), R = S.find(({ _id: _ }) => _ === E[0]);
1203
+ R && R.oldParent === b && R.oldPosition === k || (i(E, b, k), o({
1204
+ undo: () => each(S, ({ _id: _, oldParent: C, oldPosition: B }) => {
1205
+ i([_], C, B);
1206
1206
  }),
1207
1207
  redo: () => i(E, b, k)
1208
1208
  }));
@@ -1214,27 +1214,27 @@ const useBlocksStoreManager = () => {
1214
1214
  });
1215
1215
  },
1216
1216
  removeBlocks: (E) => {
1217
- var S;
1218
- const b = (S = first(E)) == null ? void 0 : S._parent, v = n.filter((B) => b ? B._parent === b : !B._parent).indexOf(first(E));
1217
+ var R;
1218
+ const b = (R = first(E)) == null ? void 0 : R._parent, S = n.filter((_) => b ? _._parent === b : !_._parent).indexOf(first(E));
1219
1219
  l(map(E, "_id")), o({
1220
- undo: () => a(E, b, v),
1220
+ undo: () => a(E, b, S),
1221
1221
  redo: () => l(map(E, "_id"))
1222
1222
  });
1223
1223
  },
1224
1224
  updateBlocks: (E, b, k) => {
1225
- let v = [];
1225
+ let S = [];
1226
1226
  if (k)
1227
- v = map(E, (S) => ({ _id: S, ...k }));
1227
+ S = map(E, (R) => ({ _id: R, ...k }));
1228
1228
  else {
1229
- const S = keys(b);
1230
- v = map(E, (B) => {
1231
- const R = n.find((T) => T._id === B), A = { _id: B };
1232
- return each(S, (T) => A[T] = R[T]), A;
1229
+ const R = keys(b);
1230
+ S = map(E, (_) => {
1231
+ const C = n.find((N) => N._id === _), B = { _id: _ };
1232
+ return each(R, (N) => B[N] = C[N]), B;
1233
1233
  });
1234
1234
  }
1235
- c(map(E, (S) => ({ _id: S, ...b }))), o({
1236
- undo: () => c(v),
1237
- redo: () => c(map(E, (S) => ({ _id: S, ...b })))
1235
+ c(map(E, (R) => ({ _id: R, ...b }))), o({
1236
+ undo: () => c(S),
1237
+ redo: () => c(map(E, (R) => ({ _id: R, ...b })))
1238
1238
  });
1239
1239
  },
1240
1240
  updateBlocksRuntime: (E, b) => {
@@ -1249,8 +1249,8 @@ const useBlocksStoreManager = () => {
1249
1249
  updateMultipleBlocksProps: (E) => {
1250
1250
  let b = [];
1251
1251
  b = map(E, (k) => {
1252
- const v = keys(k), S = n.find((R) => R._id === k._id), B = {};
1253
- return each(v, (R) => B[R] = S[R]), B;
1252
+ const S = keys(k), R = n.find((C) => C._id === k._id), _ = {};
1253
+ return each(S, (C) => _[C] = R[C]), _;
1254
1254
  }), c(E), o({
1255
1255
  undo: () => c(b),
1256
1256
  redo: () => c(E)
@@ -1281,16 +1281,16 @@ const useBlocksStoreManager = () => {
1281
1281
  return a(k, c, d);
1282
1282
  }
1283
1283
  const u = generateUUID(), p = getBlockDefaultProps(i.props), m = [];
1284
- forIn(p, (k, v) => {
1284
+ forIn(p, (k, S) => {
1285
1285
  if (startsWith(k, SLOT_KEY)) {
1286
- const S = k.replace(SLOT_KEY, "");
1286
+ const R = k.replace(SLOT_KEY, "");
1287
1287
  m.push({
1288
- _id: S,
1288
+ _id: R,
1289
1289
  _type: "Slot",
1290
1290
  _parent: u,
1291
- _name: i.props[v].name,
1292
- _styles: i.props[v].styles,
1293
- _emptyStyles: i.props[v].emptyStyles
1291
+ _name: i.props[S].name,
1292
+ _styles: i.props[S].styles,
1293
+ _emptyStyles: i.props[S].emptyStyles
1294
1294
  });
1295
1295
  }
1296
1296
  });
@@ -2918,7 +2918,7 @@ class Content extends Component {
2918
2918
  return Children.only(this.props.children);
2919
2919
  }
2920
2920
  }
2921
- U(Content, "propTypes", {
2921
+ F(Content, "propTypes", {
2922
2922
  children: PropTypes.element.isRequired,
2923
2923
  contentDidMount: PropTypes.func.isRequired,
2924
2924
  contentDidUpdate: PropTypes.func.isRequired
@@ -2926,17 +2926,17 @@ U(Content, "propTypes", {
2926
2926
  class Frame extends Component {
2927
2927
  constructor(r, a) {
2928
2928
  super(r, a);
2929
- U(this, "setRef", (r) => {
2929
+ F(this, "setRef", (r) => {
2930
2930
  this.nodeRef.current = r;
2931
2931
  const { forwardedRef: a } = this.props;
2932
2932
  typeof a == "function" ? a(r) : a && (a.current = r);
2933
2933
  });
2934
- U(this, "handleLoad", () => {
2934
+ F(this, "handleLoad", () => {
2935
2935
  clearInterval(this.loadCheck), this.state.iframeLoaded || this.setState({ iframeLoaded: !0 });
2936
2936
  });
2937
2937
  // In certain situations on a cold cache DOMContentLoaded never gets called
2938
2938
  // fallback to an interval to check if that's the case
2939
- U(this, "loadCheck", () => setInterval(() => {
2939
+ F(this, "loadCheck", () => setInterval(() => {
2940
2940
  this.handleLoad();
2941
2941
  }, 500));
2942
2942
  this._isMounted = !1, this.nodeRef = React__default.createRef(), this.state = { iframeLoaded: !1 };
@@ -2977,7 +2977,7 @@ class Frame extends Component {
2977
2977
  // also inject into the body and can mess up React. For this reason
2978
2978
  // initialContent is expected to have a div inside of the body
2979
2979
  // element that we render react into.
2980
- U(Frame, "propTypes", {
2980
+ F(Frame, "propTypes", {
2981
2981
  style: PropTypes.object,
2982
2982
  // eslint-disable-line
2983
2983
  head: PropTypes.node,
@@ -2987,7 +2987,7 @@ U(Frame, "propTypes", {
2987
2987
  contentDidMount: PropTypes.func,
2988
2988
  contentDidUpdate: PropTypes.func,
2989
2989
  children: PropTypes.oneOfType([PropTypes.element, PropTypes.arrayOf(PropTypes.element)])
2990
- }), U(Frame, "defaultProps", {
2990
+ }), F(Frame, "defaultProps", {
2991
2991
  style: {},
2992
2992
  head: null,
2993
2993
  children: void 0,
@@ -3074,20 +3074,20 @@ const useDnd = () => {
3074
3074
  x.preventDefault(), x.stopPropagation(), throttledDragOver(x);
3075
3075
  },
3076
3076
  onDrop: (x) => {
3077
- var R;
3078
- const j = dropTarget, b = getOrientation(j) === "vertical" ? x.clientY + ((R = iframeDocument == null ? void 0 : iframeDocument.defaultView) == null ? void 0 : R.scrollY) : x.clientX;
3077
+ var C;
3078
+ const j = dropTarget, b = getOrientation(j) === "vertical" ? x.clientY + ((C = iframeDocument == null ? void 0 : iframeDocument.defaultView) == null ? void 0 : C.scrollY) : x.clientX;
3079
3079
  dropIndex = calculateDropIndex(b, possiblePositions);
3080
- const k = d, v = j.getAttribute("data-block-id"), S = dropTarget.getAttribute("data-dnd-dragged") !== "yes";
3081
- if ((k == null ? void 0 : k._id) === v || !S) {
3080
+ const k = d, S = j.getAttribute("data-block-id"), R = dropTarget.getAttribute("data-dnd-dragged") !== "yes";
3081
+ if ((k == null ? void 0 : k._id) === S || !R) {
3082
3082
  g();
3083
3083
  return;
3084
3084
  }
3085
3085
  if (!has(k, "_id")) {
3086
- a(k, v === "canvas" ? null : v, dropIndex), setTimeout(g, 300);
3086
+ a(k, S === "canvas" ? null : S, dropIndex), setTimeout(g, 300);
3087
3087
  return;
3088
3088
  }
3089
- let B = j.getAttribute("data-block-id");
3090
- B === null && (B = x.target.parentElement.getAttribute("data-block-id")), c([k._id], B === "canvas" ? null : B, dropIndex), g(), setTimeout(removePlaceholder, 300);
3089
+ let _ = j.getAttribute("data-block-id");
3090
+ _ === null && (_ = x.target.parentElement.getAttribute("data-block-id")), c([k._id], _ === "canvas" ? null : _, dropIndex), g(), setTimeout(removePlaceholder, 300);
3091
3091
  },
3092
3092
  onDragEnter: (x) => {
3093
3093
  const j = x, E = j.target;
@@ -3314,17 +3314,17 @@ const useHandleCanvasDblClick = () => {
3314
3314
  }, [r, c]);
3315
3315
  const x = get(o, "headingFont", "DM Sans"), j = get(o, "bodyFont", "DM Sans");
3316
3316
  return useEffect(() => {
3317
- const E = get(o, "primaryColor", "#000"), b = get(o, "secondaryColor", "#FFF"), k = get(o, "bodyBgLightColor", "#fff"), v = get(o, "bodyBgDarkColor", "#000"), S = get(o, "bodyTextDarkColor", "#000"), B = get(o, "bodyTextLightColor", "#fff"), R = s({
3317
+ const E = get(o, "primaryColor", "#000"), b = get(o, "secondaryColor", "#FFF"), k = get(o, "bodyBgLightColor", "#fff"), S = get(o, "bodyBgDarkColor", "#000"), R = get(o, "bodyTextDarkColor", "#000"), _ = get(o, "bodyTextLightColor", "#fff"), C = s({
3318
3318
  colors: [E, b],
3319
3319
  names: ["primary", "secondary"]
3320
3320
  });
3321
- set(R, "primary.DEFAULT", E), set(R, "secondary.DEFAULT", b);
3322
- const A = {
3321
+ set(C, "primary.DEFAULT", E), set(C, "secondary.DEFAULT", b);
3322
+ const B = {
3323
3323
  "bg-light": k,
3324
- "bg-dark": v,
3325
- "text-dark": S,
3326
- "text-light": B
3327
- }, T = get(o, "roundedCorners", "0");
3324
+ "bg-dark": S,
3325
+ "text-dark": R,
3326
+ "text-light": _
3327
+ }, N = get(o, "roundedCorners", "0");
3328
3328
  !d || !d.tailwind || (d.tailwind.config = {
3329
3329
  darkMode: "class",
3330
3330
  theme: {
@@ -3341,13 +3341,13 @@ const useHandleCanvasDblClick = () => {
3341
3341
  body: [j]
3342
3342
  },
3343
3343
  borderRadius: {
3344
- DEFAULT: `${T || "0"}px`
3344
+ DEFAULT: `${N || "0"}px`
3345
3345
  },
3346
- colors: { ...A, ...R }
3346
+ colors: { ...B, ...C }
3347
3347
  }
3348
3348
  },
3349
3349
  plugins: [
3350
- typography$1,
3350
+ typography,
3351
3351
  forms,
3352
3352
  aspectRatio,
3353
3353
  plugin(function({ addBase: L, theme: P }) {
@@ -3505,9 +3505,9 @@ function applyLanguage(o, n, r) {
3505
3505
  }
3506
3506
  function BlocksRendererStatic({ blocks: o, allBlocks: n }) {
3507
3507
  const { selectedLang: r } = useLanguages(), [a] = useAtom$1(xShowBlocksAtom), [l] = useCutBlockIds(), [i] = useAtom$1(draggedBlockAtom), [c] = useAtom$1(dropTargetBlockIdAtom), [, d] = useCanvasWidth(), [u] = useCanvasSettings(), [p] = useHiddenBlockIds(), { getGlobalBlocks: m } = useGlobalBlocksStore(), g = useCallback((b) => getStyleAttrs(b, d), [d]), [x] = useChaiExternalData(), [j] = useAtom$1(inlineEditingActiveAtom), E = useCallback(
3508
- (b) => b.reduce((k, v) => {
3509
- const S = get(u, v, {});
3510
- return { ...k, ...S };
3508
+ (b) => b.reduce((k, S) => {
3509
+ const R = get(u, S, {});
3510
+ return { ...k, ...R };
3511
3511
  }, {}),
3512
3512
  [u]
3513
3513
  );
@@ -3515,18 +3515,18 @@ function BlocksRendererStatic({ blocks: o, allBlocks: n }) {
3515
3515
  o.map((b, k) => {
3516
3516
  if (j === b._id || p.includes(b._id))
3517
3517
  return null;
3518
- const v = {}, S = filter(n, { _parent: b._id });
3519
- if (v.children = S.length > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(BlocksRendererStatic, { allBlocks: n, blocks: S }) : null, b._type === "GlobalBlock") {
3520
- const C = m(b);
3521
- v.children = /* @__PURE__ */ jsxRuntimeExports.jsx(RenderGlobalBlock, { blocks: filter(C, (w) => !w._parent), allBlocks: C });
3518
+ const S = {}, R = filter(n, { _parent: b._id });
3519
+ if (S.children = R.length > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(BlocksRendererStatic, { allBlocks: n, blocks: R }) : null, b._type === "GlobalBlock") {
3520
+ const w = m(b);
3521
+ S.children = /* @__PURE__ */ jsxRuntimeExports.jsx(RenderGlobalBlock, { blocks: filter(w, (A) => !A._parent), allBlocks: w });
3522
3522
  }
3523
- const B = getBlockComponent(b._type), R = get(B, "server", !1), A = R ? RSCBlock : get(B, "builderComponent", get(B, "component", null));
3524
- if (isNull(A))
3523
+ const _ = getBlockComponent(b._type), C = get(_, "server", !1), B = C ? RSCBlock : get(_, "builderComponent", get(_, "component", null));
3524
+ if (isNull(B))
3525
3525
  return /* @__PURE__ */ jsxRuntimeExports.jsx("noscript", { children: `<!-- ${b == null ? void 0 : b._type} not registered -->` });
3526
- const T = has(B, "getBlockStateFrom") ? B == null ? void 0 : B.getBlockStateFrom(b, n) : [], L = E(T), P = g(b);
3526
+ const N = has(_, "getBlockStateFrom") ? _ == null ? void 0 : _.getBlockStateFrom(b, n) : [], L = E(N), P = g(b);
3527
3527
  if (get(P, "__isHidden", !1) && !includes(a, b._id))
3528
3528
  return null;
3529
- const f = i && isDescendant(i._id, b._id, n), _ = {
3529
+ const f = i && isDescendant(i._id, b._id, n), v = {
3530
3530
  ...includes(a, b._id) ? { "force-show": "" } : {},
3531
3531
  "data-block-id": b._id,
3532
3532
  "data-block-type": b._type,
@@ -3540,12 +3540,12 @@ function BlocksRendererStatic({ blocks: o, allBlocks: n }) {
3540
3540
  ...c === b._id && !f ? { "data-drop": "yes" } : {},
3541
3541
  ...includes(l, b._id) ? { "data-cut-block": "yes" } : {}
3542
3542
  };
3543
- return R ? /* @__PURE__ */ jsxRuntimeExports.jsx(RSCBlock, { block: b, blockProps: _ }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Suspense, { children: React__default.createElement(A, {
3544
- blockProps: _,
3543
+ return C ? /* @__PURE__ */ jsxRuntimeExports.jsx(RSCBlock, { block: b, blockProps: v }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Suspense, { children: React__default.createElement(B, {
3544
+ blockProps: v,
3545
3545
  index: k,
3546
- ...applyBindings(applyLanguage(b, r, B), x),
3546
+ ...applyBindings(applyLanguage(b, r, _), x),
3547
3547
  ...omit(P, ["__isHidden"]),
3548
- ...v,
3548
+ ...S,
3549
3549
  inBuilder: !0,
3550
3550
  blockState: L
3551
3551
  }) });
@@ -3579,7 +3579,7 @@ const useAllDataProviders = () => useMemo(() => getChaiDataProviders(), []), Blo
3579
3579
  className: "mt-1 block w-full rounded-md bg-gray-100 p-2 text-black hover:bg-gray-200 dark:bg-gray-700 dark:text-white dark:hover:bg-gray-700",
3580
3580
  children: [
3581
3581
  "+ ",
3582
- o("add_block")
3582
+ o("Add block")
3583
3583
  ]
3584
3584
  }
3585
3585
  );
@@ -3601,43 +3601,43 @@ const useAllDataProviders = () => useMemo(() => getChaiDataProviders(), []), Blo
3601
3601
  };
3602
3602
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { id: "main-content", onClick: d, className: "h-full w-full p-8 pb-0", ref: i, children: o });
3603
3603
  }, getElementByStyleId = (o, n) => o.querySelector(`[data-style-id="${n}"]`), StaticCanvas = () => {
3604
- const [o] = useAtom$1(networkModeAtom), [n] = useCanvasWidth(), [, r] = useSelectedBlockIds(), a = useSelectedBlock(), [, l] = useHighlightBlockId(), i = useRef(null), c = useRef(null), [d, u] = useState({ width: 0, height: 0 }), p = useCanvasScale(d), [m, g] = useState([]), [, x] = useState([]), [, j] = useAtom$1(canvasIframeAtom), [E, b] = useSelectedStylingBlocks(), k = useBuilderProp("loading", !1), v = useBuilderProp("htmlDir", "ltr"), S = (A) => {
3605
- u((T) => ({ ...T, width: A }));
3604
+ const [o] = useAtom$1(networkModeAtom), [n] = useCanvasWidth(), [, r] = useSelectedBlockIds(), a = useSelectedBlock(), [, l] = useHighlightBlockId(), i = useRef(null), c = useRef(null), [d, u] = useState({ width: 0, height: 0 }), p = useCanvasScale(d), [m, g] = useState([]), [, x] = useState([]), [, j] = useAtom$1(canvasIframeAtom), [E, b] = useSelectedStylingBlocks(), k = useBuilderProp("loading", !1), S = useBuilderProp("htmlDir", "ltr"), R = (B) => {
3605
+ u((N) => ({ ...N, width: B }));
3606
3606
  };
3607
3607
  useEffect(() => {
3608
3608
  if (!c.current)
3609
3609
  return;
3610
- const { clientWidth: A, clientHeight: T } = c.current;
3611
- u({ width: A, height: T });
3610
+ const { clientWidth: B, clientHeight: N } = c.current;
3611
+ u({ width: B, height: N });
3612
3612
  }, [c, n]);
3613
- const B = (A, T = 0) => {
3614
- const { top: L } = A.getBoundingClientRect();
3615
- return L + T >= 0 && L - T <= window.innerHeight;
3613
+ const _ = (B, N = 0) => {
3614
+ const { top: L } = B.getBoundingClientRect();
3615
+ return L + N >= 0 && L - N <= window.innerHeight;
3616
3616
  };
3617
3617
  useEffect(() => {
3618
- var A, T;
3618
+ var B, N;
3619
3619
  if (a && a.type !== "Multiple" && i.current) {
3620
3620
  const L = getElementByDataBlockId(i.current.contentDocument, a._id);
3621
- L && (B(L) || (T = (A = i.current) == null ? void 0 : A.contentWindow) == null || T.scrollTo({ top: L.offsetTop, behavior: "smooth" }), g([L]));
3621
+ L && (_(L) || (N = (B = i.current) == null ? void 0 : B.contentWindow) == null || N.scrollTo({ top: L.offsetTop, behavior: "smooth" }), g([L]));
3622
3622
  }
3623
3623
  }, [a]), useEffect(() => {
3624
3624
  if (!isEmpty(E) && i.current) {
3625
- const A = getElementByStyleId(
3625
+ const B = getElementByStyleId(
3626
3626
  i.current.contentDocument,
3627
3627
  first(E).id
3628
3628
  );
3629
- x(A ? [A] : [null]);
3629
+ x(B ? [B] : [null]);
3630
3630
  } else
3631
3631
  x([null]);
3632
3632
  }, [E]);
3633
- const R = useMemo(() => {
3634
- let A = IframeInitialContent;
3635
- return A = A.replace("__HTML_DIR__", v), o === "offline" && (A = A.replace(
3633
+ const C = useMemo(() => {
3634
+ let B = IframeInitialContent;
3635
+ return B = B.replace("__HTML_DIR__", S), o === "offline" && (B = B.replace(
3636
3636
  "https://old.chaibuilder.com/offline/tailwind.cdn.js",
3637
3637
  "/offline/tailwind.cdn.js"
3638
- ), A = A.replace("https://unpkg.com/aos@next/dist/aos.css", "/offline/aos.css"), A = A.replace("https://unpkg.com/aos@next/dist/aos.js", "/offline/aos.js")), A;
3639
- }, [o, v]);
3640
- return /* @__PURE__ */ jsxRuntimeExports.jsx(ResizableCanvasWrapper, { onMount: S, onResize: S, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
3638
+ ), B = B.replace("https://unpkg.com/aos@next/dist/aos.css", "/offline/aos.css"), B = B.replace("https://unpkg.com/aos@next/dist/aos.js", "/offline/aos.js")), B;
3639
+ }, [o, S]);
3640
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(ResizableCanvasWrapper, { onMount: R, onResize: R, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
3641
3641
  "div",
3642
3642
  {
3643
3643
  onClick: () => {
@@ -3654,7 +3654,7 @@ const useAllDataProviders = () => useMemo(() => getChaiDataProviders(), []), Blo
3654
3654
  id: "canvas-iframe",
3655
3655
  style: { ...p, ...isEmpty(p) ? { width: `${n}px` } : {} },
3656
3656
  className: "relative mx-auto box-content h-full w-full max-w-full shadow-lg transition-all duration-300 ease-linear",
3657
- initialContent: R,
3657
+ initialContent: C,
3658
3658
  children: [
3659
3659
  /* @__PURE__ */ jsxRuntimeExports.jsx(KeyboardHandler, {}),
3660
3660
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -3777,7 +3777,7 @@ const useAllDataProviders = () => useMemo(() => getChaiDataProviders(), []), Blo
3777
3777
  l !== o.length - 1 && /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronRight, { className: "rtl:rotate-180", size: 16 })
3778
3778
  ] }, l))
3779
3779
  ] }) });
3780
- }, CodeEditor$1 = React__default.lazy(() => import("./CodeEditor-p_MY9fHx.js")), CanvasArea = () => {
3780
+ }, CodeEditor$1 = React__default.lazy(() => import("./CodeEditor-PpTH-bSI.js")), CanvasArea = () => {
3781
3781
  const [o] = useCodeEditor(), n = useBuilderProp("onError", noop);
3782
3782
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex h-full max-h-full w-full flex-1 flex-col", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative flex h-full max-h-full flex-col overflow-hidden bg-gray-100/40 px-2", children: [
3783
3783
  /* @__PURE__ */ jsxRuntimeExports.jsx(Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { className: "h-full" }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorBoundary, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx(FallbackError, {}), onError: n, children: /* @__PURE__ */ jsxRuntimeExports.jsx(StaticCanvas$1, {}) }) }),
@@ -3852,8 +3852,8 @@ const useAllDataProviders = () => useMemo(() => getChaiDataProviders(), []), Blo
3852
3852
  showHeading: o = !0,
3853
3853
  className: n = ""
3854
3854
  }) => {
3855
- const [r, a] = useBrandingOptions(), [l] = useBlocksContainer(), i = React.useRef(r), { t: c } = useTranslation(), d = ({ formData: R }, A) => {
3856
- A && (a(R), i.current = R);
3855
+ const [r, a] = useBrandingOptions(), [l] = useBlocksContainer(), i = React.useRef(r), { t: c } = useTranslation(), d = ({ formData: C }, B) => {
3856
+ B && (a(C), i.current = C);
3857
3857
  }, {
3858
3858
  bodyFont: u,
3859
3859
  headingFont: p,
@@ -3865,54 +3865,54 @@ const useAllDataProviders = () => useMemo(() => getChaiDataProviders(), []), Blo
3865
3865
  bodyBgLightColor: b,
3866
3866
  roundedCorners: k
3867
3867
  } = r;
3868
- let v = {
3868
+ let S = {
3869
3869
  headingFont: y({
3870
- title: c("theme_config.heading_font"),
3870
+ title: c("Theme Config.Heading Font"),
3871
3871
  default: p,
3872
3872
  options: FONTS
3873
3873
  }),
3874
3874
  bodyFont: y({
3875
- title: c("theme_config.body_font"),
3875
+ title: c("Theme Config.Body Font"),
3876
3876
  default: u,
3877
3877
  options: FONTS
3878
3878
  }),
3879
3879
  roundedCorners: s$1({
3880
- title: c("theme_config.rounded_corner"),
3880
+ title: c("Theme Config.Rounded Corner"),
3881
3881
  default: parseInt(k || 5, 10)
3882
3882
  }),
3883
- primaryColor: h({ title: c("theme_config.primary"), default: m }),
3884
- secondaryColor: h({ title: c("theme_config.secondary"), default: E })
3883
+ primaryColor: h({ title: c("Theme Config.Primary"), default: m }),
3884
+ secondaryColor: h({ title: c("Theme Config.Secondary"), default: E })
3885
3885
  };
3886
- l || (v = {
3887
- ...v,
3886
+ l || (S = {
3887
+ ...S,
3888
3888
  bodyBgLightColor: h({
3889
- title: c("theme_config.background"),
3889
+ title: c("Theme Config.Background"),
3890
3890
  default: b
3891
3891
  }),
3892
3892
  bodyTextLightColor: h({
3893
- title: c("theme_config.text_color"),
3893
+ title: c("Theme Config.Text Color"),
3894
3894
  default: g
3895
3895
  }),
3896
3896
  bodyBgDarkColor: h({
3897
- title: c("theme_config.background_dark_mode"),
3897
+ title: c("Theme Config.Background Dark Mode"),
3898
3898
  default: j
3899
3899
  }),
3900
3900
  bodyTextDarkColor: h({
3901
- title: c("theme_config.text_color_dark_mode"),
3901
+ title: c("Theme Config.Text Color Dark Mode"),
3902
3902
  default: x
3903
3903
  })
3904
3904
  });
3905
- const S = {
3905
+ const R = {
3906
3906
  type: "object",
3907
3907
  properties: {}
3908
- }, B = {};
3909
- return Object.keys(v).forEach((R) => {
3910
- const A = v[R];
3911
- return S.properties || (S.properties = {}), S.properties[R] = A.schema, B[R] = A.uiSchema, !0;
3908
+ }, _ = {};
3909
+ return Object.keys(S).forEach((C) => {
3910
+ const B = S[C];
3911
+ return R.properties || (R.properties = {}), R.properties[C] = B.schema, _[C] = B.uiSchema, !0;
3912
3912
  }), /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("flex h-full w-full select-none flex-col", n), children: [
3913
3913
  o ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "rounded-md bg-background/30 p-1", children: /* @__PURE__ */ jsxRuntimeExports.jsx("h1", { className: "px-1 font-semibold", children: c("Theme Configuration") }) }) : null,
3914
3914
  /* @__PURE__ */ jsxRuntimeExports.jsx(
3915
- Form,
3915
+ Form$1,
3916
3916
  {
3917
3917
  widgets: { color: ColorField },
3918
3918
  idSeparator: ".",
@@ -3920,8 +3920,8 @@ const useAllDataProviders = () => useMemo(() => getChaiDataProviders(), []), Blo
3920
3920
  omitExtraData: !0,
3921
3921
  liveOmit: !0,
3922
3922
  liveValidate: !0,
3923
- uiSchema: B,
3924
- schema: S,
3923
+ uiSchema: _,
3924
+ schema: R,
3925
3925
  formData: r,
3926
3926
  validator,
3927
3927
  onChange: d
@@ -4104,14 +4104,14 @@ function BiExpandVertical(o) {
4104
4104
  const Node = memo(({ node: o, style: n, dragHandle: r }) => {
4105
4105
  const a = useBuilderProp("outlineMenuItems", []), { t: l } = useTranslation(), [i, , c] = useHiddenBlockIds(), [d] = useAtom$1(canvasIframeAtom);
4106
4106
  let u = null;
4107
- const p = o.children.length > 0, { highlightBlock: m, clearHighlight: g } = useBlockHighlight(), { id: x, data: j, isSelected: E, willReceiveDrop: b, isDragging: k, isEditing: v, handleClick: S } = o, B = (f) => {
4107
+ const p = o.children.length > 0, { highlightBlock: m, clearHighlight: g } = useBlockHighlight(), { id: x, data: j, isSelected: E, willReceiveDrop: b, isDragging: k, isEditing: S, handleClick: R } = o, _ = (f) => {
4108
4108
  f.stopPropagation(), !i.includes(x) && o.toggle();
4109
- }, R = (f) => {
4109
+ }, C = (f) => {
4110
4110
  f.isInternal && (u = f.isOpen, f.isOpen && f.close());
4111
- }, A = (f) => {
4111
+ }, B = (f) => {
4112
4112
  f.isInternal && u !== null && (u ? f.open() : f.close(), u = null);
4113
- }, T = (f) => {
4114
- f.stopPropagation(), !o.isOpen && !i.includes(x) && o.toggle(), S(f);
4113
+ }, N = (f) => {
4114
+ f.stopPropagation(), !o.isOpen && !i.includes(x) && o.toggle(), R(f);
4115
4115
  };
4116
4116
  useEffect(() => {
4117
4117
  const f = setTimeout(() => {
@@ -4120,18 +4120,18 @@ const Node = memo(({ node: o, style: n, dragHandle: r }) => {
4120
4120
  return () => clearTimeout(f);
4121
4121
  }, [b, o, k]);
4122
4122
  const L = useMemo(() => {
4123
- const f = Object.keys(j), _ = [];
4124
- for (let C = 0; C < f.length; C++)
4125
- if (f[C].endsWith("_attrs")) {
4126
- const w = j[f[C]], I = Object.keys(w).join("|");
4127
- I.match(/x-data/) && _.push("data"), I.match(/x-on/) && _.push("event"), I.match(/x-show|x-if/) && _.push("show");
4123
+ const f = Object.keys(j), v = [];
4124
+ for (let w = 0; w < f.length; w++)
4125
+ if (f[w].endsWith("_attrs")) {
4126
+ const A = j[f[w]], I = Object.keys(A).join("|");
4127
+ I.match(/x-data/) && v.push("data"), I.match(/x-on/) && v.push("event"), I.match(/x-show|x-if/) && v.push("show");
4128
4128
  }
4129
- return _;
4130
- }, [j]), P = (f, _) => {
4131
- const C = d.contentDocument || d.contentWindow.document, w = C.querySelector(`[data-block-id=${f}]`);
4132
- w && w.setAttribute("data-drop", _);
4133
- const I = w.getBoundingClientRect(), N = d.getBoundingClientRect();
4134
- I.top >= N.top && I.left >= N.left && I.bottom <= N.bottom && I.right <= N.right || (C.documentElement.scrollTop = w.offsetTop - N.top);
4129
+ return v;
4130
+ }, [j]), P = (f, v) => {
4131
+ const w = d.contentDocument || d.contentWindow.document, A = w.querySelector(`[data-block-id=${f}]`);
4132
+ A && A.setAttribute("data-drop", v);
4133
+ const I = A.getBoundingClientRect(), T = d.getBoundingClientRect();
4134
+ I.top >= T.top && I.left >= T.left && I.bottom <= T.bottom && I.right <= T.right || (w.documentElement.scrollTop = A.offsetTop - T.top);
4135
4135
  };
4136
4136
  return x === ROOT_TEMP_KEY ? /* @__PURE__ */ jsxRuntimeExports.jsxs(
4137
4137
  "button",
@@ -4140,7 +4140,7 @@ const Node = memo(({ node: o, style: n, dragHandle: r }) => {
4140
4140
  className: "mb-10 mt-5 w-full rounded bg-gray-100 p-1 hover:bg-gray-200 dark:bg-gray-800",
4141
4141
  children: [
4142
4142
  "+ ",
4143
- l("add_block")
4143
+ l("Add block")
4144
4144
  ]
4145
4145
  }
4146
4146
  ) : /* @__PURE__ */ jsxRuntimeExports.jsx(BlockContextMenu, { id: x, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
@@ -4148,12 +4148,12 @@ const Node = memo(({ node: o, style: n, dragHandle: r }) => {
4148
4148
  {
4149
4149
  onMouseEnter: () => m(x),
4150
4150
  onMouseLeave: () => g(),
4151
- onClick: T,
4151
+ onClick: N,
4152
4152
  style: n,
4153
4153
  "data-node-id": x,
4154
4154
  ref: i.includes(x) ? null : r,
4155
- onDragStart: () => R(o),
4156
- onDragEnd: () => A(o),
4155
+ onDragStart: () => C(o),
4156
+ onDragEnd: () => B(o),
4157
4157
  onDragOver: (f) => {
4158
4158
  f.preventDefault(), P(x, "yes");
4159
4159
  },
@@ -4176,12 +4176,12 @@ const Node = memo(({ node: o, style: n, dragHandle: r }) => {
4176
4176
  "div",
4177
4177
  {
4178
4178
  className: `flex h-4 w-4 rotate-0 transform cursor-pointer items-center justify-center text-xs transition-transform duration-100 ${o.isOpen ? "rotate-90" : ""}`,
4179
- children: p && /* @__PURE__ */ jsxRuntimeExports.jsx("button", { onClick: B, type: "button", children: /* @__PURE__ */ jsxRuntimeExports.jsx(TriangleRightIcon, {}) })
4179
+ children: p && /* @__PURE__ */ jsxRuntimeExports.jsx("button", { onClick: _, type: "button", children: /* @__PURE__ */ jsxRuntimeExports.jsx(TriangleRightIcon, {}) })
4180
4180
  }
4181
4181
  ),
4182
4182
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center", children: [
4183
4183
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "-mt-0.5 h-3 w-3", children: /* @__PURE__ */ jsxRuntimeExports.jsx(TypeIcon, { type: j == null ? void 0 : j._type }) }),
4184
- v ? /* @__PURE__ */ jsxRuntimeExports.jsx(Input, { node: o }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(
4184
+ S ? /* @__PURE__ */ jsxRuntimeExports.jsx(Input, { node: o }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(
4185
4185
  "div",
4186
4186
  {
4187
4187
  className: "ml-2 flex items-center gap-x-1 truncate text-[11px]",
@@ -4586,7 +4586,7 @@ const Node = memo(({ node: o, style: n, dragHandle: r }) => {
4586
4586
  ...getAttrs(r),
4587
4587
  ...getStyles(r)
4588
4588
  }, r.attributes) {
4589
- const k = r.attributes.find((v) => includes(NAME_ATTRIBUTES, v.key));
4589
+ const k = r.attributes.find((S) => includes(NAME_ATTRIBUTES, S.key));
4590
4590
  k && (a._name = k.value);
4591
4591
  }
4592
4592
  if (i)
@@ -4604,14 +4604,14 @@ const Node = memo(({ node: o, style: n, dragHandle: r }) => {
4604
4604
  ];
4605
4605
  a = {
4606
4606
  ...a,
4607
- href: ((u = l.find((v) => v.key === "href")) == null ? void 0 : u.value) || "",
4608
- hrefType: ((p = l.find((v) => v.key === "data-vbtype")) == null ? void 0 : p.value) || "video",
4609
- autoplay: ((m = l.find((v) => v.key === "data-autoplay")) == null ? void 0 : m.value) === "true",
4610
- maxWidth: ((x = (g = l.find((v) => v.key === "data-maxwidth")) == null ? void 0 : g.value) == null ? void 0 : x.replace("px", "")) || "",
4611
- backdropColor: ((j = l.find((v) => v.key === "data-overlay")) == null ? void 0 : j.value) || "",
4612
- galleryName: ((E = l.find((v) => v.key === "data-gall")) == null ? void 0 : E.value) || ""
4613
- }, forEach(k, (v) => {
4614
- has(a, `styles_attrs.${v}`) && delete a.styles_attrs[v];
4607
+ href: ((u = l.find((S) => S.key === "href")) == null ? void 0 : u.value) || "",
4608
+ hrefType: ((p = l.find((S) => S.key === "data-vbtype")) == null ? void 0 : p.value) || "video",
4609
+ autoplay: ((m = l.find((S) => S.key === "data-autoplay")) == null ? void 0 : m.value) === "true",
4610
+ maxWidth: ((x = (g = l.find((S) => S.key === "data-maxwidth")) == null ? void 0 : g.value) == null ? void 0 : x.replace("px", "")) || "",
4611
+ backdropColor: ((j = l.find((S) => S.key === "data-overlay")) == null ? void 0 : j.value) || "",
4612
+ galleryName: ((E = l.find((S) => S.key === "data-gall")) == null ? void 0 : E.value) || ""
4613
+ }, forEach(k, (S) => {
4614
+ has(a, `styles_attrs.${S}`) && delete a.styles_attrs[S];
4615
4615
  });
4616
4616
  }
4617
4617
  if (a._type === "Input") {
@@ -4621,8 +4621,8 @@ const Node = memo(({ node: o, style: n, dragHandle: r }) => {
4621
4621
  const k = stringify([r]);
4622
4622
  return hasVideoEmbed(k) && (set(a, "_type", "Video"), set(a, "url", getVideoURLFromHTML(k)), set(a, "styles", `${STYLES_KEY},absolute top-0 left-0 w-full h-full`), set(a, "controls", { autoPlay: !1, muted: !0, loop: !1, controls: !1 })), a.content = k, [a];
4623
4623
  } else if (r.tagName === "svg") {
4624
- const k = find(r.attributes, { key: "height" }), v = find(r.attributes, { key: "width" }), S = get(k, "value") ? `[${get(k, "value")}px]` : "24px", B = get(v, "value") ? `[${get(v, "value")}px]` : "24px", R = get(find(r.attributes, { key: "class" }), "value", "w-full h-full");
4625
- return a.styles = `${STYLES_KEY}, ${cn(`w-${B} h-${S}`, R)}`.trim(), r.attributes = filter(r.attributes, (A) => !includes(["style", "width", "height", "class"], A.key)), a.icon = stringify([r]), [a];
4624
+ const k = find(r.attributes, { key: "height" }), S = find(r.attributes, { key: "width" }), R = get(k, "value") ? `[${get(k, "value")}px]` : "24px", _ = get(S, "value") ? `[${get(S, "value")}px]` : "24px", C = get(find(r.attributes, { key: "class" }), "value", "w-full h-full");
4625
+ return a.styles = `${STYLES_KEY}, ${cn(`w-${_} h-${R}`, C)}`.trim(), r.attributes = filter(r.attributes, (B) => !includes(["style", "width", "height", "class"], B.key)), a.icon = stringify([r]), [a];
4626
4626
  } else if (r.tagName == "option" && n && ((b = n.block) == null ? void 0 : b._type) === "Select")
4627
4627
  return n.block.options.push({
4628
4628
  label: getTextContent(r.children),
@@ -4642,9 +4642,9 @@ const Node = memo(({ node: o, style: n, dragHandle: r }) => {
4642
4642
  l([...c], o), a(""), emitChaiBuilderMsg({ name: CHAI_BUILDER_EVENTS.CLOSE_ADD_BLOCK });
4643
4643
  };
4644
4644
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(Card, { className: "border-border/0 p-0 shadow-none", children: [
4645
- /* @__PURE__ */ jsxRuntimeExports.jsx(CardHeader, { className: "p-3", children: /* @__PURE__ */ jsxRuntimeExports.jsx(CardDescription, { children: n("html_snippet_description") }) }),
4645
+ /* @__PURE__ */ jsxRuntimeExports.jsx(CardHeader, { className: "p-3", children: /* @__PURE__ */ jsxRuntimeExports.jsx(CardDescription, { children: n("Use HTML snippets from Tailwind CSS component libraries") }) }),
4646
4646
  /* @__PURE__ */ jsxRuntimeExports.jsx(CardContent, { className: "space-y-2 px-3 py-0", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-1", children: [
4647
- /* @__PURE__ */ jsxRuntimeExports.jsx(Label, { htmlFor: "current", className: "text-sm", children: n("tailwind_html_snippet") }),
4647
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Label, { htmlFor: "current", className: "text-sm", children: n("Tailwind HTML snippet") }),
4648
4648
  /* @__PURE__ */ jsxRuntimeExports.jsx(
4649
4649
  Textarea,
4650
4650
  {
@@ -4654,7 +4654,7 @@ const Node = memo(({ node: o, style: n, dragHandle: r }) => {
4654
4654
  onChange: (c) => a(c.target.value),
4655
4655
  rows: 12,
4656
4656
  value: r,
4657
- placeholder: n("enter_code_snippet"),
4657
+ placeholder: n("Enter your code snippet here"),
4658
4658
  className: "resize-none overflow-x-auto whitespace-pre bg-background font-mono text-xs font-normal"
4659
4659
  }
4660
4660
  )
@@ -4689,8 +4689,8 @@ function ExpandableObject(o) {
4689
4689
  useEffect(() => {
4690
4690
  g.current ? E(p(d, r, n)) : g.current = !0;
4691
4691
  }, [p]);
4692
- const b = x ? u.collapseIcon : u.expandIcon, k = x ? "collapse JSON" : "expand JSON", v = useComponentId(), S = d + 1, B = a.length - 1, R = (A) => {
4693
- A.key === " " && (A.preventDefault(), j());
4692
+ const b = x ? u.collapseIcon : u.expandIcon, k = x ? "collapse JSON" : "expand JSON", S = useComponentId(), R = d + 1, _ = a.length - 1, C = (B) => {
4693
+ B.key === " " && (B.preventDefault(), j());
4694
4694
  };
4695
4695
  return /* @__PURE__ */ createElement("div", {
4696
4696
  className: u.basicChildStyle,
@@ -4698,16 +4698,16 @@ function ExpandableObject(o) {
4698
4698
  }, /* @__PURE__ */ createElement("span", {
4699
4699
  className: b,
4700
4700
  onClick: j,
4701
- onKeyDown: R,
4701
+ onKeyDown: C,
4702
4702
  role: "button",
4703
4703
  tabIndex: 0,
4704
4704
  "aria-label": k,
4705
4705
  "aria-expanded": x,
4706
- "aria-controls": x ? v : void 0
4706
+ "aria-controls": x ? S : void 0
4707
4707
  }), n && (m ? /* @__PURE__ */ createElement("span", {
4708
4708
  className: u.clickableLabel,
4709
4709
  onClick: j,
4710
- onKeyDown: R,
4710
+ onKeyDown: C,
4711
4711
  role: "button",
4712
4712
  tabIndex: -1
4713
4713
  }, n, ":") : /* @__PURE__ */ createElement("span", {
@@ -4715,20 +4715,20 @@ function ExpandableObject(o) {
4715
4715
  }, n, ":")), /* @__PURE__ */ createElement("span", {
4716
4716
  className: u.punctuation
4717
4717
  }, i), x ? /* @__PURE__ */ createElement("div", {
4718
- id: v
4719
- }, a.map((A, T) => /* @__PURE__ */ createElement(DataRender, {
4720
- key: A[0] || T,
4721
- field: A[0],
4722
- value: A[1],
4718
+ id: S
4719
+ }, a.map((B, N) => /* @__PURE__ */ createElement(DataRender, {
4720
+ key: B[0] || N,
4721
+ field: B[0],
4722
+ value: B[1],
4723
4723
  style: u,
4724
- lastElement: T === B,
4725
- level: S,
4724
+ lastElement: N === _,
4725
+ level: R,
4726
4726
  shouldExpandNode: p,
4727
4727
  clickToExpandNode: m
4728
4728
  }))) : /* @__PURE__ */ createElement("span", {
4729
4729
  className: u.collapsedContent,
4730
4730
  onClick: j,
4731
- onKeyDown: R,
4731
+ onKeyDown: C,
4732
4732
  role: "button",
4733
4733
  tabIndex: -1,
4734
4734
  "aria-hidden": !0,
@@ -5138,7 +5138,7 @@ const ViewData = ({ data: o, fullView: n }) => {
5138
5138
  try {
5139
5139
  const n = document.getElementById("icon-picker-field"), r = document.createElement("div");
5140
5140
  ReactDOM.render(/* @__PURE__ */ jsxRuntimeExports.jsx(IconPickerItem, { value: o }), r), n.appendChild(r), r.hidden = !0;
5141
- let a = r.innerHTML;
5141
+ const a = r.innerHTML;
5142
5142
  setTimeout(() => n.removeChild(r), 100);
5143
5143
  const i = new DOMParser().parseFromString(a, "image/svg+xml"), c = i.querySelector("svg");
5144
5144
  return c && (c.removeAttribute("width"), c.removeAttribute("height")), new XMLSerializer().serializeToString(i);
@@ -5197,12 +5197,12 @@ const ViewData = ({ data: o, fullView: n }) => {
5197
5197
  spellCheck: "false",
5198
5198
  value: o,
5199
5199
  onChange: (l) => n(l.target.value),
5200
- placeholder: r("choose_icon_or_enter_svg"),
5200
+ placeholder: r("Choose Icon or SVG"),
5201
5201
  className: "no-scrollbar disabled:opacity-50; mt-1 flex w-full rounded-md border border-border bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed"
5202
5202
  }
5203
5203
  )
5204
5204
  ] });
5205
- }, UnsplashImages = React__default.lazy(() => import("./UnsplashImages-Ud9lZ6w-.js")), UploadImages = React__default.lazy(() => import("./UploadImages-bHQHGRwC.js")), ImagesPanel = ({
5205
+ }, UnsplashImages = React__default.lazy(() => import("./UnsplashImages-3PCaHZ-A.js")), UploadImages = React__default.lazy(() => import("./UploadImages-Zr4jZDj5.js")), ImagesPanel = ({
5206
5206
  isModalView: o = !1,
5207
5207
  onSelect: n = () => {
5208
5208
  }
@@ -5247,7 +5247,7 @@ const ImagePickerModal$1 = ImagePickerModal, ImagePickerField = ({ value: o, onC
5247
5247
  spellCheck: "false",
5248
5248
  type: "url",
5249
5249
  className: "text-xs",
5250
- placeholder: c("enter_image_url"),
5250
+ placeholder: c("Enter image URL"),
5251
5251
  value: o,
5252
5252
  onBlur: ({ target: { value: u } }) => a(r, u),
5253
5253
  onChange: (u) => n(u.target.value)
@@ -5380,7 +5380,7 @@ const ImagePickerModal$1 = ImagePickerModal, ImagePickerField = ({ value: o, onC
5380
5380
  // save only every 5 seconds
5381
5381
  );
5382
5382
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
5383
- Form,
5383
+ Form$1,
5384
5384
  {
5385
5385
  widgets: {
5386
5386
  binding: BindingWidget,
@@ -5413,7 +5413,7 @@ const ImagePickerModal$1 = ImagePickerModal, ImagePickerField = ({ value: o, onC
5413
5413
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-x-2 border-b border-border bg-background py-2 font-normal text-muted-foreground", children: [
5414
5414
  r._name || r._type,
5415
5415
  " ",
5416
- l("visibility settings")
5416
+ l("Visibility settings")
5417
5417
  ] }),
5418
5418
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center space-x-2 pt-2", children: [
5419
5419
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -5439,9 +5439,10 @@ const ImagePickerModal$1 = ImagePickerModal, ImagePickerField = ({ value: o, onC
5439
5439
  className: "h-8 w-full rounded-md border border-border bg-gray-50 p-0 px-2 text-xs dark:bg-gray-800",
5440
5440
  value: (o == null ? void 0 : o.globalBlock) || "",
5441
5441
  onChange: (i) => {
5442
+ var c;
5442
5443
  l([o._id], {
5443
5444
  globalBlock: i.target.value,
5444
- _name: `Global: ${startCase(i.target.value)}`
5445
+ _name: `Global: ${startCase((c = get(n, i.target.value, "")) == null ? void 0 : c.name)}`
5445
5446
  });
5446
5447
  },
5447
5448
  children: [
@@ -5469,28 +5470,28 @@ const ImagePickerModal$1 = ImagePickerModal, ImagePickerField = ({ value: o, onC
5469
5470
  }), a;
5470
5471
  };
5471
5472
  function BlockSettings() {
5472
- const { selectedLang: o } = useLanguages(), n = useSelectedBlock(), r = useUpdateBlocksPropsRealtime(), a = useUpdateBlocksProps(), l = getBlockComponent(n == null ? void 0 : n._type), i = formDataWithSelectedLang(n, o, l), [c, d] = useState(i), u = useBuilderProp("dataBindingSupport", !1), p = ({ formData: b }, k, v) => {
5473
+ const { selectedLang: o } = useLanguages(), n = useSelectedBlock(), r = useUpdateBlocksPropsRealtime(), a = useUpdateBlocksProps(), l = getBlockComponent(n == null ? void 0 : n._type), i = formDataWithSelectedLang(n, o, l), [c, d] = useState(i), u = useBuilderProp("dataBindingSupport", !1), p = ({ formData: b }, k, S) => {
5473
5474
  if (k && (c == null ? void 0 : c._id) === n._id) {
5474
- const S = k.replace("root.", "");
5475
- a([n._id], { [S]: get(b, S) }, v);
5475
+ const R = k.replace("root.", "");
5476
+ a([n._id], { [R]: get(b, R) }, S);
5476
5477
  }
5477
5478
  }, m = useCallback(
5478
- debounce(({ formData: b }, k, v) => {
5479
- p({ formData: b }, k, v), d(b);
5479
+ debounce(({ formData: b }, k, S) => {
5480
+ p({ formData: b }, k, S), d(b);
5480
5481
  }, 1500),
5481
5482
  [n == null ? void 0 : n._id, o]
5482
5483
  ), g = ({ formData: b }, k) => {
5483
5484
  if (k) {
5484
- const v = k.replace("root.", "");
5485
+ const S = k.replace("root.", "");
5485
5486
  r(
5486
5487
  [n._id],
5487
- convertDotNotationToObject(v, get(b, v.split(".")))
5488
- ), m({ formData: b }, k, { [v]: get(c, v) });
5488
+ convertDotNotationToObject(S, get(b, S.split(".")))
5489
+ ), m({ formData: b }, k, { [S]: get(c, S) });
5489
5490
  }
5490
5491
  }, x = keys(get(i, "_bindings", {})), j = useMemo(() => {
5491
5492
  const b = cloneDeep(get(l, "props", {}));
5492
- return each(b, (k, v) => {
5493
- get(k, "hidden", !1) && delete b[v];
5493
+ return each(b, (k, S) => {
5494
+ get(k, "hidden", !1) && delete b[S];
5494
5495
  }), u && each(x, (k) => delete b[k]), b;
5495
5496
  }, [l, x, u]), E = get(l, "server", !1);
5496
5497
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "overflow-x-hidden px-px", children: [
@@ -5580,14 +5581,14 @@ const askAiProcessingAtom = atom$1(!1), useAskAi = () => {
5580
5581
  if (l) {
5581
5582
  n(!0), a(null);
5582
5583
  try {
5583
- const b = g === "content" ? cloneDeep(getBlockWithChildren(x, d)) : [cloneDeep(d.find((R) => R._id === x))];
5584
+ const b = g === "content" ? cloneDeep(getBlockWithChildren(x, d)) : [cloneDeep(d.find((C) => C._id === x))];
5584
5585
  set(b, "0._parent", null);
5585
- const k = u === p ? "" : u, v = await l(g, promptWithLanguage(j, m, g), b, k), { blocks: S, error: B } = v;
5586
- if (B) {
5587
- a(B);
5586
+ const k = u === p ? "" : u, S = await l(g, promptWithLanguage(j, m, g), b, k), { blocks: R, error: _ } = S;
5587
+ if (_) {
5588
+ a(_);
5588
5589
  return;
5589
5590
  }
5590
- g === "styles" ? c(S) : i(S), E && E(v);
5591
+ g === "styles" ? c(R) : i(R), E && E(S);
5591
5592
  } catch (b) {
5592
5593
  a(b);
5593
5594
  } finally {
@@ -5685,14 +5686,14 @@ const AskAIStyles = ({ blockId: o }) => {
5685
5686
  !l && j && m(j), u.current = setTimeout(() => m(void 0), 1e4), l || c("");
5686
5687
  };
5687
5688
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "", children: [
5688
- /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "mb-1 text-sm font-semibold leading-none tracking-tight", children: n("ask_ai") }),
5689
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "mb-1 text-sm font-semibold leading-none tracking-tight", children: n("Ask AI") }),
5689
5690
  /* @__PURE__ */ jsxRuntimeExports.jsx(
5690
5691
  Textarea,
5691
5692
  {
5692
5693
  ref: d,
5693
5694
  value: i,
5694
5695
  onChange: (x) => c(x.target.value),
5695
- placeholder: n("ask_ai_to_edit_styles"),
5696
+ placeholder: n("Ask AI to edit styles"),
5696
5697
  className: "w-full border border-border focus:border-0",
5697
5698
  rows: 3,
5698
5699
  onKeyDown: (x) => {
@@ -5713,16 +5714,16 @@ const AskAIStyles = ({ blockId: o }) => {
5713
5714
  size: "sm",
5714
5715
  children: a ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
5715
5716
  /* @__PURE__ */ jsxRuntimeExports.jsx(Loader, { className: "h-5 w-5 animate-spin" }),
5716
- n("generating_please_wait")
5717
- ] }) : n("edit_with_ai")
5717
+ n("Generating... Please wait...")
5718
+ ] }) : n("Edit with AI")
5718
5719
  }
5719
5720
  ),
5720
5721
  a ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-2", children: [
5721
5722
  /* @__PURE__ */ jsxRuntimeExports.jsxs(Skeleton, { className: "flex w-full items-center space-x-1 px-4 py-1 pl-2", children: [
5722
5723
  /* @__PURE__ */ jsxRuntimeExports.jsx(FaSpinner, { className: "h-4 w-4 animate-spin text-gray-500" }),
5723
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs", children: n("generating_please_wait") })
5724
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs", children: n("Generating... Please wait...") })
5724
5725
  ] }),
5725
- /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { variant: "destructive", onClick: () => stop(), className: "hidden w-fit", size: "sm", children: n("stop") })
5726
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { variant: "destructive", onClick: () => stop(), className: "hidden w-fit", size: "sm", children: n("Stop") })
5726
5727
  ] }) : null
5727
5728
  ] }),
5728
5729
  p ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "max-w-full", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "mb-1 flex justify-between break-words rounded border border-blue-500 bg-blue-100 p-1 text-xs text-blue-500", children: [
@@ -5742,48 +5743,48 @@ const AskAIStyles = ({ blockId: o }) => {
5742
5743
  keys: ["name"]
5743
5744
  });
5744
5745
  function ManualClasses() {
5745
- var A;
5746
- const { t: o } = useTranslation(), [n] = useSelectedStylingBlocks(), r = useSelectedBlock(), a = useAddClassesToBlocks(), l = useRemoveClassesFromBlocks(), [i] = useSelectedBlockIds(), c = useBuilderProp("askAiCallBack", null), [d, u] = useState(""), { toast: p } = useToast(), m = (A = first(n)) == null ? void 0 : A.prop, g = reject((get(r, m, "").replace(STYLES_KEY, "").split(",").pop() || "").split(" "), isEmpty), x = () => {
5747
- const T = d.trim().toLowerCase().replace(/ +(?= )/g, "").split(" ");
5748
- a(i, T, !0), u("");
5749
- }, [j, E] = useState([]), b = ({ value: T }) => {
5750
- const L = T.trim().toLowerCase(), P = L.match(/.+:/g);
5746
+ var B;
5747
+ const { t: o } = useTranslation(), [n] = useSelectedStylingBlocks(), r = useSelectedBlock(), a = useAddClassesToBlocks(), l = useRemoveClassesFromBlocks(), [i] = useSelectedBlockIds(), c = useBuilderProp("askAiCallBack", null), [d, u] = useState(""), { toast: p } = useToast(), m = (B = first(n)) == null ? void 0 : B.prop, g = reject((get(r, m, "").replace(STYLES_KEY, "").split(",").pop() || "").split(" "), isEmpty), x = () => {
5748
+ const N = d.trim().toLowerCase().replace(/ +(?= )/g, "").split(" ");
5749
+ a(i, N, !0), u("");
5750
+ }, [j, E] = useState([]), b = ({ value: N }) => {
5751
+ const L = N.trim().toLowerCase(), P = L.match(/.+:/g);
5751
5752
  let f = [];
5752
5753
  if (P && P.length > 0) {
5753
- const [_] = P, C = L.replace(_, "");
5754
- f = fuse.search(C).map((I) => ({
5754
+ const [v] = P, w = L.replace(v, "");
5755
+ f = fuse.search(w).map((I) => ({
5755
5756
  ...I,
5756
- item: { ...I.item, name: _ + I.item.name }
5757
+ item: { ...I.item, name: v + I.item.name }
5757
5758
  }));
5758
5759
  } else
5759
5760
  f = fuse.search(L);
5760
5761
  return E(map(f, "item"));
5761
5762
  }, k = () => {
5762
5763
  E([]);
5763
- }, v = (T) => T.name, S = (T) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "rounded-md p-1", children: T.name }), B = {
5764
+ }, S = (N) => N.name, R = (N) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "rounded-md p-1", children: N.name }), _ = {
5764
5765
  autoComplete: "off",
5765
5766
  autoCorrect: "off",
5766
5767
  autoCapitalize: "off",
5767
5768
  spellCheck: !1,
5768
- placeholder: o("enter_classes_separated_by_space"),
5769
+ placeholder: o("Enter classes separated by space"),
5769
5770
  value: d,
5770
- onKeyDown: (T) => {
5771
- T.key === "Enter" && d.trim() !== "" && x();
5771
+ onKeyDown: (N) => {
5772
+ N.key === "Enter" && d.trim() !== "" && x();
5772
5773
  },
5773
- onChange: (T, { newValue: L }) => u(L),
5774
+ onChange: (N, { newValue: L }) => u(L),
5774
5775
  className: "w-full rounded-md text-xs px-2 hover:outline-0 bg-background border-border py-1"
5775
- }, R = () => {
5776
+ }, C = () => {
5776
5777
  if (navigator.clipboard === void 0) {
5777
5778
  p({
5778
- title: o("clipboard_not_supported"),
5779
- description: o("please_use_chrome_firefox_or_safari"),
5779
+ title: o("Clipboard not supported"),
5780
+ description: o("Please use Chrome, Firefox or Safari"),
5780
5781
  variant: "destructive"
5781
5782
  });
5782
5783
  return;
5783
5784
  }
5784
5785
  navigator.clipboard.writeText(g.join(" ")), p({
5785
- title: o("copied"),
5786
- description: o("classes_copied_to_clipboard")
5786
+ title: o("Copied"),
5787
+ description: o("Classes copied to clipboard")
5787
5788
  });
5788
5789
  };
5789
5790
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
@@ -5795,8 +5796,8 @@ function ManualClasses() {
5795
5796
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-x-2 text-muted-foreground", children: [
5796
5797
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: o("classes") }),
5797
5798
  /* @__PURE__ */ jsxRuntimeExports.jsxs(Tooltip, { children: [
5798
- /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipTrigger, { asChild: !0, children: /* @__PURE__ */ jsxRuntimeExports.jsx(CopyIcon, { onClick: R, className: "cursor-pointer" }) }),
5799
- /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipContent, { children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { children: o("copy_classes_to_clipboard") }) })
5799
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipTrigger, { asChild: !0, children: /* @__PURE__ */ jsxRuntimeExports.jsx(CopyIcon, { onClick: C, className: "cursor-pointer" }) }),
5800
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipContent, { children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { children: o("Copy classes to clipboard") }) })
5800
5801
  ] })
5801
5802
  ] }),
5802
5803
  c ? /* @__PURE__ */ jsxRuntimeExports.jsxs(Popover, { children: [
@@ -5814,9 +5815,9 @@ function ManualClasses() {
5814
5815
  suggestions: j,
5815
5816
  onSuggestionsFetchRequested: b,
5816
5817
  onSuggestionsClearRequested: k,
5817
- getSuggestionValue: v,
5818
- renderSuggestion: S,
5819
- inputProps: B,
5818
+ getSuggestionValue: S,
5819
+ renderSuggestion: R,
5820
+ inputProps: _,
5820
5821
  containerProps: {
5821
5822
  className: "relative h-8 w-full gap-y-1 py-1 border-border"
5822
5823
  },
@@ -5840,22 +5841,22 @@ function ManualClasses() {
5840
5841
  )
5841
5842
  ] }),
5842
5843
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex w-full flex-wrap gap-2 overflow-x-hidden", children: React.Children.toArray(
5843
- g.map((T) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
5844
+ g.map((N) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
5844
5845
  "div",
5845
5846
  {
5846
5847
  className: "group relative flex max-w-[260px] cursor-default items-center gap-x-1 truncate rounded border border-border bg-gray-200 p-px px-1.5 text-[11px] text-gray-600 hover:border-gray-300 dark:border-gray-700 dark:bg-gray-800 dark:text-gray-300",
5847
5848
  children: [
5848
- T,
5849
+ N,
5849
5850
  /* @__PURE__ */ jsxRuntimeExports.jsx(
5850
5851
  Cross2Icon,
5851
5852
  {
5852
- onClick: () => l(i, [T]),
5853
+ onClick: () => l(i, [N]),
5853
5854
  className: "invisible absolute right-1 rounded-full bg-red-400 hover:text-white group-hover:visible group-hover:cursor-pointer"
5854
5855
  }
5855
5856
  )
5856
5857
  ]
5857
5858
  },
5858
- T
5859
+ N
5859
5860
  ))
5860
5861
  ) })
5861
5862
  ]
@@ -6505,50 +6506,50 @@ const RangeChoices = ({ property: o, onChange: n }) => {
6505
6506
  },
6506
6507
  a
6507
6508
  )) }), THROTTLE_TIME = 50, AdvanceChoices = (o) => {
6508
- const [n, r] = useState(!1), [a, l] = useState(""), { currentClass: i, onChange: c, classPrefix: d, cssProperty: u, units: p, negative: m } = o, [g, x] = useState(u != null && u.toLowerCase().includes("width") ? "%" : p[0]), [j, E] = useState(!1), [b, k] = useState(""), [v, S] = useState(!1), [B, R] = useState(!1);
6509
+ const [n, r] = useState(!1), [a, l] = useState(""), { currentClass: i, onChange: c, classPrefix: d, cssProperty: u, units: p, negative: m } = o, [g, x] = useState(u != null && u.toLowerCase().includes("width") ? "%" : p[0]), [j, E] = useState(!1), [b, k] = useState(""), [S, R] = useState(!1), [_, C] = useState(!1);
6509
6510
  useEffect(() => {
6510
- const { value: f, unit: _ } = getClassValueAndUnit(i);
6511
- if (_ === "") {
6511
+ const { value: f, unit: v } = getClassValueAndUnit(i);
6512
+ if (v === "") {
6512
6513
  l(f), x(u != null && u.toLowerCase().includes("width") ? "%" : first(p));
6513
6514
  return;
6514
6515
  }
6515
- x(_), l(_ === "class" || isEmpty(f) ? "" : f);
6516
+ x(v), l(v === "class" || isEmpty(f) ? "" : f);
6516
6517
  }, [i, u, p]);
6517
- const A = useThrottledCallback((f) => c(f), [c], THROTTLE_TIME), T = useThrottledCallback((f) => c(f, !1), [c], THROTTLE_TIME), L = useCallback(
6518
+ const B = useThrottledCallback((f) => c(f), [c], THROTTLE_TIME), N = useThrottledCallback((f) => c(f, !1), [c], THROTTLE_TIME), L = useCallback(
6518
6519
  (f = !1) => {
6519
- const _ = getUserInputValues(`${a}`, p);
6520
- if (get(_, "error", !1)) {
6520
+ const v = getUserInputValues(`${a}`, p);
6521
+ if (get(v, "error", !1)) {
6521
6522
  E(!0);
6522
6523
  return;
6523
6524
  }
6524
- const C = get(_, "unit") !== "" ? get(_, "unit") : g;
6525
- if (C === "auto" || C === "none") {
6526
- A(`${d}${C}`);
6525
+ const w = get(v, "unit") !== "" ? get(v, "unit") : g;
6526
+ if (w === "auto" || w === "none") {
6527
+ B(`${d}${w}`);
6527
6528
  return;
6528
6529
  }
6529
- if (get(_, "value") === "")
6530
+ if (get(v, "value") === "")
6530
6531
  return;
6531
- const I = `${get(_, "value", "").startsWith("-") ? "-" : ""}${d}[${get(_, "value", "").replace("-", "")}${C === "-" ? "" : C}]`;
6532
- f ? T(I) : A(I);
6532
+ const I = `${get(v, "value", "").startsWith("-") ? "-" : ""}${d}[${get(v, "value", "").replace("-", "")}${w === "-" ? "" : w}]`;
6533
+ f ? N(I) : B(I);
6533
6534
  },
6534
- [A, T, a, g, d, p]
6535
+ [B, N, a, g, d, p]
6535
6536
  ), P = useCallback(
6536
6537
  (f) => {
6537
- const _ = getUserInputValues(`${a}`, p);
6538
- if (get(_, "error", !1)) {
6538
+ const v = getUserInputValues(`${a}`, p);
6539
+ if (get(v, "error", !1)) {
6539
6540
  E(!0);
6540
6541
  return;
6541
6542
  }
6542
6543
  if (f === "auto" || f === "none") {
6543
- A(`${d}${f}`);
6544
+ B(`${d}${f}`);
6544
6545
  return;
6545
6546
  }
6546
- if (get(_, "value") === "")
6547
+ if (get(v, "value") === "")
6547
6548
  return;
6548
- const C = get(_, "unit") !== "" ? get(_, "unit") : f, I = `${get(_, "value", "").startsWith("-") ? "-" : ""}${d}[${get(_, "value", "").replace("-", "")}${C === "-" ? "" : C}]`;
6549
- A(I);
6549
+ const w = get(v, "unit") !== "" ? get(v, "unit") : f, I = `${get(v, "value", "").startsWith("-") ? "-" : ""}${d}[${get(v, "value", "").replace("-", "")}${w === "-" ? "" : w}]`;
6550
+ B(I);
6550
6551
  },
6551
- [A, a, d, p]
6552
+ [B, a, d, p]
6552
6553
  );
6553
6554
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center justify-start", children: g === "class" ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
6554
6555
  /* @__PURE__ */ jsxRuntimeExports.jsx("input", { className: "w-20 rounded py-1", readOnly: !0, value: i }),
@@ -6556,7 +6557,7 @@ const RangeChoices = ({ property: o, onChange: n }) => {
6556
6557
  /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipTrigger, { asChild: !0, children: /* @__PURE__ */ jsxRuntimeExports.jsx("button", { type: "button", className: "invisible ml-3 mt-1 text-blue-600 group-hover:visible", children: /* @__PURE__ */ jsxRuntimeExports.jsx(InfoCircledIcon, {}) }) }),
6557
6558
  /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipContent, { children: "Current value is using a Tailwind preset class." })
6558
6559
  ] })
6559
- ] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `group relative flex items-center ${v ? "z-auto" : ""}`, children: [
6560
+ ] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `group relative flex items-center ${S ? "z-auto" : ""}`, children: [
6560
6561
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center rounded-md border border-border", children: [
6561
6562
  ["none", "auto"].indexOf(g) !== -1 ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(
6562
6563
  "input",
@@ -6568,25 +6569,25 @@ const RangeChoices = ({ property: o, onChange: n }) => {
6568
6569
  onKeyDown: (f) => {
6569
6570
  if (f.keyCode !== 38 && f.keyCode !== 40)
6570
6571
  return;
6571
- f.preventDefault(), R(!0);
6572
- const _ = parseInt$1(f.target.value);
6573
- let C = isNaN$1(_) ? 0 : _;
6574
- f.keyCode === 38 && (C += 1), f.keyCode === 40 && (C -= 1);
6575
- const w = `${C}`, N = `${w.startsWith("-") ? "-" : ""}${d}[${w.replace("-", "")}${g === "-" ? "" : g}]`;
6576
- T(N);
6572
+ f.preventDefault(), C(!0);
6573
+ const v = parseInt$1(f.target.value);
6574
+ let w = isNaN$1(v) ? 0 : v;
6575
+ f.keyCode === 38 && (w += 1), f.keyCode === 40 && (w -= 1);
6576
+ const A = `${w}`, T = `${A.startsWith("-") ? "-" : ""}${d}[${A.replace("-", "")}${g === "-" ? "" : g}]`;
6577
+ N(T);
6577
6578
  },
6578
6579
  onKeyUp: (f) => {
6579
- B && (f.preventDefault(), R(!1));
6580
+ _ && (f.preventDefault(), C(!1));
6580
6581
  },
6581
6582
  onBlur: () => L(),
6582
6583
  onChange: (f) => {
6583
6584
  E(!1), l(f.target.value);
6584
6585
  },
6585
6586
  onClick: (f) => {
6586
- var _;
6587
- (_ = f == null ? void 0 : f.target) == null || _.select(), r(!1);
6587
+ var v;
6588
+ (v = f == null ? void 0 : f.target) == null || v.select(), r(!1);
6588
6589
  },
6589
- value: v ? b : a,
6590
+ value: S ? b : a,
6590
6591
  className: "h-6 w-14 rounded rounded-r-none border border-transparent bg-background pl-2 text-sm focus-visible:outline-0".concat(
6591
6592
  " ",
6592
6593
  j ? "border-red-500 text-red-500" : "border-foreground/20"
@@ -6618,22 +6619,22 @@ const RangeChoices = ({ property: o, onChange: n }) => {
6618
6619
  ) }) })
6619
6620
  ] })
6620
6621
  ] }),
6621
- ["none", "auto"].indexOf(g) !== -1 || v ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(
6622
+ ["none", "auto"].indexOf(g) !== -1 || S ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(
6622
6623
  DragStyleButton,
6623
6624
  {
6624
- onDragStart: () => S(!0),
6625
+ onDragStart: () => R(!0),
6625
6626
  onDragEnd: (f) => {
6626
- if (k(() => ""), S(!1), isEmpty(f))
6627
+ if (k(() => ""), R(!1), isEmpty(f))
6627
6628
  return;
6628
- const _ = `${f}`, w = `${_.startsWith("-") ? "-" : ""}${d}[${_.replace("-", "")}${g === "-" ? "" : g}]`;
6629
- A(w);
6629
+ const v = `${f}`, A = `${v.startsWith("-") ? "-" : ""}${d}[${v.replace("-", "")}${g === "-" ? "" : g}]`;
6630
+ B(A);
6630
6631
  },
6631
6632
  onDrag: (f) => {
6632
6633
  if (isEmpty(f))
6633
6634
  return;
6634
6635
  k(f);
6635
- const _ = `${f}`, w = `${_.startsWith("-") ? "-" : ""}${d}[${_.replace("-", "")}${g === "-" ? "" : g}]`;
6636
- T(w);
6636
+ const v = `${f}`, A = `${v.startsWith("-") ? "-" : ""}${d}[${v.replace("-", "")}${g === "-" ? "" : g}]`;
6637
+ N(A);
6637
6638
  },
6638
6639
  currentValue: a,
6639
6640
  unit: g,
@@ -6731,34 +6732,34 @@ const RangeChoices = ({ property: o, onChange: n }) => {
6731
6732
  }, getBreakpoint = (o) => `${o.toUpperCase()} ${BREAKPOINTS[o] ? `(${BREAKPOINTS[o]} & up)` : ""}`, BlockStyle = (o) => {
6732
6733
  const { t: n } = useTranslation(), { type: r = "icons", label: a, property: l, onEmitChange: i = () => {
6733
6734
  }, units: c, negative: d = !1 } = o, [u] = useDarkMode(), [p] = useStylingState(), [, m] = useCanvasWidth(), g = useCurrentClassByProperty(l), x = useAddClassesToBlocks(), j = useRemoveClassesFromBlocks(), [E] = useSelectedBlockIds(), b = useMemo(() => get(g, "fullCls", ""), [g]), k = useCallback(
6734
- (T, L = !0) => {
6735
- const P = { dark: u, mq: m, mod: p, cls: T, property: l, fullCls: "" };
6735
+ (N, L = !0) => {
6736
+ const P = { dark: u, mq: m, mod: p, cls: N, property: l, fullCls: "" };
6736
6737
  (u || p !== "") && (P.mq = "xs");
6737
6738
  const f = generateFullClsName(P);
6738
6739
  x(E, [f], L);
6739
6740
  },
6740
6741
  [E, u, m, p, l, x]
6741
- ), v = useCallback(() => {
6742
+ ), S = useCallback(() => {
6742
6743
  j(E, [b]);
6743
- }, [E, b, j]), S = useMemo(() => canChangeClass(g, m), [g, m]);
6744
+ }, [E, b, j]), R = useMemo(() => canChangeClass(g, m), [g, m]);
6744
6745
  useEffect(() => {
6745
- i(S, g);
6746
- }, [S, i, g]);
6747
- const [, , B] = useCanvasWidth(), R = useCallback(
6748
- (T) => {
6749
- B({
6746
+ i(R, g);
6747
+ }, [R, i, g]);
6748
+ const [, , _] = useCanvasWidth(), C = useCallback(
6749
+ (N) => {
6750
+ _({
6750
6751
  xs: 400,
6751
6752
  sm: 640,
6752
6753
  md: 800,
6753
6754
  lg: 1024,
6754
6755
  xl: 1420,
6755
6756
  "2xl": 1920
6756
- }[T]);
6757
+ }[N]);
6757
6758
  },
6758
- [B]
6759
- ), A = get(g, "dark", null) === u && get(g, "mod", null) === p && get(g, "mq", null) === m;
6760
- return /* @__PURE__ */ jsxRuntimeExports.jsx(BlockStyleProvider, { canChange: S, canReset: g && A, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "group flex flex-row items-center py-2 first:pt-0 last:pb-0", children: [
6761
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "relative w-[70px] truncate text-xs text-foreground", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `text-[11px] ${g && !A ? "text-foreground" : ""}`, children: n(a) }) }),
6759
+ [_]
6760
+ ), B = get(g, "dark", null) === u && get(g, "mod", null) === p && get(g, "mq", null) === m;
6761
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(BlockStyleProvider, { canChange: R, canReset: g && B, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "group flex flex-row items-center py-2 first:pt-0 last:pb-0", children: [
6762
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "relative w-[70px] truncate text-xs text-foreground", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `text-[11px] ${g && !B ? "text-foreground" : ""}`, children: n(a) }) }),
6762
6763
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-row items-center", children: [
6763
6764
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "w-[150px]", children: [
6764
6765
  r === "arbitrary" ? /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -6777,7 +6778,7 @@ const RangeChoices = ({ property: o, onChange: n }) => {
6777
6778
  r === "color" && /* @__PURE__ */ jsxRuntimeExports.jsx(ColorChoice, { property: l, onChange: k }),
6778
6779
  r === "dropdown" && /* @__PURE__ */ jsxRuntimeExports.jsx(DropDownChoices, { label: a, property: l, onChange: k })
6779
6780
  ] }),
6780
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `w-[30px] cursor-pointer ${b ? "visible" : "invisible"}`, children: A ? /* @__PURE__ */ jsxRuntimeExports.jsx("button", { type: "button", onClick: () => v(), title: "Reset", className: "flex px-1.5 text-xs", children: /* @__PURE__ */ jsxRuntimeExports.jsx(CrossCircledIcon, { className: "h-5 w-5 text-blue-500 hover:opacity-80" }) }) : S && g ? /* @__PURE__ */ jsxRuntimeExports.jsxs(Tooltip, { delayDuration: 100, children: [
6781
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `w-[30px] cursor-pointer ${b ? "visible" : "invisible"}`, children: B ? /* @__PURE__ */ jsxRuntimeExports.jsx("button", { type: "button", onClick: () => S(), title: "Reset", className: "flex px-1.5 text-xs", children: /* @__PURE__ */ jsxRuntimeExports.jsx(CrossCircledIcon, { className: "h-5 w-5 text-blue-500 hover:opacity-80" }) }) : R && g ? /* @__PURE__ */ jsxRuntimeExports.jsxs(Tooltip, { delayDuration: 100, children: [
6781
6782
  /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipTrigger, { asChild: !0, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
6782
6783
  "button",
6783
6784
  {
@@ -6797,7 +6798,7 @@ const RangeChoices = ({ property: o, onChange: n }) => {
6797
6798
  "button",
6798
6799
  {
6799
6800
  type: "button",
6800
- onClick: () => R(get(g, "mq")),
6801
+ onClick: () => C(get(g, "mq")),
6801
6802
  className: "block w-full cursor-default text-right font-semibold text-blue-500",
6802
6803
  children: [
6803
6804
  "Switch to ",
@@ -6870,7 +6871,7 @@ const RangeChoices = ({ property: o, onChange: n }) => {
6870
6871
  }, [a, n]);
6871
6872
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("details", { children: [
6872
6873
  /* @__PURE__ */ jsxRuntimeExports.jsx("summary", { className: "my-px cursor-default rounded-md bg-gray-50 p-px px-2 text-[11px] text-foreground dark:bg-gray-800", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "inline", children: [
6873
- r(o.toLowerCase()),
6874
+ startCase(r(o.toLowerCase())),
6874
6875
  l ? /* @__PURE__ */ jsxRuntimeExports.jsx(
6875
6876
  "span",
6876
6877
  {
@@ -6897,7 +6898,7 @@ const RangeChoices = ({ property: o, onChange: n }) => {
6897
6898
  [r]
6898
6899
  ), l = useMemo(() => ({}), []);
6899
6900
  return /* @__PURE__ */ jsxRuntimeExports.jsx(SectionContext.Provider, { value: l, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(AccordionItem, { value: o.heading, className: "border-none", children: [
6900
- /* @__PURE__ */ jsxRuntimeExports.jsx(AccordionTrigger, { className: "border-b border-border py-2 text-xs", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center gap-x-2 text-sm font-bold", children: n(o.heading) }) }) }),
6901
+ /* @__PURE__ */ jsxRuntimeExports.jsx(AccordionTrigger, { className: "border-b border-border py-2 text-xs", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center gap-x-2 text-sm font-bold", children: startCase(n(o.heading)) }) }) }),
6901
6902
  /* @__PURE__ */ jsxRuntimeExports.jsx(AccordionContent, { className: "py-2", children: React__default.Children.toArray(
6902
6903
  o.items.map((i) => has(i, "component") ? React__default.createElement(i.component, { key: i.label }) : has(i, "styleType") ? i.styleType === "multiple" ? /* @__PURE__ */ jsxRuntimeExports.jsx(MultipleChoices, { ...i }, i.label) : i.styleType === "accordion" && a(i == null ? void 0 : i.conditions) ? /* @__PURE__ */ jsxRuntimeExports.jsx(NestedOptions, { ...i }, i.label) : null : /* @__PURE__ */ jsxRuntimeExports.jsx(BlockStyle, { ...i }, i.label))
6903
6904
  ) })
@@ -7034,7 +7035,7 @@ function UILibrariesSelect({
7034
7035
  }) {
7035
7036
  const { t: a } = useTranslation();
7036
7037
  return n ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "h-12", children: [
7037
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs font-bold text-gray-500", children: a("choose_library") }),
7038
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs font-bold text-gray-500", children: a("Choose library") }),
7038
7039
  /* @__PURE__ */ jsxRuntimeExports.jsx(
7039
7040
  ChaiSelect$1,
7040
7041
  {
@@ -7055,8 +7056,8 @@ const BlockCard = ({
7055
7056
  parentId: r = void 0
7056
7057
  }) => {
7057
7058
  const [a, l] = useState(!1), i = useBuilderProp("getUILibraryBlock", noop), { addCoreBlock: c, addPredefinedBlock: d } = useAddBlock(), [, u] = useSelectedBlockIds(), { clearHighlight: p } = useBlockHighlight(), m = get(o, "name", get(o, "label")), g = useFeature("dnd"), [, x] = useAtom$1(draggedBlockAtom), j = (k) => {
7058
- const v = has(k, "styles_attrs.data-page-section");
7059
- return k._type === "Box" && v;
7059
+ const S = has(k, "styles_attrs.data-page-section");
7060
+ return k._type === "Box" && S;
7060
7061
  }, E = useCallback(
7061
7062
  async (k) => {
7062
7063
  if (k.stopPropagation(), has(o, "component")) {
@@ -7064,23 +7065,23 @@ const BlockCard = ({
7064
7065
  return;
7065
7066
  }
7066
7067
  l(!0);
7067
- const v = await i(n, o);
7068
- isEmpty(v) || d(syncBlocksWithDefaults(v), r), emitChaiBuilderMsg({ name: CHAI_BUILDER_EVENTS.CLOSE_ADD_BLOCK });
7068
+ const S = await i(n, o);
7069
+ isEmpty(S) || d(syncBlocksWithDefaults(S), r), emitChaiBuilderMsg({ name: CHAI_BUILDER_EVENTS.CLOSE_ADD_BLOCK });
7069
7070
  },
7070
7071
  [o]
7071
7072
  ), b = async (k) => {
7072
- const v = await i(n, o);
7073
- let S = r;
7074
- if (j(first(v)) && (S = null), !isEmpty(v)) {
7075
- const B = { blocks: v, uiLibrary: !0, parent: S };
7076
- if (k.dataTransfer.setData("text/plain", JSON.stringify(B)), o.preview) {
7077
- const R = new Image();
7078
- R.src = o.preview, R.onload = () => {
7079
- k.dataTransfer.setDragImage(R, 0, 0);
7073
+ const S = await i(n, o);
7074
+ let R = r;
7075
+ if (j(first(S)) && (R = null), !isEmpty(S)) {
7076
+ const _ = { blocks: S, uiLibrary: !0, parent: R };
7077
+ if (k.dataTransfer.setData("text/plain", JSON.stringify(_)), o.preview) {
7078
+ const C = new Image();
7079
+ C.src = o.preview, C.onload = () => {
7080
+ k.dataTransfer.setDragImage(C, 0, 0);
7080
7081
  };
7081
7082
  } else
7082
7083
  k.dataTransfer.setDragImage(new Image(), 0, 0);
7083
- x(B), setTimeout(() => {
7084
+ x(_), setTimeout(() => {
7084
7085
  u([]), p(), emitChaiBuilderMsg({ name: CHAI_BUILDER_EVENTS.CLOSE_ADD_BLOCK });
7085
7086
  }, 200);
7086
7087
  }
@@ -7121,9 +7122,9 @@ const BlockCard = ({
7121
7122
  })();
7122
7123
  }, [o, l, i, c]), { data: l || [], isLoading: i === "loading" };
7123
7124
  }, UILibrarySection = ({ parentId: o }) => {
7124
- const [n, r] = useAtom$1(selectedLibraryAtom), a = useBuilderProp("uiLibraries", []), l = useChaiBlocks(), i = values(l).filter((S) => S.category === "custom"), c = a.find((S) => S.uuid === n) || first(a), { data: d, isLoading: u } = useLibraryBlocks(c), p = groupBy([...d, ...i], "group"), [m, g] = useState("Hero"), x = get(p, m, []), j = useRef(null), { t: E } = useTranslation(), b = (S) => {
7125
+ const [n, r] = useAtom$1(selectedLibraryAtom), a = useBuilderProp("uiLibraries", []), l = useChaiBlocks(), i = values(l).filter((R) => R.category === "custom"), c = a.find((R) => R.uuid === n) || first(a), { data: d, isLoading: u } = useLibraryBlocks(c), p = groupBy([...d, ...i], "group"), [m, g] = useState("Hero"), x = get(p, m, []), j = useRef(null), { t: E } = useTranslation(), b = (R) => {
7125
7126
  j.current && (clearTimeout(j.current), j.current = null), j.current = setTimeout(() => {
7126
- j.current && g(S);
7127
+ j.current && g(R);
7127
7128
  }, 300);
7128
7129
  };
7129
7130
  if (u)
@@ -7131,30 +7132,30 @@ const BlockCard = ({
7131
7132
  /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { className: "col-span-3 h-full" }),
7132
7133
  /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { className: "col-span-9 h-full" })
7133
7134
  ] });
7134
- const k = filter(x, (S, B) => B % 2 === 0), v = filter(x, (S, B) => B % 2 === 1);
7135
+ const k = filter(x, (R, _) => _ % 2 === 0), S = filter(x, (R, _) => _ % 2 === 1);
7135
7136
  return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "relative mt-2 flex h-full max-h-full overflow-hidden bg-background", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex h-full pt-2", children: [
7136
7137
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex h-full max-h-full w-60 flex-col gap-1 px-1 pr-2", children: [
7137
7138
  /* @__PURE__ */ jsxRuntimeExports.jsx(UILibrariesSelect, { library: c == null ? void 0 : c.uuid, setLibrary: r, uiLibraries: a }),
7138
7139
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-2 flex h-full max-h-full w-full flex-1 flex-col", children: [
7139
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs font-bold text-gray-500", children: E("groups") }),
7140
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs font-bold text-gray-500", children: E("Groups") }),
7140
7141
  /* @__PURE__ */ jsxRuntimeExports.jsx("hr", { className: "mt-1 border-border" }),
7141
7142
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "no-scrollbar mt-2 h-full max-h-full flex-1 overflow-y-auto pb-20", children: React__default.Children.toArray(
7142
- map(p, (S, B) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
7143
+ map(p, (R, _) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
7143
7144
  "div",
7144
7145
  {
7145
- onMouseEnter: () => b(B),
7146
+ onMouseEnter: () => b(_),
7146
7147
  onMouseLeave: () => clearTimeout(j.current),
7147
- onClick: () => g(B),
7148
+ onClick: () => g(_),
7148
7149
  className: cn(
7149
7150
  "flex w-full cursor-pointer items-center justify-between rounded-md p-2 text-sm text-foreground transition-all ease-in-out hover:bg-gray-200 dark:hover:bg-gray-800",
7150
- B === m ? "bg-blue-500 text-white hover:bg-blue-600" : ""
7151
+ _ === m ? "bg-blue-500 text-white hover:bg-blue-600" : ""
7151
7152
  ),
7152
7153
  children: [
7153
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: capitalize(E(B.toLowerCase())) }),
7154
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: capitalize(E(_.toLowerCase())) }),
7154
7155
  /* @__PURE__ */ jsxRuntimeExports.jsx(CaretRightIcon, { className: "ml-2 h-5 w-5" })
7155
7156
  ]
7156
7157
  },
7157
- B
7158
+ _
7158
7159
  ))
7159
7160
  ) })
7160
7161
  ] })
@@ -7167,10 +7168,10 @@ const BlockCard = ({
7167
7168
  children: [
7168
7169
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid grid-cols-2 gap-2 px-2", children: [
7169
7170
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-col gap-1", children: React__default.Children.toArray(
7170
- k.map((S) => /* @__PURE__ */ jsxRuntimeExports.jsx(BlockCard, { parentId: o, block: S, library: c }))
7171
+ k.map((R) => /* @__PURE__ */ jsxRuntimeExports.jsx(BlockCard, { parentId: o, block: R, library: c }))
7171
7172
  ) }),
7172
7173
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-col gap-1", children: React__default.Children.toArray(
7173
- v.map((S) => /* @__PURE__ */ jsxRuntimeExports.jsx(BlockCard, { parentId: o, block: S, library: c }))
7174
+ S.map((R) => /* @__PURE__ */ jsxRuntimeExports.jsx(BlockCard, { parentId: o, block: R, library: c }))
7174
7175
  ) })
7175
7176
  ] }),
7176
7177
  /* @__PURE__ */ jsxRuntimeExports.jsx("br", {}),
@@ -7180,7 +7181,7 @@ const BlockCard = ({
7180
7181
  }
7181
7182
  )
7182
7183
  ] }) }) });
7183
- }, UILibrariesPanel = ({ parentId: o }) => /* @__PURE__ */ jsxRuntimeExports.jsx(UILibrarySection, { parentId: o }), UILibraries = UILibrariesPanel, add_block = "Add block", enter_paste_tailwind_html = "(Enter or paste TailwindCSS HTML snippet)", click_to_add_block = "(Click to add block to page)", core = "Core", custom_blocks = "Custom Blocks", ui_library = "UI Library", html_snippet_description = "Use HTML snippets from Tailwind CSS component libraries etc. or just copy paste your own HTML code.", tailwind_html_snippet = "Tailwind HTML snippet:", enter_code_snippet = "Enter your code snippet here...", import_html = "Import HTML", note_imported_html = "NOTE: Imported html will be added to the currently selected block. If no block is selected, the html will be added to the page.", dark_mode = "Dark mode", tree_view_no_blocks = "This page has no blocks. Add a block by clicking the + button", canvas_empty = "This page is empty", no_block_selected_for_styling = "Please select a block to edit settings or styles", no_block_selected_for_ask_ai = "Please select a block to ask AI", no_styling_block_selected = "Please select a styling block", drop_here_message = "Drop your block here", use_setting = "Use setting", mobile_xs_title = "Mobile (XS)", mobile_xs_content = "Styles set here are applied to all screen unless edited at higher breakpoint", mobile_sm_title = "Mobile landscape (SM)", mobile_sm_content = "Styles set here are applied at 640px and up unless edited at higher breakpoint", tablet_md_title = "Tablet (MD)", tablet_md_content = "Styles set here are applied at 768px and up", tablet_lg_title = "Tablet Landscape (LG)", tablet_lg_content = "Styles set here are applied at 1024px and up unless edited at higher breakpoint", desktop_xl_title = "Desktop (XL)", desktop_xl_content = "Styles set here are applied at 1280px and up unless edited at higher breakpoint", large_desktop_2xl_title = "Large Desktop (2XL)", large_desktop_2xl_content = "Styles set here are applied at 1536px and up", Breakpoints$1 = "Breakpoints", clear = "Clear", clear_canvas_title = "Clear whole canvas?", clear_canvas_description = "Are you sure you want to clear the whole canvas?", cancel = "Cancel", yes = "Yes", preview = "Preview", settings = "Settings", styling = "Styling", data_provider = "Data Provider", remove_provider_confirmation = "Are you sure you want to remove <span class='text-blue-500'>{name}</span> provider?", remove_provider_warning = "Your data provider will be removed from this page and all added data binding will be not visible on blocks.", remove = "Remove", no_data_providers = "You have no data providers registered. Please add a data provider to your project.", learn_more = "Learn more", add_data_providers = "Add data providers:", select_provider = "Select a provider", choose = "Choose", page_data_providers = "Page data providers:", view_data = "View Data", mark_as_global = "Mark as Global", global_block_note = "Note: Global blocks are single instances. Editing global blocks will be reflected on all pages using these blocks.", global_block_indicator = "Global blocks are indicated with", global_block_category = "Global blocks are available under 'Global' category", enter_global_block_name = "Enter global block name", eg_header_footer = "Eg: Header, Footer", blocks_selected = "{{length}} blocks selected.", cut = "Cut", copy = "Copy", clear_selection = "Clear Selection", dev_mode_message = "This is dev mode. Visit", to_see_page_preview = "to see page preview", theme_config = {
7184
+ }, UILibrariesPanel = ({ parentId: o }) => /* @__PURE__ */ jsxRuntimeExports.jsx(UILibrarySection, { parentId: o }), UILibraries = UILibrariesPanel, Core = "Core", Import = "Import", Breakpoints$1 = "Breakpoints", Clear = "Clear", Cancel = "Cancel", Yes = "Yes", Preview = "Preview", Settings = "Settings", Styling = "Styling", Remove = "Remove", Choose = "Choose", Cut = "Cut", Copy = "Copy", Paste = "Paste", Delete = "Delete", classes = "classes", Theme = "Theme", Outline = "Outline", Copied = "Copied", Stop = "Stop", Edit = "Edit", Tag = "Tag", Value = "Value", Images = "Images", Library = "Library", Blocks = "Blocks", Basic = "Basic", Media = "Media", Advanced = "Advanced", Form = "Form", Groups = "Groups", Accordions = "Accordions", Buttons = "Buttons", Layouts = "Layouts", FAQ = "FAQ", Hero = "Hero", Features = "Features", Footer = "Footer", Navbar = "Navbar", Icons = "Icons", Testimonials = "Testimonials", Blog = "Blog", Saved = "Saved", Unsaved = "Unsaved", Randomize = "Randomize", theme_config = {
7184
7185
  heading_font: "Heading Font",
7185
7186
  body_font: "Body Font",
7186
7187
  rounded_corner: "Rounded Corners",
@@ -7282,85 +7283,152 @@ const BlockCard = ({
7282
7283
  multiple_choice: "Multiple Choice",
7283
7284
  textarea: "Textarea",
7284
7285
  rows: "Rows"
7285
- }, ai_assistant = "AI Assistant", close_preview = "Close Preview", saved = "Saved", unsaved = "Unsaved", saving = "Saving...", page_is_empty = "This page is empty.", Theme = "Theme", Outline = "Outline", clipboard_not_supported = "Not supported", please_use_chrome_firefox_or_safari = "Please use Chrome, Firefox or Safari", classes_copied_to_clipboard = "Classes copied to clipboard", download_complete = "Download complete", copied = "Copied", enter_classes_separated_by_space = "Enter classes separated by space", copy_classes_to_clipboard = "Copy classes to clipboard", classes = "Classes", ask_ai = "Ask AI", edit_with_ai = "Edit with AI", generating_please_wait = "Generating... Please wait", stop$1 = "Stop", eg_this_page_is_about_an_ai_assistant_app_called_chai_studio_it_allows_users_to_create_beautiful_webpages_and_edit_content_with_ai = "E.g.: This page is about an AI assistant app called Chai Studio. It allows users to create beautiful webpages and edit content with AI.", ask_ai_to_edit_styles = "Ask AI to edit styles", ask_ai_to_edit_content = "Ask AI to edit content", ai_context = "AI Context", please_select_a_block_to_ask_ai = "Select a block to edit with AI", please_select_a_block_to_edit = "Please select a block to edit", edit = "Edit", tell_about_this_page_eg_this_page_is_about = "Describe this page. E.g.: This page is about...", tag = "Tag", value = "Value", background_image = "Background Image", enter_image_url = "Enter image URL", replace_image = "Replace image", choose_image = "Choose image", images = "Images", typography = "Typography", background = "Background", library = "Library", blocks = "Blocks", basic = "Basic", media = "Media", advanced = "Advanced", form = "Form", choose_icon_or_enter_svg = "Choose an icon or enter SVG", groups = "Groups", ui_libraries = "UI Libraries", accordions = "Accordions", buttons = "Buttons", layouts = "Layouts", choose_library = "Choose library", no_library_found = "No library found.", faq = "FAQ", hero = "Hero", features = "Features", footer = "Footer", navbar = "Navbar", icons = "Icons", testimonials = "Testimonials", blog = "Blog", ai_quick_prompts = {
7286
- improve_writing: "Improve writing",
7287
- replace_placeholder_content: "Replace placeholder content",
7288
- fix_grammar: "Fix grammar",
7289
- make_longer: "Make longer",
7290
- make_shorter: "Make shorter",
7291
- add_emojis: "Add emojis",
7292
- randomize: "Randomize"
7293
- }, sidebar = {
7294
- outline: "Outline",
7295
- edit_block: "Edit Block",
7296
- ai_assistant: "AI Assistant",
7297
- theme: "Theme"
7298
- }, remove_context = "Remove context", yes_delete = "Yes, Delete", ai_context_updated = "AI Context Updated", you_can_now_ask_ai_to_edit_your_content = "You can now ask AI to edit your content.", lngEn = {
7299
- add_block,
7300
- enter_paste_tailwind_html,
7301
- click_to_add_block,
7302
- core,
7303
- custom_blocks,
7304
- ui_library,
7305
- import: "Import",
7306
- html_snippet_description,
7307
- tailwind_html_snippet,
7308
- enter_code_snippet,
7309
- import_html,
7310
- note_imported_html,
7311
- dark_mode,
7312
- tree_view_no_blocks,
7313
- canvas_empty,
7314
- no_block_selected_for_styling,
7315
- no_block_selected_for_ask_ai,
7316
- no_styling_block_selected,
7317
- drop_here_message,
7318
- use_setting,
7319
- mobile_xs_title,
7320
- mobile_xs_content,
7321
- mobile_sm_title,
7322
- mobile_sm_content,
7323
- tablet_md_title,
7324
- tablet_md_content,
7325
- tablet_lg_title,
7326
- tablet_lg_content,
7327
- desktop_xl_title,
7328
- desktop_xl_content,
7329
- large_desktop_2xl_title,
7330
- large_desktop_2xl_content,
7286
+ }, Undo = "Undo", Redo = "Redo", Duplicate = "Duplicate", Close = "Close", Selected = "Selected", Select = "Select", Attributes = "Attributes", apply = "apply", presets = "presets", Orientation = "Orientation", Color = "Color", Upload = "Upload", lngEn = {
7287
+ "Add block": "Add Block",
7288
+ "Add blocks": "Add blocks",
7289
+ "Enter or paste TailwindCSS HTML snippet": "Enter or paste TailwindCSS HTML snippet",
7290
+ "Click to add block to page": "Click to add block to page",
7291
+ Core,
7292
+ "Custom Blocks": "Custom Blocks",
7293
+ "UI Library": "UI Library",
7294
+ Import,
7295
+ "Use HTML snippets from Tailwind CSS component libraries": "Use HTML snippets from Tailwind CSS component libraries",
7296
+ "Tailwind HTML snippet": "Tailwind HTML snippet",
7297
+ "Enter your code snippet here": "Enter your code snippet here",
7298
+ "Import HTML": "Import HTML",
7299
+ "Imported HTML Note": "NOTE: Imported html will be added to the currently selected block. If no block is selected, the html will be added to the page.",
7300
+ "Dark Mode": "Dark Mode",
7301
+ "This page has no blocks. Add a block by clicking the + button": "This page has no blocks. Add a block by clicking the + button",
7302
+ "This page is empty": "This page is empty",
7303
+ "Please select a block to edit settings or styles": "Please select a block to edit settings or styles",
7304
+ "Please select a block to Ask AI": "Please select a block to ask AI",
7305
+ "Please select a styling block": "Please select a styling block",
7306
+ "Drop your block here": "Drop your block here",
7307
+ "Use setting": "Use setting",
7308
+ "Mobile (XS)": "Mobile (XS)",
7309
+ "Styles set here are applied to all screen unless edited at higher breakpoint": "Styles set here are applied to all screen unless edited at higher breakpoint",
7310
+ "Mobile landscape (SM)": "Mobile landscape (SM)",
7311
+ "Styles set here are applied at 640px and up unless edited at higher breakpoint": "Styles set here are applied at 640px and up unless edited at higher breakpoint",
7312
+ "Tablet (MD)": "Tablet (MD)",
7313
+ "Styles set here are applied at 768px and up": "Styles set here are applied at 768px and up",
7314
+ "Tablet Landscape (LG)": "Tablet Landscape (LG)",
7315
+ "Styles set here are applied at 1024px and up unless edited at higher breakpoint": "Styles set here are applied at 1024px and up unless edited at higher breakpoint",
7316
+ "Desktop (XL)": "Desktop (XL)",
7317
+ "Styles set here are applied at 1280px and up unless edited at higher breakpoint": "Styles set here are applied at 1280px and up unless edited at higher breakpoint",
7318
+ "Large Desktop (2XL)": "Large Desktop (2XL)",
7319
+ "Styles set here are applied at 1536px and up": "Styles set here are applied at 1536px and up",
7331
7320
  Breakpoints: Breakpoints$1,
7332
- clear,
7333
- clear_canvas_title,
7334
- clear_canvas_description,
7335
- cancel,
7336
- yes,
7337
- preview,
7338
- settings,
7339
- styling,
7340
- data_provider,
7341
- remove_provider_confirmation,
7342
- remove_provider_warning,
7343
- remove,
7344
- no_data_providers,
7345
- learn_more,
7346
- add_data_providers,
7347
- select_provider,
7348
- choose,
7349
- page_data_providers,
7350
- view_data,
7351
- mark_as_global,
7352
- global_block_note,
7353
- global_block_indicator,
7354
- global_block_category,
7355
- enter_global_block_name,
7356
- eg_header_footer,
7357
- blocks_selected,
7358
- cut,
7359
- copy,
7360
- delete: "Delete",
7361
- clear_selection,
7362
- dev_mode_message,
7363
- to_see_page_preview,
7321
+ Clear,
7322
+ "Clear whole canvas?": "Clear whole canvas?",
7323
+ "Are you sure you want to clear the whole canvas?": "Are you sure you want to clear the whole canvas?",
7324
+ Cancel,
7325
+ Yes,
7326
+ Preview,
7327
+ Settings,
7328
+ Styling,
7329
+ "Data Provider": "Data Provider",
7330
+ "Remove Provider Confirmation": "Are you sure you want to remove <span class='text-blue-500'>{name}</span> provider?",
7331
+ "Your data provider will be removed from this page and all added data binding will be not visible on blocks.": "Your data provider will be removed from this page and all added data binding will be not visible on blocks.",
7332
+ Remove,
7333
+ "You have no data providers registered. Please add a data provider to your project.": "You have no data providers registered. Please add a data provider to your project.",
7334
+ "Learn more": "Learn more",
7335
+ "Add data providers:": "Add data providers:",
7336
+ "Select a provider": "Select a provider",
7337
+ Choose,
7338
+ "Page data providers:": "Page data providers:",
7339
+ "View Data": "View Data",
7340
+ "Mark as Global": "Mark as Global",
7341
+ "Note: Global blocks are single instances. Editing global blocks will be reflected on all pages using these blocks.": "Note: Global blocks are single instances. Editing global blocks will be reflected on all pages using these blocks.",
7342
+ "Global blocks are indicated with": "Global blocks are indicated with",
7343
+ "Global blocks are available under 'Global' category": "Global blocks are available under 'Global' category",
7344
+ "Enter global block name": "Enter global block name",
7345
+ "Eg: Header, Footer": "Eg: Header, Footer",
7346
+ "{length} blocks selected.": "{length} blocks selected.",
7347
+ Cut,
7348
+ Copy,
7349
+ Paste,
7350
+ Delete,
7351
+ "Clear Selection": "Clear Selection",
7352
+ "This is dev mode. Visit": "This is dev mode. Visit",
7353
+ "to see page preview": "to see page preview",
7354
+ classes,
7355
+ Theme,
7356
+ Outline,
7357
+ "Not supported": "Not supported",
7358
+ "Please use Chrome, Firefox or Safari": "Please use Chrome, Firefox or Safari",
7359
+ "Download Complete": "Download complete",
7360
+ Copied,
7361
+ "Enter Classes": "Enter classes separated by space",
7362
+ "Ask AI": "Ask AI",
7363
+ "Edit with AI": "Edit with AI",
7364
+ "Generating... Please wait...": "Generating... Please wait...",
7365
+ "Saving... Please wait...": "Saving... Please wait...",
7366
+ "Deleting... Please wait...": "Deleting... Please wait...",
7367
+ Stop,
7368
+ "E.g.: This page is about an AI assistant app called Chai Studio. It allows users to create beautiful webpages and edit content with AI": "E.g.: This page is about an AI assistant app called Chai Studio. It allows users to create beautiful webpages and edit content with AI.",
7369
+ "Ask AI to edit styles": "Ask AI to edit styles",
7370
+ "Ask AI to edit content": "Ask AI to edit content",
7371
+ "AI Context": "AI Context",
7372
+ "Select Block for AI": "Select a block to edit with AI",
7373
+ "Select Block to Edit": "Please select a block to edit",
7374
+ Edit,
7375
+ "Describe this page. E.g.: This page is about...": "Describe this page. E.g.: This page is about...",
7376
+ Tag,
7377
+ Value,
7378
+ "Background Image": "Background Image",
7379
+ "Enter image URL": "Enter image URL",
7380
+ "Replace image": "Replace image",
7381
+ "Choose image": "Choose image",
7382
+ Images,
7383
+ Library,
7384
+ Blocks,
7385
+ Basic,
7386
+ Media,
7387
+ Advanced,
7388
+ Form,
7389
+ "Choose Icon or SVG": "Choose an icon or enter SVG",
7390
+ Groups,
7391
+ "UI Libraries": "UI Libraries",
7392
+ Accordions,
7393
+ Buttons,
7394
+ Layouts,
7395
+ "Choose Library": "Choose library",
7396
+ "No Library Found": "No library found.",
7397
+ FAQ,
7398
+ Hero,
7399
+ Features,
7400
+ Footer,
7401
+ Navbar,
7402
+ Icons,
7403
+ Testimonials,
7404
+ Blog,
7405
+ "Remove context": "Remove context",
7406
+ "Yes, Delete": "Yes, Delete",
7407
+ "AI Context Updated": "AI Context Updated",
7408
+ "You can now ask AI to edit your content.": "You can now ask AI to edit your content.",
7409
+ Saved,
7410
+ Unsaved,
7411
+ "Saving...": "Saving...",
7412
+ "Improve writing": "Improve writing",
7413
+ "Replace placeholder content": "Replace placeholder content",
7414
+ "Fix grammar": "Fix grammar",
7415
+ "Make longer": "Make longer",
7416
+ "Make shorter": "Make shorter",
7417
+ "Add emojis": "Add emojis",
7418
+ Randomize,
7419
+ "Edit Block": "Edit Block",
7420
+ "AI Assistant": "AI Assistant",
7421
+ "Theme Config": {
7422
+ "Heading Font": "Heading Font",
7423
+ "Body Font": "Body Font",
7424
+ "Rounded Corner": "Rounded Corners",
7425
+ Primary: "Primary",
7426
+ Secondary: "Secondary",
7427
+ Background: "Background",
7428
+ "Text Color": "Text Color",
7429
+ "Background Dark Mode": "Background (Dark Mode)",
7430
+ "Text Color Dark Mode": "Text Color (Dark Mode)"
7431
+ },
7364
7432
  "flex.heading": "Flex Child",
7365
7433
  "flex.basis": "Basis",
7366
7434
  "flex.order": "Order",
@@ -7531,71 +7599,60 @@ const BlockCard = ({
7531
7599
  "classes.heading": "Classes",
7532
7600
  theme_config,
7533
7601
  web_blocks,
7534
- ai_assistant,
7535
- close_preview,
7536
- saved,
7537
- unsaved,
7538
- saving,
7539
- page_is_empty,
7540
- Theme,
7541
- Outline,
7542
- clipboard_not_supported,
7543
- please_use_chrome_firefox_or_safari,
7544
- classes_copied_to_clipboard,
7545
- download_complete,
7546
- copied,
7547
- enter_classes_separated_by_space,
7548
- copy_classes_to_clipboard,
7549
- classes,
7550
- ask_ai,
7551
- edit_with_ai,
7552
- generating_please_wait,
7553
- stop: stop$1,
7554
- eg_this_page_is_about_an_ai_assistant_app_called_chai_studio_it_allows_users_to_create_beautiful_webpages_and_edit_content_with_ai,
7555
- ask_ai_to_edit_styles,
7556
- ask_ai_to_edit_content,
7557
- ai_context,
7558
- please_select_a_block_to_ask_ai,
7559
- please_select_a_block_to_edit,
7560
- edit,
7561
- tell_about_this_page_eg_this_page_is_about,
7562
- tag,
7563
- value,
7564
- background_image,
7565
- enter_image_url,
7566
- replace_image,
7567
- choose_image,
7568
- images,
7569
- typography,
7570
- background,
7571
- library,
7572
- blocks,
7573
- basic,
7574
- media,
7575
- advanced,
7576
- form,
7577
- choose_icon_or_enter_svg,
7578
- groups,
7579
- ui_libraries,
7580
- accordions,
7581
- buttons,
7582
- layouts,
7583
- choose_library,
7584
- no_library_found,
7585
- faq,
7586
- hero,
7587
- features,
7588
- footer,
7589
- navbar,
7590
- icons,
7591
- testimonials,
7592
- blog,
7593
- ai_quick_prompts,
7594
- sidebar,
7595
- remove_context,
7596
- yes_delete,
7597
- ai_context_updated,
7598
- you_can_now_ask_ai_to_edit_your_content
7602
+ "Copy classes to clipboard": "Copy classes to clipboard",
7603
+ "Classes copied to clipboard": "Classes copied to clipboard",
7604
+ "Show hidden blocks": "Show hidden blocks",
7605
+ "Expand all": "Expand all",
7606
+ "Collapse all": "Collapse all",
7607
+ "Choose library": "Choose library",
7608
+ "Close Preview": "Close Preview",
7609
+ Error: "Error",
7610
+ "Failed to copy template": "Failed to copy template",
7611
+ "Total tokens used": "Total tokens used",
7612
+ "Updated AI Context": "Updated AI Context",
7613
+ "You can now Ask AI to edit your content": "You can now Ask AI to edit your content",
7614
+ "Tell about this page eg this page is about": "Tell about this page eg this page is about..",
7615
+ "Delete Context": "Delete Context",
7616
+ "Keyboard shortcuts": "Keyboard shortcuts",
7617
+ Undo,
7618
+ Redo,
7619
+ Duplicate,
7620
+ "Deselect blocks": "Deselect blocks",
7621
+ "Delete block": "Delete block",
7622
+ "Save page": "Save page",
7623
+ "Scripts will be only executed in preview and live mode.": "Scripts will be only executed in preview and live mode.",
7624
+ "HTML Code Editor |": "HTML Code Editor |",
7625
+ Close,
7626
+ "Coming soon": "Coming soon",
7627
+ Selected,
7628
+ Select,
7629
+ "Choose Builder Layout": "Choose Builder Layout",
7630
+ "Single side panel": "Single side panel",
7631
+ "Suitable for smaller screens. Bigger canvas size.": "Suitable for smaller screens. Bigger canvas size.",
7632
+ "Dual side panel": "Dual side panel",
7633
+ "Suitable for larger screens. Smaller canvas size.": "Suitable for larger screens. Smaller canvas size.",
7634
+ "Dual side panel advanced": "Dual side panel advanced",
7635
+ "Suitable for heavy styling & block editing. Setting are always visible.": "Suitable for heavy styling & block editing. Setting are always visible.",
7636
+ "Block Settings": "Block Settings",
7637
+ "Visibility settings": "Visibility settings",
7638
+ "Show on canvas": "Show on canvas",
7639
+ Attributes,
7640
+ "Apply Presets": "Apply Presets",
7641
+ apply,
7642
+ presets,
7643
+ "Global presets": "Global presets",
7644
+ Orientation,
7645
+ Color,
7646
+ "Please select an image": "Please select an image",
7647
+ "click to upload": "click to upload",
7648
+ "SVG, PNG, JPG or GIF (Max. 2mb)": "SVG, PNG, JPG or GIF (Max. 2mb)",
7649
+ "Uploading...": "Uploading...",
7650
+ Upload,
7651
+ "Something went wrong": "Something went wrong",
7652
+ "Fetching...": "Fetching...",
7653
+ "No images found": "No images found",
7654
+ "It looks like you haven't uploaded any images yet. Start by clicking the upload button above.": "It looks like you haven't uploaded any images yet. Start by clicking the upload button above.",
7655
+ "Open Code Editor": "Open Code Editor"
7599
7656
  };
7600
7657
  i18n.use(initReactI18next).init({
7601
7658
  // the translations
@@ -7678,7 +7735,7 @@ const CoreBlock = ({ block: o, disabled: n, parentId: r }) => {
7678
7735
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("flex h-full w-full flex-col overflow-hidden", o), children: [
7679
7736
  n ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mb-2 flex flex-col justify-between rounded-md bg-background/30 p-1", children: [
7680
7737
  /* @__PURE__ */ jsxRuntimeExports.jsx("h1", { className: "flex flex-col items-baseline px-1 text-xl font-semibold xl:flex-col", children: a("Add block") }),
7681
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "p-0 text-xs font-light leading-3 opacity-80 xl:pl-1", children: a(l === "html" ? "enter_paste_tailwind_html" : "click_to_add_block") })
7738
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "p-0 text-xs font-light leading-3 opacity-80 xl:pl-1", children: a(l === "html" ? "Enter or paste TailwindCSS HTML snippet" : "Click to add block to page") })
7682
7739
  ] }) : null,
7683
7740
  /* @__PURE__ */ jsxRuntimeExports.jsx(
7684
7741
  Tabs,
@@ -8046,8 +8103,8 @@ const AIUserPrompt = ({ blockId: o }) => {
8046
8103
  size: "sm",
8047
8104
  children: a ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
8048
8105
  /* @__PURE__ */ jsxRuntimeExports.jsx(Loader, { className: "h-5 w-5 animate-spin" }),
8049
- n("generating_please_wait")
8050
- ] }) : n("edit_with_ai")
8106
+ n("Generating... Please wait...")
8107
+ ] }) : n("Edit with AI")
8051
8108
  }
8052
8109
  ),
8053
8110
  a ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-2", children: [
@@ -8192,32 +8249,32 @@ const AIUserPrompt = ({ blockId: o }) => {
8192
8249
  return;
8193
8250
  }
8194
8251
  if (i) {
8195
- const R = [...a, { key: i, value: d }];
8196
- r(R), l(a), c(""), u(""), x("");
8252
+ const C = [...a, { key: i, value: d }];
8253
+ r(C), l(a), c(""), u(""), x("");
8197
8254
  }
8198
- }, k = (R) => {
8199
- const A = a.filter((T, L) => L !== R);
8200
- r(A), l(A);
8201
- }, v = (R) => {
8202
- m(R), c(a[R].key), u(a[R].value);
8203
- }, S = () => {
8255
+ }, k = (C) => {
8256
+ const B = a.filter((N, L) => L !== C);
8257
+ r(B), l(B);
8258
+ }, S = (C) => {
8259
+ m(C), c(a[C].key), u(a[C].value);
8260
+ }, R = () => {
8204
8261
  if (i.startsWith("@")) {
8205
8262
  x("Attribute keys cannot start with '@'");
8206
8263
  return;
8207
8264
  }
8208
8265
  if (p !== null && i) {
8209
- const R = [...a];
8210
- R[p] = { key: i, value: d }, r(R), l(R), m(null), c(""), u(""), x("");
8266
+ const C = [...a];
8267
+ C[p] = { key: i, value: d }, r(C), l(C), m(null), c(""), u(""), x("");
8211
8268
  }
8212
- }, B = (R) => {
8213
- R.key === "Enter" && !R.shiftKey && (R.preventDefault(), p !== null ? S() : b());
8269
+ }, _ = (C) => {
8270
+ C.key === "Enter" && !C.shiftKey && (C.preventDefault(), p !== null ? R() : b());
8214
8271
  };
8215
8272
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "max-w-full", children: [
8216
8273
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
8217
8274
  "form",
8218
8275
  {
8219
- onSubmit: (R) => {
8220
- R.preventDefault(), p !== null ? S() : b();
8276
+ onSubmit: (C) => {
8277
+ C.preventDefault(), p !== null ? R() : b();
8221
8278
  },
8222
8279
  className: "space-y-3",
8223
8280
  children: [
@@ -8233,7 +8290,7 @@ const AIUserPrompt = ({ blockId: o }) => {
8233
8290
  id: "attrKey",
8234
8291
  ref: j,
8235
8292
  value: i,
8236
- onChange: (R) => c(R.target.value),
8293
+ onChange: (C) => c(C.target.value),
8237
8294
  placeholder: "Key",
8238
8295
  className: "h-8 text-sm"
8239
8296
  }
@@ -8251,8 +8308,8 @@ const AIUserPrompt = ({ blockId: o }) => {
8251
8308
  rows: 2,
8252
8309
  ref: E,
8253
8310
  value: d,
8254
- onChange: (R) => u(R.target.value),
8255
- onKeyDown: B,
8311
+ onChange: (C) => u(C.target.value),
8312
+ onKeyDown: _,
8256
8313
  placeholder: "Value",
8257
8314
  className: "bg-background text-sm"
8258
8315
  }
@@ -8264,22 +8321,22 @@ const AIUserPrompt = ({ blockId: o }) => {
8264
8321
  ]
8265
8322
  }
8266
8323
  ),
8267
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-4 space-y-1 overflow-y-auto", children: a.map((R, A) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between rounded bg-muted p-1.5 text-sm", children: [
8324
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-4 space-y-1 overflow-y-auto", children: a.map((C, B) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between rounded bg-muted p-1.5 text-sm", children: [
8268
8325
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mr-2 flex flex-col", children: [
8269
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate font-semibold", children: R.key }),
8270
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-wrap max-w-[200px] text-muted-foreground", children: R.value.toString() })
8326
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate font-semibold", children: C.key }),
8327
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-wrap max-w-[200px] text-muted-foreground", children: C.value.toString() })
8271
8328
  ] }),
8272
8329
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-shrink-0", children: [
8273
- /* @__PURE__ */ jsxRuntimeExports.jsxs(Button, { variant: "ghost", size: "icon", className: "h-6 w-6", onClick: () => v(A), children: [
8330
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(Button, { variant: "ghost", size: "icon", className: "h-6 w-6", onClick: () => S(B), children: [
8274
8331
  /* @__PURE__ */ jsxRuntimeExports.jsx(Edit2, { className: "h-3 w-3" }),
8275
8332
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "sr-only", children: "Edit attribute" })
8276
8333
  ] }),
8277
- /* @__PURE__ */ jsxRuntimeExports.jsxs(Button, { variant: "ghost", size: "icon", className: "h-6 w-6", onClick: () => k(A), children: [
8334
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(Button, { variant: "ghost", size: "icon", className: "h-6 w-6", onClick: () => k(B), children: [
8278
8335
  /* @__PURE__ */ jsxRuntimeExports.jsx(X, { className: "h-3 w-3" }),
8279
8336
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "sr-only", children: "Remove attribute" })
8280
8337
  ] })
8281
8338
  ] })
8282
- ] }, A)) })
8339
+ ] }, B)) })
8283
8340
  ] });
8284
8341
  }), BlockAttributesEditor = React.memo(() => {
8285
8342
  const o = useSelectedBlock(), [n, r] = useState([]), [a] = useSelectedStylingBlocks(), l = useUpdateBlocksProps(), i = `${get(a, "0.prop")}_attrs`;
@@ -8350,43 +8407,43 @@ const TabletIcon = ({ landscape: o = !1 }) => /* @__PURE__ */ jsxRuntimeExports.
8350
8407
  }
8351
8408
  ), WEB_BREAKPOINTS = [
8352
8409
  {
8353
- title: "mobile_xs_title",
8354
- content: "mobile_xs_content",
8410
+ title: "Mobile (XS)",
8411
+ content: "Styles set here are applied to all screen unless edited at higher breakpoint",
8355
8412
  breakpoint: "xs",
8356
8413
  icon: /* @__PURE__ */ jsxRuntimeExports.jsx(MobileIcon, {}),
8357
8414
  width: 400
8358
8415
  },
8359
8416
  {
8360
- title: "mobile_sm_title",
8361
- content: "mobile_sm_content",
8417
+ title: "Mobile landscape (SM)",
8418
+ content: "Styles set here are applied at 640px and up unless edited at higher breakpoint",
8362
8419
  breakpoint: "sm",
8363
8420
  icon: /* @__PURE__ */ jsxRuntimeExports.jsx(MobileIcon, { className: "rotate-90" }),
8364
8421
  width: 640
8365
8422
  },
8366
8423
  {
8367
- title: "tablet_md_title",
8368
- content: "tablet_md_content",
8424
+ title: "Tablet (MD)",
8425
+ content: "Styles set here are applied at 768px and up",
8369
8426
  breakpoint: "md",
8370
8427
  icon: /* @__PURE__ */ jsxRuntimeExports.jsx(TabletIcon, {}),
8371
8428
  width: 800
8372
8429
  },
8373
8430
  {
8374
- title: "tablet_lg_title",
8375
- content: "tablet_lg_content",
8431
+ title: "Tablet Landscape (LG)",
8432
+ content: "Styles set here are applied at 1024px and up unless edited at higher breakpoint",
8376
8433
  breakpoint: "lg",
8377
8434
  icon: /* @__PURE__ */ jsxRuntimeExports.jsx(TabletIcon, { landscape: !0 }),
8378
8435
  width: 1024
8379
8436
  },
8380
8437
  {
8381
- title: "desktop_xl_title",
8382
- content: "desktop_xl_content",
8438
+ title: "Desktop (XL)",
8439
+ content: "Styles set here are applied at 1280px and up unless edited at higher breakpoint",
8383
8440
  breakpoint: "xl",
8384
8441
  icon: /* @__PURE__ */ jsxRuntimeExports.jsx(LaptopIcon, {}),
8385
8442
  width: 1420
8386
8443
  },
8387
8444
  {
8388
- title: "large_desktop_2xl_title",
8389
- content: "large_desktop_2xl_content",
8445
+ title: "Large Desktop (2XL)",
8446
+ content: "Styles set here are applied at 1536px and up",
8390
8447
  breakpoint: "2xl",
8391
8448
  icon: /* @__PURE__ */ jsxRuntimeExports.jsx(DesktopIcon, {}),
8392
8449
  width: 1920
@@ -8455,7 +8512,7 @@ const TabletIcon = ({ landscape: o = !1 }) => /* @__PURE__ */ jsxRuntimeExports.
8455
8512
  ] }) }),
8456
8513
  /* @__PURE__ */ jsxRuntimeExports.jsxs(AlertDialogContent, { className: "border-border", children: [
8457
8514
  /* @__PURE__ */ jsxRuntimeExports.jsxs(AlertDialogHeader, { children: [
8458
- /* @__PURE__ */ jsxRuntimeExports.jsx(AlertDialogTitle, { className: "text-foreground", children: o("Clear Canvas") }),
8515
+ /* @__PURE__ */ jsxRuntimeExports.jsx(AlertDialogTitle, { className: "text-foreground", children: o("Clear whole canvas? ") }),
8459
8516
  /* @__PURE__ */ jsxRuntimeExports.jsx(AlertDialogDescription, { children: o("Are you sure you want to clear the page?") })
8460
8517
  ] }),
8461
8518
  /* @__PURE__ */ jsxRuntimeExports.jsxs(AlertDialogFooter, { children: [
@@ -8509,7 +8566,7 @@ const SettingsPanel = () => {
8509
8566
  const o = useSelectedBlock(), { t: n } = useTranslation(), r = useBuilderProp("onError", noop);
8510
8567
  return isNull(o) ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-4 text-center", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4 rounded-xl p-4 text-muted-foreground", children: [
8511
8568
  /* @__PURE__ */ jsxRuntimeExports.jsx(MixerHorizontalIcon, { className: "mx-auto text-3xl" }),
8512
- /* @__PURE__ */ jsxRuntimeExports.jsx("h1", { children: n("please_select_a_block_to_edit") })
8569
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h1", { children: n("Please select a block to edit settings or styles") })
8513
8570
  ] }) }) : /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorBoundary, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx(FallbackError, {}), onError: r, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative flex max-h-full w-full flex-col", children: [
8514
8571
  /* @__PURE__ */ jsxRuntimeExports.jsx(BlockSettings, {}),
8515
8572
  /* @__PURE__ */ jsxRuntimeExports.jsx("br", {}),
@@ -8648,7 +8705,7 @@ const ChooseLayout = ({ open: o, close: n }) => {
8648
8705
  }, [o]), o ? /* @__PURE__ */ jsxRuntimeExports.jsx(Dialog, { onOpenChange: (c) => c ? "" : n(), defaultOpen: !0, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(DialogContent, { className: "border-border", children: [
8649
8706
  /* @__PURE__ */ jsxRuntimeExports.jsxs(DialogHeader, { children: [
8650
8707
  /* @__PURE__ */ jsxRuntimeExports.jsxs(DialogTitle, { className: "text-foreground", children: [
8651
- r("data_provider"),
8708
+ r("Data Provider"),
8652
8709
  ": ",
8653
8710
  o.name
8654
8711
  ] }),
@@ -8682,14 +8739,14 @@ function RemoveProviderConfirmation({
8682
8739
  /* @__PURE__ */ jsxRuntimeExports.jsx(
8683
8740
  AlertDialogTitle,
8684
8741
  {
8685
- dangerouslySetInnerHTML: { __html: a("remove_provider_confirmation").replace("{name}", n) }
8742
+ dangerouslySetInnerHTML: { __html: a("Remove Provider Confirmation").replace("{name}", n) }
8686
8743
  }
8687
8744
  ),
8688
- /* @__PURE__ */ jsxRuntimeExports.jsx(AlertDialogDescription, { children: a("remove_provider_warning") })
8745
+ /* @__PURE__ */ jsxRuntimeExports.jsx(AlertDialogDescription, { children: a("Your data provider will be removed from this page and all added data binding will be not visible on blocks.") })
8689
8746
  ] }),
8690
8747
  /* @__PURE__ */ jsxRuntimeExports.jsxs(AlertDialogFooter, { children: [
8691
- /* @__PURE__ */ jsxRuntimeExports.jsx(AlertDialogCancel, { children: a("cancel") }),
8692
- /* @__PURE__ */ jsxRuntimeExports.jsx(AlertDialogAction, { onClick: r, className: "bg-red-600 hover:bg-red-700", children: a("remove") })
8748
+ /* @__PURE__ */ jsxRuntimeExports.jsx(AlertDialogCancel, { children: a("Cancel") }),
8749
+ /* @__PURE__ */ jsxRuntimeExports.jsx(AlertDialogAction, { onClick: r, className: "bg-red-600 hover:bg-red-700", children: a("Remove") })
8693
8750
  ] })
8694
8751
  ] })
8695
8752
  ] });
@@ -8702,28 +8759,28 @@ const PageDataProviders = () => {
8702
8759
  (b) => !isNull(b)
8703
8760
  ), x = (b) => {
8704
8761
  const k = find(n, { providerKey: b });
8705
- c((v) => [...v, k]), a((v) => [...v, { providerKey: k.providerKey, args: {} }]), u(""), l("UNSAVED");
8762
+ c((S) => [...S, k]), a((S) => [...S, { providerKey: k.providerKey, args: {} }]), u(""), l("UNSAVED");
8706
8763
  }, j = (b) => {
8707
- c((k) => filter(k, (v) => v.providerKey !== b.providerKey)), a((k) => filter(k, (v) => v.providerKey !== b.providerKey)), l("UNSAVED");
8764
+ c((k) => filter(k, (S) => S.providerKey !== b.providerKey)), a((k) => filter(k, (S) => S.providerKey !== b.providerKey)), l("UNSAVED");
8708
8765
  }, E = (b) => m(b);
8709
8766
  return isEmpty(n) ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "mb-1.5 p-4 text-xs text-gray-500", children: [
8710
- o("no_data_providers"),
8767
+ o("You have no data providers registered. Please add a data provider to your project."),
8711
8768
  /* @__PURE__ */ jsxRuntimeExports.jsx("br", {}),
8712
- /* @__PURE__ */ jsxRuntimeExports.jsx("a", { className: "text-blue-500", href: "https://chaibuilder.com/docs/registering-data-providers", target: "_blank", children: o("learn_more") })
8769
+ /* @__PURE__ */ jsxRuntimeExports.jsx("a", { className: "text-blue-500", href: "https://chaibuilder.com/docs/registering-data-providers", target: "_blank", children: o("Learn more") })
8713
8770
  ] }) }) : /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "px-1", children: [
8714
8771
  /* @__PURE__ */ jsxRuntimeExports.jsx("br", {}),
8715
- /* @__PURE__ */ jsxRuntimeExports.jsx("label", { children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "mb-1.5 text-xs text-gray-500", children: o("add_data_providers") }) }),
8716
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center space-x-1", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Select, { value: d, onValueChange: (b) => x(b), children: [
8717
- /* @__PURE__ */ jsxRuntimeExports.jsx(SelectTrigger, { className: "w-full", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectValue, { placeholder: o("select_provider") }) }),
8772
+ /* @__PURE__ */ jsxRuntimeExports.jsx("label", { children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "mb-1.5 text-xs text-gray-500", children: o("Add data providers:") }) }),
8773
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center space-x-1", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Select$1, { value: d, onValueChange: (b) => x(b), children: [
8774
+ /* @__PURE__ */ jsxRuntimeExports.jsx(SelectTrigger, { className: "w-full", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectValue, { placeholder: o("Select a provider") }) }),
8718
8775
  /* @__PURE__ */ jsxRuntimeExports.jsxs(SelectContent, { children: [
8719
- /* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: "", children: o("choose") }),
8776
+ /* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: "", children: o("Choose") }),
8720
8777
  g.map((b) => /* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: b.value, children: b.label }, b.value))
8721
8778
  ] })
8722
8779
  ] }) }),
8723
8780
  /* @__PURE__ */ jsxRuntimeExports.jsx("br", {}),
8724
8781
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `border-t border-border ${i.length ? "block" : "hidden"}`, children: [
8725
8782
  /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "flex-1 pb-1.5 pt-4 text-xs font-medium text-gray-500", children: [
8726
- o("page_data_providers"),
8783
+ o("Page Data Providers"),
8727
8784
  ":"
8728
8785
  ] }),
8729
8786
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "space-y-2", children: i.map((b) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
@@ -8762,7 +8819,7 @@ const PageDataProviders = () => {
8762
8819
  ]
8763
8820
  }
8764
8821
  ),
8765
- o("view_data")
8822
+ o("View Data")
8766
8823
  ]
8767
8824
  }
8768
8825
  ),
@@ -8787,7 +8844,7 @@ const PageDataProviders = () => {
8787
8844
  ]
8788
8845
  }
8789
8846
  ),
8790
- o("remove")
8847
+ o("Remove")
8791
8848
  ] }) })
8792
8849
  ] })
8793
8850
  ]
@@ -8801,22 +8858,22 @@ const PageDataProviders = () => {
8801
8858
  function AiFillDatabase(o) {
8802
8859
  return GenIcon({ tag: "svg", attr: { viewBox: "0 0 1024 1024" }, child: [{ tag: "path", attr: { d: "M832 64H192c-17.7 0-32 14.3-32 32v224h704V96c0-17.7-14.3-32-32-32zM288 232c-22.1 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40zM160 928c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V704H160v224zm128-136c22.1 0 40 17.9 40 40s-17.9 40-40 40-40-17.9-40-40 17.9-40 40-40zM160 640h704V384H160v256zm128-168c22.1 0 40 17.9 40 40s-17.9 40-40 40-40-17.9-40-40 17.9-40 40-40z" }, child: [] }] })(o);
8803
8860
  }
8804
- const TopBar = lazy(() => import("./Topbar-_edNTuUL.js"));
8861
+ const TopBar = lazy(() => import("./Topbar-AVw1fDtS.js"));
8805
8862
  function useSidebarMenuItems(o) {
8806
8863
  const n = o === "SINGLE_SIDE_PANEL", { t: r } = useTranslation(), a = useBuilderProp("dataBindingSupport", !1), l = useBuilderProp("askAiCallBack", null);
8807
8864
  return useMemo(() => {
8808
8865
  const i = [
8809
8866
  {
8810
8867
  icon: /* @__PURE__ */ jsxRuntimeExports.jsx(Layers, { size: 20 }),
8811
- label: "sidebar.outline",
8868
+ label: "Outline",
8812
8869
  component: () => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "-mt-8", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Outline$1, {}) })
8813
8870
  },
8814
- n ? { icon: /* @__PURE__ */ jsxRuntimeExports.jsx(GearIcon, { className: "size-5" }), label: "sidebar.edit_block", component: SettingsPanel$1 } : null,
8871
+ n ? { icon: /* @__PURE__ */ jsxRuntimeExports.jsx(GearIcon, { className: "size-5" }), label: "Edit Block", component: SettingsPanel$1 } : null,
8815
8872
  a ? { icon: /* @__PURE__ */ jsxRuntimeExports.jsx(AiFillDatabase, { className: "size-3" }), label: r("Data Providers"), component: PageDataProviders } : null,
8816
- l ? { icon: /* @__PURE__ */ jsxRuntimeExports.jsx(LightningBoltIcon, { className: "size-5" }), label: "sidebar.ai_assistant", component: AskAI } : null,
8873
+ l ? { icon: /* @__PURE__ */ jsxRuntimeExports.jsx(LightningBoltIcon, { className: "size-5" }), label: "AI Assistant", component: AskAI } : null,
8817
8874
  {
8818
8875
  icon: /* @__PURE__ */ jsxRuntimeExports.jsx(PaintBucketIcon, { size: 20 }),
8819
- label: "sidebar.theme",
8876
+ label: "Theme",
8820
8877
  component: () => /* @__PURE__ */ jsxRuntimeExports.jsx(ThemeOptions, { showHeading: !1 })
8821
8878
  }
8822
8879
  ];
@@ -8928,7 +8985,7 @@ const RootLayout = () => {
8928
8985
  return o ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("fixed inset-0 z-[999] bg-background", o ? "block" : "hidden"), children: [
8929
8986
  /* @__PURE__ */ jsxRuntimeExports.jsxs(Button, { size: "sm", className: "absolute right-0 top-0 m-4 space-x-2", onClick: () => n(!1), children: [
8930
8987
  /* @__PURE__ */ jsxRuntimeExports.jsx(EyeClosedIcon, {}),
8931
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: r("close_preview") })
8988
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: r("Close Preview") })
8932
8989
  ] }),
8933
8990
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: a ? /* @__PURE__ */ jsxRuntimeExports.jsx(Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { className: "h-96 w-full" }), children: React__default.createElement(a) }) : null })
8934
8991
  ] }) : null;