@resulticks/trustsignal-wa-hsm 0.9.0 → 0.11.0

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.
@@ -70,7 +70,7 @@ var De = {
70
70
  * This source code is licensed under the ISC license.
71
71
  * See the LICENSE file in the root directory of this source tree.
72
72
  */
73
- const _e = (a) => a.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase().trim(), H = (a, s) => {
73
+ const _e = (a) => a.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase().trim(), G = (a, s) => {
74
74
  const n = Be(
75
75
  ({
76
76
  color: i = "currentColor",
@@ -106,7 +106,7 @@ const _e = (a) => a.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase().trim(),
106
106
  * This source code is licensed under the ISC license.
107
107
  * See the LICENSE file in the root directory of this source tree.
108
108
  */
109
- const he = H("AlertCircle", [
109
+ const he = G("AlertCircle", [
110
110
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
111
111
  ["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
112
112
  ["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
@@ -117,7 +117,7 @@ const he = H("AlertCircle", [
117
117
  * This source code is licensed under the ISC license.
118
118
  * See the LICENSE file in the root directory of this source tree.
119
119
  */
120
- const Fe = H("ArrowRight", [
120
+ const Fe = G("ArrowRight", [
121
121
  ["path", { d: "M5 12h14", key: "1ays0h" }],
122
122
  ["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
123
123
  ]);
@@ -127,16 +127,7 @@ const Fe = H("ArrowRight", [
127
127
  * This source code is licensed under the ISC license.
128
128
  * See the LICENSE file in the root directory of this source tree.
129
129
  */
130
- const qe = H("ChevronLeft", [
131
- ["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]
132
- ]);
133
- /**
134
- * @license lucide-react v0.344.0 - ISC
135
- *
136
- * This source code is licensed under the ISC license.
137
- * See the LICENSE file in the root directory of this source tree.
138
- */
139
- const He = H("ExternalLink", [
130
+ const qe = G("ExternalLink", [
140
131
  ["path", { d: "M15 3h6v6", key: "1q9fwt" }],
141
132
  ["path", { d: "M10 14 21 3", key: "gplh6r" }],
142
133
  ["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
@@ -147,7 +138,7 @@ const He = H("ExternalLink", [
147
138
  * This source code is licensed under the ISC license.
148
139
  * See the LICENSE file in the root directory of this source tree.
149
140
  */
150
- const $e = H("FileText", [
141
+ const He = G("FileText", [
151
142
  ["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
152
143
  ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
153
144
  ["path", { d: "M10 9H8", key: "b1mrlr" }],
@@ -160,7 +151,7 @@ const $e = H("FileText", [
160
151
  * This source code is licensed under the ISC license.
161
152
  * See the LICENSE file in the root directory of this source tree.
162
153
  */
163
- const Ge = H("FileVideo", [
154
+ const $e = G("FileVideo", [
164
155
  ["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
165
156
  ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
166
157
  ["path", { d: "m10 11 5 3-5 3v-6Z", key: "7ntvm4" }]
@@ -171,7 +162,7 @@ const Ge = H("FileVideo", [
171
162
  * This source code is licensed under the ISC license.
172
163
  * See the LICENSE file in the root directory of this source tree.
173
164
  */
174
- const We = H("Link", [
165
+ const Ge = G("Link", [
175
166
  ["path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71", key: "1cjeqo" }],
176
167
  ["path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71", key: "19qd67" }]
177
168
  ]);
@@ -181,7 +172,7 @@ const We = H("Link", [
181
172
  * This source code is licensed under the ISC license.
182
173
  * See the LICENSE file in the root directory of this source tree.
183
174
  */
184
- const me = H("MessageCircle", [
175
+ const me = G("MessageCircle", [
185
176
  ["path", { d: "M7.9 20A9 9 0 1 0 4 16.1L2 22Z", key: "vv11sd" }]
186
177
  ]);
187
178
  /**
@@ -190,7 +181,7 @@ const me = H("MessageCircle", [
190
181
  * This source code is licensed under the ISC license.
191
182
  * See the LICENSE file in the root directory of this source tree.
192
183
  */
193
- const Ke = H("Pencil", [
184
+ const We = G("Pencil", [
194
185
  ["path", { d: "M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z", key: "5qss01" }],
195
186
  ["path", { d: "m15 5 4 4", key: "1mk7zo" }]
196
187
  ]);
@@ -200,7 +191,7 @@ const Ke = H("Pencil", [
200
191
  * This source code is licensed under the ISC license.
201
192
  * See the LICENSE file in the root directory of this source tree.
202
193
  */
203
- const Ae = H("Phone", [
194
+ const Ae = G("Phone", [
204
195
  [
205
196
  "path",
206
197
  {
@@ -215,7 +206,7 @@ const Ae = H("Phone", [
215
206
  * This source code is licensed under the ISC license.
216
207
  * See the LICENSE file in the root directory of this source tree.
217
208
  */
218
- const ue = H("Plus", [
209
+ const ue = G("Plus", [
219
210
  ["path", { d: "M5 12h14", key: "1ays0h" }],
220
211
  ["path", { d: "M12 5v14", key: "s699le" }]
221
212
  ]);
@@ -225,7 +216,7 @@ const ue = H("Plus", [
225
216
  * This source code is licensed under the ISC license.
226
217
  * See the LICENSE file in the root directory of this source tree.
227
218
  */
228
- const Je = H("Reply", [
219
+ const Ke = G("Reply", [
229
220
  ["polyline", { points: "9 17 4 12 9 7", key: "hvgpf2" }],
230
221
  ["path", { d: "M20 18v-2a4 4 0 0 0-4-4H4", key: "5vmcpk" }]
231
222
  ]);
@@ -235,7 +226,7 @@ const Je = H("Reply", [
235
226
  * This source code is licensed under the ISC license.
236
227
  * See the LICENSE file in the root directory of this source tree.
237
228
  */
238
- const be = H("Smile", [
229
+ const be = G("Smile", [
239
230
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
240
231
  ["path", { d: "M8 14s1.5 2 4 2 4-2 4-2", key: "1y1vjs" }],
241
232
  ["line", { x1: "9", x2: "9.01", y1: "9", y2: "9", key: "yxxnd0" }],
@@ -247,7 +238,7 @@ const be = H("Smile", [
247
238
  * This source code is licensed under the ISC license.
248
239
  * See the LICENSE file in the root directory of this source tree.
249
240
  */
250
- const Xe = H("Trash2", [
241
+ const Je = G("Trash2", [
251
242
  ["path", { d: "M3 6h18", key: "d0wm0j" }],
252
243
  ["path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6", key: "4alrt4" }],
253
244
  ["path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2", key: "v07s0e" }],
@@ -260,7 +251,7 @@ const Xe = H("Trash2", [
260
251
  * This source code is licensed under the ISC license.
261
252
  * See the LICENSE file in the root directory of this source tree.
262
253
  */
263
- const Ye = H("Upload", [
254
+ const Xe = G("Upload", [
264
255
  ["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
265
256
  ["polyline", { points: "17 8 12 3 7 8", key: "t8dd8p" }],
266
257
  ["line", { x1: "12", x2: "12", y1: "3", y2: "15", key: "widbto" }]
@@ -271,7 +262,7 @@ const Ye = H("Upload", [
271
262
  * This source code is licensed under the ISC license.
272
263
  * See the LICENSE file in the root directory of this source tree.
273
264
  */
274
- const Qe = H("Workflow", [
265
+ const Ye = G("Workflow", [
275
266
  ["rect", { width: "8", height: "8", x: "3", y: "3", rx: "2", key: "by2w9f" }],
276
267
  ["path", { d: "M7 11v4a2 2 0 0 0 2 2h4", key: "xkn7yn" }],
277
268
  ["rect", { width: "8", height: "8", x: "13", y: "13", rx: "2", key: "1cgmvn" }]
@@ -282,7 +273,7 @@ const Qe = H("Workflow", [
282
273
  * This source code is licensed under the ISC license.
283
274
  * See the LICENSE file in the root directory of this source tree.
284
275
  */
285
- const se = H("X", [
276
+ const se = G("X", [
286
277
  ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
287
278
  ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
288
279
  ]);
@@ -311,7 +302,7 @@ function te({ isOpen: a, onClose: s, title: n, children: i }) {
311
302
  ] }) }) : null;
312
303
  }
313
304
  const Ee = (a) => a ? /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(a) : !1;
314
- function Sa({ onCreateTemplate: a, onEditTemplate: s }) {
305
+ function Ta({ onCreateTemplate: a, onEditTemplate: s }) {
315
306
  const [n, i] = B([]), [c, h] = B(() => {
316
307
  const u = localStorage.getItem("account");
317
308
  return u ? JSON.parse(u) : {
@@ -349,7 +340,7 @@ function Sa({ onCreateTemplate: a, onEditTemplate: s }) {
349
340
  [U]: P
350
341
  };
351
342
  h(L), localStorage.setItem("account", JSON.stringify(L));
352
- }, $ = (u, U) => {
343
+ }, H = (u, U) => {
353
344
  O({
354
345
  isOpen: !0,
355
346
  url: u,
@@ -377,33 +368,33 @@ function Sa({ onCreateTemplate: a, onEditTemplate: s }) {
377
368
  const U = b.trim(), P = U.toLowerCase(), L = U === "" || u.id.toString().includes(U) || u.name.toLowerCase().includes(P), Y = t === "all" || u.status.toLowerCase() === t.toLowerCase(), D = p === "all" || u.category.toLowerCase() === p.toLowerCase(), Z = j === "all" || u.language.toLowerCase().startsWith(j.toLowerCase());
378
369
  return L && Y && D && Z;
379
370
  }), V = Math.ceil(S.length / C), I = (R - 1) * C, _ = I + C, F = S.slice(I, _);
380
- return l ? /* @__PURE__ */ e("div", { className: "rsp-flex rsp-items-center rsp-justify-center rsp-min-h-screen", children: /* @__PURE__ */ e("div", { className: "rsp-text-lg rsp-text-gray-600", children: "Loading templates..." }) }) : /* @__PURE__ */ r("div", { className: "rsp-container rsp-mx-auto rsp-px-4 rsp-py-8 rsp-bg-[#f5f7fc] rsp-rounded-lg rsp-shadow-sm", children: [
381
- /* @__PURE__ */ r("div", { className: "rsp-flex rsp-justify-between rsp-items-center rsp-mb-6", children: [
382
- /* @__PURE__ */ e("h1", { className: "rsp-text-2xl rsp-font-bold", children: "Whatsapp HSM Templates" }),
383
- /* @__PURE__ */ e(
384
- "button",
385
- {
386
- onClick: () => a == null ? void 0 : a(),
387
- className: "rsp-bg-blue-600 rsp-text-white rsp-p-1 rsp-rounded-full hover:rsp-bg-blue-700 rsp-flex rsp-items-center rsp-gap-2",
388
- children: /* @__PURE__ */ e(ue, { className: "rsp-w-6 rsp-h-6" })
389
- }
390
- )
391
- ] }),
371
+ return l ? /* @__PURE__ */ e("div", { className: "rsp-flex rsp-items-center rsp-justify-center rsp-min-h-screen", children: /* @__PURE__ */ e("div", { className: "rsp-text-lg rsp-text-gray-600", children: "Loading templates..." }) }) : /* @__PURE__ */ r("div", { className: "rsp-container rsp-mx-auto rsp-px-4 rsp-py-1 rsp-bg-[#f5f7fc] rsp-rounded-lg rsp-shadow-sm", children: [
372
+ /* @__PURE__ */ e("div", { className: "rsp-flex rsp-justify-end rsp-items-center" }),
392
373
  /* @__PURE__ */ e("div", { className: " rsp-p-4 rsp-pl-0 rsp-rounded-lg rsp-shadow-sm rsp-mb-6", children: /* @__PURE__ */ r("div", { children: [
393
374
  /* @__PURE__ */ e("label", { className: "rsp-block rsp-text-sm rsp-font-medium rsp-text-gray-700 rsp-mb-1", children: "TrustSignal API Key" }),
394
- /* @__PURE__ */ r("div", { className: "rsp-relative", children: [
375
+ /* @__PURE__ */ r("div", { className: "rsp-flex rsp-items-end rsp-gap-2", children: [
376
+ /* @__PURE__ */ r("div", { className: "rsp-relative rsp-flex-1", children: [
377
+ /* @__PURE__ */ e(
378
+ "input",
379
+ {
380
+ type: "password",
381
+ name: "apiKey",
382
+ value: c.apiKey,
383
+ onChange: z,
384
+ className: "rsp-w-full rsp-px-0 rsp-py-2 rsp-border-0 rsp-border-b rsp-border-gray-300 rsp-text-sm focus:rsp-outline-none focus:rsp-border-blue-500 rsp-bg-transparent",
385
+ placeholder: "Enter your TrustSignal API key"
386
+ }
387
+ ),
388
+ /* @__PURE__ */ e("div", { className: "rsp-absolute rsp-bottom-0 rsp-left-0 rsp-w-4 rsp-h-0.5 rsp-bg-red-500" })
389
+ ] }),
395
390
  /* @__PURE__ */ e(
396
- "input",
391
+ "button",
397
392
  {
398
- type: "password",
399
- name: "apiKey",
400
- value: c.apiKey,
401
- onChange: z,
402
- className: "rsp-w-full rsp-px-0 rsp-py-2 rsp-border-0 rsp-border-b rsp-border-gray-300 rsp-text-sm focus:rsp-outline-none focus:rsp-border-blue-500 rsp-bg-transparent",
403
- placeholder: "Enter your TrustSignal API key"
393
+ onClick: () => a == null ? void 0 : a(),
394
+ className: "rsp-bg-blue-600 rsp-text-white rsp-p-1 rsp-rounded-full hover:rsp-bg-blue-700 rsp-flex rsp-items-center rsp-gap-2",
395
+ children: /* @__PURE__ */ e(ue, { className: "rsp-w-6 rsp-h-6" })
404
396
  }
405
- ),
406
- /* @__PURE__ */ e("div", { className: "rsp-absolute rsp-bottom-0 rsp-left-0 rsp-w-4 rsp-h-0.5 rsp-bg-red-500" })
397
+ )
407
398
  ] })
408
399
  ] }) }),
409
400
  g && /* @__PURE__ */ e("div", { className: "rsp-bg-red-50 rsp-border-l-4 rsp-border-red-500 rsp-p-4 rsp-mb-6", children: /* @__PURE__ */ r("div", { className: "rsp-flex", children: [
@@ -431,7 +422,7 @@ function Sa({ onCreateTemplate: a, onEditTemplate: s }) {
431
422
  {
432
423
  value: p,
433
424
  onChange: (u) => v(u.target.value),
434
- className: "rsp-cursor-pointer rsp-ml-2 rsp-bg-transparent rsp-text-white rsp-border-0 rsp-text-sm focus:rsp-outline-none ",
425
+ className: "rsp-w-full rsp-px-0 rsp-border-0 rsp-border-b rsp-border-gray-300 rsp-text-sm rsp-bg-transparent rsp-appearance-none rsp-h-10 rsp-leading-10 focus:rsp-outline-none focus:rsp-border-blue-500 rsp-cursor-pointer rsp-ml-2 rsp-text-white",
435
426
  onClick: (u) => u.stopPropagation(),
436
427
  children: [
437
428
  /* @__PURE__ */ e("option", { value: "all", className: "rsp-text-gray-900", children: "All" }),
@@ -450,7 +441,7 @@ function Sa({ onCreateTemplate: a, onEditTemplate: s }) {
450
441
  {
451
442
  value: t,
452
443
  onChange: (u) => x(u.target.value),
453
- className: "rsp-cursor-pointer rsp-ml-2 rsp-bg-transparent rsp-text-white rsp-border-0 rsp-text-sm focus:rsp-outline-none",
444
+ className: "rsp-w-full rsp-px-0 rsp-border-0 rsp-border-b rsp-border-gray-300 rsp-text-sm rsp-bg-transparent rsp-appearance-none rsp-h-10 rsp-leading-10 focus:rsp-outline-none focus:rsp-border-blue-500 rsp-cursor-pointer rsp-ml-2 rsp-text-white",
454
445
  onClick: (u) => u.stopPropagation(),
455
446
  children: [
456
447
  /* @__PURE__ */ e("option", { value: "all", className: "rsp-text-gray-900", children: "All" }),
@@ -483,7 +474,7 @@ function Sa({ onCreateTemplate: a, onEditTemplate: s }) {
483
474
  /* @__PURE__ */ e("td", { className: "rsp-px-6 rsp-py-4 rsp-text-sm rsp-text-gray-700", children: u.medialist && typeof u.medialist == "object" && "header" in u.medialist && u.medialist.header ? /* @__PURE__ */ r(
484
475
  "button",
485
476
  {
486
- onClick: () => $(String(u.medialist.header || ""), u.name),
477
+ onClick: () => H(String(u.medialist.header || ""), u.name),
487
478
  className: "rsp-inline-flex rsp-items-center rsp-px-3 rsp-py-1 rsp-rounded rsp-text-xs rsp-font-medium rsp-bg-blue-100 rsp-text-blue-800 hover:rsp-bg-blue-200 rsp-transition-colors",
488
479
  children: [
489
480
  /* @__PURE__ */ r("svg", { className: "rsp-w-3 rsp-h-3 rsp-mr-1", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: [
@@ -501,7 +492,7 @@ function Sa({ onCreateTemplate: a, onEditTemplate: s }) {
501
492
  onClick: () => s == null ? void 0 : s(String(u.id)),
502
493
  className: "rsp-inline-flex rsp-items-center rsp-justify-center rsp-w-8 rsp-h-8 rsp-rounded rsp-bg-blue-600 rsp-text-white hover:rsp-bg-blue-700 rsp-transition-colors",
503
494
  title: "Update",
504
- children: /* @__PURE__ */ e(Ke, { className: "rsp-w-4 rsp-h-4" })
495
+ children: /* @__PURE__ */ e(We, { className: "rsp-w-4 rsp-h-4" })
505
496
  }
506
497
  ),
507
498
  /* @__PURE__ */ e(
@@ -511,7 +502,7 @@ function Sa({ onCreateTemplate: a, onEditTemplate: s }) {
511
502
  disabled: k === u.id,
512
503
  className: `rsp-inline-flex rsp-items-center rsp-justify-center rsp-w-8 rsp-h-8 rsp-rounded rsp-text-white rsp-transition-colors ${k === u.id ? "rsp-bg-red-400" : "rsp-bg-red-600 hover:rsp-bg-red-700"}`,
513
504
  title: k === u.id ? "Deleting..." : "Delete",
514
- children: /* @__PURE__ */ e(Xe, { className: "rsp-w-4 rsp-h-4" })
505
+ children: /* @__PURE__ */ e(Je, { className: "rsp-w-4 rsp-h-4" })
515
506
  }
516
507
  )
517
508
  ] }) })
@@ -638,7 +629,7 @@ function Sa({ onCreateTemplate: a, onEditTemplate: s }) {
638
629
  )
639
630
  ] });
640
631
  }
641
- const Ze = async (a, s) => {
632
+ const Qe = async (a, s) => {
642
633
  var n, i, c, h, l, N, g;
643
634
  try {
644
635
  console.log("Creating template with data:", s);
@@ -695,7 +686,7 @@ const Ze = async (a, s) => {
695
686
  };
696
687
  }
697
688
  };
698
- function ea(a) {
689
+ function Ze(a) {
699
690
  const s = a.language, n = a.headerType === "MEDIA" && a.mediaType === "DOCUMENT", i = a.type === "CAROUSEL";
700
691
  return n ? Ue(a, s) : i ? je(a, s) : Re(a, s);
701
692
  }
@@ -792,7 +783,7 @@ const Ue = (a, s) => {
792
783
  text: k.body,
793
784
  ...ae(k.body).length > 0 && {
794
785
  example: {
795
- body_text: [aa(k)]
786
+ body_text: [ea(k)]
796
787
  }
797
788
  }
798
789
  },
@@ -821,7 +812,7 @@ const Ue = (a, s) => {
821
812
  i.push(o);
822
813
  }
823
814
  return n.components = i, JSON.stringify(n);
824
- }, aa = (a) => {
815
+ }, ea = (a) => {
825
816
  var i;
826
817
  const s = ae(a.body || ""), n = ((i = a == null ? void 0 : a.sampleContent) == null ? void 0 : i.bodyVariables) || {};
827
818
  return s.map(({ number: c }) => n[c] || `Sample ${c}`);
@@ -846,7 +837,7 @@ const Ue = (a, s) => {
846
837
  text: a.headerText,
847
838
  ...g.length > 0 && ((l = a.sampleContent) == null ? void 0 : l.headerVariables) && {
848
839
  example: {
849
- header_text: ra(a, g)
840
+ header_text: aa(a, g)
850
841
  }
851
842
  }
852
843
  };
@@ -901,7 +892,7 @@ const Ue = (a, s) => {
901
892
  }, ae = (a) => (a.match(/\{\{(\d+)\}\}/g) || []).map((n) => ({
902
893
  variable: n.replace(/[{}]/g, ""),
903
894
  number: n.replace(/[{}]/g, "")
904
- })), ge = (a) => a.startsWith("+") ? a : `+${a}`, ra = (a, s) => s.map(
895
+ })), ge = (a) => a.startsWith("+") ? a : `+${a}`, aa = (a, s) => s.map(
905
896
  ({ number: n }) => {
906
897
  var i, c;
907
898
  return ((c = (i = a.sampleContent) == null ? void 0 : i.headerVariables) == null ? void 0 : c[n]) || `Sample ${n}`;
@@ -911,13 +902,13 @@ const Ue = (a, s) => {
911
902
  var i, c;
912
903
  return ((c = (i = a.sampleContent) == null ? void 0 : i.bodyVariables) == null ? void 0 : c[n]) || `Sample ${n}`;
913
904
  }
914
- ), sa = async (a, s) => {
905
+ ), ra = async (a, s) => {
915
906
  try {
916
907
  if (!s.name || !s.body)
917
908
  throw new Error("Missing required template fields: name and body are required");
918
909
  if (!a.apiKey)
919
910
  throw new Error("Missing TrustSignal API key");
920
- return await Ze(
911
+ return await Qe(
921
912
  a.apiKey,
922
913
  s
923
914
  );
@@ -928,8 +919,8 @@ const Ue = (a, s) => {
928
919
  };
929
920
  }
930
921
  };
931
- async function na(a, s, n) {
932
- const i = ea(n), h = {
922
+ async function sa(a, s, n) {
923
+ const i = Ze(n), h = {
933
924
  method: "POST",
934
925
  headers: { "Content-Type": "application/json" },
935
926
  body: i,
@@ -944,7 +935,7 @@ async function na(a, s, n) {
944
935
  return { success: !0, raw: i };
945
936
  }
946
937
  }
947
- async function ia(a, s) {
938
+ async function na(a, s) {
948
939
  var N;
949
940
  const n = `https://wpapi.trustsignal.io/api/v1/template/${encodeURIComponent(s)}?api_key=${encodeURIComponent(a)}`, i = await fetch(n, { method: "GET", redirect: "follow" });
950
941
  if (!i.ok)
@@ -952,9 +943,9 @@ async function ia(a, s) {
952
943
  const c = await i.text(), h = JSON.parse(c), l = h.template || ((N = h.data) == null ? void 0 : N.template) || h;
953
944
  if (!l)
954
945
  throw new Error("Invalid template details response");
955
- return la(l);
946
+ return ia(l);
956
947
  }
957
- function la(a) {
948
+ function ia(a) {
958
949
  var k, A;
959
950
  const s = {
960
951
  headerVariables: {},
@@ -989,7 +980,7 @@ function la(a) {
989
980
  return v - j;
990
981
  });
991
982
  const M = w.map((x) => {
992
- const p = d.carousel[x] || {}, v = p.header || {}, j = p.body || {}, R = p.buttons && Array.isArray(p.buttons.buttons) ? p.buttons.buttons : [], f = v.format, C = f === "IMAGE" || f === "VIDEO" || f === "DOCUMENT" ? f : void 0, O = `card${x.replace("card", "")}header`, z = v.url || (a.medialist ? a.medialist[O] : void 0), $ = j.text || "", m = [];
983
+ const p = d.carousel[x] || {}, v = p.header || {}, j = p.body || {}, R = p.buttons && Array.isArray(p.buttons.buttons) ? p.buttons.buttons : [], f = v.format, C = f === "IMAGE" || f === "VIDEO" || f === "DOCUMENT" ? f : void 0, O = `card${x.replace("card", "")}header`, z = v.url || (a.medialist ? a.medialist[O] : void 0), H = j.text || "", m = [];
993
984
  for (const E of R) {
994
985
  if (!E || !E.type || !E.text) continue;
995
986
  const S = { id: de(), type: E.type === "PHONE_NUMBER" ? "PHONE_NUMBER" : E.type, text: E.text };
@@ -1001,7 +992,7 @@ function la(a) {
1001
992
  headerType: C ? "MEDIA" : "NONE",
1002
993
  mediaType: C,
1003
994
  mediaUrl: z,
1004
- body: $,
995
+ body: H,
1005
996
  buttons: m,
1006
997
  sampleContent: {
1007
998
  headerVariables: {},
@@ -1059,7 +1050,7 @@ function Me(a) {
1059
1050
  function de() {
1060
1051
  return typeof crypto < "u" && "randomUUID" in crypto ? crypto.randomUUID() : "id-" + Math.random().toString(36).slice(2);
1061
1052
  }
1062
- const ta = [
1053
+ const la = [
1063
1054
  { value: "af", label: "Afrikaans" },
1064
1055
  { value: "sq", label: "Albanian" },
1065
1056
  { value: "ar", label: "Arabic" },
@@ -1125,16 +1116,16 @@ const ta = [
1125
1116
  { value: "ur", label: "Urdu" },
1126
1117
  { value: "uz", label: "Uzbek" },
1127
1118
  { value: "vi", label: "Vietnamese" }
1128
- ], ca = [
1119
+ ], ta = [
1129
1120
  { value: "NONE", label: "None" },
1130
1121
  { value: "TEXT", label: "Text" },
1131
1122
  { value: "MEDIA", label: "Media" }
1132
- ], ma = [
1123
+ ], ca = [
1133
1124
  { value: "IMAGE", label: "Image" },
1134
1125
  { value: "VIDEO", label: "Video" },
1135
1126
  { value: "DOCUMENT", label: "Document" }
1136
- ], da = 5 * 1024 * 1024, xa = 16 * 1024 * 1024, pa = 100 * 1024 * 1024, xe = ["jpg", "jpeg", "png"], pe = ["mp4", "3gpp"], oe = ["pdf", "docx", "xlsx", "pptx", "txt"];
1137
- function oa({ template: a, setTemplate: s, onFileUpload: n }) {
1127
+ ], ma = 5 * 1024 * 1024, da = 16 * 1024 * 1024, xa = 100 * 1024 * 1024, xe = ["jpg", "jpeg", "png"], pe = ["mp4", "3gpp"], oe = ["pdf", "docx", "xlsx", "pptx", "txt"];
1128
+ function pa({ template: a, setTemplate: s, onFileUpload: n }) {
1138
1129
  var j, R;
1139
1130
  const [i, c] = X.useState(null), [h, l] = X.useState(!1), [N, g] = X.useState(null), [o, k] = X.useState(null), A = () => {
1140
1131
  const C = (a.headerText || "").match(/{{\d+}}/g);
@@ -1147,7 +1138,7 @@ function oa({ template: a, setTemplate: s, onFileUpload: n }) {
1147
1138
  }, d = () => {
1148
1139
  const T = `{{${A() + 1}}}`;
1149
1140
  if (N && a.headerText.length + T.length <= 60) {
1150
- const O = N.selectionStart || a.headerText.length, z = a.headerText.substring(0, O), $ = a.headerText.substring(O), m = z + T + $;
1141
+ const O = N.selectionStart || a.headerText.length, z = a.headerText.substring(0, O), H = a.headerText.substring(O), m = z + T + H;
1151
1142
  s({ ...a, headerText: m }), setTimeout(() => {
1152
1143
  if (N) {
1153
1144
  const E = O + T.length;
@@ -1171,15 +1162,15 @@ function oa({ template: a, setTemplate: s, onFileUpload: n }) {
1171
1162
  switch (C) {
1172
1163
  case "IMAGE":
1173
1164
  if (!xe.includes(T)) return "Invalid format. Only JPG, JPEG, PNG are allowed.";
1174
- if (f.size > da) return "File is too large. Max size is 5 MB.";
1165
+ if (f.size > ma) return "File is too large. Max size is 5 MB.";
1175
1166
  break;
1176
1167
  case "VIDEO":
1177
1168
  if (!pe.includes(T)) return "Invalid format. Only MP4, 3GPP are allowed.";
1178
- if (f.size > xa) return "File is too large. Max size is 16 MB.";
1169
+ if (f.size > da) return "File is too large. Max size is 16 MB.";
1179
1170
  break;
1180
1171
  case "DOCUMENT":
1181
1172
  if (!oe.includes(T)) return "Invalid format. Allowed types: PDF, DOCX, XLSX, PPTX, TXT.";
1182
- if (f.size > pa) return "File is too large. Max size is 100 MB.";
1173
+ if (f.size > xa) return "File is too large. Max size is 100 MB.";
1183
1174
  break;
1184
1175
  default:
1185
1176
  return "Invalid media type.";
@@ -1218,8 +1209,8 @@ function oa({ template: a, setTemplate: s, onFileUpload: n }) {
1218
1209
  s({ ...a, mediaUrl: z });
1219
1210
  } catch (z) {
1220
1211
  console.error("File upload failed:", z), t();
1221
- const $ = z instanceof Error ? z.message : "File upload failed. Please try again.";
1222
- k($);
1212
+ const H = z instanceof Error ? z.message : "File upload failed. Please try again.";
1213
+ k(H);
1223
1214
  } finally {
1224
1215
  l(!1);
1225
1216
  }
@@ -1250,8 +1241,8 @@ function oa({ template: a, setTemplate: s, onFileUpload: n }) {
1250
1241
  {
1251
1242
  value: a.headerType,
1252
1243
  onChange: (f) => w(f.target.value),
1253
- className: "rsp-w-full rsp-px-0 rsp-py-2 rsp-border-0 rsp-border-b rsp-border-gray-300 rsp-text-sm focus:rsp-outline-none focus:rsp-border-blue-500 rsp-bg-transparent rsp-appearance-none",
1254
- children: ca.map((f) => /* @__PURE__ */ e("option", { value: f.value, children: f.label }, f.value))
1244
+ className: "rsp-w-full rsp-px-0 rsp-border-0 rsp-border-b rsp-border-gray-300 rsp-text-sm rsp-bg-transparent rsp-appearance-none rsp-h-10 rsp-leading-10 focus:rsp-outline-none focus:rsp-border-blue-500",
1245
+ children: ta.map((f) => /* @__PURE__ */ e("option", { value: f.value, children: f.label }, f.value))
1255
1246
  }
1256
1247
  ),
1257
1248
  /* @__PURE__ */ e("div", { className: "rsp-absolute rsp-inset-y-0 rsp-right-0 rsp-flex rsp-items-center rsp-px-2 rsp-pointer-events-none", children: /* @__PURE__ */ e("svg", { className: "rsp-w-4 rsp-h-4 rsp-text-gray-400", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }) }) }),
@@ -1305,13 +1296,13 @@ function oa({ template: a, setTemplate: s, onFileUpload: n }) {
1305
1296
  value: ((O = (T = a.sampleContent) == null ? void 0 : T.headerVariables) == null ? void 0 : O[C]) || "",
1306
1297
  onChange: (z) => {
1307
1298
  var m, E, S;
1308
- const $ = {
1299
+ const H = {
1309
1300
  ...a.sampleContent,
1310
1301
  headerVariables: { ...(m = a.sampleContent) == null ? void 0 : m.headerVariables, [C]: z.target.value },
1311
1302
  bodyVariables: ((E = a.sampleContent) == null ? void 0 : E.bodyVariables) || {},
1312
1303
  buttonVariables: ((S = a.sampleContent) == null ? void 0 : S.buttonVariables) || {}
1313
1304
  };
1314
- s({ ...a, sampleContent: $ });
1305
+ s({ ...a, sampleContent: H });
1315
1306
  },
1316
1307
  className: "rsp-flex-1 rsp-px-2 rsp-py-1 rsp-border rsp-border-gray-300 rsp-rounded rsp-text-xs focus:rsp-outline-none focus:rsp-border-blue-500",
1317
1308
  placeholder: "Sample"
@@ -1323,10 +1314,10 @@ function oa({ template: a, setTemplate: s, onFileUpload: n }) {
1323
1314
  type: "button",
1324
1315
  onClick: () => {
1325
1316
  var E, S, V;
1326
- const z = new RegExp(`\\{\\{${C}\\}\\}`, "g"), $ = (a.headerText || "").replace(z, ""), m = Object.fromEntries(Object.entries(((E = a.sampleContent) == null ? void 0 : E.headerVariables) || {}).filter(([I]) => I !== C));
1317
+ const z = new RegExp(`\\{\\{${C}\\}\\}`, "g"), H = (a.headerText || "").replace(z, ""), m = Object.fromEntries(Object.entries(((E = a.sampleContent) == null ? void 0 : E.headerVariables) || {}).filter(([I]) => I !== C));
1327
1318
  s({
1328
1319
  ...a,
1329
- headerText: $,
1320
+ headerText: H,
1330
1321
  sampleContent: {
1331
1322
  ...a.sampleContent,
1332
1323
  headerVariables: m,
@@ -1360,8 +1351,8 @@ function oa({ template: a, setTemplate: s, onFileUpload: n }) {
1360
1351
  mediaUrl: ""
1361
1352
  })), c(null), k(null);
1362
1353
  },
1363
- className: "rsp-w-full rsp-px-0 rsp-py-2 rsp-border-0 rsp-border-b rsp-border-gray-300 rsp-text-sm focus:rsp-outline-none focus:rsp-border-blue-500 rsp-bg-transparent rsp-appearance-none",
1364
- children: ma.map((f) => /* @__PURE__ */ e("option", { value: f.value, children: f.label }, f.value))
1354
+ className: "rsp-w-full rsp-px-0 rsp-border-0 rsp-border-b rsp-border-gray-300 rsp-text-sm rsp-bg-transparent rsp-appearance-none rsp-h-10 rsp-leading-10 focus:rsp-outline-none focus:rsp-border-blue-500",
1355
+ children: ca.map((f) => /* @__PURE__ */ e("option", { value: f.value, children: f.label }, f.value))
1365
1356
  }
1366
1357
  ),
1367
1358
  /* @__PURE__ */ e("div", { className: "rsp-absolute rsp-inset-y-0 rsp-right-0 rsp-flex rsp-items-center rsp-px-2 rsp-pointer-events-none", children: /* @__PURE__ */ e("svg", { className: "rsp-w-4 rsp-h-4 rsp-text-gray-400", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }) }) })
@@ -1385,8 +1376,8 @@ function oa({ template: a, setTemplate: s, onFileUpload: n }) {
1385
1376
  }
1386
1377
  }
1387
1378
  ),
1388
- a.mediaType === "VIDEO" && /* @__PURE__ */ e("div", { className: "rsp-w-12 rsp-h-12 rsp-bg-gray-200 rsp-rounded rsp-flex rsp-items-center rsp-justify-center flex-shrink-0", children: /* @__PURE__ */ e(Ge, { className: "rsp-w-6 rsp-h-6 rsp-text-gray-500" }) }),
1389
- a.mediaType === "DOCUMENT" && /* @__PURE__ */ e("div", { className: "rsp-w-12 rsp-h-12 rsp-bg-gray-200 rsp-rounded rsp-flex rsp-items-center rsp-justify-center flex-shrink-0", children: /* @__PURE__ */ e($e, { className: "rsp-w-6 rsp-h-6 rsp-text-gray-500" }) }),
1379
+ a.mediaType === "VIDEO" && /* @__PURE__ */ e("div", { className: "rsp-w-12 rsp-h-12 rsp-bg-gray-200 rsp-rounded rsp-flex rsp-items-center rsp-justify-center flex-shrink-0", children: /* @__PURE__ */ e($e, { className: "rsp-w-6 rsp-h-6 rsp-text-gray-500" }) }),
1380
+ a.mediaType === "DOCUMENT" && /* @__PURE__ */ e("div", { className: "rsp-w-12 rsp-h-12 rsp-bg-gray-200 rsp-rounded rsp-flex rsp-items-center rsp-justify-center flex-shrink-0", children: /* @__PURE__ */ e(He, { className: "rsp-w-6 rsp-h-6 rsp-text-gray-500" }) }),
1390
1381
  /* @__PURE__ */ r("div", { className: "overflow-hidden", children: [
1391
1382
  /* @__PURE__ */ e("p", { className: "rsp-text-sm rsp-font-medium rsp-text-gray-900 rsp-truncate", children: i ? i.name : a.mediaUrl }),
1392
1383
  i && /* @__PURE__ */ e("p", { className: "rsp-text-xs rsp-text-gray-500", children: `${(i.size / 1024 / 1024).toFixed(2)} MB` })
@@ -1401,7 +1392,7 @@ function oa({ template: a, setTemplate: s, onFileUpload: n }) {
1401
1392
  htmlFor: "media-upload",
1402
1393
  className: `rsp-w-full rsp-px-4 rsp-py-3 rsp-border-2 rsp-border-dashed rsp-border-gray-300 rsp-rounded-md rsp-flex rsp-flex-col rsp-items-center rsp-justify-center rsp-cursor-pointer rsp-transition-colors hover:rsp-border-gray-400 hover:rsp-bg-gray-50 ${h ? "rsp-opacity-50 rsp-cursor-not-allowed" : ""}`,
1403
1394
  children: [
1404
- /* @__PURE__ */ e(Ye, { className: "rsp-w-6 rsp-h-6 rsp-text-gray-400 rsp-mb-2" }),
1395
+ /* @__PURE__ */ e(Xe, { className: "rsp-w-6 rsp-h-6 rsp-text-gray-400 rsp-mb-2" }),
1405
1396
  /* @__PURE__ */ e("span", { className: "rsp-text-sm rsp-text-gray-600", children: h ? "Uploading..." : `Upload ${((j = a.mediaType) == null ? void 0 : j.toLowerCase()) || "file"}` }),
1406
1397
  /* @__PURE__ */ r("span", { className: "rsp-text-xs rsp-text-gray-400 rsp-mt-1", children: [
1407
1398
  a.mediaType === "IMAGE" && "JPG, PNG up to 5MB",
@@ -3234,7 +3225,7 @@ const Le = [
3234
3225
  { name: "south-africa", hexadecimal: "&#x1f1ff;&#x1f1e6;" },
3235
3226
  { name: "zambia", hexadecimal: "&#x1f1ff;&#x1f1f2;" },
3236
3227
  { name: "zimbabwe", hexadecimal: "&#x1f1ff;&#x1f1fc;" }
3237
- ], fa = ({
3228
+ ], oa = ({
3238
3229
  emojis: a,
3239
3230
  onSelect: s,
3240
3231
  onClose: n
@@ -3334,7 +3325,7 @@ function we({ isOpen: a, onClose: s, onSelect: n }) {
3334
3325
  " emojis found"
3335
3326
  ] }),
3336
3327
  /* @__PURE__ */ e(
3337
- fa,
3328
+ oa,
3338
3329
  {
3339
3330
  emojis: h,
3340
3331
  onSelect: n,
@@ -3343,7 +3334,7 @@ function we({ isOpen: a, onClose: s, onSelect: n }) {
3343
3334
  )
3344
3335
  ] }) });
3345
3336
  }
3346
- function ha({ template: a, setTemplate: s }) {
3337
+ function fa({ template: a, setTemplate: s }) {
3347
3338
  const [n, i] = B(!1), [c, h] = B(null), [l, N] = B(null), [g, o] = B(null), [k, A] = B(!1), d = () => {
3348
3339
  const t = (a.body || "").match(/{{\d+}}/g);
3349
3340
  if (!t) return 0;
@@ -3543,7 +3534,7 @@ function ha({ template: a, setTemplate: s }) {
3543
3534
  )
3544
3535
  ] });
3545
3536
  }
3546
- function ua({ template: a, setTemplate: s }) {
3537
+ function ha({ template: a, setTemplate: s }) {
3547
3538
  var y;
3548
3539
  const [n, i] = B(null), [c, h] = B(!1), [l, N] = B({
3549
3540
  text: "",
@@ -3609,7 +3600,7 @@ function ua({ template: a, setTemplate: s }) {
3609
3600
  },
3610
3601
  {
3611
3602
  type: "URL",
3612
- icon: He,
3603
+ icon: qe,
3613
3604
  label: "Web URL",
3614
3605
  description: "Link to websites or pages",
3615
3606
  limit: 2,
@@ -3833,7 +3824,7 @@ function ua({ template: a, setTemplate: s }) {
3833
3824
  var T, O, z;
3834
3825
  const R = new RegExp(`\\{\\{${p}\\}\\}`, "g"), f = (l.value || "").replace(R, "");
3835
3826
  N({ ...l, value: f });
3836
- const C = Object.fromEntries(Object.entries(((T = a.sampleContent) == null ? void 0 : T.buttonVariables) || {}).filter(([$]) => $ !== p));
3827
+ const C = Object.fromEntries(Object.entries(((T = a.sampleContent) == null ? void 0 : T.buttonVariables) || {}).filter(([H]) => H !== p));
3837
3828
  s({
3838
3829
  ...a,
3839
3830
  sampleContent: {
@@ -3966,7 +3957,7 @@ function ua({ template: a, setTemplate: s }) {
3966
3957
  ] })
3967
3958
  ] });
3968
3959
  }
3969
- const ba = async (a) => {
3960
+ const ua = async (a) => {
3970
3961
  try {
3971
3962
  if (!a)
3972
3963
  throw new Error("No file provided");
@@ -4005,7 +3996,7 @@ const ba = async (a) => {
4005
3996
  } catch (s) {
4006
3997
  throw console.error("File upload error:", s), s instanceof Error ? s : new Error("Unknown error occurred during file upload");
4007
3998
  }
4008
- }, ga = (a, s) => {
3999
+ }, ba = (a, s) => {
4009
4000
  const i = a.name.toLowerCase().split(".").pop();
4010
4001
  switch (s) {
4011
4002
  case "IMAGE":
@@ -4017,7 +4008,7 @@ const ba = async (a) => {
4017
4008
  default:
4018
4009
  return !1;
4019
4010
  }
4020
- }, ya = (a) => {
4011
+ }, ga = (a) => {
4021
4012
  switch (a) {
4022
4013
  case "IMAGE":
4023
4014
  return 5 * 1024 * 1024;
@@ -4029,8 +4020,8 @@ const ba = async (a) => {
4029
4020
  return 10 * 1024 * 1024;
4030
4021
  }
4031
4022
  };
4032
- function wa({ template: a, setTemplate: s, onFileUpload: n }) {
4033
- var C, T, O, z, $;
4023
+ function ya({ template: a, setTemplate: s, onFileUpload: n }) {
4024
+ var C, T, O, z, H;
4034
4025
  const [i, c] = X.useState({}), [, h] = X.useState({}), [l, N] = X.useState({ open: !1, message: "" }), [g, o] = X.useState(!1), [k, A] = X.useState(null), d = X.useRef({}), w = () => {
4035
4026
  var E;
4036
4027
  const m = {
@@ -4144,9 +4135,9 @@ function wa({ template: a, setTemplate: s, onFileUpload: n }) {
4144
4135
  try {
4145
4136
  c((F) => ({ ...F, [m]: !0 })), h((F) => ({ ...F, [m]: !1 }));
4146
4137
  const V = ((S = a.carousel) == null ? void 0 : S.type) === "VIDEO" ? "VIDEO" : "IMAGE";
4147
- if (!ga(E, V))
4138
+ if (!ba(E, V))
4148
4139
  throw new Error(`Invalid file type. Expected ${V.toLowerCase()} file.`);
4149
- const I = ya(V);
4140
+ const I = ga(V);
4150
4141
  if (E.size > I) {
4151
4142
  const F = I / 1048576;
4152
4143
  throw new Error(`File size too large. Maximum allowed size is ${F}MB.`);
@@ -4223,7 +4214,7 @@ function wa({ template: a, setTemplate: s, onFileUpload: n }) {
4223
4214
  ] })
4224
4215
  ] })
4225
4216
  ] }),
4226
- /* @__PURE__ */ e("div", { className: "rsp-space-y-6", children: ($ = a.carousel) == null ? void 0 : $.cards.map((m, E) => {
4217
+ /* @__PURE__ */ e("div", { className: "rsp-space-y-6", children: (H = a.carousel) == null ? void 0 : H.cards.map((m, E) => {
4227
4218
  var S, V, I, _, F, u, U, P;
4228
4219
  return /* @__PURE__ */ r("div", { className: "rsp-bg-white rsp-rounded-xl rsp-border-2 rsp-border-gray-200 rsp-overflow-hidden rsp-shadow-lg rsp-transition-all hover:rsp-shadow-xl hover:rsp-border-blue-300", children: [
4229
4220
  /* @__PURE__ */ r("div", { className: "rsp-bg-gradient-to-r rsp-from-blue-50 rsp-to-blue-100 rsp-px-5 rsp-py-3 rsp-flex rsp-items-center rsp-justify-between rsp-border-b rsp-border-gray-200", children: [
@@ -4397,11 +4388,11 @@ function wa({ template: a, setTemplate: s, onFileUpload: n }) {
4397
4388
  carousel: {
4398
4389
  ...J.carousel,
4399
4390
  cards: J.carousel.cards.map((q) => {
4400
- var G, K, ee;
4391
+ var $, K, ee;
4401
4392
  return q.id !== m.id ? q : {
4402
4393
  ...q,
4403
4394
  sampleContent: {
4404
- headerVariables: ((G = q.sampleContent) == null ? void 0 : G.headerVariables) || {},
4395
+ headerVariables: (($ = q.sampleContent) == null ? void 0 : $.headerVariables) || {},
4405
4396
  bodyVariables: {
4406
4397
  ...((K = q.sampleContent) == null ? void 0 : K.bodyVariables) || {},
4407
4398
  [D]: re
@@ -4428,9 +4419,9 @@ function wa({ template: a, setTemplate: s, onFileUpload: n }) {
4428
4419
  carousel: {
4429
4420
  ...J.carousel,
4430
4421
  cards: J.carousel.cards.map((q) => {
4431
- var G, K, ee;
4422
+ var $, K, ee;
4432
4423
  if (q.id !== m.id) return q;
4433
- const Q = Object.fromEntries(Object.entries(((G = q.sampleContent) == null ? void 0 : G.bodyVariables) || {}).filter(([ie]) => ie !== D));
4424
+ const Q = Object.fromEntries(Object.entries((($ = q.sampleContent) == null ? void 0 : $.bodyVariables) || {}).filter(([ie]) => ie !== D));
4434
4425
  return {
4435
4426
  ...q,
4436
4427
  body: re,
@@ -4636,15 +4627,15 @@ function wa({ template: a, setTemplate: s, onFileUpload: n }) {
4636
4627
  ...Q,
4637
4628
  carousel: {
4638
4629
  ...Q.carousel,
4639
- cards: Q.carousel.cards.map((G) => {
4630
+ cards: Q.carousel.cards.map(($) => {
4640
4631
  var K, ee, ie;
4641
- return G.id !== m.id ? G : {
4642
- ...G,
4632
+ return $.id !== m.id ? $ : {
4633
+ ...$,
4643
4634
  sampleContent: {
4644
- headerVariables: ((K = G.sampleContent) == null ? void 0 : K.headerVariables) || {},
4645
- bodyVariables: ((ee = G.sampleContent) == null ? void 0 : ee.bodyVariables) || {},
4635
+ headerVariables: ((K = $.sampleContent) == null ? void 0 : K.headerVariables) || {},
4636
+ bodyVariables: ((ee = $.sampleContent) == null ? void 0 : ee.bodyVariables) || {},
4646
4637
  buttonVariables: {
4647
- ...((ie = G.sampleContent) == null ? void 0 : ie.buttonVariables) || {},
4638
+ ...((ie = $.sampleContent) == null ? void 0 : ie.buttonVariables) || {},
4648
4639
  [W]: q
4649
4640
  }
4650
4641
  }
@@ -4663,11 +4654,11 @@ function wa({ template: a, setTemplate: s, onFileUpload: n }) {
4663
4654
  type: "button",
4664
4655
  onClick: () => {
4665
4656
  const J = L.value || "", q = new RegExp(`\\{\\{${W}\\}\\}`, "g"), Q = J.replace(q, "");
4666
- j(m.id, L.id, "value", Q), s((G) => ({
4667
- ...G,
4657
+ j(m.id, L.id, "value", Q), s(($) => ({
4658
+ ...$,
4668
4659
  carousel: {
4669
- ...G.carousel,
4670
- cards: G.carousel.cards.map((K) => {
4660
+ ...$.carousel,
4661
+ cards: $.carousel.cards.map((K) => {
4671
4662
  var ie, ve, ke;
4672
4663
  if (K.id !== m.id) return K;
4673
4664
  const ee = Object.fromEntries(Object.entries(((ie = K.sampleContent) == null ? void 0 : ie.buttonVariables) || {}).filter(([Ie]) => Ie !== W));
@@ -4741,12 +4732,12 @@ function wa({ template: a, setTemplate: s, onFileUpload: n }) {
4741
4732
  const Te = async (a) => {
4742
4733
  try {
4743
4734
  console.log(`Starting file upload: ${a.name}`);
4744
- const s = await ba(a);
4735
+ const s = await ua(a);
4745
4736
  return console.log(`File uploaded successfully: ${s}`), s;
4746
4737
  } catch (s) {
4747
4738
  throw console.error("Upload failed in parent:", s), s;
4748
4739
  }
4749
- }, va = (a) => {
4740
+ }, wa = (a) => {
4750
4741
  const n = (a.body || "").match(/\{\{(\d+)\}\}/g);
4751
4742
  if (!n) return 0;
4752
4743
  const i = n.map((c) => {
@@ -4755,7 +4746,7 @@ const Te = async (a) => {
4755
4746
  });
4756
4747
  return i.length > 0 ? Math.max(...i) : 0;
4757
4748
  };
4758
- function ka({ template: a, setTemplate: s }) {
4749
+ function va({ template: a, setTemplate: s }) {
4759
4750
  const [n, i] = X.useState(!1), c = X.useRef(null), h = () => {
4760
4751
  i(!0), setTimeout(() => {
4761
4752
  c.current && c.current.focus();
@@ -4773,8 +4764,8 @@ function ka({ template: a, setTemplate: s }) {
4773
4764
  a.type !== "CAROUSEL" && /* @__PURE__ */ r("div", { className: "rsp-space-y-6", children: [
4774
4765
  /* @__PURE__ */ e("h2", { className: "rsp-text-lg rsp-font-semibold rsp-text-gray-900", children: "Message Content" }),
4775
4766
  /* @__PURE__ */ r("div", { className: "rsp-space-y-6", children: [
4776
- /* @__PURE__ */ e(oa, { template: a, setTemplate: s, onFileUpload: Te }),
4777
- /* @__PURE__ */ e(ha, { template: a, setTemplate: s })
4767
+ /* @__PURE__ */ e(pa, { template: a, setTemplate: s, onFileUpload: Te }),
4768
+ /* @__PURE__ */ e(fa, { template: a, setTemplate: s })
4778
4769
  ] })
4779
4770
  ] }),
4780
4771
  a.type === "CAROUSEL" && /* @__PURE__ */ r("div", { className: "rsp-space-y-6", children: [
@@ -4803,7 +4794,7 @@ function ka({ template: a, setTemplate: s }) {
4803
4794
  "button",
4804
4795
  {
4805
4796
  onClick: () => {
4806
- const o = `{{${va(a) + 1}}}`;
4797
+ const o = `{{${wa(a) + 1}}}`;
4807
4798
  s({ ...a, body: a.body + o });
4808
4799
  },
4809
4800
  className: "rsp-p-1 rsp-text-gray-500 hover:rsp-text-gray-700 hover:rsp-bg-gray-100 rsp-rounded",
@@ -4891,7 +4882,7 @@ function ka({ template: a, setTemplate: s }) {
4891
4882
  ] }) })
4892
4883
  ] }),
4893
4884
  a.type === "CAROUSEL" && /* @__PURE__ */ e("div", { className: "rsp-space-y-6", children: /* @__PURE__ */ e(
4894
- wa,
4885
+ ya,
4895
4886
  {
4896
4887
  template: a,
4897
4888
  setTemplate: s,
@@ -4899,7 +4890,7 @@ function ka({ template: a, setTemplate: s }) {
4899
4890
  }
4900
4891
  ) }),
4901
4892
  a.type !== "CAROUSEL" && /* @__PURE__ */ e("div", { className: "rsp-space-y-6", children: /* @__PURE__ */ e(
4902
- ua,
4893
+ ha,
4903
4894
  {
4904
4895
  template: a,
4905
4896
  setTemplate: s
@@ -4915,21 +4906,21 @@ function ka({ template: a, setTemplate: s }) {
4915
4906
  )
4916
4907
  ] });
4917
4908
  }
4918
- function Na({ type: a }) {
4909
+ function ka({ type: a }) {
4919
4910
  switch (a) {
4920
4911
  case "QUICK_REPLY":
4921
- return /* @__PURE__ */ e(Je, { className: "w-4 h-4" });
4912
+ return /* @__PURE__ */ e(Ke, { className: "w-4 h-4" });
4922
4913
  case "URL":
4923
- return /* @__PURE__ */ e(We, { className: "w-4 h-4" });
4914
+ return /* @__PURE__ */ e(Ge, { className: "w-4 h-4" });
4924
4915
  case "CALL":
4925
4916
  return /* @__PURE__ */ e(Ae, { className: "w-4 h-4" });
4926
4917
  case "FLOW":
4927
- return /* @__PURE__ */ e(Qe, { className: "w-4 h-4" });
4918
+ return /* @__PURE__ */ e(Ye, { className: "w-4 h-4" });
4928
4919
  default:
4929
4920
  return null;
4930
4921
  }
4931
4922
  }
4932
- function Ca({ buttons: a, flowButtonText: s, onShowAllOptions: n }) {
4923
+ function Na({ buttons: a, flowButtonText: s, onShowAllOptions: n }) {
4933
4924
  const i = [...a];
4934
4925
  s && i.push({
4935
4926
  id: "flow-button",
@@ -4944,7 +4935,7 @@ function Ca({ buttons: a, flowButtonText: s, onShowAllOptions: n }) {
4944
4935
  className: "rsp-w-full rsp-py-4 rsp-text-[#128C7E] rsp-text-[15px] rsp-font-medium rsp-bg-white hover:rsp-bg-gray-50 rsp-flex rsp-items-center rsp-gap-3 rsp-px-4 rsp-transition-colors",
4945
4936
  style: { fontFamily: 'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif' },
4946
4937
  children: [
4947
- /* @__PURE__ */ e("div", { className: "rsp-text-[#128C7E]", children: /* @__PURE__ */ e(Na, { type: h.type }) }),
4938
+ /* @__PURE__ */ e("div", { className: "rsp-text-[#128C7E]", children: /* @__PURE__ */ e(ka, { type: h.type }) }),
4948
4939
  /* @__PURE__ */ e("span", { className: "rsp-flex-1 rsp-text-left rsp-break-words rsp-break-all rsp-whitespace-pre-wrap", children: h.text }),
4949
4940
  h.id === "flow-button" && /* @__PURE__ */ e(Fe, { className: "rsp-w-5 rsp-h-5 rsp-text-[#128C7E] rsp-ml-auto" })
4950
4941
  ]
@@ -4965,7 +4956,7 @@ function Ca({ buttons: a, flowButtonText: s, onShowAllOptions: n }) {
4965
4956
  )
4966
4957
  ] });
4967
4958
  }
4968
- function Ea({ template: a }) {
4959
+ function Ca({ template: a }) {
4969
4960
  var A, d, w, M;
4970
4961
  const [s, n] = B(!1), [i, c] = B(0), h = (A = a.carousel) != null && A.cards ? a.carousel.cards.length : 0;
4971
4962
  le(() => {
@@ -5138,7 +5129,7 @@ function Ea({ template: a }) {
5138
5129
  )) })
5139
5130
  ] }) }) }) }),
5140
5131
  a.buttons.length > 0 && /* @__PURE__ */ e("div", { className: "rsp-flex rsp-justify-start", children: /* @__PURE__ */ e("div", { className: "rsp-bg-gradient-to-b rsp-from-white rsp-to-[#fafafa] rsp-rounded-[12px] rsp-overflow-hidden rsp-shadow-[0_2px_8px_rgba(0,0,0,0.08)] rsp-max-w-[220px] rsp-w-full rsp-border rsp-border-gray-100 rsp-animate-slide-up", children: /* @__PURE__ */ e(
5141
- Ca,
5132
+ Na,
5142
5133
  {
5143
5134
  buttons: a.buttons,
5144
5135
  onShowAllOptions: () => n(!0)
@@ -5199,7 +5190,7 @@ const Se = {
5199
5190
  footer: "",
5200
5191
  buttons: []
5201
5192
  };
5202
- function Va({ editId: a, onCancel: s }) {
5193
+ function Sa({ editId: a, onCancel: s }) {
5203
5194
  var y, t, x;
5204
5195
  const [n, i] = B(Se), [c, h] = B(!0), [l, N] = B(!1), [g, o] = B(!1), [k, A] = B(null), [d, w] = B({
5205
5196
  isOpen: !1
@@ -5224,14 +5215,14 @@ function Va({ editId: a, onCancel: s }) {
5224
5215
  throw new Error("Please set your API key in the dashboard first");
5225
5216
  let C;
5226
5217
  if (a) {
5227
- const T = await na(f.apiKey, a, n);
5218
+ const T = await sa(f.apiKey, a, n);
5228
5219
  if (!T.success)
5229
5220
  throw new Error(T.message || "Update failed");
5230
5221
  C = {
5231
5222
  status: "success",
5232
5223
  data: { details: [{ template_name: n.name, template_id: a }] }
5233
5224
  };
5234
- } else if (C = await sa(f, n), C.status === "error")
5225
+ } else if (C = await ra(f, n), C.status === "error")
5235
5226
  throw new Error(C.message);
5236
5227
  if (C.status === "error")
5237
5228
  throw new Error(C.message);
@@ -5254,7 +5245,7 @@ function Va({ editId: a, onCancel: s }) {
5254
5245
  const v = localStorage.getItem("account"), j = v ? JSON.parse(v) : { apiKey: "" };
5255
5246
  if (!j.apiKey)
5256
5247
  throw new Error("Please set your API key in the dashboard first");
5257
- const R = await ia(j.apiKey, a);
5248
+ const R = await na(j.apiKey, a);
5258
5249
  i((f) => ({ ...f, ...R }));
5259
5250
  } catch (v) {
5260
5251
  console.error("Failed to load template for edit", v), A(v instanceof Error ? v.message : "Failed to load template");
@@ -5268,34 +5259,21 @@ function Va({ editId: a, onCancel: s }) {
5268
5259
  /* @__PURE__ */ r("div", { className: "rsp-max-w-[1200px] rsp-mx-auto rsp-px-6 rsp-h-full", children: [
5269
5260
  /* @__PURE__ */ e("div", { className: "rsp-py-6 rsp-border-b rsp-border-gray-200", children: /* @__PURE__ */ r("div", { className: "rsp-flex rsp-items-center rsp-justify-between", children: [
5270
5261
  /* @__PURE__ */ e("h1", { className: "rsp-text-2xl rsp-font-semibold rsp-text-[#0043ff]", children: a ? "Edit Template" : "Add Template" }),
5271
- /* @__PURE__ */ r("div", { className: "rsp-flex rsp-items-center rsp-gap-3", children: [
5272
- /* @__PURE__ */ r(
5273
- "button",
5274
- {
5275
- onClick: () => h(!c),
5276
- className: `rsp-flex rsp-items-center rsp-gap-2 rsp-px-4 rsp-py-2 rsp-rounded-md rsp-text-sm rsp-font-medium rsp-transition-colors
5262
+ /* @__PURE__ */ e("div", { className: "rsp-flex rsp-items-center rsp-gap-3", children: /* @__PURE__ */ r(
5263
+ "button",
5264
+ {
5265
+ onClick: () => h(!c),
5266
+ className: `rsp-flex rsp-items-center rsp-gap-2 rsp-px-4 rsp-py-2 rsp-rounded-md rsp-text-sm rsp-font-medium rsp-transition-colors
5277
5267
  ${c ? "rsp-bg-blue-100 rsp-text-blue-700 rsp-border rsp-border-blue-200" : "rsp-bg-gray-100 rsp-text-gray-700 rsp-border rsp-border-gray-200"}`,
5278
- children: [
5279
- /* @__PURE__ */ r("svg", { className: "rsp-w-4 rsp-h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: [
5280
- /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z" }),
5281
- /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z" })
5282
- ] }),
5283
- c ? "Hide Preview" : "Show Preview"
5284
- ]
5285
- }
5286
- ),
5287
- /* @__PURE__ */ r(
5288
- "button",
5289
- {
5290
- onClick: () => s == null ? void 0 : s(),
5291
- className: "rsp-flex rsp-items-center rsp-gap-1 rsp-text-sm rsp-font-medium rsp-text-[#0043ff] hover:rsp-text-[#0033cc] rsp-transition-colors rsp-bg-transparent rsp-border-0 rsp-cursor-pointer",
5292
- children: [
5293
- /* @__PURE__ */ e(qe, { className: "rsp-w-5 rsp-h-5 rsp-relative rsp-left-[6px]" }),
5294
- "Back"
5295
- ]
5296
- }
5297
- )
5298
- ] })
5268
+ children: [
5269
+ /* @__PURE__ */ r("svg", { className: "rsp-w-4 rsp-h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: [
5270
+ /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z" }),
5271
+ /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z" })
5272
+ ] }),
5273
+ c ? "Hide Preview" : "Show Preview"
5274
+ ]
5275
+ }
5276
+ ) })
5299
5277
  ] }) }),
5300
5278
  /* @__PURE__ */ r("div", { className: `rsp-py-8 ${c ? "rsp-grid xl:rsp-grid-cols-[1fr,400px] rsp-gap-8" : ""}`, children: [
5301
5279
  /* @__PURE__ */ r("div", { className: `rsp-space-y-8 ${c ? "" : "rsp-max-w-4xl rsp-mx-auto"}`, children: [
@@ -5331,7 +5309,7 @@ function Va({ editId: a, onCancel: s }) {
5331
5309
  {
5332
5310
  value: n.category,
5333
5311
  onChange: (p) => i({ ...n, category: p.target.value }),
5334
- className: "rsp-w-full rsp-px-0 rsp-py-2 rsp-border-0 rsp-border-b rsp-border-gray-300 rsp-text-sm focus:rsp-outline-none focus:rsp-border-blue-500 rsp-bg-transparent rsp-appearance-none",
5312
+ className: "rsp-w-full rsp-px-0 rsp-border-0 rsp-border-b rsp-border-gray-300 rsp-text-sm rsp-bg-transparent rsp-appearance-none rsp-h-10 rsp-leading-10 focus:rsp-outline-none focus:rsp-border-blue-500",
5335
5313
  children: [
5336
5314
  /* @__PURE__ */ e("option", { value: "MARKETING", children: "Marketing" }),
5337
5315
  /* @__PURE__ */ e("option", { value: "UTILITY", children: "Utility" })
@@ -5351,8 +5329,8 @@ function Va({ editId: a, onCancel: s }) {
5351
5329
  {
5352
5330
  value: n.language,
5353
5331
  onChange: (p) => i({ ...n, language: p.target.value }),
5354
- className: "rsp-w-full rsp-px-0 rsp-py-2 rsp-border-0 rsp-border-b rsp-border-gray-300 rsp-text-sm focus:rsp-outline-none focus:rsp-border-blue-500 rsp-bg-transparent rsp-appearance-none",
5355
- children: ta.map((p) => /* @__PURE__ */ e("option", { value: p.value, children: p.label }, p.value))
5332
+ className: "rsp-w-full rsp-px-0 rsp-border-0 rsp-border-b rsp-border-gray-300 rsp-text-sm rsp-bg-transparent rsp-appearance-none rsp-h-10 rsp-leading-10 focus:rsp-outline-none focus:rsp-border-blue-500",
5333
+ children: la.map((p) => /* @__PURE__ */ e("option", { value: p.value, children: p.label }, p.value))
5356
5334
  }
5357
5335
  ),
5358
5336
  /* @__PURE__ */ e("div", { className: "rsp-absolute rsp-inset-y-0 rsp-right-0 rsp-flex rsp-items-center rsp-px-2 rsp-pointer-events-none", children: /* @__PURE__ */ e("svg", { className: "rsp-w-4 rsp-h-4 rsp-text-gray-400", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }) }) }),
@@ -5386,7 +5364,7 @@ function Va({ editId: a, onCancel: s }) {
5386
5364
  }
5387
5365
  }) : i({ ...n, type: v });
5388
5366
  },
5389
- className: "rsp-w-full rsp-px-0 rsp-py-2 rsp-border-0 rsp-border-b rsp-border-gray-300 rsp-text-sm focus:rsp-outline-none focus:rsp-border-blue-500 rsp-bg-transparent rsp-appearance-none",
5367
+ className: "rsp-w-full rsp-px-0 rsp-border-0 rsp-border-b rsp-border-gray-300 rsp-text-sm rsp-bg-transparent rsp-appearance-none rsp-h-10 rsp-leading-10 focus:rsp-outline-none focus:rsp-border-blue-500",
5390
5368
  children: [
5391
5369
  /* @__PURE__ */ e("option", { value: "BASIC", children: "Basic" }),
5392
5370
  /* @__PURE__ */ e("option", { value: "CAROUSEL", children: "Carousel" })
@@ -5405,7 +5383,7 @@ function Va({ editId: a, onCancel: s }) {
5405
5383
  {
5406
5384
  value: n.enableClickTracking.toString(),
5407
5385
  onChange: (p) => i({ ...n, enableClickTracking: p.target.value === "true" }),
5408
- className: "rsp-w-full rsp-px-0 rsp-py-2 rsp-border-0 rsp-border-b rsp-border-gray-300 rsp-text-sm focus:rsp-outline-none focus:rsp-border-blue-500 rsp-bg-transparent rsp-appearance-none",
5386
+ className: "rsp-w-full rsp-px-0 rsp-border-0 rsp-border-b rsp-border-gray-300 rsp-text-sm rsp-bg-transparent rsp-appearance-none rsp-h-10 rsp-leading-10 focus:rsp-outline-none focus:rsp-border-blue-500",
5409
5387
  children: [
5410
5388
  /* @__PURE__ */ e("option", { value: "false", children: "False" }),
5411
5389
  /* @__PURE__ */ e("option", { value: "true", children: "True" })
@@ -5417,7 +5395,7 @@ function Va({ editId: a, onCancel: s }) {
5417
5395
  ] })
5418
5396
  ] })
5419
5397
  ] }),
5420
- /* @__PURE__ */ e("div", { className: "rsp-bg-white rsp-p-6 rsp-rounded-lg rsp-shadow-sm", children: /* @__PURE__ */ e(ka, { template: n, setTemplate: i }) }),
5398
+ /* @__PURE__ */ e("div", { className: "rsp-bg-white rsp-p-6 rsp-rounded-lg rsp-shadow-sm", children: /* @__PURE__ */ e(va, { template: n, setTemplate: i }) }),
5421
5399
  /* @__PURE__ */ r("div", { className: "rsp-bg-white rsp-p-6 rsp-rounded-lg rsp-shadow-sm rsp-pt-6 rsp-border-t rsp-border-gray-200", children: [
5422
5400
  k && /* @__PURE__ */ r("div", { className: "rsp-mb-4 rsp-flex rsp-items-start rsp-gap-3 rsp-p-4 rsp-rounded-lg rsp-bg-red-50 rsp-border-l-4 rsp-border-l-red-500 rsp-relative rsp-animate-fade-in", children: [
5423
5401
  /* @__PURE__ */ e(he, { className: "rsp-w-5 rsp-h-5 rsp-text-red-500 rsp-flex-shrink-0 rsp-mt-0.5" }),
@@ -5434,19 +5412,29 @@ function Va({ editId: a, onCancel: s }) {
5434
5412
  }
5435
5413
  )
5436
5414
  ] }),
5437
- /* @__PURE__ */ e("div", { className: "rsp-flex rsp-gap-4", children: /* @__PURE__ */ e(
5438
- "button",
5439
- {
5440
- onClick: M,
5441
- disabled: g,
5442
- className: `rsp-flex-1 rsp-py-3 rsp-px-6 rsp-rounded-md rsp-transition-colors rsp-text-white rsp-font-medium rsp-text-sm
5415
+ /* @__PURE__ */ r("div", { className: "rsp-flex rsp-gap-4", children: [
5416
+ /* @__PURE__ */ e(
5417
+ "button",
5418
+ {
5419
+ onClick: () => s == null ? void 0 : s(),
5420
+ className: "rsp-flex-1 rsp-py-3 rsp-px-6 rsp-rounded-md rsp-transition-colors rsp-text-gray-700 rsp-font-medium rsp-text-sm rsp-bg-white rsp-border rsp-border-gray-300 hover:rsp-bg-gray-50",
5421
+ children: "Cancel"
5422
+ }
5423
+ ),
5424
+ /* @__PURE__ */ e(
5425
+ "button",
5426
+ {
5427
+ onClick: M,
5428
+ disabled: g,
5429
+ className: `rsp-flex-1 rsp-py-3 rsp-px-6 rsp-rounded-md rsp-transition-colors rsp-text-white rsp-font-medium rsp-text-sm
5443
5430
  ${g ? "rsp-bg-blue-600 rsp-cursor-not-allowed" : "rsp-bg-blue-600 hover:rsp-bg-blue-700 active:rsp-bg-blue-800"}`,
5444
- children: g ? a ? "Resubmitting for Approval..." : "Submitting for Approval..." : a ? "Resubmit for Approval" : "Submit for Approval"
5445
- }
5446
- ) })
5431
+ children: g ? a ? "Resubmitting for Approval..." : "Submitting for Approval..." : a ? "Resubmit for Approval" : "Submit for Approval"
5432
+ }
5433
+ )
5434
+ ] })
5447
5435
  ] })
5448
5436
  ] }),
5449
- c && /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("div", { className: "rsp-sticky rsp-top-4", children: /* @__PURE__ */ e(Ea, { template: n }) }) })
5437
+ c && /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("div", { className: "rsp-sticky rsp-top-4", children: /* @__PURE__ */ e(Ca, { template: n }) }) })
5450
5438
  ] })
5451
5439
  ] }),
5452
5440
  /* @__PURE__ */ e(
@@ -5488,8 +5476,8 @@ function Va({ editId: a, onCancel: s }) {
5488
5476
  )
5489
5477
  ] });
5490
5478
  }
5491
- const Ma = Oe({});
5492
- function Aa({ apiKey: a, pConfig: s, children: n }) {
5479
+ const Ea = Oe({});
5480
+ function Va({ apiKey: a, pConfig: s, children: n }) {
5493
5481
  const i = Ve(
5494
5482
  () => ({ apiKey: a, resulMeta: s }),
5495
5483
  [a, s]
@@ -5521,10 +5509,10 @@ function Aa({ apiKey: a, pConfig: s, children: n }) {
5521
5509
  g
5522
5510
  );
5523
5511
  }
5524
- }, [a, s]), /* @__PURE__ */ e(Ma.Provider, { value: i, children: n });
5512
+ }, [a, s]), /* @__PURE__ */ e(Ea.Provider, { value: i, children: n });
5525
5513
  }
5526
5514
  export {
5527
- Va as CreateTemplate,
5528
- Sa as Dashboard,
5529
- Aa as TrustSignalProvider
5515
+ Sa as CreateTemplate,
5516
+ Ta as Dashboard,
5517
+ Va as TrustSignalProvider
5530
5518
  };