lf-pagebuilder-vue 0.0.3 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
- import { defineComponent as H, ref as $, computed as X, createElementBlock as i, openBlock as r, Fragment as A, createElementVNode as t, createCommentVNode as k, withModifiers as ee, withDirectives as R, vModelText as Q, normalizeClass as q, toDisplayString as v, renderList as N, vModelSelect as J, vModelCheckbox as ae, createBlock as re, createTextVNode as E, unref as G, onMounted as te, createVNode as L, watch as _, nextTick as me, withCtx as se, vShow as be, reactive as ge } from "vue";
2
- import { listComponents as fe } from "libreria-astro-lefebvre";
1
+ import { defineComponent as H, ref as S, computed as K, createElementBlock as i, openBlock as s, Fragment as B, createElementVNode as t, createCommentVNode as P, withModifiers as oe, withDirectives as R, vModelText as Y, normalizeClass as L, toDisplayString as p, renderList as V, vModelSelect as J, vModelCheckbox as te, createBlock as ie, createTextVNode as T, unref as G, onMounted as le, createVNode as q, watch as ee, nextTick as be, withCtx as de, vShow as ge, reactive as fe } from "vue";
2
+ import { listComponents as pe } from "libreria-astro-lefebvre";
3
3
  import { QuillEditor as ve } from "@vueup/vue-quill";
4
- import ie from "vuedraggable";
5
- const pe = H({
4
+ import ue from "vuedraggable";
5
+ const xe = H({
6
6
  props: {
7
7
  isComponentMode: Boolean,
8
8
  fullwidthMode: Boolean,
@@ -13,11 +13,13 @@ const pe = H({
13
13
  sectionSelected: String,
14
14
  availableSections: Array,
15
15
  parametersPageConfiguration: Object,
16
- renderApiDomain: String
16
+ renderApiDomain: String,
17
+ inputId: String
17
18
  },
18
19
  emits: [
19
20
  "update:sectionSelected",
20
21
  "update:parametersPageConfiguration.global.sidebarEnabled",
22
+ "update:parametersPageConfiguration.global.renderAsBodyPart",
21
23
  "update:parametersPageConfiguration.global.headSlot",
22
24
  "update:parametersPageConfiguration.global.bodyBeginSlot",
23
25
  "update:parametersPageConfiguration.global.footerSlot",
@@ -26,362 +28,389 @@ const pe = H({
26
28
  "update:parametersPageConfiguration.seo.description"
27
29
  ],
28
30
  setup(e) {
29
- const o = e.renderApiDomain || "http://localhost:8003", b = $(""), p = $(!1), f = X({
31
+ const o = e.renderApiDomain || "http://localhost:8003", g = S(""), x = S(!1), f = K({
30
32
  get() {
31
- var g, S;
32
- const n = (g = e.globalPageConfiguration) == null ? void 0 : g.find((D) => D.section === e.sectionSelected);
33
- return ((S = n == null ? void 0 : n.config) == null ? void 0 : S.width) || "";
33
+ var k, A;
34
+ const m = (k = e.globalPageConfiguration) == null ? void 0 : k.find((w) => w.section === e.sectionSelected);
35
+ return ((A = m == null ? void 0 : m.config) == null ? void 0 : A.width) || "";
34
36
  },
35
- set(n) {
36
- var S;
37
- const g = (S = e.globalPageConfiguration) == null ? void 0 : S.find((D) => D.section === e.sectionSelected);
38
- g && (g.config || (g.config = {}), g.config.width = n);
37
+ set(m) {
38
+ var A;
39
+ const k = (A = e.globalPageConfiguration) == null ? void 0 : A.find((w) => w.section === e.sectionSelected);
40
+ k && (k.config || (k.config = {}), k.config.width = m);
39
41
  }
40
- });
42
+ }), u = () => {
43
+ const m = {
44
+ pageConfig: e.globalPageConfiguration,
45
+ paramsConfig: e.parametersPageConfiguration
46
+ }, k = JSON.stringify(m), A = new CustomEvent("lf-pagebuilder:export", {
47
+ detail: { ...m, inputId: e.inputId }
48
+ });
49
+ document.dispatchEvent(A);
50
+ const w = window.open("", "Preview", "width='100vw',height='100vh'");
51
+ w && (w.document.body.innerText = k, w.document.close());
52
+ }, a = () => {
53
+ const m = {
54
+ pageConfig: e.globalPageConfiguration,
55
+ paramsConfig: e.parametersPageConfiguration
56
+ }, k = JSON.stringify(m);
57
+ b(k);
58
+ const A = new CustomEvent("lf-pagebuilder:save", {
59
+ detail: { ...m, inputId: e.inputId }
60
+ });
61
+ if (document.dispatchEvent(A), e.inputId) {
62
+ const w = document.getElementById(e.inputId);
63
+ w && (w.value = k);
64
+ }
65
+ }, b = (m) => {
66
+ const k = e.inputId ? `pageBuilderConfig_${e.inputId}` : "pageBuilderConfig";
67
+ localStorage.setItem(k, m);
68
+ };
41
69
  return {
42
70
  validateSeo: () => {
43
- const n = {
71
+ const m = {
44
72
  pageConfig: e.globalPageConfiguration,
45
73
  paramsConfig: e.parametersPageConfiguration
46
- }, g = JSON.stringify(n, null, 2);
74
+ }, k = JSON.stringify(m, null, 2);
47
75
  fetch(o + "/api/render-html/", {
48
76
  method: "POST",
49
77
  headers: {
50
78
  "Content-Type": "application/json"
51
79
  },
52
- body: g
53
- }).then((S) => S.text()).then((S) => {
54
- const D = window.open("", "Preview", "width='100vw',height='100vh'");
55
- if (!D) return;
56
- const a = new DOMParser().parseFromString(S, "text/html"), u = [];
57
- function h(I, z = 0) {
58
- if (!I || I.nodeType !== 1) return;
59
- const Z = I.tagName.toLowerCase();
60
- ["h1", "h2", "h3", "h4", "h5", "h6", "a", "p", "article", "section", "header", "footer"].includes(Z) && u.push({
80
+ body: k
81
+ }).then((A) => A.text()).then((A) => {
82
+ const w = window.open("", "Preview", "width='100vw',height='100vh'");
83
+ if (!w) return;
84
+ const c = new DOMParser().parseFromString(A, "text/html"), $ = [];
85
+ function j(N, X = 0) {
86
+ if (!N || N.nodeType !== 1) return;
87
+ const Z = N.tagName.toLowerCase();
88
+ ["h1", "h2", "h3", "h4", "h5", "h6", "a", "p", "article", "section", "header", "footer"].includes(Z) && $.push({
61
89
  tag: Z,
62
- text: (I.textContent || "").trim().slice(0, 80),
63
- depth: z
64
- }), Array.from(I.children).forEach((K) => h(K, z + 1));
90
+ text: (N.textContent || "").trim().slice(0, 80),
91
+ depth: X
92
+ }), Array.from(N.children).forEach((_) => j(_, X + 1));
65
93
  }
66
- h(a.body);
67
- let j = '<h2>Estructura SEO</h2><ul style="font-family:monospace">';
68
- u.forEach((I) => {
69
- j += `<li style="margin-left:${I.depth * 20}px"><b>${I.tag}</b>: ${I.text}</li>`;
70
- }), j += "</ul>", D.document.body.innerHTML = j, D.document.close();
94
+ j(c.body);
95
+ let D = '<h2>Estructura SEO</h2><ul style="font-family:monospace">';
96
+ $.forEach((N) => {
97
+ D += `<li style="margin-left:${N.depth * 20}px"><b>${N.tag}</b>: ${N.text}</li>`;
98
+ }), D += "</ul>", w.document.body.innerHTML = D, w.document.close();
71
99
  });
72
100
  },
73
- importConfig: b,
74
- showAdvancedConfig: p,
101
+ importConfig: g,
102
+ showAdvancedConfig: x,
75
103
  previewFunction: () => {
76
- const n = {
104
+ const m = {
77
105
  pageConfig: e.globalPageConfiguration,
78
106
  paramsConfig: e.parametersPageConfiguration
79
- }, g = JSON.stringify(n, null, 2);
107
+ }, k = JSON.stringify(m, null, 2);
80
108
  fetch(o + "/api/render-html/", {
81
109
  method: "POST",
82
110
  headers: {
83
111
  "Content-Type": "application/json"
84
112
  },
85
- body: g
86
- }).then((S) => S.text()).then((S) => {
87
- const D = window.open("", "Preview", "width='100vw',height='100vh'");
88
- D && (D.document.body.innerHTML = S, D.document.querySelectorAll("script").forEach((a) => {
89
- var h;
90
- const u = D.document.createElement("script");
91
- a.src ? u.src = a.src : u.textContent = a.textContent, (h = a.parentNode) == null || h.replaceChild(u, a);
92
- }), D.document.close());
113
+ body: k
114
+ }).then((A) => A.text()).then((A) => {
115
+ const w = window.open("", "Preview", "width='100vw',height='100vh'");
116
+ w && (w.document.body.innerHTML = A, w.document.querySelectorAll("script").forEach((c) => {
117
+ var j;
118
+ const $ = w.document.createElement("script");
119
+ c.src ? $.src = c.src : $.textContent = c.textContent, (j = c.parentNode) == null || j.replaceChild($, c);
120
+ }), w.document.close());
93
121
  });
94
122
  },
95
123
  importFunction: () => {
96
- e.importConfigurationFunction && e.importConfigurationFunction(b.value), b.value = "";
97
- },
98
- exportFunction: () => {
99
- const n = {
100
- pageConfig: e.globalPageConfiguration,
101
- paramsConfig: e.parametersPageConfiguration
102
- }, g = JSON.stringify(n), S = window.open("", "Preview", "width='100vw',height='100vh'");
103
- S && (S.document.body.innerText = g, S.document.close());
104
- },
105
- setToLocalStorage: () => {
106
- const n = {
107
- pageConfig: e.globalPageConfiguration,
108
- paramsConfig: e.parametersPageConfiguration
109
- }, g = JSON.stringify(n);
110
- localStorage.setItem("pageBuilderConfig", g);
124
+ e.importConfigurationFunction && e.importConfigurationFunction(g.value), g.value = "";
111
125
  },
126
+ exportFunction: u,
127
+ saveButtonAction: a,
112
128
  loadFromLocalStorage: () => {
113
- const n = localStorage.getItem("pageBuilderConfig");
114
- if (n && e.importConfigurationFunction) {
115
- const g = JSON.parse(n);
116
- e.importConfigurationFunction(g);
129
+ const m = e.inputId ? `pageBuilderConfig_${e.inputId}` : "pageBuilderConfig", k = localStorage.getItem(m);
130
+ if (k && e.importConfigurationFunction) {
131
+ const A = JSON.parse(k);
132
+ e.importConfigurationFunction(A);
117
133
  }
118
134
  },
119
135
  toggleExpandScreen: () => {
120
- const n = document.querySelector(".lf-page-builder");
121
- n && n.classList.toggle("expanded-page-builder");
136
+ const m = document.querySelector(".lf-page-builder");
137
+ m && m.classList.toggle("expanded-page-builder");
122
138
  },
123
139
  sectionWidth: f
124
140
  };
125
141
  }
126
- }), xe = (e, o) => {
127
- const b = e.__vccOpts || e;
128
- for (const [p, f] of o)
129
- b[p] = f;
130
- return b;
131
- }, he = { class: "flex justify-end items-center w-full p-3 gap-3" }, we = { class: "flex justify-between gap-3 px-5 py-3 bg-white mx-3 rounded-xl border border-slate-200 mb-6 sticky top-2 z-9999 shadow-lg backdrop-blur-sm" }, ye = { class: "flex gap-2" }, Ce = { class: "flex gap-2" }, $e = ["value"], ke = ["value"], Se = { value: "full" }, Fe = { value: "1/2" }, Pe = { value: "1/3" }, je = { value: "2/3" }, Me = { value: "1/4" }, Ie = { value: "3/4" }, Ae = { value: "1/5" }, Te = { value: "2/5" }, Be = { value: "3/5" }, Ee = { value: "4/5" }, De = { key: 0 }, Oe = { key: 1 }, Re = { class: "flex items-center gap-2" }, Ne = {
142
+ }), he = (e, o) => {
143
+ const g = e.__vccOpts || e;
144
+ for (const [x, f] of o)
145
+ g[x] = f;
146
+ return g;
147
+ }, we = { class: "flex justify-end items-center w-full p-3 gap-3" }, ye = { class: "flex justify-between gap-3 px-5 py-3 bg-white mx-3 rounded-xl border border-slate-200 mb-6 sticky top-2 z-9999 shadow-lg backdrop-blur-sm" }, Ce = { class: "flex gap-2" }, $e = { class: "flex gap-2" }, ke = ["value"], Se = ["value"], Pe = { value: "full" }, Fe = { value: "1/2" }, je = { value: "1/3" }, Ie = { value: "2/3" }, Me = { value: "1/4" }, Ae = { value: "3/4" }, Be = { value: "1/5" }, Ee = { value: "2/5" }, Te = { value: "3/5" }, De = { value: "4/5" }, Oe = { key: 0 }, Re = { key: 1 }, Ne = { class: "flex items-center gap-2" }, Ve = {
132
148
  key: 0,
133
149
  class: "bg-white border border-slate-200 rounded-2xl p-5 mx-3 mb-6 shadow-lg"
134
- }, Ve = { class: "flex flex-row gap-4 w-full" }, Ue = { class: "border border-slate-200 rounded-xl p-5 w-full bg-gradient-to-br from-slate-50 to-white" }, ze = { class: "flex flex-col gap-3 border-b border-slate-200 pb-4 w-full" }, Le = { class: "mb-3" }, qe = { class: "flex items-center gap-3 cursor-pointer group" }, Ge = { class: "mb-3" }, Je = { class: "mb-3" }, He = { class: "mb-3" }, We = { class: "border border-slate-200 rounded-xl p-5 w-full bg-gradient-to-br from-slate-50 to-white" }, Qe = { class: "flex justify-between items-center mb-4" }, Xe = { class: "flex flex-col gap-3 border-b border-slate-200 pb-4 w-full" }, Ye = { class: "mb-3" }, Ze = { class: "mb-3" }, Ke = { class: "mb-3" };
135
- function _e(e, o, b, p, f, c) {
136
- return r(), i(A, null, [
137
- t("div", he, [
138
- o[28] || (o[28] = t("span", { class: "bg-rose-50 px-3 py-1 rounded-full border border-rose-200 text-rose-400 text-xs font-medium me-4" }, "Todo lo de esta barra desaparecerá →", -1)),
150
+ }, Ue = { class: "flex flex-row gap-4 w-full" }, ze = { class: "border border-slate-200 rounded-xl p-5 w-full bg-gradient-to-br from-slate-50 to-white" }, qe = { class: "flex flex-col gap-3 border-b border-slate-200 pb-4 w-full" }, Le = { class: "mb-3" }, Ge = { class: "flex items-center gap-3 cursor-pointer group" }, Je = { class: "mb-3" }, He = { class: "flex items-center gap-3 cursor-pointer group" }, We = { class: "mb-3" }, Ye = { class: "mb-3" }, Ke = { class: "mb-3" }, Qe = { class: "border border-slate-200 rounded-xl p-5 w-full bg-gradient-to-br from-slate-50 to-white" }, Xe = { class: "flex justify-between items-center mb-4" }, Ze = { class: "flex flex-col gap-3 border-b border-slate-200 pb-4 w-full" }, _e = { class: "mb-3" }, et = { class: "mb-3" }, tt = { class: "mb-3" };
151
+ function ot(e, o, g, x, f, u) {
152
+ return s(), i(B, null, [
153
+ t("div", we, [
154
+ o[30] || (o[30] = t("span", { class: "bg-rose-50 px-3 py-1 rounded-full border border-rose-200 text-rose-400 text-xs font-medium me-4" }, "Todo lo de esta barra desaparecerá →", -1)),
139
155
  t("form", {
140
- onSubmit: o[2] || (o[2] = ee(() => {
156
+ onSubmit: o[2] || (o[2] = oe(() => {
141
157
  }, ["prevent"])),
142
158
  class: "flex gap-2"
143
159
  }, [
144
160
  R(t("input", {
145
- "onUpdate:modelValue": o[0] || (o[0] = (d) => e.importConfig = d),
161
+ "onUpdate:modelValue": o[0] || (o[0] = (a) => e.importConfig = a),
146
162
  type: "text",
147
163
  class: "bg-white border border-slate-200 rounded-lg px-3 py-1.5 text-sm focus:outline-none focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400",
148
164
  name: "",
149
165
  id: "",
150
166
  placeholder: "Pegar configuración..."
151
167
  }, null, 512), [
152
- [Q, e.importConfig]
168
+ [Y, e.importConfig]
153
169
  ]),
154
170
  t("button", {
155
- onClick: o[1] || (o[1] = (d) => e.importFunction()),
171
+ onClick: o[1] || (o[1] = (a) => e.importFunction()),
156
172
  class: "cursor-pointer bg-white hover:bg-slate-700 hover:text-white border border-slate-200 hover:border-slate-700 rounded-lg px-3 py-1.5 text-sm font-medium transition-all duration-200 shadow-sm hover:shadow-md"
157
173
  }, "🏯 Importar")
158
174
  ], 32),
159
175
  t("button", {
160
- onClick: o[3] || (o[3] = (d) => e.exportFunction()),
176
+ onClick: o[3] || (o[3] = (a) => e.exportFunction()),
161
177
  class: "cursor-pointer bg-white hover:bg-slate-700 hover:text-white border border-slate-200 hover:border-slate-700 rounded-lg px-3 py-1.5 text-sm font-medium transition-all duration-200 shadow-sm hover:shadow-md"
162
178
  }, "🚀 Exportar")
163
179
  ]),
164
- t("div", we, [
165
- t("div", ye, [
180
+ t("div", ye, [
181
+ t("div", Ce, [
166
182
  t("button", {
167
- class: q([[e.isComponentMode ? "bg-gradient-to-r from-slate-600 to-slate-700 border-slate-700 text-white shadow-md" : "bg-white hover:bg-slate-100"], "cursor-pointer border border-slate-200 rounded-lg py-1.5 px-3 text-sm font-medium transition-all duration-200"]),
168
- onClick: o[4] || (o[4] = (d) => {
169
- var m;
170
- return (m = e.toggleComponentModeFunction) == null ? void 0 : m.call(e);
183
+ class: L([[e.isComponentMode ? "bg-gradient-to-r from-slate-600 to-slate-700 border-slate-700 text-white shadow-md" : "bg-white hover:bg-slate-100"], "cursor-pointer border border-slate-200 rounded-lg py-1.5 px-3 text-sm font-medium transition-all duration-200"]),
184
+ onClick: o[4] || (o[4] = (a) => {
185
+ var b;
186
+ return (b = e.toggleComponentModeFunction) == null ? void 0 : b.call(e);
171
187
  })
172
- }, v(e.isComponentMode ? "⚒️ Modo Configuración" : "👁️ Modo Visual"), 3),
188
+ }, p(e.isComponentMode ? "⚒️ Modo Configuración" : "👁️ Modo Visual"), 3),
173
189
  t("button", {
174
- class: q([[e.fullwidthMode ? "bg-white hover:bg-slate-100" : "bg-gradient-to-r from-slate-600 to-slate-700 border-slate-700 text-white shadow-md"], "cursor-pointer border border-slate-200 rounded-lg py-1.5 px-3 text-sm font-medium transition-all duration-200"]),
175
- onClick: o[5] || (o[5] = (d) => {
176
- var m;
177
- return (m = e.toggleFullwidthMode) == null ? void 0 : m.call(e);
190
+ class: L([[e.fullwidthMode ? "bg-white hover:bg-slate-100" : "bg-gradient-to-r from-slate-600 to-slate-700 border-slate-700 text-white shadow-md"], "cursor-pointer border border-slate-200 rounded-lg py-1.5 px-3 text-sm font-medium transition-all duration-200"]),
191
+ onClick: o[5] || (o[5] = (a) => {
192
+ var b;
193
+ return (b = e.toggleFullwidthMode) == null ? void 0 : b.call(e);
178
194
  })
179
- }, v(e.fullwidthMode ? "⚒️ Comps. Plegados" : "👁️ Comps. Desplegados"), 3)
195
+ }, p(e.fullwidthMode ? "⚒️ Comps. Plegados" : "👁️ Comps. Desplegados"), 3)
180
196
  ]),
181
- t("div", Ce, [
197
+ t("div", $e, [
182
198
  t("select", {
183
199
  value: e.sectionSelected,
184
- onChange: o[6] || (o[6] = (d) => e.$emit("update:sectionSelected", d.target.value)),
200
+ onChange: o[6] || (o[6] = (a) => e.$emit("update:sectionSelected", a.target.value)),
185
201
  class: "bg-white border border-slate-200 rounded-lg px-3 py-1.5 cursor-pointer text-sm focus:outline-none focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 transition-colors"
186
202
  }, [
187
- (r(!0), i(A, null, N(e.availableSections, (d, m) => (r(), i("option", {
188
- key: m,
189
- value: d
190
- }, v(d), 9, ke))), 128))
191
- ], 40, $e),
203
+ (s(!0), i(B, null, V(e.availableSections, (a, b) => (s(), i("option", {
204
+ key: b,
205
+ value: a
206
+ }, p(a), 9, Se))), 128))
207
+ ], 40, ke),
192
208
  R(t("select", {
193
209
  class: "bg-white border border-slate-200 rounded-lg px-3 py-1.5 cursor-pointer text-sm focus:outline-none focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 transition-colors",
194
- "onUpdate:modelValue": o[7] || (o[7] = (d) => e.sectionWidth = d)
210
+ "onUpdate:modelValue": o[7] || (o[7] = (a) => e.sectionWidth = a)
195
211
  }, [
196
- o[29] || (o[29] = t("option", {
212
+ o[31] || (o[31] = t("option", {
197
213
  disabled: "",
198
214
  value: ""
199
215
  }, "Selecciona el ancho de la sección", -1)),
200
- t("option", Se, "Sección " + v(e.sectionSelected) + " ocupa todo el ancho de la página", 1),
201
- t("option", Fe, "Sección " + v(e.sectionSelected) + " ocupa 1/2 del ancho de la página", 1),
202
- t("option", Pe, "Sección " + v(e.sectionSelected) + " ocupa 1/3 del ancho de la página", 1),
203
- t("option", je, "Sección " + v(e.sectionSelected) + " ocupa 2/3 del ancho de la página", 1),
204
- t("option", Me, "Sección " + v(e.sectionSelected) + " ocupa 1/4 del ancho de la página", 1),
205
- t("option", Ie, "Sección " + v(e.sectionSelected) + " ocupa 3/4 del ancho de la página", 1),
206
- t("option", Ae, "Sección " + v(e.sectionSelected) + " ocupa 1/5 del ancho de la página", 1),
207
- t("option", Te, "Sección " + v(e.sectionSelected) + " ocupa 2/5 del ancho de la página", 1),
208
- t("option", Be, "Sección " + v(e.sectionSelected) + " ocupa 3/5 del ancho de la página", 1),
209
- t("option", Ee, "Sección " + v(e.sectionSelected) + " ocupa 4/5 del ancho de la página", 1)
216
+ t("option", Pe, "Sección " + p(e.sectionSelected) + " ocupa todo el ancho de la página", 1),
217
+ t("option", Fe, "Sección " + p(e.sectionSelected) + " ocupa 1/2 del ancho de la página", 1),
218
+ t("option", je, "Sección " + p(e.sectionSelected) + " ocupa 1/3 del ancho de la página", 1),
219
+ t("option", Ie, "Sección " + p(e.sectionSelected) + " ocupa 2/3 del ancho de la página", 1),
220
+ t("option", Me, "Sección " + p(e.sectionSelected) + " ocupa 1/4 del ancho de la página", 1),
221
+ t("option", Ae, "Sección " + p(e.sectionSelected) + " ocupa 3/4 del ancho de la página", 1),
222
+ t("option", Be, "Sección " + p(e.sectionSelected) + " ocupa 1/5 del ancho de la página", 1),
223
+ t("option", Ee, "Sección " + p(e.sectionSelected) + " ocupa 2/5 del ancho de la página", 1),
224
+ t("option", Te, "Sección " + p(e.sectionSelected) + " ocupa 3/5 del ancho de la página", 1),
225
+ t("option", De, "Sección " + p(e.sectionSelected) + " ocupa 4/5 del ancho de la página", 1)
210
226
  ], 512), [
211
227
  [J, e.sectionWidth]
212
228
  ]),
213
229
  t("button", {
214
- class: q([
230
+ class: L([
215
231
  "cursor-pointer border rounded-lg py-1.5 px-3 text-sm font-medium transition-all duration-200 flex items-center gap-2",
216
232
  e.showAdvancedConfig ? "bg-gradient-to-r from-amber-500 to-orange-500 border-amber-500 text-white shadow-md" : "bg-white border-slate-200 hover:bg-slate-100"
217
233
  ]),
218
- onClick: o[8] || (o[8] = (d) => e.showAdvancedConfig = !e.showAdvancedConfig)
234
+ onClick: o[8] || (o[8] = (a) => e.showAdvancedConfig = !e.showAdvancedConfig)
219
235
  }, [
220
- o[30] || (o[30] = t("span", null, "⚙️ Página", -1)),
221
- e.showAdvancedConfig ? (r(), i("span", De, "▲")) : (r(), i("span", Oe, "▼"))
236
+ o[32] || (o[32] = t("span", null, "⚙️ Página", -1)),
237
+ e.showAdvancedConfig ? (s(), i("span", Oe, "▲")) : (s(), i("span", Re, "▼"))
222
238
  ], 2)
223
239
  ]),
224
- t("div", Re, [
240
+ t("div", Ne, [
225
241
  t("button", {
226
- onClick: o[9] || (o[9] = (d) => e.previewFunction()),
242
+ onClick: o[9] || (o[9] = (a) => e.previewFunction()),
227
243
  class: "cursor-pointer bg-white hover:bg-violet-500 hover:text-white hover:border-violet-500 border border-slate-200 rounded-lg px-3 py-1.5 text-sm font-medium transition-all duration-200 shadow-sm hover:shadow-md"
228
244
  }, "🔎 Preview"),
229
245
  t("button", {
230
- onClick: o[10] || (o[10] = (d) => e.setToLocalStorage()),
246
+ onClick: o[10] || (o[10] = (a) => e.saveButtonAction()),
231
247
  title: "No es un guardado real, simplemente almacena la configuración en el navegador para recuperarla luego",
232
248
  class: "cursor-pointer bg-gradient-to-r from-emerald-500 to-teal-500 hover:from-emerald-600 hover:to-teal-600 text-white border border-emerald-500 rounded-lg px-3 py-1.5 text-sm font-medium transition-all duration-200 shadow-sm hover:shadow-md"
233
249
  }, "💾 Guardar"),
234
250
  t("button", {
235
- onClick: o[11] || (o[11] = (d) => e.loadFromLocalStorage()),
251
+ onClick: o[11] || (o[11] = (a) => e.loadFromLocalStorage()),
236
252
  class: "cursor-pointer bg-white hover:bg-blue-500 hover:text-white hover:border-blue-500 border border-slate-200 rounded-lg px-3 py-1.5 text-sm font-medium transition-all duration-200 shadow-sm hover:shadow-md"
237
253
  }, "⤵️ Cargar"),
238
254
  t("button", {
239
- onClick: o[12] || (o[12] = (d) => e.toggleExpandScreen()),
255
+ onClick: o[12] || (o[12] = (a) => e.toggleExpandScreen()),
240
256
  title: "Expandir / Contraer Pagebuilder",
241
257
  class: "cursor-pointer bg-white hover:bg-slate-700 hover:text-white hover:border-slate-700 border border-slate-200 rounded-lg px-3 py-1.5 text-xl transition-all duration-200 shadow-sm hover:shadow-md ms-2"
242
258
  }, "◳")
243
259
  ])
244
260
  ]),
245
- e.showAdvancedConfig && e.parametersPageConfiguration ? (r(), i("div", Ne, [
246
- t("div", Ve, [
247
- t("div", Ue, [
248
- o[35] || (o[35] = t("h2", { class: "text-lg font-bold mb-4 text-slate-700" }, "Configuración Avanzada", -1)),
249
- o[36] || (o[36] = t("h3", { class: "font-semibold mb-3 text-slate-600" }, "Configuración Global", -1)),
250
- t("div", ze, [
261
+ e.showAdvancedConfig && e.parametersPageConfiguration ? (s(), i("div", Ve, [
262
+ t("div", Ue, [
263
+ t("div", ze, [
264
+ o[38] || (o[38] = t("h2", { class: "text-lg font-bold mb-4 text-slate-700" }, "Configuración Avanzada", -1)),
265
+ o[39] || (o[39] = t("h3", { class: "font-semibold mb-3 text-slate-600" }, "Configuración Global", -1)),
266
+ t("div", qe, [
251
267
  t("div", Le, [
252
- t("label", qe, [
268
+ t("label", Ge, [
269
+ R(t("input", {
270
+ type: "checkbox",
271
+ "onUpdate:modelValue": o[13] || (o[13] = (a) => e.parametersPageConfiguration.global.sidebarEnabled = a),
272
+ onChange: o[14] || (o[14] = (a) => e.$emit("update:parametersPageConfiguration.global.sidebarEnabled", a.target.value)),
273
+ class: "w-5 h-5 rounded border-slate-300 text-emerald-500 focus:ring-emerald-500 cursor-pointer"
274
+ }, null, 544), [
275
+ [te, e.parametersPageConfiguration.global.sidebarEnabled]
276
+ ]),
277
+ o[33] || (o[33] = t("span", { class: "text-slate-600 group-hover:text-slate-800 transition-colors" }, "Sidebar Habilitado", -1))
278
+ ])
279
+ ]),
280
+ t("div", Je, [
281
+ t("label", He, [
253
282
  R(t("input", {
254
283
  type: "checkbox",
255
- "onUpdate:modelValue": o[13] || (o[13] = (d) => e.parametersPageConfiguration.global.sidebarEnabled = d),
256
- onChange: o[14] || (o[14] = (d) => e.$emit("update:parametersPageConfiguration.global.sidebarEnabled", d.target.value)),
284
+ "onUpdate:modelValue": o[15] || (o[15] = (a) => e.parametersPageConfiguration.global.renderAsBodyPart = a),
285
+ onChange: o[16] || (o[16] = (a) => e.$emit("update:parametersPageConfiguration.global.renderAsBodyPart", a.target.value)),
257
286
  class: "w-5 h-5 rounded border-slate-300 text-emerald-500 focus:ring-emerald-500 cursor-pointer"
258
287
  }, null, 544), [
259
- [ae, e.parametersPageConfiguration.global.sidebarEnabled]
288
+ [te, e.parametersPageConfiguration.global.renderAsBodyPart]
260
289
  ]),
261
- o[31] || (o[31] = t("span", { class: "text-slate-600 group-hover:text-slate-800 transition-colors" }, "Sidebar Habilitado", -1))
290
+ o[34] || (o[34] = t("span", { class: "text-slate-600 group-hover:text-slate-800 transition-colors" }, "Renderizar como parte del BODY (Sin etiquetas HTML, HEAD, BODY)", -1))
262
291
  ])
263
292
  ]),
264
- t("div", Ge, [
265
- o[32] || (o[32] = t("label", {
293
+ t("div", We, [
294
+ o[35] || (o[35] = t("label", {
266
295
  for: "headSlot",
267
296
  class: "block text-sm font-medium text-slate-600 mb-2"
268
297
  }, " Código al final de la sección <head> ", -1)),
269
298
  R(t("textarea", {
270
299
  id: "headSlot",
271
- "onUpdate:modelValue": o[15] || (o[15] = (d) => e.parametersPageConfiguration.global.headSlot = d),
272
- onInput: o[16] || (o[16] = (d) => e.$emit("update:parametersPageConfiguration.global.headSlot", d.target.value)),
300
+ "onUpdate:modelValue": o[17] || (o[17] = (a) => e.parametersPageConfiguration.global.headSlot = a),
301
+ onInput: o[18] || (o[18] = (a) => e.$emit("update:parametersPageConfiguration.global.headSlot", a.target.value)),
273
302
  class: "w-full px-4 py-3 border border-slate-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 bg-white text-sm font-mono transition-colors",
274
303
  placeholder: "Contenido para el head",
275
304
  rows: "3"
276
305
  }, null, 544), [
277
- [Q, e.parametersPageConfiguration.global.headSlot]
306
+ [Y, e.parametersPageConfiguration.global.headSlot]
278
307
  ])
279
308
  ]),
280
- t("div", Je, [
281
- o[33] || (o[33] = t("label", {
309
+ t("div", Ye, [
310
+ o[36] || (o[36] = t("label", {
282
311
  for: "bodyBeginSlot",
283
312
  class: "block text-sm font-medium text-slate-600 mb-2"
284
313
  }, " Código al principio de la sección <body> ", -1)),
285
314
  R(t("textarea", {
286
315
  id: "bodyBeginSlot",
287
- "onUpdate:modelValue": o[17] || (o[17] = (d) => e.parametersPageConfiguration.global.bodyBeginSlot = d),
288
- onInput: o[18] || (o[18] = (d) => e.$emit("update:parametersPageConfiguration.global.bodyBeginSlot", d.target.value)),
316
+ "onUpdate:modelValue": o[19] || (o[19] = (a) => e.parametersPageConfiguration.global.bodyBeginSlot = a),
317
+ onInput: o[20] || (o[20] = (a) => e.$emit("update:parametersPageConfiguration.global.bodyBeginSlot", a.target.value)),
289
318
  class: "w-full px-4 py-3 border border-slate-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 bg-white text-sm font-mono transition-colors",
290
319
  placeholder: "Contenido para el inicio del body",
291
320
  rows: "3"
292
321
  }, null, 544), [
293
- [Q, e.parametersPageConfiguration.global.bodyBeginSlot]
322
+ [Y, e.parametersPageConfiguration.global.bodyBeginSlot]
294
323
  ])
295
324
  ]),
296
- t("div", He, [
297
- o[34] || (o[34] = t("label", {
325
+ t("div", Ke, [
326
+ o[37] || (o[37] = t("label", {
298
327
  for: "footerSlot",
299
328
  class: "block text-sm font-medium text-slate-600 mb-2"
300
329
  }, " Código al final de la sección <body>, dentro de la etiqueta <footer> ", -1)),
301
330
  R(t("textarea", {
302
331
  id: "footerSlot",
303
- "onUpdate:modelValue": o[19] || (o[19] = (d) => e.parametersPageConfiguration.global.footerSlot = d),
304
- onInput: o[20] || (o[20] = (d) => e.$emit("update:parametersPageConfiguration.global.footerSlot", d.target.value)),
332
+ "onUpdate:modelValue": o[21] || (o[21] = (a) => e.parametersPageConfiguration.global.footerSlot = a),
333
+ onInput: o[22] || (o[22] = (a) => e.$emit("update:parametersPageConfiguration.global.footerSlot", a.target.value)),
305
334
  class: "w-full px-4 py-3 border border-slate-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 bg-white text-sm font-mono transition-colors",
306
335
  placeholder: "Contenido para el footer",
307
336
  rows: "3"
308
337
  }, null, 544), [
309
- [Q, e.parametersPageConfiguration.global.footerSlot]
338
+ [Y, e.parametersPageConfiguration.global.footerSlot]
310
339
  ])
311
340
  ])
312
341
  ])
313
342
  ]),
314
- t("div", We, [
315
- t("div", Qe, [
316
- o[37] || (o[37] = t("h2", { class: "text-lg font-bold text-slate-700" }, "Configuración SEO", -1)),
343
+ t("div", Qe, [
344
+ t("div", Xe, [
345
+ o[40] || (o[40] = t("h2", { class: "text-lg font-bold text-slate-700" }, "Configuración SEO", -1)),
317
346
  t("button", {
318
- onClick: o[21] || (o[21] = (d) => e.validateSeo()),
347
+ onClick: o[23] || (o[23] = (a) => e.validateSeo()),
319
348
  class: "cursor-pointer bg-gradient-to-r from-violet-500 to-purple-500 hover:from-violet-600 hover:to-purple-600 text-white border border-violet-500 rounded-lg px-4 py-1.5 text-sm font-medium transition-all duration-200 shadow-sm hover:shadow-md"
320
349
  }, "🦄 Validar SEO")
321
350
  ]),
322
- t("div", Xe, [
323
- t("div", Ye, [
324
- o[39] || (o[39] = t("label", {
351
+ t("div", Ze, [
352
+ t("div", _e, [
353
+ o[42] || (o[42] = t("label", {
325
354
  for: "robotsIndex",
326
355
  class: "block text-sm font-medium text-slate-600 mb-2"
327
356
  }, " Indexación de robots ", -1)),
328
357
  R(t("select", {
329
358
  id: "robotsIndex",
330
- "onUpdate:modelValue": o[22] || (o[22] = (d) => e.parametersPageConfiguration.seo.robots = d),
331
- onChange: o[23] || (o[23] = (d) => e.$emit("update:parametersPageConfiguration.seo.robots", d.target.value)),
359
+ "onUpdate:modelValue": o[24] || (o[24] = (a) => e.parametersPageConfiguration.seo.robots = a),
360
+ onChange: o[25] || (o[25] = (a) => e.$emit("update:parametersPageConfiguration.seo.robots", a.target.value)),
332
361
  class: "w-full px-4 py-2.5 border border-slate-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 bg-white text-sm transition-colors cursor-pointer"
333
- }, [...o[38] || (o[38] = [
362
+ }, [...o[41] || (o[41] = [
334
363
  t("option", { value: "index, follow" }, "Index Follow", -1),
335
364
  t("option", { value: "noindex, nofollow" }, "Noindex Nofollow", -1)
336
365
  ])], 544), [
337
366
  [J, e.parametersPageConfiguration.seo.robots]
338
367
  ])
339
368
  ]),
340
- t("div", Ze, [
341
- o[40] || (o[40] = t("label", {
369
+ t("div", et, [
370
+ o[43] || (o[43] = t("label", {
342
371
  for: "pageTitle",
343
372
  class: "block text-sm font-medium text-slate-600 mb-2"
344
373
  }, " Título de la página ", -1)),
345
374
  R(t("input", {
346
375
  id: "pageTitle",
347
376
  type: "text",
348
- "onUpdate:modelValue": o[24] || (o[24] = (d) => e.parametersPageConfiguration.seo.title = d),
349
- onInput: o[25] || (o[25] = (d) => e.$emit("update:parametersPageConfiguration.seo.title", d.target.value)),
377
+ "onUpdate:modelValue": o[26] || (o[26] = (a) => e.parametersPageConfiguration.seo.title = a),
378
+ onInput: o[27] || (o[27] = (a) => e.$emit("update:parametersPageConfiguration.seo.title", a.target.value)),
350
379
  class: "w-full px-4 py-2.5 border border-slate-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 bg-white text-sm transition-colors",
351
380
  placeholder: "Ingresa el título de la página"
352
381
  }, null, 544), [
353
- [Q, e.parametersPageConfiguration.seo.title]
382
+ [Y, e.parametersPageConfiguration.seo.title]
354
383
  ])
355
384
  ]),
356
- t("div", Ke, [
357
- o[41] || (o[41] = t("label", {
385
+ t("div", tt, [
386
+ o[44] || (o[44] = t("label", {
358
387
  for: "pageDescription",
359
388
  class: "block text-sm font-medium text-slate-600 mb-2"
360
389
  }, " Descripción de la página ", -1)),
361
390
  R(t("textarea", {
362
391
  id: "pageDescription",
363
- "onUpdate:modelValue": o[26] || (o[26] = (d) => e.parametersPageConfiguration.seo.description = d),
364
- onInput: o[27] || (o[27] = (d) => e.$emit("update:parametersPageConfiguration.seo.description", d.target.value)),
392
+ "onUpdate:modelValue": o[28] || (o[28] = (a) => e.parametersPageConfiguration.seo.description = a),
393
+ onInput: o[29] || (o[29] = (a) => e.$emit("update:parametersPageConfiguration.seo.description", a.target.value)),
365
394
  class: "w-full px-4 py-3 border border-slate-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 bg-white text-sm transition-colors",
366
395
  placeholder: "Ingresa la descripción de la página",
367
396
  rows: "3"
368
397
  }, null, 544), [
369
- [Q, e.parametersPageConfiguration.seo.description]
398
+ [Y, e.parametersPageConfiguration.seo.description]
370
399
  ])
371
400
  ])
372
401
  ])
373
402
  ])
374
403
  ])
375
- ])) : k("", !0)
404
+ ])) : P("", !0)
376
405
  ], 64);
377
406
  }
378
- const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
407
+ const lt = /* @__PURE__ */ he(xe, [["render", ot]]), nt = {
379
408
  key: 0,
380
409
  class: "absolute top-0 left-0 bg-white/90 w-full h-full z-100"
381
- }, ot = { class: "w-full flex justify-end p-4" }, lt = ["for"], nt = {
410
+ }, at = { class: "w-full flex justify-end p-4" }, rt = ["for"], st = {
382
411
  key: 0,
383
412
  class: "text-red-500"
384
- }, at = ["id", "name", "placeholder", "required", "value", "onInput"], rt = ["id", "name", "data-mandatoryCrops", "placeholder", "required", "value", "onInput"], st = ["id", "name", "required", "value", "onInput"], it = ["value"], dt = ["id", "name", "required", "checked", "onChange"], le = /* @__PURE__ */ H({
413
+ }, it = ["id", "name", "placeholder", "required", "value", "onInput"], dt = ["id", "name", "data-mandatoryCrops", "placeholder", "required", "value", "onInput"], ut = ["id", "name", "required", "value", "onInput"], ct = ["value"], mt = ["id", "name", "required", "checked", "onChange"], re = /* @__PURE__ */ H({
385
414
  __name: "FieldsForm",
386
415
  props: {
387
416
  object: {
@@ -398,111 +427,111 @@ const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
398
427
  }
399
428
  },
400
429
  setup(e) {
401
- const o = e, b = (p, f) => {
402
- const c = (o.object.fields || []).find((d) => d.name === p);
403
- c && (c.example_value = f);
430
+ const o = e, g = (x, f) => {
431
+ const u = (o.object.fields || []).find((a) => a.name === x);
432
+ u && (u.example_value = f);
404
433
  };
405
- return (p, f) => (r(), i(A, null, [
406
- e.showForm ? (r(), i("div", tt)) : k("", !0),
434
+ return (x, f) => (s(), i(B, null, [
435
+ e.showForm ? (s(), i("div", nt)) : P("", !0),
407
436
  t("div", {
408
- class: q(e.showForm ? "relative top-0 w-full text-slate-600 border-1 my-2 px-4 pt-2 pb-3 w-full border-slate-200 bg-slate-50 inline-block rounded-lg flex flex-col z-101" : "hidden")
437
+ class: L(e.showForm ? "relative top-0 w-full text-slate-600 border-1 my-2 px-4 pt-2 pb-3 w-full border-slate-200 bg-slate-50 inline-block rounded-lg flex flex-col z-101" : "hidden")
409
438
  }, [
410
- t("div", ot, [
439
+ t("div", at, [
411
440
  t("span", {
412
441
  onClick: f[0] || (f[0] = //@ts-ignore
413
- (...c) => e.toggleShowForm && e.toggleShowForm(...c)),
442
+ (...u) => e.toggleShowForm && e.toggleShowForm(...u)),
414
443
  class: "cursor-pointer hover:scale-125 transition-all duration-300"
415
444
  }, "❌")
416
445
  ]),
417
446
  t("form", null, [
418
- (r(!0), i(A, null, N(e.object.fields, (c, d) => (r(), i("div", {
419
- key: d,
447
+ (s(!0), i(B, null, V(e.object.fields, (u, a) => (s(), i("div", {
448
+ key: a,
420
449
  class: "mb-4"
421
450
  }, [
422
451
  t("label", {
423
- for: `${e.object.id}-${c.name}-${d}`,
452
+ for: `${e.object.id}-${u.name}-${a}`,
424
453
  class: "block text-sm font-medium mb-1"
425
454
  }, [
426
- E(v(c.label) + " ", 1),
427
- c.mandatory ? (r(), i("span", nt, "*")) : k("", !0)
428
- ], 8, lt),
429
- c.type === "text" ? (r(), i("input", {
455
+ T(p(u.label) + " ", 1),
456
+ u.mandatory ? (s(), i("span", st, "*")) : P("", !0)
457
+ ], 8, rt),
458
+ u.type === "text" ? (s(), i("input", {
430
459
  key: 0,
431
- id: `${e.object.id}-${c.name}-${d}`,
432
- name: `${e.object.id}-${c.name}-${d}`,
460
+ id: `${e.object.id}-${u.name}-${a}`,
461
+ name: `${e.object.id}-${u.name}-${a}`,
433
462
  type: "text",
434
463
  class: "w-full px-3 py-2 border border-slate-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-400",
435
- placeholder: c.label,
436
- required: c.mandatory,
437
- value: c.example_value,
438
- onInput: (m) => b(c.name, m.target.value)
439
- }, null, 40, at)) : k("", !0),
440
- c.type === "image" ? (r(), i("input", {
464
+ placeholder: u.label,
465
+ required: u.mandatory,
466
+ value: u.example_value,
467
+ onInput: (b) => g(u.name, b.target.value)
468
+ }, null, 40, it)) : P("", !0),
469
+ u.type === "image" ? (s(), i("input", {
441
470
  key: 1,
442
- id: `${e.object.id}-${c.name}-${d}`,
443
- name: `${e.object.id}-${c.name}-${d}`,
444
- "data-mandatoryCrops": c.image_cuts ? JSON.stringify(c.image_cuts) : null,
471
+ id: `${e.object.id}-${u.name}-${a}`,
472
+ name: `${e.object.id}-${u.name}-${a}`,
473
+ "data-mandatoryCrops": u.image_cuts ? JSON.stringify(u.image_cuts) : null,
445
474
  type: "text",
446
475
  class: "js-limbo w-full px-3 py-2 border border-slate-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-400",
447
- placeholder: c.label,
448
- required: c.mandatory,
449
- value: c.example_value,
450
- onInput: (m) => b(c.name, m.target.value)
451
- }, null, 40, rt)) : c.type === "textArea" ? (r(), re(G(ve), {
476
+ placeholder: u.label,
477
+ required: u.mandatory,
478
+ value: u.example_value,
479
+ onInput: (b) => g(u.name, b.target.value)
480
+ }, null, 40, dt)) : u.type === "textArea" ? (s(), ie(G(ve), {
452
481
  key: 2,
453
482
  theme: "snow",
454
- id: `${e.object.id}-${c.name}-${d}`,
455
- name: `${e.object.id}-${c.name}-${d}`,
483
+ id: `${e.object.id}-${u.name}-${a}`,
484
+ name: `${e.object.id}-${u.name}-${a}`,
456
485
  rows: "3",
457
486
  class: "w-full px-3 py-2 border border-slate-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-400 z-9999",
458
- placeholder: c.label,
459
- required: c.mandatory,
460
- "onUpdate:content": (m) => {
461
- b(c.name, m);
487
+ placeholder: u.label,
488
+ required: u.mandatory,
489
+ "onUpdate:content": (b) => {
490
+ g(u.name, b);
462
491
  },
463
- content: c.example_value,
464
- modelValue: c.example_value,
465
- "onUpdate:modelValue": (m) => c.example_value = m,
492
+ content: u.example_value,
493
+ modelValue: u.example_value,
494
+ "onUpdate:modelValue": (b) => u.example_value = b,
466
495
  contentType: "html"
467
- }, null, 8, ["id", "name", "placeholder", "required", "onUpdate:content", "content", "modelValue", "onUpdate:modelValue"])) : c.type === "select" ? (r(), i("select", {
496
+ }, null, 8, ["id", "name", "placeholder", "required", "onUpdate:content", "content", "modelValue", "onUpdate:modelValue"])) : u.type === "select" ? (s(), i("select", {
468
497
  key: 3,
469
- id: `${e.object.id}-${c.name}-${d}`,
470
- name: `${e.object.id}-${c.name}-${d}`,
498
+ id: `${e.object.id}-${u.name}-${a}`,
499
+ name: `${e.object.id}-${u.name}-${a}`,
471
500
  class: "w-full px-3 py-2 border border-slate-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-400",
472
- required: c.mandatory,
473
- value: c.example_value,
474
- onInput: (m) => b(c.name, m.target.value)
501
+ required: u.mandatory,
502
+ value: u.example_value,
503
+ onInput: (b) => g(u.name, b.target.value)
475
504
  }, [
476
505
  f[1] || (f[1] = t("option", {
477
506
  disabled: "",
478
507
  value: ""
479
508
  }, "Seleccione una opción", -1)),
480
- (r(!0), i(A, null, N(c.options || [], (m, x) => (r(), i("option", {
481
- key: x,
482
- value: m
483
- }, v(m), 9, it))), 128))
484
- ], 40, st)) : c.type === "boolean" ? (r(), i("input", {
509
+ (s(!0), i(B, null, V(u.options || [], (b, C) => (s(), i("option", {
510
+ key: C,
511
+ value: b
512
+ }, p(b), 9, ct))), 128))
513
+ ], 40, ut)) : u.type === "boolean" ? (s(), i("input", {
485
514
  key: 4,
486
- id: `${e.object.id}-${c.name}-${d}`,
487
- name: `${e.object.id}-${c.name}-${d}`,
515
+ id: `${e.object.id}-${u.name}-${a}`,
516
+ name: `${e.object.id}-${u.name}-${a}`,
488
517
  type: "checkbox",
489
518
  class: "h-4 w-4 text-blue-600 focus:ring-blue-500 border-slate-300 rounded inline-block",
490
- required: c.mandatory,
491
- checked: c.example_value,
492
- onChange: (m) => b(c.name, m.target.checked)
493
- }, null, 40, dt)) : k("", !0)
519
+ required: u.mandatory,
520
+ checked: u.example_value,
521
+ onChange: (b) => g(u.name, b.target.checked)
522
+ }, null, 40, mt)) : P("", !0)
494
523
  ]))), 128))
495
524
  ])
496
525
  ], 2)
497
526
  ], 64));
498
527
  }
499
- }), ut = { class: "space-y-4" }, ct = ["disabled"], mt = ["value"], bt = { class: "space-y-3" }, gt = {
528
+ }), bt = { class: "space-y-4" }, gt = ["disabled"], ft = ["value"], pt = { class: "space-y-3" }, vt = {
500
529
  key: 0,
501
530
  class: "overflow-y-auto space-y-3"
502
- }, ft = { class: "block text-sm font-semibold text-slate-600 mb-2" }, vt = ["onChange", "disabled"], pt = ["value"], xt = ["onChange", "disabled"], ht = ["onInput", "disabled", "placeholder"], wt = ["disabled"], yt = {
531
+ }, xt = { class: "block text-sm font-semibold text-slate-600 mb-2" }, ht = ["onChange", "disabled"], wt = ["value"], yt = ["onChange", "disabled"], Ct = ["onInput", "disabled", "placeholder"], $t = ["disabled"], kt = {
503
532
  key: 0,
504
533
  class: "animate-spin"
505
- }, Ct = { key: 1 }, $t = /* @__PURE__ */ H({
534
+ }, St = { key: 1 }, Pt = /* @__PURE__ */ H({
506
535
  __name: "SourceFilter",
507
536
  props: {
508
537
  onSubmit: {
@@ -519,13 +548,13 @@ const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
519
548
  }
520
549
  },
521
550
  setup(e) {
522
- const o = e, b = $(!1), p = $(null), f = $({}), c = X(() => {
523
- const s = o.isProduction;
551
+ const o = e, g = S(!1), x = S(null), f = S({}), u = K(() => {
552
+ const r = o.isProduction;
524
553
  return [
525
554
  {
526
555
  id: "origen1",
527
556
  name: "El Derecho",
528
- apiUrl: s ? "https://elderecho.com/feed" : "https://led-dev-elderecho-dev.eu.els.local/feed",
557
+ apiUrl: r ? "https://elderecho.com/feed" : "https://led-dev-elderecho-dev.eu.els.local/feed",
529
558
  filters: [
530
559
  { id: "title", label: "Título del Post", type: "text" },
531
560
  { id: "category", label: "Slug de la Categoría", type: "text" },
@@ -539,7 +568,7 @@ const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
539
568
  {
540
569
  id: "origen2",
541
570
  name: "Formación",
542
- apiUrl: s ? "https://lefebvre.es/formacion/feed" : "http://led-dev-lefebvre-dev.eu.els.local/formacion/feed",
571
+ apiUrl: r ? "https://lefebvre.es/formacion/feed" : "http://led-dev-lefebvre-dev.eu.els.local/formacion/feed",
543
572
  filters: [
544
573
  { id: "id", label: "ID del curso", type: "text" },
545
574
  { id: "title", label: "Título del Post", type: "text" },
@@ -551,152 +580,152 @@ const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
551
580
  {
552
581
  id: "origen3",
553
582
  name: "Derecholocal",
554
- apiUrl: s ? "https://derecholocal.es/feed" : "https://led-dev-derecholocal-dev.eu.els.local/feed",
583
+ apiUrl: r ? "https://derecholocal.es/feed" : "https://led-dev-derecholocal-dev.eu.els.local/feed",
555
584
  filters: []
556
585
  },
557
586
  {
558
587
  id: "origen4",
559
588
  name: "EspacioAsesoría",
560
- apiUrl: s ? "https://espacioasesoria.com/feed" : "https://led-dev-espacioasesoria-dev.eu.els.local/feed",
589
+ apiUrl: r ? "https://espacioasesoria.com/feed" : "https://led-dev-espacioasesoria-dev.eu.els.local/feed",
561
590
  filters: []
562
591
  },
563
592
  {
564
593
  id: "origen5",
565
594
  name: "EspacioPymes",
566
- apiUrl: s ? "https://espaciopymes.com/feed" : "https://led-dev-espaciopymes-dev.eu.els.local/feed",
595
+ apiUrl: r ? "https://espaciopymes.com/feed" : "https://led-dev-espaciopymes-dev.eu.els.local/feed",
567
596
  filters: []
568
597
  }
569
598
  ];
570
- }), d = X(() => {
571
- if (!p.value)
599
+ }), a = K(() => {
600
+ if (!x.value)
572
601
  return [];
573
- const s = c.value.find((l) => l.id === p.value);
574
- return s ? s.filters : [];
575
- }), m = (s, l) => {
576
- f.value[s] = l;
577
- }, x = () => {
602
+ const r = u.value.find((l) => l.id === x.value);
603
+ return r ? r.filters : [];
604
+ }), b = (r, l) => {
605
+ f.value[r] = l;
606
+ }, C = () => {
578
607
  f.value = {};
579
- }, F = async () => {
580
- b.value = !0;
581
- const s = c.value.find((n) => n.id === p.value);
582
- if (!s) {
583
- console.error("Origen no encontrado"), b.value = !1;
608
+ }, I = async () => {
609
+ g.value = !0;
610
+ const r = u.value.find((n) => n.id === x.value);
611
+ if (!r) {
612
+ console.error("Origen no encontrado"), g.value = !1;
584
613
  return;
585
614
  }
586
- const l = new URL(s.apiUrl);
615
+ const l = new URL(r.apiUrl);
587
616
  Object.keys(f.value).forEach((n) => {
588
617
  f.value[n] && l.searchParams.append(n, f.value[n]);
589
618
  });
590
619
  try {
591
- const g = await (await fetch(l.toString(), {
620
+ const m = await (await fetch(l.toString(), {
592
621
  method: "GET",
593
622
  headers: {
594
623
  Accept: "text/xml, application/xml"
595
624
  }
596
- })).text(), D = new DOMParser().parseFromString(g, "text/xml"), T = Array.from(D.querySelectorAll("item")).map((a) => {
597
- const u = {};
598
- return Array.from(a.children).forEach((h) => {
599
- h.children.length > 0 ? Array.from(h.children).forEach((j) => {
600
- const I = `${h.nodeName}_${j.nodeName}`;
601
- u[I] = j.textContent || "";
602
- }) : u[h.nodeName] = h.textContent || "";
603
- }), u;
625
+ })).text(), A = new DOMParser().parseFromString(m, "text/xml"), w = Array.from(A.querySelectorAll("item")).map((d) => {
626
+ const c = {};
627
+ return Array.from(d.children).forEach(($) => {
628
+ $.children.length > 0 ? Array.from($.children).forEach((j) => {
629
+ const D = `${$.nodeName}_${j.nodeName}`;
630
+ c[D] = j.textContent || "";
631
+ }) : c[$.nodeName] = $.textContent || "";
632
+ }), c;
604
633
  });
605
- o.onSubmit(T);
634
+ o.onSubmit(w);
606
635
  } catch (n) {
607
636
  console.error("Error al aplicar filtros:", n), o.onSubmit([]);
608
637
  } finally {
609
638
  const n = {
610
- name: s.name,
639
+ name: r.name,
611
640
  url: l.toString()
612
641
  };
613
- o.updateFeedCriteria(n), b.value = !1;
642
+ o.updateFeedCriteria(n), g.value = !1;
614
643
  }
615
644
  };
616
- return (s, l) => (r(), i("div", ut, [
645
+ return (r, l) => (s(), i("div", bt, [
617
646
  t("div", null, [
618
647
  l[1] || (l[1] = t("label", { class: "block text-sm font-semibold text-slate-600 mb-2" }, "Seleccionar origen:", -1)),
619
648
  R(t("select", {
620
- "onUpdate:modelValue": l[0] || (l[0] = (n) => p.value = n),
649
+ "onUpdate:modelValue": l[0] || (l[0] = (n) => x.value = n),
621
650
  class: "w-full px-3 py-2.5 bg-white border border-slate-200 rounded-lg shadow-sm focus:border-emerald-400 focus:ring-2 focus:ring-emerald-500/20 transition-all duration-200 disabled:bg-slate-100 disabled:cursor-not-allowed cursor-pointer",
622
- onChange: x,
623
- disabled: b.value
651
+ onChange: C,
652
+ disabled: g.value
624
653
  }, [
625
- (r(!0), i(A, null, N(c.value, (n) => (r(), i("option", {
654
+ (s(!0), i(B, null, V(u.value, (n) => (s(), i("option", {
626
655
  key: n.id,
627
656
  value: n.id
628
- }, v(n.name), 9, mt))), 128))
629
- ], 40, ct), [
630
- [J, p.value]
657
+ }, p(n.name), 9, ft))), 128))
658
+ ], 40, gt), [
659
+ [J, x.value]
631
660
  ])
632
661
  ]),
633
- t("div", bt, [
634
- d.value.length > 0 ? (r(), i("div", gt, [
635
- (r(!0), i(A, null, N(d.value, (n) => (r(), i("div", {
662
+ t("div", pt, [
663
+ a.value.length > 0 ? (s(), i("div", vt, [
664
+ (s(!0), i(B, null, V(a.value, (n) => (s(), i("div", {
636
665
  key: n.id,
637
666
  class: "bg-gradient-to-br from-slate-50 to-white p-4 rounded-xl border border-slate-200"
638
667
  }, [
639
- t("label", ft, v(n.label) + ":", 1),
640
- n.type === "select" ? (r(), i("select", {
668
+ t("label", xt, p(n.label) + ":", 1),
669
+ n.type === "select" ? (s(), i("select", {
641
670
  key: 0,
642
671
  class: "w-full px-3 py-2.5 bg-white border border-slate-200 rounded-lg shadow-sm focus:border-emerald-400 focus:ring-2 focus:ring-emerald-500/20 transition-all duration-200 disabled:bg-slate-100 disabled:cursor-not-allowed cursor-pointer",
643
- onChange: (g) => m(n.id, g.target.value),
644
- disabled: b.value
672
+ onChange: (m) => b(n.id, m.target.value),
673
+ disabled: g.value
645
674
  }, [
646
675
  l[2] || (l[2] = t("option", { value: "" }, "Seleccionar...", -1)),
647
- (r(!0), i(A, null, N(n.options, (g) => (r(), i("option", {
648
- key: g,
649
- value: g
650
- }, v(g), 9, pt))), 128))
651
- ], 40, vt)) : n.type === "date" ? (r(), i("input", {
676
+ (s(!0), i(B, null, V(n.options, (m) => (s(), i("option", {
677
+ key: m,
678
+ value: m
679
+ }, p(m), 9, wt))), 128))
680
+ ], 40, ht)) : n.type === "date" ? (s(), i("input", {
652
681
  key: 1,
653
682
  type: "date",
654
683
  class: "w-full px-3 py-2.5 bg-white border border-slate-200 rounded-lg shadow-sm focus:border-emerald-400 focus:ring-2 focus:ring-emerald-500/20 transition-all duration-200 disabled:bg-slate-100 disabled:cursor-not-allowed",
655
- onChange: (g) => m(n.id, g.target.value),
656
- disabled: b.value
657
- }, null, 40, xt)) : n.type === "text" ? (r(), i("input", {
684
+ onChange: (m) => b(n.id, m.target.value),
685
+ disabled: g.value
686
+ }, null, 40, yt)) : n.type === "text" ? (s(), i("input", {
658
687
  key: 2,
659
688
  type: "text",
660
689
  class: "w-full px-3 py-2.5 bg-white border border-slate-200 rounded-lg shadow-sm focus:border-emerald-400 focus:ring-2 focus:ring-emerald-500/20 transition-all duration-200 disabled:bg-slate-100 disabled:cursor-not-allowed",
661
- onInput: (g) => m(n.id, g.target.value),
662
- disabled: b.value,
690
+ onInput: (m) => b(n.id, m.target.value),
691
+ disabled: g.value,
663
692
  placeholder: n.label
664
- }, null, 40, ht)) : k("", !0)
693
+ }, null, 40, Ct)) : P("", !0)
665
694
  ]))), 128))
666
- ])) : k("", !0),
695
+ ])) : P("", !0),
667
696
  t("button", {
668
- onClick: F,
697
+ onClick: I,
669
698
  class: "cursor-pointer w-full bg-gradient-to-r from-emerald-500 to-teal-500 text-white font-semibold px-4 py-3 rounded-xl shadow-md hover:from-emerald-600 hover:to-teal-600 hover:shadow-lg transform hover:-translate-y-0.5 transition-all duration-200 disabled:from-slate-300 disabled:to-slate-400 disabled:cursor-not-allowed disabled:transform-none disabled:shadow-none flex items-center justify-center gap-2",
670
- disabled: b.value
699
+ disabled: g.value
671
700
  }, [
672
- b.value ? (r(), i("span", yt, "⏳")) : (r(), i("span", Ct, "🔍")),
673
- E(" " + v(b.value ? "Conectando con el feed..." : "Aplicar Filtros"), 1)
674
- ], 8, wt)
701
+ g.value ? (s(), i("span", kt, "⏳")) : (s(), i("span", St, "🔍")),
702
+ T(" " + p(g.value ? "Conectando con el feed..." : "Aplicar Filtros"), 1)
703
+ ], 8, $t)
675
704
  ])
676
705
  ]));
677
706
  }
678
- }), kt = { class: "fixed top-0 left-0 w-full h-full bg-gradient-to-br from-slate-50 via-white to-slate-100 flex flex-col z-9999 p-6" }, St = { class: "w-full flex justify-between items-center mb-4" }, Ft = { class: "w-full flex-1 bg-white/60 rounded-2xl flex gap-5 p-5 overflow-hidden backdrop-blur-sm border border-slate-200 shadow-inner" }, Pt = { class: "flex-1 flex flex-col gap-5" }, jt = { class: "flex flex-col bg-white rounded-2xl shadow-lg border border-slate-200 p-5 overflow-y-auto" }, Mt = {
707
+ }), Ft = { class: "fixed top-0 left-0 w-full h-full bg-gradient-to-br from-slate-50 via-white to-slate-100 flex flex-col z-9999 p-6" }, jt = { class: "w-full flex justify-between items-center mb-4" }, It = { class: "w-full flex-1 bg-white/60 rounded-2xl flex gap-5 p-5 overflow-hidden backdrop-blur-sm border border-slate-200 shadow-inner" }, Mt = { class: "flex-1 flex flex-col gap-5" }, At = { class: "flex flex-col bg-white rounded-2xl shadow-lg border border-slate-200 p-5 overflow-y-auto" }, Bt = {
679
708
  key: 0,
680
709
  class: "mb-4 p-4 bg-gradient-to-br from-emerald-50 to-teal-50 rounded-xl border border-emerald-200 w-full flex-shrink-0 text-sm font-medium text-emerald-700"
681
- }, It = { class: "list-none mt-3 space-y-2 text-slate-600" }, At = { class: "flex items-start gap-2" }, Tt = { class: "font-semibold text-slate-700" }, Bt = { class: "flex items-start gap-2" }, Et = { class: "font-semibold text-slate-700" }, Dt = { class: "font-semibold text-slate-700" }, Ot = { class: "flex items-start gap-2" }, Rt = { class: "flex flex-wrap gap-2 mt-1" }, Nt = { class: "font-semibold text-slate-700" }, Vt = { class: "text-emerald-600" }, Ut = { class: "flex flex-col gap-4 w-full" }, zt = { class: "flex items-center gap-3 cursor-pointer group" }, Lt = {
710
+ }, Et = { class: "list-none mt-3 space-y-2 text-slate-600" }, Tt = { class: "flex items-start gap-2" }, Dt = { class: "font-semibold text-slate-700" }, Ot = { class: "flex items-start gap-2" }, Rt = { class: "font-semibold text-slate-700" }, Nt = { class: "font-semibold text-slate-700" }, Vt = { class: "flex items-start gap-2" }, Ut = { class: "flex flex-wrap gap-2 mt-1" }, zt = { class: "font-semibold text-slate-700" }, qt = { class: "text-emerald-600" }, Lt = { class: "flex flex-col gap-4 w-full" }, Gt = { class: "flex items-center gap-3 cursor-pointer group" }, Jt = {
682
711
  key: 0,
683
712
  class: "flex flex-col gap-4 ml-8 p-4 bg-gradient-to-br from-slate-50 to-white rounded-xl border border-slate-200"
684
- }, qt = { class: "flex flex-col gap-2" }, Gt = { class: "flex flex-col gap-2" }, Jt = { class: "flex-1 flex flex-col bg-white rounded-2xl shadow-lg border border-slate-200 p-5 overflow-y-auto" }, Ht = { class: "flex-1 flex flex-col bg-white rounded-2xl shadow-lg border border-slate-200 p-5 overflow-y-auto" }, Wt = {
713
+ }, Ht = { class: "flex flex-col gap-2" }, Wt = { class: "flex flex-col gap-2" }, Yt = { class: "flex-1 flex flex-col bg-white rounded-2xl shadow-lg border border-slate-200 p-5 overflow-y-auto" }, Kt = { class: "flex-1 flex flex-col bg-white rounded-2xl shadow-lg border border-slate-200 p-5 overflow-y-auto" }, Qt = {
685
714
  key: 0,
686
715
  class: "flex-1 flex flex-col items-center justify-center text-slate-400"
687
- }, Qt = {
716
+ }, Xt = {
688
717
  key: 1,
689
718
  class: "space-y-3"
690
- }, Xt = ["onClick"], Yt = { class: "font-bold text-slate-800 mb-2" }, Zt = { class: "text-sm text-slate-600 line-clamp-2" }, Kt = { class: "flex-1 flex flex-col bg-white rounded-2xl shadow-lg border border-slate-200 p-5 overflow-y-auto" }, _t = {
719
+ }, Zt = ["onClick"], _t = { class: "font-bold text-slate-800 mb-2" }, eo = { class: "text-sm text-slate-600 line-clamp-2" }, to = { class: "flex-1 flex flex-col bg-white rounded-2xl shadow-lg border border-slate-200 p-5 overflow-y-auto" }, oo = {
691
720
  key: 0,
692
721
  class: "flex-1 flex flex-col items-center justify-center text-slate-400"
693
- }, eo = {
722
+ }, lo = {
694
723
  key: 1,
695
724
  class: "space-y-3"
696
- }, to = { class: "block text-sm font-bold text-slate-700 mb-2 flex items-center gap-2" }, oo = ["onUpdate:modelValue"], lo = ["value"], no = {
725
+ }, no = { class: "block text-sm font-bold text-slate-700 mb-2 flex items-center gap-2" }, ao = ["onUpdate:modelValue"], ro = ["value"], so = {
697
726
  key: 0,
698
727
  class: "mt-3 p-3 bg-gradient-to-br from-emerald-50 to-teal-50 rounded-lg border border-emerald-200"
699
- }, ao = { class: "mt-1 text-sm font-medium text-slate-700 break-words" }, ro = /* @__PURE__ */ H({
728
+ }, io = { class: "mt-1 text-sm font-medium text-slate-700 break-words" }, uo = /* @__PURE__ */ H({
700
729
  __name: "FeedComponent",
701
730
  props: {
702
731
  object: {
@@ -717,274 +746,274 @@ const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
717
746
  }
718
747
  },
719
748
  setup(e) {
720
- const o = e, b = $(null), p = $(null), f = $(!1), c = $(1), d = $("horizontal"), m = $({}), x = $(null), F = (T) => {
721
- b.value = T;
722
- }, s = (T) => {
723
- p.value = T;
749
+ const o = e, g = S(null), x = S(null), f = S(!1), u = S(1), a = S("horizontal"), b = S({}), C = S(null), I = (w) => {
750
+ g.value = w;
751
+ }, r = (w) => {
752
+ x.value = w;
724
753
  }, l = () => {
725
- const T = o.object.fields.filter((a) => a.mappedTo).map((a) => {
726
- var u;
754
+ const w = o.object.fields.filter((d) => d.mappedTo).map((d) => {
755
+ var c;
727
756
  return {
728
- fieldName: a.name,
729
- mappedTo: a.mappedTo,
730
- value: ((u = p.value) == null ? void 0 : u[a.mappedTo]) ?? null
757
+ fieldName: d.name,
758
+ mappedTo: d.mappedTo,
759
+ value: ((c = x.value) == null ? void 0 : c[d.mappedTo]) ?? null
731
760
  };
732
761
  });
733
- x.value = {
734
- ...m.value,
762
+ C.value = {
763
+ ...b.value,
735
764
  dynamicUpdate: f.value,
736
- elementCount: c.value,
737
- orientation: d.value,
738
- mapping: T.map(({ fieldName: a, mappedTo: u }) => ({ fieldName: a, mappedTo: u }))
739
- }, o.updateObjectByFeedContent && o.updateObjectByFeedContent(T, x.value), o.toggleFeedSection();
740
- }, n = (T) => {
741
- m.value = T;
742
- }, g = () => {
743
- var T;
744
- (T = o.object) != null && T.repeat_data && (x.value = o.object.repeat_data, f.value = o.object.repeat_data.dynamicUpdate || !1, c.value = o.object.repeat_data.elementCount || 1, d.value = o.object.repeat_data.orientation || "horizontal", m.value = {
765
+ elementCount: u.value,
766
+ orientation: a.value,
767
+ mapping: w.map(({ fieldName: d, mappedTo: c }) => ({ fieldName: d, mappedTo: c }))
768
+ }, o.updateObjectByFeedContent && o.updateObjectByFeedContent(w, C.value), o.toggleFeedSection();
769
+ }, n = (w) => {
770
+ b.value = w;
771
+ }, m = () => {
772
+ var w;
773
+ (w = o.object) != null && w.repeat_data && (C.value = o.object.repeat_data, f.value = o.object.repeat_data.dynamicUpdate || !1, u.value = o.object.repeat_data.elementCount || 1, a.value = o.object.repeat_data.orientation || "horizontal", b.value = {
745
774
  name: o.object.repeat_data.name,
746
775
  url: o.object.repeat_data.url
747
776
  });
748
- }, S = () => {
749
- x.value = null, f.value = !1, c.value = 1, d.value = "horizontal", m.value = {}, o.updateObjectByFeedContent && o.updateObjectByFeedContent([], null);
750
- }, D = () => {
751
- var T;
752
- x.value && (x.value = {
753
- ...x.value,
777
+ }, k = () => {
778
+ C.value = null, f.value = !1, u.value = 1, a.value = "horizontal", b.value = {}, o.updateObjectByFeedContent && o.updateObjectByFeedContent([], null);
779
+ }, A = () => {
780
+ var w;
781
+ C.value && (C.value = {
782
+ ...C.value,
754
783
  dynamicUpdate: f.value,
755
- elementCount: c.value,
756
- orientation: d.value
757
- }, o.updateObjectByFeedContent && o.updateObjectByFeedContent(((T = x.value.mapping) == null ? void 0 : T.map((a) => ({
758
- fieldName: a.fieldName,
759
- mappedTo: a.mappedTo,
784
+ elementCount: u.value,
785
+ orientation: a.value
786
+ }, o.updateObjectByFeedContent && o.updateObjectByFeedContent(((w = C.value.mapping) == null ? void 0 : w.map((d) => ({
787
+ fieldName: d.fieldName,
788
+ mappedTo: d.mappedTo,
760
789
  value: null
761
- }))) || [], x.value));
790
+ }))) || [], C.value));
762
791
  };
763
- return te(() => {
764
- g();
765
- }), (T, a) => (r(), i("div", kt, [
766
- t("div", St, [
767
- a[5] || (a[5] = t("h2", { class: "text-2xl font-bold bg-gradient-to-r from-slate-700 to-slate-500 bg-clip-text text-transparent flex items-center gap-3" }, [
792
+ return le(() => {
793
+ m();
794
+ }), (w, d) => (s(), i("div", Ft, [
795
+ t("div", jt, [
796
+ d[5] || (d[5] = t("h2", { class: "text-2xl font-bold bg-gradient-to-r from-slate-700 to-slate-500 bg-clip-text text-transparent flex items-center gap-3" }, [
768
797
  t("span", { class: "text-3xl" }, "🍺"),
769
- E(" Configuración de Feed ")
798
+ T(" Configuración de Feed ")
770
799
  ], -1)),
771
800
  t("button", {
772
- onClick: a[0] || (a[0] = //@ts-ignore
773
- (...u) => e.toggleFeedSection && e.toggleFeedSection(...u)),
801
+ onClick: d[0] || (d[0] = //@ts-ignore
802
+ (...c) => e.toggleFeedSection && e.toggleFeedSection(...c)),
774
803
  class: "cursor-pointer group w-10 h-10 flex items-center justify-center bg-white hover:bg-red-50 border border-red-200 hover:border-red-400 text-red-400 hover:text-red-600 rounded-full font-semibold shadow-sm hover:shadow-lg transition-all duration-200"
775
- }, [...a[4] || (a[4] = [
804
+ }, [...d[4] || (d[4] = [
776
805
  t("span", { class: "text-lg" }, "✕", -1)
777
806
  ])])
778
807
  ]),
779
- t("div", Ft, [
780
- t("div", Pt, [
781
- t("div", jt, [
782
- x.value && x.value.dynamicUpdate ? (r(), i("div", Mt, [
808
+ t("div", It, [
809
+ t("div", Mt, [
810
+ t("div", At, [
811
+ C.value && C.value.dynamicUpdate ? (s(), i("div", Bt, [
783
812
  t("div", { class: "flex justify-between items-start" }, [
784
- a[8] || (a[8] = t("p", { class: "flex items-center gap-2" }, [
813
+ d[8] || (d[8] = t("p", { class: "flex items-center gap-2" }, [
785
814
  t("span", { class: "text-emerald-500" }, "✓"),
786
- E(" Hay un criterio de feed establecido: ")
815
+ T(" Hay un criterio de feed establecido: ")
787
816
  ], -1)),
788
817
  t("div", { class: "flex items-center gap-2" }, [
789
818
  t("button", {
790
- onClick: D,
819
+ onClick: A,
791
820
  class: "cursor-pointer px-3 py-1.5 bg-white hover:bg-emerald-50 text-emerald-500 hover:text-emerald-600 border border-emerald-200 hover:border-emerald-300 rounded-lg text-xs font-semibold transition-all duration-200 flex items-center gap-1 shadow-sm"
792
- }, [...a[6] || (a[6] = [
821
+ }, [...d[6] || (d[6] = [
793
822
  t("span", null, "💾", -1),
794
- E(" Guardar ", -1)
823
+ T(" Guardar ", -1)
795
824
  ])]),
796
825
  t("button", {
797
- onClick: S,
826
+ onClick: k,
798
827
  class: "cursor-pointer px-3 py-1.5 bg-white hover:bg-red-50 text-red-500 hover:text-red-600 border border-red-200 hover:border-red-300 rounded-lg text-xs font-semibold transition-all duration-200 flex items-center gap-1 shadow-sm"
799
- }, [...a[7] || (a[7] = [
828
+ }, [...d[7] || (d[7] = [
800
829
  t("span", null, "✕", -1),
801
- E(" Borrar ", -1)
830
+ T(" Borrar ", -1)
802
831
  ])])
803
832
  ])
804
833
  ]),
805
- t("ul", It, [
806
- t("li", At, [
807
- a[9] || (a[9] = t("span", { class: "text-emerald-400" }, "→", -1)),
808
- a[10] || (a[10] = E(" Conectar con ", -1)),
809
- t("span", Tt, v(x.value.name), 1)
810
- ]),
811
- t("li", Bt, [
812
- a[11] || (a[11] = t("span", { class: "text-emerald-400" }, "→", -1)),
813
- a[12] || (a[12] = E(" Recuperar ", -1)),
814
- t("span", Et, v(x.value.elementCount), 1),
815
- a[13] || (a[13] = E(" items (", -1)),
816
- t("span", Dt, v(x.value.orientation), 1),
817
- a[14] || (a[14] = E(")", -1))
834
+ t("ul", Et, [
835
+ t("li", Tt, [
836
+ d[9] || (d[9] = t("span", { class: "text-emerald-400" }, "→", -1)),
837
+ d[10] || (d[10] = T(" Conectar con ", -1)),
838
+ t("span", Dt, p(C.value.name), 1)
818
839
  ]),
819
840
  t("li", Ot, [
820
- a[17] || (a[17] = t("span", { class: "text-emerald-400" }, "→", -1)),
841
+ d[11] || (d[11] = t("span", { class: "text-emerald-400" }, "→", -1)),
842
+ d[12] || (d[12] = T(" Recuperar ", -1)),
843
+ t("span", Rt, p(C.value.elementCount), 1),
844
+ d[13] || (d[13] = T(" items (", -1)),
845
+ t("span", Nt, p(C.value.orientation), 1),
846
+ d[14] || (d[14] = T(")", -1))
847
+ ]),
848
+ t("li", Vt, [
849
+ d[17] || (d[17] = t("span", { class: "text-emerald-400" }, "→", -1)),
821
850
  t("div", null, [
822
- a[16] || (a[16] = E(" Mapeo: ", -1)),
823
- t("div", Rt, [
824
- (r(!0), i(A, null, N(x.value.mapping, (u, h) => (r(), i("span", {
825
- key: h,
851
+ d[16] || (d[16] = T(" Mapeo: ", -1)),
852
+ t("div", Ut, [
853
+ (s(!0), i(B, null, V(C.value.mapping, (c, $) => (s(), i("span", {
854
+ key: $,
826
855
  class: "inline-flex items-center gap-1 px-2 py-0.5 bg-white rounded-full text-xs border border-slate-200"
827
856
  }, [
828
- t("span", Nt, v(u.fieldName), 1),
829
- a[15] || (a[15] = t("span", { class: "text-slate-400" }, "←", -1)),
830
- t("span", Vt, v(u.mappedTo), 1)
857
+ t("span", zt, p(c.fieldName), 1),
858
+ d[15] || (d[15] = t("span", { class: "text-slate-400" }, "←", -1)),
859
+ t("span", qt, p(c.mappedTo), 1)
831
860
  ]))), 128))
832
861
  ])
833
862
  ])
834
863
  ])
835
864
  ])
836
- ])) : k("", !0),
837
- t("div", Ut, [
838
- t("label", zt, [
865
+ ])) : P("", !0),
866
+ t("div", Lt, [
867
+ t("label", Gt, [
839
868
  R(t("input", {
840
869
  type: "checkbox",
841
- "onUpdate:modelValue": a[1] || (a[1] = (u) => f.value = u),
870
+ "onUpdate:modelValue": d[1] || (d[1] = (c) => f.value = c),
842
871
  class: "w-5 h-5 text-emerald-500 border-2 border-slate-300 rounded focus:ring-emerald-500 cursor-pointer"
843
872
  }, null, 512), [
844
- [ae, f.value]
873
+ [te, f.value]
845
874
  ]),
846
- a[18] || (a[18] = t("span", { class: "font-medium text-slate-700 group-hover:text-slate-900 transition-colors" }, "Actualizar dinámicamente según criterios del feed", -1))
875
+ d[18] || (d[18] = t("span", { class: "font-medium text-slate-700 group-hover:text-slate-900 transition-colors" }, "Actualizar dinámicamente según criterios del feed", -1))
847
876
  ]),
848
- f.value ? (r(), i("div", Lt, [
849
- t("div", qt, [
850
- a[19] || (a[19] = t("label", { class: "text-sm font-semibold text-slate-600" }, "Cantidad de elementos:", -1)),
877
+ f.value ? (s(), i("div", Jt, [
878
+ t("div", Ht, [
879
+ d[19] || (d[19] = t("label", { class: "text-sm font-semibold text-slate-600" }, "Cantidad de elementos:", -1)),
851
880
  R(t("input", {
852
881
  type: "number",
853
- "onUpdate:modelValue": a[2] || (a[2] = (u) => c.value = u),
882
+ "onUpdate:modelValue": d[2] || (d[2] = (c) => u.value = c),
854
883
  min: "1",
855
884
  class: "w-32 px-3 py-2 border border-slate-200 rounded-lg focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 transition-colors"
856
885
  }, null, 512), [
857
886
  [
858
- Q,
859
- c.value,
887
+ Y,
888
+ u.value,
860
889
  void 0,
861
890
  { number: !0 }
862
891
  ]
863
892
  ])
864
893
  ]),
865
- t("div", Gt, [
866
- a[21] || (a[21] = t("label", { class: "text-sm font-semibold text-slate-600" }, "Orientación:", -1)),
894
+ t("div", Wt, [
895
+ d[21] || (d[21] = t("label", { class: "text-sm font-semibold text-slate-600" }, "Orientación:", -1)),
867
896
  R(t("select", {
868
- "onUpdate:modelValue": a[3] || (a[3] = (u) => d.value = u),
897
+ "onUpdate:modelValue": d[3] || (d[3] = (c) => a.value = c),
869
898
  class: "w-48 px-3 py-2 border border-slate-200 rounded-lg focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 bg-white transition-colors cursor-pointer"
870
- }, [...a[20] || (a[20] = [
899
+ }, [...d[20] || (d[20] = [
871
900
  t("option", {
872
901
  value: "horizontal",
873
902
  selected: ""
874
903
  }, "Horizontal", -1),
875
904
  t("option", { value: "vertical" }, "Vertical", -1)
876
905
  ])], 512), [
877
- [J, d.value]
906
+ [J, a.value]
878
907
  ])
879
908
  ])
880
- ])) : k("", !0)
909
+ ])) : P("", !0)
881
910
  ])
882
911
  ]),
883
- t("div", Jt, [
884
- a[22] || (a[22] = t("h3", { class: "text-lg font-bold mb-5 text-slate-700 pb-2 flex items-center gap-2 border-b border-slate-100" }, [
912
+ t("div", Yt, [
913
+ d[22] || (d[22] = t("h3", { class: "text-lg font-bold mb-5 text-slate-700 pb-2 flex items-center gap-2 border-b border-slate-100" }, [
885
914
  t("span", { class: "text-xl" }, "🔍"),
886
- E(" Orígenes y Filtros ")
915
+ T(" Orígenes y Filtros ")
887
916
  ], -1)),
888
- L($t, {
889
- onSubmit: F,
917
+ q(Pt, {
918
+ onSubmit: I,
890
919
  updateFeedCriteria: n,
891
920
  isProduction: e.isProduction
892
921
  }, null, 8, ["isProduction"])
893
922
  ])
894
923
  ]),
895
- t("div", Ht, [
896
- a[24] || (a[24] = t("h3", { class: "text-lg font-bold mb-5 text-slate-700 pb-2 flex items-center gap-2 border-b border-slate-100" }, [
924
+ t("div", Kt, [
925
+ d[24] || (d[24] = t("h3", { class: "text-lg font-bold mb-5 text-slate-700 pb-2 flex items-center gap-2 border-b border-slate-100" }, [
897
926
  t("span", { class: "text-xl" }, "📰"),
898
- E(" Noticias ")
927
+ T(" Noticias ")
899
928
  ], -1)),
900
- !b.value || b.value.length === 0 ? (r(), i("div", Wt, [...a[23] || (a[23] = [
929
+ !g.value || g.value.length === 0 ? (s(), i("div", Qt, [...d[23] || (d[23] = [
901
930
  t("span", { class: "text-5xl mb-3 opacity-50" }, "📭", -1),
902
931
  t("p", { class: "text-sm font-medium" }, "No hay noticias disponibles", -1),
903
932
  t("p", { class: "text-xs mt-1 text-slate-300" }, "Selecciona un origen para cargar noticias", -1)
904
- ])])) : (r(), i("ul", Qt, [
905
- (r(!0), i(A, null, N(b.value, (u, h) => (r(), i("li", {
906
- key: h,
933
+ ])])) : (s(), i("ul", Xt, [
934
+ (s(!0), i(B, null, V(g.value, (c, $) => (s(), i("li", {
935
+ key: $,
907
936
  class: "p-4 bg-gradient-to-br from-slate-50 to-white rounded-xl shadow-sm hover:shadow-md cursor-pointer hover:scale-[1.01] transition-all duration-200 border border-slate-200 hover:border-emerald-300",
908
- onClick: (j) => s(u)
937
+ onClick: (j) => r(c)
909
938
  }, [
910
- t("h4", Yt, v(u.title || u.titulo || "Sin título"), 1),
911
- t("p", Zt, v(u.description || u.descripcion || u.content || "Sin descripción"), 1)
912
- ], 8, Xt))), 128))
939
+ t("h4", _t, p(c.title || c.titulo || "Sin título"), 1),
940
+ t("p", eo, p(c.description || c.descripcion || c.content || "Sin descripción"), 1)
941
+ ], 8, Zt))), 128))
913
942
  ]))
914
943
  ]),
915
- t("div", Kt, [
916
- a[30] || (a[30] = t("h3", { class: "text-lg font-bold mb-5 text-slate-700 pb-2 flex items-center gap-2 border-b border-slate-100" }, [
944
+ t("div", to, [
945
+ d[30] || (d[30] = t("h3", { class: "text-lg font-bold mb-5 text-slate-700 pb-2 flex items-center gap-2 border-b border-slate-100" }, [
917
946
  t("span", { class: "text-xl" }, "🔗"),
918
- E(" Relacionar Noticia ")
947
+ T(" Relacionar Noticia ")
919
948
  ], -1)),
920
- p.value ? (r(), i("div", eo, [
921
- (r(!0), i(A, null, N(e.object.fields, (u, h) => (r(), i("div", {
922
- key: h,
949
+ x.value ? (s(), i("div", lo, [
950
+ (s(!0), i(B, null, V(e.object.fields, (c, $) => (s(), i("div", {
951
+ key: $,
923
952
  class: "p-4 bg-gradient-to-br from-slate-50 to-white rounded-xl border border-slate-200"
924
953
  }, [
925
- t("label", to, [
926
- a[26] || (a[26] = t("span", { class: "text-base" }, "⚙️", -1)),
927
- E(" " + v(u.name), 1)
954
+ t("label", no, [
955
+ d[26] || (d[26] = t("span", { class: "text-base" }, "⚙️", -1)),
956
+ T(" " + p(c.name), 1)
928
957
  ]),
929
958
  R(t("select", {
930
- "onUpdate:modelValue": (j) => u.mappedTo = j,
959
+ "onUpdate:modelValue": (j) => c.mappedTo = j,
931
960
  class: "w-full px-3 py-2.5 border border-slate-200 rounded-lg focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 transition-all bg-white cursor-pointer"
932
961
  }, [
933
- a[27] || (a[27] = t("option", { value: "" }, "-- Seleccionar campo --", -1)),
934
- (r(!0), i(A, null, N(p.value, (j, I) => (r(), i("option", {
935
- key: I,
936
- value: I
937
- }, v(I), 9, lo))), 128))
938
- ], 8, oo), [
939
- [J, u.mappedTo]
962
+ d[27] || (d[27] = t("option", { value: "" }, "-- Seleccionar campo --", -1)),
963
+ (s(!0), i(B, null, V(x.value, (j, D) => (s(), i("option", {
964
+ key: D,
965
+ value: D
966
+ }, p(D), 9, ro))), 128))
967
+ ], 8, ao), [
968
+ [J, c.mappedTo]
940
969
  ]),
941
- u.mappedTo ? (r(), i("div", no, [
942
- a[28] || (a[28] = t("span", { class: "text-xs font-semibold text-emerald-600 uppercase tracking-wide" }, "Vista previa:", -1)),
943
- t("p", ao, v(p.value[u.mappedTo]), 1)
944
- ])) : k("", !0)
970
+ c.mappedTo ? (s(), i("div", so, [
971
+ d[28] || (d[28] = t("span", { class: "text-xs font-semibold text-emerald-600 uppercase tracking-wide" }, "Vista previa:", -1)),
972
+ t("p", io, p(x.value[c.mappedTo]), 1)
973
+ ])) : P("", !0)
945
974
  ]))), 128)),
946
975
  t("button", {
947
976
  onClick: l,
948
977
  class: "cursor-pointer w-full mt-4 px-5 py-3 bg-gradient-to-r from-emerald-500 to-teal-500 hover:from-emerald-600 hover:to-teal-600 text-white font-semibold rounded-xl shadow-md hover:shadow-lg transition-all duration-200 transform hover:scale-[1.01] flex items-center justify-center gap-2"
949
- }, [...a[29] || (a[29] = [
978
+ }, [...d[29] || (d[29] = [
950
979
  t("span", { class: "text-lg" }, "✓", -1),
951
980
  t("span", null, "Alimentar el componente", -1)
952
981
  ])])
953
- ])) : (r(), i("div", _t, [...a[25] || (a[25] = [
982
+ ])) : (s(), i("div", oo, [...d[25] || (d[25] = [
954
983
  t("span", { class: "text-5xl mb-3 opacity-50" }, "👆", -1),
955
984
  t("p", { class: "text-sm font-medium text-center" }, [
956
- E("Selecciona una noticia"),
985
+ T("Selecciona una noticia"),
957
986
  t("br"),
958
- E("para relacionar")
987
+ T("para relacionar")
959
988
  ], -1)
960
989
  ])]))
961
990
  ])
962
991
  ])
963
992
  ]));
964
993
  }
965
- }), so = { class: "absolute -top-2.5 left-3 text-[11px] font-medium tracking-wide bg-gradient-to-r from-slate-700 to-slate-600 text-white px-3 py-0.5 rounded-full shadow-sm" }, io = { class: "w-full text-right flex justify-between items-center mt-1" }, uo = { class: "flex gap-3 items-center" }, co = { class: "bg-rose-50 border border-rose-200 text-rose-500 px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wider rounded-md" }, mo = {
994
+ }), co = { class: "absolute -top-2.5 left-3 text-[11px] font-medium tracking-wide bg-gradient-to-r from-slate-700 to-slate-600 text-white px-3 py-0.5 rounded-full shadow-sm" }, mo = { class: "w-full text-right flex justify-between items-center mt-1" }, bo = { class: "flex gap-3 items-center" }, go = { class: "bg-rose-50 border border-rose-200 text-rose-500 px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wider rounded-md" }, fo = {
966
995
  key: 0,
967
996
  class: "flex-1 flex justify-center"
968
- }, bo = { class: "flex justify-end items-center gap-3" }, go = { class: "bg-violet-50 border border-violet-200 text-violet-600 rounded-md px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wider" }, fo = {
997
+ }, po = { class: "flex justify-end items-center gap-3" }, vo = { class: "bg-violet-50 border border-violet-200 text-violet-600 rounded-md px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wider" }, xo = {
969
998
  key: 0,
970
999
  class: "flex gap-1 bg-slate-50 rounded-lg p-1"
971
- }, vo = {
1000
+ }, ho = {
972
1001
  key: 0,
973
1002
  class: "text-[10px] bg-amber-100 text-amber-700 px-1.5 rounded-full font-medium"
974
- }, po = { class: "mt-2 flex items-center" }, xo = { class: "font-medium text-slate-700" }, ho = { key: 0 }, wo = { key: 1 }, yo = {
1003
+ }, wo = { class: "mt-2 flex items-center" }, yo = { class: "font-medium text-slate-700" }, Co = { key: 0 }, $o = { key: 1 }, ko = {
975
1004
  key: 0,
976
1005
  class: "mt-3 p-3 bg-gradient-to-r from-sky-50 to-blue-50 rounded-lg text-sm text-slate-600 border border-sky-100"
977
- }, Co = { class: "mt-3 flex gap-1.5 flex-wrap" }, $o = { class: "absolute top-0 left-0 w-full h-full opacity-0 group-hover:opacity-100 bg-gradient-to-br from-white/90 via-slate-50/95 to-slate-100/90 backdrop-blur-[2px] z-99 transition-all duration-300 rounded-xl" }, ko = { class: "flex justify-center h-full items-center p-4 gap-3" }, So = {
1006
+ }, So = { class: "mt-3 flex gap-1.5 flex-wrap" }, Po = { class: "absolute top-0 left-0 w-full h-full opacity-0 group-hover:opacity-100 bg-gradient-to-br from-white/90 via-slate-50/95 to-slate-100/90 backdrop-blur-[2px] z-99 transition-all duration-300 rounded-xl" }, Fo = { class: "flex justify-center h-full items-center p-4 gap-3" }, jo = {
978
1007
  key: 0,
979
1008
  title: "Mover componente",
980
1009
  class: "handle cursor-grab flex items-center bg-white border border-slate-200 px-4 py-2 rounded-xl hover:bg-slate-700 hover:border-slate-700 hover:text-white shadow-sm hover:shadow-md transition-all duration-200 group/btn"
981
- }, Fo = {
1010
+ }, Io = {
982
1011
  key: 1,
983
1012
  class: "flex-1 flex justify-center items-center"
984
- }, Po = { class: "flex flex-col items-center" }, jo = {
1013
+ }, Mo = { class: "flex flex-col items-center" }, Ao = {
985
1014
  key: 0,
986
1015
  class: "text-[10px] mt-0.5 opacity-70"
987
- }, Mo = ["id"], de = /* @__PURE__ */ H({
1016
+ }, Bo = ["id"], ce = /* @__PURE__ */ H({
988
1017
  __name: "InitialComponent",
989
1018
  props: {
990
1019
  object: {
@@ -1008,91 +1037,91 @@ const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
1008
1037
  }
1009
1038
  },
1010
1039
  setup(e) {
1011
- const o = e, b = Math.random().toString(36).substring(2, 15), p = $(!1), f = $(!1), c = $(null), d = $(null), m = $(!1), x = $(!1);
1012
- _(() => o.isComponentMode, (a) => {
1013
- a || F();
1014
- }), _(() => o.object, () => {
1015
- F();
1016
- }, { deep: !0 }), _(m, async (a) => {
1017
- a && (await me(), T());
1040
+ const o = e, g = Math.random().toString(36).substring(2, 15), x = S(!1), f = S(!1), u = S(null), a = S(null), b = S(!1), C = S(!1);
1041
+ ee(() => o.isComponentMode, (d) => {
1042
+ d || I();
1043
+ }), ee(() => o.object, () => {
1044
+ I();
1045
+ }, { deep: !0 }), ee(b, async (d) => {
1046
+ d && (await be(), w());
1018
1047
  });
1019
- const F = () => {
1020
- c.value && clearTimeout(c.value), c.value = setTimeout(() => {
1021
- T();
1048
+ const I = () => {
1049
+ u.value && clearTimeout(u.value), u.value = setTimeout(() => {
1050
+ w();
1022
1051
  }, 500);
1023
- }, s = () => {
1052
+ }, r = () => {
1024
1053
  if (o.isComponentMode) return;
1025
- const a = new IntersectionObserver((u) => {
1026
- u.forEach((h) => {
1027
- h.isIntersecting && !m.value && (m.value = !0, a.disconnect());
1054
+ const d = new IntersectionObserver((c) => {
1055
+ c.forEach(($) => {
1056
+ $.isIntersecting && !b.value && (b.value = !0, d.disconnect());
1028
1057
  });
1029
1058
  }, { threshold: 0.1 });
1030
- d.value && a.observe(d.value);
1031
- }, l = (a, u) => {
1032
- const h = (o.object.fields || []).find((j) => j.name === a);
1033
- h && (h.example_value = u);
1034
- }, n = (a, u) => {
1035
- a.forEach((h) => {
1036
- h.value !== void 0 && l(h.fieldName, h.value);
1037
- }), o.object.repeat_data = u;
1038
- }, g = () => {
1059
+ a.value && d.observe(a.value);
1060
+ }, l = (d, c) => {
1061
+ const $ = (o.object.fields || []).find((j) => j.name === d);
1062
+ $ && ($.example_value = c);
1063
+ }, n = (d, c) => {
1064
+ d.forEach(($) => {
1065
+ $.value !== void 0 && l($.fieldName, $.value);
1066
+ }), o.object.repeat_data = c;
1067
+ }, m = () => {
1039
1068
  f.value = !f.value;
1040
- }, S = () => {
1041
- x.value = !x.value;
1042
- }, D = () => {
1043
- T(!0).then((a) => {
1044
- const u = window.open("", "Preview", "width=1200,height=800");
1045
- if (!u) {
1069
+ }, k = () => {
1070
+ C.value = !C.value;
1071
+ }, A = () => {
1072
+ w(!0).then((d) => {
1073
+ const c = window.open("", "Preview", "width=1200,height=800");
1074
+ if (!c) {
1046
1075
  alert("El navegador bloqueó la ventana emergente. Por favor, permite los popups para este sitio.");
1047
1076
  return;
1048
1077
  }
1049
- u.document.body.innerHTML = a, u.document.querySelectorAll("script").forEach((j) => {
1050
- var z;
1051
- const I = u.document.createElement("script");
1052
- j.src ? I.src = j.src : I.textContent = j.textContent, (z = j.parentNode) == null || z.replaceChild(I, j);
1053
- }), u.document.close();
1078
+ c.document.body.innerHTML = d, c.document.querySelectorAll("script").forEach((j) => {
1079
+ var N;
1080
+ const D = c.document.createElement("script");
1081
+ j.src ? D.src = j.src : D.textContent = j.textContent, (N = j.parentNode) == null || N.replaceChild(D, j);
1082
+ }), c.document.close();
1054
1083
  });
1055
- }, T = (a = !1) => {
1084
+ }, w = (d = !1) => {
1056
1085
  var j;
1057
1086
  if (!((j = o.object) != null && j.category) || o.object.category === "Repetidor") {
1058
- const I = '<div style="color:white; padding: 1em 2em;background-color:#001978;border-radius:1em;border:4px solid #711978;">Componente que contiene elementos repetidos: TODO: GENERAR PREVIEW DE REPETIDORES</div>';
1059
- if (a)
1060
- return Promise.resolve(I);
1061
- const z = document.getElementById(b);
1062
- return z && (z.innerHTML = I), Promise.resolve("");
1087
+ const D = '<div style="color:white; padding: 1em 2em;background-color:#001978;border-radius:1em;border:4px solid #711978;">Componente que contiene elementos repetidos: TODO: GENERAR PREVIEW DE REPETIDORES</div>';
1088
+ if (d)
1089
+ return Promise.resolve(D);
1090
+ const N = document.getElementById(g);
1091
+ return N && (N.innerHTML = D), Promise.resolve("");
1063
1092
  }
1064
- const u = o.renderApiDomain ? o.renderApiDomain + "/api/preview-comp/" : "http://localhost:8003/api/preview-comp/", h = JSON.stringify({ obj: o.object }, null, 2);
1065
- return fetch(u, {
1093
+ const c = o.renderApiDomain ? o.renderApiDomain + "/api/preview-comp/" : "http://localhost:8003/api/preview-comp/", $ = JSON.stringify({ obj: o.object }, null, 2);
1094
+ return fetch(c, {
1066
1095
  method: "POST",
1067
1096
  headers: { "Content-Type": "application/json" },
1068
- body: h
1069
- }).then((I) => I.text()).then((I) => {
1070
- if (a)
1071
- return I;
1072
- const z = document.getElementById(b);
1073
- return z && (z.innerHTML = I), "";
1097
+ body: $
1098
+ }).then((D) => D.text()).then((D) => {
1099
+ if (d)
1100
+ return D;
1101
+ const N = document.getElementById(g);
1102
+ return N && (N.innerHTML = D), "";
1074
1103
  });
1075
1104
  };
1076
- return te(() => {
1077
- s();
1078
- }), (a, u) => (r(), i("div", null, [
1079
- x.value ? (r(), re(ro, {
1105
+ return le(() => {
1106
+ r();
1107
+ }), (d, c) => (s(), i("div", null, [
1108
+ C.value ? (s(), ie(uo, {
1080
1109
  key: 0,
1081
1110
  updateObjectByFeedContent: n,
1082
- toggleFeedSection: S,
1111
+ toggleFeedSection: k,
1083
1112
  object: e.object,
1084
1113
  isProduction: e.isProduction
1085
- }, null, 8, ["object", "isProduction"])) : k("", !0),
1114
+ }, null, 8, ["object", "isProduction"])) : P("", !0),
1086
1115
  t("div", {
1087
1116
  ref_key: "rootElement",
1088
- ref: d,
1089
- class: q(["min-h-[100px] relative group hover:shadow-lg hover:shadow-slate-200/50 duration-300 ease-out js-draggable-element text-slate-600 border border-slate-200 hover:border-slate-300 px-5 pt-3 pb-4 w-full bg-white inline-block rounded-xl flex flex-col mb-3 z-0 shadow-sm", { "overflow-hidden": !e.isComponentMode }])
1117
+ ref: a,
1118
+ class: L(["min-h-[100px] relative group hover:shadow-lg hover:shadow-slate-200/50 duration-300 ease-out js-draggable-element text-slate-600 border border-slate-200 hover:border-slate-300 px-5 pt-3 pb-4 w-full bg-white inline-block rounded-xl flex flex-col mb-3 z-0 shadow-sm", { "overflow-hidden": !e.isComponentMode }])
1090
1119
  }, [
1091
- e.isComponentMode ? (r(), i(A, { key: 0 }, [
1092
- t("span", so, v(e.object.component_name), 1),
1093
- t("div", io, [
1094
- t("div", uo, [
1095
- u[8] || (u[8] = t("div", { class: "handle cursor-grab text-slate-400 hover:text-slate-600 text-lg transition-colors" }, [
1120
+ e.isComponentMode ? (s(), i(B, { key: 0 }, [
1121
+ t("span", co, p(e.object.component_name), 1),
1122
+ t("div", mo, [
1123
+ t("div", bo, [
1124
+ c[8] || (c[8] = t("div", { class: "handle cursor-grab text-slate-400 hover:text-slate-600 text-lg transition-colors" }, [
1096
1125
  t("svg", {
1097
1126
  class: "w-5 h-5",
1098
1127
  fill: "currentColor",
@@ -1101,72 +1130,72 @@ const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
1101
1130
  t("path", { d: "M7 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 2zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 8zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 14zm6-8a2 2 0 1 0-.001-4.001A2 2 0 0 0 13 6zm0 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 8zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 14z" })
1102
1131
  ])
1103
1132
  ], -1)),
1104
- t("span", co, v(e.object.category), 1)
1133
+ t("span", go, p(e.object.category), 1)
1105
1134
  ]),
1106
- e.fullwidthMode ? (r(), i("div", mo, [
1135
+ e.fullwidthMode ? (s(), i("div", fo, [
1107
1136
  t("div", {
1108
1137
  class: "bg-gradient-to-r from-emerald-500 to-teal-500 hover:from-emerald-600 hover:to-teal-600 text-white rounded-lg px-4 py-1.5 text-xs font-medium cursor-pointer shadow-sm hover:shadow transition-all duration-200",
1109
- onClick: u[0] || (u[0] = (h) => {
1138
+ onClick: c[0] || (c[0] = ($) => {
1110
1139
  var j;
1111
1140
  return (j = e.addComponentToColumn) == null ? void 0 : j.call(e, e.object);
1112
1141
  })
1113
1142
  }, "Seleccionar")
1114
- ])) : k("", !0),
1115
- t("div", bo, [
1116
- t("span", go, v(e.object.framework), 1),
1117
- e.insideComponentBox ? k("", !0) : (r(), i("div", fo, [
1143
+ ])) : P("", !0),
1144
+ t("div", po, [
1145
+ t("span", vo, p(e.object.framework), 1),
1146
+ e.insideComponentBox ? P("", !0) : (s(), i("div", xo, [
1118
1147
  t("div", {
1119
1148
  title: "Previsualizar Dummy",
1120
- onClick: u[1] || (u[1] = (h) => D()),
1149
+ onClick: c[1] || (c[1] = ($) => A()),
1121
1150
  class: "p-1.5 rounded-md hover:bg-white hover:shadow-sm cursor-pointer transition-all duration-200 text-base"
1122
1151
  }, "🔍"),
1123
1152
  t("div", {
1124
1153
  title: "Editar configuración",
1125
- onClick: u[2] || (u[2] = (h) => f.value = !f.value),
1154
+ onClick: c[2] || (c[2] = ($) => f.value = !f.value),
1126
1155
  class: "p-1.5 rounded-md hover:bg-white hover:shadow-sm cursor-pointer transition-all duration-200 text-base"
1127
1156
  }, "⚙️"),
1128
1157
  t("div", {
1129
1158
  title: "Beber de contenido",
1130
- onClick: S,
1159
+ onClick: k,
1131
1160
  class: "p-1.5 rounded-md hover:bg-white hover:shadow-sm cursor-pointer transition-all duration-200 text-base flex items-center gap-1"
1132
1161
  }, [
1133
- u[9] || (u[9] = E("⚡ ", -1)),
1134
- e.object.repeat_data ? (r(), i("span", vo, v(e.object.repeat_data.elementCount), 1)) : k("", !0)
1162
+ c[9] || (c[9] = T("⚡ ", -1)),
1163
+ e.object.repeat_data ? (s(), i("span", ho, p(e.object.repeat_data.elementCount), 1)) : P("", !0)
1135
1164
  ]),
1136
- e.removeComponent ? (r(), i("div", {
1165
+ e.removeComponent ? (s(), i("div", {
1137
1166
  key: 0,
1138
1167
  title: "Eliminar componente",
1139
- onClick: u[3] || (u[3] = (h) => e.removeComponent(e.object, e.section || "")),
1168
+ onClick: c[3] || (c[3] = ($) => e.removeComponent(e.object, e.section || "")),
1140
1169
  class: "p-1.5 rounded-md hover:bg-red-50 hover:shadow-sm cursor-pointer transition-all duration-200 text-base"
1141
- }, "🗑️")) : k("", !0)
1170
+ }, "🗑️")) : P("", !0)
1142
1171
  ]))
1143
1172
  ])
1144
1173
  ]),
1145
- L(le, {
1146
- toggleShowForm: g,
1174
+ q(re, {
1175
+ toggleShowForm: m,
1147
1176
  object: e.object,
1148
1177
  showForm: f.value
1149
1178
  }, null, 8, ["object", "showForm"]),
1150
- t("div", po, [
1151
- t("span", xo, v(e.object.name), 1),
1179
+ t("div", wo, [
1180
+ t("span", yo, p(e.object.name), 1),
1152
1181
  t("button", {
1153
- onClick: u[4] || (u[4] = (h) => p.value = !p.value),
1182
+ onClick: c[4] || (c[4] = ($) => x.value = !x.value),
1154
1183
  class: "ms-2 cursor-pointer text-xs text-slate-400 hover:text-slate-600 transition-colors w-5 h-5 rounded-full hover:bg-slate-100 flex items-center justify-center"
1155
1184
  }, [
1156
- p.value ? (r(), i("span", wo, "▲")) : (r(), i("span", ho, "▼"))
1185
+ x.value ? (s(), i("span", $o, "▲")) : (s(), i("span", Co, "▼"))
1157
1186
  ])
1158
1187
  ]),
1159
- p.value ? (r(), i("div", yo, v(e.object.description), 1)) : k("", !0),
1160
- t("div", Co, [
1161
- (r(!0), i(A, null, N(e.object.tags, (h, j) => (r(), i("span", {
1188
+ x.value ? (s(), i("div", ko, p(e.object.description), 1)) : P("", !0),
1189
+ t("div", So, [
1190
+ (s(!0), i(B, null, V(e.object.tags, ($, j) => (s(), i("span", {
1162
1191
  key: j,
1163
1192
  class: "bg-slate-50 text-slate-500 px-2.5 py-1 rounded-full text-[11px] font-medium border border-slate-100 hover:border-slate-200 hover:bg-slate-100 transition-colors cursor-default"
1164
- }, v(h), 1))), 128))
1193
+ }, p($), 1))), 128))
1165
1194
  ])
1166
- ], 64)) : m.value ? (r(), i(A, { key: 1 }, [
1167
- t("div", $o, [
1168
- t("div", ko, [
1169
- e.insideComponentBox && !e.fullwidthMode || !e.insideComponentBox ? (r(), i("div", So, [...u[10] || (u[10] = [
1195
+ ], 64)) : b.value ? (s(), i(B, { key: 1 }, [
1196
+ t("div", Po, [
1197
+ t("div", Fo, [
1198
+ e.insideComponentBox && !e.fullwidthMode || !e.insideComponentBox ? (s(), i("div", jo, [...c[10] || (c[10] = [
1170
1199
  t("div", { class: "flex flex-col items-center" }, [
1171
1200
  t("svg", {
1172
1201
  class: "w-6 h-6 mb-1 text-slate-400 group-hover/btn:text-white",
@@ -1177,28 +1206,28 @@ const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
1177
1206
  ]),
1178
1207
  t("span", { class: "text-xs font-medium" }, "Mover")
1179
1208
  ], -1)
1180
- ])])) : k("", !0),
1181
- e.insideComponentBox && e.fullwidthMode ? (r(), i("div", Fo, [
1209
+ ])])) : P("", !0),
1210
+ e.insideComponentBox && e.fullwidthMode ? (s(), i("div", Io, [
1182
1211
  t("div", {
1183
1212
  title: "Agregar componente a la columna",
1184
- onClick: u[5] || (u[5] = (h) => {
1213
+ onClick: c[5] || (c[5] = ($) => {
1185
1214
  var j;
1186
1215
  return (j = e.addComponentToColumn) == null ? void 0 : j.call(e, e.object);
1187
1216
  }),
1188
1217
  class: "cursor-pointer flex items-center bg-gradient-to-r from-emerald-500 to-teal-500 hover:from-emerald-600 hover:to-teal-600 text-white px-6 py-3 rounded-xl shadow-md hover:shadow-lg transition-all duration-200"
1189
- }, [...u[11] || (u[11] = [
1218
+ }, [...c[11] || (c[11] = [
1190
1219
  t("div", { class: "flex flex-col items-center" }, [
1191
1220
  t("span", { class: "text-2xl mb-1" }, "🚀"),
1192
1221
  t("span", { class: "text-sm font-medium" }, "Seleccionar")
1193
1222
  ], -1)
1194
1223
  ])])
1195
- ])) : k("", !0),
1196
- e.insideComponentBox ? k("", !0) : (r(), i(A, { key: 2 }, [
1224
+ ])) : P("", !0),
1225
+ e.insideComponentBox ? P("", !0) : (s(), i(B, { key: 2 }, [
1197
1226
  t("div", {
1198
1227
  title: "Configurar componente",
1199
- onClick: u[6] || (u[6] = (h) => f.value = !f.value),
1228
+ onClick: c[6] || (c[6] = ($) => f.value = !f.value),
1200
1229
  class: "cursor-pointer flex items-center bg-white border border-slate-200 px-4 py-2 rounded-xl hover:bg-slate-700 hover:border-slate-700 hover:text-white shadow-sm hover:shadow-md transition-all duration-200 group/btn"
1201
- }, [...u[12] || (u[12] = [
1230
+ }, [...c[12] || (c[12] = [
1202
1231
  t("div", { class: "flex flex-col items-center" }, [
1203
1232
  t("span", { class: "text-xl mb-1" }, "⚙️"),
1204
1233
  t("span", { class: "text-xs font-medium" }, "Configurar")
@@ -1206,55 +1235,55 @@ const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
1206
1235
  ])]),
1207
1236
  t("div", {
1208
1237
  title: "Configurar componente",
1209
- onClick: S,
1238
+ onClick: k,
1210
1239
  class: "cursor-pointer flex items-center bg-white border border-slate-200 px-4 py-2 rounded-xl hover:bg-amber-500 hover:border-amber-500 hover:text-white shadow-sm hover:shadow-md transition-all duration-200 group/btn"
1211
1240
  }, [
1212
- t("div", Po, [
1213
- u[13] || (u[13] = t("span", { class: "text-xl mb-1" }, "⚡", -1)),
1214
- u[14] || (u[14] = t("span", { class: "text-xs font-medium" }, "Beber de contenido", -1)),
1215
- e.object.repeat_data && e.object.repeat_data.dynamicUpdate ? (r(), i("span", jo, "Carga " + v(e.object.repeat_data.elementCount) + " elementos", 1)) : k("", !0)
1241
+ t("div", Mo, [
1242
+ c[13] || (c[13] = t("span", { class: "text-xl mb-1" }, "⚡", -1)),
1243
+ c[14] || (c[14] = t("span", { class: "text-xs font-medium" }, "Beber de contenido", -1)),
1244
+ e.object.repeat_data && e.object.repeat_data.dynamicUpdate ? (s(), i("span", Ao, "Carga " + p(e.object.repeat_data.elementCount) + " elementos", 1)) : P("", !0)
1216
1245
  ])
1217
1246
  ]),
1218
- e.removeComponent ? (r(), i("div", {
1247
+ e.removeComponent ? (s(), i("div", {
1219
1248
  key: 0,
1220
1249
  title: "Eliminar componente",
1221
- onClick: u[7] || (u[7] = (h) => e.removeComponent(e.object, e.section || "")),
1250
+ onClick: c[7] || (c[7] = ($) => e.removeComponent(e.object, e.section || "")),
1222
1251
  class: "cursor-pointer flex items-center bg-white border border-slate-200 px-4 py-2 rounded-xl hover:bg-red-500 hover:border-red-500 hover:text-white shadow-sm hover:shadow-md transition-all duration-200 group/btn"
1223
- }, [...u[15] || (u[15] = [
1252
+ }, [...c[15] || (c[15] = [
1224
1253
  t("div", { class: "flex flex-col items-center" }, [
1225
1254
  t("span", { class: "text-xl mb-1" }, "🗑️"),
1226
1255
  t("span", { class: "text-xs font-medium" }, "Eliminar")
1227
1256
  ], -1)
1228
- ])])) : k("", !0)
1257
+ ])])) : P("", !0)
1229
1258
  ], 64))
1230
1259
  ])
1231
1260
  ]),
1232
- L(le, {
1233
- toggleShowForm: g,
1261
+ q(re, {
1262
+ toggleShowForm: m,
1234
1263
  object: e.object,
1235
1264
  showForm: f.value
1236
1265
  }, null, 8, ["object", "showForm"]),
1237
1266
  t("div", {
1238
- id: G(b),
1267
+ id: G(g),
1239
1268
  class: "w-full h-full flex items-center justify-center"
1240
- }, null, 8, Mo)
1241
- ], 64)) : k("", !0)
1269
+ }, null, 8, Bo)
1270
+ ], 64)) : P("", !0)
1242
1271
  ], 2)
1243
1272
  ]));
1244
1273
  }
1245
- }), Io = { class: "absolute top-1 left-2 px-2 flex gap-3 items-center" }, Ao = {
1274
+ }), Eo = { class: "absolute top-1 left-2 px-2 flex gap-3 items-center" }, To = {
1246
1275
  key: 0,
1247
1276
  class: "text-[10px] font-medium text-slate-400 bg-white/80 backdrop-blur-sm px-2 py-0.5 rounded-full shadow-sm"
1248
- }, To = { class: "text-slate-600" }, Bo = {
1277
+ }, Do = { class: "text-slate-600" }, Oo = {
1249
1278
  key: 1,
1250
1279
  class: "text-[10px] font-medium text-slate-400 bg-white/80 backdrop-blur-sm px-2 py-0.5 rounded-full shadow-sm"
1251
- }, Eo = { class: "text-slate-600" }, Do = {
1280
+ }, Ro = { class: "text-slate-600" }, No = {
1252
1281
  key: 2,
1253
1282
  class: "text-[10px] font-medium text-slate-400 bg-white/80 backdrop-blur-sm px-2 py-0.5 rounded-full shadow-sm"
1254
- }, Oo = { class: "text-slate-600" }, Ro = {
1283
+ }, Vo = { class: "text-slate-600" }, Uo = {
1255
1284
  key: 0,
1256
1285
  class: "my-4 w-full rounded-xl bg-white border border-slate-200 p-4 z-10 hidden group-hover:block shadow-lg"
1257
- }, No = { class: "p-4 bg-gradient-to-br from-slate-50 to-white rounded-lg w-full" }, Vo = { class: "flex flex-col" }, Uo = ["for"], zo = ["id"], Lo = ["value"], qo = { class: "flex flex-col" }, Go = ["for"], Jo = ["id"], Ho = ["value"], Wo = { class: "flex flex-col" }, Qo = ["for"], Xo = ["id"], Yo = ["value"], Zo = { class: "absolute bottom-0 flex flex-col gap-1 w-full opacity-0 transition-all duration-300 group-hover:opacity-100" }, Ko = { class: "flex justify-between gap-2 bg-white/90 backdrop-blur-sm rounded-t-xl px-3 py-1.5 shadow-sm border border-b-0 border-slate-200" }, _o = { class: "flex gap-1" }, el = /* @__PURE__ */ H({
1286
+ }, zo = { class: "p-4 bg-gradient-to-br from-slate-50 to-white rounded-lg w-full" }, qo = { class: "flex flex-col" }, Lo = ["for"], Go = ["id"], Jo = ["value"], Ho = { class: "flex flex-col" }, Wo = ["for"], Yo = ["id"], Ko = ["value"], Qo = { class: "flex flex-col" }, Xo = ["for"], Zo = ["id"], _o = ["value"], el = { class: "absolute bottom-0 flex flex-col gap-1 w-full opacity-0 transition-all duration-300 group-hover:opacity-100" }, tl = { class: "flex justify-between gap-2 bg-white/90 backdrop-blur-sm rounded-t-xl px-3 py-1.5 shadow-sm border border-b-0 border-slate-200" }, ol = { class: "flex gap-1" }, ll = /* @__PURE__ */ H({
1258
1287
  __name: "ColConfig",
1259
1288
  props: {
1260
1289
  globalPageConfiguration: Array,
@@ -1275,7 +1304,7 @@ const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
1275
1304
  section: String
1276
1305
  },
1277
1306
  setup(e) {
1278
- const o = e, b = {
1307
+ const o = e, g = {
1279
1308
  width: [
1280
1309
  { label: "Ancho completo", value: "full" },
1281
1310
  { label: "1/2", value: "1/2" },
@@ -1299,189 +1328,189 @@ const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
1299
1328
  { label: "Columna (componentes unos encima de otros)", value: "flex-col" },
1300
1329
  { label: "Fila (componentes unos al lado de otros)", value: "flex-row" }
1301
1330
  ]
1302
- }, p = $(""), f = $(""), c = $(""), d = $(!1), m = X(() => {
1303
- var l, n, g, S;
1304
- const F = (l = o.globalPageConfiguration) == null ? void 0 : l.find(
1305
- (D) => D.section === o.section
1306
- ), s = (S = (g = (n = F == null ? void 0 : F.rows) == null ? void 0 : n[o.rowIndex]) == null ? void 0 : g.columns) == null ? void 0 : S[o.columnIndex];
1307
- return (s == null ? void 0 : s.config) || {};
1308
- }), x = (F, s) => {
1309
- var S;
1310
- const l = p.value || b.width[0].value, n = f.value || b.gap[0].value, g = c.value || "";
1311
- (S = o.updateColConfig) == null || S.call(o, F, s, o.section || "", l, n, g), d.value = !1;
1331
+ }, x = S(""), f = S(""), u = S(""), a = S(!1), b = K(() => {
1332
+ var l, n, m, k;
1333
+ const I = (l = o.globalPageConfiguration) == null ? void 0 : l.find(
1334
+ (A) => A.section === o.section
1335
+ ), r = (k = (m = (n = I == null ? void 0 : I.rows) == null ? void 0 : n[o.rowIndex]) == null ? void 0 : m.columns) == null ? void 0 : k[o.columnIndex];
1336
+ return (r == null ? void 0 : r.config) || {};
1337
+ }), C = (I, r) => {
1338
+ var k;
1339
+ const l = x.value || g.width[0].value, n = f.value || g.gap[0].value, m = u.value || "";
1340
+ (k = o.updateColConfig) == null || k.call(o, I, r, o.section || "", l, n, m), a.value = !1;
1312
1341
  };
1313
- return (F, s) => (r(), i(A, null, [
1314
- t("div", Io, [
1315
- m.value.width !== void 0 ? (r(), i("span", Ao, [
1316
- s[12] || (s[12] = E(" Ancho: ", -1)),
1317
- t("span", To, v(m.value.width), 1)
1318
- ])) : k("", !0),
1319
- m.value.gap !== void 0 ? (r(), i("span", Bo, [
1320
- s[13] || (s[13] = E(" Gap: ", -1)),
1321
- t("span", Eo, v(m.value.gap), 1)
1322
- ])) : k("", !0),
1323
- m.value.flexDirection !== void 0 ? (r(), i("span", Do, [
1324
- s[14] || (s[14] = E(" Flex: ", -1)),
1325
- t("span", Oo, v(m.value.flexDirection), 1)
1326
- ])) : k("", !0)
1342
+ return (I, r) => (s(), i(B, null, [
1343
+ t("div", Eo, [
1344
+ b.value.width !== void 0 ? (s(), i("span", To, [
1345
+ r[12] || (r[12] = T(" Ancho: ", -1)),
1346
+ t("span", Do, p(b.value.width), 1)
1347
+ ])) : P("", !0),
1348
+ b.value.gap !== void 0 ? (s(), i("span", Oo, [
1349
+ r[13] || (r[13] = T(" Gap: ", -1)),
1350
+ t("span", Ro, p(b.value.gap), 1)
1351
+ ])) : P("", !0),
1352
+ b.value.flexDirection !== void 0 ? (s(), i("span", No, [
1353
+ r[14] || (r[14] = T(" Flex: ", -1)),
1354
+ t("span", Vo, p(b.value.flexDirection), 1)
1355
+ ])) : P("", !0)
1327
1356
  ]),
1328
- d.value ? (r(), i("div", Ro, [
1329
- t("div", No, [
1357
+ a.value ? (s(), i("div", Uo, [
1358
+ t("div", zo, [
1330
1359
  t("form", {
1331
- onSubmit: s[4] || (s[4] = ee(() => {
1360
+ onSubmit: r[4] || (r[4] = oe(() => {
1332
1361
  }, ["prevent"])),
1333
1362
  class: "flex gap-5 w-full justify-center items-end flex-wrap"
1334
1363
  }, [
1335
- t("div", Vo, [
1364
+ t("div", qo, [
1336
1365
  t("label", {
1337
1366
  for: `colwidth-${e.rowIndex}-${e.columnIndex}`,
1338
1367
  class: "block text-sm font-medium text-slate-600 mb-1.5"
1339
- }, "Ancho:", 8, Uo),
1368
+ }, "Ancho:", 8, Lo),
1340
1369
  R(t("select", {
1341
- "onUpdate:modelValue": s[0] || (s[0] = (l) => p.value = l),
1370
+ "onUpdate:modelValue": r[0] || (r[0] = (l) => x.value = l),
1342
1371
  id: `colwidth-${e.rowIndex}-${e.columnIndex}`,
1343
1372
  class: "block w-full border border-slate-200 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 bg-white hover:border-slate-300 transition-colors"
1344
1373
  }, [
1345
- s[15] || (s[15] = t("option", { value: "" }, "Selecciona...", -1)),
1346
- (r(!0), i(A, null, N(b.width, (l) => (r(), i("option", {
1374
+ r[15] || (r[15] = t("option", { value: "" }, "Selecciona...", -1)),
1375
+ (s(!0), i(B, null, V(g.width, (l) => (s(), i("option", {
1347
1376
  key: l.value,
1348
1377
  value: l.value
1349
- }, v(l.label), 9, Lo))), 128))
1350
- ], 8, zo), [
1351
- [J, p.value]
1378
+ }, p(l.label), 9, Jo))), 128))
1379
+ ], 8, Go), [
1380
+ [J, x.value]
1352
1381
  ])
1353
1382
  ]),
1354
- t("div", qo, [
1383
+ t("div", Ho, [
1355
1384
  t("label", {
1356
1385
  for: `colgap-${e.rowIndex}-${e.columnIndex}`,
1357
1386
  class: "block text-sm font-medium text-slate-600 mb-1.5"
1358
- }, "Gap:", 8, Go),
1387
+ }, "Gap:", 8, Wo),
1359
1388
  R(t("select", {
1360
- "onUpdate:modelValue": s[1] || (s[1] = (l) => f.value = l),
1389
+ "onUpdate:modelValue": r[1] || (r[1] = (l) => f.value = l),
1361
1390
  id: `colgap-${e.rowIndex}-${e.columnIndex}`,
1362
1391
  class: "block w-full border border-slate-200 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 bg-white hover:border-slate-300 transition-colors"
1363
1392
  }, [
1364
- s[16] || (s[16] = t("option", { value: "" }, "Selecciona...", -1)),
1365
- (r(!0), i(A, null, N(b.gap, (l) => (r(), i("option", {
1393
+ r[16] || (r[16] = t("option", { value: "" }, "Selecciona...", -1)),
1394
+ (s(!0), i(B, null, V(g.gap, (l) => (s(), i("option", {
1366
1395
  key: l.value,
1367
1396
  value: l.value
1368
- }, v(l.label), 9, Ho))), 128))
1369
- ], 8, Jo), [
1397
+ }, p(l.label), 9, Ko))), 128))
1398
+ ], 8, Yo), [
1370
1399
  [J, f.value]
1371
1400
  ])
1372
1401
  ]),
1373
- t("div", Wo, [
1402
+ t("div", Qo, [
1374
1403
  t("label", {
1375
1404
  for: `flexdir-${e.rowIndex}-${e.columnIndex}`,
1376
1405
  class: "block text-sm font-medium text-slate-600 mb-1.5"
1377
- }, "Dirección:", 8, Qo),
1406
+ }, "Dirección:", 8, Xo),
1378
1407
  R(t("select", {
1379
- "onUpdate:modelValue": s[2] || (s[2] = (l) => c.value = l),
1408
+ "onUpdate:modelValue": r[2] || (r[2] = (l) => u.value = l),
1380
1409
  id: `flexdir-${e.rowIndex}-${e.columnIndex}`,
1381
1410
  class: "block w-full border border-slate-200 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 bg-white hover:border-slate-300 transition-colors"
1382
1411
  }, [
1383
- s[17] || (s[17] = t("option", { value: "" }, "Selecciona...", -1)),
1384
- (r(!0), i(A, null, N(b.flexDirection, (l) => (r(), i("option", {
1412
+ r[17] || (r[17] = t("option", { value: "" }, "Selecciona...", -1)),
1413
+ (s(!0), i(B, null, V(g.flexDirection, (l) => (s(), i("option", {
1385
1414
  key: l.value,
1386
1415
  value: l.value
1387
- }, v(l.label), 9, Yo))), 128))
1388
- ], 8, Xo), [
1389
- [J, c.value]
1416
+ }, p(l.label), 9, _o))), 128))
1417
+ ], 8, Zo), [
1418
+ [J, u.value]
1390
1419
  ])
1391
1420
  ]),
1392
1421
  t("button", {
1393
1422
  type: "submit",
1394
1423
  class: "bg-gradient-to-r from-emerald-500 to-teal-500 hover:from-emerald-600 hover:to-teal-600 text-white px-5 py-2 rounded-lg font-medium shadow-sm hover:shadow-md transition-all duration-200 cursor-pointer",
1395
- onClick: s[3] || (s[3] = (l) => {
1396
- x(e.rowIndex, e.columnIndex), d.value = !1;
1424
+ onClick: r[3] || (r[3] = (l) => {
1425
+ C(e.rowIndex, e.columnIndex), a.value = !1;
1397
1426
  })
1398
1427
  }, " Guardar ")
1399
1428
  ], 32)
1400
1429
  ])
1401
- ])) : k("", !0),
1402
- t("div", Zo, [
1430
+ ])) : P("", !0),
1431
+ t("div", el, [
1403
1432
  t("div", {
1404
- class: q(["flex flex-row", { "justify-between": e.section && e.section !== "Sidebar", "justify-center": e.section === "Sidebar" }])
1433
+ class: L(["flex flex-row", { "justify-between": e.section && e.section !== "Sidebar", "justify-center": e.section === "Sidebar" }])
1405
1434
  }, [
1406
- e.section && e.section !== "Sidebar" ? (r(), i("button", {
1435
+ e.section && e.section !== "Sidebar" ? (s(), i("button", {
1407
1436
  key: 0,
1408
1437
  title: "Añadir columna a la izquierda",
1409
- onClick: s[5] || (s[5] = (l) => {
1438
+ onClick: r[5] || (r[5] = (l) => {
1410
1439
  var n;
1411
1440
  return (n = e.addCol) == null ? void 0 : n.call(e, e.rowIndex, e.columnIndex, e.section, "left");
1412
1441
  }),
1413
1442
  class: "ms-2 bg-white px-3 py-1 cursor-pointer rounded-t-lg border border-b-0 border-slate-200 hover:bg-emerald-500 hover:border-emerald-500 hover:text-white text-slate-600 transition-all duration-200 shadow-sm hover:shadow-md font-medium"
1414
- }, "+")) : k("", !0),
1415
- t("div", Ko, [
1443
+ }, "+")) : P("", !0),
1444
+ t("div", tl, [
1416
1445
  t("button", {
1417
1446
  title: "Configurar columna",
1418
- onClick: s[6] || (s[6] = (l) => d.value = !d.value),
1419
- class: q(["px-2.5 py-1 rounded-lg cursor-pointer transition-all duration-200", d.value ? "bg-amber-100 text-amber-700 shadow-sm" : "bg-slate-100 text-slate-600 hover:bg-amber-500 hover:text-white"])
1447
+ onClick: r[6] || (r[6] = (l) => a.value = !a.value),
1448
+ class: L(["px-2.5 py-1 rounded-lg cursor-pointer transition-all duration-200", a.value ? "bg-amber-100 text-amber-700 shadow-sm" : "bg-slate-100 text-slate-600 hover:bg-amber-500 hover:text-white"])
1420
1449
  }, "⚙️", 2),
1421
- t("div", _o, [
1422
- e.section && e.section !== "Sidebar" ? (r(), i("span", {
1450
+ t("div", ol, [
1451
+ e.section && e.section !== "Sidebar" ? (s(), i("span", {
1423
1452
  key: 0,
1424
1453
  title: "Mover columna a la izquierda",
1425
- onClick: s[7] || (s[7] = (l) => {
1454
+ onClick: r[7] || (r[7] = (l) => {
1426
1455
  var n;
1427
1456
  return (n = e.moveCol) == null ? void 0 : n.call(e, e.rowIndex, e.columnIndex, e.section, "left");
1428
1457
  }),
1429
1458
  class: "bg-slate-100 px-2.5 py-1 cursor-pointer rounded-lg transition-all duration-200 text-slate-400 hover:bg-blue-500 hover:text-white"
1430
- }, "◁")) : k("", !0),
1431
- e.fullwidthMode ? (r(), i("span", {
1459
+ }, "◁")) : P("", !0),
1460
+ e.fullwidthMode ? (s(), i("span", {
1432
1461
  key: 1,
1433
1462
  title: "Añadir componente",
1434
- onClick: s[8] || (s[8] = (l) => {
1463
+ onClick: r[8] || (r[8] = (l) => {
1435
1464
  var n;
1436
1465
  return (n = e.addComponentFunction) == null ? void 0 : n.call(e, e.rowIndex, e.columnIndex, e.section || "");
1437
1466
  }),
1438
1467
  class: "bg-slate-100 px-2.5 py-1 cursor-pointer rounded-lg transition-all duration-200 text-slate-400 hover:bg-violet-500 hover:text-white"
1439
- }, " 📦 ")) : k("", !0),
1440
- e.section && e.section !== "Sidebar" ? (r(), i("span", {
1468
+ }, " 📦 ")) : P("", !0),
1469
+ e.section && e.section !== "Sidebar" ? (s(), i("span", {
1441
1470
  key: 2,
1442
1471
  title: "Mover columna a la derecha",
1443
- onClick: s[9] || (s[9] = (l) => {
1472
+ onClick: r[9] || (r[9] = (l) => {
1444
1473
  var n;
1445
1474
  return (n = e.moveCol) == null ? void 0 : n.call(e, e.rowIndex, e.columnIndex, e.section, "right");
1446
1475
  }),
1447
1476
  class: "bg-slate-100 px-2.5 py-1 cursor-pointer rounded-lg transition-all duration-200 text-slate-400 hover:bg-blue-500 hover:text-white"
1448
- }, "▷ ")) : k("", !0)
1477
+ }, "▷ ")) : P("", !0)
1449
1478
  ]),
1450
1479
  t("button", {
1451
1480
  title: "Eliminar columna",
1452
- onClick: s[10] || (s[10] = (l) => {
1481
+ onClick: r[10] || (r[10] = (l) => {
1453
1482
  var n;
1454
1483
  return (n = e.removeCol) == null ? void 0 : n.call(e, e.rowIndex, e.columnIndex, e.section || "");
1455
1484
  }),
1456
1485
  class: "bg-slate-100 px-2.5 py-1 rounded-lg cursor-pointer transition-all duration-200 text-slate-600 hover:bg-red-500 hover:text-white"
1457
1486
  }, "🗑️")
1458
1487
  ]),
1459
- e.section && e.section !== "Sidebar" ? (r(), i("button", {
1488
+ e.section && e.section !== "Sidebar" ? (s(), i("button", {
1460
1489
  key: 1,
1461
1490
  title: "Añadir columna a la derecha",
1462
- onClick: s[11] || (s[11] = (l) => {
1491
+ onClick: r[11] || (r[11] = (l) => {
1463
1492
  var n;
1464
1493
  return (n = e.addCol) == null ? void 0 : n.call(e, e.rowIndex, e.columnIndex, e.section, "right");
1465
1494
  }),
1466
1495
  class: "me-2 bg-white px-3 py-1 cursor-pointer rounded-t-lg border border-b-0 border-slate-200 hover:bg-emerald-500 hover:border-emerald-500 hover:text-white text-slate-600 transition-all duration-200 shadow-sm hover:shadow-md font-medium"
1467
- }, "+")) : k("", !0)
1496
+ }, "+")) : P("", !0)
1468
1497
  ], 2)
1469
1498
  ])
1470
1499
  ], 64));
1471
1500
  }
1472
- }), tl = { class: "absolute -top-1 px-2 gap-4 w-full justify-between hidden css-pb-row-config" }, ol = { class: "flex gap-1.5" }, ll = { class: "flex gap-4 items-center" }, nl = { class: "inline-block" }, al = {
1501
+ }), nl = { class: "absolute -top-1 px-2 gap-4 w-full justify-between hidden css-pb-row-config" }, al = { class: "flex gap-1.5" }, rl = { class: "flex gap-4 items-center" }, sl = { class: "inline-block" }, il = {
1473
1502
  key: 0,
1474
1503
  class: "text-xs font-medium text-slate-400 bg-slate-50 px-2 py-1 rounded-full"
1475
- }, rl = { class: "text-slate-600" }, sl = {
1504
+ }, dl = { class: "text-slate-600" }, ul = {
1476
1505
  key: 1,
1477
1506
  class: "text-xs font-medium text-slate-400 bg-slate-50 px-2 py-1 rounded-full"
1478
- }, il = { class: "text-slate-600" }, dl = {
1507
+ }, cl = { class: "text-slate-600" }, ml = {
1479
1508
  key: 2,
1480
1509
  class: "text-xs font-medium text-slate-400 bg-slate-50 px-2 py-1 rounded-full"
1481
- }, ul = { class: "text-slate-600" }, cl = { class: "flex gap-1.5" }, ml = {
1510
+ }, bl = { class: "text-slate-600" }, gl = { class: "flex gap-1.5" }, fl = {
1482
1511
  key: 0,
1483
1512
  class: "z-1"
1484
- }, bl = { class: "p-5 bg-white rounded-xl shadow-lg border border-slate-100 w-full mt-8" }, gl = { class: "flex flex-col" }, fl = ["for"], vl = ["id"], pl = ["value"], xl = { class: "flex flex-col" }, hl = ["for"], wl = ["id"], yl = ["value"], Cl = { class: "flex flex-col" }, $l = ["for"], kl = ["id"], Sl = ["value"], Fl = /* @__PURE__ */ H({
1513
+ }, pl = { class: "p-5 bg-white rounded-xl shadow-lg border border-slate-100 w-full mt-8" }, vl = { class: "flex flex-col" }, xl = ["for"], hl = ["id"], wl = ["value"], yl = { class: "flex flex-col" }, Cl = ["for"], $l = ["id"], kl = ["value"], Sl = { class: "flex flex-col" }, Pl = ["for"], Fl = ["id"], jl = ["value"], Il = /* @__PURE__ */ H({
1485
1514
  __name: "RowConfig",
1486
1515
  props: {
1487
1516
  rowIndex: {
@@ -1496,7 +1525,7 @@ const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
1496
1525
  moveRow: Function
1497
1526
  },
1498
1527
  setup(e) {
1499
- const o = e, b = {
1528
+ const o = e, g = {
1500
1529
  padding: [
1501
1530
  { label: "Ninguno", value: "0" },
1502
1531
  { label: "Leve", value: "4" },
@@ -1522,158 +1551,158 @@ const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
1522
1551
  { label: "3/5", value: "3/5" },
1523
1552
  { label: "4/5", value: "4/5" }
1524
1553
  ]
1525
- }, p = $(""), f = $(""), c = $(""), d = $(!1), m = $(!1), x = X(() => {
1554
+ }, x = S(""), f = S(""), u = S(""), a = S(!1), b = S(!1), C = K(() => {
1526
1555
  var l, n;
1527
- const s = (l = o.globalPageConfiguration) == null ? void 0 : l.find(
1528
- (g) => g.section === o.section
1556
+ const r = (l = o.globalPageConfiguration) == null ? void 0 : l.find(
1557
+ (m) => m.section === o.section
1529
1558
  );
1530
- return (n = s == null ? void 0 : s.rows) != null && n[o.rowIndex] ? s.rows[o.rowIndex].config || {} : {};
1531
- }), F = (s) => {
1532
- var S;
1533
- const l = p.value || b.padding[0].value, n = f.value || b.gap[0].value, g = c.value || b.width[0].value;
1534
- (S = o.updateRowConfig) == null || S.call(o, s, o.section || "", l, n, g), d.value = !1;
1559
+ return (n = r == null ? void 0 : r.rows) != null && n[o.rowIndex] ? r.rows[o.rowIndex].config || {} : {};
1560
+ }), I = (r) => {
1561
+ var k;
1562
+ const l = x.value || g.padding[0].value, n = f.value || g.gap[0].value, m = u.value || g.width[0].value;
1563
+ (k = o.updateRowConfig) == null || k.call(o, r, o.section || "", l, n, m), a.value = !1;
1535
1564
  };
1536
- return (s, l) => (r(), i(A, null, [
1537
- t("div", tl, [
1565
+ return (r, l) => (s(), i(B, null, [
1566
+ t("div", nl, [
1538
1567
  t("div", null, [
1539
- t("div", ol, [
1568
+ t("div", al, [
1540
1569
  t("button", {
1541
1570
  title: "Agregar fila",
1542
1571
  onClick: l[0] || (l[0] = (n) => {
1543
- var g;
1544
- (g = e.addRow) == null || g.call(e, e.rowIndex, e.section || ""), m.value = !1;
1572
+ var m;
1573
+ (m = e.addRow) == null || m.call(e, e.rowIndex, e.section || ""), b.value = !1;
1545
1574
  }),
1546
1575
  class: "cursor-pointer rounded-b-lg border border-t-0 border-slate-200 bg-white hover:bg-emerald-500 hover:border-emerald-500 px-3 py-1 hover:text-white text-slate-600 transition-all duration-200 shadow-sm hover:shadow-md font-medium"
1547
1576
  }, "+"),
1548
1577
  t("button", {
1549
1578
  title: "Mover fila hacia arriba",
1550
1579
  onClick: l[1] || (l[1] = (n) => {
1551
- var g;
1552
- (g = e.moveRow) == null || g.call(e, e.rowIndex, e.section || "", "up"), m.value = !1;
1580
+ var m;
1581
+ (m = e.moveRow) == null || m.call(e, e.rowIndex, e.section || "", "up"), b.value = !1;
1553
1582
  }),
1554
1583
  class: "cursor-pointer rounded-b-lg border border-t-0 border-slate-200 bg-white hover:bg-blue-500 hover:border-blue-500 px-3 py-1 hover:text-white text-slate-600 transition-all duration-200 shadow-sm hover:shadow-md"
1555
1584
  }, "△"),
1556
1585
  t("button", {
1557
1586
  title: "Mover fila hacia abajo",
1558
1587
  onClick: l[2] || (l[2] = (n) => {
1559
- var g;
1560
- (g = e.moveRow) == null || g.call(e, e.rowIndex, e.section || "", "down"), m.value = !1;
1588
+ var m;
1589
+ (m = e.moveRow) == null || m.call(e, e.rowIndex, e.section || "", "down"), b.value = !1;
1561
1590
  }),
1562
1591
  class: "cursor-pointer rounded-b-lg border border-t-0 border-slate-200 bg-white hover:bg-blue-500 hover:border-blue-500 px-3 py-1 hover:text-white text-slate-600 transition-all duration-200 shadow-sm hover:shadow-md"
1563
1592
  }, "▽")
1564
1593
  ])
1565
1594
  ]),
1566
- t("div", ll, [
1567
- t("div", nl, [
1595
+ t("div", rl, [
1596
+ t("div", sl, [
1568
1597
  t("button", {
1569
1598
  title: "Configurar la fila",
1570
- onClick: l[3] || (l[3] = (n) => d.value = !d.value),
1571
- class: q(["cursor-pointer rounded-b-lg border border-t-0 px-3 py-1 transition-all duration-200 shadow-sm hover:shadow-md", d.value ? "bg-amber-100 border-amber-300 text-amber-700" : "bg-white border-slate-200 text-slate-600 hover:bg-amber-500 hover:border-amber-500 hover:text-white"])
1599
+ onClick: l[3] || (l[3] = (n) => a.value = !a.value),
1600
+ class: L(["cursor-pointer rounded-b-lg border border-t-0 px-3 py-1 transition-all duration-200 shadow-sm hover:shadow-md", a.value ? "bg-amber-100 border-amber-300 text-amber-700" : "bg-white border-slate-200 text-slate-600 hover:bg-amber-500 hover:border-amber-500 hover:text-white"])
1572
1601
  }, "⚙️", 2)
1573
1602
  ]),
1574
- x.value.padding !== void 0 ? (r(), i("span", al, [
1575
- l[10] || (l[10] = E(" Padding: ", -1)),
1576
- t("span", rl, v(x.value.padding), 1)
1577
- ])) : k("", !0),
1578
- x.value.gap !== void 0 ? (r(), i("span", sl, [
1579
- l[11] || (l[11] = E(" Gap: ", -1)),
1580
- t("span", il, v(x.value.gap), 1)
1581
- ])) : k("", !0),
1582
- x.value.width !== void 0 ? (r(), i("span", dl, [
1583
- l[12] || (l[12] = E(" Ancho: ", -1)),
1584
- t("span", ul, v(x.value.width), 1)
1585
- ])) : k("", !0)
1603
+ C.value.padding !== void 0 ? (s(), i("span", il, [
1604
+ l[10] || (l[10] = T(" Padding: ", -1)),
1605
+ t("span", dl, p(C.value.padding), 1)
1606
+ ])) : P("", !0),
1607
+ C.value.gap !== void 0 ? (s(), i("span", ul, [
1608
+ l[11] || (l[11] = T(" Gap: ", -1)),
1609
+ t("span", cl, p(C.value.gap), 1)
1610
+ ])) : P("", !0),
1611
+ C.value.width !== void 0 ? (s(), i("span", ml, [
1612
+ l[12] || (l[12] = T(" Ancho: ", -1)),
1613
+ t("span", bl, p(C.value.width), 1)
1614
+ ])) : P("", !0)
1586
1615
  ]),
1587
1616
  t("div", null, [
1588
- t("div", cl, [
1617
+ t("div", gl, [
1589
1618
  t("button", {
1590
1619
  title: "Eliminar fila",
1591
1620
  onClick: l[4] || (l[4] = (n) => {
1592
- var g;
1593
- (g = e.removeRow) == null || g.call(e, e.rowIndex, e.section || ""), m.value = !1;
1621
+ var m;
1622
+ (m = e.removeRow) == null || m.call(e, e.rowIndex, e.section || ""), b.value = !1;
1594
1623
  }),
1595
1624
  class: "cursor-pointer rounded-b-lg border border-t-0 border-slate-200 bg-white hover:bg-red-500 hover:border-red-500 px-3 py-1 hover:text-white text-slate-600 transition-all duration-200 shadow-sm hover:shadow-md"
1596
1625
  }, "🗑️")
1597
1626
  ])
1598
1627
  ])
1599
1628
  ]),
1600
- d.value ? (r(), i("div", ml, [
1601
- t("div", bl, [
1629
+ a.value ? (s(), i("div", fl, [
1630
+ t("div", pl, [
1602
1631
  t("form", {
1603
- onSubmit: l[9] || (l[9] = ee(() => {
1632
+ onSubmit: l[9] || (l[9] = oe(() => {
1604
1633
  }, ["prevent"])),
1605
1634
  class: "flex gap-6 w-full justify-center items-end flex-wrap"
1606
1635
  }, [
1607
- t("div", gl, [
1636
+ t("div", vl, [
1608
1637
  t("label", {
1609
1638
  for: `padding-${e.rowIndex}`,
1610
1639
  class: "block text-sm font-medium text-slate-600 mb-1.5"
1611
- }, "Padding:", 8, fl),
1640
+ }, "Padding:", 8, xl),
1612
1641
  R(t("select", {
1613
- "onUpdate:modelValue": l[5] || (l[5] = (n) => p.value = n),
1642
+ "onUpdate:modelValue": l[5] || (l[5] = (n) => x.value = n),
1614
1643
  id: `padding-${e.rowIndex}`,
1615
1644
  class: "block w-full border border-slate-200 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 bg-slate-50 hover:bg-white transition-colors"
1616
1645
  }, [
1617
1646
  l[13] || (l[13] = t("option", { value: "" }, "Selecciona...", -1)),
1618
- (r(!0), i(A, null, N(b.padding, (n) => (r(), i("option", {
1647
+ (s(!0), i(B, null, V(g.padding, (n) => (s(), i("option", {
1619
1648
  key: n.value,
1620
1649
  value: n.value
1621
- }, v(n.label), 9, pl))), 128))
1622
- ], 8, vl), [
1623
- [J, p.value]
1650
+ }, p(n.label), 9, wl))), 128))
1651
+ ], 8, hl), [
1652
+ [J, x.value]
1624
1653
  ])
1625
1654
  ]),
1626
- t("div", xl, [
1655
+ t("div", yl, [
1627
1656
  t("label", {
1628
1657
  for: `gap-${e.rowIndex}`,
1629
1658
  class: "block text-sm font-medium text-slate-600 mb-1.5"
1630
- }, "Gap:", 8, hl),
1659
+ }, "Gap:", 8, Cl),
1631
1660
  R(t("select", {
1632
1661
  "onUpdate:modelValue": l[6] || (l[6] = (n) => f.value = n),
1633
1662
  id: `gap-${e.rowIndex}`,
1634
1663
  class: "block w-full border border-slate-200 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 bg-slate-50 hover:bg-white transition-colors"
1635
1664
  }, [
1636
1665
  l[14] || (l[14] = t("option", { value: "" }, "Selecciona...", -1)),
1637
- (r(!0), i(A, null, N(b.gap, (n) => (r(), i("option", {
1666
+ (s(!0), i(B, null, V(g.gap, (n) => (s(), i("option", {
1638
1667
  key: n.value,
1639
1668
  value: n.value
1640
- }, v(n.label), 9, yl))), 128))
1641
- ], 8, wl), [
1669
+ }, p(n.label), 9, kl))), 128))
1670
+ ], 8, $l), [
1642
1671
  [J, f.value]
1643
1672
  ])
1644
1673
  ]),
1645
- t("div", Cl, [
1674
+ t("div", Sl, [
1646
1675
  t("label", {
1647
1676
  for: `width-${e.rowIndex}`,
1648
1677
  class: "block text-sm font-medium text-slate-600 mb-1.5"
1649
- }, "Ancho:", 8, $l),
1678
+ }, "Ancho:", 8, Pl),
1650
1679
  R(t("select", {
1651
- "onUpdate:modelValue": l[7] || (l[7] = (n) => c.value = n),
1680
+ "onUpdate:modelValue": l[7] || (l[7] = (n) => u.value = n),
1652
1681
  id: `width-${e.rowIndex}`,
1653
1682
  class: "block w-full border border-slate-200 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 bg-slate-50 hover:bg-white transition-colors"
1654
1683
  }, [
1655
1684
  l[15] || (l[15] = t("option", { value: "" }, "Selecciona...", -1)),
1656
- (r(!0), i(A, null, N(b.width, (n) => (r(), i("option", {
1685
+ (s(!0), i(B, null, V(g.width, (n) => (s(), i("option", {
1657
1686
  key: n.value,
1658
1687
  value: n.value
1659
- }, v(n.label), 9, Sl))), 128))
1660
- ], 8, kl), [
1661
- [J, c.value]
1688
+ }, p(n.label), 9, jl))), 128))
1689
+ ], 8, Fl), [
1690
+ [J, u.value]
1662
1691
  ])
1663
1692
  ]),
1664
1693
  t("button", {
1665
1694
  type: "submit",
1666
1695
  class: "bg-gradient-to-r from-emerald-500 to-teal-500 hover:from-emerald-600 hover:to-teal-600 text-white px-5 py-2 rounded-lg font-medium shadow-sm hover:shadow-md transition-all duration-200 cursor-pointer",
1667
1696
  onClick: l[8] || (l[8] = (n) => {
1668
- F(e.rowIndex), m.value = !1;
1697
+ I(e.rowIndex), b.value = !1;
1669
1698
  })
1670
1699
  }, " Guardar ")
1671
1700
  ], 32)
1672
1701
  ])
1673
- ])) : k("", !0)
1702
+ ])) : P("", !0)
1674
1703
  ], 64));
1675
1704
  }
1676
- }), Pl = ["id"], jl = { class: "flex flex-row w-full gap-3 mt-6" }, Ml = ["id"], Il = /* @__PURE__ */ H({
1705
+ }), Ml = ["id"], Al = { class: "flex flex-row w-full gap-3 mt-6" }, Bl = ["id"], El = /* @__PURE__ */ H({
1677
1706
  __name: "BodySection",
1678
1707
  props: {
1679
1708
  isComponentMode: Boolean,
@@ -1697,49 +1726,49 @@ const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
1697
1726
  }
1698
1727
  },
1699
1728
  setup(e) {
1700
- const o = e, b = $(!1), p = X(() => {
1701
- var c;
1702
- const f = (c = o.globalPageConfiguration) == null ? void 0 : c.find(
1703
- (d) => d.section === o.sectionSelected
1729
+ const o = e, g = S(!1), x = K(() => {
1730
+ var u;
1731
+ const f = (u = o.globalPageConfiguration) == null ? void 0 : u.find(
1732
+ (a) => a.section === o.sectionSelected
1704
1733
  );
1705
1734
  return (f == null ? void 0 : f.rows) || [];
1706
1735
  });
1707
- return (f, c) => (r(!0), i(A, null, N(p.value, (d, m) => (r(), i("div", {
1708
- key: "row-" + m,
1709
- id: "row-" + e.sectionSelected + "-" + m,
1736
+ return (f, u) => (s(!0), i(B, null, V(x.value, (a, b) => (s(), i("div", {
1737
+ key: "row-" + b,
1738
+ id: "row-" + e.sectionSelected + "-" + b,
1710
1739
  class: "flex flex-col gap-3 w-full p-5 bg-white border border-slate-200 rounded-2xl js-row relative items-center hover:border-slate-300 hover:shadow-lg transition-all duration-300 css-pb-row group/row"
1711
1740
  }, [
1712
- L(Fl, {
1741
+ q(Il, {
1713
1742
  moveRow: e.moveRow,
1714
1743
  addRow: e.addRow,
1715
1744
  removeRow: e.removeRow,
1716
1745
  globalPageConfiguration: e.globalPageConfiguration,
1717
1746
  updateRowConfig: e.updateRowConfig,
1718
- rowIndex: m,
1747
+ rowIndex: b,
1719
1748
  section: e.sectionSelected
1720
1749
  }, null, 8, ["moveRow", "addRow", "removeRow", "globalPageConfiguration", "updateRowConfig", "rowIndex", "section"]),
1721
- t("div", jl, [
1722
- (r(!0), i(A, null, N(d.columns, (x, F) => (r(), i("div", {
1723
- class: q([
1750
+ t("div", Al, [
1751
+ (s(!0), i(B, null, V(a.columns, (C, I) => (s(), i("div", {
1752
+ class: L([
1724
1753
  "hover:shadow-md overflow-hidden dragging-zone border relative border-slate-200 shadow-sm w-full p-5 pt-10 min-h-[200px] rounded-xl flex flex-col gap-3 items-center before:content-['Columna'] before:absolute before:text-slate-300 before:text-7xl before:font-bold before:bottom-4 before:left-2 before:-rotate-12 before:opacity-30 before:duration-300 before:transition-opacity group hover:before:opacity-50 transition-all duration-300",
1725
- b.value ? "bg-gradient-to-b from-emerald-50 to-emerald-100 border-emerald-300 shadow-emerald-100" : "bg-gradient-to-b from-slate-50 to-slate-100"
1754
+ g.value ? "bg-gradient-to-b from-emerald-50 to-emerald-100 border-emerald-300 shadow-emerald-100" : "bg-gradient-to-b from-slate-50 to-slate-100"
1726
1755
  ]),
1727
- key: "column-" + F,
1728
- id: "col-" + e.sectionSelected + "-" + m + "-" + F
1756
+ key: "column-" + I,
1757
+ id: "col-" + e.sectionSelected + "-" + b + "-" + I
1729
1758
  }, [
1730
- L(G(ie), {
1759
+ q(G(ue), {
1731
1760
  class: "h-full w-full mb-4",
1732
- list: x.components,
1761
+ list: C.components,
1733
1762
  group: { name: "draggingGroup", pull: !0, put: !0 },
1734
1763
  "item-key": "name",
1735
1764
  handle: ".handle",
1736
- onStart: c[0] || (c[0] = (s) => b.value = !0),
1737
- onEnd: c[1] || (c[1] = (s) => b.value = !1)
1765
+ onStart: u[0] || (u[0] = (r) => g.value = !0),
1766
+ onEnd: u[1] || (u[1] = (r) => g.value = !1)
1738
1767
  }, {
1739
- item: se(({ element: s }) => [
1740
- L(de, {
1768
+ item: de(({ element: r }) => [
1769
+ q(ce, {
1741
1770
  renderApiDomain: e.renderApiDomain,
1742
- object: s,
1771
+ object: r,
1743
1772
  "is-component-mode": e.isComponentMode,
1744
1773
  removeComponent: e.removeComponent,
1745
1774
  section: e.sectionSelected,
@@ -1748,7 +1777,7 @@ const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
1748
1777
  ]),
1749
1778
  _: 1
1750
1779
  }, 8, ["list"]),
1751
- L(el, {
1780
+ q(ll, {
1752
1781
  section: e.sectionSelected,
1753
1782
  globalPageConfiguration: e.globalPageConfiguration,
1754
1783
  updateColConfig: e.updateColConfig,
@@ -1757,17 +1786,17 @@ const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
1757
1786
  addCol: e.addCol,
1758
1787
  removeCol: e.removeCol,
1759
1788
  moveCol: e.moveCol,
1760
- rowIndex: m,
1761
- columnIndex: F
1789
+ rowIndex: b,
1790
+ columnIndex: I
1762
1791
  }, null, 8, ["section", "globalPageConfiguration", "updateColConfig", "addComponentFunction", "fullwidthMode", "addCol", "removeCol", "moveCol", "rowIndex", "columnIndex"])
1763
- ], 10, Ml))), 128))
1792
+ ], 10, Bl))), 128))
1764
1793
  ])
1765
- ], 8, Pl))), 128));
1794
+ ], 8, Ml))), 128));
1766
1795
  }
1767
- }), Al = { class: "flex justify-between items-center mb-4" }, Tl = { class: "text-xs" }, Bl = { class: "flex flex-wrap gap-2 mb-4 bg-white border border-slate-200 p-4 rounded-xl shadow-sm" }, El = ["value", "checked"], Dl = { class: "my-3" }, Ol = { class: "relative" }, Rl = { class: "component-library dragging-zone w-full p-5 min-h-[200px] border border-slate-200 bg-white rounded-xl flex flex-col gap-4 items-center shadow-sm" }, Nl = {
1796
+ }), Tl = { class: "flex justify-between items-center mb-4" }, Dl = { class: "text-xs" }, Ol = { class: "flex flex-wrap gap-2 mb-4 bg-white border border-slate-200 p-4 rounded-xl shadow-sm" }, Rl = ["value", "checked"], Nl = { class: "my-3" }, Vl = { class: "relative" }, Ul = { class: "component-library dragging-zone w-full p-5 min-h-[200px] border border-slate-200 bg-white rounded-xl flex flex-col gap-4 items-center shadow-sm" }, zl = {
1768
1797
  key: 0,
1769
1798
  class: "text-center py-8 text-slate-400"
1770
- }, ne = /* @__PURE__ */ H({
1799
+ }, se = /* @__PURE__ */ H({
1771
1800
  __name: "ComponentsBox",
1772
1801
  props: {
1773
1802
  isComponentMode: Boolean,
@@ -1794,25 +1823,25 @@ const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
1794
1823
  "Formulario",
1795
1824
  "Título",
1796
1825
  "SEO"
1797
- ], b = $(!0), p = $([]), f = $(""), c = $(fe()), d = X(() => {
1798
- const F = f.value.toLowerCase(), s = Object.values(c.value), l = (n) => (n.name.toLowerCase() + n.description.toLowerCase() + n.tags.join(" ").toLowerCase()).includes(F);
1799
- return p.value.length > 0 ? s.filter(
1800
- (n) => p.value.includes(n.category) && l(n)
1801
- ) : s.filter(l);
1802
- }), m = (F) => {
1803
- f.value = F.target.value;
1804
- }, x = (F) => {
1805
- const s = F.target, l = s.value;
1806
- s.checked ? p.value.includes(l) || p.value.push(l) : p.value = p.value.filter((n) => n !== l);
1826
+ ], g = S(!0), x = S([]), f = S(""), u = S(pe()), a = K(() => {
1827
+ const I = f.value.toLowerCase(), r = Object.values(u.value), l = (n) => (n.name.toLowerCase() + n.description.toLowerCase() + n.tags.join(" ").toLowerCase()).includes(I);
1828
+ return x.value.length > 0 ? r.filter(
1829
+ (n) => x.value.includes(n.category) && l(n)
1830
+ ) : r.filter(l);
1831
+ }), b = (I) => {
1832
+ f.value = I.target.value;
1833
+ }, C = (I) => {
1834
+ const r = I.target, l = r.value;
1835
+ r.checked ? x.value.includes(l) || x.value.push(l) : x.value = x.value.filter((n) => n !== l);
1807
1836
  };
1808
- return (F, s) => (r(), i(A, null, [
1809
- s[6] || (s[6] = t("h1", { class: "text-center text-2xl font-semibold mb-4 text-slate-700 tracking-tight" }, "Componentes", -1)),
1810
- t("div", Al, [
1837
+ return (I, r) => (s(), i(B, null, [
1838
+ r[6] || (r[6] = t("h1", { class: "text-center text-2xl font-semibold mb-4 text-slate-700 tracking-tight" }, "Componentes", -1)),
1839
+ t("div", Tl, [
1811
1840
  t("button", {
1812
- onClick: s[0] || (s[0] = (l) => b.value = !b.value),
1841
+ onClick: r[0] || (r[0] = (l) => g.value = !g.value),
1813
1842
  class: "mb-3 px-4 py-2 bg-white rounded-lg border border-slate-200 hover:border-slate-300 hover:shadow-sm transition-all duration-200 cursor-pointer text-slate-600 font-medium flex items-center gap-2"
1814
1843
  }, [
1815
- s[2] || (s[2] = t("svg", {
1844
+ r[2] || (r[2] = t("svg", {
1816
1845
  class: "w-4 h-4",
1817
1846
  fill: "none",
1818
1847
  stroke: "currentColor",
@@ -1825,37 +1854,37 @@ const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
1825
1854
  d: "M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"
1826
1855
  })
1827
1856
  ], -1)),
1828
- s[3] || (s[3] = t("span", null, "Filtros", -1)),
1829
- t("span", Tl, v(b.value ? "▲" : "▼"), 1)
1857
+ r[3] || (r[3] = t("span", null, "Filtros", -1)),
1858
+ t("span", Dl, p(g.value ? "▲" : "▼"), 1)
1830
1859
  ]),
1831
1860
  t("button", {
1832
- class: q([[e.isComponentMode ? "bg-gradient-to-r from-slate-600 to-slate-700 border-slate-700 text-white shadow-md" : "bg-white hover:bg-slate-100"], "cursor-pointer border border-slate-200 rounded-lg py-1.5 px-3 text-sm font-medium transition-all duration-200"]),
1833
- onClick: s[1] || (s[1] = (l) => {
1861
+ class: L([[e.isComponentMode ? "bg-gradient-to-r from-slate-600 to-slate-700 border-slate-700 text-white shadow-md" : "bg-white hover:bg-slate-100"], "cursor-pointer border border-slate-200 rounded-lg py-1.5 px-3 text-sm font-medium transition-all duration-200"]),
1862
+ onClick: r[1] || (r[1] = (l) => {
1834
1863
  var n;
1835
1864
  return (n = e.toggleComponentModeFunction) == null ? void 0 : n.call(e);
1836
1865
  })
1837
- }, v(e.isComponentMode ? "⚒️ Modo Configuración" : "👁️ Modo Visual"), 3)
1866
+ }, p(e.isComponentMode ? "⚒️ Modo Configuración" : "👁️ Modo Visual"), 3)
1838
1867
  ]),
1839
- R(t("div", Bl, [
1840
- (r(), i(A, null, N(o, (l) => t("label", {
1868
+ R(t("div", Ol, [
1869
+ (s(), i(B, null, V(o, (l) => t("label", {
1841
1870
  key: l,
1842
- class: q(["flex items-center gap-2 text-xs bg-slate-50 hover:bg-slate-100 px-3 py-2 rounded-lg cursor-pointer transition-colors duration-200 border border-transparent hover:border-slate-200", { "bg-emerald-50 border-emerald-200 text-emerald-700": p.value.includes(l) }])
1871
+ class: L(["flex items-center gap-2 text-xs bg-slate-50 hover:bg-slate-100 px-3 py-2 rounded-lg cursor-pointer transition-colors duration-200 border border-transparent hover:border-slate-200", { "bg-emerald-50 border-emerald-200 text-emerald-700": x.value.includes(l) }])
1843
1872
  }, [
1844
1873
  t("input", {
1845
1874
  type: "checkbox",
1846
1875
  value: l,
1847
- checked: p.value.includes(l),
1848
- onInput: x,
1876
+ checked: x.value.includes(l),
1877
+ onInput: C,
1849
1878
  class: "w-4 h-4 rounded border-slate-300 text-emerald-500 focus:ring-emerald-500"
1850
- }, null, 40, El),
1851
- E(" " + v(l), 1)
1879
+ }, null, 40, Rl),
1880
+ T(" " + p(l), 1)
1852
1881
  ], 2)), 64))
1853
1882
  ], 512), [
1854
- [be, b.value]
1883
+ [ge, g.value]
1855
1884
  ]),
1856
- t("div", Dl, [
1857
- t("div", Ol, [
1858
- s[4] || (s[4] = t("svg", {
1885
+ t("div", Nl, [
1886
+ t("div", Vl, [
1887
+ r[4] || (r[4] = t("svg", {
1859
1888
  class: "absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-slate-400",
1860
1889
  fill: "none",
1861
1890
  stroke: "currentColor",
@@ -1869,23 +1898,23 @@ const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
1869
1898
  })
1870
1899
  ], -1)),
1871
1900
  t("input", {
1872
- onInput: m,
1901
+ onInput: b,
1873
1902
  type: "text",
1874
1903
  placeholder: "Buscar componente...",
1875
1904
  class: "duration-300 border border-slate-200 bg-white rounded-xl py-3 px-4 pl-11 w-full focus:outline-none focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 hover:border-slate-300 shadow-sm"
1876
1905
  }, null, 32)
1877
1906
  ])
1878
1907
  ]),
1879
- t("div", Rl, [
1880
- L(G(ie), {
1908
+ t("div", Ul, [
1909
+ q(G(ue), {
1881
1910
  class: "w-full flex flex-col gap-4",
1882
- list: d.value,
1911
+ list: a.value,
1883
1912
  group: { name: "draggingGroup", pull: "clone", put: !1 },
1884
1913
  itemKey: "name",
1885
1914
  clone: (l) => JSON.parse(JSON.stringify(l))
1886
1915
  }, {
1887
- item: se(({ element: l }) => [
1888
- L(de, {
1916
+ item: de(({ element: l }) => [
1917
+ q(ce, {
1889
1918
  renderApiDomain: e.renderApiDomain,
1890
1919
  object: l,
1891
1920
  "is-component-mode": e.isComponentMode,
@@ -1898,7 +1927,7 @@ const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
1898
1927
  ]),
1899
1928
  _: 1
1900
1929
  }, 8, ["list", "clone"]),
1901
- d.value.length === 0 ? (r(), i("div", Nl, [...s[5] || (s[5] = [
1930
+ a.value.length === 0 ? (s(), i("div", zl, [...r[5] || (r[5] = [
1902
1931
  t("svg", {
1903
1932
  class: "w-12 h-12 mx-auto mb-3 opacity-50",
1904
1933
  fill: "none",
@@ -1914,23 +1943,24 @@ const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
1914
1943
  ], -1),
1915
1944
  t("p", { class: "text-sm font-medium" }, "No se encontraron componentes", -1),
1916
1945
  t("p", { class: "text-xs mt-1" }, "Intenta con otros filtros o términos de búsqueda", -1)
1917
- ])])) : k("", !0)
1946
+ ])])) : P("", !0)
1918
1947
  ])
1919
1948
  ], 64));
1920
1949
  }
1921
- }), Vl = { class: "flex flex-col w-full transition-all duration-300 lf-page-builder bg-gradient-to-br from-slate-50 to-slate-100 min-h-screen" }, Ul = { class: "relative flex flex-row flex-wrap" }, zl = { class: "w-full flex justify-end py-4 pe-4" }, Ll = { class: "w-3/4" }, ql = {
1950
+ }), ql = { class: "flex flex-col w-full transition-all duration-300 lf-page-builder bg-gradient-to-br from-slate-50 to-slate-100 min-h-screen" }, Ll = { class: "relative flex flex-row flex-wrap" }, Gl = { class: "w-full flex justify-end py-4 pe-4" }, Jl = { class: "w-3/4" }, Hl = {
1922
1951
  key: 1,
1923
1952
  class: "w-1/4 px-3 overflow-y-auto h-screen sticky top-0"
1924
- }, Ql = /* @__PURE__ */ H({
1953
+ }, Xl = /* @__PURE__ */ H({
1925
1954
  __name: "Pagebuilder",
1926
1955
  props: {
1927
- renderApiDomain: {},
1928
- isProduction: { type: Boolean }
1956
+ isProduction: { type: Boolean },
1957
+ inputId: {}
1929
1958
  },
1930
1959
  setup(e) {
1931
- const o = e, b = o.renderApiDomain, p = o.isProduction ?? !1, f = $(!0), c = $(void 0), d = $([]), m = $({ rowIndex: null, columnIndex: null, section: null }), x = $(!1), F = $(!1), s = $({
1960
+ const o = e, g = o.isProduction ?? !1, x = o.inputId ?? null, f = g ? "https://render-api.lefebvre.es" : "https://led-dev-astro-render-api-dev.eu.els.local", u = S(!0), a = S(void 0), b = S([]), C = S({ rowIndex: null, columnIndex: null, section: null }), I = S(!1), r = S(!1), l = S({
1932
1961
  global: {
1933
1962
  sidebarEnabled: !1,
1963
+ renderAsBodyPart: !1,
1934
1964
  headSlot: "",
1935
1965
  bodyBeginSlot: "",
1936
1966
  footerSlot: ""
@@ -1940,7 +1970,7 @@ const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
1940
1970
  description: "",
1941
1971
  robots: "index, follow"
1942
1972
  }
1943
- }), l = ge([
1973
+ }), n = fe([
1944
1974
  {
1945
1975
  section: "Header",
1946
1976
  config: { width: "full" },
@@ -1962,174 +1992,187 @@ const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
1962
1992
  rows: [{ config: {}, columns: [{ config: {}, components: [] }] }]
1963
1993
  }
1964
1994
  ]);
1965
- te(() => {
1966
- n();
1995
+ le(() => {
1996
+ m();
1967
1997
  });
1968
- const n = () => {
1969
- d.value = ["Header", "Footer", "Body", "Sidebar"], c.value = "Body";
1970
- }, g = () => {
1971
- F.value = !F.value;
1972
- }, S = () => {
1973
- f.value = !f.value;
1974
- }, D = (w, y, C, P, M) => {
1998
+ const m = () => {
1999
+ if (b.value = ["Header", "Footer", "Body", "Sidebar"], a.value = "Body", x) {
2000
+ const y = document.getElementById(x);
2001
+ if (y) {
2002
+ const h = y.value;
2003
+ if (h)
2004
+ try {
2005
+ const v = typeof h == "string" ? JSON.parse(h) : h;
2006
+ (v && typeof v == "object" && !Array.isArray(v) ? Object.keys(v).length > 0 : Array.isArray(v) ? v.length > 0 : !1) && ae(h);
2007
+ } catch (v) {
2008
+ console.error("Error parsing input value:", v);
2009
+ }
2010
+ }
2011
+ }
2012
+ }, k = () => {
2013
+ r.value = !r.value;
2014
+ }, A = () => {
2015
+ u.value = !u.value;
2016
+ }, w = (y, h, v, F, M) => {
1975
2017
  var O;
1976
- const B = l.find((V) => V.section === y);
1977
- (O = B == null ? void 0 : B.rows) != null && O[w] && (B.rows[w].config = {
1978
- padding: C,
1979
- gap: P,
2018
+ const E = n.find((U) => U.section === h);
2019
+ (O = E == null ? void 0 : E.rows) != null && O[y] && (E.rows[y].config = {
2020
+ padding: v,
2021
+ gap: F,
1980
2022
  width: M
1981
2023
  });
1982
- }, T = (w, y, C, P, M, B) => {
1983
- var V, U, W;
1984
- const O = l.find((Y) => Y.section === C);
1985
- (W = (U = (V = O == null ? void 0 : O.rows) == null ? void 0 : V[w]) == null ? void 0 : U.columns) != null && W[y] && (O.rows[w].columns[y].config = {
1986
- width: P,
2024
+ }, d = (y, h, v, F, M, E) => {
2025
+ var U, z, W;
2026
+ const O = n.find((Q) => Q.section === v);
2027
+ (W = (z = (U = O == null ? void 0 : O.rows) == null ? void 0 : U[y]) == null ? void 0 : z.columns) != null && W[h] && (O.rows[y].columns[h].config = {
2028
+ width: F,
1987
2029
  gap: M,
1988
- flexDirection: B
2030
+ flexDirection: E
1989
2031
  });
1990
- }, a = async (w, y) => {
1991
- const C = l.find((P) => P.section === y);
1992
- if (C) {
1993
- const P = {
2032
+ }, c = async (y, h) => {
2033
+ const v = n.find((F) => F.section === h);
2034
+ if (v) {
2035
+ const F = {
1994
2036
  config: {},
1995
2037
  columns: [{ config: {}, components: [] }]
1996
2038
  };
1997
- w !== null && w >= 0 && w < C.rows.length ? C.rows.splice(w + 1, 0, P) : C.rows.push(P);
2039
+ y !== null && y >= 0 && y < v.rows.length ? v.rows.splice(y + 1, 0, F) : v.rows.push(F);
1998
2040
  }
1999
- await new Promise((P) => {
2041
+ await new Promise((F) => {
2000
2042
  setTimeout(() => {
2001
- const M = document.getElementById(`row-${y}-${(w ?? 0) + 1}`);
2043
+ const M = document.getElementById(`row-${h}-${(y ?? 0) + 1}`);
2002
2044
  M ? (M.scrollIntoView({ behavior: "smooth", block: "center" }), M.classList.add("selected-delay"), setTimeout(() => {
2003
- M.classList.remove("selected-delay"), P();
2004
- }, 3e3)) : P();
2045
+ M.classList.remove("selected-delay"), F();
2046
+ }, 3e3)) : F();
2005
2047
  }, 0);
2006
2048
  });
2007
- }, u = (w, y) => {
2008
- const C = l.find((P) => P.section === y);
2009
- !(C != null && C.rows) || C.rows.length <= 1 || C.rows.splice(w, 1);
2010
- }, h = (w, y, C = "down") => {
2011
- var V;
2012
- const P = l.find((U) => U.section === y);
2013
- if (!((V = P == null ? void 0 : P.rows) != null && V[w]) || C === "up" && w === 0 || C === "down" && w === P.rows.length - 1)
2049
+ }, $ = (y, h) => {
2050
+ const v = n.find((F) => F.section === h);
2051
+ !(v != null && v.rows) || v.rows.length <= 1 || v.rows.splice(y, 1);
2052
+ }, j = (y, h, v = "down") => {
2053
+ var U;
2054
+ const F = n.find((z) => z.section === h);
2055
+ if (!((U = F == null ? void 0 : F.rows) != null && U[y]) || v === "up" && y === 0 || v === "down" && y === F.rows.length - 1)
2014
2056
  return;
2015
- const M = P.rows, B = M.splice(w, 1)[0], O = C === "down" ? w + 1 : w - 1;
2016
- M.splice(O, 0, B);
2017
- }, j = async (w, y, C, P = "right") => {
2057
+ const M = F.rows, E = M.splice(y, 1)[0], O = v === "down" ? y + 1 : y - 1;
2058
+ M.splice(O, 0, E);
2059
+ }, D = async (y, h, v, F = "right") => {
2018
2060
  var O;
2019
- const M = P === "left" ? y : y + 1, B = l.find((V) => V.section === C);
2020
- (O = B == null ? void 0 : B.rows) != null && O[w] && B.rows[w].columns.splice(M, 0, {
2061
+ const M = F === "left" ? h : h + 1, E = n.find((U) => U.section === v);
2062
+ (O = E == null ? void 0 : E.rows) != null && O[y] && E.rows[y].columns.splice(M, 0, {
2021
2063
  config: {},
2022
2064
  components: []
2023
- }), await new Promise((V) => {
2065
+ }), await new Promise((U) => {
2024
2066
  setTimeout(() => {
2025
- const U = document.getElementById(`col-${C}-${w}-${M}`);
2026
- U ? (U.scrollIntoView({ behavior: "smooth", block: "center" }), U.classList.add("selected-delay"), setTimeout(() => {
2027
- U.classList.remove("selected-delay"), V();
2028
- }, 3e3)) : V();
2067
+ const z = document.getElementById(`col-${v}-${y}-${M}`);
2068
+ z ? (z.scrollIntoView({ behavior: "smooth", block: "center" }), z.classList.add("selected-delay"), setTimeout(() => {
2069
+ z.classList.remove("selected-delay"), U();
2070
+ }, 3e3)) : U();
2029
2071
  }, 0);
2030
2072
  });
2031
- }, I = (w, y, C) => {
2032
- var B, O;
2033
- const P = l.find((V) => V.section === C), M = (O = (B = P == null ? void 0 : P.rows) == null ? void 0 : B[w]) == null ? void 0 : O.columns;
2034
- !M || M.length <= 1 || M.splice(y, 1);
2035
- }, z = (w, y, C, P = "right") => {
2036
- var U;
2037
- const M = l.find((W) => W.section === C);
2038
- if (!((U = M == null ? void 0 : M.rows) != null && U[w]) || P === "left" && y === 0 || P === "right" && y === M.rows[w].columns.length - 1)
2073
+ }, N = (y, h, v) => {
2074
+ var E, O;
2075
+ const F = n.find((U) => U.section === v), M = (O = (E = F == null ? void 0 : F.rows) == null ? void 0 : E[y]) == null ? void 0 : O.columns;
2076
+ !M || M.length <= 1 || M.splice(h, 1);
2077
+ }, X = (y, h, v, F = "right") => {
2078
+ var z;
2079
+ const M = n.find((W) => W.section === v);
2080
+ if (!((z = M == null ? void 0 : M.rows) != null && z[y]) || F === "left" && h === 0 || F === "right" && h === M.rows[y].columns.length - 1)
2039
2081
  return;
2040
- const B = M.rows[w].columns, O = B.splice(y, 1)[0], V = P === "right" ? y + 1 : y - 1;
2041
- B.splice(V, 0, O);
2042
- }, Z = (w, y) => {
2043
- var P;
2044
- const C = l.find((M) => M.section === y);
2045
- (P = C == null ? void 0 : C.rows) == null || P.forEach((M) => {
2046
- M.columns.forEach((B) => {
2047
- const O = B.components.indexOf(w);
2048
- O !== -1 && B.components.splice(O, 1);
2082
+ const E = M.rows[y].columns, O = E.splice(h, 1)[0], U = F === "right" ? h + 1 : h - 1;
2083
+ E.splice(U, 0, O);
2084
+ }, Z = (y, h) => {
2085
+ var F;
2086
+ const v = n.find((M) => M.section === h);
2087
+ (F = v == null ? void 0 : v.rows) == null || F.forEach((M) => {
2088
+ M.columns.forEach((E) => {
2089
+ const O = E.components.indexOf(y);
2090
+ O !== -1 && E.components.splice(O, 1);
2049
2091
  });
2050
2092
  });
2051
- }, K = (w, y, C) => {
2052
- x.value = !0, m.value = { rowIndex: w, columnIndex: y, section: C };
2053
- }, oe = (w) => {
2054
- var M, B, O, V;
2055
- const { rowIndex: y, columnIndex: C, section: P } = m.value;
2056
- if (y !== null && C !== null) {
2057
- const U = JSON.parse(JSON.stringify(w)), W = l.find((ce) => ce.section === P), Y = (V = (O = (B = (M = W == null ? void 0 : W.rows) == null ? void 0 : M[y]) == null ? void 0 : B.columns) == null ? void 0 : O[C]) == null ? void 0 : V.components;
2058
- Y == null || Y.push(U);
2093
+ }, _ = (y, h, v) => {
2094
+ I.value = !0, C.value = { rowIndex: y, columnIndex: h, section: v };
2095
+ }, ne = (y) => {
2096
+ var M, E, O, U;
2097
+ const { rowIndex: h, columnIndex: v, section: F } = C.value;
2098
+ if (h !== null && v !== null) {
2099
+ const z = JSON.parse(JSON.stringify(y)), W = n.find((me) => me.section === F), Q = (U = (O = (E = (M = W == null ? void 0 : W.rows) == null ? void 0 : M[h]) == null ? void 0 : E.columns) == null ? void 0 : O[v]) == null ? void 0 : U.components;
2100
+ Q == null || Q.push(z);
2059
2101
  }
2060
- x.value = !1;
2061
- }, ue = (w) => {
2062
- const y = typeof w == "string" ? JSON.parse(w) : w;
2063
- l.length = 0, l.push(...y.pageConfig || []), y.paramsConfig && (s.value = { ...s.value, ...y.paramsConfig });
2102
+ I.value = !1;
2103
+ }, ae = (y) => {
2104
+ const h = typeof y == "string" ? JSON.parse(y) : y;
2105
+ n.length = 0, n.push(...h.pageConfig || []), h.paramsConfig && (l.value = { ...l.value, ...h.paramsConfig });
2064
2106
  };
2065
- return (w, y) => (r(), i("div", Vl, [
2066
- L(et, {
2067
- sectionSelected: c.value,
2068
- "onUpdate:sectionSelected": y[0] || (y[0] = (C) => c.value = C),
2069
- parametersPageConfiguration: s.value,
2070
- "onUpdate:parametersPageConfiguration": y[1] || (y[1] = (C) => s.value = C),
2071
- globalPageConfiguration: l,
2072
- availableSections: d.value,
2073
- importConfigurationFunction: ue,
2074
- isComponentMode: F.value,
2075
- toggleComponentModeFunction: g,
2076
- fullwidthMode: f.value,
2077
- toggleFullwidthMode: S,
2078
- renderApiDomain: G(b)
2079
- }, null, 8, ["sectionSelected", "parametersPageConfiguration", "globalPageConfiguration", "availableSections", "isComponentMode", "fullwidthMode", "renderApiDomain"]),
2080
- t("div", Ul, [
2081
- f.value ? (r(), i("div", {
2107
+ return (y, h) => (s(), i("div", ql, [
2108
+ q(lt, {
2109
+ sectionSelected: a.value,
2110
+ "onUpdate:sectionSelected": h[0] || (h[0] = (v) => a.value = v),
2111
+ parametersPageConfiguration: l.value,
2112
+ "onUpdate:parametersPageConfiguration": h[1] || (h[1] = (v) => l.value = v),
2113
+ globalPageConfiguration: n,
2114
+ availableSections: b.value,
2115
+ importConfigurationFunction: ae,
2116
+ isComponentMode: r.value,
2117
+ toggleComponentModeFunction: k,
2118
+ fullwidthMode: u.value,
2119
+ toggleFullwidthMode: A,
2120
+ renderApiDomain: G(f),
2121
+ inputId: G(x)
2122
+ }, null, 8, ["sectionSelected", "parametersPageConfiguration", "globalPageConfiguration", "availableSections", "isComponentMode", "fullwidthMode", "renderApiDomain", "inputId"]),
2123
+ t("div", Ll, [
2124
+ u.value ? (s(), i("div", {
2082
2125
  key: 0,
2083
- class: q(["w-full overflow-y-auto fixed top-0 left-0 h-full bg-gradient-to-br from-slate-100 via-white to-slate-50 z-9999 px-4 flex justify-start flex flex-col items-center backdrop-blur-sm", x.value ? "" : "hidden"])
2126
+ class: L(["w-full overflow-y-auto fixed top-0 left-0 h-full bg-gradient-to-br from-slate-100 via-white to-slate-50 z-9999 px-4 flex justify-start flex flex-col items-center backdrop-blur-sm", I.value ? "" : "hidden"])
2084
2127
  }, [
2085
- t("div", zl, [
2128
+ t("div", Gl, [
2086
2129
  t("div", {
2087
2130
  class: "cursor-pointer w-10 h-10 flex items-center justify-center rounded-full bg-white shadow-md hover:shadow-lg hover:bg-red-50 text-slate-400 hover:text-red-500 transition-all duration-200 text-xl font-light",
2088
- onClick: y[2] || (y[2] = (C) => x.value = !1)
2131
+ onClick: h[2] || (h[2] = (v) => I.value = !1)
2089
2132
  }, "✕")
2090
2133
  ]),
2091
- t("div", Ll, [
2092
- L(ne, {
2093
- renderApiDomain: G(b),
2094
- isComponentMode: F.value,
2095
- fullwidthMode: f.value,
2096
- columnToInsert: m.value,
2097
- addComponentToColumn: oe,
2098
- toggleComponentModeFunction: g,
2099
- isProduction: G(p)
2134
+ t("div", Jl, [
2135
+ q(se, {
2136
+ renderApiDomain: G(f),
2137
+ isComponentMode: r.value,
2138
+ fullwidthMode: u.value,
2139
+ columnToInsert: C.value,
2140
+ addComponentToColumn: ne,
2141
+ toggleComponentModeFunction: k,
2142
+ isProduction: G(g)
2100
2143
  }, null, 8, ["renderApiDomain", "isComponentMode", "fullwidthMode", "columnToInsert", "isProduction"])
2101
2144
  ])
2102
- ], 2)) : (r(), i("div", ql, [
2103
- L(ne, {
2104
- renderApiDomain: G(b),
2105
- isComponentMode: F.value,
2106
- fullwidthMode: f.value,
2107
- columnToInsert: m.value,
2108
- addComponentToColumn: oe,
2109
- toggleComponentModeFunction: g,
2110
- isProduction: G(p)
2145
+ ], 2)) : (s(), i("div", Hl, [
2146
+ q(se, {
2147
+ renderApiDomain: G(f),
2148
+ isComponentMode: r.value,
2149
+ fullwidthMode: u.value,
2150
+ columnToInsert: C.value,
2151
+ addComponentToColumn: ne,
2152
+ toggleComponentModeFunction: k,
2153
+ isProduction: G(g)
2111
2154
  }, null, 8, ["renderApiDomain", "isComponentMode", "fullwidthMode", "columnToInsert", "isProduction"])
2112
2155
  ])),
2113
2156
  t("div", {
2114
- class: q([f.value ? "w-full px-4" : "w-3/4 ps-3", "flex flex-col gap-5"])
2157
+ class: L([u.value ? "w-full px-4" : "w-3/4 ps-3", "flex flex-col gap-5"])
2115
2158
  }, [
2116
- L(Il, {
2117
- globalPageConfiguration: l,
2118
- isComponentMode: F.value,
2159
+ q(El, {
2160
+ globalPageConfiguration: n,
2161
+ isComponentMode: r.value,
2119
2162
  removeComponent: Z,
2120
- addComponentFunction: K,
2121
- fullwidthMode: f.value,
2122
- addCol: j,
2123
- addRow: a,
2124
- removeRow: u,
2125
- removeCol: I,
2126
- moveCol: z,
2127
- updateRowConfig: D,
2128
- updateColConfig: T,
2129
- moveRow: h,
2130
- sectionSelected: c.value,
2131
- renderApiDomain: G(b),
2132
- isProduction: G(p)
2163
+ addComponentFunction: _,
2164
+ fullwidthMode: u.value,
2165
+ addCol: D,
2166
+ addRow: c,
2167
+ removeRow: $,
2168
+ removeCol: N,
2169
+ moveCol: X,
2170
+ updateRowConfig: w,
2171
+ updateColConfig: d,
2172
+ moveRow: j,
2173
+ sectionSelected: a.value,
2174
+ renderApiDomain: G(f),
2175
+ isProduction: G(g)
2133
2176
  }, null, 8, ["globalPageConfiguration", "isComponentMode", "fullwidthMode", "sectionSelected", "renderApiDomain", "isProduction"])
2134
2177
  ], 2)
2135
2178
  ])
@@ -2137,15 +2180,15 @@ const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
2137
2180
  }
2138
2181
  });
2139
2182
  export {
2140
- Il as BodySection,
2141
- el as ColConfig,
2142
- ne as ComponentsBox,
2143
- ro as FeedComponent,
2144
- le as FieldsForm,
2145
- et as GlobalConfig,
2146
- de as InitialComponent,
2147
- Ql as Pagebuilder,
2148
- Fl as RowConfig,
2149
- $t as SourceFilter,
2150
- Ql as default
2183
+ El as BodySection,
2184
+ ll as ColConfig,
2185
+ se as ComponentsBox,
2186
+ uo as FeedComponent,
2187
+ re as FieldsForm,
2188
+ lt as GlobalConfig,
2189
+ ce as InitialComponent,
2190
+ Xl as Pagebuilder,
2191
+ Il as RowConfig,
2192
+ Pt as SourceFilter,
2193
+ Xl as default
2151
2194
  };